1
0
Fork 0

Fix some global variable fuckups

This commit is contained in:
Wuzzy 2017-01-16 13:24:38 +01:00
parent 6388eb98f1
commit dce02a9979
3 changed files with 5 additions and 3 deletions

View File

@ -30,7 +30,7 @@ minetest.register_entity(":__builtin:item", {
item_texture = minetest.registered_items[itemname].inventory_image item_texture = minetest.registered_items[itemname].inventory_image
item_type = minetest.registered_items[itemname].type item_type = minetest.registered_items[itemname].type
end end
prop = { local prop = {
is_visible = true, is_visible = true,
visual = "sprite", visual = "sprite",
textures = {"unknown_item.png"} textures = {"unknown_item.png"}
@ -108,7 +108,7 @@ minetest.register_entity(":__builtin:item", {
--]] --]]
if minetest.registered_nodes[name] and minetest.registered_nodes[name].liquidtype == "flowing" then if minetest.registered_nodes[name] and minetest.registered_nodes[name].liquidtype == "flowing" then
get_flowing_dir = function(self) local get_flowing_dir = function(self)
local pos = self.object:getpos() local pos = self.object:getpos()
local param2 = minetest.get_node(pos).param2 local param2 = minetest.get_node(pos).param2
for i,d in ipairs({-1, 1, -1, 1}) do for i,d in ipairs({-1, 1, -1, 1}) do

View File

@ -118,6 +118,8 @@ minetest.after(0, init)
local offset = {} local offset = {}
local hoch = {} local hoch = {}
local bg = {} local bg = {}
-- TODO: Investigate what is going on with this weird variable
local start_i
offset["blocks"] = "-0.29,-0.25" offset["blocks"] = "-0.29,-0.25"
offset["deco"] = "0.98,-0.25" offset["deco"] = "0.98,-0.25"
offset["redstone"] = "2.23,-0.25" offset["redstone"] = "2.23,-0.25"

View File

@ -37,7 +37,7 @@ minetest.register_tool("throwing:bow", {
return itemstack return itemstack
end, end,
on_use = function(itemstack, user, pointed_thing) on_use = function(itemstack, user, pointed_thing)
wear = itemstack:get_wear() local wear = itemstack:get_wear()
itemstack:add_wear(wear) itemstack:add_wear(wear)
if throwing_shoot_arrow(itemstack, user, pointed_thing) then if throwing_shoot_arrow(itemstack, user, pointed_thing) then
if not minetest.setting_getbool("creative_mode") then if not minetest.setting_getbool("creative_mode") then