mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Tweak energy bridge values
ENERGY_INCREMENT now set dynamically by whatever the ap-energy-bridge buffer capacity ends up being.
This commit is contained in:
@@ -11,7 +11,7 @@ TRAP_EVO_FACTOR = {{ evolution_trap_increase }} / 100
|
|||||||
MAX_SCIENCE_PACK = {{ max_science_pack }}
|
MAX_SCIENCE_PACK = {{ max_science_pack }}
|
||||||
GOAL = {{ goal }}
|
GOAL = {{ goal }}
|
||||||
ARCHIPELAGO_DEATH_LINK_SETTING = "archipelago-death-link-{{ slot_player }}-{{ seed_name }}"
|
ARCHIPELAGO_DEATH_LINK_SETTING = "archipelago-death-link-{{ slot_player }}-{{ seed_name }}"
|
||||||
ENERGY_INCREMENT = 1000000
|
ENERGY_INCREMENT = 0
|
||||||
|
|
||||||
if settings.global[ARCHIPELAGO_DEATH_LINK_SETTING].value then
|
if settings.global[ARCHIPELAGO_DEATH_LINK_SETTING].value then
|
||||||
DEATH_LINK = 1
|
DEATH_LINK = 1
|
||||||
@@ -24,6 +24,9 @@ CURRENTLY_DEATH_LOCK = 0
|
|||||||
function on_check_energy_link(event)
|
function on_check_energy_link(event)
|
||||||
--- assuming 1 MJ increment and 5MJ battery:
|
--- assuming 1 MJ increment and 5MJ battery:
|
||||||
--- first 2 MJ request fill, last 2 MJ push energy, middle 1 MJ does nothing
|
--- first 2 MJ request fill, last 2 MJ push energy, middle 1 MJ does nothing
|
||||||
|
if event.tick == 0 then
|
||||||
|
ENERGY_INCREMENT = game.entity_prototypes["ap-energy-bridge"].electric_energy_source_prototype.buffer_capacity / 5
|
||||||
|
end
|
||||||
if event.tick % 60 == 30 then
|
if event.tick % 60 == 30 then
|
||||||
local surface = game.get_surface(1)
|
local surface = game.get_surface(1)
|
||||||
local force = "player"
|
local force = "player"
|
||||||
@@ -554,6 +557,7 @@ end)
|
|||||||
|
|
||||||
|
|
||||||
commands.add_command("ap-rcon-info", "Used by the Archipelago client to get information", function(call)
|
commands.add_command("ap-rcon-info", "Used by the Archipelago client to get information", function(call)
|
||||||
|
ENERGY_INCREMENT = game.entity_prototypes["ap-energy-bridge"].electric_energy_source_prototype.buffer_capacity / 5
|
||||||
rcon.print(game.table_to_json({
|
rcon.print(game.table_to_json({
|
||||||
["slot_name"] = SLOT_NAME,
|
["slot_name"] = SLOT_NAME,
|
||||||
["seed_name"] = SEED_NAME,
|
["seed_name"] = SEED_NAME,
|
||||||
|
@@ -3,6 +3,9 @@ local energy_bridge = table.deepcopy(data.raw["accumulator"]["accumulator"])
|
|||||||
energy_bridge.name = "ap-energy-bridge"
|
energy_bridge.name = "ap-energy-bridge"
|
||||||
energy_bridge.minable.result = "ap-energy-bridge"
|
energy_bridge.minable.result = "ap-energy-bridge"
|
||||||
energy_bridge.localised_name = "Archipelago EnergyLink Bridge"
|
energy_bridge.localised_name = "Archipelago EnergyLink Bridge"
|
||||||
|
energy_bridge.energy_source.buffer_capacity = "10MJ"
|
||||||
|
energy_bridge.energy_source.input_flow_limit = "1MW"
|
||||||
|
energy_bridge.energy_source.output_flow_limit = "1MW"
|
||||||
data.raw["accumulator"]["ap-energy-bridge"] = energy_bridge
|
data.raw["accumulator"]["ap-energy-bridge"] = energy_bridge
|
||||||
|
|
||||||
local energy_bridge_item = table.deepcopy(data.raw["item"]["accumulator"])
|
local energy_bridge_item = table.deepcopy(data.raw["item"]["accumulator"])
|
||||||
|
Reference in New Issue
Block a user