mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
[MIRROR] Fix PAI health scanning [MDB IGNORE] (#25673)
* Fix PAI health scanning (#80373) ## About The Pull Request Fixes #80370 Rather than just using the global `healthscan` proc, PAIs created a health analyzer in their contents and called `attack` directly, despite the fact that all health analyzer `attack` does is call the global proc - [ ] I tested this pr ## Changelog 🆑 Melbert fix: Fixes PAI health scan software /🆑 --------- Co-authored-by: Zephyr <12817816+ZephyrTFA@ users.noreply.github.com> * Fix PAI health scanning --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Zephyr <12817816+ZephyrTFA@ users.noreply.github.com>
This commit is contained in:
co-authored by
Zephyr
MrMelbert
parent
b70ca591d8
commit
d314979746
@@ -94,6 +94,7 @@
|
||||
if(LAZYACCESS(modifiers, RIGHT_CLICK))
|
||||
pAI.host_scan(PAI_SCAN_MASTER)
|
||||
return TRUE
|
||||
|
||||
/atom/movable/screen/pai/crew_manifest
|
||||
name = "Crew Manifest"
|
||||
icon_state = "manifest"
|
||||
|
||||
@@ -71,8 +71,6 @@
|
||||
// Onboard Items
|
||||
/// Atmospheric analyzer
|
||||
var/obj/item/analyzer/atmos_analyzer
|
||||
/// Health analyzer
|
||||
var/obj/item/healthanalyzer/host_scan
|
||||
/// GPS
|
||||
var/obj/item/gps/pai/internal_gps
|
||||
/// Music Synthesizer
|
||||
@@ -153,7 +151,6 @@
|
||||
/mob/living/silicon/pai/Destroy()
|
||||
QDEL_NULL(atmos_analyzer)
|
||||
QDEL_NULL(hacking_cable)
|
||||
QDEL_NULL(host_scan)
|
||||
QDEL_NULL(instrument)
|
||||
QDEL_NULL(internal_gps)
|
||||
QDEL_NULL(newscaster)
|
||||
@@ -185,8 +182,6 @@
|
||||
atmos_analyzer = null
|
||||
else if(gone == aicamera)
|
||||
aicamera = null
|
||||
else if(gone == host_scan)
|
||||
host_scan = null
|
||||
else if(gone == internal_gps)
|
||||
internal_gps = null
|
||||
else if(gone == instrument)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
return TRUE
|
||||
// Software related ui actions
|
||||
if(available_software[action] && !installed_software.Find(action))
|
||||
balloon_alert(usr, "software unavailable")
|
||||
balloon_alert(ui.user, "software unavailable!")
|
||||
return FALSE
|
||||
switch(action)
|
||||
if("Atmospheric Sensor")
|
||||
@@ -116,8 +116,6 @@
|
||||
atmos_analyzer = new(src)
|
||||
if("Digital Messenger")
|
||||
create_modularInterface()
|
||||
if("Host Scan")
|
||||
host_scan = new(src)
|
||||
if("Internal GPS")
|
||||
internal_gps = new(src)
|
||||
if("Music Synthesizer")
|
||||
@@ -193,28 +191,27 @@
|
||||
* @returns {boolean} - TRUE if the scan was successful, FALSE otherwise.
|
||||
*/
|
||||
/mob/living/silicon/pai/proc/host_scan(mode)
|
||||
if(isnull(mode))
|
||||
return FALSE
|
||||
if(mode == PAI_SCAN_TARGET)
|
||||
var/mob/living/target = get_holder()
|
||||
if(!target || !isliving(target))
|
||||
balloon_alert(src, "not being carried")
|
||||
return FALSE
|
||||
host_scan.attack(target, src)
|
||||
return TRUE
|
||||
if(mode == PAI_SCAN_MASTER)
|
||||
if(!master_ref)
|
||||
balloon_alert(src, "no master detected")
|
||||
return FALSE
|
||||
var/mob/living/resolved_master = find_master()
|
||||
if(!resolved_master)
|
||||
balloon_alert(src, "cannot locate master")
|
||||
return FALSE
|
||||
if(!is_valid_z_level(get_turf(src), get_turf(resolved_master)))
|
||||
balloon_alert(src, "master out of range")
|
||||
return FALSE
|
||||
host_scan.attack(resolved_master, src)
|
||||
return TRUE
|
||||
switch(mode)
|
||||
if(PAI_SCAN_TARGET)
|
||||
var/mob/living/target = get_holder()
|
||||
if(!isliving(target))
|
||||
balloon_alert(src, "not being carried!")
|
||||
return FALSE
|
||||
healthscan(src, target)
|
||||
return TRUE
|
||||
|
||||
if(PAI_SCAN_MASTER)
|
||||
var/mob/living/resolved_master = find_master()
|
||||
if(isnull(resolved_master))
|
||||
balloon_alert(src, "no master detected!")
|
||||
return FALSE
|
||||
if(!is_valid_z_level(get_turf(src), get_turf(resolved_master)))
|
||||
balloon_alert(src, "master out of range!")
|
||||
return FALSE
|
||||
healthscan(src, resolved_master)
|
||||
return TRUE
|
||||
|
||||
stack_trace("Invalid mode passed to host scan: [mode || "null"]")
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user