Possible fix for #11758
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user