Commit Graph

8 Commits

Author SHA1 Message Date
MrPerson
d784ce8941 Remove a debug qdel() command.
Made atmos_alert computers GC (hopefully) and not runtime (known).
2014-03-03 02:49:57 -08:00
MrPerson
37525c8e40 Tweak that useless loop test. It doesn't tell me anything :( 2014-02-27 09:36:57 -08:00
MrPerson
f27d35b760 Made gibbing not look stupid.
Also some basic stuff in an attempt to get complex mobs to GC. Still doesn't work atm.
2014-02-26 23:44:19 -08:00
MrPerson
af8001d619 WOOPS TYPO 2014-02-24 18:48:58 -08:00
MrPerson
cac49a611e Make items equipped by mobs unequip themselves as part of Destroy()
Change the GC's loops to for() loops instead of while() loops. Also fixed a really stupid mistake where it would cut random shit out of the destroyed list instead of what was just processed.
Made it use world.time instead of world.timeofday to get rid of stupid midnight rollover errors.
Also there's a split between caps on var clearing and deletion checks
Moved the invisibility = 101 bit out of the GC and into atom/Destroy()
2014-02-24 16:56:34 -08:00
MrPerson
edc7cfd63a Make GC'd objects super invisible to help unreference them more.
qdel() and clear contents of things when they themselves are qdel()
Forgot to add the gc_cost to the total cost of the MC.
2014-02-23 18:07:33 -08:00
MrPerson
08a06487c0 Added a cap of 10 force del() per tick. Should maybe make this higher.
Also accidentally left testing mode on, woopsies.
2014-02-23 16:24:09 -08:00
MrPerson
9eee3e5067 First pass at a qdel() garbage collection system for tgstation
Works pretty well. If it can't GC something, it'll just del() it and be done.
Speed is amazing, holy shit.

New procs you should be aware of:
qdel(atom/movable) - sets up an object for garbage collection. Call this rather than del(atom/movable).
atom/movable/Destroy() - called right before the object is GC'd, so it still has a loc. Also called if the object is del()'d.
new controller - garbage.dm has all the details on this. Basically it nulls all references on GC'd objects and force del() them if necessary.
Generally speaking, objects should use Destroy() for behavior prior to deletion rather than Del(). You should also always call the parent so the object gets the right gc_destroyed var set.

ISSUES:
Tries to GC mobs atm. This actually works for new players, not so much for humans/monkies/simple_animals/anything. I'm guessing it needs to clear out their mind and HUD and maybe other things.
Gibbing is really bugged. It works, but the overlays just sit there for awhile and ugh. I'm very tempted just to del() mob/living and mob/camera and call it a day.
qdel() equipment doesn't unequip the item.
Pipes don't generally GC correctly. Debugging suggests they get referenced in many pipenets and that isn't cleared properly. However some do work fine. Need assistance here.
Bots don't GC, probably in the radio controller.
Lots of other shit doesn't GC but it's hard to find them because of the pipe spam.
I think I'm calling Destroy() twice by accident.
2014-02-23 14:55:12 -08:00