mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Radiation Rework (#28320)
* initial changes * Rad wave is working. now to implement the rest * Makes the waves square * Makes wave square * multiplies the strength in all instances of radiation_pulse by 4 because each pulse makes one wave instead of 4 now * Undef thing and apply suggestion * Make radiation_pulse() not radiate the radiation source and implements contamination * Adds contamination to uranium walls and meteors * Fixes stuff * Handle some contamination on attack still need to take care of meteors * Fixed the meteor stuff * Introduce emission types * moves contaminate_touch to an atom proc and renames it to contaminate_atom * deduplicates some contamination code * Move inherent radioactivity to a component and signals from the atom vars and behaviour * fix some things with the new component * Update inherent_radioactivity.dm * implement contaminating things that hit things that are inherently radioactive * window things * adds emission type to the rad_act call * Changes radiation insulation values on a bunch of stuff * fixes radioactive component radiating the wrong type * more adjustments * refactros rad_act * adjustments to collector power production * Adds plastitaniumglass windows and makes further adjustments * Adds sprites to the shards and plastitanium directional window * Update misc_cleanables.dm * removes alpha rad insulation from floor turfs * Fixes a bug with the starting tile of radiation waves * More adjustments * Adjusting singularity rad production * reduces window half life a bit to make power smoother and buffs full window rad conversion * Strengthens gamma and beta radiation effect on mobs. * Makes radsuit block radiation completely * Fixes Geiger Counters * Fixes contamination not irradiating the contaminated thing * Fixes inherent radioactivity not processing. Also makes it stop processing when a nuke core is contained * Fixes ghost contamination * Adds info to the collector * Handles alpha radiation better on humans and changes some instances of rad_act to base_rad_act * oops * adjustments and fixes to alpha rad handling on mobs * Make collector info more compact * Core no longer radiates and contaminates from within the nuke until the plates are removed * Contamination no longer counts as being inside a mob(it is supposed to be surface level) * Adds inherent radioactivity to a bunch of uranium things. makes it all process. * Nerf full windows * Adjustments to collector and fulltile window radiation absorption * Reduces passive contamination, especially while on the floor * Adds different rad types to the geiger counter and fixes a runtime * Makes full tile windows strong again and disallows building them on top of collectors * adds emissive blockers to the rad blacklist and gives windows and collectors priority when irradiating for increased consistency * Gives each contamination type it's own color. * Gives each contamination type it's own color. And makes the rad hud display them separately * Changes how much the radiation wave affects the source tile, adds decay for performance reasons and adjusts collector parameters as well as SM and singulo rad production * improves performance at very high rad amounts * Fixes supermatter sliver box not containing radiation * Restores supermatter sliver to old behaviour(not inherently radioactive) * Slight nerf to fulltile windows and removes an unnecessary multiplication from rad wave processing * Removes redundant line from window rad act * Fixes radiation waves ignoring walls * fixes it better * more adjustments to collector stats * Adjustment to collector gamma absorption * increases grille beta blocking * Review changes
This commit is contained in:
committed by
GitHub
parent
e29a599118
commit
ebf7fdbfd2
@@ -6,7 +6,7 @@
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
explosion_block = 50
|
||||
rad_insulation = RAD_FULL_INSULATION
|
||||
rad_insulation_beta = RAD_FULL_INSULATION
|
||||
opacity = TRUE
|
||||
density = TRUE
|
||||
blocks_air = TRUE
|
||||
|
||||
@@ -98,10 +98,7 @@
|
||||
if(msg && ishuman(wearer))
|
||||
wearer.show_message("<b><span class='robot'>[msg]</span></b>", 1)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/rad_act(amount)
|
||||
. = ..()
|
||||
if(amount <= RAD_BACKGROUND_RADIATION)
|
||||
return
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/rad_act(atom/source, amount, emission_type)
|
||||
current_tick_amount += amount
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/process()
|
||||
|
||||
@@ -140,6 +140,9 @@
|
||||
"Drask" = 'icons/mob/clothing/species/drask/head/utility.dmi',
|
||||
"Kidan" = 'icons/mob/clothing/species/kidan/head/utility.dmi'
|
||||
)
|
||||
rad_insulation_alpha = RAD_FULL_INSULATION
|
||||
rad_insulation_beta = RAD_FULL_INSULATION
|
||||
rad_insulation_gamma = RAD_FULL_INSULATION
|
||||
|
||||
/obj/item/clothing/suit/radiation
|
||||
name = "radiation suit"
|
||||
@@ -170,3 +173,6 @@
|
||||
"Drask" = 'icons/mob/clothing/species/drask/suits/utility.dmi',
|
||||
"Kidan" = 'icons/mob/clothing/species/kidan/suits/utility.dmi'
|
||||
)
|
||||
rad_insulation_alpha = RAD_FULL_INSULATION
|
||||
rad_insulation_beta = RAD_FULL_INSULATION
|
||||
rad_insulation_gamma = RAD_FULL_INSULATION
|
||||
|
||||
@@ -419,14 +419,11 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
icon_state = "coin_uranium_heads"
|
||||
materials = list(MAT_URANIUM = 400)
|
||||
credits = 160
|
||||
COOLDOWN_DECLARE(radiation_cooldown)
|
||||
|
||||
/obj/item/coin/uranium/attack_self__legacy__attackchain(mob/user)
|
||||
..()
|
||||
if(!COOLDOWN_FINISHED(src, radiation_cooldown))
|
||||
return
|
||||
radiation_pulse(src, 50)
|
||||
COOLDOWN_START(src, radiation_cooldown, 1.5 SECONDS)
|
||||
/obj/item/coin/uranium/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/component/inherent_radioactivity/radioactivity = AddComponent(/datum/component/inherent_radioactivity, 50, 0, 0, 1.5)
|
||||
START_PROCESSING(SSradiation, radioactivity)
|
||||
|
||||
/obj/item/coin/clown
|
||||
cmineral = "bananium"
|
||||
|
||||
@@ -1406,3 +1406,12 @@ so that different stomachs can handle things in different ways VB*/
|
||||
M.update_revive()
|
||||
add_attack_logs(M, M, "Revived with Lazarus Reagent")
|
||||
SSblackbox.record_feedback("tally", "players_revived", 1, "lazarus_reagent")
|
||||
|
||||
/mob/living/carbon/is_inside_mob(atom/thing)
|
||||
if(!(..()))
|
||||
return FALSE
|
||||
if(head && head.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(wear_suit && wear_suit.UID() == thing.UID())
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -837,3 +837,47 @@ emp_act
|
||||
|
||||
/mob/living/carbon/human/canBeHandcuffed()
|
||||
return has_left_hand() || has_right_hand()
|
||||
|
||||
/// Returns a list. The first element is whether we penetrated all clothing for the zone, the rest are the clothes that got contaminated
|
||||
/mob/living/carbon/human/proc/rad_contaminate_zone(zone_flag, pocket = FALSE)
|
||||
// This is for items inside of the mob
|
||||
if(!zone_flag)
|
||||
return list(TRUE)
|
||||
var/list/garments = list()
|
||||
var/list/contaminate = list()
|
||||
var/passed = TRUE
|
||||
// items in our pocket are treated uniquely as they are outside of the mob but also under most of its clothing
|
||||
if(pocket)
|
||||
garments = list(w_uniform)
|
||||
else
|
||||
// the suit is worn on top of all other stuff so it needs to be checked first
|
||||
if(wear_suit)
|
||||
garments = list(wear_suit)
|
||||
for(var/obj/item/clothing/garment in contents)
|
||||
if(garment.body_parts_covered & zone_flag)
|
||||
garments |= garment
|
||||
// If we have a suit push it to the start of the list
|
||||
if(wear_suit)
|
||||
garments -= wear_suit
|
||||
garments = list(wear_suit) + garments
|
||||
|
||||
while(length(garments) && passed)
|
||||
var/obj/item/clothing/garment = garments[1]
|
||||
garments -= garment
|
||||
passed = prob((garment.permeability_coefficient * 100) - 1) && !(garment.flags_2 & RAD_PROTECT_CONTENTS_2)
|
||||
if(garment.flags_2 & RAD_NO_CONTAMINATE_2)
|
||||
continue
|
||||
contaminate += garment
|
||||
|
||||
return list(passed) + contaminate
|
||||
|
||||
/// Tries to contaminate a human
|
||||
/mob/living/carbon/human/contaminate_atom(atom/source, intensity, emission_type, zone = null)
|
||||
if(!zone)
|
||||
zone = hit_zone_to_clothes_zone(ran_zone())
|
||||
var/list/to_contaminate = rad_contaminate_zone(zone)
|
||||
if(to_contaminate[1])
|
||||
to_contaminate += src
|
||||
to_contaminate -= to_contaminate[1]
|
||||
for(var/atom/thing in to_contaminate)
|
||||
thing.AddComponent(/datum/component/radioactive, intensity, source, emission_type)
|
||||
|
||||
@@ -1502,7 +1502,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
if(prob(current_size * 5) && hand.w_class >= ((11-current_size)/2) && drop_item_to_ground(hand))
|
||||
step_towards(hand, src)
|
||||
to_chat(src, "<span class='warning'>\The [S] pulls \the [hand] from your grip!</span>")
|
||||
rad_act(current_size * 3)
|
||||
base_rad_act(S, current_size * 3, GAMMA_RAD)
|
||||
|
||||
/mob/living/carbon/human/narsie_act()
|
||||
if(iswizard(src) || IS_CULTIST(src)) // Wizards are immune to the magic. Cultists also don't get transformed.
|
||||
@@ -2132,3 +2132,35 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
hallucination_to_make = string_path
|
||||
new hallucination_to_make(get_turf(src), src)
|
||||
|
||||
/// Checks if an item is inside the body of the mob
|
||||
/mob/living/carbon/human/is_inside_mob(atom/thing)
|
||||
if(!(..()))
|
||||
return FALSE
|
||||
if(w_uniform && w_uniform.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(shoes && shoes.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(belt && belt.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(gloves && gloves.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(neck && neck.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(glasses && glasses.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(l_ear && l_ear.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(r_ear && r_ear.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(wear_id && wear_id.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(wear_pda && wear_pda.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(r_store && r_store.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(l_store && l_store.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(s_store && s_store.UID() == thing.UID())
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -342,9 +342,15 @@
|
||||
prefix = "Uranium"
|
||||
special_names = list("Oxide", "Rod", "Meltdown")
|
||||
|
||||
/datum/species/golem/uranium/handle_life(mob/living/carbon/human/H)
|
||||
radiation_pulse(H, 20)
|
||||
..()
|
||||
/datum/species/golem/uranium/on_species_gain(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
var/datum/component/inherent_radioactivity/radioactivity = H.AddComponent(/datum/component/inherent_radioactivity, 40, 0, 0)
|
||||
START_PROCESSING(SSradiation, radioactivity)
|
||||
|
||||
/datum/species/golem/uranium/on_species_loss(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
var/datum/component/inherent_radioactivity/rads = H.GetComponent(/datum/component/inherent_radioactivity)
|
||||
rads.RemoveComponent()
|
||||
|
||||
//Ventcrawler
|
||||
/datum/species/golem/plastic
|
||||
|
||||
@@ -1040,9 +1040,13 @@
|
||||
..()
|
||||
update_z(new_turf?.z)
|
||||
|
||||
/mob/living/rad_act(amount)
|
||||
. = ..()
|
||||
|
||||
/mob/living/rad_act(atom/source, amount, emission_type)
|
||||
// Mobs block very little Beta and Gamma radiation, but we still want the rads to affect them.
|
||||
if(emission_type > ALPHA_RAD)
|
||||
amount /= (1 - RAD_MOB_INSULATION)
|
||||
// Alpha sources outside the body don't do much
|
||||
else if(!is_inside_mob(source))
|
||||
amount /= 100
|
||||
if(!amount || (amount < RAD_MOB_SKIN_PROTECTION) || HAS_TRAIT(src, TRAIT_RADIMMUNE))
|
||||
return
|
||||
|
||||
@@ -1054,9 +1058,22 @@
|
||||
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), IRRADIATE, ARMOUR_VALUE_TO_PERCENTAGE(blocked))
|
||||
|
||||
/mob/living/proc/is_inside_mob(atom/thing)
|
||||
if(!(thing in contents))
|
||||
return FALSE
|
||||
if(l_hand && l_hand.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(r_hand && r_hand.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(back && back.UID() == thing.UID())
|
||||
return FALSE
|
||||
if(wear_mask && wear_mask.UID() == thing.UID())
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/mob/living/proc/fakefireextinguish()
|
||||
return
|
||||
|
||||
|
||||
@@ -1417,14 +1417,15 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
*/
|
||||
/mob/proc/show_rads(range)
|
||||
for(var/turf/place in range(range, src))
|
||||
var/rads = SSradiation.get_turf_radiation(place)
|
||||
if(rads < RAD_BACKGROUND_RADIATION)
|
||||
var/list/rads = SSradiation.get_turf_radiation(place)
|
||||
if(!rads || (rads[1] + rads[2] + rads[3]) < RAD_BACKGROUND_RADIATION)
|
||||
continue
|
||||
|
||||
var/strength = round(rads / 1000, 0.1)
|
||||
var/alpha_strength = round(rads[1] / 1000, 0.1)
|
||||
var/beta_strength = round(rads[2] / 1000, 0.1)
|
||||
var/gamma_strength = round(rads[3] / 1000, 0.1)
|
||||
var/image/pic = image(loc = place)
|
||||
var/mutable_appearance/MA = new()
|
||||
MA.maptext = MAPTEXT("[strength]k")
|
||||
MA.maptext = MAPTEXT("Α [alpha_strength]k\nΒ [beta_strength]k\nΓ [gamma_strength]k")
|
||||
MA.color = "#04e604"
|
||||
MA.layer = RAD_TEXT_LAYER
|
||||
MA.plane = GAME_PLANE
|
||||
|
||||
@@ -244,6 +244,30 @@
|
||||
|
||||
return zone
|
||||
|
||||
/// Convert the impact zone of a projectile to a clothing zone we can do a contamination check on
|
||||
/proc/hit_zone_to_clothes_zone(zone)
|
||||
switch(zone)
|
||||
if("head")
|
||||
return HEAD
|
||||
if("chest")
|
||||
return UPPER_TORSO
|
||||
if("l_hand")
|
||||
return HANDS
|
||||
if("r_hand")
|
||||
return HANDS
|
||||
if("l_arm")
|
||||
return ARMS
|
||||
if("r_arm")
|
||||
return ARMS
|
||||
if("l_leg")
|
||||
return LEGS
|
||||
if("r_leg")
|
||||
return LEGS
|
||||
if("l_foot")
|
||||
return FEET
|
||||
if("r_foot")
|
||||
return FEET
|
||||
|
||||
/proc/above_neck(zone)
|
||||
var/list/zones = list("head", "mouth", "eyes")
|
||||
if(zones.Find(zone))
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
throwforce = 10
|
||||
var/datum/mind/mind
|
||||
blocks_emissive = EMISSIVE_BLOCK_GENERIC
|
||||
rad_insulation_beta = RAD_MOB_INSULATION
|
||||
rad_insulation_gamma = RAD_MOB_INSULATION
|
||||
|
||||
/// Is this mob alive, unconscious or dead?
|
||||
var/stat = CONSCIOUS // TODO: Move to /mob/living
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// stored_energy += (pulse_strength - RAD_COLLECTOR_EFFICIENCY) * RAD_COLLECTOR_COEFFICIENT
|
||||
#define RAD_COLLECTOR_EFFICIENCY 80 // radiation needs to be over this amount to get power
|
||||
#define RAD_COLLECTOR_COEFFICIENT 100
|
||||
// stored_energy += (pulse_strength - RAD_COLLECTOR_THRESHOLD) * RAD_COLLECTOR_COEFFICIENT
|
||||
#define RAD_COLLECTOR_THRESHOLD 80 // This gets subtracted from the value of absorbed radiation
|
||||
#define RAD_COLLECTOR_COEFFICIENT 400
|
||||
#define RAD_COLLECTOR_STORED_OUT 0.04 // (this * 100)% of stored power outputted per tick. Doesn't actualy change output total, lower numbers just means collectors output for longer in absence of a source
|
||||
#define RAD_COLLECTOR_OUTPUT min(stored_energy, (stored_energy * RAD_COLLECTOR_STORED_OUT) + 1000) //Produces at least 1000 watts if it has more than that stored
|
||||
|
||||
/obj/machinery/power/rad_collector
|
||||
name = "radiation collector array"
|
||||
desc = "A device which uses Hawking Radiation and plasma to produce power."
|
||||
desc = "A device which converts raditation to useable electical energy using plasma. It absorbs Beta particles extremely well, and Gamma particles to a lesser extent"
|
||||
icon = 'icons/obj/singularity.dmi'
|
||||
icon_state = "ca"
|
||||
anchored = FALSE
|
||||
@@ -14,13 +14,24 @@
|
||||
req_access = list(ACCESS_ENGINE_EQUIP)
|
||||
max_integrity = 350
|
||||
integrity_failure = 80
|
||||
rad_insulation = RAD_EXTREME_INSULATION
|
||||
rad_insulation_beta = RAD_BETA_COLLECTOR
|
||||
rad_insulation_gamma = RAD_LIGHT_INSULATION
|
||||
var/obj/item/tank/internals/plasma/loaded_tank = null
|
||||
var/stored_energy = 0
|
||||
var/active = FALSE
|
||||
var/locked = FALSE
|
||||
var/drainratio = 1
|
||||
var/powerproduction_drain = 0.001
|
||||
var/power_threshold = RAD_COLLECTOR_THRESHOLD
|
||||
var/power_coefficient = RAD_COLLECTOR_COEFFICIENT
|
||||
/// A record of the absorbed strength of each beta wave that hit the collector. This keeps record up to rad_time old, and only the maximum absorption for each time point.
|
||||
var/beta_waves = list()
|
||||
/// A record of the absorbed strength of each gamma wave that hit the collector. This keeps record up to rad_time old, and only the maximum absorption for each time point.
|
||||
var/gamma_waves = list()
|
||||
/// Amount of time across which the maximum wave is checked
|
||||
var/rad_time = 5 SECONDS
|
||||
/// The current time count for clearing old data from the lists
|
||||
var/rad_time_counter = 0
|
||||
|
||||
/obj/machinery/power/rad_collector/process()
|
||||
if(!loaded_tank)
|
||||
@@ -36,6 +47,20 @@
|
||||
var/power_produced = RAD_COLLECTOR_OUTPUT
|
||||
produce_direct_power(power_produced)
|
||||
stored_energy -= power_produced
|
||||
if(world.time > rad_time_counter)
|
||||
rad_time_counter = world.time + rad_time
|
||||
for(var/listing in gamma_waves)
|
||||
if(world.time > text2num(listing) + rad_time)
|
||||
gamma_waves -= listing
|
||||
// We put the listing in oldest to newest so as soon as we hit something new enough we can keep the rest
|
||||
else
|
||||
break
|
||||
for(var/listing in beta_waves)
|
||||
if(world.time > text2num(listing) + rad_time)
|
||||
beta_waves -= listing
|
||||
// We put the listing in oldest to newest so as soon as we hit something new enough we can keep the rest
|
||||
else
|
||||
break
|
||||
|
||||
|
||||
/obj/machinery/power/rad_collector/attack_hand(mob/user)
|
||||
@@ -109,7 +134,21 @@
|
||||
// Therefore, its units are joules per SSmachines.wait * 0.1 seconds.
|
||||
// So joules = stored_energy * SSmachines.wait * 0.1
|
||||
var/joules = stored_energy * SSmachines.wait * 0.1
|
||||
. += "<span class='notice'>[src]'s display states that it has stored <b>[DisplayJoules(joules)]</b>, and is processing <b>[DisplayPower(RAD_COLLECTOR_OUTPUT)]</b>.</span>"
|
||||
var/max_beta = 0
|
||||
var/max_gamma = 0
|
||||
// Find the maximum beta and gamma absorptions we have logged
|
||||
for(var/listing in beta_waves)
|
||||
if(max_beta < beta_waves[listing])
|
||||
max_beta = beta_waves[listing]
|
||||
for(var/listing in gamma_waves)
|
||||
if(max_gamma < gamma_waves[listing])
|
||||
max_gamma = gamma_waves[listing]
|
||||
var/beta_delta = max_beta - RAD_COLLECTOR_THRESHOLD
|
||||
var/gamma_delta = max_gamma - RAD_COLLECTOR_THRESHOLD
|
||||
. += "<span class='notice'>[src]'s display states that it has stored <b>[DisplayJoules(joules)]</b>, and is processing <b>[DisplayPower(RAD_COLLECTOR_OUTPUT)]</b></span>"
|
||||
. +="<span class='notice'>Strongest Beta absorption over the last [rad_time /(1 SECONDS)] seconds: <b>[max_beta]</b>, <b>[abs(beta_delta)]</b> [beta_delta >= 0 ? "above" : "below"] threshold</span>"
|
||||
. +="<span class='notice'>Strongest Gamma absorption over the last [rad_time /(1 SECONDS)] seconds: <b>[max_gamma]</b>, <b>[abs(gamma_delta)]</b> [gamma_delta >= 0 ? "above" : "below"] threshold</span>"
|
||||
|
||||
else
|
||||
. += "<span class='notice'><b>[src]'s display displays the words:</b> \"Power production mode. Please insert <b>Plasma</b>.\"</span>"
|
||||
|
||||
@@ -132,10 +171,21 @@
|
||||
else
|
||||
update_icons()
|
||||
|
||||
/obj/machinery/power/rad_collector/rad_act(amount)
|
||||
. = ..()
|
||||
if(loaded_tank && active && amount > RAD_COLLECTOR_EFFICIENCY)
|
||||
stored_energy += (amount - RAD_COLLECTOR_EFFICIENCY) * RAD_COLLECTOR_COEFFICIENT
|
||||
/// Converts absorbed Beta or Gamma radiation into electrical energy
|
||||
/obj/machinery/power/rad_collector/rad_act(atom/source, amount, emission_type)
|
||||
// Log the absorption at current time. If we already have one logged and the new value is bigger overwrite it.
|
||||
if(emission_type == BETA_RAD)
|
||||
if(!beta_waves["[world.time]"])
|
||||
beta_waves += list("[world.time]" = amount)
|
||||
else if(beta_waves["[world.time]"] < amount)
|
||||
beta_waves["[world.time]"] = amount
|
||||
if(emission_type == GAMMA_RAD)
|
||||
if(!gamma_waves["[world.time]"])
|
||||
gamma_waves += list("[world.time]" = amount)
|
||||
else if(gamma_waves["[world.time]"] < amount)
|
||||
gamma_waves["[world.time]"] = amount
|
||||
if(emission_type != ALPHA_RAD && loaded_tank && active && amount > power_threshold)
|
||||
stored_energy += (amount - power_threshold) * power_coefficient
|
||||
|
||||
|
||||
/obj/machinery/power/rad_collector/proc/update_icons()
|
||||
@@ -158,7 +208,7 @@
|
||||
flick("ca_deactive", src)
|
||||
update_icons()
|
||||
|
||||
#undef RAD_COLLECTOR_EFFICIENCY
|
||||
#undef RAD_COLLECTOR_THRESHOLD
|
||||
#undef RAD_COLLECTOR_COEFFICIENT
|
||||
#undef RAD_COLLECTOR_STORED_OUT
|
||||
#undef RAD_COLLECTOR_OUTPUT
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/obj/effect/accelerated_particle/proc/try_irradiate(src, atom/A)
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
L.rad_act(energy * 6)
|
||||
L.base_rad_act(src, energy * 6, GAMMA_RAD)
|
||||
else if(istype(A, /obj/machinery/the_singularitygen))
|
||||
var/obj/machinery/the_singularitygen/S = A
|
||||
S.energy += energy
|
||||
|
||||
@@ -151,7 +151,7 @@ GLOBAL_VAR_INIT(global_singulo_id, 1)
|
||||
// it might mean we are stuck in a corner somewere. So move around to try to expand.
|
||||
move()
|
||||
if(current_size >= STAGE_TWO)
|
||||
radiation_pulse(src, (energy * 4.5) + 1000, RAD_DISTANCE_COEFFICIENT, source_radius = consume_range + 1)
|
||||
radiation_pulse(src, (energy * 90) + 8000, GAMMA_RAD)
|
||||
if(prob(event_chance))//Chance for it to run a special event TODO:Come up with one or two more that fit
|
||||
event()
|
||||
eat()
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
var/hallucination_amount = (max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1))))) SECONDS
|
||||
H.AdjustHallucinate(hallucination_amount)
|
||||
var/rads = DETONATION_RADS * sqrt(1 / (get_dist(L, src) + 1))
|
||||
L.rad_act(rads)
|
||||
L.base_rad_act(src, rads, GAMMA_RAD)
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/super_matter_charge_sound = sound('sound/magic/charge.ogg')
|
||||
@@ -568,8 +568,8 @@
|
||||
var/crush_ratio = combined_gas / MOLE_CRUNCH_THRESHOLD
|
||||
|
||||
gas_coefficient = 1 + (crush_ratio ** 2 * (crush_ratio <= 1) + (crush_ratio > 1) * 2 * crush_ratio / (crush_ratio + 1)) * (plasmacomp * PLASMA_CRUNCH + o2comp * O2_CRUNCH + co2comp * CO2_CRUNCH + n2comp * N2_CRUNCH + n2ocomp * N2O_CRUNCH)
|
||||
if(prob(50))
|
||||
radiation_pulse(src, power * (gas_coefficient + max(0, ((power_transmission_bonus / 10)))))
|
||||
|
||||
radiation_pulse(src, 6 * power * (gas_coefficient + max(0, ((power_transmission_bonus / 10)))), GAMMA_RAD)
|
||||
|
||||
//Power * 0.55 * a value between 1 and 0.8
|
||||
var/device_energy = power * REACTION_POWER_MODIFIER
|
||||
@@ -597,7 +597,7 @@
|
||||
l.AdjustHallucinate(hallucination_amount, 0, 200 SECONDS)
|
||||
for(var/mob/living/l in range(src, round((power / 100) ** 0.25)))
|
||||
var/rads = (power / 10) * sqrt( 1 / max(get_dist(l, src), 1) )
|
||||
l.rad_act(rads)
|
||||
l.base_rad_act(src, rads, GAMMA_RAD)
|
||||
|
||||
//Transitions between one function and another, one we use for the fast inital startup, the other is used to prevent errors with fusion temperatures.
|
||||
//Use of the second function improves the power gain imparted by using co2
|
||||
@@ -832,7 +832,7 @@
|
||||
Consume(used)
|
||||
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE)
|
||||
|
||||
radiation_pulse(src, 150, 4)
|
||||
radiation_pulse(src, 600, GAMMA_RAD)
|
||||
|
||||
/obj/machinery/atmospherics/supermatter_crystal/Bumped(atom/movable/AM)
|
||||
|
||||
@@ -887,7 +887,7 @@
|
||||
matter_power += 200
|
||||
|
||||
//Some poor sod got eaten, go ahead and irradiate people nearby.
|
||||
radiation_pulse(src, 3000, 2, TRUE)
|
||||
radiation_pulse(src, 12000, GAMMA_RAD, TRUE)
|
||||
for(var/mob/living/L in range(10))
|
||||
investigate_log("has irradiated [key_name(L)] after consuming [AM].", "supermatter")
|
||||
if(L in view())
|
||||
|
||||
@@ -333,12 +333,12 @@
|
||||
/obj/machinery/power/port_gen/pacman/super/use_fuel()
|
||||
//produces a tiny amount of radiation when in use
|
||||
if(prob(2 * power_output))
|
||||
radiation_pulse(get_turf(src), 50)
|
||||
radiation_pulse(get_turf(src), 200, ALPHA_RAD)
|
||||
..()
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/super/explode()
|
||||
//a nice burst of radiation
|
||||
radiation_pulse(get_turf(src), 500, 2)
|
||||
radiation_pulse(get_turf(src), 2000, ALPHA_RAD)
|
||||
explosion(loc, 3, 3, 5, 3)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -343,9 +343,9 @@ GLOBAL_LIST_EMPTY(gravity_generators)
|
||||
|
||||
|
||||
/obj/machinery/gravity_generator/main/proc/pulse_radiation()
|
||||
radiation_pulse(src, 600, 2)
|
||||
radiation_pulse(src, 2400, BETA_RAD)
|
||||
for(var/mob/living/L in view(7, src)) //Windows kinda make it a non threat, no matter how much I amp it up, so let us cheat a little
|
||||
radiation_pulse(get_turf(L), 600, 2)
|
||||
radiation_pulse(get_turf(L), 2400, BETA_RAD)
|
||||
|
||||
/**
|
||||
* Shake everyone on the area list and play an alarm to let them know that gravity was enagaged/disenagaged.
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
tap.radio.autosay("Bluespace harvester has released a spike of radiation!", tap, "Engineering")
|
||||
|
||||
/datum/engi_event/bluespace_tap_event/radiation/on_start()
|
||||
radiation_pulse(tap, 3000, 7)
|
||||
radiation_pulse(tap, 12000, BETA_RAD)
|
||||
|
||||
// electrical arc
|
||||
/datum/engi_event/bluespace_tap_event/electric_arc
|
||||
|
||||
Reference in New Issue
Block a user