From 153468d80e3a4a1a37596dd91cab226dae0e7abb Mon Sep 17 00:00:00 2001 From: Someone Date: Fri, 16 Jan 2026 19:21:12 +0100 Subject: [PATCH] RELEASE 2.0.1 - Dont fail to load for non-freeplay maps. --- License.txt | 2 +- changelog.txt | 7 +++++++ control.lua | 40 ++++++++++++++++++++++------------------ info.json | 7 ++++--- 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/License.txt b/License.txt index 471d56f..7452027 100644 --- a/License.txt +++ b/License.txt @@ -1,4 +1,4 @@ -Copyright (c) 2018-2024 Someone +Copyright (c) 2018-2026 Someone Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/changelog.txt b/changelog.txt index 0df76f1..f7e0b94 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,10 @@ +--------------------------------------------------------------------------------------------------- +Version: 2.0.1 +Date: 2026-01-16 + + Changed: + - Dont fail to load for non-freeplay maps. + --------------------------------------------------------------------------------------------------- Version: 2.0.0 Date: 2024-10-21 diff --git a/control.lua b/control.lua index a0082d9..281f7df 100644 --- a/control.lua +++ b/control.lua @@ -2,25 +2,29 @@ script.on_init(function (event) game.permissions.get_group("Default").set_allows_action(defines.input_action.craft ,false) - if script.active_mods["some-spaceship-wreck-generator"] then - remote.call("freeplay", "set_created_items", { - ["pistol"] = 1, - ["firearm-magazine"] = 10, - ["assembling-machine-3"] = 1, - ["small-electric-pole"] = 1, - ["electric-mining-drill"] = 1 - }) + if remote.interfaces["freeplay"] then + if script.active_mods["some-spaceship-wreck-generator"] then + remote.call("freeplay", "set_created_items", { + ["pistol"] = 1, + ["firearm-magazine"] = 10, + ["assembling-machine-3"] = 1, + ["small-electric-pole"] = 1, + ["electric-mining-drill"] = 1 + }) + else + remote.call("freeplay", "set_created_items", { + ["pistol"] = 1, + ["firearm-magazine"] = 10, + ["assembling-machine-3"] = 1, + ["small-electric-pole"] = 1, + ["electric-mining-drill"] = 1, + ["boiler"] = 1, + ["steam-engine"] = 1, + ["offshore-pump"] = 1 + }) + end else - remote.call("freeplay", "set_created_items", { - ["pistol"] = 1, - ["firearm-magazine"] = 10, - ["assembling-machine-3"] = 1, - ["small-electric-pole"] = 1, - ["electric-mining-drill"] = 1, - ["boiler"] = 1, - ["steam-engine"] = 1, - ["offshore-pump"] = 1 - }) + game.print("some-lazybastard: This is not a freeplay map. Only changing /permissions.") end end) diff --git a/info.json b/info.json index a4e8f04..a1b0e8a 100644 --- a/info.json +++ b/info.json @@ -1,12 +1,13 @@ { "name": "some-lazybastard", - "version": "2.0.0", + "version": "2.0.1", "title": "Some lazy bastard", "author": "someone1337", "homepage": "https://git.somenet.org/factorio/some-lazybastard.git", - "description": "For the lazy bastards. Start with: AM3, small-pole, offshort-pump, boiler, steam-engine. Handcrafting disabled by /permissions.", + "description": "For the lazy bastards. Start with: AM3, small-pole, offshort-pump, boiler, steam-engine. Handcrafting disabled by /permissions. (too lazy for a mod-thumbnail)", "factorio_version": "2.0", - "dependencies": ["base>=2.0.0", + "dependencies": [ + "base>=2.0.0", "? some-spaceship-wreck-generator" ] -- 2.47.3