Fixes some runtimes related to electropacks.
Securing electropacks will no longer be required to use a helmet on it, same with dissembling the shockkit with a wrench or placing it in a chair.
Removes the atom var 'moved_recently' that was only used by electropacks (really). Now the electropack will have an inner cooldown instead.
The cooldown of the shock will be 10 seconds, giving the shocked person some small time to move in-between shocks (the shock gives you 5 of weakened).
Added the spark effect to the assembly igniter for pretty shiney sparkies.
Makes the igniter more visible thats its been used instead of the current 'fire spawns at dudes feet if in plasma', also makes them useful for creating signaler alarms - albeit massive fire hazards.
Just in time for the feature freeze, a big change that will introduce bugs! Yay!
Mob verb is called verb/examinate(target), which just calls target.examine(user) and face_atom(target)
For explanation why, see http://www.byond.com/forum/?post=1326139&page=2#comment8198716
Long story short, mob verbs are much faster than object verbs. The goal is to make right-click menus populate faster.
Also changes a bunch of examine() procs to always, ALWAYS call the parent. Except mobs, but you have 1 guess why I'm not touching them. Mostly this affects obj/item/examine().
And also remove a whole shitload of pointless set src in view(2) kind of crap. Also span classes.
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.
*TABLEPASS was already totally obsolete.
FPRINT was used, but it was on virtually everything anyway.
Removes those flags from every instance where they were used. Also assigned and removed other flags where it made sense.
If it is desired, I can revive the flag as NOFPRINT, which would retain the original functionality, though inverted. That way it would be be used only where it was intentional (holodeck items could use this for example).
Crossed() is a byond builtin which is called automatically when two movable atoms overlap (as a side effect of Move(), but not when loc or x/y/z is changed). Previously, turf/Entered() iterated through all objects in the turf in order to tell them an object had entered; with this change, HasEntered() becomes redundant and can be eliminated.
This may reduce lag when a large number of objects are moving in a small space (singularity, mining conveyors, etc) but should cause no changes to functionality at all.
The voice analyser will listen to the keyword now even when not secured
(enabling it to be directly used on grenade casings and tank transfer
valves).
Adds missing related proc to tank transfer valve.
-Turns out there was already a Gaussian PRNG proc already, used by mechs and turrets. I've replaced it with my one as mine has almost half the cost. (currently broken! still waiting for fixes to be pulled!)
-replaced between(min, val, max) with Clamp(val, min, max)
-get_turf(thing) now uses var/list/locs to locate its turf, rather than iterating up through loc of its loc of its loc...etc
-sign(num) moved to maths.dm
-InRange(val, min, max) replaced with IsInRange(val, min, max) (they were identical)
-Removed ismultitool() iswrench() iscoil() iswire() iswelder() iscrowbar() etc
-removed modulus(num) as abs() performs the same task! *roll-eyes*
-removed get_mob_with_client_list() as it is no longer needed (we have var/list/player_list now)
-removed get_turf_or_move() as it simply called get_turf
-removed get_turf_loc() as it was identical to get_turf()
*Additions:*
-The "Declare Ready" link in the lobby will automatically become "Join Game" if the round starts before you declare ready, so you don't have to click it twice
>update_mutantrace() is no more, it is now part of update_body()
>Moved a lot of stuff into update_base_icon_state(), this will allow making mutantraces modular.
Almost all icon operations are now removed from human overlays (obviously some are still required for recolouring hair and eyes). Any remaining dynamically generated overlay icons are applied individually. This will allow byond to cache them better. This will also eliminate the bug where humans are initially invisible/unclickable when you first encounter them (due to network latency where the icons are being downloaded).
>UpdateDamageIcons() renamed to update_damage_overlays(), so it has the same sort of name as the other procs
>update_icons=true or false arguments removed from human overaly-update procs, no longer required. (i.e. the update_body() update_inv_whatever etc procs do not call update_icons() - see documentation for details)
>mutantrace icon_states moved into human.dmi
>skeletons are now a mutantrace, not a mutation.
>update_icons system should now be even more efficient (thanks partly to aranclanos)
>documentation rewritten
>copypasted code moved into helper procs - super tidy code :3
Other:
>Removed compile error where the core code was reliant on compiling away mission code. >:[
>s_tone renamed to skin_tone
Modified code/modules/mob/living/carbon/human/update_icons.dm
Modified code/__DEFINES.dm
Modified code/datums/datumvars.dm
Modified code/datums/limbs.dm
Modified code/game/dna.dm
Modified code/game/gamemodes/changeling/changeling_powers.dm
Modified code/game/gamemodes/cult/cult_items.dm
Modified code/game/gamemodes/cult/runes.dm
Modified code/game/machinery/doors/airlock.dm
Modified code/game/machinery/portable_turret.dm
Modified code/game/machinery/teleporter.dm
Modified code/game/mecha/combat/combat.dm
Modified code/game/objects/items.dm
Modified code/game/objects/items/stacks/medical.dm
Modified code/game/objects/items/stacks/sheets/glass.dm
Modified code/game/objects/items/weapons/storage/bible.dm
Modified code/modules/assembly/mousetrap.dm
Modified code/modules/hydroponics/hydroitemcode.dm
Modified code/modules/mob/living/carbon/carbon.dm
Modified code/modules/mob/living/carbon/human/death.dm
Modified code/modules/mob/living/carbon/human/human.dm
Modified code/modules/mob/living/carbon/human/human_damage.dm
Modified code/modules/mob/living/carbon/human/human_defines.dm
Modified code/modules/mob/living/living.dm
Modified code/modules/mob/living/simple_animal/friendly/slime.dm
Modified code/modules/mob/mob_grab.dm
Modified code/modules/power/lighting.dm
Modified code/modules/reagents/Chemistry-Reagents.dm
Modified code/unused/_debug.dm
Modified icons/effects/genetics.dmi
Modified icons/mob/human.dmi
Modified maps/RandomZLevels/wildwest.dm
Modified tgstation.dme
Signed-off-by: carnie <elly1989@rocketmail.com>
A lot of different calls for update_inv_[slot] now won't call for update_icons.dm(). Such as dropping, throwing, picking up objects, moving objects around your gear, using your active hand, firing guns, stripping, etc.
All the different calls for UpdateDamageIcon() now they won't call for update_icons()
The different sprites of humans/monkeys will now have their own layer, humans starting with MUTANTRACE_LAYER in layer -1 to R_HAND_LAYER in layer -20, so the sprites don't get messy overlapping eachother if update_icons() is not called. To help this change, all layers numbers were changed, R_HAND_LAYER used to be 1, now it's 20. (This can be changed back if it ends up being confusing or ugly to read)
TL;RL I removed 90% of the calls for update_icons() modifying the different update procs of update_icons.dm of monkeys/humans. The goal is to reduce lag.
JUST IN CASE, lying down will call for update_icons(), so players have an easy way to update their icons if something goes horribly wrong. Which won't. I hope.
Fixes issue 842. Handcuffs sprites appearing on the player's UI if this one was handcuffed. Because I liked this we'll call it feature and add some awesome sprites made by Cheridan, you'll now have a new sprite on your UI telling you "you're handcuffed buddy!". (Also he named the sprites so don't blame me)
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5809 316c924e-a436-60f5-8080-3fe189b3f50e
- You can now send signals with signal(freq, code). Added a cooldown to limit spamming.
- You can now use "elseif" in your scripts to create a chain.
- You can now use "return" in the global scope to end the script from running.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5701 316c924e-a436-60f5-8080-3fe189b3f50e