mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 02:56:14 +01:00
60202429a7
* starting work * most generic * more alerts * remaining alerts * many fixes * fix * properly set * virgo doesn't use those lines? * actually they are used * smallfixes * oops * silence of the bots * docs
65 lines
2.3 KiB
Plaintext
65 lines
2.3 KiB
Plaintext
/datum/event/radiation_storm
|
|
var/const/enterBelt = 30
|
|
var/const/radIntervall = 5 // Enough time between enter/leave belt for 10 hits, as per original implementation
|
|
var/const/leaveBelt = 80
|
|
var/const/revokeAccess = 165
|
|
startWhen = 2
|
|
announceWhen = 1
|
|
endWhen = revokeAccess
|
|
var/postStartTicks = 0
|
|
|
|
/datum/event/radiation_storm/announce()
|
|
GLOB.command_announcement.Announce("High levels of radiation detected near \the [station_name()]. Please evacuate into one of the shielded maintenance tunnels or dorms.", "Anomaly Alert", new_sound = ANNOUNCER_MSG_RADIATION)
|
|
|
|
/datum/event/radiation_storm/start()
|
|
make_maint_all_access()
|
|
|
|
/datum/event/radiation_storm/tick()
|
|
if(activeFor == enterBelt)
|
|
GLOB.command_announcement.Announce("The [using_map.facility_type] has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert")
|
|
radiate()
|
|
|
|
if(activeFor >= enterBelt && activeFor <= leaveBelt)
|
|
postStartTicks++
|
|
|
|
if(postStartTicks == radIntervall)
|
|
postStartTicks = 0
|
|
radiate()
|
|
|
|
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")
|
|
/datum/event/radiation_storm/proc/radiate()
|
|
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
|
|
var/area/A = get_area(C)
|
|
if(!A)
|
|
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
|
|
chance -= (chance / 100) * C.getarmor(null, "rad")
|
|
if(prob(chance))
|
|
if (prob(75))
|
|
randmutb(H) // Applies bad mutation
|
|
domutcheck(H,null,MUTCHK_FORCED)
|
|
else
|
|
randmutg(H) // Applies good mutation
|
|
domutcheck(H,null,MUTCHK_FORCED)
|
|
H.UpdateAppearance()
|
|
|
|
/datum/event/radiation_storm/end()
|
|
revoke_maint_all_access()
|
|
|
|
/datum/event/radiation_storm/syndicate/radiate()
|
|
return
|