Commit Graph

24 Commits

Author SHA1 Message Date
phil235
4d2c6b8e24 Cyborgs can no longer activate the object in their active module when incapacitated. They also can't change their sensor mode (sechud, etc...) while incapacitated.
Fixes Wizard apprentice not being able to use soulstones.
2016-02-29 23:09:13 +01:00
AnturK
77ee2ded62 Renames click intercept method to avoid collision with ClickOn 2016-02-20 15:39:14 +01:00
AnturK
a1583f24ae Buildmode Refactor
Adds generic click intercept to clients
2016-02-10 16:29:47 +01:00
Firecage
4688c2c969 Fixes proc arguments 2015-07-15 23:52:35 +02:00
Remie Richards
5fc7af7fbf attackby() now has an argument containing the parameters of the click that called it. Items placed on tables now center their icon where the user clicked. this is NOT true for racks, since racks look organised in their sprite.
Items reset their pixel_x and pixel_y values on pickup.
2015-02-19 13:02:43 +00:00
AndroidSFV
fad2bb1244 Fully implemented AI photography, with HUD! 2014-07-30 15:21:30 -05:00
Miauw
658c753989 Revert "Merge pull request #3218 from AndroidSFV/aiphotoext2"
This reverts commit f2d850ee25, reversing
changes made to 805e2570bf.
2014-04-21 18:59:58 +02:00
AndroidSFV
50cd395c4f Merge branch 'master' of https://github.com/tgstation/-tg-station into aiphotoext2
Conflicts:
	code/datums/wires/robot.dm
	html/changelog.html
2014-04-08 09:28:42 -05:00
Cheridan
302f2ea122 Merge pull request #3215 from MrStonedOne/silicon-macros-and-hotkeys
Gives cyborgs ai click shortcuts, adds some click shortcuts, and gives borgs more meaningful hotkeys
2014-04-01 01:27:39 -05:00
AndroidSFV
40119ada0c AI Photography Extention #2
Gives the ability to take and view photo to Cyborgs

AI's share their photo album with connected Cyborgs, and connected Cyborgs have the pictures they take saved to the AI's album. If a Cyborg is not connected to an AI, photos are saved to the Cyborg's camera object. If a Cyborg has photos in it's album while not connected to an AI, but is subsequently connected to an AI, the photos are added to the AI's album. This is initiated by pulsing the appropriate wire on the borg.

Cyborgs can attach images to newscaster feeds, from the active album available to it (the AI's, or its own if disconnected)

Cyborgs cannot interact with photocopiers, but however have become a moving printer. They are every inefficent at printing, and thus can only print two color pictures before needing to be refilled with toner (simply click on them with toner in active hand).

Added some span classes to the previous AI photography work.

One minor bug fix to photocopier which could result in a photo object ending up in the 'hand' of an AI or cyborg.
2014-03-28 07:31:14 -05:00
Aranclanos
7bcb69ad88 Removes the click cooldown from almost everything, now it should be always be 0.1 seconds.
Ranged weapons and laser eyes have a cooldown of 0.4.
Grilles, windows, windoors, walls and blobs have a cooldown of 0.8.
Hitting mobs will also have a cooldown of 0.8.
Removes the unused USEDELAY flag.
2014-03-28 06:32:47 -03:00
MrStonedOne
5a6082c29f fix small typo stopping compiling. 2014-03-28 00:18:07 -07:00
MrStonedOne
a72f70de25 Gives cyborgs control+shift shortcut for access override
Gives cyborg access override shortcut control+shift click that was given to ais eariler
2014-03-27 23:36:12 -07:00
MrStonedOne
69a5e065e8 AI and cyborgs control/alt click shortcuts for turret controls.
Control click toggles turrets on/off state.
Alt click toggles turrent lethal state.
2014-03-27 23:10:21 -07:00
MrStonedOne
a2e1089c5c Give cyborgs existing ai mouse shortcuts.
Gives cyborgs existing AI control/alt/shift click shortcuts while
allowing for them to be used on non-doors/apc normally. (shift still
inspects, control still drags, etc)
2014-03-27 20:58:55 -07:00
Mloc-Hibernia
8af8a43d6f Initial pass to convert LF to CRLF
Signed-off-by: Mloc-Hibernia <colmohici@gmail.com>
2014-03-24 08:53:40 +00:00
Razharas
1f66ce4b8f Fixes borgs doing anything when dead
Fixes #2382

GODDAMN ARAN WHY YOU FIXED AIS SO FAST I ALREADY NAMED A BRANCH
APPROPRIATELY AND THEN SUGGENLY I NOTICED YOUR PR YOU RUINED EVERYTHING
ARAN OH GOD WHY YOU DO THIS TO ME ARAN WHY WHY WHY
2014-01-16 07:02:07 +04:00
Mloc-Argent
d2e8531ee5 Made cyborg middle-clicks cycle through the list of selected modules, and added some new helper procs for selected modules.
New procs:
* module_selected(module) - Checks whether the module slot specified by "module" is currently selected.
* module_active(module) - Checks whether there is a module active in the slot specified by "module".
* get_selected_module() - Returns the slot number of the currently selected module.  Returns 0 if no modules are selected.
* select_module(module) - Selects the module slot specified by "module"
* deselect_module(module) - Deselects the module slot specified by "module"
* toggle_module(module) - Toggles the selection of the module slot specified by "module".
* cycle_modules() - Cycles through the list of selected modules.

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
2013-10-08 20:15:57 +01:00
Mloc-Argent
db0a908038 Make energy weapons not get a bloody overlay and fixed alt-gr not calling AltClick()
Signed-off-by: Mloc-Argent <colmohici@gmail.com>
2013-10-08 20:15:56 +01:00
Giacomand
cbb395dc02 * Added the same for the AI and Cyborg click code. 2013-10-07 20:47:55 +01:00
supersayu
a3ba991d2f Additional comments, move some code
Should improve documentation of new and old click code
2013-09-17 19:03:22 -04: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
62f7bc11c2 Timing adjustments
attack_self use should be somewhat more standard; previously the activate object verb (and pagedown) had no delay at all.

Lowers the time taken when interacting with things on your person or in your square.
2013-09-17 18:18:34 -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