door controller added
This commit is contained in:
parent
28eb8e0487
commit
9a4dc77503
@ -104,6 +104,7 @@ techage.Items = {
|
||||
ta3_signallamp = "techage:signal_lamp_off",
|
||||
ta3_doorblock = "techage:doorblock20",
|
||||
ta3_programmer = "techage:programmer",
|
||||
ta3_doorcontroller = "techage:ta3_doorcontroller",
|
||||
----------------------------
|
||||
techage_ta4 = "techage_ta4.png",
|
||||
ta4_windturbine = "techage:ta4_wind_turbine",
|
||||
|
@ -91,6 +91,7 @@ techage.manual_DE.aTitel = {
|
||||
"3,TA3 Terminal",
|
||||
"3,TechAge Signallampe / Signal Lamp",
|
||||
"3,Tür/Tor Blöcke / Door/Gate Blocks",
|
||||
"3,TA3 Tür Controller / Door Controller",
|
||||
"2,Detektoren",
|
||||
"3,TA3 Detektor / Detector",
|
||||
"3,TA3 Wagen Detektor / Cart Detector",
|
||||
@ -864,12 +865,17 @@ techage.manual_DE.aText = {
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Diese Blöcke kann man mit einem 'off' Kommando verschwinden lassen und mit dem 'on' Kommando wieder hervor zaubern.\n"..
|
||||
"Mit diese Blöcken kann man Türe und Tore realisieren\\, die über Kommandos geöffnet (Blöcke verschwinden) und wieder geschlossen werden können. Pro Tor oder Tür wird dazu ein Tür Controller benötigt. \n"..
|
||||
"\n"..
|
||||
"Das Aussehen der Blöcke kann über das Block-Menü eingestellt werden.\n"..
|
||||
"Damit lassen sich Geheimtüren realisieren\\, die sich nur bei bestimmten Spielern öffnen (mit Hilfe des Spieler-Detektors). \n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Der Tür Controller dient zur Ansteuerung der TA3 Tür/Tor Blöcke. Beim Tür Controller müssen die Nummern der Tür/Tor Blöcke eingegeben werden. Wird ein 'on'/'off' Kommando Kommando an den Tür Controller gesendet\\, öffnet/schließt dieser die Tür bzw. das Tor.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Detektoren scannen ihre Umgebung ab und senden ein 'on'-Kommando\\, wenn das Gesuchte erkannt wurde.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
@ -1401,6 +1407,7 @@ techage.manual_DE.aItemName = {
|
||||
"ta3_terminal",
|
||||
"ta3_signallamp",
|
||||
"ta3_doorblock",
|
||||
"ta3_doorcontroller",
|
||||
"ta3_nodedetector",
|
||||
"ta3_detector",
|
||||
"ta3_cartdetector",
|
||||
@ -1587,6 +1594,7 @@ techage.manual_DE.aPlanTable = {
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"ta4_windturbine",
|
||||
"",
|
||||
"",
|
||||
|
1
init.lua
1
init.lua
@ -176,6 +176,7 @@ else
|
||||
dofile(MP.."/logic/cart_detector.lua")
|
||||
dofile(MP.."/logic/gateblock.lua")
|
||||
dofile(MP.."/logic/doorblock.lua")
|
||||
dofile(MP.."/logic/doorcontroller.lua")
|
||||
dofile(MP.."/logic/collector.lua")
|
||||
|
||||
-- Test
|
||||
|
@ -75,6 +75,7 @@ Hydrogen Cylinder Large=Wasserstoffflasche groß
|
||||
Hydrogen Cylinder Small=Wasserstoffflasche klein
|
||||
In use:=In Benutzung:
|
||||
Insert destination node number(s)=Gebe Zielnummer(n) ein
|
||||
Insert door/gate block number(s)=Gebe Tür-/Tornummer(n) ein
|
||||
Inverter=Wechselrichter
|
||||
Leave Powder=Laub Pulver
|
||||
Liquid Filler=Einfülltrichter
|
||||
@ -215,6 +216,7 @@ TA3 Distillation Tower 2=TA3 Destillationsturm 2
|
||||
TA3 Distillation Tower 3=TA3 Destillationsturm 3
|
||||
TA3 Distillation Tower 4=TA3 Destillationsturm 4
|
||||
TA3 Distillation Tower Base=TA3 Destillationsturm Basis
|
||||
TA3 Door Controller=TA3 Tür Controller
|
||||
TA3 Drill Bit=TA3 Bohrgestänge
|
||||
TA3 Ele Fab=TA3 E-Fabrik
|
||||
TA3 Fuel Oil=TA3 Schweröl
|
||||
|
@ -73,6 +73,7 @@ Hydrogen Cylinder Large=
|
||||
Hydrogen Cylinder Small=
|
||||
In use:=
|
||||
Insert destination node number(s)=
|
||||
Insert door/gate block number(s)=
|
||||
Inverter=
|
||||
Leave Powder=
|
||||
Liquid Filler=
|
||||
@ -213,6 +214,7 @@ TA3 Distillation Tower 2=
|
||||
TA3 Distillation Tower 3=
|
||||
TA3 Distillation Tower 4=
|
||||
TA3 Distillation Tower Base=
|
||||
TA3 Door Controller=
|
||||
TA3 Drill Bit=
|
||||
TA3 Ele Fab=
|
||||
TA3 Fuel Oil=
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
]]--
|
||||
|
||||
local M = minetest.get_meta
|
||||
local S = techage.S
|
||||
|
||||
-- See also gateblock!!!
|
||||
@ -52,19 +53,12 @@ for idx,pgn in ipairs(tPgns) do
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/16, -8/16, -2/16, 8/16, 8/16, 2/16},
|
||||
{ -8/16, -8/16, -1/16, 8/16, 8/16, 1/16},
|
||||
},
|
||||
},
|
||||
|
||||
after_place_node = function(pos, placer)
|
||||
local nvm = techage.get_nvm(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
local number = techage.add_node(pos, "techage:doorblock"..idx)
|
||||
nvm.facedir = node.param2
|
||||
meta:set_string("node_number", number)
|
||||
meta:set_string("infotext", S("TechAge Door Block").." "..number)
|
||||
meta:set_string("formspec", "size[3,2]"..
|
||||
M(pos):set_string("formspec", "size[3,2]"..
|
||||
"label[0,0;Select texture]"..
|
||||
"dropdown[0,0.5;3;type;"..sTextures..";"..NUM_TEXTURES.."]"..
|
||||
"button_exit[0.5,1.5;2,1;exit;Save]")
|
||||
@ -73,23 +67,21 @@ for idx,pgn in ipairs(tPgns) do
|
||||
on_receive_fields = function(pos, formname, fields, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
local nvm = techage.get_nvm(pos)
|
||||
if fields.type then
|
||||
node.name = "techage:doorblock"..tTextures[fields.type]
|
||||
minetest.swap_node(pos, node)
|
||||
nvm.name = node.name
|
||||
end
|
||||
if fields.exit then
|
||||
meta:set_string("formspec", nil)
|
||||
local number = techage.add_node(pos, node.name)
|
||||
meta:set_string("infotext", S("TechAge Door Block").." "..number)
|
||||
end
|
||||
end,
|
||||
|
||||
after_dig_node = function(pos, oldnode, oldmetadata)
|
||||
after_dig_node = function(pos)
|
||||
techage.remove_node(pos)
|
||||
techage.del_mem(pos)
|
||||
end,
|
||||
|
||||
--drawtype = "glasslike",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
@ -97,27 +89,15 @@ for idx,pgn in ipairs(tPgns) do
|
||||
groups = {cracky=2, choppy=2, crumbly=2, not_in_creative_inventory = idx==NUM_TEXTURES and 0 or 1},
|
||||
is_ground_content = false,
|
||||
drop = "techage:doorblock"..NUM_TEXTURES,
|
||||
})
|
||||
|
||||
techage.register_node({"techage:doorblock"..idx}, {
|
||||
on_recv_message = function(pos, src, topic, payload)
|
||||
if topic == "on" then
|
||||
minetest.remove_node(pos)
|
||||
elseif topic == "off" then
|
||||
local nvm = techage.get_nvm(pos)
|
||||
nvm.facedir = nvm.facedir or 0
|
||||
nvm.name = nvm.name or "techage:doorblock"..NUM_TEXTURES
|
||||
minetest.add_node(pos, {name = nvm.name, paramtype2 = "facedir", param2 = nvm.facedir})
|
||||
end
|
||||
end,
|
||||
})
|
||||
},
|
||||
techage.register_node({"techage:doorblock"..idx}, {}))
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:doorblock"..NUM_TEXTURES,
|
||||
recipe = {
|
||||
{"techage:basalt_glass_thin", "", ""},
|
||||
{"default:mese_crystal_fragment", "",""},
|
||||
{"techage:vacuum_tube", "", ""},
|
||||
{"group:wood", "", ""},
|
||||
},
|
||||
})
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
]]--
|
||||
|
||||
local M = minetest.get_meta
|
||||
local S = techage.S
|
||||
|
||||
-- See also doorblock!!!
|
||||
@ -41,13 +42,9 @@ for idx,pgn in ipairs(tPgns) do
|
||||
minetest.register_node("techage:gateblock"..idx, {
|
||||
description = S("TechAge Gate Block"),
|
||||
tiles = {pgn},
|
||||
drawtype = "glasslike",
|
||||
after_place_node = function(pos, placer)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
local number = techage.add_node(pos, "techage:gateblock"..idx)
|
||||
meta:set_string("node_number", number)
|
||||
meta:set_string("infotext", S("TechAge Gate Block").." "..number)
|
||||
meta:set_string("formspec", "size[3,2]"..
|
||||
M(pos):set_string("formspec", "size[3,2]"..
|
||||
"label[0,0;Select texture]"..
|
||||
"dropdown[0,0.5;3;type;"..sTextures..";"..NUM_TEXTURES.."]"..
|
||||
"button_exit[0.5,1.5;2,1;exit;Save]")
|
||||
@ -59,49 +56,36 @@ for idx,pgn in ipairs(tPgns) do
|
||||
if fields.type then
|
||||
node.name = "techage:gateblock"..tTextures[fields.type]
|
||||
minetest.swap_node(pos, node)
|
||||
techage.add_node(pos, node.name)
|
||||
end
|
||||
if fields.exit then
|
||||
meta:set_string("formspec", nil)
|
||||
print(node.name)
|
||||
local number = techage.add_node(pos, node.name)
|
||||
meta:set_string("infotext", S("TechAge Gate Block").." "..number)
|
||||
end
|
||||
end,
|
||||
|
||||
after_dig_node = function(pos)
|
||||
techage.remove_node(pos)
|
||||
tubelib2.del_mem(pos)
|
||||
end,
|
||||
|
||||
paramtype = "light",
|
||||
drawtype = "glasslike",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
groups = {cracky=2, choppy=2, crumbly=2, not_in_creative_inventory = idx==NUM_TEXTURES and 0 or 1},
|
||||
is_ground_content = false,
|
||||
drop = "techage:gateblock"..NUM_TEXTURES,
|
||||
})
|
||||
|
||||
techage.register_node({"techage:gateblock"..idx}, {
|
||||
on_recv_message = function(pos, src, topic, payload)
|
||||
local node = minetest.get_node(pos)
|
||||
if topic == "on" then
|
||||
minetest.remove_node(pos)
|
||||
elseif topic == "off" then
|
||||
local num = techage.get_node_number(pos)
|
||||
local info = techage.get_node_info(num)
|
||||
if info then
|
||||
minetest.add_node(pos, {name=info.name})
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
},
|
||||
techage.register_node({"techage:gateblock"..idx}, {}))
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:gateblock"..NUM_TEXTURES,
|
||||
recipe = {
|
||||
{"group:wood", "", ""},
|
||||
{"techage:vacuum_tube", "", ""},
|
||||
{"techage:basalt_glass", "", ""},
|
||||
{"default:mese_crystal_fragment", "",""},
|
||||
{"group:wood", "", ""},
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -531,7 +531,8 @@ kann mit der Spritzpistole farbig gemacht werden.
|
||||
|
||||
### Tür/Tor Blöcke / Door/Gate Blocks
|
||||
|
||||
Diese Blöcke kann man mit einem `off` Kommando verschwinden lassen und mit dem `on` Kommando wieder hervor zaubern.
|
||||
Mit diese Blöcken kann man Türe und Tore realisieren, die über Kommandos geöffnet (Blöcke verschwinden) und wieder geschlossen werden können. Pro Tor oder Tür wird dazu ein Tür Controller benötigt.
|
||||
|
||||
Das Aussehen der Blöcke kann über das Block-Menü eingestellt werden.
|
||||
Damit lassen sich Geheimtüren realisieren, die sich nur bei bestimmten Spielern öffnen (mit Hilfe des Spieler-Detektors).
|
||||
|
||||
@ -539,6 +540,14 @@ Damit lassen sich Geheimtüren realisieren, die sich nur bei bestimmten Spielern
|
||||
|
||||
|
||||
|
||||
### TA3 Tür Controller / Door Controller
|
||||
|
||||
Der Tür Controller dient zur Ansteuerung der TA3 Tür/Tor Blöcke. Beim Tür Controller müssen die Nummern der Tür/Tor Blöcke eingegeben werden. Wird ein `on`/`off` Kommando Kommando an den Tür Controller gesendet, öffnet/schließt dieser die Tür bzw. das Tor.
|
||||
|
||||
[ta3_doorcontroller|image]
|
||||
|
||||
|
||||
|
||||
## Detektoren
|
||||
|
||||
Detektoren scannen ihre Umgebung ab und senden ein `on`-Kommando, wenn das Gesuchte erkannt wurde.
|
||||
|
Binary file not shown.
@ -90,6 +90,7 @@
|
||||
- [TA3 Terminal](./manual_ta3_DE.md#ta3-terminal)
|
||||
- [TechAge Signallampe / Signal Lamp](./manual_ta3_DE.md#techage-signallampe--signal-lamp)
|
||||
- [Tür/Tor Blöcke / Door/Gate Blocks](./manual_ta3_DE.md#türtor-blöcke--doorgate-blocks)
|
||||
- [TA3 Tür Controller / Door Controller](./manual_ta3_DE.md#ta3-tür-controller--door-controller)
|
||||
- [Detektoren](./manual_ta3_DE.md#detektoren)
|
||||
- [TA3 Detektor / Detector](./manual_ta3_DE.md#ta3-detektor--detector)
|
||||
- [TA3 Wagen Detektor / Cart Detector](./manual_ta3_DE.md#ta3-wagen-detektor--cart-detector)
|
||||
|
BIN
textures/techage_appl_doorcontroller.png
Normal file
BIN
textures/techage_appl_doorcontroller.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 203 B |
Loading…
Reference in New Issue
Block a user