Gives FBP's a proc to change their monitor display without using a mask item. (#7452)

* Synthetics display monitor

Does a change to the synthetics monitor heads and other heads that have displays, allowing them to have those displays without using a mask, using a proc that is given to them. works by basically replacing eye sprite.

* changelog.

* removes the monitor mask item.

* switches && for || in line 363

* moves line of code
This commit is contained in:
SplinterGP
2020-08-20 18:24:23 -07:00
committed by GitHub
parent 4a56ad2191
commit 42e23055a8
8 changed files with 67 additions and 8 deletions
@@ -102,6 +102,7 @@
var/obj/item/organ/external/T = organs_by_name[BP_TORSO]
if(T && T.robotic >= ORGAN_ROBOT)
src.verbs += /mob/living/carbon/human/proc/self_diagnostics
src.verbs += /mob/living/carbon/human/proc/setmonitor_state
var/datum/robolimb/R = all_robolimbs[T.model]
synthetic = R
return synthetic
@@ -347,3 +347,28 @@
to_chat(src, "<span class='critical'>Your regeneration is interrupted!</span>")
adjust_nutrition(-75)
active_regen = FALSE
/mob/living/carbon/human/proc/setmonitor_state()
set name = "Set monitor display"
set desc = "Set your monitor display"
set category = "IC"
if(stat)
to_chat(src,"<span class='warning'>You must be awake and standing to perform this action!</span>")
return
var/obj/item/organ/external/head/E = organs_by_name[BP_HEAD]
if(!E)
to_chat(src,"<span class='warning'>You don't seem to have a head!</span>")
return
var/datum/robolimb/robohead = all_robolimbs[E.model]
if(!robohead.monitor_styles || !robohead.monitor_icon)
to_chat(src,"<span class='warning'>Your head doesn't have a monitor or it doens't support to be changed!</span>")
return
var/list/states
if(!states)
states = params2list(robohead.monitor_styles)
var/choice = input("Select a screen icon.") as null|anything in states
if(choice)
E.eye_icon_location = robohead.monitor_icon
E.eye_icon = states[choice]
to_chat(src,"<span class='warning'>You set your monitor to display [choice]!</span>")
update_icons_body()
@@ -236,7 +236,9 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
icon_key += "[rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3])]"
else
icon_key += "[r_eyes], [g_eyes], [b_eyes]"
var/obj/item/organ/external/head/head = organs_by_name[BP_HEAD]
if(head)
icon_key += "[head.eye_icon]"
for(var/organ_tag in species.has_limbs)
var/obj/item/organ/external/part = organs_by_name[organ_tag]
if(isnull(part) || part.is_stump())
@@ -267,7 +269,6 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
icon_key += "1"
icon_key = "[icon_key][husk ? 1 : 0][fat ? 1 : 0][hulk ? 1 : 0][skeleton ? 1 : 0]"
var/icon/base_icon
if(human_icon_cache[icon_key])
base_icon = human_icon_cache[icon_key]