More patcher tests and fixes

This commit is contained in:
Anuken
2025-10-24 20:30:08 -04:00
parent 6ff28b5d31
commit a305ac31e6
4 changed files with 96 additions and 4 deletions

View File

@@ -196,4 +196,64 @@ public class PatcherTests{
assertEquals(oldLength, UnitTypes.dagger.targetFlags.length);
}
@Test
void testBigPatch() throws Exception{
Vars.state.patcher.apply(Seq.with("""
item: {
fissile-matter: {
hidden: false
fullIcon: duo-preview
uiIcon: block-duo-ui
}
}
block: {
pulverizer: {
consumes: {
remove: all
item: copper
}
uiIcon: block-duo-ui
region: block-duo-full
outputItems: [fissile-matter/1]
drawer: [
{
type: DrawRegion
name: block-1
}
{
type: DrawRegion
rotateSpeed: 1
name: duo-preview
}
]
}
}
unit: {
dagger: {
region: duo-preview
weapons: [
{
x: 0
y: 0
reload: 20
shoot: {
type: ShootAlternate
spread: 3.5
}
bullet: {
width: 7
height: 9
lifetime: 60
frontColor: eac1a8
backColor: d39169
}
}
]
}
}
"""));
assertEquals(new Seq<>(), Vars.state.patcher.patches.first().warnings);
}
}