mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Radiation from contaminated objects no longer produces power in rad collectors (#18471)
* someone fucking broke tails again thanks guys * Radiation from contamination no longer produces power * oops teehee
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
#define COMSIG_ATOM_ACID_ACT "atom_acid_act"
|
#define COMSIG_ATOM_ACID_ACT "atom_acid_act"
|
||||||
///from base of atom/emag_act(): (/mob/user)
|
///from base of atom/emag_act(): (/mob/user)
|
||||||
#define COMSIG_ATOM_EMAG_ACT "atom_emag_act"
|
#define COMSIG_ATOM_EMAG_ACT "atom_emag_act"
|
||||||
///! from base of atom/rad_act(intensity)
|
///! from base of atom/rad_act(intensity, collectable_radiation)
|
||||||
#define COMSIG_ATOM_RAD_ACT "atom_rad_act"
|
#define COMSIG_ATOM_RAD_ACT "atom_rad_act"
|
||||||
///from base of atom/narsie_act(): ()
|
///from base of atom/narsie_act(): ()
|
||||||
#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act"
|
#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act"
|
||||||
|
|||||||
@@ -25,11 +25,11 @@
|
|||||||
continue
|
continue
|
||||||
processing_list += thing.contents
|
processing_list += thing.contents
|
||||||
|
|
||||||
/proc/radiation_pulse(atom/source, intensity, range_modifier, log=FALSE, can_contaminate=TRUE)
|
/proc/radiation_pulse(atom/source, intensity, range_modifier, log=FALSE, can_contaminate=TRUE, collectable_radiation = TRUE)
|
||||||
if(!SSradiation.can_fire)
|
if(!SSradiation.can_fire)
|
||||||
return
|
return
|
||||||
for(var/dir in GLOB.cardinals)
|
for(var/dir in GLOB.cardinals)
|
||||||
new /datum/radiation_wave(source, dir, intensity, range_modifier, can_contaminate)
|
new /datum/radiation_wave(source, dir, intensity, range_modifier, can_contaminate, collectable_radiation)
|
||||||
|
|
||||||
var/list/things = get_rad_contents(source) //copypasta because I don't want to put special code in waves to handle their origin
|
var/list/things = get_rad_contents(source) //copypasta because I don't want to put special code in waves to handle their origin
|
||||||
for(var/k in 1 to things.len)
|
for(var/k in 1 to things.len)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
/datum/component/radioactive/process(delta_time)
|
/datum/component/radioactive/process(delta_time)
|
||||||
if(!DT_PROB(50, delta_time))
|
if(!DT_PROB(50, delta_time))
|
||||||
return
|
return
|
||||||
radiation_pulse(parent, strength, RAD_DISTANCE_COEFFICIENT*2, FALSE, can_contaminate)
|
radiation_pulse(parent, strength, RAD_DISTANCE_COEFFICIENT*2, FALSE, can_contaminate, collectable_radiation=FALSE)
|
||||||
if(!hl3_release_date)
|
if(!hl3_release_date)
|
||||||
return
|
return
|
||||||
strength -= strength / hl3_release_date
|
strength -= strength / hl3_release_date
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
to_chat(user, "<span class ='warning'>[out.Join()]</span>")
|
to_chat(user, "<span class ='warning'>[out.Join()]</span>")
|
||||||
|
|
||||||
/datum/component/radioactive/proc/rad_attack(datum/source, atom/movable/target, mob/living/user)
|
/datum/component/radioactive/proc/rad_attack(datum/source, atom/movable/target, mob/living/user)
|
||||||
radiation_pulse(parent, strength/20)
|
radiation_pulse(parent, strength/20, collectable_radiation=FALSE)
|
||||||
target.rad_act(strength/2)
|
target.rad_act(strength/2)
|
||||||
if(!hl3_release_date)
|
if(!hl3_release_date)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -7,8 +7,9 @@
|
|||||||
var/move_dir //The direction of movement
|
var/move_dir //The direction of movement
|
||||||
var/list/__dirs //The directions to the side of the wave, stored for easy looping
|
var/list/__dirs //The directions to the side of the wave, stored for easy looping
|
||||||
var/can_contaminate
|
var/can_contaminate
|
||||||
|
var/collectable_radiation = FALSE //If this radiation is collectable by a rad collector, passed from creating radiation pulse
|
||||||
|
|
||||||
/datum/radiation_wave/New(atom/_source, dir, _intensity=0, _range_modifier=RAD_DISTANCE_COEFFICIENT, _can_contaminate=TRUE)
|
/datum/radiation_wave/New(atom/_source, dir, _intensity=0, _range_modifier=RAD_DISTANCE_COEFFICIENT, _can_contaminate=TRUE, _collectable_radiation=FALSE)
|
||||||
|
|
||||||
source = "[_source] \[[REF(_source)]\]"
|
source = "[_source] \[[REF(_source)]\]"
|
||||||
|
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
intensity = _intensity
|
intensity = _intensity
|
||||||
range_modifier = _range_modifier
|
range_modifier = _range_modifier
|
||||||
can_contaminate = _can_contaminate
|
can_contaminate = _can_contaminate
|
||||||
|
collectable_radiation = _collectable_radiation
|
||||||
|
|
||||||
START_PROCESSING(SSradiation, src)
|
START_PROCESSING(SSradiation, src)
|
||||||
|
|
||||||
@@ -99,7 +101,7 @@
|
|||||||
var/atom/thing = atoms[k]
|
var/atom/thing = atoms[k]
|
||||||
if(!thing)
|
if(!thing)
|
||||||
continue
|
continue
|
||||||
thing.rad_act(strength)
|
thing.rad_act(strength, collectable_radiation)
|
||||||
|
|
||||||
// This list should only be for types which don't get contaminated but you want to look in their contents
|
// This list should only be for types which don't get contaminated but you want to look in their contents
|
||||||
// If you don't want to look in their contents and you don't want to rad_act them:
|
// If you don't want to look in their contents and you don't want to rad_act them:
|
||||||
|
|||||||
@@ -700,8 +700,8 @@
|
|||||||
*
|
*
|
||||||
* Default behaviour is to send COMSIG_ATOM_RAD_ACT and return
|
* Default behaviour is to send COMSIG_ATOM_RAD_ACT and return
|
||||||
*/
|
*/
|
||||||
/atom/proc/rad_act(strength)
|
/atom/proc/rad_act(strength, collectable_radiation)
|
||||||
SEND_SIGNAL(src, COMSIG_ATOM_RAD_ACT, strength)
|
SEND_SIGNAL(src, COMSIG_ATOM_RAD_ACT, strength, collectable_radiation)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Respond to narsie eating our atom
|
* Respond to narsie eating our atom
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
loop.last_radiation = radiation_count
|
loop.last_radiation = radiation_count
|
||||||
loop.start()
|
loop.start()
|
||||||
|
|
||||||
/obj/item/geiger_counter/rad_act(amount)
|
/obj/item/geiger_counter/rad_act(amount, collectable_radiation)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(amount <= RAD_BACKGROUND_RADIATION || !scanning)
|
if(amount <= RAD_BACKGROUND_RADIATION || !scanning)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -592,7 +592,7 @@
|
|||||||
/turf/open/proc/ClearWet()//Nuclear option of immediately removing slipperyness from the tile instead of the natural drying over time
|
/turf/open/proc/ClearWet()//Nuclear option of immediately removing slipperyness from the tile instead of the natural drying over time
|
||||||
qdel(GetComponent(/datum/component/wet_floor))
|
qdel(GetComponent(/datum/component/wet_floor))
|
||||||
|
|
||||||
/turf/open/rad_act(pulse_strength)
|
/turf/open/rad_act(pulse_strength, collectable_radiation)
|
||||||
. = ..()
|
. = ..()
|
||||||
if (air.get_moles(/datum/gas/carbon_dioxide) && air.get_moles(/datum/gas/oxygen) && !(air.get_moles(/datum/gas/hypernoblium)>=REACTION_OPPRESSION_THRESHOLD))
|
if (air.get_moles(/datum/gas/carbon_dioxide) && air.get_moles(/datum/gas/oxygen) && !(air.get_moles(/datum/gas/hypernoblium)>=REACTION_OPPRESSION_THRESHOLD))
|
||||||
pulse_strength = min(pulse_strength,air.get_moles(/datum/gas/carbon_dioxide)*1000,air.get_moles(/datum/gas/oxygen)*2000) //Ensures matter is conserved properly
|
pulse_strength = min(pulse_strength,air.get_moles(/datum/gas/carbon_dioxide)*1000,air.get_moles(/datum/gas/oxygen)*2000) //Ensures matter is conserved properly
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
if(msg && ishuman(wearer))
|
if(msg && ishuman(wearer))
|
||||||
wearer.show_message("[icon2html(src, wearer)]<b>[span_robot("[msg]")]</b>", MSG_VISUAL)
|
wearer.show_message("[icon2html(src, wearer)]<b>[span_robot("[msg]")]</b>", MSG_VISUAL)
|
||||||
|
|
||||||
/obj/item/clothing/head/helmet/space/hardsuit/rad_act(amount)
|
/obj/item/clothing/head/helmet/space/hardsuit/rad_act(amount, collectable_radiation)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(amount <= RAD_BACKGROUND_RADIATION)
|
if(amount <= RAD_BACKGROUND_RADIATION)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -1050,7 +1050,7 @@
|
|||||||
G.Recall()
|
G.Recall()
|
||||||
to_chat(G, span_holoparasite("Your summoner has changed form!"))
|
to_chat(G, span_holoparasite("Your summoner has changed form!"))
|
||||||
|
|
||||||
/mob/living/rad_act(amount)
|
/mob/living/rad_act(amount, collectable_radiation)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
if(!amount || (amount < RAD_MOB_SKIN_PROTECTION) || HAS_TRAIT(src, TRAIT_RADIMMUNE))
|
if(!amount || (amount < RAD_MOB_SKIN_PROTECTION) || HAS_TRAIT(src, TRAIT_RADIMMUNE))
|
||||||
|
|||||||
@@ -296,9 +296,9 @@
|
|||||||
else
|
else
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/obj/machinery/power/rad_collector/rad_act(pulse_strength)
|
/obj/machinery/power/rad_collector/rad_act(pulse_strength, collectable_radiation)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(loaded_tank && active && pulse_strength > RAD_COLLECTOR_EFFICIENCY)
|
if(loaded_tank && active && collectable_radiation && pulse_strength > RAD_COLLECTOR_EFFICIENCY)
|
||||||
stored_power += (pulse_strength-RAD_COLLECTOR_EFFICIENCY)*RAD_COLLECTOR_COEFFICIENT*(machine_tier+power_bonus)
|
stored_power += (pulse_strength-RAD_COLLECTOR_EFFICIENCY)*RAD_COLLECTOR_COEFFICIENT*(machine_tier+power_bonus)
|
||||||
|
|
||||||
/obj/machinery/power/rad_collector/update_icon()
|
/obj/machinery/power/rad_collector/update_icon()
|
||||||
|
|||||||
Reference in New Issue
Block a user