Logic unit control

This commit is contained in:
Anuken
2020-10-05 15:42:37 -04:00
parent 8e49d73765
commit 7088ae89b3
37 changed files with 661 additions and 202 deletions

View File

@@ -43,9 +43,9 @@ public class LogicStatementProcessor extends BaseProcessor{
String name = c.annotation(RegisterStatement.class).value();
if(beganWrite){
writer.nextControlFlow("else if(obj instanceof $T)", c.mirror());
writer.nextControlFlow("else if(obj.getClass() == $T.class)", c.mirror());
}else{
writer.beginControlFlow("if(obj instanceof $T)", c.mirror());
writer.beginControlFlow("if(obj.getClass() == $T.class)", c.mirror());
beganWrite = true;
}
@@ -53,6 +53,7 @@ public class LogicStatementProcessor extends BaseProcessor{
writer.addStatement("out.append($S)", name);
Seq<Svar> fields = c.fields();
fields.addAll(c.superclass().fields());
String readSt = "if(tokens[0].equals($S))";
if(beganRead){

View File

@@ -14,6 +14,8 @@ mindustry.entities.comp.EffectStateComp=9
mindustry.entities.comp.FireComp=10
mindustry.entities.comp.LaunchCoreComp=11
mindustry.entities.comp.PlayerComp=12
mindustry.entities.comp.PosTeam=27
mindustry.entities.comp.PosTeamDef=28
mindustry.entities.comp.PuddleComp=13
mindustry.type.Weather.WeatherStateComp=14
mindustry.world.blocks.campaign.LaunchPad.LaunchPayloadComp=15

View File

@@ -0,0 +1 @@
{fields:[{name:team,type:mindustry.game.Team},{name:x,type:float},{name:y,type:float}]}