mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
Mildly buffs Active Sonar module (#75174)
Lowers the cooldown from 25 seconds to 15 seconds Lowers the power drain from 25 to 20 Sonar visuals now move for the duration of their existence (see below)
This commit is contained in:
@@ -553,6 +553,8 @@
|
||||
var/image/modsuit_image
|
||||
/// The person in the modsuit at the moment, really just used to remove this from their screen
|
||||
var/datum/weakref/mod_man
|
||||
/// The creature we're placing this on
|
||||
var/datum/weakref/pinged_person
|
||||
/// The icon state applied to the image created for this ping.
|
||||
var/real_icon_state = "sonar_ping"
|
||||
|
||||
@@ -564,12 +566,15 @@
|
||||
modsuit_image.plane = ABOVE_LIGHTING_PLANE
|
||||
SET_PLANE_EXPLICIT(modsuit_image, ABOVE_LIGHTING_PLANE, creature)
|
||||
mod_man = WEAKREF(looker)
|
||||
pinged_person = WEAKREF(creature)
|
||||
add_mind(looker)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/effect/temp_visual/sonar_ping/Destroy()
|
||||
var/mob/living/previous_user = mod_man?.resolve()
|
||||
if(previous_user)
|
||||
remove_mind(previous_user)
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
// Null so we don't shit the bed when we delete
|
||||
modsuit_image = null
|
||||
return ..()
|
||||
@@ -581,3 +586,13 @@
|
||||
/// Remove the image from the modsuit wearer's screen
|
||||
/obj/effect/temp_visual/sonar_ping/proc/remove_mind(mob/living/looker)
|
||||
looker?.client?.images -= modsuit_image
|
||||
|
||||
/// Update the position of the ping while it's still up. Not sure if i need to use the full proc but just being safe
|
||||
/obj/effect/temp_visual/sonar_ping/process(seconds_per_tick)
|
||||
var/mob/living/looker = mod_man?.resolve()
|
||||
var/mob/living/creature = pinged_person?.resolve()
|
||||
if(isnull(looker) || isnull(creature))
|
||||
return PROCESS_KILL
|
||||
modsuit_image.loc = looker.loc
|
||||
modsuit_image.pixel_x = ((creature.x - looker.x) * 32)
|
||||
modsuit_image.pixel_y = ((creature.y - looker.y) * 32)
|
||||
|
||||
Reference in New Issue
Block a user