forked from Mirrors/openclonk
horrid highway: fade out trains if they are taking too long
parent
53f29ccb96
commit
8889a68127
|
@ -18,7 +18,7 @@ public func OnSetInputSignal(object operator, object switch, bool right)
|
|||
if (!right)
|
||||
{
|
||||
if (!GetEffect("FxRunLocomotives", this) && !FindObject(Find_ID(Locomotive)))
|
||||
CreateEffect(FxRunLocomotives, 100, 36, this);
|
||||
CreateEffect(FxRunLocomotives, 100, 36, this);
|
||||
switch->ControlSwitchDir(nil, -1);
|
||||
}
|
||||
_inherited(operator, switch, right, ...);
|
||||
|
@ -85,6 +85,11 @@ local FxCheckLocomotive = new Effect
|
|||
Target->RemoveObject();
|
||||
return FX_Execute_Kill;
|
||||
}
|
||||
if (time > this.time_allowed)
|
||||
{
|
||||
Target->FadeOut(18, true);
|
||||
return FX_Execute_Kill;
|
||||
}
|
||||
return FX_OK;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue