mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-28 06:26:29 +01:00
Fixes robot modules not regenerating
- Also added a type check
This commit is contained in:
@@ -34,8 +34,11 @@
|
||||
if(!stacktypes || !stacktypes.len) return
|
||||
|
||||
for(var/T in stacktypes)
|
||||
var/O = locate(T) in src.modules
|
||||
var/obj/item/stack/S = O
|
||||
var/obj/item/stack/S
|
||||
for(var/obj/O in src.modules)
|
||||
if(O.type == T)
|
||||
S = O
|
||||
continue
|
||||
|
||||
if(!S)
|
||||
src.modules -= null
|
||||
@@ -43,6 +46,9 @@
|
||||
src.modules |= S
|
||||
S.amount = 1
|
||||
|
||||
if(!istype(S))
|
||||
continue
|
||||
|
||||
if(S && S.amount < stacktypes[T])
|
||||
S.amount++
|
||||
|
||||
|
||||
Reference in New Issue
Block a user