mirror of
https://gitlab.com/lunovox/components.git
synced 2025-03-15 08:01:22 +00:00
[feat] Change Head Lamp to can be charged by a battery from this mod components.
This commit is contained in:
parent
95e13962d5
commit
0c4176ac8b
4 changed files with 27 additions and 1 deletions
|
@ -17,6 +17,7 @@ Other Screenshots: [02] [03] [04] [05]
|
||||||
| keys | Mandatory | [Minetest Game] Included. |
|
| keys | Mandatory | [Minetest Game] Included. |
|
||||||
| wool | Mandatory | [Minetest Game] Included. |
|
| wool | Mandatory | [Minetest Game] Included. |
|
||||||
| [Unified Inventory] | Optional | Replaces the default inventory and adds a number of features, such as a crafting guide. |
|
| [Unified Inventory] | Optional | Replaces the default inventory and adds a number of features, such as a crafting guide. |
|
||||||
|
| [Head Lamp] | Optional | Adds a Head Lamp that can be charged by a battery from mod components. |
|
||||||
|
|
||||||
|
|
||||||
## **License:**
|
## **License:**
|
||||||
|
@ -56,6 +57,7 @@ See more details in file: [locale/README.md]
|
||||||
[05]:https://gitlab.com/lunovox/components/-/raw/main/screenshot.5.png
|
[05]:https://gitlab.com/lunovox/components/-/raw/main/screenshot.5.png
|
||||||
[correio]:https://gitlab.com/lunovox/correio
|
[correio]:https://gitlab.com/lunovox/correio
|
||||||
[Git Repository]:https://gitlab.com/lunovox/components
|
[Git Repository]:https://gitlab.com/lunovox/components
|
||||||
|
[Head Lamp]:https://content.minetest.net/packages/OgelGames/headlamp/
|
||||||
[intllib]:https://github.com/minetest-mods/intllib
|
[intllib]:https://github.com/minetest-mods/intllib
|
||||||
[license_icon]:https://img.shields.io/static/v1?label=GNU%20AGPL%20v3.0&message=Download&color=yellow
|
[license_icon]:https://img.shields.io/static/v1?label=GNU%20AGPL%20v3.0&message=Download&color=yellow
|
||||||
[license_link]:https://gitlab.com/lunovox/components/-/raw/main/LICENSE
|
[license_link]:https://gitlab.com/lunovox/components/-/raw/main/LICENSE
|
||||||
|
|
1
init.lua
1
init.lua
|
@ -6,5 +6,6 @@ dofile(modComponents.modpath.."/translate.lua")
|
||||||
dofile(modComponents.modpath.."/components_objects.lua")
|
dofile(modComponents.modpath.."/components_objects.lua")
|
||||||
dofile(modComponents.modpath.."/components_recipes.lua")
|
dofile(modComponents.modpath.."/components_recipes.lua")
|
||||||
dofile(modComponents.modpath.."/components_digs.lua")
|
dofile(modComponents.modpath.."/components_digs.lua")
|
||||||
|
dofile(modComponents.modpath.."/modify_headlamp.lua")
|
||||||
|
|
||||||
minetest.log('action',"["..modComponents.modname:upper().."] Loaded!")
|
minetest.log('action',"["..modComponents.modname:upper().."] Loaded!")
|
||||||
|
|
2
mod.conf
2
mod.conf
|
@ -7,7 +7,7 @@ languages = en,pt,pt_BR
|
||||||
author = Lunovox Heavenfinder
|
author = Lunovox Heavenfinder
|
||||||
license = GNU AGPL-3.0
|
license = GNU AGPL-3.0
|
||||||
depends = default,dye,flowers,keys,wool
|
depends = default,dye,flowers,keys,wool
|
||||||
optional_depends = unified_inventory
|
optional_depends = unified_inventory, headlamp
|
||||||
min_minetest_version = 5.7
|
min_minetest_version = 5.7
|
||||||
max_minetest_version =
|
max_minetest_version =
|
||||||
created = GMT-03 2023-09-15 12:43
|
created = GMT-03 2023-09-15 12:43
|
||||||
|
|
23
modify_headlamp.lua
Normal file
23
modify_headlamp.lua
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
|
||||||
|
|
||||||
|
if minetest.get_modpath("headlamp") then
|
||||||
|
|
||||||
|
local headlamp_on = minetest.registered_items["headlamp:headlamp_on"]
|
||||||
|
if not headlamp_on.groups.headlamp then
|
||||||
|
headlamp_on.groups.headlamp = 1
|
||||||
|
minetest.override_item("headlamp:headlamp_on" , { groups = headlamp_on.groups })
|
||||||
|
end
|
||||||
|
|
||||||
|
local headlamp_off = minetest.registered_items["headlamp:headlamp_off"]
|
||||||
|
if not headlamp_off.groups.headlamp then
|
||||||
|
headlamp_off.groups.headlamp = 1
|
||||||
|
minetest.override_item("headlamp:headlamp_off" , { groups = headlamp_off.groups })
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_craft{
|
||||||
|
type = "shapeless",
|
||||||
|
output = "headlamp:headlamp_off",
|
||||||
|
recipe = {"group:headlamp", "components:batery"},
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
Loading…
Add table
Reference in a new issue