1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-20 19:45:22 +02:00

Revert all commits up to (including) a704c04f

This commit is contained in:
kwolekr
2015-03-07 16:16:25 -05:00
parent ffdf8dedb7
commit 32352e90da
173 changed files with 8751 additions and 11138 deletions

View File

@@ -16,9 +16,6 @@
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--------------------------------------------------------------------------------
local function modname_valid(name)
return not name:find("[^a-z0-9_]")
end
local function get_formspec(data)
@@ -198,12 +195,10 @@ local function handle_buttons(this, fields)
for i,mod in ipairs(rawlist) do
if not mod.is_modpack and
mod.typ ~= "game_mod" then
if modname_valid(mod.name) then
worldfile:set("load_mod_"..mod.name, tostring(mod.enabled))
if mod.enabled then
worldfile:set("load_mod_"..mod.name, "true")
else
if mod.enabled then
gamedata.errormessage = fgettext_ne("Failed to enable mod \"$1\" as it contains disallowed characters. Only chararacters [a-z0-9_] are allowed.", mod.name)
end
worldfile:set("load_mod_"..mod.name, "false")
end
mods["load_mod_"..mod.name] = nil
end