mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-03-15 03:11:07 -07:00
Bulwark shield mechanics mostly done
This commit is contained in:
parent
396c087072
commit
2d19c7ae97
37 changed files with 237 additions and 38 deletions
|
|
@ -350,14 +350,23 @@ public class ApplicationTests{
|
|||
}
|
||||
|
||||
@Test
|
||||
void load(){
|
||||
void saveLoad(){
|
||||
world.loadMap(testMap);
|
||||
Map map = state.map;
|
||||
|
||||
float hp = 30f;
|
||||
|
||||
Unit unit = UnitTypes.dagger.spawn(Team.sharded, 20f, 30f);
|
||||
unit.health = hp;
|
||||
|
||||
SaveIO.save(saveDirectory.child("0.msav"));
|
||||
resetWorld();
|
||||
SaveIO.load(saveDirectory.child("0.msav"));
|
||||
|
||||
Unit spawned = Groups.unit.find(u -> u.type == UnitTypes.dagger);
|
||||
assertNotNull(spawned, "Saved daggers must persist");
|
||||
assertEquals(hp, spawned.health, "Spawned dagger health must save.");
|
||||
|
||||
assertEquals(world.width(), map.width);
|
||||
assertEquals(world.height(), map.height);
|
||||
assertTrue(state.teams.playerCores().size > 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue