Skip to content

Commit 53feff7

Browse files
committed
Update to 0.4.0
1 parent 2698e9c commit 53feff7

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

changelog.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
---------------------------------------------------------------------------------------------------
2+
Version: 0.4.0
3+
Date: 2021-08-19
4+
Changes:
5+
- Added some shell scripts
6+
Bugfixes:
7+
- Fixed some bugs with mod name
8+
---------------------------------------------------------------------------------------------------
29
Version: 0.3.5
310
Date: 2021-08-01
411
Changes:

control.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ modules.data_consistency_example = require("models/data-consistency-example")
1616

1717
-- Safe disabling of this mod remotely on init stage
1818
-- Useful for other map developers and in some rare cases for mod devs
19-
if script.level.mod_name and remote.interfaces["disable-" .. script.level.mod_name] then
19+
if remote.interfaces["disable-" .. script.mod_name] then
2020
for _, module in pairs(modules) do
2121
local update_global_data_on_disabling = module.update_global_data_on_disabling
2222
module.events = nil

info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "example-mod",
3-
"version": "0.3.5",
3+
"version": "0.4.0",
44
"factorio_version": "1.1",
55
"title": "Example mod",
66
"author": "Put your nickname",

models/BetterCommands/control.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ function M:handle_custom_commands(module)
189189
if setting == nil then
190190
local is_added = add_custom_command(command_settings, func)
191191
if is_added == false then
192-
log(script.level.mod_name .. " can't add command \"" .. command_settings.name .. "\"")
192+
log(script.mod_name .. " can't add command \"" .. command_settings.name .. "\"")
193193
end
194194
elseif setting.value then
195195
local is_added = add_custom_command(command_settings, func)
196196
if is_added == false then
197-
local message = script.level.mod_name .. " can't add command \"" .. command_settings.name .. "\""
197+
local message = script.mod_name .. " can't add command \"" .. command_settings.name .. "\""
198198
disable_setting(message, nil, command_name)
199199
end
200200
else
@@ -234,7 +234,7 @@ local function on_runtime_mod_setting_changed(event)
234234
if is_added then
235235
game.print("Added command: " .. command_settings.name or command_name)
236236
else
237-
local message = script.level.mod_name .. " can't add command \"" .. command_settings.name .. "\""
237+
local message = script.mod_name .. " can't add command \"" .. command_settings.name .. "\""
238238
disable_setting(message, nil, command_name)
239239
end
240240
else

0 commit comments

Comments
 (0)