Merge pull request #1397 from Krausus/GarbageCollectorWasGarbage

Garbage Collector Fixes/Tweaks/Cleanup/Documenting
This commit is contained in:
Fox-McCloud
2015-06-28 06:36:04 -04:00
19 changed files with 444 additions and 285 deletions
@@ -33,7 +33,7 @@
/datum/event/brand_intelligence/tick()
if(!originMachine || originMachine.gc_destroyed || originMachine.shut_up || originMachine.wires.IsAllCut()) //if the original vending machine is missing or has it's voice switch flipped
if(!originMachine || !isnull(originMachine.gcDestroyed) || originMachine.shut_up || originMachine.wires.IsAllCut()) //if the original vending machine is missing or has it's voice switch flipped
for(var/obj/machinery/vending/saved in infectedMachines)
saved.shoot_inventory = 0
if(originMachine)
@@ -44,7 +44,7 @@
if(!vendingMachines.len) //if every machine is infected
for(var/obj/machinery/vending/upriser in infectedMachines)
if(prob(70) && !upriser.gc_destroyed)
if(prob(70) && isnull(upriser.gcDestroyed))
var/mob/living/simple_animal/hostile/mimic/copy/M = new(upriser.loc, upriser, null, 1) // it will delete upriser on creation and override any machine checks
M.faction = list("profit")
M.speak = rampant_speeches.Copy()