mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Optimize a couple things
This commit is contained in:
@@ -111,8 +111,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
|
||||
|
||||
shuffle_inplace(blobs_to_affect)
|
||||
|
||||
for(var/L in blobs_to_affect)
|
||||
var/obj/structure/blob/B = L
|
||||
for(var/obj/structure/blob/B as anything in blobs_to_affect)
|
||||
if(B.faction != faction)
|
||||
continue
|
||||
|
||||
|
||||
@@ -197,8 +197,7 @@ var/list/blob_cores = list()
|
||||
if(!difficulty_threshold)
|
||||
return
|
||||
var/list/valid_types = list()
|
||||
for(var/thing in subtypesof(/datum/blob_type))
|
||||
var/datum/blob_type/BT = thing
|
||||
for(var/datum/blob_type/BT as anything in subtypesof(/datum/blob_type))
|
||||
if(initial(BT.difficulty) > difficulty_threshold) // Too hard.
|
||||
continue
|
||||
if(initial(BT.difficulty) < difficulty_floor) // Too easy.
|
||||
|
||||
@@ -57,14 +57,12 @@ var/list/overminds = list()
|
||||
return ..(newloc)
|
||||
|
||||
/mob/observer/blob/Destroy()
|
||||
for(var/BL in GLOB.all_blobs)
|
||||
var/obj/structure/blob/B = BL
|
||||
for(var/obj/structure/blob/B as anything in GLOB.all_blobs)
|
||||
if(B && B.overmind == src)
|
||||
B.overmind = null
|
||||
B.update_icon() //reset anything that was ours
|
||||
|
||||
for(var/BLO in blob_mobs)
|
||||
var/mob/living/simple_mob/blob/spore/BM = BLO
|
||||
for(var/mob/living/simple_mob/blob/spore/BM as anything in blob_mobs)
|
||||
if(BM)
|
||||
BM.overmind = null
|
||||
BM.update_icons()
|
||||
|
||||
@@ -34,8 +34,7 @@
|
||||
if(!istype(C, /obj/structure/blob/core) && !istype(C, /obj/structure/blob/node) && C.overmind && (C.overmind == B.overmind) ) //if it doesn't have the same 'ownership' or is a core or node, don't split damage to it
|
||||
blobs_to_hurt += C
|
||||
|
||||
for(var/thing in blobs_to_hurt)
|
||||
var/obj/structure/blob/C = thing
|
||||
for(var/obj/structure/blob/C as anything in blobs_to_hurt)
|
||||
if(C == B)
|
||||
continue // We'll damage this later.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user