Interplanetary Accelerator re-added with functionality (WIP)

This commit is contained in:
Anuken
2025-01-23 20:10:20 -05:00
parent 8f5eccaba6
commit 22538840a1
13 changed files with 603 additions and 199 deletions

View File

@@ -6,6 +6,7 @@ import arc.struct.*;
import arc.util.*;
import mindustry.content.*;
import mindustry.game.EventType.*;
import mindustry.game.Schematic.*;
import mindustry.game.SectorInfo.*;
import mindustry.gen.*;
import mindustry.maps.*;
@@ -115,6 +116,11 @@ public class Universe{
Core.settings.putJson("launch-resources-seq", lastLaunchResources);
}
/** Updates selected loadout for future deployment. Creates an empty schematic with a single core block. */
public void updateLoadout(CoreBlock block){
updateLoadout(block, new Schematic(Seq.with(new Stile(block, 0, 0, null, (byte)0)), new StringMap(), block.size, block.size));
}
/** Updates selected loadout for future deployment. */
public void updateLoadout(CoreBlock block, Schematic schem){
Core.settings.put("lastloadout-" + block.name, schem.file == null ? "" : schem.file.nameWithoutExtension());