mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
Some more radiation fixes (#19378)
* Some more rad fixes * Minor fix * fixes vox ghost goggles
This commit is contained in:
@@ -14,6 +14,10 @@
|
||||
matter = list(/datum/material/steel = SHEET_MATERIAL_AMOUNT * 1.5, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.5)
|
||||
|
||||
var/last_perceived_radiation_danger = null
|
||||
///How strong the last radiation pulse was, at the source.
|
||||
var/last_radiation_strength = null
|
||||
///How much insulation we're lacking.
|
||||
var/insulation_deficit = null
|
||||
|
||||
var/scanning = FALSE
|
||||
|
||||
@@ -40,6 +44,10 @@
|
||||
. += span_suicide("Ambient radiation levels highly above average. It is ") + span_warning("unsafe ") + span_suicide("here.")
|
||||
if(PERCEIVED_RADIATION_DANGER_EXTREME)
|
||||
. += span_suicide("Ambient radiation levels reaching critical levels! It is ") + span_warning("extremely unsafe ") + span_suicide("here.")
|
||||
if(last_radiation_strength)
|
||||
. += span_notice("Maximum strength at source of radioactive pulse: ") + span_warning("[last_radiation_strength]")
|
||||
if(insulation_deficit)
|
||||
. += span_warning("Insulation deficit: [insulation_deficit]")
|
||||
|
||||
/obj/item/geiger/update_icon()
|
||||
if(!scanning)
|
||||
@@ -101,6 +109,11 @@
|
||||
SIGNAL_HANDLER
|
||||
|
||||
last_perceived_radiation_danger = get_perceived_radiation_danger(pulse_information, insulation_to_target)
|
||||
last_radiation_strength = pulse_information.strength
|
||||
if(insulation_to_target > pulse_information.threshold)
|
||||
insulation_deficit = round(insulation_to_target - pulse_information.threshold, 0.1)
|
||||
else
|
||||
insulation_deficit = null
|
||||
addtimer(CALLBACK(src, PROC_REF(reset_perceived_danger)), TIME_WITHOUT_RADIATION_BEFORE_RESET, TIMER_UNIQUE | TIMER_OVERRIDE)
|
||||
|
||||
if (scanning)
|
||||
@@ -108,6 +121,8 @@
|
||||
|
||||
/obj/item/geiger/proc/reset_perceived_danger()
|
||||
last_perceived_radiation_danger = null
|
||||
last_radiation_strength = null
|
||||
insulation_deficit = null
|
||||
if (scanning)
|
||||
update_icon()
|
||||
|
||||
@@ -153,7 +168,7 @@
|
||||
/obj/item/geiger/wall/Initialize(mapload)
|
||||
. = ..()
|
||||
if(scanning)
|
||||
AddComponent(/datum/component/geiger_sound)
|
||||
AddComponent(/datum/component/geiger_sound/wall)
|
||||
|
||||
|
||||
/obj/item/geiger/wall/update_icon()
|
||||
|
||||
@@ -162,6 +162,7 @@
|
||||
slot_flags = SLOT_BACK
|
||||
preserve_item = 1
|
||||
w_class = ITEMSIZE_LARGE
|
||||
unacidable = TRUE
|
||||
var/obj/item/ghost_catcher/who_ya_gunna_call = /obj/item/ghost_catcher
|
||||
|
||||
/obj/item/proton_pack/Initialize(mapload)
|
||||
@@ -173,3 +174,13 @@
|
||||
if(SEND_SIGNAL(src,COMSIG_ITEM_ATTACK_SELF,user) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
/obj/item/proton_pack/MouseDrop()
|
||||
if(ismob(src.loc))
|
||||
if(!CanMouseDrop(src))
|
||||
return
|
||||
var/mob/M = src.loc
|
||||
if(!M.unEquip(src))
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
M.put_in_any_hand_if_possible(src)
|
||||
|
||||
Reference in New Issue
Block a user