mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
Fixes a runtime with cyborg stacks being initialized with no power source (#20848)
* begone runtime * refactor
This commit is contained in:
@@ -298,9 +298,12 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/proc/get_amount()
|
||||
if(is_cyborg)
|
||||
return round(source.energy / cost)
|
||||
return amount
|
||||
if(!is_cyborg)
|
||||
return amount
|
||||
|
||||
if(!source) // The energy source has not yet been initializied
|
||||
return 0
|
||||
return round(source.energy / cost)
|
||||
|
||||
/obj/item/stack/proc/get_max_amount()
|
||||
return max_amount
|
||||
|
||||
Reference in New Issue
Block a user