recipe and rope length now configurable

This commit is contained in:
Joachim Stolberg 2017-06-08 20:50:42 +02:00
parent 3521e55231
commit 7ff0915a14
2 changed files with 463 additions and 454 deletions

@ -4,5 +4,11 @@ towercrane.max_height = 24
-- Maximum crane width in blocks (12..n)
towercrane.max_width = 24
-- Crane rope lenght in block (max_height .. max_height+x)
towercrane.rope_length = 24
-- Gain factor for the crane sound (0.0 to 1)
towercrane.gain = 1
-- Recipe available (true/false)
towercrane.recipe = true

@ -3,7 +3,7 @@
Tower Crane Mod
===============
v0.03 by JoSt
v0.04 by JoSt
Copyright (C) 2017 Joachim Stolberg
LGPLv2.1+
@ -13,6 +13,7 @@
2017-06-04 v0.01 first version
2017-06-06 v0.02 Hook bugfix
2017-06-07 v0.03 fixed 2 bugs, added config.lua and sound
2017-06-08 v0.04 recipe and rope length now configurable
]]--
@ -502,7 +503,7 @@ minetest.register_node("towercrane:mast_ctrl_off", {
local pos1 = vector.add(pos, vector.multiply(dir, width/2))
dir = turnleft(dir)
local pos1 = vector.add(pos1, vector.multiply(dir, 1))
pos1.y = pos.y - 2 - height
pos1.y = pos.y - 2 + height - towercrane.rope_length
-- pos2 = far/left/above
local pos2 = vector.add(pos1, vector.multiply(dir, width-1))
@ -584,6 +585,7 @@ minetest.register_node("towercrane:arm2", {
----------------------------------------------------------------------------------------------------
-- Register Recipe
----------------------------------------------------------------------------------------------------
if towercrane.recipe then
minetest.register_craft({
output = "towercrane:base",
recipe = {
@ -592,6 +594,7 @@ minetest.register_craft({
{"default:steel_ingot", "dye:yellow", ""}
}
})
end