Added Settingtypes
This mod now supports customizing it.
This commit is contained in:
parent
16dfa66962
commit
35591d4271
@ -5,6 +5,7 @@ Adds magic gloves which allow you to climb up on things
|
||||
|
||||
- 2 pairs of gloves (one requires you to be pointing at nodes or entities, the other doesn't require anything)
|
||||
- Supports Minetest Game and Mineclone (2, 5 & Mineclonia)
|
||||
- Allow choosing if crafting is allowed (defaults to not allowed, this way you could use this mod at a server shop)
|
||||
|
||||
## How to climb
|
||||
|
||||
@ -12,6 +13,13 @@ With a basic glove just look at say some nodes (like a tree), then just rapidly
|
||||
|
||||
> The only difference between the basic glove and advanced glove is that the advanced doesn't need you looking at anything.
|
||||
|
||||
## Settings
|
||||
|
||||
All you need to do to allow crafting is:
|
||||
|
||||
1. Add `climb_crafting = true` to your `minetest.conf` file
|
||||
2. (Restart if running, else enjoy)
|
||||
|
||||
## Credits
|
||||
|
||||
- I thank the author of [climbing_pick](https://github.com/AndrejIT/climbing_pick) for the idea, and some ideas from their code.
|
||||
|
3
init.lua
3
init.lua
@ -77,6 +77,8 @@ minetest.register_tool("climb_glove:adv_glove", {
|
||||
})
|
||||
|
||||
-- Crafting
|
||||
local allow_crafts = minetest.settings.get_bool("climb_crafting") or false
|
||||
if allow_crafts == true then
|
||||
local gm = climb.game_mode()
|
||||
local empty = ""
|
||||
local iron = ""
|
||||
@ -108,6 +110,7 @@ minetest.register_craft({
|
||||
{gold, gold, diamond}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-- Indicate ready
|
||||
minetest.log("action", "[climb_glove] Running version "..climb.version())
|
||||
|
5
settingtypes.txt
Normal file
5
settingtypes.txt
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
# https://github.com/minetest/minetest/blob/master/builtin/settingtypes.txt#L1
|
||||
|
||||
# Can anyone craft climbing gloves (also includes upgrading the basic to advanced)
|
||||
climb_crafting (Climb Glove - Crafting) bool false
|
Loading…
x
Reference in New Issue
Block a user