Files
Bubberstation/code/__DEFINES/pai.dm
SkyratBot cab87c97e5 [MIRROR] Add leash component to pAIs that keeps them within range instead of directly teleporting them back, increases default range to max range [MDB IGNORE] (#22745)
* Add leash component to pAIs that keeps them within range instead of directly teleporting them back, increases default range to max range (#77030)

## About The Pull Request

Tries to keep pAIs in range of their owner by moving them closer when
the owner moves, rather than jarringly teleporting every time the owner
gets out of range. Does this by calculating the closest path a nearby
tile and forcefully moving you there. Still a bit janky at times but is
better than teleporting directly onto the owner 100% of the time I feel.
Also prevents you from moving out of range, rather than forcefully
teleporting you back.

Increases the default pAI range to the maximum (9 tiles)

## Why It's Good For The Game

New leashing makes being a leashed pAI significantly less jarring and
obvious. Ideally we would also have a visible max range too.

Default pAI range was pretty small in my testing and I think it's not
unreasonable to think a lot of people won't bother changing it. That
they are leashed at all is the important part.

## Changelog

🆑
qol: pAIs now try to stay within range of their owner, and teleport back
only when necessary
qol: Default max pAI range has been changed to the maximum range you can
choose (9 tiles)
/🆑

---------

Co-authored-by: Jacquerel <hnevard@ gmail.com>

* Add leash component to pAIs that keeps them within range instead of directly teleporting them back, increases default range to max range

* Fixes the leash enable/disable

* A workaround because the procs are private.

* Update card.dm

* Update card.dm

what I get for rushing

* Update card.dm

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@ gmail.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-07-30 16:24:44 -04:00

39 lines
1.2 KiB
Plaintext

/// Time between fold out
#define HOLOCHASSIS_COOLDOWN (5 SECONDS)
/// Time it takes a new pAI to fold out
#define HOLOCHASSIS_INIT_TIME (40 SECONDS)
/// Overloaded or emagged foldout cooldown
#define HOLOCHASSIS_OVERLOAD_COOLDOWN (10 SECONDS)
/// Regeneration rate for the holochassis
#define HOLOCHASSIS_REGEN_PER_SECOND 1.25
/// The max health of the holochassis
#define HOLOCHASSIS_MAX_HEALTH 20
/// The amount of time between spamming for pAI candidates
#define PAI_SPAM_TIME (40 SECONDS)
/// Maximum distance you can set the holoform leash
#define HOLOFORM_MAX_RANGE 25 // SKYRAT EDIT CHANGE - ORIGINAL: #define HOLOFORM_MAX_RANGE 9
/// Minimum distance you can set the holoform leash
#define HOLOFORM_MIN_RANGE 3
/// Default holoform leash distance
#define HOLOFORM_DEFAULT_RANGE HOLOFORM_MAX_RANGE
/// UI action to toggle huds
#define PAI_TOGGLE_MEDICAL_HUD 0
#define PAI_TOGGLE_SECURITY_HUD 1
/// UI action to use integrated scanner on target
#define PAI_SCAN_TARGET 0
#define PAI_SCAN_MASTER 1
/// UI actions for door jack
#define PAI_DOOR_JACK_CABLE 0
#define PAI_DOOR_JACK_HACK 1
#define PAI_DOOR_JACK_CANCEL 2
/// UI actions for photography module
#define PAI_PHOTO_MODE_CAMERA 0
#define PAI_PHOTO_MODE_PRINTER 1
#define PAI_PHOTO_MODE_ZOOM 2