mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-22 23:33:44 +01:00
v2.02.03 industriallamp bugfix
This commit is contained in:
parent
0e95c2a76d
commit
03412c7849
@ -1,7 +1,20 @@
|
|||||||
# Release Notes for ModPack TechPack [techpack]
|
# Release Notes for ModPack TechPack [techpack]
|
||||||
|
|
||||||
|
|
||||||
## V2.02.02 (2019-02-216)
|
## V2.02.03 (2019-02-27)
|
||||||
|
|
||||||
|
### Additions
|
||||||
|
|
||||||
|
### Removals
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- industriallamp bugfix
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## V2.02.02 (2019-02-16)
|
||||||
|
|
||||||
### Additions
|
### Additions
|
||||||
- sl_controller: add battery status command
|
- sl_controller: add battery status command
|
||||||
|
@ -12,6 +12,23 @@
|
|||||||
|
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
|
local function switch_on(pos, node)
|
||||||
|
if string.sub(node.name, -3) ~= "_on" then
|
||||||
|
node.name = node.name.."_on"
|
||||||
|
minetest.swap_node(pos, node)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function switch_off(pos, node)
|
||||||
|
if string.sub(node.name, -3) == "_on" then
|
||||||
|
node.name = string.sub(node.name, 1, -4)
|
||||||
|
minetest.swap_node(pos, node)
|
||||||
|
local pos1 = {x=pos.x-5, y=pos.y-5, z=pos.z-5}
|
||||||
|
local pos2 = {x=pos.x+5, y=pos.y+5, z=pos.z+5}
|
||||||
|
minetest.fix_light(pos1, pos2)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function register_lamp(tbl)
|
local function register_lamp(tbl)
|
||||||
local num, tiles, tiles_on, node_box, size = tbl.num, tbl.tiles, tbl.tiles_on, tbl.node_box, tbl.size
|
local num, tiles, tiles_on, node_box, size = tbl.num, tbl.tiles, tbl.tiles_on, tbl.node_box, tbl.size
|
||||||
minetest.register_node("tubelib_addons2:industriallamp"..num, {
|
minetest.register_node("tubelib_addons2:industriallamp"..num, {
|
||||||
|
Loading…
Reference in New Issue
Block a user