Commit Graph

39 Commits

Author SHA1 Message Date
YPOQ
51bdfae73b Stops AIs from taking actions while depowered (#30723)
* Stops AIs from taking actions while depowered

* add spans
2017-09-16 17:06:32 -04:00
Cyberboss
9e1ef0ffe2 Global variable wrappers (#25325)
* Add the system for managed global variables

* Travis ban old globals

* So you CAN inline proccall, that's neat

* Fix that

* master.dm

* Remove the hack procs

* Move InitGlobals to the proper spot

* configuration.dm

* Fix the missing pre-slash

* clockcult.dm

* This is probably for the best

* Doy

* Fix shit

* Rest of the DEFINES tree

* Fix

* Use global. for access

* Update find_references_in_globals

Always hated that proc

Whoever made it must've bee a r e a l idiot...

* __HELPERS tree

* Move global initialization to master.

Fix the declaration

* database.dm

* Dat newline

* I said DECLARATIVE order!

* Here's something you can chew on @Iamgoofball

* game_modes.dm

* Fix this

* genetics.dm

* flavor_misc.dm

* More stuff

* Do it mso's way. Keep the controllers as global

* Make master actually see it

* Fix

* Finish _globalvars/lists

* Finish the rest of the _globalvars tree

* This is weird

* Migrate the controllers

* SLOTH -> GLOB

* Lighting globals

* round_start_time -> ticker

* PAI card list -> pai SS

* record_id_num -> static

* Diseases list -> SSdisease

* More disease globals to the SS

* More disease stuff

* Emote list

* Better and better

* Bluh

* So much stuff

* Ahh

* Wires

* dview

* station_areas

* Teleportlocs

* blood_splatter_icons

* Stuff and such

* More stuff

* RAD IO

* More stuff and such

* Blob shit

* Changeling stuff

* Add "Balance" to changelogs

* Balance for changelog compiler + Auto Tagging

* Update the PR template

* hivemind_bank

* Bip

* sacrificed

* Good shit

* Better define

* More cult shit

* Devil shit

* Gang shit

* > borers

Fix shit

* Rename the define

* Nuke

* Objectives

* Sandbox

* Multiverse sword

* Announce systems

* Stuff and such

* TC con

* Airlock

* doppllllerrrrrr

* holopads

* Shut up byond you inconsistent fuck

* Sneaky fuck

* Burp

* Bip

* Fixnshit

* Port without regard

* askdlfjs;

* asdfjasoidojfi

* Protected globals and more

* SO MANY

* ajsimkvahsaoisd

* akfdsiaopwimfeoiwafaw

* gsdfigjosidjfgiosdg

* AHHHHHHHHHHHHHHHHHHHHHHH!!!!!

* facerolll

* ASDFASDFASDF

* Removes the unused parts of dmm_suite

* WIP

* Fix quote

* asdfjauwfnkjs

* afwlunhskjfda

* asfjlaiwuefhaf

* SO CLOSE

* wwwweeeeeewwwww

* agdgmoewranwg

* HOLY MOTHER OF FUCK AND THATS JUST HALF THE JOB?!?

* Fix syntax errors

* 100 errors

* Another 100

* So many...

* Ugh

* More shit

* kilme

* Stuuuuuufffff

* ajrgmrlshio;djfa;sdkl

* jkbhkhjbmjvjmh

* soi soi soi

* butt

* TODAY WE LEARNED THAT GLOBAL AND STATIC ARE THE EXACT SAME FUCKING THING

* lllllllllllllllllllllllllllllllllllllllllll

* afsdijfiawhnflnjhnwsdfs

* yugykihlugk,kj

* time to go

* STUFFF!!!

* AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!

* ngoaijdjlfkamsdlkf

* Break time

* aufjsdklfalsjfi

* CONTROL KAY AND PRAY

* IT COMPILEELEELELAKLJFKLDAFJLKFDJLADKJHFLJKAJGAHIEJALDFJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

* Goteem

* Fix testing mode

* This does not belong in this PR

* Convert it to a controller

* Eh, fuck this option

* Revert controllerization Ill do it some other time

* Fix

* Working controllerization

* FOR THE LOVE OF CHRIST PROTECT THE LOGS

* Protect admins and deadmins

* Use the inbuilt proc
2017-04-06 23:26:13 -06:00
Shadowlight213
50fb9367f4 Changed to use REALTIMEOFDAY 2017-04-03 11:19:48 -07:00
Shadowlight213
149a35a25b Makes the cheat notification only get relayed once every 9 seconds. 2017-04-01 12:20:46 -07:00
Kyle Spier-Swenson
dedf2db2d7 fixes false positives on ai click cheat check message
We just confirm the turf actually has a static overlay

How simple is that?
2017-02-28 12:59:32 -08:00
Leo
3e226075e1 AI cards will no longer trigger a failed checkTurfVis message for admins (#24012)
* AI cards will no longer trigger a failed checkTurfVis message

* Moves check to  block
2017-02-13 08:51:02 +01:00
Cyberboss
98768bb965 Fixes an AI click runtime 2017-02-03 10:25:56 -05:00
AnturK
e6169e8d42 Minor AI fixes. (#23105)
* Fixes #20469

* Fixes #9062 again.

* Fixes #10283
Laws above 20 will replace laws of same or lower importance.
2017-01-26 19:40:45 -06:00
Kyle Spier-Swenson
2ed26127f3 Lets reset the toggle before we block 2017-01-02 23:01:51 -08:00
Joan Lung
9802d73995 Fixes a bug where malf ai apcs could be interacted with by normal ais 2016-12-08 19:37:42 -05:00
Kyle Spier-Swenson
5072f12977 [s]fixes ai turf click admin spam (#21957)
* fixes ai turf click spam

get_turf_pixel returns null if handed anything that's not a movable. I could istype it before I call that, but this looks cooler and it's about the same result since get_turf_pixel already istypes it.

* Does proper checks.

Clicks on static count as a click on the turf it's covering, and ais are supposed to be allowed to click on static to center their screen on that turf. so have to only count clicks on objects/mobs.
2016-12-07 09:44:33 +13:00
Pieter Vlasblom
1fa7bd106e Prevent AI players from clicking on hidden turfs by modifying their client. (#21912) 2016-12-04 18:36:17 +01:00
paprika
28a8387b17 initial commit 2016-05-07 14:39:17 -07:00
AnturK
77ee2ded62 Renames click intercept method to avoid collision with ClickOn 2016-02-20 15:39:14 +01:00
AnturK
e93fbcd2a0 Cleanup 2016-02-10 16:30:43 +01:00
AnturK
a1583f24ae Buildmode Refactor
Adds generic click intercept to clients
2016-02-10 16:29:47 +01:00
Bjorn Neergaard
014e83fec6 Fix tgui machine interactions status checks 2016-01-25 12:03:02 -06:00
Firecage
4688c2c969 Fixes proc arguments 2015-07-15 23:52:35 +02:00
GunHog
d3fbacc224 Tweaks
- Sorts out the transfer_ai() proc, it can now be added to practically
anything you wanted to give to an AI.

- Moved mech functions to the unused middle click.
2015-06-08 20:46:01 -05:00
GunHog
365d9889ac Malf AI Mech Jacking!
- Malf AI, for 30 CPU, can hack into a mech and gain control of it.
- This strategy is permanent. Once installed, there is no escape.
Period. The mech dies, so does the AI.
2015-04-14 16:46:15 -05:00
Matt Smith
15f01d3dfc File restructure
No functional changes. Just moving the declarations of functions around.
I may be wrong in this, IE I don't know if declaration order matters in this, if it does, just reject my PR. Otherwise accepting it, would be good to help newbie coders to understand code flow a little easier.
2014-12-27 22:08:25 +00:00
tkdrg
4ef217cfb3 Fixes AI shortcuts skipping turret sanity checks 2014-11-18 16:25:10 -03:00
GunHog
589c1f4cbb Botcall, TG edition! 2014-09-25 09:44:41 -05:00
ikarrus
e6cbd27adb Removed usability checks 2014-08-18 21:34:05 -06:00
ikarrus
b5ff2d1edd Prints for AI shortcuts. AI shortcuts will also no longer be able to circumvent restrictions on usage. 2014-08-16 13:10:47 -06: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
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
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
636d4d34ae Add access override hotkey control+shift to ai
Also adds framework for control+shift click capturing to _onclick, can be used by most atoms
2014-03-27 21:12:44 -07:00
ikarrus
8913ed63c0 -Added a span at pete's request
-Blocked the AI from using shortcuts to interact with emagged doors
-Blocked people from closing an emagged windoor
-Blocked a few other operations from opening/closing emagged doors
-Forcing a door open with a crowbar/axe won't cause it to use power or play a sound
2014-03-17 09:43:36 -06:00
Aranclanos
2c9d7ef4e0 AIs inside of intellicards will no longer be able to use their hotkeys while their wireless is disabled.
Fixes issue 2357
2014-01-15 19:26:59 -03:00
Giacomand
1bf07a3065 * The AI can now use alt click to get a list of objects and the turf for easy access.
* The AI can interact with all the items in the list.
* The AI can use this for several things:
 * Since the list will not dissappear for the AI, until there's no camera coverage, they can use it to bookmark a single tile to interact while not having to look at it.
 * They can also use this to quickly jump to the listed turf.
 * They can interact with objects under other objects.
* Made the CTRL Click on the APC directly use the toggle_breaker() proc.
2013-10-14 17:23:53 +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
AndroidSFV
93497b4c3f Expansion of AI Photography. AI can now target which turf is the center of the picture taken. Other fixes included. 2013-10-01 23:10:38 -05:00
supersayu
61c7595489 Re-adds buildmode to ghosts
Also makes buildmode more consistent for AI
2013-09-22 20:06:52 -04: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
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