diff options
| author | cheapie <no-email-for-you@example.com> | 2025-12-13 12:42:58 -0600 |
|---|---|---|
| committer | cheapie <no-email-for-you@example.com> | 2025-12-13 12:42:58 -0600 |
| commit | 8869adfb33e0c0109dad606331fe239b1af6e75f (patch) | |
| tree | 92adbf8d69f562d74993cad3fd8398b59baadd79 | |
| parent | aaeb74b01eb0602ec79974229feba004a09c86b5 (diff) | |
| download | celevator-8869adfb33e0c0109dad606331fe239b1af6e75f.tar celevator-8869adfb33e0c0109dad606331fe239b1af6e75f.tar.gz celevator-8869adfb33e0c0109dad606331fe239b1af6e75f.tar.bz2 celevator-8869adfb33e0c0109dad606331fe239b1af6e75f.tar.xz celevator-8869adfb33e0c0109dad606331fe239b1af6e75f.zip | |
Remove deprecated DIR_DELIM usage
Apparently "/" gets translated to the right path separator for the current OS. This seems to not be documented anywhere, but DIR_DELIM wasn't either, so... *shrug*
| -rw-r--r-- | .luacheckrc | 1 | ||||
| -rw-r--r-- | controller.lua | 4 | ||||
| -rw-r--r-- | controllerfw.lua | 2 | ||||
| -rw-r--r-- | dispatcher.lua | 4 | ||||
| -rw-r--r-- | dispatcherfw.lua | 2 | ||||
| -rw-r--r-- | init.lua | 2 |
6 files changed, 7 insertions, 8 deletions
diff --git a/.luacheckrc b/.luacheckrc index 755b8ce..3fbc5b1 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -5,7 +5,6 @@ globals = { } read_globals = { - "DIR_DELIM", "vector", "screwdriver", "core", diff --git a/controller.lua b/controller.lua index d8fb873..bf351ef 100644 --- a/controller.lua +++ b/controller.lua @@ -6,7 +6,7 @@ celevator.controller.equeue = core.deserialize(celevator.storage:get_string("con celevator.controller.running = {} -local fw,err = loadfile(core.get_modpath("celevator")..DIR_DELIM.."controllerfw.lua") +local fw,err = loadfile(core.get_modpath("celevator").."/controllerfw.lua") if not fw then error(err) end core.register_chatcommand("celevator_reloadcontroller",{ @@ -14,7 +14,7 @@ core.register_chatcommand("celevator_reloadcontroller",{ description = "Reload celevator controller firmware from disk", privs = {server = true}, func = function() - local newfw,loaderr = loadfile(core.get_modpath("celevator")..DIR_DELIM.."controllerfw.lua") + local newfw,loaderr = loadfile(core.get_modpath("celevator").."/controllerfw.lua") if newfw then fw = newfw return true,"Firmware reloaded successfully" diff --git a/controllerfw.lua b/controllerfw.lua index d04ff91..0ac2878 100644 --- a/controllerfw.lua +++ b/controllerfw.lua @@ -1302,7 +1302,7 @@ if mem.screenstate == "oobe_welcome" then fs("button[1,10;2,1;license;License Info]") fs("button[13,10;2,1;next;Next >]") elseif mem.screenstate == "oobe_license" then - local licensefile = io.open(core.get_modpath("celevator")..DIR_DELIM.."LICENSE") + local licensefile = io.open(core.get_modpath("celevator").."/LICENSE") local license = core.formspec_escape(licensefile:read("*all")) licensefile:close() fs("textarea[1,1;14,8;license;This applies to the whole celevator mod\\, not just this controller:;"..license.."]") diff --git a/dispatcher.lua b/dispatcher.lua index b38a4c3..165db68 100644 --- a/dispatcher.lua +++ b/dispatcher.lua @@ -6,7 +6,7 @@ celevator.dispatcher.equeue = core.deserialize(celevator.storage:get_string("dis celevator.dispatcher.running = {} -local fw,err = loadfile(core.get_modpath("celevator")..DIR_DELIM.."dispatcherfw.lua") +local fw,err = loadfile(core.get_modpath("celevator").."/dispatcherfw.lua") if not fw then error(err) end core.register_chatcommand("celevator_reloaddispatcher",{ @@ -14,7 +14,7 @@ core.register_chatcommand("celevator_reloaddispatcher",{ description = "Reload celevator dispatcher firmware from disk", privs = {server = true}, func = function() - local newfw,loaderr = loadfile(core.get_modpath("celevator")..DIR_DELIM.."dispatcherfw.lua") + local newfw,loaderr = loadfile(core.get_modpath("celevator").."/dispatcherfw.lua") if newfw then fw = newfw return true,"Firmware reloaded successfully" diff --git a/dispatcherfw.lua b/dispatcherfw.lua index 27066b4..ef891a6 100644 --- a/dispatcherfw.lua +++ b/dispatcherfw.lua @@ -936,7 +936,7 @@ if mem.screenstate == "oobe_welcome" then fs("button[1,10;2,1;license;License Info]") fs("button[13,10;2,1;next;Next >]") elseif mem.screenstate == "oobe_license" then - local licensefile = io.open(core.get_modpath("celevator")..DIR_DELIM.."LICENSE") + local licensefile = io.open(core.get_modpath("celevator").."/LICENSE") local license = core.formspec_escape(licensefile:read("*all")) licensefile:close() fs("textarea[1,1;14,8;license;This applies to the whole celevator mod\\, not just this dispatcher:;"..license.."]") @@ -32,5 +32,5 @@ for _,i in ipairs(integrations) do end for _,v in ipairs(components) do - dofile(string.format("%s%s%s.lua",core.get_modpath("celevator"),DIR_DELIM,v)) + dofile(string.format("%s/%s.lua",core.get_modpath("celevator"),v)) end |
