Fix bugs found while testing
This commit is contained in:
parent
521112aced
commit
3d7924c751
|
@ -377,7 +377,7 @@ function advtrains.save(remove_players_from_wagons)
|
|||
end
|
||||
atprint("[save_all]Saved advtrains save files")
|
||||
end
|
||||
--minetest.register_on_shutdown(advtrains.save)
|
||||
minetest.register_on_shutdown(advtrains.save)
|
||||
|
||||
-- This chat command provides a solution to the problem known on the LinuxWorks server
|
||||
-- There are many players that joined a single time, got on a train and then left forever
|
||||
|
|
|
@ -54,7 +54,7 @@ function advtrains.path_create(train, pos, connid, rel_index)
|
|||
train.path_req_b=0
|
||||
|
||||
advtrains.occ.set_item(train.id, posr, 0)
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- Sets position and connid to properly restore after a crash, e.g. in order
|
||||
|
|
|
@ -304,7 +304,7 @@ function advtrains.register_tracks(tracktype, def, preset)
|
|||
|
||||
if var.switchalt and var.switchst then
|
||||
local switchfunc=function(pos, node, newstate)
|
||||
if newstate~=var.switchst then
|
||||
if newstate~=var.switchst and not advtrains.get_train_at_pos(pos) then
|
||||
advtrains.ndb.swap_node(pos, {name=def.nodename_prefix.."_"..var.switchalt..rotation, param2=node.param2})
|
||||
advtrains.invalidate_all_paths(pos)
|
||||
end
|
||||
|
|
|
@ -41,6 +41,7 @@ advtrains.register_wagon("engine_industrial", {
|
|||
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
|
||||
drops={"default:steelblock 4"},
|
||||
horn_sound = "advtrains_industrial_horn",
|
||||
glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright
|
||||
}, S("Industrial Train Engine"), "advtrains_engine_industrial_inv.png")
|
||||
--big--
|
||||
advtrains.register_wagon("engine_industrial_big", {
|
||||
|
@ -78,6 +79,7 @@ advtrains.register_wagon("engine_industrial_big", {
|
|||
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
|
||||
drops={"default:steelblock 4"},
|
||||
horn_sound = "advtrains_industrial_horn",
|
||||
glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright
|
||||
}, S("Big Industrial Train Engine"), "advtrains_engine_industrial_inv.png")
|
||||
advtrains.register_wagon("wagon_tank", {
|
||||
mesh="advtrains_wagon_tank.b3d",
|
||||
|
@ -99,6 +101,7 @@ advtrains.register_wagon("wagon_tank", {
|
|||
inventory_list_sizes = {
|
||||
box=8*3,
|
||||
},
|
||||
glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright
|
||||
}, S("Industrial tank wagon"), "advtrains_wagon_tank_inv.png")
|
||||
advtrains.register_wagon("wagon_wood", {
|
||||
mesh="advtrains_wagon_wood.b3d",
|
||||
|
@ -120,4 +123,5 @@ advtrains.register_wagon("wagon_wood", {
|
|||
inventory_list_sizes = {
|
||||
box=8*3,
|
||||
},
|
||||
glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright
|
||||
}, S("Industrial wood wagon"), "advtrains_wagon_wood_inv.png")
|
||||
|
|
|
@ -73,6 +73,7 @@ advtrains.register_wagon("engine_japan", {
|
|||
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
|
||||
drops={"default:steelblock 4"},
|
||||
horn_sound = "advtrains_japan_horn",
|
||||
glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright
|
||||
}, S("Japanese Train Engine"), "advtrains_engine_japan_inv.png")
|
||||
|
||||
advtrains.register_wagon("wagon_japan", {
|
||||
|
@ -141,5 +142,6 @@ advtrains.register_wagon("wagon_japan", {
|
|||
wagon_span=2.3,
|
||||
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
|
||||
drops={"default:steelblock 4"},
|
||||
glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright
|
||||
}, S("Japanese Train Wagon"), "advtrains_wagon_japan_inv.png")
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ advtrains.register_wagon("newlocomotive", {
|
|||
end,
|
||||
drops={"default:steelblock 4"},
|
||||
horn_sound = "advtrains_steam_whistle",
|
||||
glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright
|
||||
}, S("Steam Engine"), "advtrains_engine_steam_inv.png")
|
||||
|
||||
advtrains.register_wagon("detailed_steam_engine", {
|
||||
|
@ -148,6 +149,7 @@ advtrains.register_wagon("detailed_steam_engine", {
|
|||
end,
|
||||
drops={"default:steelblock 4"},
|
||||
horn_sound = "advtrains_steam_whistle",
|
||||
glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright
|
||||
|
||||
}, S("Detailed Steam Engine"), "advtrains_detailed_engine_steam_inv.png")
|
||||
|
||||
|
@ -194,6 +196,7 @@ advtrains.register_wagon("wagon_default", {
|
|||
wagon_span=2.634,
|
||||
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
|
||||
drops={"default:steelblock 4"},
|
||||
glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright
|
||||
}, S("Passenger Wagon"), "advtrains_wagon_inv.png")
|
||||
|
||||
|
||||
|
@ -217,6 +220,7 @@ advtrains.register_wagon("wagon_box", {
|
|||
inventory_list_sizes = {
|
||||
box=8*3,
|
||||
},
|
||||
glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright
|
||||
}, S("Box Wagon"), "advtrains_wagon_box_inv.png")
|
||||
|
||||
minetest.register_craft({
|
||||
|
|
|
@ -76,6 +76,7 @@ advtrains.register_wagon("subway_wagon", {
|
|||
is_locomotive=true,
|
||||
drops={"default:steelblock 4"},
|
||||
horn_sound = "advtrains_subway_horn",
|
||||
glow = -1, --supposed to disable effect of light to texture color, so that the entity always appears as full-bright
|
||||
custom_on_velocity_change = function(self, velocity, old_velocity, dtime)
|
||||
if not velocity or not old_velocity then return end
|
||||
if old_velocity == 0 and velocity > 0 then
|
||||
|
|
Loading…
Reference in New Issue