Save file drop support for desktop

This commit is contained in:
Anuken
2026-02-04 12:36:40 -05:00
parent 5a9e8cbcac
commit 4497e34bbb
6 changed files with 73 additions and 8 deletions

View File

@@ -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;