You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

40 lines
1.2 KiB

advtrains.register_tracks("default", {
nodename_prefix="advtrains_interlocking:dtrack_digiline_mesestation",
texture_prefix="advtrains_dtrack_mesestation",
models_prefix="advtrains_dtrack",
models_suffix=".b3d",
shared_texture="advtrains_dtrack_shared_mesestation.png",
second_texture="default_gravel.png",
description="Station/Stop Rail (Mesecons)",
formats={},
get_additional_definiton=function(def,preset,suffix,rotation)
return {
advtrains = {
on_train_approach=function(pos,train_id,train,index)
advtrains.lzb_add_checkpoint(train,index,minetest.get_meta(pos):get_int("speed"),nil)
end,
},
mesecons={
effector={
action_on=function(pos,node)
minetest.get_meta(pos):set_int("speed",0)
minetest.after(0,advtrains.ndb.update,pos,node)
end,
action_off=function(pos,node)
minetest.get_meta(pos):set_int("speed",100)
minetest.after(0,advtrains.ndb.update,pos,node)
end,
},
},
}
end,
},advtrains.trackpresets.t_30deg_straightonly)
minetest.register_craft({
output="advtrains_interlocking:dtrack_digiline_mesestation_placer",
recipe={
{"advtrains:dtrack_placer","default:mese",""},
{"","",""},
{"","",""},
},
})