Commit Graph
59 Commits
Author SHA1 Message Date
kyunkyunkyunandGitHub b0463d3c83 Convert most spans to defines (#31080)
* spanish?

* aaaagain

* keep maptext

* Update robot_items.dm

* Update span_defines.dm

* compiles

* Update silicon_mob.dm

* compile
2025-12-13 23:55:48 +00:00
93ed0f096d Refactors AI / camera eyes and slows holopad holograms to walk speed (#25078)
* Refactor/deduplicate camera eye code

Camera Eyes previously had duplicated logic across several files. This
change uncooks the spaghetti. Additionally, half-baked support for TG's
multicam feature has been removed, as it was not functional or in use.

* lets ff now

* Camera Eye refactor fixes and finishing touches

This change completes a refactor of AI eyes, which were previously used
by xenobio consoles, syndicate and abductor camera consoles, shuttle
docking computers, holograms, and, of course, the AI. Duplicated logic
has been extracted to an abstract base mob, /mob/camera/eye, from which
new types for each of the above now derive.

Functionality is largely the same, with only a few minor cosmetic
differences (i.e. camera eyes are now appropriately named given their
type and user), as well as a quality-of-life enhancement for holograms,
slowing their movement speed to base run speed to prevent users from
accidentally zooming out of calls.

* Camera eye refactor: Fix AI acceleration toggle

The acceleration toggle was broken in the camera eye refactor, as
previously the boolean was stored on the AI rather than its eye. This
change fixes that.

* Camera eye refactor: Fix syndicate cam visibility

With the camera eye refactor, the syndicate advanced camera consoles
lost the ability to view maintenance tunnels and other areas without
active cameras, seeing static in their place instead (as all other
cameras do). This change reinstates the original behavior.

* Camera eye refactor: Convert spaces to tabs

* Camera eye refactor: Fix CRLF

* Apply suggestions from code review

General minor code quality improvements suggested by GDNgit

Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com>

* Apply suggestions from code review

Rename parameter names to avoid src accesses, remove an ambiguous and
unused mob_define and holopad range variable from a previous WIP, change
the for loop in /mob/camera/eye/relaymove to a for-to loop, and change
the chat message warning, sent when an AI Eye is created on an AI that
already has one, to a stack trace

* Adds toggle to AI commands for fast holograms

* Refactor ripped Hologram Eye relaymove

Previously, the relaymove proc for hologram eyes was redundant and
nearly impossible to read. It has been separated out into a few
different named procs, and has had its use of `spawn` removed.

* Remove unnecessary src access

* Fix bug involving shuttle placement outlines

The camera eye refactor that this commit is a part of introduced a bug
that prevented shuttle placement outlines from showing up on first use
of the shuttle console. This change fixes that bug.

* Unrevert some changes from #26306 lost in merge

* Remove erroneous free xray vision on advanced cams

* Autodoc camera acceleration vars

* Remove redundant null var initialization per code review

Co-authored-by: Drsmail <60036448+Drsmail@users.noreply.github.com>
Signed-off-by: asciodev <81930475+asciodev@users.noreply.github.com>

* Changed variables to camel_case, autodocs, cleanup

Changed a number of camera eye-related variables to camel_case style,
added appropriate autodoc comments, as per code review. Also removed an
unused cameranet function, modified the call signature of a cameranet
function to be more semantic, and changed a qdel-on-initialize in camera
eyes to return INITIALIZE_HINT_QDEL instead.

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* Remove stray qdel(src) per code review

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: asciodev <81930475+asciodev@users.noreply.github.com>

---------

Signed-off-by: asciodev <81930475+asciodev@users.noreply.github.com>
Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com>
Co-authored-by: Drsmail <60036448+Drsmail@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
2025-01-17 18:22:43 +00:00
5e7b0c0971 Changes even more uses of stat comparisons to use the defines (#26154)
* First wave

* Second wave

* Last wave

* Apply suggestions from code review

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* We love signals in this household

* Revert "We love signals in this household"

This reverts commit 75fe8d46a3.

* Update code/game/machinery/camera/tracking.dm

Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Update code/game/machinery/camera/tracking.dm

Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

---------

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
2024-07-07 22:57:01 +00:00
94681fc35f Changes AI tracking speed. (#25534)
* Massive optimisation refactor

* No doubleclick cooldown

* Huh, didn't think this worked.

* Change delay to 1.5 seconds

* Comment

* Update code/game/machinery/camera/tracking.dm

Co-authored-by: Matt <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Daylight <18598676+Daylight2@users.noreply.github.com>

---------

Signed-off-by: Daylight <18598676+Daylight2@users.noreply.github.com>
Co-authored-by: Matt <116982774+Burzah@users.noreply.github.com>
2024-06-06 19:30:39 +00:00
bad8b31afa Changes all .len to length() where applicable (#25174)
* Globals work

* Double access works

* All other things

* Revert "All other things"

This reverts commit 6574442eb6.

* More changes that compile and work

* IT WORKS AAAAAA

* Changes even more .len to length()

* Apply suggestions from code review

* Update code/datums/mind.dm

* Update code/__HELPERS/sorts/InsertSort.dm

Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>

* Update code/__HELPERS/sanitize_values.dm

Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>

---------

Co-authored-by: FunnyMan3595 (Charlie Nolan) <funnyman@google.com>
Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>
2024-04-19 17:32:09 +00:00
Vi3triceandGitHub 85353104f7 text be gone (#22929) 2023-10-26 10:39:11 +01:00
matttheficusandGitHub 405d794bd3 Jammers Now Prevent Tracking + Slight Range Buff (#22149)
* this was easier than i thought frankly

* hmbgerdo review
2023-09-07 10:53:46 +01:00
JimKil3andGitHub eb69f11a1b Adds RTS-like camera controls to AI (#21625)
* REMOVES sillycons (their keybinds)

* adds the feature

* comment fix

* mech fix

* lewcc review
2023-08-12 18:38:10 +01:00
Vi3triceandGitHub 59dfdba201 Everything else through the door (#19358) 2022-10-13 21:56:58 +02:00
bdf50ea894 Code Readability - Machinery (#18153)
* machinery

* comment change as per suggestion

Co-authored-by: moxian <moxian@users.noreply.github.com>

* added always_gib var to recycler as per recomendation

Co-authored-by: moxian <moxian@users.noreply.github.com>
2022-07-05 15:38:47 +02:00
AffectedArc07 f5f97882cf BRUTAL Part 1 - No proc var/ in procs 2021-02-01 14:10:08 +00:00
AffectedArc07andGitHub 210f8badf4 Makes all global variables handled by the GLOB controller (#13152)
* Handlers converted, now to fix 3532 compile errors

* 3532 compile fixes later, got runtimes on startup

* Well the server loads now atleast

* Take 2

* Oops
2020-03-20 21:56:37 -06:00
AffectedArc07andGitHub 04ba5c1cc9 File standardisation (#13131)
* Adds the check components

* Adds in trailing newlines

* Converts all CRLF to LF

* Post merge EOF

* Post merge line endings

* Final commit
2020-03-17 18:08:51 -04:00
Desolate c974e29a3c global lists global defined 2018-10-02 15:52:46 -05:00
Markolie 6982014a6e Replace all BYOND text macros 2017-02-21 15:41:37 +01:00
Crazylemon64 bf2bcbce67 Removes most hard-coded z level checks 2016-07-31 21:29:03 -07:00
Crazylemon64 ae43de3652 Integrates the z level manager with the space transition system 2016-07-29 19:11:36 -07:00
Tigercat2000 71e5344a98 Mass replace 2016-07-07 19:34:02 -07:00
Tigercat2000 78f53553f8 Reduce lines by removing blank lines added by PJ's script 2016-04-05 08:25:57 -07:00
Tigercat2000 9d430844c3 Replace most (if not all) output << operators with to_chat(user, message)
Currently, to_chat is literally just a proc that does user << message.
But it'll let us do output modification in the future, especially for
something like Goon's HTML chat.

Big thanks to PJB for his to_chat script, see
https://github.com/d3athrow/vgstation13/pull/6625 for more details.
2016-04-05 08:15:05 -07:00
Tigercat2000 bc78146178 Port -tg-station cameranets
This should make it much easier to port abductors, if we ever want to do
that.

Changes:
  - Fixed a bug where the AI could not delete photos it takes.
  - Ported -tg- cameranets. This means that all of our camera based systems are more or less up to date with -tg-; 510 features are missing.
  - An AI with the 'camera lights' mode on will now, instead of the button toggling the closest camera's light, toggle camera lights on/off as the AI moves.
  - It now takes a minimum of 30 deciseconds between attempting to track someone, and locking on. This number is increased by their distance away from the AI eye.
  - The camera activate/deactivate proc is now called 'toggle_cam'.
  - The 'trackable' proc has been replaced by a more object-oriented 'mob.can_track()' proc.
  - The 'networks' section of the security camera console is now above the camera list.

In laymans terms: This refactors how security cameras calculate what
viewers can see, and adds a few neat features on top.
2016-03-13 15:06:24 -07:00
Tastyfish 1627c6b124 made AI tracking cancel-able, fixed folder labelling 2015-11-30 01:06:21 -05:00
Markolie 5dc034719d Port Bay's silicon law manager 2015-08-31 02:18:49 +02:00
Markolie 8822cbba09 AI tracking update 2015-08-17 19:05:09 +02:00
Krausus aea292d3a1 Fixes tracking of off-camera AI bots 2015-05-20 07:22:18 -04:00
Krausus 9d5d8f697c Fixes AI camera tracking
Fixes tracking everyone where, not being able to track everyone with
suit sensors maxed, and not seeing all trackables in the tracking list
2015-05-20 07:03:01 -04:00
SamCroswell 62ae69c816 Ninja File Structure Rework
Restructures the ninja files into a more spaced-out version, compliments
of /TG/. The energy katana is also their handiwork.

Add an emag act to crates and lockers instead of handling everything in
attackby.
2015-03-13 20:42:54 -04:00
SamCroswell b8a9c902a1 Removes Space Ninjas 2015-03-02 19:05:44 -05:00
Markolie d8d1670b68 Revert "Revert "Saycode/language/species port from Bay""
This reverts commit d54579850c.

Conflicts:
	code/game/gamemodes/nuclear/nuclearbomb.dm
	code/game/objects/items/devices/radio/intercom.dm
	code/modules/mob/living/silicon/pai/pai.dm
2015-02-20 17:46:35 +01:00
DZD 212ca5f5bd MERGE CONFLIIIIIICTS 2015-02-19 20:26:36 -05:00
ZomgPonies d54579850c Revert "Saycode/language/species port from Bay" 2015-02-19 20:15:42 -05:00
DZD d0d6c8eebd Merge with upstream/master
Fixes merge conflicts.
2015-02-19 19:38:48 -05:00
Markolie dad0b2d856 Fix AI tracking, karma message fix, karma say fix, robot storage sprite change 2015-02-19 01:05:00 +01:00
DZD 4bcdb94a99 Merge with upstream/master
Fixes conflicts
2015-02-18 13:41:32 -05:00
DZD fbd9c367c0 NODROP flag addition & handling
- Purges canremove
- Implements functionality for NODROP flag, replaces canremove
- Refactors mob inventory unequipping.
2015-02-18 13:22:41 -05:00
Markolie 8726bad5b0 Z-level check refactor 2015-02-16 20:33:28 +01:00
Markolie 97b75276fa Fix robot tracking 2015-02-10 17:26:35 +01:00
Markolie 64fe9e8600 Remove legacy viewpoint code, move back to Bay's and /tg/'s system 2015-02-10 17:02:27 +01:00
Markolie c507158b8f Camera code update, fix runtime 2015-02-10 15:42:47 +01:00
Markolie da8115dc2e Bug fixes 2014-12-20 16:27:33 +01:00
Markolie 0cd3223536 AI fixes, borg fixes, map fixes 2014-11-14 14:15:17 +01:00
PsiOmegaandZomgPonies 108cc696e3 Can now middle click doors to toggle bolt lights, plus cleanup.
Middle-clicking doors now allows the AI to toggle bolt lights.
Attempts to achieve some consistency in door feedback messages.

Conflicts:
	code/game/machinery/camera/tracking.dm
	code/game/machinery/doors/airlock.dm
2014-07-23 15:02:14 -04:00
KeleniusandZomgPonies b6c6138c44 Gives the AI a hud
Conflicts:
	code/_onclick/hud/_defines.dm
	code/_onclick/hud/other_mobs.dm
	code/_onclick/hud/screen_objects.dm
	code/game/objects/items/devices/PDA/PDA.dm
	code/modules/mob/living/silicon/ai/ai.dm
	code/modules/mob/living/silicon/ai/say.dm
	code/modules/paperwork/photography.dm
2014-07-13 15:20:08 -04:00
jack-fractalandZomgPonies 3df35fe03c modifying visibility interface of ai to use generic visibility_interface
Conflicts:
	baystation12.dme
	code/game/gamemodes/malfunction/Malf_Modules.dm
	code/modules/mob/living/silicon/ai/freelook/cameranet.dm
	code/modules/mob/living/silicon/ai/freelook/chunk.dm
	code/modules/mob/living/silicon/ai/freelook/eye.dm
	code/modules/mob/living/silicon/ai/freelook/update_triggers.dm
2014-05-15 04:43:49 -04:00
errorageandZomgPonies eeeb68638f Partial commit for the cyborg UI upgrade, which gets rid of the pop-up window for module selection, instead displaying the available modules in storage-item like fashion.
Conflicts:
	code/_onclick/hud/_defines.dm
	code/_onclick/hud/robot.dm
	code/game/objects/items.dm
	code/modules/mob/living/silicon/robot/inventory.dm
	code/modules/mob/living/silicon/robot/robot.dm
	code/modules/mob/mob_defines.dm
2014-01-06 20:57:04 -05:00
d3athrowandZomgPonies eea98e632d Gives AI the choice to open the door or not! 2014-01-06 20:29:37 -05:00
d3athrowandZomgPonies 752a61087a Adds an open button next to comms sayers name that opens the nearest airlock to them maximum of 3 tiles away. does not work for people not on camera or using something that makes them untrackable(digital camo, agent card, ninja mask, etc) 2014-01-05 19:21:35 -05:00
ZomgPonies 37986fe303 Runtime fixes 2013-09-28 20:42:57 -04:00
ZomgPonies 9580552fd3 Re-added ninjas 2013-09-16 22:34:28 -04:00
ZomgPonies a935863200 Made blob gamemode work, removed ninjas because needs overhaul, optimized some strings 2013-09-08 11:39:33 -04:00