mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +01:00
Turns the z-level restriction procs into macros Changes z-level restrictions to use the macros Use contact_levels for announcements (instead of player_levels) Restricts the teleporter to station_levels instead of player_levels Restricts AI tracking to station_levels instead of player_levels Mechs only get tracking beacons if they are on station_levels (instead of player_levels) Construction Drones gib if they enter a station level Mining Drones gib if they leave the station levels Removes the mining equipment vendor from the scrapheap
69 lines
2.3 KiB
Plaintext
69 lines
2.3 KiB
Plaintext
/datum/event/radiation_storm
|
|
var/const/enterBelt = 45
|
|
var/const/radIntervall = 5 // 20 ticks
|
|
var/const/leaveBelt = 145
|
|
var/const/revokeAccess = 200
|
|
startWhen = 2
|
|
announceWhen = 1
|
|
endWhen = revokeAccess
|
|
var/postStartTicks = 0
|
|
two_part = 1
|
|
ic_name = "radiation"
|
|
|
|
/datum/event/radiation_storm/announce()
|
|
command_announcement.Announce("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg')
|
|
|
|
/datum/event/radiation_storm/start()
|
|
make_maint_all_access()
|
|
|
|
/datum/event/radiation_storm/tick()
|
|
if(activeFor == enterBelt)
|
|
command_announcement.Announce("The station 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)
|
|
command_announcement.Announce("The station has passed the radiation belt. Please 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 living_mob_list)
|
|
var/area/A = get_area(C)
|
|
if(!A)
|
|
continue
|
|
if(isNotStationLevel(A.z))
|
|
continue
|
|
if(A.flags & RAD_SHIELDED)
|
|
continue
|
|
|
|
if(istype(C,/mob/living/carbon/human))
|
|
var/mob/living/carbon/human/H = C
|
|
if(H.is_diona())
|
|
var/damage = rand(15, 30)
|
|
H.adjustToxLoss(-damage)
|
|
if(prob(5))
|
|
damage = rand(20, 60)
|
|
H.adjustToxLoss(-damage)
|
|
to_chat(H, "<span class='notice'>You can feel flow of energy which makes you regenerate.</span>")
|
|
|
|
H.apply_effect((rand(15,30)),IRRADIATE,blocked = H.getarmor(null, "rad"))
|
|
if(prob(4))
|
|
H.apply_effect((rand(20,60)),IRRADIATE,blocked = H.getarmor(null, "rad"))
|
|
if (prob(75))
|
|
randmutb(H) // Applies bad mutation
|
|
domutcheck(H,null,MUTCHK_FORCED)
|
|
else
|
|
randmutg(H) // Applies good mutation
|
|
domutcheck(H,null,MUTCHK_FORCED)
|
|
|
|
/datum/event/radiation_storm/end()
|
|
revoke_maint_all_access()
|
|
|
|
/datum/event/radiation_storm/syndicate/radiate()
|
|
return
|