Commit Graph

7166 Commits

Author SHA1 Message Date
Cheridan 4521b3f882 Merge branch 'master' of https://github.com/tgstation/-tg-station 2013-09-17 21:38:31 -05:00
supersayu a993ce62db Bugfixen and minor changes. Fixes #136.
Adjusts the click code to not use client/Click().  The code is largely unchanged, except that it allows the compiler default behaviour of calling atom/Click(), and then forwards the call to mob/ClickOn().  I had some reports that melee combat mixed with movement was behaving oddly, and I believe it may be due to the use of client/Click; the byond documentation says that redefining client/Click() causes additional overhead, and it isn't strictly necessary.

Alters the way double clicks are handled, in an attempt to better handle clickspam, as often occurs during pitched combat.  This may also be responsible for the above, but I don't know.

Inserts proximity (aka flag) checks in all afterattack() procs.  The old assumption was that unless an item used the USEDELAY flag, afterattack() was only called when adjacent, but this is no longer true.  This led to beakers, soap, crayons, etc, all being usable at all ranges.

Removes the NODELAY flag, which was unused.  Removes all existing uses of the USEDELAY flag so that it can be readded to things that need extra delay.

Removes the hand_* procs, previously used by restrained actions.  Instead, the mob helper mob/RestrainedClickOn() has abosrbed basically all the functionality they were used for, which is really only monkeys with jungle fever.

Adds a special case of the Adjacency() proc for doors.  This fixes #136, airlocks being unreachable due to border fire doors.  However, this only takes us back to the unpleasant position where you have to open-hand the door, switch to a crowbar, and pry open the firedoor; it still needs a better fix.
2013-09-17 18:19:14 -04:00
supersayu 0aa3ce39e4 Bugfixen
Modifies Adjacent() for items, to allow items to be accessed properly inside each other and the user.  This fixes a few bugs seen in testing.
Sets a maximum telekinesis range (in case you were using cameras).

The telekinetic grab now does nothing at all in melee combat.  This prevents double messages where you attack them with the object telekinetically, and then also attack them with the telekinetic grab.

Crayons had a bug where they were drawing at all distances.  This is because in old click code, afterattack() only happened at range when you had the USE_DELAY flag, which is no longer true.  Proper behavior is to use parameter 3 (proximity_flag), which is 1 when adjacent or 0 if inaccessible.
2013-09-17 18:19:10 -04:00
supersayu c172e52dce Adds telekinesis to click code. Fixes issue #1202, #1129, #247.
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.
2013-09-17 18:19:09 -04: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
Cheridan 2ee9e23ea9 Initial Event Rework
Adds anomalies, special effects which tie into the event system.

Ports bholes into an anomaly, cleans up their code.
Adds new gravitational anomalies. Imagine a trampoline.
Flux event is now an anomaly.
Adds a new pyro anomaly.
2013-09-17 15:46:00 -05:00
VistaPOWA 881a895bd6 removes extra unused code 2013-09-17 18:03:01 +02:00
VistaPOWA 5a2bb3fbf7 Finalizing blood trails
Makes trail_holder a child of cleanables instead of blood (this is to
allow add_blood turf proc to spawn blood splatter on blood trails, also
other kinds of blood effects), also cleaned up the blood code a bit.

Big props to Aranclanos, Cheridan, Pewtershmitz and all other coders on
#coderbus for making this happen.
2013-09-17 00:57:37 +02:00
Malkevin e897968596 Merge branch 'master' of https://github.com/tgstation/-tg-station into sechailer 2013-09-14 22:48:55 +01:00
Malkevin eb67e97155 Sec hailer mask ** NOT READY **
**** 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
2013-09-14 22:47:50 +01:00
Pete Goodfellow 3cf60df02d Merge pull request #1334 from Malkevin/cargoexilimps
Cargo Bay: Exile Implants
2013-09-14 07:22:10 -07:00
Ergovisavi 439aec7b50 Merge remote-tracking branch 'remotes/upstream/master' into dualsaberreflectmerge
Conflicts:
	code/game/objects/items/weapons/twohanded.dm
2013-09-12 18:02:15 -07:00
VistaPOWA 1da8b659ff blood trails now stack
--DO NOT MERGE STILL WIP--
Makes blood trails use overlays, the overlays are contained in a holder
object. DNA is now properly added to them.

todo: redo light, xeno light and xeno heavy trails. help of spriters is
welcome.
2013-09-12 19:25:21 +02:00
Malkevin 8b90f8a92c Fixed the description on the new box 2013-09-12 11:12:14 +01:00
Aranclanos 95bfb86226 Merge pull request #1280 from Ergovisavi/improvexplosive
Adds createable Improvised Explosives!
2013-09-12 02:30:04 -07:00
Ergovisavi 0c33c684d0 Swaps dualsaber wielded force to 34 2013-09-11 18:39:14 -07:00
Ergovisavi fdb72fa3e7 Moves the fuel remaining in the fuel tank check around 2013-09-11 18:33:56 -07:00
Malkevin 84616d69aa Cargo Bay: Exile Implants
I forgot to add these the first time around.
2013-09-10 18:22:51 +01:00
Zelacks 1e0c23a736 Fix for laserproof vest
Passes the hit zone down to the reflect check
Creates a check for where the projectile hit in laserproof vest
If does not target the chest or groin the reflect chance is halved
2013-09-09 16:58:49 +08:00
Ergovisavi a224d36dd3 Ups the required fuel for improvised explosives to 50 units. 2013-09-09 01:50:01 -07:00
Ergovisavi 0a73de0e41 Fixes the issue of being hulked after wielding a dualsaber still giving you the reflection bonus. 2013-09-09 00:03:02 -07:00
Ergovisavi c2fe5edbd9 Adds a text message when a welding fuel tank has less than 30 fuel and you try to fill an iedcasing with it
No more -amount, cable coil is properly used up.
2013-09-08 23:20:15 -07:00
Fleure 73d25c7c04 Minor atmos fixes for resin and mineral structures 2013-09-08 01:01:12 +01:00
MrPerson bd27a8a023 Merge pull request #1292 from Cheridan/master
Removes an unused var from every obj
2013-09-04 12:54:40 -07:00
Cheridan a830ba2740 Merge pull request #1282 from MrPerson/grammer
Grammar fixes
2013-09-04 10:01:31 -07:00
Cheridan 899a53787a Removes an unused var defined for every obj. 2013-09-03 09:38:30 -05:00
Ergovisavi 926f809f3f removed redundant ..() from ghettobomb.dm 2013-09-02 15:30:27 -07:00
VistaPOWA 214ae08073 Adds directional blood trails
The blood trails now follow the path the body has taken and players can
very easily make out said path.
Heavily damaged corpses will have a much thicker blood trail than
corpses with some brute damage. At the moment, trails overwrite
eachother and a placeholder icon set is used for alien heavy blood
trails.
2013-09-03 00:03:01 +02:00
Ergovisavi ea20a2b646 Overhauls this entire pull
All item/obj now have the var reflect_chance which based on a prob check, determines if an object will reflect energy projectiles while in the wear_suit, l_hand or r_hand slots, a reflect_chance of 100 will always cause the player to reflect, 0 (Base of every object besides the ablative armor) will never reflect. Objects are reflected like ablative currently does.

modifies the bullet_act of humans to incorporate this new system
gives the ablative armor the same chance to reflect it had before
gives dualsabers if wielded and the user is not a hulk a 100% chance to reflect energy projectiles
adds specific wield() and unwield() to dualsabers in order to add check if hulk
2013-09-02 12:18:50 -07:00
VistaPOWA aee35c6c08 Removed unneeded 'this's 2013-09-02 13:20:02 +02:00
VistaPOWA 761731c27a Merge git://github.com/tgstation/-tg-station into critter_crates
Conflicts:
	icons/obj/storage.dmi
2013-09-02 13:18:15 +02:00
MrPerson 2780149353 Merge pull request #1279 from Neerti/9-1-2013-adding_replica_spesshelmet_arcade
Replaces arcade replica suit prize with a box containing a replica suit & helmet
2013-09-02 04:00:22 -07:00
Robson Richards c00c820610 Changes fireaxe to deal 24 damage instead of 25 2013-09-02 03:18:05 +01:00
Robson Richards c76f490200 Merge branch 'master' of https://github.com/tgstation/-tg-station into 29/08/2013-TwoHanded-Weapon-Buffs 2013-09-02 03:16:40 +01:00
Aranclanos 9f1803aae4 Merge pull request #1270 from caelaislinn/terbs_weekly_fun
Terbs weekly fun #2: Laser pointers
2013-09-01 17:55:49 -07:00
Aranclanos c96b51bf99 Merge pull request #1263 from Cheridan/Offhands
Offhand IsShield
2013-09-01 17:52:50 -07:00
Ergovisavi 9125c53028 Improvements on improvised explosives
They now have a random hidden detonation time that ranges from 3 to 8 seconds
They now can be made from any can, and will have a different appearance based on each one

-They look goofy if you try to spawn them in with admin commands (they have no soda can to reference, so the can is invisible in the sprite) but are completely functional otherwise

Modifies reagent_containers/food/drinks in order to move all canned drinks to the food/drinks/soda_cans to bunch them all up so they are easily worked into the IED

Modifies machinery/vending due to the abovementioned moving of canned drinks from food/drinks to food/drinks/soda_cans

Modifies the map because of the above to fix filepath issues

And of course adds weapons/grenades/ghettobomb.dm for the bulk of the IED, and modifies grenade.dmi for the sprites
2013-09-01 09:18:28 -07:00
MrPerson eaf201bd1c Grammer fixes
You put the the pen into the box ( Fixes #671 )
Capitalization errors on spiders and cocoons. ( Fixes #679 )
2013-09-01 01:40:50 -07:00
Neerti cedfa6415e Fixed a typo in the box's description, thanks Kaze. 2013-09-01 03:56:36 -04:00
Ergovisavi 9d1684b597 Add createable Improvised Explosives! 2013-08-31 22:39:45 -07:00
Neerti d104cd1c3e Made it so instead of getting the suit or a helmet, you will receive both inside a box that looks very similar to the one you get for ordering a real suit from an uplink. 2013-09-01 01:01:53 -04:00
Cael_Aislinn 35f5fbf17e adds laser pointer, makes RD + lawyer + librarian spawn with one, makes laser pointer a steal objective
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
2013-09-01 13:42:28 +10:00
Aranclanos 9e37b95ad6 Merge pull request #1268 from fleure/master
Added empty line between "Update PDA Info" and time
2013-08-31 09:45:41 -07:00
Cheridan 214160aac8 Merge pull request #1255 from Intigracy/WhatAGag
What a gag!
2013-08-31 08:43:40 -07:00
Fleure cb7b0f9be1 Added empty line between "Update PDA Info" and time 2013-08-30 20:35:16 +01:00
VistaPOWA 6e83288a78 Bunch of fixes
Cleans up the resist code for lockers
Adds both locked and broken vars to closets
Fixes secure lockers opening when welded, but not locked
2013-08-30 19:59:23 +02:00
Robson Richards 5b62a22f0f Tweaks Damage Values 2013-08-30 03:55:17 +01:00
Cheridan 70966883b9 Twohanded weapon's offhand item will count as a shield if the weapon itself is a shield. 2013-08-29 21:21:10 -05:00
Robson Richards 086187ac3c Increases the damage of Two handed weapons
to give them more of an advantage over One handed ones, Suggestion and Exact damage values originally from http://www.ss13.eu/phpbb/viewtopic.php?f=10&t=1303

Balance issues and Damage value Discussion can happen here: http://www.ss13.eu/phpbb/viewtopic.php?f=12&t=1440
2013-08-29 21:58:56 +01:00
Intigracy f7c644c9dc Adds gags!
50% chance of getting either a gag or a blindfold with the maid and nyangirl outfits in the theater

Monkeys have a sprite too.
2013-08-29 12:19:34 -07:00