summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-01-07 20:54:01 +0100
committerorwell96 <orwell@bleipb.de>2018-01-07 20:54:01 +0100
commit97a6c8de1865b7c88bff5491acbb3637f59d7efa (patch)
treef0fbe7f5ad72a9f8b90866625ae063383ca76b79
parentb9aa90a22c25193e2652162ea067c6a9cca05270 (diff)
parentc5afdc6c0bf817ea00c60aaa6d1b878728e78e8c (diff)
downloadbasic_trains-97a6c8de1865b7c88bff5491acbb3637f59d7efa.tar.gz
basic_trains-97a6c8de1865b7c88bff5491acbb3637f59d7efa.tar.bz2
basic_trains-97a6c8de1865b7c88bff5491acbb3637f59d7efa.zip
Merge branch 'master' of https://github.com/orwell96/advtrains
-rwxr-xr-xadvtrains_train_steam/init.lua12
-rwxr-xr-xadvtrains_train_steam/models/advtrains_detailed_steam_engine.b3dbin468002 -> 472151 bytes
-rw-r--r--advtrains_train_steam/sounds/advtrains_steam_loop.oggbin0 -> 239037 bytes
-rwxr-xr-xadvtrains_train_steam/textures/advtrains_detailed_steam_engine.pngbin61988 -> 30519 bytes
4 files changed, 11 insertions, 1 deletions
diff --git a/advtrains_train_steam/init.lua b/advtrains_train_steam/init.lua
index b8d9adb..461aa91 100755
--- a/advtrains_train_steam/init.lua
+++ b/advtrains_train_steam/init.lua
@@ -43,6 +43,7 @@ advtrains.register_wagon("newlocomotive", {
self.old_anim_velocity=advtrains.abs_ceil(velocity)
end
end,
+
custom_on_activate = function(self, staticdata_table, dtime_s)
minetest.add_particlespawner({
amount = 10,
@@ -84,7 +85,7 @@ advtrains.register_wagon("detailed_steam_engine", {
{
name=S("Driver Stand (left)"),
attach_offset={x=-5, y=10, z=-10},
- view_offset={x=0, y=6, z=0},
+ view_offset={x=9, y=-2, z=-6},
driving_ctrl_access=true,
group = "dstand",
},
@@ -111,6 +112,14 @@ advtrains.register_wagon("detailed_steam_engine", {
self.object:set_animation({x=1,y=80}, advtrains.abs_ceil(velocity)*15, 0, true)
self.old_anim_velocity=advtrains.abs_ceil(velocity)
end
+ if velocity > 0 and not self.sound_loop_handle then
+ self.sound_loop_handle = minetest.sound_play({name="advtrains_steam_loop", gain=2}, {object = self.object, loop=true})
+ elseif velocity==0 then
+ if self.sound_loop_handle then
+ minetest.sound_stop(self.sound_loop_handle)
+ self.sound_loop_handle = nil
+ end
+ end
end,
custom_on_activate = function(self, staticdata_table, dtime_s)
minetest.add_particlespawner({
@@ -141,6 +150,7 @@ advtrains.register_wagon("detailed_steam_engine", {
end,
drops={"default:steelblock 4"},
horn_sound = "advtrains_steam_whistle",
+
}, S("Detailed Steam Engine"), "advtrains_detailed_engine_steam_inv.png")
advtrains.register_wagon("wagon_default", {
diff --git a/advtrains_train_steam/models/advtrains_detailed_steam_engine.b3d b/advtrains_train_steam/models/advtrains_detailed_steam_engine.b3d
index 7418d8a..f73becb 100755
--- a/advtrains_train_steam/models/advtrains_detailed_steam_engine.b3d
+++ b/advtrains_train_steam/models/advtrains_detailed_steam_engine.b3d
Binary files differ
diff --git a/advtrains_train_steam/sounds/advtrains_steam_loop.ogg b/advtrains_train_steam/sounds/advtrains_steam_loop.ogg
new file mode 100644
index 0000000..8b221a9
--- /dev/null
+++ b/advtrains_train_steam/sounds/advtrains_steam_loop.ogg
Binary files differ
diff --git a/advtrains_train_steam/textures/advtrains_detailed_steam_engine.png b/advtrains_train_steam/textures/advtrains_detailed_steam_engine.png
index eab4dc8..926d5f0 100755
--- a/advtrains_train_steam/textures/advtrains_detailed_steam_engine.png
+++ b/advtrains_train_steam/textures/advtrains_detailed_steam_engine.png
Binary files differ