Testing loading of old saves
This commit is contained in:
@@ -34,6 +34,30 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
phantom = new UnitType("phantom", Phantom.class, Phantom::new){{
|
||||||
|
isFlying = true;
|
||||||
|
drag = 0.01f;
|
||||||
|
mass = 2f;
|
||||||
|
speed = 0.45f;
|
||||||
|
maxVelocity = 1.9f;
|
||||||
|
range = 70f;
|
||||||
|
itemCapacity = 70;
|
||||||
|
health = 220;
|
||||||
|
buildPower = 0.9f;
|
||||||
|
minePower = 1.1f;
|
||||||
|
engineOffset = 6.5f;
|
||||||
|
toMine = ObjectSet.with(Items.lead, Items.copper, Items.titanium);
|
||||||
|
weapon = new Weapon("heal-blaster"){{
|
||||||
|
length = 1.5f;
|
||||||
|
reload = 20f;
|
||||||
|
width = 0.5f;
|
||||||
|
roundrobin = true;
|
||||||
|
ejectEffect = Fx.none;
|
||||||
|
recoil = 2f;
|
||||||
|
bullet = Bullets.healBullet;
|
||||||
|
}};
|
||||||
|
}};
|
||||||
|
|
||||||
dagger = new UnitType("dagger", Dagger.class, Dagger::new){{
|
dagger = new UnitType("dagger", Dagger.class, Dagger::new){{
|
||||||
maxVelocity = 1.1f;
|
maxVelocity = 1.1f;
|
||||||
speed = 0.2f;
|
speed = 0.2f;
|
||||||
@@ -213,30 +237,6 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
phantom = new UnitType("phantom", Phantom.class, Phantom::new){{
|
|
||||||
isFlying = true;
|
|
||||||
drag = 0.01f;
|
|
||||||
mass = 2f;
|
|
||||||
speed = 0.45f;
|
|
||||||
maxVelocity = 1.9f;
|
|
||||||
range = 70f;
|
|
||||||
itemCapacity = 70;
|
|
||||||
health = 220;
|
|
||||||
buildPower = 0.9f;
|
|
||||||
minePower = 1.1f;
|
|
||||||
engineOffset = 6.5f;
|
|
||||||
toMine = ObjectSet.with(Items.lead, Items.copper, Items.titanium);
|
|
||||||
weapon = new Weapon("heal-blaster"){{
|
|
||||||
length = 1.5f;
|
|
||||||
reload = 20f;
|
|
||||||
width = 0.5f;
|
|
||||||
roundrobin = true;
|
|
||||||
ejectEffect = Fx.none;
|
|
||||||
recoil = 2f;
|
|
||||||
bullet = Bullets.healBullet;
|
|
||||||
}};
|
|
||||||
}};
|
|
||||||
|
|
||||||
revenant = new UnitType("revenant", Revenant.class, Revenant::new){{
|
revenant = new UnitType("revenant", Revenant.class, Revenant::new){{
|
||||||
health = 1000;
|
health = 1000;
|
||||||
mass = 5f;
|
mass = 5f;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import io.anuke.arc.ApplicationCore;
|
import io.anuke.arc.*;
|
||||||
import io.anuke.arc.backends.headless.HeadlessApplication;
|
import io.anuke.arc.backends.headless.HeadlessApplication;
|
||||||
import io.anuke.arc.collection.Array;
|
import io.anuke.arc.collection.Array;
|
||||||
import io.anuke.arc.math.geom.Point2;
|
import io.anuke.arc.math.geom.Point2;
|
||||||
@@ -215,6 +215,15 @@ public class ApplicationTests{
|
|||||||
assertTrue(state.teams.get(defaultTeam).cores.size > 0);
|
assertTrue(state.teams.get(defaultTeam).cores.size > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void loadOldSave(){
|
||||||
|
resetWorld();
|
||||||
|
SaveIO.load(Core.files.internal("build77.msav"));
|
||||||
|
|
||||||
|
assertEquals(50, world.width());
|
||||||
|
assertEquals(50, world.height());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void inventoryDeposit(){
|
void inventoryDeposit(){
|
||||||
depositTest(Blocks.surgeSmelter, Items.copper);
|
depositTest(Blocks.surgeSmelter, Items.copper);
|
||||||
|
|||||||
Reference in New Issue
Block a user