Set wagon line number
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |