Set wagon line number

master
Gabriel Pérez-Cerezo 2017-10-23 13:33:27 +02:00 committed by orwell96
parent be771d9413
commit 11d6a12ce7
12 changed files with 11 additions and 0 deletions

View File

@ -291,6 +291,13 @@ function wagon:on_step(dtime)
local gp=self:train()
local fct=self.wagon_flipped and -1 or 1
--set line number
if self.name == "advtrains:subway_wagon" and gp.line then
self.object:set_properties({
textures={"advtrains_subway_wagon.png^advtrains_subway_wagon_line"..gp.line..".png"},
visual_size = text_scale,
})
end
--door animation
if self.doors then
if (self.door_anim_timer or 0)<=0 then

View File

@ -58,6 +58,10 @@ function r.fire_event(pos, evtdata)
train.atc_arrow=atc_arrow
return true
end,
set_line = function(line)
train.line = line
return true
end,
atc_reset = function(cmd)
if not train_id then return false end
assertt(cmd, "string")

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB