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:
Theos
2023-04-12 05:54:39 -04:00
committed by GitHub
parent f04c992186
commit 10d4ec7210
10 changed files with 25 additions and 23 deletions

View File

@@ -22,13 +22,13 @@
#define COMSIG_ATOM_ACID_ACT "atom_acid_act"
///from base of atom/emag_act(): (/mob/user)
#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"
///from base of atom/narsie_act(): ()
#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act"
///from base of atom/ratvar_act(): ()
#define COMSIG_ATOM_RATVAR_ACT "atom_ratvar_act"
///from base of atom/honk_act(): ()
///from base of atom/honk_act(): ()
#define COMSIG_ATOM_HONK_ACT "atom_honk_act"
///from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode)
#define COMSIG_ATOM_RCD_ACT "atom_rcd_act"

View File

@@ -25,11 +25,11 @@
continue
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)
return
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
for(var/k in 1 to things.len)

View File

@@ -42,7 +42,7 @@
/datum/component/radioactive/process(delta_time)
if(!DT_PROB(50, delta_time))
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)
return
strength -= strength / hl3_release_date
@@ -85,7 +85,7 @@
to_chat(user, "<span class ='warning'>[out.Join()]</span>")
/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)
if(!hl3_release_date)
return

View File

@@ -7,8 +7,9 @@
var/move_dir //The direction of movement
var/list/__dirs //The directions to the side of the wave, stored for easy looping
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)]\]"
@@ -22,6 +23,7 @@
intensity = _intensity
range_modifier = _range_modifier
can_contaminate = _can_contaminate
collectable_radiation = _collectable_radiation
START_PROCESSING(SSradiation, src)
@@ -99,7 +101,7 @@
var/atom/thing = atoms[k]
if(!thing)
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
// If you don't want to look in their contents and you don't want to rad_act them:

View File

@@ -700,8 +700,8 @@
*
* Default behaviour is to send COMSIG_ATOM_RAD_ACT and return
*/
/atom/proc/rad_act(strength)
SEND_SIGNAL(src, COMSIG_ATOM_RAD_ACT, strength)
/atom/proc/rad_act(strength, collectable_radiation)
SEND_SIGNAL(src, COMSIG_ATOM_RAD_ACT, strength, collectable_radiation)
/**
* Respond to narsie eating our atom
@@ -842,19 +842,19 @@
var/new_x = pixel_x
var/new_y = pixel_y
if (dir & NORTH)
new_y++
if (dir & EAST)
new_x++
if (dir & SOUTH)
new_y--
if (dir & WEST)
new_x--
pixel_x = clamp(new_x, -16, 16)
pixel_y = clamp(new_y, -16, 16)

View File

@@ -111,7 +111,7 @@
loop.last_radiation = radiation_count
loop.start()
/obj/item/geiger_counter/rad_act(amount)
/obj/item/geiger_counter/rad_act(amount, collectable_radiation)
. = ..()
if(amount <= RAD_BACKGROUND_RADIATION || !scanning)
return

View File

@@ -592,7 +592,7 @@
/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))
/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))
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

View File

@@ -70,7 +70,7 @@
if(msg && ishuman(wearer))
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)
return

View File

@@ -31,7 +31,7 @@
qdel(effect)
else
effect.be_replaced()
if(ranged_ability)
ranged_ability.remove_ranged_ability(src)
@@ -1050,7 +1050,7 @@
G.Recall()
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))

View File

@@ -82,7 +82,7 @@
for(var/gasID in using)
loaded_tank.air_contents.adjust_moles(gasID, -gasdrained)
for(var/gasID in giving)
loaded_tank.air_contents.adjust_moles(gasID, giving[gasID]*gasdrained)
@@ -296,9 +296,9 @@
else
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)
/obj/machinery/power/rad_collector/update_icon()