Save file drop support for desktop
This commit is contained in:
@@ -524,6 +524,26 @@ public class PatcherTests{
|
||||
assertEquals(oldDamage, UnitTypes.dagger.weapons.first().bullet.damage);
|
||||
}
|
||||
|
||||
@Test
|
||||
void customAttribute() throws Exception{
|
||||
int amount = Attribute.all.length;
|
||||
|
||||
Vars.state.patcher.apply(Seq.with("""
|
||||
block.grass.attributes: {
|
||||
frogs: 10
|
||||
}
|
||||
"""));
|
||||
|
||||
assertTrue(Attribute.exists("frogs"));
|
||||
assertEquals(amount + 1, Attribute.all.length);
|
||||
assertEquals(10f, Blocks.grass.asFloor().attributes.get(Attribute.get("frogs")), 0.0001f);
|
||||
|
||||
Vars.logic.reset();
|
||||
|
||||
assertFalse(Attribute.exists("frogs"));
|
||||
assertEquals(amount, Attribute.all.length);
|
||||
}
|
||||
|
||||
@Test
|
||||
void addWeapon() throws Exception{
|
||||
int oldSize = UnitTypes.flare.weapons.size;
|
||||
|
||||
Reference in New Issue
Block a user