Merge pull request 'add whistle to train' (#38) from whitleandstats into main
Reviewed-on: #38
This commit was merged in pull request #38.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
extends Path3D
|
||||
|
||||
const STEAM_DISTANCE_STAT: String = "stat_distance_km"
|
||||
const STEAM_DISTANCE_KM_PER_UNIT: float = 1#0.001
|
||||
const DISTANCE_KM_PER_UNIT: float = 0.001
|
||||
|
||||
@export_group("Train")
|
||||
##train speed
|
||||
@@ -402,7 +402,7 @@ func _track_steam_distance(distance_units: float) -> void:
|
||||
if not SteamManager.is_on_steam:
|
||||
return
|
||||
|
||||
_pending_steam_distance_km += distance_units * STEAM_DISTANCE_KM_PER_UNIT
|
||||
_pending_steam_distance_km += distance_units * DISTANCE_KM_PER_UNIT
|
||||
var whole_km: int = int(floor(_pending_steam_distance_km))
|
||||
if whole_km <= 0:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user