mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-15 15:20:57 -08:00
Keybind search bar + modding support
This commit is contained in:
parent
ca550545bc
commit
e414b02030
22 changed files with 326 additions and 421 deletions
|
|
@ -1,39 +0,0 @@
|
|||
import mindustry.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.meta.*;
|
||||
import org.junit.jupiter.api.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
//grabs a betamindy release and makes sure it initializes correctly
|
||||
//this mod was chosen because:
|
||||
//- it is one of the top java mods on the browser
|
||||
//- it uses a variety of mindustry classes
|
||||
//- it is popular enough to cause significant amounts of crashes when something breaks
|
||||
//- I have some familiarity with its codebase
|
||||
public class ModTestBM extends GenericModTest{
|
||||
|
||||
@Test
|
||||
public void begin(){
|
||||
grabMod("https://github.com/sk7725/BetaMindy/releases/download/v1.11/BetaMindy.jar");
|
||||
|
||||
checkExistence("betamindy");
|
||||
|
||||
Block type = Vars.content.blocks().find(u -> u.name.equals("betamindy-piston"));
|
||||
assertNotNull(type, "A mod block must be loaded.");
|
||||
assertSame(type.buildVisibility, BuildVisibility.shown, "A mod block must be buildable.");
|
||||
|
||||
world.loadMap(maps.loadInternalMap("groundZero"));
|
||||
Tile t = world.tile(3, 3);
|
||||
|
||||
t.setBlock(type);
|
||||
|
||||
//check for crash
|
||||
t.build.update();
|
||||
|
||||
assertTrue(t.build.health > 0, "Block must be spawned and alive.");
|
||||
assertSame(t.build.block, type, "Block must be spawned and alive.");
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue