DEATH AND DESTRUCTION
This commit is contained in:
@@ -8,7 +8,6 @@ import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.entities.units.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.logic.LExecutor.*;
|
||||
import mindustry.type.*;
|
||||
@@ -20,7 +19,7 @@ import static mindustry.Vars.*;
|
||||
|
||||
/** Stores global constants for logic processors. */
|
||||
public class GlobalConstants{
|
||||
public static final int ctrlProcessor = 1, ctrlPlayer = 2, ctrlFormation = 3;
|
||||
public static final int ctrlProcessor = 1, ctrlPlayer = 2;
|
||||
public static final ContentType[] lookableContent = {ContentType.block, ContentType.unit, ContentType.item, ContentType.liquid};
|
||||
/** Global random state. */
|
||||
public static final Rand rand = new Rand();
|
||||
@@ -50,7 +49,6 @@ public class GlobalConstants{
|
||||
|
||||
put("@ctrlProcessor", ctrlProcessor);
|
||||
put("@ctrlPlayer", ctrlPlayer);
|
||||
put("@ctrlFormation", ctrlFormation);
|
||||
|
||||
//store base content
|
||||
|
||||
@@ -83,10 +81,6 @@ public class GlobalConstants{
|
||||
put("@" + sensor.name(), sensor);
|
||||
}
|
||||
|
||||
for(UnitCommand cmd : UnitCommand.all){
|
||||
put("@command" + Strings.capitalize(cmd.name()), cmd);
|
||||
}
|
||||
|
||||
logicIdToContent = new UnlockableContent[ContentType.all.length][];
|
||||
contentIdToLogicId = new int[ContentType.all.length][];
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ public enum LAccess{
|
||||
flag,
|
||||
controlled,
|
||||
controller,
|
||||
commanded,
|
||||
name,
|
||||
payloadCount,
|
||||
payloadType,
|
||||
|
||||
@@ -338,7 +338,7 @@ public class LExecutor{
|
||||
/** Checks is a unit is valid for logic AI control, and returns the controller. */
|
||||
@Nullable
|
||||
public static LogicAI checkLogicAI(LExecutor exec, Object unitObj){
|
||||
if(unitObj instanceof Unit unit && unit.isValid() && exec.obj(varUnit) == unit && unit.team == exec.team && !unit.isPlayer() && !(unit.controller() instanceof FormationAI)){
|
||||
if(unitObj instanceof Unit unit && unit.isValid() && exec.obj(varUnit) == unit && unit.team == exec.team && !unit.isPlayer()){
|
||||
if(unit.controller() instanceof LogicAI la){
|
||||
la.controller = exec.building(varThis);
|
||||
return la;
|
||||
|
||||
Reference in New Issue
Block a user