mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Merge branch 'explosivegaming:main' into aperx
This commit is contained in:
@@ -9,15 +9,16 @@ local config = require("modules/exp_legacy/config/bonus")
|
|||||||
|
|
||||||
--- @param event EventData.on_force_created
|
--- @param event EventData.on_force_created
|
||||||
local function apply_force_bonus(event)
|
local function apply_force_bonus(event)
|
||||||
|
local force = event.force
|
||||||
for k, v in pairs(config.force_bonus) do
|
for k, v in pairs(config.force_bonus) do
|
||||||
event.force[k] = v.initial_value
|
force[k] = v.initial_value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param event EventData.on_surface_created
|
--- @param event EventData.on_surface_created
|
||||||
local function apply_surface_bonus(event)
|
local function apply_surface_bonus(event)
|
||||||
local surface = assert(game.get_surface(event.surface_index))
|
local surface = assert(game.get_surface(event.surface_index))
|
||||||
for k, v in pairs(config.force_bonus) do
|
for k, v in pairs(config.surface_bonus) do
|
||||||
surface[k] = v.initial_value
|
surface[k] = v.initial_value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user