aboutsummaryrefslogtreecommitdiff
path: root/advtrains/loading.lua
diff options
context:
space:
mode:
authorGabriel PĂ©rez-Cerezo <gabriel@gpcf.eu>2017-08-20 14:32:38 +0200
committerorwell96 <orwell@bleipb.de>2017-10-25 09:52:10 +0200
commitf228e2d30e0d712c6490fb84d4edfadeba8c4cd7 (patch)
tree9f7eaf8be4e54e162586b44547d9f7af6ded4036 /advtrains/loading.lua
parent291da56aa22608863252f419bbd8f226f0913c76 (diff)
downloadadvtrains-f228e2d30e0d712c6490fb84d4edfadeba8c4cd7.tar.gz
advtrains-f228e2d30e0d712c6490fb84d4edfadeba8c4cd7.tar.bz2
advtrains-f228e2d30e0d712c6490fb84d4edfadeba8c4cd7.zip
Moved default train track to separate mod, for integration with advcarts.
Diffstat (limited to 'advtrains/loading.lua')
-rw-r--r--advtrains/loading.lua53
1 files changed, 0 insertions, 53 deletions
diff --git a/advtrains/loading.lua b/advtrains/loading.lua
index 8ac7b00..e2c0e09 100644
--- a/advtrains/loading.lua
+++ b/advtrains/loading.lua
@@ -44,56 +44,3 @@ local function train_load(pos, train_id, unload)
end
-advtrains.register_tracks("default", {
- nodename_prefix="advtrains:dtrack_unload",
- texture_prefix="advtrains_dtrack_unload",
- models_prefix="advtrains_dtrack",
- models_suffix=".b3d",
- shared_texture="advtrains_dtrack_shared_unload.png",
- description=attrans("Unloading Track"),
- formats={},
- get_additional_definiton = function(def, preset, suffix, rotation)
- return {
- 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
- -- end,
- advtrains = {
- on_train_enter = function(pos, train_id)
- train_load(pos, train_id, true)
- end,
- },
- }
- end
- }, advtrains.trackpresets.t_30deg_straightonly)
-advtrains.register_tracks("default", {
- nodename_prefix="advtrains:dtrack_load",
- texture_prefix="advtrains_dtrack_load",
- models_prefix="advtrains_dtrack",
- models_suffix=".b3d",
- shared_texture="advtrains_dtrack_shared_load.png",
- description=attrans("Loading Track"),
- formats={},
- get_additional_definiton = function(def, preset, suffix, rotation)
- return {
- after_dig_node=function(pos)
- advtrains.invalidate_all_paths()
- advtrains.ndb.clear(pos)
- end,
-
- advtrains = {
- on_train_enter = function(pos, train_id)
- train_load(pos, train_id, false)
- end,
- },
- }
- end
- }, advtrains.trackpresets.t_30deg_straightonly)