/src/
- ../
- CMakeLists.txt
- activeobject.h
- areastore.cpp
- areastore.h
- ban.cpp
- ban.h
- camera.cpp
- camera.h
- cavegen.cpp
- cavegen.h
- cguittfont
- chat.cpp
- chat.h
- client.cpp
- client.h
- client
- clientiface.cpp
- clientiface.h
- clientmap.cpp
- clientmap.h
- clientmedia.cpp
- clientmedia.h
- clientobject.cpp
- clientobject.h
- clientsimpleobject.h
- clouds.cpp
- clouds.h
- cmake_config.h.in
- cmake_config_githash.h.in
- collision.cpp
- collision.h
- config.h
- constants.h
- content_abm.cpp
- content_abm.h
- content_cao.cpp
- content_cao.h
- content_cso.cpp
- content_cso.h
- content_mapblock.cpp
- content_mapblock.h
- content_mapnode.cpp
- content_mapnode.h
- content_nodemeta.cpp
- content_nodemeta.h
- content_sao.cpp
- content_sao.h
- convert_json.cpp
- convert_json.h
- craftdef.cpp
- craftdef.h
- database-dummy.cpp
- database-dummy.h
- database-leveldb.cpp
- database-leveldb.h
- database-redis.cpp
- database-redis.h
- database-sqlite3.cpp
- database-sqlite3.h
- database.cpp
- database.h
- daynightratio.h
- debug.cpp
- debug.h
- defaultsettings.cpp
- defaultsettings.h
- drawscene.cpp
- drawscene.h
- dungeongen.cpp
- dungeongen.h
- emerge.cpp
- emerge.h
- environment.cpp
- environment.h
- event.h
- event_manager.h
- exceptions.h
- filecache.cpp
- filecache.h
- filesys.cpp
- filesys.h
- fontengine.cpp
- fontengine.h
- game.cpp
- game.h
- gamedef.h
- gameparams.h
- genericobject.cpp
- genericobject.h
- gettext.cpp
- gettext.h
- gettime.h
- gmp
- guiChatConsole.cpp
- guiChatConsole.h
- guiEngine.cpp
- guiEngine.h
- guiFileSelectMenu.cpp
- guiFileSelectMenu.h
- guiFormSpecMenu.cpp
- guiFormSpecMenu.h
- guiKeyChangeMenu.cpp
- guiKeyChangeMenu.h
- guiMainMenu.h
- guiPasswordChange.cpp
- guiPasswordChange.h
- guiTable.cpp
- guiTable.h
- guiVolumeChange.cpp
- guiVolumeChange.h
- guiscalingfilter.cpp
- guiscalingfilter.h
- httpfetch.cpp
- httpfetch.h
- hud.cpp
- hud.h
- imagefilters.cpp
- imagefilters.h
- intlGUIEditBox.cpp
- intlGUIEditBox.h
- inventory.cpp
- inventory.h
- inventorymanager.cpp
- inventorymanager.h
- irr_aabb3d.h
- irr_v2d.h
- irr_v3d.h
- irrlichttypes.h
- irrlichttypes_bloated.h
- irrlichttypes_extrabloated.h
- itemdef.cpp
- itemdef.h
- itemgroup.h
- json
- keycode.cpp
- keycode.h
- light.cpp
- light.h
- localplayer.cpp
- localplayer.h
- log.cpp
- log.h
- lua
- luaentity_common.h
- main.cpp
- mainmenumanager.h
- map.cpp
- map.h
- mapblock.cpp
- mapblock.h
- mapblock_mesh.cpp
- mapblock_mesh.h
- mapgen.cpp
- mapgen.h
- mapgen_fractal.cpp
- mapgen_fractal.h
- mapgen_singlenode.cpp
- mapgen_singlenode.h
- mapgen_v5.cpp
- mapgen_v5.h
- mapgen_v6.cpp
- mapgen_v6.h
- mapgen_v7.cpp
- mapgen_v7.h
- mapnode.cpp
- mapnode.h
- mapsector.cpp
- mapsector.h
- mesh.cpp
- mesh.h
- mg_biome.cpp
- mg_biome.h
- mg_decoration.cpp
- mg_decoration.h
advtrains.trains[train_id].atc_arrow=nil
end
--nodes
local idxtrans={static=1, mesecon=2, digiline=3}
local apn_func=function(pos, node)
advtrains.ndb.update(pos, node)
local meta=minetest.get_meta(pos)
if meta then
meta:set_string("infotext", attrans("ATC controller, unconfigured."))
meta:set_string("formspec", atc.get_atc_controller_formspec(pos, meta))
end
end
advtrains.register_tracks("default", {
nodename_prefix="advtrains:dtrack_atc",
texture_prefix="advtrains_dtrack_atc",
models_prefix="advtrains_dtrack",
models_suffix=".b3d",
shared_texture="advtrains_dtrack_shared_atc.png",
description=attrans("ATC controller"),
formats={},
get_additional_definiton = function(def, preset, suffix, rotation)
return {
after_place_node=apn_func,
after_dig_node=function(pos)
advtrains.invalidate_all_paths()
advtrains.ndb.clear(pos)
local pts=minetest.pos_to_string(pos)
atc.controllers[pts]=nil
end,
on_receive_fields = function(pos, formname, fields, player)
if minetest.is_protected(pos, player:get_player_name()) then
minetest.chat_send_player(player:get_player_name(), attrans("This position is protected!"))
return
end
local meta=minetest.get_meta(pos)
if meta then
if not fields.save then
--maybe only the dropdown changed
if fields.mode then
meta:set_string("mode", idxtrans[fields.mode])
if fields.mode=="digiline" then
meta:set_string("infotext", attrans("ATC controller, mode @1\nChannel: @2", fields.mode, meta:get_string("command")) )
else
meta:set_string("infotext", attrans("ATC controller, mode @1\nCommand: @2", fields.mode, meta:get_string("command")) )
end
meta:set_string("formspec", atc.get_atc_controller_formspec(pos, meta))
end
return
end
meta:set_string("mode", idxtrans[fields.mode])
meta:set_string("command", fields.command)
meta:set_string("command_on", fields.command_on)
meta:set_string("channel", fields.channel)
if fields.mode=="digiline" then
meta:set_string("infotext", attrans("ATC controller, mode @1\nChannel: @2", fields.mode, meta:get_string("command")) )
else
meta:set_string("infotext", attrans("ATC controller, mode @1\nCommand: @2", fields.mode, meta:get_string("command")) )
end
meta:set_string("formspec", atc.get_atc_controller_formspec(pos, meta))
local pts=minetest.pos_to_string(pos)
local _