fix: crash

This commit is contained in:
tiger tiger tiger 2026-01-24 14:16:46 +01:00
parent 6f2c278bfa
commit 6e67e083f8
1 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,10 @@ var destinations : Array[Station] = [null, null]
## Begins the scheduled traffic (looping through the list of destinations) on a given track
func _begin_traffic_loop(track: Dolly, cancel: Array) -> void:
if not track.player_on_board and fahrplan[current][track.index] == null: # empty trains dont arrive at endstation
_set_signage_texts(track.signage_group, "Gleis gesperrt")
return
if fahrplan[current][track.index] == null: # empty trains dont arrive at endstation
track.arrive(true)
_set_signage_texts(track.signage_group, "Endstation")
return