diff options
-rw-r--r-- | advtrains/init.lua | 2 | ||||
-rw-r--r-- | advtrains/path.lua | 2 | ||||
-rw-r--r-- | advtrains/tracks.lua | 2 | ||||
-rw-r--r-- | advtrains_train_industrial/init.lua | 4 | ||||
-rw-r--r-- | advtrains_train_japan/init.lua | 2 | ||||
-rwxr-xr-x | advtrains_train_steam/init.lua | 4 | ||||
-rw-r--r-- | advtrains_train_subway/init.lua | 1 |
7 files changed, 14 insertions, 3 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua index 323d55a..587dd12 100644 --- a/advtrains/init.lua +++ b/advtrains/init.lua @@ -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 diff --git a/advtrains/path.lua b/advtrains/path.lua index 8bdb72b..4a81ce9 100644 --- a/advtrains/path.lua +++ b/advtrains/path.lua @@ -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 diff --git a/advtrains/tracks.lua b/advtrains/tracks.lua index eefff66..559ada7 100644 --- a/advtrains/tracks.lua +++ b/advtrains/tracks.lua @@ -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
diff --git a/advtrains_train_industrial/init.lua b/advtrains_train_industrial/init.lua index a60bf74..71154fb 100644 --- a/advtrains_train_industrial/init.lua +++ b/advtrains_train_industrial/init.lua @@ -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") diff --git a/advtrains_train_japan/init.lua b/advtrains_train_japan/init.lua index 23027db..e56f799 100644 --- a/advtrains_train_japan/init.lua +++ b/advtrains_train_japan/init.lua @@ -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") diff --git a/advtrains_train_steam/init.lua b/advtrains_train_steam/init.lua index 2afbe16..10982aa 100755 --- a/advtrains_train_steam/init.lua +++ b/advtrains_train_steam/init.lua @@ -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({ diff --git a/advtrains_train_subway/init.lua b/advtrains_train_subway/init.lua index 4a5f4d7..62bcc41 100644 --- a/advtrains_train_subway/init.lua +++ b/advtrains_train_subway/init.lua @@ -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 |