Change item.lua stuff into namespaced table

This commit is contained in:
ranguli 2022-01-31 18:24:10 -03:30
parent bc414719f1
commit ee29de43b6
3 changed files with 1 additions and 8 deletions

View File

@ -1,6 +0,0 @@
local item = {}
item.title_color = "#35cdff"
return item

View File

@ -49,7 +49,7 @@ function weapon.generate_description(weapon_data)
for i,v in ipairs(text) do
if i == 0 then
color_text = core.colorize(item.title_color, v)
color_text = core.colorize(rangedweapons.colors.title_color, v)
else
color_text = core.colorize(rangedweapons.colors.white, v)
end

View File

@ -5,7 +5,6 @@ local weapon_item_name = rangedweapons.mod_name .. ":" .. weapon_name
local modpath = minetest.get_modpath(minetest.get_current_modname())
local item = dofile(modpath.."/item.lua")
local weapon = dofile(modpath.."/weapon.lua")
local handgun = dofile(modpath.."/weapons".."/handgun".."/handgun.lua")