summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2012-06-23 12:39:35 +0200
committerJeija <norrepli@gmail.com>2012-06-23 12:39:35 +0200
commitbc80efd68568fb1d2a0525b24124b4273249d8d3 (patch)
treebe0b4f226c407e00fa5bf338572d38a657adbd5e
parentd62a9269acbbab5802adfc619c43e2af981f294c (diff)
downloadmesecons-bc80efd68568fb1d2a0525b24124b4273249d8d3.tar
mesecons-bc80efd68568fb1d2a0525b24124b4273249d8d3.tar.gz
mesecons-bc80efd68568fb1d2a0525b24124b4273249d8d3.tar.bz2
mesecons-bc80efd68568fb1d2a0525b24124b4273249d8d3.tar.xz
mesecons-bc80efd68568fb1d2a0525b24124b4273249d8d3.zip
Fix detector player name lookup
-rw-r--r--mesecons_detector/init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesecons_detector/init.lua b/mesecons_detector/init.lua
index 4fe90a2..b429557 100644
--- a/mesecons_detector/init.lua
+++ b/mesecons_detector/init.lua
@@ -37,7 +37,7 @@ minetest.register_abm(
for k, obj in pairs(objs) do
if obj:get_entity_name()~="mesecons_pistons:piston_pusher_sticky" and obj:get_entity_name()~="mesecons_pistons:piston_pusher_normal" and obj:get_player_name()~=nil then -- Detected object is not piston pusher - will be changed if every entity has a type (like entity_type=mob)
if minetest.env:get_node({x=pos.x, y=pos.y-1, z=pos.z}).name=="default:sign_wall" then
- if obj:get_player_name()~=minetest.env:get_meta({x=pos.x, y=pos.y-1, z=pos.z}):get_text() then
+ if obj:get_player_name()~=minetest.env:get_meta({x=pos.x, y=pos.y-1, z=pos.z}):get_string("text") then
return
end
end
@@ -60,7 +60,7 @@ minetest.register_abm(
if obj:get_entity_name()~="mesecons_pistons:piston_pusher_sticky" and obj:get_entity_name()~="mesecons_pistons:piston_pusher_normal" and obj~=nil
and obj:get_player_name()~=nil then
if minetest.env:get_node({x=pos.x, y=pos.y-1, z=pos.z}).name=="default:sign_wall" then
- if minetest.env:get_meta({x=pos.x, y=pos.y-1, z=pos.z}):get_text() == obj:get_player_name() then
+ if minetest.env:get_meta({x=pos.x, y=pos.y-1, z=pos.z}):get_string("text")== obj:get_player_name() then
objectfound=objectfound+1
end
else