mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00

- removed tutorialization (Craft/Do X to unlock tech) - start with everything needed for power, electric mining drills, science lab and automation science already unlocked - updated world gen - updated mod api use - updated fluid boxes (CaitSith2) - new option: free sample quality (needs quality mod) - removed old gruft, faster gen speed, faster load time - lists space age as explicitly not supported, so it prevents the game from trying to load both - fixes Y offset of traps being wrong (way higher than intended) - client now has a 5 second timeout to communicate with the bound factorio server, so it aborts actions if the server died - savegames are now stored in write_data_directory -> saves -> Archipelago - add cargo-landing-pad handling - starting rocket silo and cargo landing pad respect free sample quality - supports Factorio 2.0 --------- Co-authored-by: CaitSith2 <d_good@caitsith2.com>
31 lines
965 B
Lua
31 lines
965 B
Lua
-- Find out if more than one AP mod is loaded, and if so, error out.
|
|
function mod_is_AP(str)
|
|
-- lua string.match is way more restrictive than regex. Regex would be "^AP-W?\d{20}-P[1-9]\d*-.+$"
|
|
local result = string.match(str, "^AP%-W?%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%-P[1-9]%d-%-.+$")
|
|
if result ~= nil then
|
|
log("Archipelago Mod: " .. result .. " is loaded.")
|
|
end
|
|
return result ~= nil
|
|
end
|
|
local ap_mod_count = 0
|
|
for name, _ in pairs(mods) do
|
|
if mod_is_AP(name) then
|
|
ap_mod_count = ap_mod_count + 1
|
|
if ap_mod_count > 1 then
|
|
error("More than one Archipelago Factorio mod is loaded.")
|
|
end
|
|
end
|
|
end
|
|
data:extend({
|
|
{
|
|
type = "bool-setting",
|
|
name = "archipelago-death-link-{{ slot_player }}-{{ seed_name }}",
|
|
setting_type = "runtime-global",
|
|
{% if death_link %}
|
|
default_value = true
|
|
{% else %}
|
|
default_value = false
|
|
{% endif %}
|
|
}
|
|
})
|