Commit Graph

20 Commits

Author SHA1 Message Date
Firecage
6c7af5eb32 SPANCLASSES!!!!! 2014-08-26 09:52:13 +02:00
ikarrus
4905beb67e Removes hacky code in favour of a process() check for the nuke disk's location
Instead of having a lot of hacky checks to prevent the disk from leaving the Z-level, it will be checked periodically by process() if Z > 2
2014-05-30 22:01:20 -06:00
Kyrah Abattoir
997e1310c5 More name fixing, lowercasing objects, proper-ing unique objects, plural-ing some stuff that needs it. 2014-05-01 23:07:35 +02:00
MrPerson
41042d5efd Small rewrite of crematorium and morgue so they work right.
Only issue is that the damn things don't GC. Also lots of duplicate code between the two, still some other shittiness, but this is much better. I really just wanted to fix the bug where after usage you can't use em again until the tray gets deleted rather than GC'd.
On the plus side, they don't constantly make and delete trays every time someone opens them.

Also, and this is important, I uncommented the crematorium usage logging. It didn't runtime in testing so it should be good to go.
2014-03-24 04:01:27 -07:00
MrPerson
3c58091437 Merge branch 'master' of https://github.com/tgstation/-tg-station into qdel
Hopefully nothing went wrong but you never know.

Conflicts:
	code/FEA/FEA_fire.dm
	code/controllers/supply_shuttle.dm
	code/game/gamemodes/changeling/changeling_powers.dm
	code/game/machinery/autolathe.dm
	code/game/machinery/drying_rack.dm
	code/modules/hydroponics/hydroponics.dm
	code/modules/projectiles/projectile/magic.dm
	code/modules/reagents/Chemistry-Recipes.dm
	code/modules/reagents/reagent_dispenser.dm
2014-03-02 21:39:27 -08:00
ChuckTheSheep
fd8cd6ebc3 Fixes Speaking, Whoops 2014-02-25 13:38:06 -05: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
ChuckTheSheep
d3b9ec2271 Fixes an oversight in my slab code
Initial code now works as intended, did not realize the recursive mob
check was looking for clients, now it looks for any mobs.
2014-02-23 17:33:13 -05:00
ChuckTheSheep
8e050332d6 Cleans up the for() and list handling in update. 2014-01-08 18:12:17 -05:00
ChuckTheSheep
1d7858d54f Fixes regarding path case 2014-01-06 18:01:28 -05:00
ChuckTheSheep
e97ce3edfa Moved on_login() now named on_log() 2014-01-05 20:49:36 -05:00
ChuckTheSheep
072b78876f Merge branch 'Morgue-Changes' of https://github.com/ChuckTheSheep/-tg-station into Morgue-Changes 2014-01-05 20:36:10 -05:00
ChuckTheSheep
5cda0c140e Forgot Crematorium Changes - Whoops 2014-01-05 20:35:57 -05:00
ChuckTheSheep
d1eb240c33 Whoops 2014-01-04 21:22:31 -05:00
ChuckTheSheep
9bff642d14 Genocide of the Colons 2014-01-04 21:21:42 -05:00
ChuckTheSheep
f03d2be397 Morgue Changes
Crematorium lights up when cooking.
Morgue slabs change light color depending on what is inside.
Red = dead body, orange = no body but items, green = client connected
body.
Updates when open or closed, and when ghosts/re-enters body inside.
2014-01-04 19:50:13 -05:00
Razharas
1ce0b11b0d Fixes morgue trays used by ghosts and what not 2013-12-19 00:23:36 +04:00
Fleure
aaf68d2a12 Included additional structures to escape from 2013-11-05 00:26:30 +00:00
supersayu
475042a212 Click code rework
Fixes #646, #579, #863

Completely redoes the click code.  Moves all click related code into code/_onclick for reference.  Also moves hud datum code and all the screen object code I could find into code/_onclick/hud, as it is related.  Item attack(), attackby(), afterattack(), and attack_self() have been moved into item_attack.dm for consistency.

Completely removes dummy objects and adds atom.Adjacent(user).  This proc checks for border items and anything marked with throwpass for determining whether or not you can reach a given square.  A turf helper, ClickCross(), was added to facilitate this.

Removes the monolithic Atom.Click() proc in favor of an overridable click handler attached to mobs.  Click code no longer uses the : path operator as a consequence, and mob/lastDblClick has been moved to Client/next_click.  A few end arounds were necessary (screen objects, buildmode, and spells), but this has been handled by repurposing Atom.Click(); if you have special click code, insert it in the object's Click() function and return 1 to prevent normal processing.

This update adds support for attack_ghost(); the previous "new" click handler had support for it but was never finished.  I have taken the liberty of letting ghosts click portals, the gateway, and the teleporter to jump to the intended target square, and kept the previous default action of examine()ing every damn thing you click.  It is to be suggested that you could do more with this proc when ghost interactions are enabled.

This update also adds support for double clicking.  It is currently only used for ghosts and AIs, because the original (first) click still registers normally.  For both of these, double clicking a square will jump you to it, and double clicking a mob will follow it.  In the case of ghosts, double clicking bots and the singularity will also set you following it; if you double click your own corpse, you will re-enter it; this also works if your body is in a closet, sleeper, DNA scanner, etc.  Default mobs ignore double clicks as normal.

-- NOTE --

There are two flags which were previously unused or misused by click code: USEDELAY and NODELAY.  Ostensibly, USEDELAY would double the normal 1sec delay, and NODELAY would remove it.

Using either of these flags as intended would significantly affect the timing of the game.  In particular, USEDELAY is currently applied to guns and about everything else that acts at range.  I am adding USEDELAY as a half-second increase for now, but I have not put a significant amount of thought into it.  I considered lowering the normal 1sec delay to .8sec to balance it, but the consequences of that on combat involve more calculations than I care to make.

NODELAY seems to never have been used, and I did not implement it, but I could do so trivially.
2013-09-17 18:15:54 -04:00
johnsonmt88@gmail.com
867b21c7ce File restructuring!
This brings down a bunch of defines from /code/defines/obj.dm unto their appropriate files.

I've moved morgue.dm from game/machinery into game/objects/structures since that file contains no machines.

I've reorganized the objects/items/stacks folder and made a 'sheets' and 'tiles' folder to keep things separate

I've separated stool_chair_bed.dm into its own folder which now contains the files: stools.dm, chairs.dm, bed.dm and alien_nests.dm to make it a little easier to go through.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4582 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-29 18:00:30 +00:00