Merge pull request #12846 from VOREStation/upstream-merge-8577

[MIRROR] Vehicle Runtime Fix
This commit is contained in:
Casey
2022-04-27 16:27:39 -04:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -129,6 +129,8 @@
/obj/vehicle/train/engine/turn_on()
if(!key)
return
if(!cell)
return
else
..()
update_stats()
@@ -230,7 +232,9 @@
if (on)
to_chat(usr, "You start [src]'s engine.")
else
if(cell.charge < charge_use)
if(!cell)
to_chat(usr, "[src] doesn't appear to have a power cell!")
else if(cell.charge < charge_use)
to_chat(usr, "[src] is out of power.")
else
to_chat(usr, "[src]'s engine won't start.")

View File

@@ -193,6 +193,8 @@
/obj/vehicle/proc/turn_on()
if(!mechanical || stat)
return FALSE
if(!cell)
return FALSE
if(powered && cell.charge < charge_use)
return FALSE
on = 1