mirror of
https://github.com/joe7575/techpack.git
synced 2024-12-26 15:37:30 +01:00
Node states modified, according to tueblib.states
This commit is contained in:
parent
299860158d
commit
7fd2fc66d5
@ -19,7 +19,7 @@ local CYCLE_TIME = 4
|
||||
local TICKS_TO_SLEEP = 5
|
||||
local STOP_STATE = 0
|
||||
local STANDBY_STATE = -1
|
||||
local FAULT_STATE = -2
|
||||
local FAULT_STATE = -3
|
||||
|
||||
|
||||
local leaves = {
|
||||
@ -135,7 +135,7 @@ end
|
||||
local function goto_sleep(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local number = meta:get_string("number")
|
||||
meta:set_int("running", STOP_STATE)
|
||||
meta:set_int("running", STANDBY_STATE)
|
||||
minetest.get_node_timer(pos):start(CYCLE_TIME * TICKS_TO_SLEEP)
|
||||
meta:set_string("infotext", "Tubelib Fermenter "..number..": standby")
|
||||
meta:set_string("formspec", formspec(tubelib.STANDBY))
|
||||
|
@ -18,7 +18,7 @@ local TICKS_TO_SLEEP = 10
|
||||
local CYCLE_TIME = 2
|
||||
local STOP_STATE = 0
|
||||
local STANDBY_STATE = -1
|
||||
local FAULT_STATE = -2
|
||||
local FAULT_STATE = -3
|
||||
|
||||
|
||||
local function formspec(state)
|
||||
@ -285,7 +285,7 @@ tubelib.register_node("tubelib_addons1:grinder", {"tubelib_addons1:grinder_activ
|
||||
elseif topic == "state" then
|
||||
local meta = minetest.get_meta(pos)
|
||||
local running = meta:get_int("running")
|
||||
return tubelib.statestring(runnnig)
|
||||
return tubelib.statestring(running)
|
||||
else
|
||||
return "unsupported"
|
||||
end
|
||||
|
@ -28,7 +28,7 @@ local TICKS_TO_SLEEP = 10
|
||||
local STOP_STATE = 0
|
||||
local RUNNING = 1
|
||||
local STANDBY_STATE = -1
|
||||
local FAULT_STATE = -2
|
||||
local FAULT_STATE = -3
|
||||
local OFFSET = 5
|
||||
|
||||
local Radius2Idx = {[4]=1 ,[6]=2, [8]=3, [10]=4, [12]=5, [14]=6, [16]=7}
|
||||
|
@ -24,7 +24,7 @@ local CYCLE_TIME = 4
|
||||
local BURNING_TIME = 16
|
||||
local TICKS_TO_SLEEP = 5
|
||||
local STOP_STATE = 0
|
||||
local FAULT_STATE = -2
|
||||
local FAULT_STATE = -3
|
||||
|
||||
local Depth2Idx = {[1]=1 ,[2]=2, [3]=3, [5]=4, [10]=5, [15]=6, [20]=7, [25]=8}
|
||||
local Level2Idx = {[2]=1, [1]=2, [0]=3, [-1]=4, [-2]=5, [-3]=6,
|
||||
|
@ -19,7 +19,7 @@ local CYCLE_TIME = 6
|
||||
local TICKS_TO_SLEEP = 5
|
||||
local STOP_STATE = 0
|
||||
local STANDBY_STATE = -1
|
||||
local FAULT_STATE = -2
|
||||
local FAULT_STATE = -3
|
||||
|
||||
local function formspec(state)
|
||||
return "size[8,8]"..
|
||||
@ -124,7 +124,7 @@ end
|
||||
local function goto_sleep(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local number = meta:get_string("number")
|
||||
meta:set_int("running", STOP_STATE)
|
||||
meta:set_int("running", STANDBY_STATE)
|
||||
minetest.get_node_timer(pos):start(CYCLE_TIME * TICKS_TO_SLEEP)
|
||||
meta:set_string("infotext", "Tubelib Reformer "..number..": standby")
|
||||
meta:set_string("formspec", formspec(tubelib.STANDBY))
|
||||
|
Loading…
Reference in New Issue
Block a user