Possible fix for #11758

This commit is contained in:
Anuken
2026-03-15 11:57:18 -04:00
parent ddfe45856f
commit 29b54f0a93
5 changed files with 20 additions and 5 deletions

View File

@@ -578,6 +578,21 @@ public class PatcherTests{
assertEquals(UnitTypes.avert, ((Reconstructor)Blocks.shipRefabricator).upgrades.get(0)[1]);
}
@Test
void arrayMulti() throws Exception{
int size = UnitTypes.emanate.weapons.size;
Vars.state.patcher.apply(Seq.with("""
{"name":"Patch0","unit":{"emanate":{"weapons":{"0":{"type":"Weapon","name":"toxopid-cannon"}},"weapons.+":[{"name":"sei-launcher"}]}}}
"""));
assertEquals(UnitTypes.emanate.weapons.size, size + 1);
resetAfter();
assertEquals(UnitTypes.emanate.weapons.size, size);
}
@Test
void customAttribute() throws Exception{
int amount = Attribute.all.length;