diff --git a/code/datums/components/geiger_sound.dm b/code/datums/components/geiger_sound.dm index bc6c885044..ba1d59061a 100644 --- a/code/datums/components/geiger_sound.dm +++ b/code/datums/components/geiger_sound.dm @@ -3,6 +3,7 @@ var/datum/looping_sound/geiger/sound var/last_parent = null + var/wall_mounted = FALSE /datum/component/geiger_sound/Initialize(...) if (!isatom(parent)) @@ -19,7 +20,8 @@ return ..() /datum/component/geiger_sound/RegisterWithParent() - sound = new(list(parent), TRUE) + if(!wall_mounted) + sound = new(list(parent), TRUE) RegisterSignal(parent, COMSIG_IN_RANGE_OF_IRRADIATION, PROC_REF(on_pre_potential_irradiation)) @@ -76,15 +78,20 @@ var/datum/radiation_pulse_information/last_radiation_pulse var/last_insulation_to_target + var/wall_mounted = FALSE /datum/looping_sound/geiger/Destroy() last_radiation_pulse = null return ..() -/datum/looping_sound/geiger/get_sound(starttime, _mid_sounds) +/datum/looping_sound/geiger/get_sound(starttime, _mid_sounds, danger) + if(wall_mounted) //Child does all the work. + return ..(starttime, mid_sounds[danger]) + if (isnull(last_radiation_pulse)) return null - var/danger = get_perceived_radiation_danger(last_radiation_pulse, last_insulation_to_target) + danger = get_perceived_radiation_danger(last_radiation_pulse, last_insulation_to_target) + if(danger >= PERCEIVED_RADIATION_DANGER_HIGH) chance = 100 else @@ -97,3 +104,29 @@ . = ..() last_radiation_pulse = null + +/datum/component/geiger_sound/wall + wall_mounted = TRUE + +/datum/component/geiger_sound/wall/RegisterWithParent() + sound = new /datum/looping_sound/geiger/wall(list(parent), TRUE) + ..() + +//Subtype for wall mounted geiger counters, which should be quieter and not have the chance to play when radiation is low. +/datum/looping_sound/geiger/wall + wall_mounted = TRUE + +/datum/looping_sound/geiger/wall/get_sound(starttime, _mid_sounds) + if (isnull(last_radiation_pulse)) + return null + + var/danger = get_perceived_radiation_danger(last_radiation_pulse, last_insulation_to_target) + + if(danger >= PERCEIVED_RADIATION_DANGER_HIGH) + chance = 100 + volume = (danger * 5) + else + chance = 0 + volume = 0 + + return ..(starttime, mid_sounds[danger], danger) diff --git a/code/game/objects/items/devices/geiger.dm b/code/game/objects/items/devices/geiger.dm index 1e2a2ee884..ec1c3b4f7a 100644 --- a/code/game/objects/items/devices/geiger.dm +++ b/code/game/objects/items/devices/geiger.dm @@ -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() diff --git a/code/game/objects/items/ghost_hunting/weapons.dm b/code/game/objects/items/ghost_hunting/weapons.dm index db491e6ff2..2640f83076 100644 --- a/code/game/objects/items/ghost_hunting/weapons.dm +++ b/code/game/objects/items/ghost_hunting/weapons.dm @@ -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) diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index 0e6508efad..006159345f 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -29,22 +29,6 @@ else if(activeFor == leaveBelt) GLOB.command_announcement.Announce("The [using_map.facility_type] has passed the radiation belt. Please allow for up to one minute while radiation levels dissipate, and report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert") //CHOMPEdit: Restored original message /datum/event/radiation_storm/proc/radiate() - - //This sucks. Just mutate. - /* - var/radiation_level = rand(15, 35) - for(var/z in using_map.station_levels) - var/turf/epicentre = locate(round(world.maxx / 2), round(world.maxy / 2), z) - if(epicentre) - radiation_pulse( - epicentre, - max_range = 5, - threshold = RAD_MEDIUM_INSULATION, - chance = URANIUM_IRRADIATION_CHANCE, - minimum_exposure_time = URANIUM_RADIATION_MINIMUM_EXPOSURE_TIME, - ) - */ - for(var/mob/living/carbon/C in GLOB.living_mob_list) if(!(C.z in using_map.station_levels) || C.isSynthetic() || isbelly(C.loc)) continue @@ -53,6 +37,13 @@ continue if(A.flag_check(RAD_SHIELDED)) continue + radiation_pulse( + get_turf(C), + max_range = 1, + threshold = RAD_LIGHT_INSULATION, + chance = URANIUM_IRRADIATION_CHANCE * 5, + strength = rand(15, 35) + ) if(ishuman(C)) var/mob/living/carbon/human/H = C var/chance = 5.0 diff --git a/icons/inventory/eyes/mob_vox.dmi b/icons/inventory/eyes/mob_vox.dmi index e82ec04a4b..e2bf0df7bb 100644 Binary files a/icons/inventory/eyes/mob_vox.dmi and b/icons/inventory/eyes/mob_vox.dmi differ