Add 3d_armor_light support
parent
999fd7925f
commit
3840b65a62
|
@ -25,6 +25,7 @@ Right-click the equipment examiner node & place an item into its inventory slot
|
||||||
- [![wielded_light](https://img.shields.io/static/v1?label=ContentDB&message=wielded_light&color=%23375a7f&logo=minetest)](https://content.minetest.net/packages/bell07/wielded_light/)
|
- [![wielded_light](https://img.shields.io/static/v1?label=ContentDB&message=wielded_light&color=%23375a7f&logo=minetest)](https://content.minetest.net/packages/bell07/wielded_light/)
|
||||||
- [![workbench](https://img.shields.io/static/v1?label=GitHub&message=workbench&color=%23375a7f&logo=minetest)](https://github.com/AntumMT/mod-workbench)
|
- [![workbench](https://img.shields.io/static/v1?label=GitHub&message=workbench&color=%23375a7f&logo=minetest)](https://github.com/AntumMT/mod-workbench)
|
||||||
- [![xdecor](https://img.shields.io/static/v1?label=ContentDB&message=xdecor&color=%23375a7f&logo=minetest)](https://content.minetest.net/packages/jp/xdecor/)
|
- [![xdecor](https://img.shields.io/static/v1?label=ContentDB&message=xdecor&color=%23375a7f&logo=minetest)](https://content.minetest.net/packages/jp/xdecor/)
|
||||||
|
- [![3d_armor_light](https://img.shields.io/static/v1?label=ContentDB&message=3d_armor_light&color=%23375a7f&logo=minetest)](https://content.minetest.net/packages/AntumDeluge/3d_armor_light/)
|
||||||
|
|
||||||
#### Other Mod Support:
|
#### Other Mod Support:
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ v1.6
|
||||||
- xdecor (Git commit 0dbf92e)
|
- xdecor (Git commit 0dbf92e)
|
||||||
- wielded_light v2021-07-15
|
- wielded_light v2021-07-15
|
||||||
- removed abandoned wlight support
|
- removed abandoned wlight support
|
||||||
|
- added 3d_armor_light support
|
||||||
|
|
||||||
v1.5
|
v1.5
|
||||||
----
|
----
|
||||||
|
|
26
formspec.lua
26
formspec.lua
|
@ -3,14 +3,17 @@ local S = core.get_translator(equip_exam.name)
|
||||||
|
|
||||||
|
|
||||||
-- wielded_light support
|
-- wielded_light support
|
||||||
local function get_light_def(id)
|
local function get_light_def(id) end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if core.global_exists("wielded_light") and wielded_light.get_light_def then
|
if core.global_exists("wielded_light") and wielded_light.get_light_def then
|
||||||
get_light_def = wielded_light.get_light_def
|
get_light_def = wielded_light.get_light_def
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 3d_armor_light support
|
||||||
|
local function is_lighted_armor(id) end
|
||||||
|
if core.global_exists("armor_light") and armor_light.is_lighted then
|
||||||
|
is_lighted_armor = armor_light.is_lighted
|
||||||
|
end
|
||||||
|
|
||||||
-- workbench support
|
-- workbench support
|
||||||
local workbench_repairable
|
local workbench_repairable
|
||||||
if core.global_exists("workbench") and workbench.repairable then
|
if core.global_exists("workbench") and workbench.repairable then
|
||||||
|
@ -346,12 +349,19 @@ local function get_item_specs(item, technical)
|
||||||
|
|
||||||
local light_level = get_light_def(id)
|
local light_level = get_light_def(id)
|
||||||
if light_level and light_level > 0 then
|
if light_level and light_level > 0 then
|
||||||
item_types.tool = true
|
local spec_list, type_list = specs_tool, tool_types
|
||||||
if not technical then
|
if is_lighted_armor(id) then
|
||||||
table.insert(specs_tool, S("emits light: @1", S("yes")))
|
item_types.armor = true
|
||||||
|
spec_list, type_list = specs_armor, armor_types
|
||||||
|
else
|
||||||
|
item_types.tool = true
|
||||||
end
|
end
|
||||||
|
|
||||||
table.insert(specs_tool, format_spec(tool_types, "light level", light_level, technical))
|
if not technical then
|
||||||
|
table.insert(spec_list, S("emits light: @1", S("yes")))
|
||||||
|
end
|
||||||
|
|
||||||
|
table.insert(spec_list, format_spec(type_list, "light level", light_level, technical))
|
||||||
end
|
end
|
||||||
|
|
||||||
local colorable = groups.ud_param2_colorable ~= nil
|
local colorable = groups.ud_param2_colorable ~= nil
|
||||||
|
|
2
mod.conf
2
mod.conf
|
@ -5,4 +5,4 @@ author = Jordan Irwin (AntumDeluge)
|
||||||
version = 1.5
|
version = 1.5
|
||||||
license = MIT
|
license = MIT
|
||||||
min_minetest_version = 5.0
|
min_minetest_version = 5.0
|
||||||
optional_depends = default, basic_materials, wielded_light, workbench, xdecor
|
optional_depends = default, basic_materials, wielded_light, workbench, xdecor, 3d_armor_light
|
||||||
|
|
Loading…
Reference in New Issue