summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorh-v-smacker <hans-von-smacker+github@gmail.com>2018-10-08 23:41:14 +0300
committerh-v-smacker <hans-von-smacker+github@gmail.com>2018-10-08 23:41:14 +0300
commit048d680c824373bec9b3ec5ac408295b9548679b (patch)
treeeaadf9931694b60923fa2cc91f322d455d48fae1 /init.lua
parent8f4d5d177413e34bad5cd9e79e6547eb51935b5c (diff)
parent87f0e581270d4221ccc473f331732dd6cb513c0b (diff)
Diffstat (limited to 'init.lua')
-rwxr-xr-xinit.lua30
1 files changed, 1 insertions, 29 deletions
diff --git a/init.lua b/init.lua
index ac161c2..cf795f9 100755
--- a/init.lua
+++ b/init.lua
@@ -76,35 +76,7 @@ advtrains.register_wagon("diesel_lokomotive", {
})
end,
drops={"advtrains:diesel_lokomotive"},
- horn_sound = "advtrains_engine_diesel_horn",
- 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
- if self.sndh then
- minetest.sound_stop(self.sndh)
- end
- self.sndh = minetest.sound_play({name="advtrains_engine_diesel_sound", gain=0.5}, {object = self.object})
- end
-
--- if velocity < 2 and (old_velocity >= 2 or old_velocity == velocity) and not self.sound_arrive_handle then
--- --self.sound_arrive_handle = minetest.sound_play("advtrains_subway_arrive", {object = self.object})
--- elseif (velocity > old_velocity) and self.sound_arrive_handle then
--- minetest.sound_stop(self.sound_arrive_handle)
--- self.sound_arrive_handle = nil
--- end
--- if velocity > 0 and (self.sound_loop_tmr or 0)<=0 then
--- self.sound_loop_handle = minetest.sound_play({name="advtrains_engine_diesel_sound", gain=0.3}, {object = self.object})
--- self.sound_loop_tmr=3
--- elseif velocity>0 then
--- self.sound_loop_tmr = self.sound_loop_tmr - dtime
--- elseif velocity==0 then
--- if self.sound_loop_handle then
--- minetest.sound_stop(self.sound_loop_handle)
--- self.sound_loop_handle = nil
--- end
--- self.sound_loop_tmr=0
--- end
- end,
+ horn_sound = "advtrains_engine_diesel_horn",
}, S("Diesel Engine"), "advtrains_engine_diesel_inv.png")
advtrains.register_wagon("wagon_gravel", {