summaryrefslogtreecommitdiff
path: root/builtin/game/static_spawn.lua
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-04-27 21:02:48 -0400
committerShadowNinja <shadowninja@minetest.net>2014-05-08 13:02:04 -0400
commitc4359ff65cd8e4e754442b9f2ef7051a8eaa4241 (patch)
treefeaad8be8c36cc4a0abdbe8d7b84db3ac68ed87e /builtin/game/static_spawn.lua
parent1cd512913e4d4ad1fb43d4b6e3d7971bb6c67528 (diff)
downloadminetest-c4359ff65cd8e4e754442b9f2ef7051a8eaa4241.tar.gz
minetest-c4359ff65cd8e4e754442b9f2ef7051a8eaa4241.tar.bz2
minetest-c4359ff65cd8e4e754442b9f2ef7051a8eaa4241.zip
Use "core" namespace internally
Diffstat (limited to 'builtin/game/static_spawn.lua')
-rw-r--r--builtin/game/static_spawn.lua18
1 files changed, 9 insertions, 9 deletions
diff --git a/builtin/game/static_spawn.lua b/builtin/game/static_spawn.lua
index e8c107d86..492ab6ca6 100644
--- a/builtin/game/static_spawn.lua
+++ b/builtin/game/static_spawn.lua
@@ -1,10 +1,10 @@
-- Minetest: builtin/static_spawn.lua
local function warn_invalid_static_spawnpoint()
- if minetest.setting_get("static_spawnpoint") and
- not minetest.setting_get_pos("static_spawnpoint") then
- minetest.log('error', "The static_spawnpoint setting is invalid: \""..
- minetest.setting_get("static_spawnpoint").."\"")
+ if core.setting_get("static_spawnpoint") and
+ not core.setting_get_pos("static_spawnpoint") then
+ core.log('error', "The static_spawnpoint setting is invalid: \""..
+ core.setting_get("static_spawnpoint").."\"")
end
end
@@ -12,22 +12,22 @@ warn_invalid_static_spawnpoint()
local function put_player_in_spawn(obj)
warn_invalid_static_spawnpoint()
- local static_spawnpoint = minetest.setting_get_pos("static_spawnpoint")
+ local static_spawnpoint = core.setting_get_pos("static_spawnpoint")
if not static_spawnpoint then
return false
end
- minetest.log('action', "Moving "..obj:get_player_name()..
+ core.log('action', "Moving "..obj:get_player_name()..
" to static spawnpoint at "..
- minetest.pos_to_string(static_spawnpoint))
+ core.pos_to_string(static_spawnpoint))
obj:setpos(static_spawnpoint)
return true
end
-minetest.register_on_newplayer(function(obj)
+core.register_on_newplayer(function(obj)
put_player_in_spawn(obj)
end)
-minetest.register_on_respawnplayer(function(obj)
+core.register_on_respawnplayer(function(obj)
return put_player_in_spawn(obj)
end)