Barely functional IO

This commit is contained in:
Anuken
2020-02-13 19:26:36 -05:00
parent ad248e2e20
commit e3621f44da
68 changed files with 323 additions and 497 deletions

View File

@@ -19,7 +19,7 @@ public class SpawnGroup implements Serializable{
public static final int never = Integer.MAX_VALUE;
/** The unit type spawned */
public UnitType type;
public UnitType type = UnitTypes.dagger;
/** When this spawn should end */
public int end = never;
/** When this spawn should start */
@@ -73,6 +73,7 @@ public class SpawnGroup implements Serializable{
@Override
public void write(Json json){
if(type == null) type = UnitTypes.dagger;
json.writeValue("type", type.name);
if(begin != 0) json.writeValue("begin", begin);
if(end != never) json.writeValue("end", end);