11@file:Depends(" coreMindustry/menu" , " 调用菜单" )
2- @file:Depends(" coreMindustry/utilMapRule" , " 修改核心单位" )
32@file:Depends(" coreMindustry/util/spawnAround" )
43
54/* *@author WayZer*/
@@ -12,8 +11,8 @@ import mindustry.game.Team
1211import mindustry.gen.Iconc
1312import mindustry.net.Administration
1413import mindustry.world.blocks.storage.CoreBlock
14+ import org.intellij.lang.annotations.Language
1515
16- name = " CoreWar"
1716modeIntroduce(
1817 " 招兵买马 CoreWar" , """
1918 点击核心可以打开菜单
@@ -24,6 +23,17 @@ modeIntroduce(
2423""" .trimIndent()
2524)
2625
26+ @Language(" JSON5" )
27+ val patch = """
28+ {
29+ "name": "CoreWar",
30+ "block.core-foundation.unitType": "alpha",
31+ "block.core-nucleus.unitType": "alpha",
32+ "block.core-nucleus.itemCapacity": 1000000,
33+ }
34+ """ .trimIndent()
35+ mapPatches = listOf (patch)
36+
2737data class TeamData (val team : Team ) {
2838 var blockDamageMultiplier by team.rules()::blockDamageMultiplier
2939 var blockHealthMultiplier by team.rules()::blockHealthMultiplier
@@ -54,14 +64,6 @@ listen<EventType.TapEvent> {
5464}
5565
5666onEnable {
57- if ((Blocks .coreNucleus as CoreBlock ).unitType != UnitTypes .alpha) {
58- contextScript< coreMindustry.UtilMapRule > ().apply {
59- registerMapRule((Blocks .coreFoundation as CoreBlock )::unitType) { UnitTypes .alpha }
60- registerMapRule((Blocks .coreNucleus as CoreBlock )::unitType) { UnitTypes .alpha }
61- registerMapRule(Blocks .coreNucleus::itemCapacity) { 1000_000 }
62- }
63- state.teams.getActive().forEach { it.core()?.storageCapacity = 1000_000 }
64- }
6567 state.rules.bannedBlocks.add(Blocks .deconstructor)
6668 Call .setRules(state.rules)
6769 loop(Dispatchers .game) {
0 commit comments