mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Added screen alerts (#22051)
Ports screen alerts from CM13. This enables an immediate reference to whether you are cuffed or buckled. It also provides an easy way to get out of said situation by simply clicking on the alert. <img width="430" height="454" alt="image" src="https://github.com/user-attachments/assets/0c20abf2-0901-49e0-ac29-492ba7c6dbe5" /> ### Asset Licenses The following assets that **have not** been created by myself are included in this PR: | Path | Original Author | License | | --- | --- | --- | | icons/mob/screen_alert.dmi (buckle, succumb) | CM13Devs (CM-13) | CC-BY-SA 3.0 |
This commit is contained in:
@@ -148,11 +148,8 @@
|
||||
|
||||
if(environment.temperature > (T0C+66))
|
||||
adjustFireLoss((environment.temperature - (T0C+66))/5) // Might be too high, check in testing.
|
||||
if (fire) fire.icon_state = "fire2"
|
||||
if(prob(20))
|
||||
to_chat(src, SPAN_DANGER("You feel a searing heat!"))
|
||||
else
|
||||
if (fire) fire.icon_state = "fire0"
|
||||
|
||||
/mob/living/carbon/alien/handle_fire(var/seconds_per_tick, var/datum/gas_mixture/environment)
|
||||
if(..())
|
||||
|
||||
@@ -376,23 +376,6 @@
|
||||
return 1
|
||||
return
|
||||
|
||||
/mob/living/carbon/u_equip(obj/item/W as obj)
|
||||
if(!W) return 0
|
||||
|
||||
else if (W == handcuffed)
|
||||
handcuffed = null
|
||||
update_inv_handcuffed()
|
||||
if(buckled_to && buckled_to.buckle_require_restraints)
|
||||
buckled_to.unbuckle()
|
||||
|
||||
else if (W == legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
else
|
||||
..()
|
||||
|
||||
return
|
||||
|
||||
// output for machines^ ^^^^^^^output for people^^^^^^^^^
|
||||
|
||||
/mob/living/carbon/verb/mob_sleep()
|
||||
|
||||
@@ -215,12 +215,10 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
update_inv_back()
|
||||
else if (W == handcuffed)
|
||||
handcuffed = null
|
||||
if(buckled_to && buckled_to.buckle_require_restraints)
|
||||
buckled_to.unbuckle()
|
||||
update_inv_handcuffed()
|
||||
handcuff_update()
|
||||
else if (W == legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
legcuff_update()
|
||||
else if (W == r_hand)
|
||||
r_hand = null
|
||||
update_inv_r_hand()
|
||||
@@ -265,11 +263,11 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
update_inv_wear_mask(redraw_mob)
|
||||
if(slot_handcuffed)
|
||||
src.handcuffed = W
|
||||
update_inv_handcuffed(redraw_mob)
|
||||
handcuff_update()
|
||||
if(slot_legcuffed)
|
||||
src.legcuffed = W
|
||||
W.on_equipped(src, slot, assisted_equip)
|
||||
update_inv_legcuffed(redraw_mob)
|
||||
legcuff_update()
|
||||
if(slot_l_hand)
|
||||
src.l_hand = W
|
||||
W.on_equipped(src, slot, assisted_equip)
|
||||
|
||||
@@ -1062,12 +1062,6 @@
|
||||
if (oxygen.icon_state != new_oxy)
|
||||
oxygen.icon_state = new_oxy
|
||||
|
||||
if(fire)
|
||||
//fire_alert is either 0 if no alert, 1 for cold and 2 for heat.
|
||||
var/new_fire = fire_alert ? "fire[fire_alert]" : "fire0"
|
||||
if (fire.icon_state != new_fire)
|
||||
fire.icon_state = new_fire
|
||||
|
||||
if(bodytemp)
|
||||
var/new_temp
|
||||
if (!species)
|
||||
|
||||
@@ -1476,8 +1476,10 @@ There are several things that need to be remembered:
|
||||
|
||||
if(!on_fire)
|
||||
set_light_on(FALSE)
|
||||
clear_alert(ALERT_FIRE)
|
||||
else
|
||||
set_light_on(TRUE)
|
||||
throw_alert(ALERT_FIRE, /atom/movable/screen/alert/fire)
|
||||
|
||||
var/image/fire_image_lower = on_fire ? image(species.onfire_overlay, "lower", layer = FIRE_LAYER_LOWER) : null
|
||||
var/image/fire_image_upper = on_fire ? image(species.onfire_overlay, "upper", layer = FIRE_LAYER_UPPER) : null
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/mob/living/carbon/proc/handcuff_update()
|
||||
if(handcuffed)
|
||||
drop_r_hand()
|
||||
drop_l_hand()
|
||||
stop_pulling()
|
||||
throw_alert("Handcuffed", /atom/movable/screen/alert/restrained/handcuffed, new_master = handcuffed)
|
||||
else
|
||||
clear_alert("Handcuffed")
|
||||
if(buckled_to && buckled_to.buckle_require_restraints)
|
||||
buckled_to.unbuckle()
|
||||
update_inv_handcuffed()
|
||||
|
||||
/mob/living/carbon/proc/legcuff_update()
|
||||
if(legcuffed)
|
||||
throw_alert("Legcuffed", /atom/movable/screen/alert/restrained/legcuffed, new_master = legcuffed)
|
||||
else
|
||||
clear_alert("Legcuffed")
|
||||
update_inv_legcuffed()
|
||||
|
||||
/mob/living/carbon/u_equip(obj/item/W as obj)
|
||||
if(!W) return 0
|
||||
|
||||
else if (W == handcuffed)
|
||||
handcuffed = null
|
||||
handcuff_update()
|
||||
|
||||
else if (W == legcuffed)
|
||||
legcuffed = null
|
||||
legcuff_update()
|
||||
else
|
||||
..()
|
||||
|
||||
return
|
||||
@@ -171,7 +171,7 @@
|
||||
|
||||
drop_from_inventory(legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
legcuff_update()
|
||||
|
||||
/mob/living/carbon/proc/can_break_cuffs()
|
||||
if((mutations & HULK))
|
||||
@@ -206,9 +206,7 @@
|
||||
|
||||
qdel(handcuffed)
|
||||
handcuffed = null
|
||||
if(buckled_to)
|
||||
buckled_to.unbuckle()
|
||||
update_inv_handcuffed()
|
||||
handcuff_update()
|
||||
|
||||
/mob/living/carbon/proc/break_legcuffs()
|
||||
to_chat(src, SPAN_WARNING("You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)"))
|
||||
@@ -227,7 +225,7 @@
|
||||
|
||||
qdel(legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
legcuff_update()
|
||||
|
||||
/mob/living/carbon/human/can_break_cuffs()
|
||||
if(species.can_shred(src,1))
|
||||
|
||||
@@ -332,6 +332,9 @@
|
||||
if(on_fire)
|
||||
AddOverlays(image("icon" = 'icons/mob/burning/burning_generic.dmi', "icon_state" = "upper"))
|
||||
AddOverlays(image("icon" = 'icons/mob/burning/burning_generic.dmi', "icon_state" = "lower"))
|
||||
throw_alert(ALERT_FIRE, /atom/movable/screen/alert/fire)
|
||||
else
|
||||
clear_alert(ALERT_FIRE)
|
||||
|
||||
/mob/living/silicon/robot/fire_act(exposed_temperature, exposed_volume)
|
||||
. = ..()
|
||||
|
||||
@@ -135,10 +135,6 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
var/newstate
|
||||
if(fire)
|
||||
newstate = fire_alert ? "fire1" : "fire0"
|
||||
if(fire.icon_state != newstate)
|
||||
fire.icon_state = newstate
|
||||
|
||||
if(pullin)
|
||||
newstate = pulling ? "pull1" : "pull0"
|
||||
|
||||
@@ -1072,6 +1072,9 @@
|
||||
AddOverlays(upper_fire_emissive)
|
||||
AddOverlays(lower_fire_overlay)
|
||||
AddOverlays(lower_fire_emissive)
|
||||
throw_alert(ALERT_FIRE, /atom/movable/screen/alert/fire)
|
||||
else
|
||||
clear_alert(ALERT_FIRE)
|
||||
|
||||
|
||||
/mob/living/simple_animal/get_resist_power()
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
i_select = null
|
||||
m_select = null
|
||||
toxin = null
|
||||
fire = null
|
||||
bodytemp = null
|
||||
healths = null
|
||||
throw_icon = null
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
var/atom/movable/screen/i_select = null
|
||||
var/atom/movable/screen/m_select = null
|
||||
var/atom/movable/screen/toxin = null
|
||||
var/atom/movable/screen/fire = null
|
||||
var/atom/movable/screen/bodytemp = null
|
||||
var/atom/movable/screen/healths = null
|
||||
var/atom/movable/screen/throw_icon = null
|
||||
@@ -168,6 +167,8 @@
|
||||
var/obj/item/storage/s_active = null//Carbon
|
||||
var/obj/item/clothing/mask/wear_mask = null//Carbon
|
||||
|
||||
/// contains [/atom/movable/screen/alert only] // On /mob so clientless mobs will throw alerts properly
|
||||
var/list/alerts = list()
|
||||
var/list/screens = list()
|
||||
|
||||
var/seer = 0 //for cult//Carbon, probably Human
|
||||
|
||||
Reference in New Issue
Block a user