mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
.
This commit is contained in:
@@ -27,8 +27,4 @@ return {
|
|||||||
},
|
},
|
||||||
ignore_permisison = "bypass-nukeprotect", -- @setting ignore_permisison The permission that nukeprotect will ignore
|
ignore_permisison = "bypass-nukeprotect", -- @setting ignore_permisison The permission that nukeprotect will ignore
|
||||||
ignore_admins = true, -- @setting ignore_admins Ignore admins, true by default. Allows usage outside of the roles module
|
ignore_admins = true, -- @setting ignore_admins Ignore admins, true by default. Allows usage outside of the roles module
|
||||||
disable_nuke_research = false, -- @setting disable_nuke_research Disable the nuke research, true by default
|
|
||||||
disable_nuke_research_names = {
|
|
||||||
["atomic-bomb"] = true,
|
|
||||||
}, -- @setting disable_nuke_research_names The names of the researches to disabled
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,4 +159,13 @@ return {
|
|||||||
["follower-robot-count-5"] = 5,
|
["follower-robot-count-5"] = 5,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
-- prevent research up to a certain level
|
||||||
|
limit_res = {
|
||||||
|
-- Artillery Range
|
||||||
|
["artillery-shell-range-1"] = 7,
|
||||||
|
-- Artillery Speed
|
||||||
|
["artillery-shell-speed-1"] = 7,
|
||||||
|
-- Atomic Bomb
|
||||||
|
-- ["atomic-bomb"] = 1
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,12 +43,3 @@ for _, inventory in ipairs(config.inventories) do
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if config.disable_nuke_research then
|
|
||||||
Event.add(defines.events.on_research_started, function(event)
|
|
||||||
local name = event.research.name
|
|
||||||
if config.disable_nuke_research_names[name] then
|
|
||||||
event.research.force.cancel_current_research()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|||||||
@@ -309,6 +309,15 @@ Event.add(defines.events.on_research_finished, function(event)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Event.add(defines.events.on_research_started, function(event)
|
||||||
|
local r = event.research
|
||||||
|
local res_name = config.limit_res[r.name]
|
||||||
|
|
||||||
|
if res_name and r.level > res_name then
|
||||||
|
table.remove(r.force.research_queue)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
Event.on_nth_tick(60, function()
|
Event.on_nth_tick(60, function()
|
||||||
local current_time = research_time_format(game.tick)
|
local current_time = research_time_format(game.tick)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user