summaryrefslogtreecommitdiff
path: root/common.lua
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2021-02-07 12:46:16 +0000
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2021-02-07 12:46:16 +0000
commita735d1a1552eb1d9de18244bbae1ee21ddeabc9b (patch)
tree46a065b492acfe1db1ff83e3875b08e38bfc580b /common.lua
parentf0ef43823cb198a3f426d7d1db88d42f5079fbbd (diff)
parenta2c0dd11307120470a7c4ca4915f7741729e8e01 (diff)
downloadpipeworks-a735d1a1552eb1d9de18244bbae1ee21ddeabc9b.tar
pipeworks-a735d1a1552eb1d9de18244bbae1ee21ddeabc9b.tar.gz
pipeworks-a735d1a1552eb1d9de18244bbae1ee21ddeabc9b.tar.bz2
pipeworks-a735d1a1552eb1d9de18244bbae1ee21ddeabc9b.tar.xz
pipeworks-a735d1a1552eb1d9de18244bbae1ee21ddeabc9b.zip
Merge branch 'm_small_fixes' into 'master'
Various small fixes See merge request VanessaE/pipeworks!35
Diffstat (limited to 'common.lua')
-rw-r--r--common.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/common.lua b/common.lua
index 120a32f..207b728 100644
--- a/common.lua
+++ b/common.lua
@@ -223,7 +223,7 @@ function pipeworks.create_fake_player(def, is_dynamic)
return self._inventory:set_stack(def.wield_list,
self._wield_index, item)
end
- _wielded_item = ItemStack(item)
+ self._wielded_item = ItemStack(item)
end,
get_wielded_item = function(self, item)
if self._inventory and def.wield_list then
@@ -242,17 +242,18 @@ function pipeworks.create_fake_player(def, is_dynamic)
set_bone_position = delay(),
hud_change = delay(),
}
- local _trash
-- Getter & setter functions
p.get_inventory_formspec, p.set_inventory_formspec
= get_set_wrap("formspec", is_dynamic)
p.get_breath, p.set_breath = get_set_wrap("breath", is_dynamic)
p.get_hp, p.set_hp = get_set_wrap("hp", is_dynamic)
p.get_pos, p.set_pos = get_set_wrap("pos", is_dynamic)
- _trash, p.move_to = get_set_wrap("pos", is_dynamic)
p.get_wield_index, p.set_wield_index = get_set_wrap("wield_index", true)
p.get_properties, p.set_properties = get_set_wrap("properties", false)
+ -- For players, move_to and get_pos do the same
+ p.move_to = p.get_pos
+
-- Backwards compatibilty
p.getpos = p.get_pos
p.setpos = p.set_pos