mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Robotic Analyzer Buff + Cleanup (#23523)
* analyzing robots * how can it analyze the reagents of organics * they may be snowflakes but theyre special to me * Update code/game/objects/items/devices/scanners.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/game/objects/items/devices/scanners.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/game/objects/items/devices/scanners.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Update code/game/objects/items/devices/scanners.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Update code/game/objects/items/devices/scanners.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * whoopsies --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
co-authored by
Henri215
DGamerL
Luc
parent
44729b788a
commit
6a11049bca
@@ -243,118 +243,3 @@
|
||||
name = "radio"
|
||||
desc = "A modular, multi-frequency radio used by robots and exosuits to enable communication systems. Comes with built-in subspace receivers."
|
||||
icon_state = "radio"
|
||||
|
||||
//
|
||||
//Robotic Component Analyzer, basically a health analyzer for robots
|
||||
//
|
||||
/obj/item/robotanalyzer
|
||||
name = "cyborg analyzer"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "robotanalyzer"
|
||||
item_state = "analyzer"
|
||||
desc = "A hand-held scanner able to diagnose robotic injuries."
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_FLAG_BELT
|
||||
throwforce = 3
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throw_speed = 5
|
||||
throw_range = 10
|
||||
origin_tech = "magnets=1;biotech=1"
|
||||
var/mode = 1
|
||||
|
||||
/obj/item/robotanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if((HAS_TRAIT(user, TRAIT_CLUMSY) || user.getBrainLoss() >= 60) && prob(50))
|
||||
var/list/messages = list()
|
||||
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>", "<span class='warning'>You try to analyze the floor's vitals!</span>")
|
||||
messages.Add("<span class='notice'>Analyzing Results for The floor:\n\t Overall Status: Healthy</span>")
|
||||
messages.Add("<span class='notice'>\t Damage Specifics: [0]-[0]-[0]-[0]</span>")
|
||||
messages.Add("<span class='notice'>Key: Suffocation/Toxin/Burns/Brute</span>")
|
||||
messages.Add("<span class='notice'>Body Temperature: ???</span>")
|
||||
to_chat(user, chat_box_healthscan(messages.Join("<br>")))
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s components.</span>","<span class='notice'>You have analyzed [M]'s components.</span>")
|
||||
robot_healthscan(user, M)
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
/proc/robot_healthscan(mob/user, mob/living/M)
|
||||
var/scan_type
|
||||
if(isrobot(M))
|
||||
scan_type = "robot"
|
||||
else if(ishuman(M))
|
||||
scan_type = "prosthetics"
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't analyze non-robotic things!</span>")
|
||||
return
|
||||
|
||||
var/list/messages = list()
|
||||
switch(scan_type)
|
||||
if("robot")
|
||||
var/BU = M.getFireLoss() > 50 ? "<b>[M.getFireLoss()]</b>" : M.getFireLoss()
|
||||
var/BR = M.getBruteLoss() > 50 ? "<b>[M.getBruteLoss()]</b>" : M.getBruteLoss()
|
||||
messages.Add("<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "fully disabled" : "[M.health]% functional"]</span>")
|
||||
messages.Add("\t Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>")
|
||||
messages.Add("\t Damage Specifics: <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font>")
|
||||
if(M.timeofdeath && M.stat == DEAD)
|
||||
messages.Add("<span class='notice'>Time of Disable: [station_time_timestamp("hh:mm:ss", M.timeofdeath)]</span>")
|
||||
var/mob/living/silicon/robot/H = M
|
||||
var/list/damaged = H.get_damaged_components(TRUE, TRUE, TRUE) // Get all except the missing ones
|
||||
var/list/missing = H.get_missing_components()
|
||||
messages.Add("<span class='notice'>Localized Damage:</span>")
|
||||
if(!LAZYLEN(damaged) && !LAZYLEN(missing))
|
||||
messages.Add("<span class='notice'>\t Components are OK.</span>")
|
||||
else
|
||||
if(LAZYLEN(damaged))
|
||||
for(var/datum/robot_component/org in damaged)
|
||||
messages.Add(text("<span class='notice'>\t []: [][] - [] - [] - []</span>", \
|
||||
capitalize(org.name), \
|
||||
(org.is_destroyed()) ? "<font color='red'><b>DESTROYED</b></font> " :"",\
|
||||
(org.electronics_damage > 0) ? "<font color='#FFA500'>[org.electronics_damage]</font>" :0, \
|
||||
(org.brute_damage > 0) ? "<font color='red'>[org.brute_damage]</font>" :0, \
|
||||
(org.toggled) ? "Toggled ON" : "<font color='red'>Toggled OFF</font>",\
|
||||
(org.powered) ? "Power ON" : "<font color='red'>Power OFF</font>"),1)
|
||||
if(LAZYLEN(missing))
|
||||
for(var/datum/robot_component/org in missing)
|
||||
messages.Add("<span class='warning'>\t [capitalize(org.name)]: MISSING</span>")
|
||||
|
||||
if(H.emagged && prob(5))
|
||||
messages.Add("<span class='warning'>\t ERROR: INTERNAL SYSTEMS COMPROMISED</span>")
|
||||
|
||||
if("prosthetics")
|
||||
var/mob/living/carbon/human/H = M
|
||||
messages.Add("<span class='notice'>Analyzing Results for \the [H]:</span>")
|
||||
messages.Add("Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>")
|
||||
|
||||
to_chat(user, "<span class='notice'>External prosthetics:</span>")
|
||||
var/organ_found
|
||||
if(LAZYLEN(H.internal_organs))
|
||||
for(var/obj/item/organ/external/E in H.bodyparts)
|
||||
if(!E.is_robotic())
|
||||
continue
|
||||
organ_found = TRUE
|
||||
messages.Add("[E.name]: <font color='red'>[E.brute_dam]</font> <font color='#FFA500'>[E.burn_dam]</font>")
|
||||
if(!organ_found)
|
||||
messages.Add("<span class='warning'>No prosthetics located.</span>")
|
||||
messages.Add("<hr>")
|
||||
messages.Add("<span class='notice'>Internal prosthetics:</span>")
|
||||
organ_found = null
|
||||
if(LAZYLEN(H.internal_organs))
|
||||
for(var/obj/item/organ/internal/O in H.internal_organs)
|
||||
if(!O.is_robotic() || istype(O, /obj/item/organ/internal/cyberimp))
|
||||
continue
|
||||
organ_found = TRUE
|
||||
messages.Add("[capitalize(O.name)]: <font color='red'>[O.damage]</font>")
|
||||
if(!organ_found)
|
||||
messages.Add("<span class='warning'>No prosthetics located.</span>")
|
||||
messages.Add("<hr>")
|
||||
messages.Add("<span class='notice'>Cybernetic implants:</span>")
|
||||
organ_found = null
|
||||
if(LAZYLEN(H.internal_organs))
|
||||
for(var/obj/item/organ/internal/cyberimp/I in H.internal_organs)
|
||||
organ_found = TRUE
|
||||
messages.Add("[capitalize(I.name)]: <font color='red'>[I.crit_fail ? "CRITICAL FAILURE" : I.damage]</font>")
|
||||
if(!organ_found)
|
||||
messages.Add("<span class='warning'>No implants located.</span>")
|
||||
|
||||
to_chat(user, chat_box_healthscan(messages.Join("<br>")))
|
||||
|
||||
Reference in New Issue
Block a user