mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Modernizing Radiation -- TL;DR: Radiation is now a status effect healed by tox healing, and contamination is removed (#62265)
Implements the Modernizing radiation design document ( https://hackmd.io/@tgstation/rJNIyeBHt ) and replaces the current radiation sources with the new system, as well as replacing/removing a bunch of old consumers of radiation that either had no reason to exist, or could be replaced by something else. Diverges from the doc in that items radiation don't go up like explained. I was going to, but items get irradiated so easily that it just feels pretty lame. Items still get irradiated, but it's mostly just so that radiation sources look cooler (wow, lots of stuff around going green), and for things like the geiger counter. Instead of the complicated radiation_wave system, radiation now just checks everything between the radiation source and the potential target, losing power along the way based on the radiation insulation of whats in between. If this reaches too low a point (specified by radiation_pulse consumers), then the radiation will not pass. Otherwise, will roll a chance to irradiate. Uranium structures allow a delay before irradiating, so stay away!
This commit is contained in:
@@ -472,7 +472,6 @@
|
||||
if(prob(current_size * 5) && hand.w_class >= ((11-current_size)/2) && dropItemToGround(hand))
|
||||
step_towards(hand, src)
|
||||
to_chat(src, span_warning("\The [S] pulls \the [hand] from your grip!"))
|
||||
rad_act(current_size * 3)
|
||||
|
||||
#define CPR_PANIC_SPEED (0.8 SECONDS)
|
||||
|
||||
|
||||
@@ -78,10 +78,6 @@
|
||||
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "brain_damage")
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/handle_mutations_and_radiation(delta_time, times_fired)
|
||||
if(!dna || !dna.species.handle_mutations_and_radiation(src, delta_time, times_fired))
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/breathe()
|
||||
if(!HAS_TRAIT(src, TRAIT_NOBREATH))
|
||||
return ..()
|
||||
|
||||
@@ -1216,32 +1216,26 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
*
|
||||
* Arguments:
|
||||
* - [source][/mob/living/carbon/human]: The mob requesting handling
|
||||
* - time_since_irradiated: The amount of time since the mob was first irradiated
|
||||
* - delta_time: The amount of time that has passed since the last tick
|
||||
* - times_fired: The number of times SSmobs has fired
|
||||
*/
|
||||
/datum/species/proc/handle_mutations_and_radiation(mob/living/carbon/human/source, delta_time, times_fired)
|
||||
if(HAS_TRAIT(source, TRAIT_RADIMMUNE))
|
||||
source.radiation = 0
|
||||
return TRUE
|
||||
|
||||
. = FALSE
|
||||
var/radiation = source.radiation
|
||||
if(radiation > RAD_MOB_KNOCKDOWN && DT_PROB(RAD_MOB_KNOCKDOWN_PROB, delta_time))
|
||||
/datum/species/proc/handle_radiation(mob/living/carbon/human/source, time_since_irradiated, delta_time)
|
||||
if(time_since_irradiated > RAD_MOB_KNOCKDOWN && DT_PROB(RAD_MOB_KNOCKDOWN_PROB, delta_time))
|
||||
if(!source.IsParalyzed())
|
||||
source.emote("collapse")
|
||||
source.Paralyze(RAD_MOB_KNOCKDOWN_AMOUNT)
|
||||
to_chat(source, span_danger("You feel weak."))
|
||||
|
||||
if(radiation > RAD_MOB_VOMIT && DT_PROB(RAD_MOB_VOMIT_PROB, delta_time))
|
||||
if(time_since_irradiated > RAD_MOB_VOMIT && DT_PROB(RAD_MOB_VOMIT_PROB, delta_time))
|
||||
source.vomit(10, TRUE)
|
||||
|
||||
if(radiation > RAD_MOB_MUTATE && DT_PROB(RAD_MOB_MUTATE_PROB, delta_time))
|
||||
if(time_since_irradiated > RAD_MOB_MUTATE && DT_PROB(RAD_MOB_MUTATE_PROB, delta_time))
|
||||
to_chat(source, span_danger("You mutate!"))
|
||||
source.easy_random_mutate(NEGATIVE + MINOR_NEGATIVE)
|
||||
source.emote("gasp")
|
||||
source.domutcheck()
|
||||
|
||||
if(radiation > RAD_MOB_HAIRLOSS && DT_PROB(RAD_MOB_HAIRLOSS_PROB, delta_time))
|
||||
if(time_since_irradiated > RAD_MOB_HAIRLOSS && DT_PROB(RAD_MOB_HAIRLOSS_PROB, delta_time))
|
||||
if(!(source.hairstyle == "Bald") && (HAIR in species_traits))
|
||||
to_chat(source, span_danger("Your hair starts to fall out in clumps..."))
|
||||
addtimer(CALLBACK(src, .proc/go_bald, source), 5 SECONDS)
|
||||
|
||||
@@ -378,17 +378,9 @@
|
||||
if(!COOLDOWN_FINISHED(src, radiation_emission_cooldown))
|
||||
return
|
||||
else
|
||||
radiation_pulse(H, 50)
|
||||
radiation_pulse(H, max_range = 1, threshold = RAD_VERY_LIGHT_INSULATION, chance = 3)
|
||||
COOLDOWN_START(src, radiation_emission_cooldown, 2 SECONDS)
|
||||
|
||||
/datum/species/golem/uranium/spec_unarmedattacked(mob/living/carbon/human/user, mob/living/carbon/human/target)
|
||||
. = ..()
|
||||
var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(user.zone_selected))
|
||||
var/radiation_block = target.run_armor_check(affecting, RAD)
|
||||
///standard damage roll for use in determining how much you irradiate per punch
|
||||
var/attacker_irradiate_value = rand(user.dna.species.punchdamagelow, user.dna.species.punchdamagehigh)
|
||||
target.apply_effect(attacker_irradiate_value*5, EFFECT_IRRADIATE, radiation_block)
|
||||
|
||||
/datum/species/golem/uranium/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
|
||||
..()
|
||||
if(COOLDOWN_FINISHED(src, radiation_emission_cooldown) && M != H && M.combat_mode)
|
||||
|
||||
@@ -100,12 +100,6 @@
|
||||
target.attack_paw(user, modifiers)
|
||||
return TRUE
|
||||
|
||||
/datum/species/monkey/handle_mutations_and_radiation(mob/living/carbon/human/source, delta_time, times_fired)
|
||||
. = ..()
|
||||
if(source.radiation > RAD_MOB_MUTATE * 2 && DT_PROB(0.25, delta_time))
|
||||
source.gorillize()
|
||||
return
|
||||
|
||||
/datum/species/monkey/check_roundstart_eligible()
|
||||
if(SSevents.holidays && SSevents.holidays[MONKEYDAY])
|
||||
return TRUE
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
inhand_icon_state = "snailshell"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/backpack_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi'
|
||||
armor = list(MELEE = 40, BULLET = 30, LASER = 30, ENERGY = 10, BOMB = 25, BIO = 0, RAD = 0, FIRE = 0, ACID = 50)
|
||||
armor = list(MELEE = 40, BULLET = 30, LASER = 30, ENERGY = 10, BOMB = 25, BIO = 0, FIRE = 0, ACID = 50)
|
||||
max_integrity = 200
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
|
||||
@@ -246,11 +246,6 @@
|
||||
else if(bz_partialpressure > 0.01)
|
||||
hallucination += 5
|
||||
|
||||
//TRITIUM
|
||||
if(breath_gases[/datum/gas/tritium])
|
||||
var/tritium_partialpressure = (breath_gases[/datum/gas/tritium][MOLES]/breath.total_moles())*breath_pressure
|
||||
radiation += tritium_partialpressure/10
|
||||
|
||||
//NITRYL
|
||||
if(breath_gases[/datum/gas/nitryl])
|
||||
var/nitryl_partialpressure = (breath_gases[/datum/gas/nitryl][MOLES]/breath.total_moles())*breath_pressure
|
||||
@@ -381,45 +376,42 @@
|
||||
hud_used.lingchemdisplay.invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
|
||||
/mob/living/carbon/handle_mutations_and_radiation(delta_time, times_fired)
|
||||
if(dna?.temporary_mutations.len)
|
||||
for(var/mut in dna.temporary_mutations)
|
||||
if(dna.temporary_mutations[mut] < world.time)
|
||||
if(mut == UI_CHANGED)
|
||||
if(dna.previous["UI"])
|
||||
dna.unique_identity = merge_text(dna.unique_identity,dna.previous["UI"])
|
||||
updateappearance(mutations_overlay_update=1)
|
||||
dna.previous.Remove("UI")
|
||||
dna.temporary_mutations.Remove(mut)
|
||||
continue
|
||||
if(mut == UF_CHANGED)
|
||||
if(dna.previous["UF"])
|
||||
dna.unique_features = merge_text(dna.unique_features,dna.previous["UF"])
|
||||
updateappearance(mutcolor_update=1, mutations_overlay_update=1)
|
||||
dna.previous.Remove("UF")
|
||||
dna.temporary_mutations.Remove(mut)
|
||||
continue
|
||||
if(mut == UE_CHANGED)
|
||||
if(dna.previous["name"])
|
||||
real_name = dna.previous["name"]
|
||||
name = real_name
|
||||
dna.previous.Remove("name")
|
||||
if(dna.previous["UE"])
|
||||
dna.unique_enzymes = dna.previous["UE"]
|
||||
dna.previous.Remove("UE")
|
||||
if(dna.previous["blood_type"])
|
||||
dna.blood_type = dna.previous["blood_type"]
|
||||
dna.previous.Remove("blood_type")
|
||||
dna.temporary_mutations.Remove(mut)
|
||||
continue
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
if(HM?.timed)
|
||||
dna.remove_mutation(HM.type)
|
||||
|
||||
radiation = max(radiation - (RAD_LOSS_PER_SECOND * delta_time), 0)
|
||||
if(radiation > RAD_MOB_SAFE)
|
||||
adjustToxLoss(log(radiation-RAD_MOB_SAFE)*RAD_TOX_COEFFICIENT*delta_time)
|
||||
/mob/living/carbon/handle_mutations(time_since_irradiated, delta_time, times_fired)
|
||||
if(!dna?.temporary_mutations.len)
|
||||
return
|
||||
|
||||
for(var/mut in dna.temporary_mutations)
|
||||
if(dna.temporary_mutations[mut] < world.time)
|
||||
if(mut == UI_CHANGED)
|
||||
if(dna.previous["UI"])
|
||||
dna.unique_identity = merge_text(dna.unique_identity,dna.previous["UI"])
|
||||
updateappearance(mutations_overlay_update=1)
|
||||
dna.previous.Remove("UI")
|
||||
dna.temporary_mutations.Remove(mut)
|
||||
continue
|
||||
if(mut == UF_CHANGED)
|
||||
if(dna.previous["UF"])
|
||||
dna.unique_features = merge_text(dna.unique_features,dna.previous["UF"])
|
||||
updateappearance(mutcolor_update=1, mutations_overlay_update=1)
|
||||
dna.previous.Remove("UF")
|
||||
dna.temporary_mutations.Remove(mut)
|
||||
continue
|
||||
if(mut == UE_CHANGED)
|
||||
if(dna.previous["name"])
|
||||
real_name = dna.previous["name"]
|
||||
name = real_name
|
||||
dna.previous.Remove("name")
|
||||
if(dna.previous["UE"])
|
||||
dna.unique_enzymes = dna.previous["UE"]
|
||||
dna.previous.Remove("UE")
|
||||
if(dna.previous["blood_type"])
|
||||
dna.blood_type = dna.previous["blood_type"]
|
||||
dna.previous.Remove("blood_type")
|
||||
dna.temporary_mutations.Remove(mut)
|
||||
continue
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
if(HM?.timed)
|
||||
dna.remove_mutation(HM.type)
|
||||
|
||||
/*
|
||||
Alcohol Poisoning Chart
|
||||
|
||||
@@ -104,9 +104,6 @@
|
||||
Immobilize(effect * hit_percent)
|
||||
if(EFFECT_UNCONSCIOUS)
|
||||
Unconscious(effect * hit_percent)
|
||||
if(EFFECT_IRRADIATE)
|
||||
if(!HAS_TRAIT(src, TRAIT_RADIMMUNE))
|
||||
radiation += max(effect * hit_percent, 0)
|
||||
if(EFFECT_SLUR)
|
||||
slurring = max(slurring,(effect * hit_percent))
|
||||
if(EFFECT_STUTTER)
|
||||
@@ -122,7 +119,7 @@
|
||||
return TRUE
|
||||
|
||||
/// applies multiple effects at once via [/mob/living/proc/apply_effect]
|
||||
/mob/living/proc/apply_effects(stun = 0, knockdown = 0, unconscious = 0, irradiate = 0, slur = 0, stutter = 0, eyeblur = 0, drowsy = 0, blocked = 0, stamina = 0, jitter = 0, paralyze = 0, immobilize = 0)
|
||||
/mob/living/proc/apply_effects(stun = 0, knockdown = 0, unconscious = 0, slur = 0, stutter = 0, eyeblur = 0, drowsy = 0, blocked = 0, stamina = 0, jitter = 0, paralyze = 0, immobilize = 0)
|
||||
if(blocked >= 100)
|
||||
return FALSE
|
||||
if(stun)
|
||||
@@ -135,8 +132,6 @@
|
||||
apply_effect(paralyze, EFFECT_PARALYZE, blocked)
|
||||
if(immobilize)
|
||||
apply_effect(immobilize, EFFECT_IMMOBILIZE, blocked)
|
||||
if(irradiate)
|
||||
apply_effect(irradiate, EFFECT_IRRADIATE, blocked)
|
||||
if(slur)
|
||||
apply_effect(slur, EFFECT_SLUR, blocked)
|
||||
if(stutter)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
if(stat != DEAD)
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation(delta_time, times_fired)
|
||||
handle_mutations(delta_time, times_fired)
|
||||
|
||||
if(stat != DEAD)
|
||||
//Breathing, if applicable
|
||||
@@ -83,8 +83,7 @@
|
||||
SEND_SIGNAL(src, COMSIG_LIVING_HANDLE_BREATHING, delta_time, times_fired)
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_mutations_and_radiation(delta_time, times_fired)
|
||||
radiation = 0 //so radiation don't accumulate in simple animals
|
||||
/mob/living/proc/handle_mutations(delta_time, times_fired)
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_diseases(delta_time, times_fired)
|
||||
|
||||
@@ -752,7 +752,6 @@
|
||||
remove_CC()
|
||||
set_disgust(0)
|
||||
losebreath = 0
|
||||
radiation = 0
|
||||
set_nutrition(NUTRITION_LEVEL_FED + 50)
|
||||
bodytemperature = get_body_temp_normal(apply_change=FALSE)
|
||||
set_blindness(0)
|
||||
@@ -1360,21 +1359,6 @@
|
||||
G.Recall()
|
||||
to_chat(G, span_holoparasite("Your summoner has changed form!"))
|
||||
|
||||
/mob/living/rad_act(amount)
|
||||
. = ..()
|
||||
|
||||
if(!amount || (amount < RAD_MOB_SKIN_PROTECTION) || HAS_TRAIT(src, TRAIT_RADIMMUNE))
|
||||
return
|
||||
|
||||
amount -= RAD_BACKGROUND_RADIATION // This will always be at least 1 because of how skin protection is calculated
|
||||
|
||||
var/blocked = getarmor(null, RAD)
|
||||
|
||||
if(amount > RAD_BURN_THRESHOLD)
|
||||
apply_damage(RAD_BURN_CURVE(amount), BURN, null, blocked)
|
||||
|
||||
apply_effect((amount*RAD_MOB_COEFFICIENT)/max(1, (radiation**2)*RAD_OVERDOSE_REDUCTION), EFFECT_IRRADIATE, blocked)
|
||||
|
||||
/mob/living/anti_magic_check(magic = TRUE, holy = FALSE, tinfoil = FALSE, chargecost = 1, self = FALSE)
|
||||
. = ..()
|
||||
if(.)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
var/on_hit_state = P.on_hit(src, armor, piercing_hit)
|
||||
if(!P.nodamage && on_hit_state != BULLET_ACT_BLOCK)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, armor, wound_bonus=P.wound_bonus, bare_wound_bonus=P.bare_wound_bonus, sharpness = P.sharpness)
|
||||
apply_effects(P.stun, P.knockdown, P.unconscious, P.irradiate, P.slur, P.stutter, P.eyeblur, P.drowsy, armor, P.stamina, P.jitter, P.paralyze, P.immobilize)
|
||||
apply_effects(P.stun, P.knockdown, P.unconscious, P.slur, P.stutter, P.eyeblur, P.drowsy, armor, P.stamina, P.jitter, P.paralyze, P.immobilize)
|
||||
if(P.dismemberment)
|
||||
check_projectile_dismemberment(P, def_zone)
|
||||
return on_hit_state ? BULLET_ACT_HIT : BULLET_ACT_BLOCK
|
||||
@@ -357,8 +357,6 @@
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
//Looking for irradiate()? It's been moved to radiation.dm under the rad_act() for mobs.
|
||||
|
||||
/mob/living/acid_act(acidpwr, acid_volume)
|
||||
take_bodypart_damage(acidpwr * min(1, acid_volume * 0.1))
|
||||
return TRUE
|
||||
|
||||
@@ -143,7 +143,6 @@
|
||||
///if it can be held, can it be equipped to any slots? (think pAI's on head)
|
||||
var/worn_slot_flags = NONE
|
||||
|
||||
var/radiation = 0 ///If the mob is irradiated.
|
||||
var/ventcrawl_layer = PIPING_LAYER_DEFAULT
|
||||
var/losebreath = 0
|
||||
|
||||
|
||||
@@ -316,7 +316,6 @@
|
||||
/obj/item/multitool/cyborg,
|
||||
/obj/item/t_scanner,
|
||||
/obj/item/analyzer,
|
||||
/obj/item/geiger_counter/cyborg,
|
||||
/obj/item/assembly/signaler/cyborg,
|
||||
/obj/item/areaeditor/blueprints/cyborg,
|
||||
/obj/item/electroadaptive_pseudocircuit,
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
mob_biotypes = MOB_ROBOTIC
|
||||
deathsound = 'sound/voice/borg_deathsound.ogg'
|
||||
speech_span = SPAN_ROBOT
|
||||
flags_1 = PREVENT_CONTENTS_EXPLOSION_1 | RAD_PROTECT_CONTENTS_1 | RAD_NO_CONTAMINATE_1
|
||||
flags_1 = PREVENT_CONTENTS_EXPLOSION_1
|
||||
examine_cursor_icon = null
|
||||
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
|
||||
var/last_lawchange_announce = 0
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
layer = ABOVE_OBJ_LAYER
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 100,ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 0, ACID = 0)
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 100,ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0)
|
||||
///What kind of projectile the actual damaging part should be.
|
||||
var/projectile_type = /obj/projectile/beam/legion
|
||||
///Time until the tracer gets shot
|
||||
|
||||
@@ -113,7 +113,7 @@ While using this makes the system rely on OnFire, it still gives options for tim
|
||||
/obj/structure/elite_tumor
|
||||
name = "pulsing tumor"
|
||||
desc = "An odd, pulsing tumor sticking out of the ground. You feel compelled to reach out and touch it..."
|
||||
armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 100, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
|
||||
armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 100, BIO = 100, FIRE = 100, ACID = 100)
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
icon = 'icons/obj/lavaland/tumor.dmi'
|
||||
icon_state = "tumor"
|
||||
|
||||
@@ -540,7 +540,7 @@
|
||||
/obj/structure/carp_rift
|
||||
name = "carp rift"
|
||||
desc = "A rift akin to the ones space carp use to travel long distances."
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 50, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 50, BIO = 100, FIRE = 100, ACID = 100)
|
||||
max_integrity = 300
|
||||
icon = 'icons/obj/carp_rift.dmi'
|
||||
icon_state = "carp_rift_carpspawn"
|
||||
@@ -655,7 +655,7 @@
|
||||
icon_state = "carp_rift_charged"
|
||||
set_light_color(LIGHT_COLOR_YELLOW)
|
||||
update_light()
|
||||
armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 100, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
|
||||
armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 100, BIO = 100, FIRE = 100, ACID = 100)
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
dragon.rifts_charged += 1
|
||||
if(dragon.rifts_charged != 3 && !dragon.objective_complete)
|
||||
|
||||
Reference in New Issue
Block a user