diff options
author | cheapie <no-email-for-you@example.com> | 2016-05-17 23:25:31 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2016-05-17 23:25:31 -0500 |
commit | 2557f7f590f0e2b9a93b777d33c6198b5f279a89 (patch) | |
tree | 2c6fc6e4dfe6124d7a4dbc93fe55f73d8771b01c /init.lua | |
parent | cbf1f754aa58ed2a0e9ac3092ade5b5e080626fd (diff) | |
download | newplayer-2557f7f590f0e2b9a93b777d33c6198b5f279a89.tar newplayer-2557f7f590f0e2b9a93b777d33c6198b5f279a89.tar.gz newplayer-2557f7f590f0e2b9a93b777d33c6198b5f279a89.tar.bz2 newplayer-2557f7f590f0e2b9a93b777d33c6198b5f279a89.tar.xz newplayer-2557f7f590f0e2b9a93b777d33c6198b5f279a89.zip |
Change rules file location
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -5,13 +5,13 @@ if newplayer.keyword == "" then newplayer.keyword = nil end newplayer.hudids = {} -local f = io.open(minetest.get_modpath("newplayer")..DIR_DELIM.."rules.txt","r") +local f = io.open(minetest.get_worldpath()..DIR_DELIM.."newplayer-rules.txt","r") if f then local d = f:read("*all") newplayer.rules = minetest.formspec_escape(d) f:close() else - newplayer.rules = "Rules file not found!\n\nThe file should be named \"rules.txt\" and placed in the following location:\n\n"..minetest.get_modpath("newplayer")..DIR_DELIM + newplayer.rules = "Rules file not found!\n\nThe file should be named \"newplayer-rules.txt\" and placed in the following location:\n\n"..minetest.get_worldpath()..DIR_DELIM end function newplayer.showrulesform(name) @@ -117,7 +117,7 @@ minetest.register_on_player_receive_fields(function(player,formname,fields) elseif formname == "newplayer:editrules" then if minetest.check_player_privs(name, {server=true}) then if fields.save then - local f = io.open(minetest.get_modpath("newplayer")..DIR_DELIM.."rules.txt","w") + local f = io.open(minetest.get_worldpath()..DIR_DELIM.."newplayer-rules.txt","w") f:write(fields.rules) f:close() newplayer.rules = fields.rules |