mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 08:36:00 +01:00
[MIRROR] Fix lifeline not respecting suit sensors (#26547)
* Fix lifeline not respecting suit sensors (#81517) ## About The Pull Request - Lifeline app now respect suits sensors again. - The proc always `return .`'d if the target mob was not on suit sensors, so if `.` was `RADAR_TRACKABLE`, well, it would rack sensorless mobs. - Cleaned up a bit of trackable. - Use the `is_valid_z_level` helper. - Respect all possible returns for a signal. ## Changelog 🆑 Melbert fix: Lifeline can no longer track mobs with suit sensors off /🆑 * Fix lifeline not respecting suit sensors --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
@@ -149,16 +149,13 @@
|
||||
return RADAR_NOT_TRACKABLE
|
||||
var/turf/here = get_turf(computer)
|
||||
var/turf/there = get_turf(signal)
|
||||
if(!here || !there)
|
||||
return RADAR_NOT_TRACKABLE //I was still getting a runtime even after the above check while scanning, so fuck it
|
||||
if(there.z != here.z && (!is_station_level(here.z) || !is_station_level(there.z)))
|
||||
if(isnull(here) || isnull(there) || !is_valid_z_level(here, there))
|
||||
return RADAR_NOT_TRACKABLE
|
||||
var/trackable_signal = SEND_SIGNAL(computer, COMSIG_MODULAR_COMPUTER_RADAR_TRACKABLE, signal, here, there)
|
||||
switch(trackable_signal)
|
||||
if(COMPONENT_RADAR_TRACK_ANYWAY)
|
||||
return RADAR_TRACKABLE_ANYWAY
|
||||
if(COMPONENT_RADAR_DONT_TRACK)
|
||||
return RADAR_NOT_TRACKABLE
|
||||
if(trackable_signal & COMPONENT_RADAR_TRACK_ANYWAY)
|
||||
return RADAR_TRACKABLE_ANYWAY
|
||||
if(trackable_signal & COMPONENT_RADAR_DONT_TRACK)
|
||||
return RADAR_NOT_TRACKABLE
|
||||
return RADAR_TRACKABLE
|
||||
|
||||
/**
|
||||
@@ -268,15 +265,16 @@
|
||||
|
||||
/datum/computer_file/program/radar/lifeline/trackable(mob/living/carbon/human/humanoid)
|
||||
. = ..()
|
||||
if(. == RADAR_TRACKABLE_ANYWAY)
|
||||
return RADAR_TRACKABLE_ANYWAY
|
||||
if(!humanoid || !istype(humanoid))
|
||||
if(. != RADAR_TRACKABLE)
|
||||
return .
|
||||
if(!istype(humanoid))
|
||||
return RADAR_NOT_TRACKABLE
|
||||
if(!istype(humanoid.w_uniform, /obj/item/clothing/under))
|
||||
return RADAR_NOT_TRACKABLE
|
||||
var/obj/item/clothing/under/uniform = humanoid.w_uniform
|
||||
if(uniform.has_sensor && uniform.sensor_mode >= SENSOR_COORDS) // Suit sensors must be on maximum
|
||||
return RADAR_TRACKABLE
|
||||
if(!uniform.has_sensor || uniform.sensor_mode < SENSOR_COORDS) // Suit sensors must be on maximum
|
||||
return RADAR_NOT_TRACKABLE
|
||||
return .
|
||||
|
||||
///Tracks all janitor equipment
|
||||
/datum/computer_file/program/radar/custodial_locator
|
||||
|
||||
Reference in New Issue
Block a user