This adds two atom procs, attack_tk() and attack_self_tk(). attack_tk is used as per attack_hand; attack_self_tk exists on all atoms (not just items) but is similar to the item proc, but without the assumption that it is in the user's hand.
Removes the functionality where entering throw mode would create a tk grab, as it is redundant.
As a default, attack_tk does the following:
* Creates a telekinetic throw for items and un-anchored objects
* Does an attack_hand (paw, animal, etc) for anchored objects
* Does nothing to mobs
As a default, attack_self_tk does nothing. An attack_self_tk was added to closets to open and close them since that's a common thing.
The following items have added attack_tk procs:
* Fire axe cabinet, extinguisher cabinet, and bedsheet bin will drop into their square instead of putting it in your hand
* Doors only open telekinetically if they require no access
* Chairs will rotate if nobody is buckled to them
* Filing cabinets will remove a paper at random.
* Tables and racks return to prevent telehulk smash
This is INCOMPLETE. Adding proper TK interaction to everything is something best done in pieces.
In particular, interacting with mobs and items both open up the floodgates for bugs, so we/I need to decide how we want it to go before we commit, and then fix bugs along the way. Stumbling forward, fixing bugs, and then changing course halfway would be a bad idea.
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.
**** This only up for a code review, it isn't ready for merging yet, I'm waiting for the finished sprites, for now its using the standard gas mask as a placeholder ****
* Problem: People complain about sec silently stunning and cuffing them, sec complains that if they stop to ask someone to surrender they sanic off.
* Solution:
This commit creates a special security gasmask.
As well as functioning as a normal gas mask it has an integrated loud hailer which when activated (via attack self, verb, or action button (which means both hands are free (which means it'll actually get used unlike a hand-hailer))) emits a random compliance phrase, both as a sound effect and in the chat window.
You can download the sound effects here:
https://dl.dropboxusercontent.com/u/95696802/Commits/secmask/oggshq.rar
Compliance phrases are:
01. HALT! HALT! HALT! HALT!
02. Stop right there, criminal scum!
03. Freeze, Scum Bag!
04. Dead or alive you're coming with me.
05. God made today for the crooks we could not catch yesterday.
06. Don't move, Creep!
07. Down on the floor, Creep!
08. Prepare for justice!
09. Running will only increase your sentence.
10. Compliance is in your best interest
11. Stop in the name of the Law.
// Phrases past this point require the user to tamper with the device via a screwdriver
12. Stop or I'll bash you.
13. Go ahead, make my day.
14. Stop breaking the law, ass hole.
15. You have the right to shut the fuck up.
16. Shut up crime!
17. Face the wrath of the golden bolt.
18. I am, the LAW!
-Replaced the Oggs with higher quality ones, they were hard to hear in game
-Reorganised the groupings of phrases from 2 groups to three (good cop, bad cop, and shitcurity)
-Expanded the restrictor, user can now select an option to only play the good cop phrases. Also added a 'secret' way to make the mask only play shitcurity phrases
Added the finished sprites (Credit goes to Iatots for the sprites, though I did some tweaks)
Added the masks to the lockers:
-HoS has a choice between command Blue, and White
-Warden has Red
-Officers have black
-Detective, HoP, and Captain get fuck all
Moved security belts higher up the stack, having to shift through the stuff I'd end up putting in my belt all the time was just annoying.
Changed the black mask's eye covers to green, it just looked weird
Fixed several conflicts present in last pull request, should be fine
now.
All animals ordered through cargo will arrive in critter crates. These
crates are designed for the safe transport of animals. Critter crates
can only be unlocked from the outside and automatically lock when
closed. You can resist your way out of the crates. Critter crates are
counted as normal crates when sent back to CentComm.
Adds cat crate (cost: 40 points).
Corgi crate now has a 50-50% chance of either containing a male or
female corgi.
Moves critter crate sprites from storage.dmi to closet.dmi.
Removes redundant large animal crates.
*the statue's attackby has been relaxed so any item can whack it without checks
*The mimic's check for mobs from lapsed flesh to stone spells has been simplified
*The reason this check works is because when a statue runs out of time it locs its contents, so if the statue was inside something else (in this case a mimic) they end up in the mimic's contents.
*the targeting for the spell has been reworked so there's no chance of people in the same loc getting stoned instead of your intended victim. As a result of this improvement, wizards can now cast the spell on other wizards with reckless abandon
*Flesh to Stone and the Staff of Animation play nicer with each other now, no more mobs getting trapped in item mimics after escaping the statue.
*Minor tweaks to the monkey statue, which looked dumb
Fixes the grab timer; there will now be a delay between grab upgrades.
Fixes grab process so you no longer have to spam click before it disables itself. Fixes issue #577
Fixes issue #253:
Prevents grab and throw when the affected mob is buckled.
Prevents tabling a mob when that mob is buckled.
Prevents you from dropping scythes on a table or rack if there is a space vine in that square; it will now auto-attack the vine instead. Also auto-attacks vines if you click the floor under them.
*statue sprites updated from "granite" to "marble" to fix some contrast problems
*statues now get their Health from their target's current health, healthy humans and monkeys will have 200 health before shattering, corgis will have 120 health. Injured targets will make for easier to smash statues.
*likewise when a mob is unstoned it will take any damage the statue took as brute damage.
*Replaced godmode with a set of vars to assure the mob's health remains constant while a statue
*Spell renders one target (choosen from list) immobile and incapable of interaction by encasing them in a breakable statue
*Effect ends after a long while (4 minutes) if the statue remains intact
*Requires robes and has a range of 2 squares, cooldown 60 seconds
*Statue can be animated by Staff of Animation, the spell will still end at the normal time
*Currently can be used on humans, monkeys, and corgis
-Atmos Techs spawn with an analyzer in their pocket
-Added 3 analyzers to the atmos tech's wardrobe
-Added Analyzers to the autolathe.
They're a little redundant with PDAs having in built atmos analyzers but as an atmos tech I find them clunky to use for wide areas and prefer hand analyzers due to them not taking away focus. Ironically atmospherics had none of these scanners nearby.
Increased the health of secure crates by a factor of ten.
Originally I was going to null out the projectile proc and add an emp_act instead, but one already exists.
The increased health of the secure crate will allow them to still be broken open from gun fire, but will make it inconvenient enough to dissuade cargo arming up every round, hopefully... (it will take 17 buckshot or 50 lasers to break open a crate)
-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
* Edited tools.dm: Fixes "screwwy" typo in screwdriver description
* Edited paper.dm: Updates DJ station instruction sheet in light of the removal of the broadcaster and receiver from the DJ station
* Edited lib_items.dm: Fixes typo in "unwrenched" in a bookshelf deconstruction step
* Edited tgstation.2.1.2.dmm: Adds updated DJ station sheet to DJ station, replaces missing disposal pipe underneath HoP office door.
* Edited utility_closets.dm: Fixed oxygen closet description
* Edited DJ station paper to read better
-Adds service headsets to barman/botanist closets (chef doesn't get one for now since he doesn't have a closet, all his spare stuff is just placed in a crate)