[NO GBP] Makes MODtethers quicker to cut, adds a rapid cut action to MODsuits and some examine hints (#86984)

## About The Pull Request
Tethers will now take only 1 second to cut, tether anchors have a line
about how to lengthen/shorten and cut tethers, and MODsuit tether module
now can quickly snap all tethers attached to you in case of an
emergency.

I'm not a fan of MOD tether quick cutting code but its the best we can
do to avoid GetComponent usage.

## Why It's Good For The Game
Tethers aren't very comfortable to use and a lot of people get confused
and stuck with them, this should help a ton.

## Changelog
🆑
qol: Added an explanation of how to change tether length and cut them to
tether anchors
qol: MODsuits can now quickly snap all tethers attached to you
balance: Tethers can now be cut significantly quicker
/🆑
This commit is contained in:
SmArtKar
2024-11-11 00:41:53 -08:00
committed by Majkl-J
parent b00f02eaa7
commit f58bf45991
4 changed files with 38 additions and 11 deletions
@@ -97,13 +97,22 @@
. = ..()
if(!.)
return
var/obj/projectile/tether = new /obj/projectile/tether(mod.wearer.loc)
var/obj/projectile/tether = new /obj/projectile/tether(mod.wearer.loc, src)
tether.preparePixelProjectile(target, mod.wearer)
tether.firer = mod.wearer
playsound(src, 'sound/items/weapons/batonextend.ogg', 25, TRUE)
INVOKE_ASYNC(tether, TYPE_PROC_REF(/obj/projectile, fire))
drain_power(use_energy_cost)
/obj/item/mod/module/tether/get_configuration()
. = ..()
.["cut_tethers"] = add_ui_configuration("Cut Tethers", "pin", TRUE)
/obj/item/mod/module/tether/configure_edit(key, value)
if (key != "cut_tethers")
return
SEND_SIGNAL(src, COMSIG_MOD_TETHER_SNAP)
/obj/projectile/tether
name = "tether"
icon_state = "tether_projectile"
@@ -120,15 +129,19 @@
var/line
/// Last turf that we passed before impact
var/turf/open/last_turf
/// MODsuit tether module that fired us
var/obj/item/mod/module/tether/parent_module
/obj/projectile/tether/Initialize(mapload)
/obj/projectile/tether/Initialize(mapload, module)
. = ..()
RegisterSignal(src, COMSIG_PROJECTILE_ON_EMBEDDED, PROC_REF(on_embedded))
if (!isnull(module))
parent_module = module
/obj/projectile/tether/proc/on_embedded(datum/source, obj/item/payload, atom/hit)
SIGNAL_HANDLER
firer.AddComponent(/datum/component/tether, hit, 7, "MODtether", payload)
firer.AddComponent(/datum/component/tether, hit, 7, "MODtether", payload, parent_module = parent_module)
/obj/projectile/tether/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change)
. = ..()
@@ -150,7 +163,7 @@
return
if (istype(target, /obj/item/tether_anchor) || isstructure(target) || ismachinery(target))
firer.AddComponent(/datum/component/tether, target, 7, "MODtether")
firer.AddComponent(/datum/component/tether, target, 7, "MODtether", parent_module = parent_module)
return
var/hitx
@@ -177,7 +190,7 @@
anchor.pixel_x = hitx
anchor.pixel_y = hity
anchor.anchored = TRUE
firer.AddComponent(/datum/component/tether, anchor, 7, "MODtether")
firer.AddComponent(/datum/component/tether, anchor, 7, "MODtether", parent_module = parent_module)
/obj/projectile/tether/Destroy()
QDEL_NULL(line)
@@ -194,6 +207,7 @@
/obj/item/tether_anchor/examine(mob/user)
. = ..()
. += span_info("It can be secured by using a wrench on it. Use right-click to tether yourself to [src].")
. += span_info("LMB shortens the tether while RMB lengthens it. Ctrl-click to cut the tether.")
/obj/item/tether_anchor/wrench_act(mob/living/user, obj/item/tool)
. = ..()
@@ -54,8 +54,6 @@
. = ..()
.["mode"] = add_ui_configuration("Scan Mode", "list", mode, modes)
return .
/obj/item/mod/module/health_analyzer/configure_edit(key, value)
switch(key)
if("mode")