From 0ce450eab88521683e86dbbfc4a1474743d90187 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Tue, 2 Oct 2018 19:36:21 -0400 Subject: [PATCH] tgstation/tgstation#40662 - Stops using the rad insulation component to provide default rad insulation features in order to save a bit of memory --- code/__DEFINES/components.dm | 3 ++- code/__DEFINES/flags.dm | 4 +++ code/__HELPERS/radiation.dm | 4 +-- code/_globalvars/bitfields.dm | 4 +++ code/datums/components/mirage_border.dm | 2 +- code/datums/components/rad_insulation.dm | 3 ++- code/datums/radiation_wave.dm | 9 ++++--- code/game/atoms.dm | 6 +++-- code/game/machinery/doors/airlock.dm | 4 ++- code/game/objects/structures/false_walls.dm | 6 ++--- code/game/objects/structures/girders.dm | 6 ++--- code/game/objects/structures/grille.dm | 5 +--- code/game/objects/structures/holosign.dm | 8 +++--- code/game/objects/structures/mineral_doors.dm | 25 ++++++------------- code/game/objects/structures/signs/_signs.dm | 5 +--- code/game/objects/structures/window.dm | 6 ++--- code/game/turfs/closed.dm | 6 ++--- code/game/turfs/simulated/wall/reinf_walls.dm | 7 ++---- code/modules/clothing/suits/utility.dm | 12 ++------- code/modules/mob/living/silicon/silicon.dm | 5 +--- code/modules/power/singularity/collector.dm | 7 ++---- code/modules/recycling/disposal/bin.dm | 5 +--- code/modules/recycling/disposal/holder.dm | 5 +--- code/modules/recycling/disposal/outlet.dm | 5 +--- code/modules/recycling/disposal/pipe.dm | 5 +--- 25 files changed, 60 insertions(+), 97 deletions(-) diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index c630fd0b2f..3338fc1cda 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -69,6 +69,7 @@ #define COMSIG_ATOM_RAD_CONTAMINATING "atom_rad_contam" //from base of datum/radiation_wave/radiate(): (strength) #define COMPONENT_BLOCK_CONTAMINATION 1 #define COMSIG_ATOM_RAD_WAVE_PASSING "atom_rad_wave_pass" //from base of datum/radiation_wave/check_obstructions(): (datum/radiation_wave, width) + #define COMPONENT_RAD_WAVE_HANDLED 1 #define COMSIG_ATOM_CANREACH "atom_can_reach" //from internal loop in atom/movable/proc/CanReach(): (list/next) #define COMPONENT_BLOCK_REACH 1 #define COMSIG_ATOM_SCREWDRIVER_ACT "atom_screwdriver_act" //from base of atom/screwdriver_act(): (mob/living/user, obj/item/I) @@ -257,4 +258,4 @@ //Ouch my toes! #define CALTROP_BYPASS_SHOES 1 -#define CALTROP_IGNORE_WALKERS 2 \ No newline at end of file +#define CALTROP_IGNORE_WALKERS 2 diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index edd77ecf6b..6862aab5f7 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -78,3 +78,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define EMP_PROTECT_SELF (1<<0) #define EMP_PROTECT_CONTENTS (1<<1) #define EMP_PROTECT_WIRES (1<<2) + +// radiation +#define RAD_PROTECT_CONTENTS (1<<0) +#define RAD_NO_CONTAMINATE (1<<1) diff --git a/code/__HELPERS/radiation.dm b/code/__HELPERS/radiation.dm index a570ab43ba..e082be7d1f 100644 --- a/code/__HELPERS/radiation.dm +++ b/code/__HELPERS/radiation.dm @@ -18,7 +18,7 @@ if(ignored_things[thing.type]) continue . += thing - if(SEND_SIGNAL(thing, COMSIG_ATOM_RAD_PROBE) & COMPONENT_BLOCK_RADIATION) + if((thing.rad_flags & RAD_PROTECT_CONTENTS) || (SEND_SIGNAL(thing, COMSIG_ATOM_RAD_PROBE) & COMPONENT_BLOCK_RADIATION)) continue processing_list += thing.contents @@ -42,4 +42,4 @@ if(log) var/turf/_source_T = isturf(source) ? source : get_turf(source) log_game("Radiation pulse with intensity: [intensity] and range modifier: [range_modifier] in [loc_name(_source_T)] ") - return TRUE \ No newline at end of file + return TRUE diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 0760b81927..542f6dab40 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -167,4 +167,8 @@ GLOBAL_LIST_INIT(bitfields, list( "car_traits" = list( "CAN_KIDNAP" = CAN_KIDNAP, ), + "rad_flags" = list( + "RAD_PROTECT_CONTENTS" = RAD_PROTECT_CONTENTS, + "RAD_NO_CONTAMINATE" = RAD_NO_CONTAMINATE, + ), )) diff --git a/code/datums/components/mirage_border.dm b/code/datums/components/mirage_border.dm index f435a21f49..2e6f8f79f6 100644 --- a/code/datums/components/mirage_border.dm +++ b/code/datums/components/mirage_border.dm @@ -4,7 +4,7 @@ /datum/component/mirage_border/Initialize(turf/target, direction, range=world.view) if(!isturf(parent)) return COMPONENT_INCOMPATIBLE - if(!target || !istype(target) || !direction) + if(!target || !direction) . = COMPONENT_INCOMPATIBLE CRASH("[type] improperly instanced with the following args: target=\[[target]\], direction=\[[direction]\], range=\[[range]\]") diff --git a/code/datums/components/rad_insulation.dm b/code/datums/components/rad_insulation.dm index 1ffc141a60..73d8c29440 100644 --- a/code/datums/components/rad_insulation.dm +++ b/code/datums/components/rad_insulation.dm @@ -21,4 +21,5 @@ return COMPONENT_BLOCK_CONTAMINATION /datum/component/rad_insulation/proc/rad_pass(datum/source, datum/radiation_wave/wave, width) - wave.intensity = wave.intensity*(1-((1-amount)/width)) // The further out the rad wave goes the less it's affected by insulation (larger width) \ No newline at end of file + wave.intensity = wave.intensity*(1-((1-amount)/width)) // The further out the rad wave goes the less it's affected by insulation (larger width) + return COMPONENT_RAD_WAVE_HANDLED diff --git a/code/datums/radiation_wave.dm b/code/datums/radiation_wave.dm index 6fa1e2a476..5fb777f9c5 100644 --- a/code/datums/radiation_wave.dm +++ b/code/datums/radiation_wave.dm @@ -81,7 +81,10 @@ var/atom/thing = atoms[k] if(!thing) continue - SEND_SIGNAL(thing, COMSIG_ATOM_RAD_WAVE_PASSING, src, width) + if (SEND_SIGNAL(thing, COMSIG_ATOM_RAD_WAVE_PASSING, src, width) & COMPONENT_RAD_WAVE_HANDLED) + continue + if (thing.rad_insulation != RAD_NO_INSULATION) + intensity *= (1-((1-thing.rad_insulation)/width)) /datum/radiation_wave/proc/radiate(list/atoms, strength) var/contamination_chance = (strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_CHANCE_COEFFICIENT * min(1, 1/(steps*range_modifier)) @@ -92,7 +95,7 @@ thing.rad_act(strength) // 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: // modify the ignored_things list in __HELPERS/radiation.dm instead var/static/list/blacklisted = typecacheof(list( /turf, @@ -109,4 +112,4 @@ if(SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION) continue var/rad_strength = (strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_STR_COEFFICIENT - thing.AddComponent(/datum/component/radioactive, rad_strength, source) \ No newline at end of file + thing.AddComponent(/datum/component/radioactive, rad_strength, source) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 2af31607ea..48596a0b6d 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -32,6 +32,9 @@ var/list/filter_data //For handling persistent filters + var/rad_flags = NONE // Will move to flags_1 when i can be arsed to + var/rad_insulation = RAD_NO_INSULATION + /atom/New(loc, ...) //atom creation method that preloads variables at creation if(GLOB.use_preloader && (src.type == GLOB._preloader.target_path))//in case the instanciated atom is creating other atoms in New() @@ -697,10 +700,9 @@ Proc for attack log creation, because really why not /atom/movable/proc/get_filter(name) if(filter_data && filter_data[name]) return filters[filter_data.Find(name)] - + /atom/movable/proc/remove_filter(name) if(filter_data[name]) filter_data -= name update_filters() return TRUE - \ No newline at end of file diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 948a62de61..7188fbc50e 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -95,6 +95,9 @@ var/air_tight = FALSE //TRUE means density will be set as soon as the door begins to close var/prying_so_hard = FALSE + rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE + rad_insulation = RAD_MEDIUM_INSULATION + var/static/list/airlock_overlays = list() /obj/machinery/door/airlock/Initialize() @@ -152,7 +155,6 @@ /obj/machinery/door/airlock/ComponentInitialize() . = ..() AddComponent(/datum/component/ntnet_interface) - AddComponent(/datum/component/rad_insulation, RAD_MEDIUM_INSULATION) /obj/machinery/door/airlock/proc/update_other_id() for(var/obj/machinery/door/airlock/A in GLOB.airlocks) diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 5878b569c3..d52ec81a05 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -24,6 +24,8 @@ smooth = SMOOTH_TRUE can_be_unanchored = FALSE CanAtmosPass = ATMOS_PASS_DENSITY + rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE + rad_insulation = RAD_MEDIUM_INSULATION var/mineral = /obj/item/stack/sheet/metal var/mineral_amount = 2 var/walltype = /turf/closed/wall @@ -34,10 +36,6 @@ . = ..() air_update_turf(TRUE) -/obj/structure/falsewall/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_MEDIUM_INSULATION) - /obj/structure/falsewall/ratvar_act() new /obj/structure/falsewall/brass(loc) qdel(src) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index b319aab537..cd87075258 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -9,10 +9,8 @@ var/girderpasschance = 20 // percentage chance that a projectile passes through the girder. var/can_displace = TRUE //If the girder can be moved around by wrenching it max_integrity = 200 - -/obj/structure/girder/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_VERY_LIGHT_INSULATION) + rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE + rad_insulation = RAD_VERY_LIGHT_INSULATION /obj/structure/girder/examine(mob/user) . = ..() diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 93ce26e0ae..6fac5da2a5 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -16,10 +16,7 @@ var/rods_broken = TRUE var/grille_type = null var/broken_type = /obj/structure/grille/broken - -/obj/structure/grille/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) + rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE /obj/structure/grille/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) . = ..() diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm index c5c8dd3c68..609384cdda 100644 --- a/code/game/objects/structures/holosign.dm +++ b/code/game/objects/structures/holosign.dm @@ -63,10 +63,8 @@ /obj/structure/holosign/barrier/engineering icon_state = "holosign_engi" - -/obj/structure/holosign/barrier/engineering/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_LIGHT_INSULATION) + rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE + rad_insulation = RAD_LIGHT_INSULATION /obj/structure/holosign/barrier/atmos name = "holo firelock" @@ -168,4 +166,4 @@ var/mob/living/M = AM M.electrocute_act(15,"Energy Barrier", safety=1) shockcd = TRUE - addtimer(CALLBACK(src, .proc/cooldown), 5) \ No newline at end of file + addtimer(CALLBACK(src, .proc/cooldown), 5) diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index c3316f2568..3c9b70e967 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -21,15 +21,14 @@ var/openSound = 'sound/effects/stonedoor_openclose.ogg' var/closeSound = 'sound/effects/stonedoor_openclose.ogg' CanAtmosPass = ATMOS_PASS_DENSITY + rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE + rad_insulation = RAD_MEDIUM_INSULATION /obj/structure/mineral_door/Initialize() . = ..() initial_state = icon_state air_update_turf(TRUE) -/obj/structure/mineral_door/ComponentInitialize() - AddComponent(/datum/component/rad_insulation, RAD_MEDIUM_INSULATION) - /obj/structure/mineral_door/Move() var/turf/T = loc . = ..() @@ -150,17 +149,13 @@ icon_state = "silver" sheetType = /obj/item/stack/sheet/mineral/silver max_integrity = 300 - -/obj/structure/mineral_door/silver/ComponentInitialize() - AddComponent(/datum/component/rad_insulation, RAD_HEAVY_INSULATION) + rad_insulation = RAD_HEAVY_INSULATION /obj/structure/mineral_door/gold name = "gold door" icon_state = "gold" sheetType = /obj/item/stack/sheet/mineral/gold - -/obj/structure/mineral_door/gold/ComponentInitialize() - AddComponent(/datum/component/rad_insulation, RAD_HEAVY_INSULATION) + rad_insulation = RAD_HEAVY_INSULATION /obj/structure/mineral_door/uranium name = "uranium door" @@ -180,9 +175,7 @@ /obj/structure/mineral_door/transparent opacity = FALSE - -/obj/structure/mineral_door/transparent/ComponentInitialize() - AddComponent(/datum/component/rad_insulation, RAD_VERY_LIGHT_INSULATION) + rad_insulation = RAD_VERY_LIGHT_INSULATION /obj/structure/mineral_door/transparent/Close() ..() @@ -218,9 +211,7 @@ icon_state = "diamond" sheetType = /obj/item/stack/sheet/mineral/diamond max_integrity = 1000 - -/obj/structure/mineral_door/transparent/diamond/ComponentInitialize() - AddComponent(/datum/component/rad_insulation, RAD_EXTREME_INSULATION) + rad_insulation = RAD_EXTREME_INSULATION /obj/structure/mineral_door/wood name = "wood door" @@ -230,9 +221,7 @@ sheetType = /obj/item/stack/sheet/mineral/wood resistance_flags = FLAMMABLE max_integrity = 200 - -/obj/structure/mineral_door/wood/ComponentInitialize() - AddComponent(/datum/component/rad_insulation, RAD_VERY_LIGHT_INSULATION) + rad_insulation = RAD_VERY_LIGHT_INSULATION /obj/structure/mineral_door/paperframe name = "paper frame door" diff --git a/code/game/objects/structures/signs/_signs.dm b/code/game/objects/structures/signs/_signs.dm index 56b43a289b..84add2f65f 100644 --- a/code/game/objects/structures/signs/_signs.dm +++ b/code/game/objects/structures/signs/_signs.dm @@ -7,10 +7,7 @@ max_integrity = 100 armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) var/buildable_sign = 1 //unwrenchable and modifiable - -/obj/structure/sign/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) // Since this is on a wall if it becomes irradiated it will smuggle the radiation past the wall + rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE /obj/structure/sign/basic name = "blank sign" diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 3dcf91ae8f..a26d57e3e1 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -25,7 +25,8 @@ var/real_explosion_block //ignore this, just use explosion_block var/breaksound = "shatter" var/hitsound = 'sound/effects/Glasshit.ogg' - var/rad_insulation = RAD_VERY_LIGHT_INSULATION + rad_insulation = RAD_VERY_LIGHT_INSULATION + rad_flags = RAD_PROTECT_CONTENTS /obj/structure/window/examine(mob/user) ..() @@ -63,7 +64,6 @@ /obj/structure/window/ComponentInitialize() . = ..() - AddComponent(/datum/component/rad_insulation, rad_insulation, TRUE, FALSE) AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ,null,CALLBACK(src, .proc/can_be_rotated),CALLBACK(src,.proc/after_rotation)) /obj/structure/window/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd) @@ -735,4 +735,4 @@ update_icon() return ..() - update_icon() \ No newline at end of file + update_icon() diff --git a/code/game/turfs/closed.dm b/code/game/turfs/closed.dm index 578232fba0..2165dbd8db 100644 --- a/code/game/turfs/closed.dm +++ b/code/game/turfs/closed.dm @@ -3,10 +3,8 @@ opacity = 1 density = TRUE blocks_air = 1 - -/turf/closed/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_MEDIUM_INSULATION) + rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE + rad_insulation = RAD_MEDIUM_INSULATION /turf/closed/AfterChange() . = ..() diff --git a/code/game/turfs/simulated/wall/reinf_walls.dm b/code/game/turfs/simulated/wall/reinf_walls.dm index c667714273..d52a3bcc23 100644 --- a/code/game/turfs/simulated/wall/reinf_walls.dm +++ b/code/game/turfs/simulated/wall/reinf_walls.dm @@ -12,10 +12,7 @@ sheet_amount = 1 girder_type = /obj/structure/girder/reinforced explosion_block = 2 - -/turf/closed/wall/r_wall/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_HEAVY_INSULATION) + rad_insulation = RAD_HEAVY_INSULATION /turf/closed/wall/r_wall/deconstruction_hints(mob/user) switch(d_state) @@ -229,4 +226,4 @@ /turf/closed/wall/r_wall/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode) if(the_rcd.canRturf) - return ..() \ No newline at end of file + return ..() diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index c233ce414d..1748813f56 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -126,10 +126,7 @@ equip_delay_other = 60 flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH resistance_flags = NONE - -/obj/item/clothing/head/radiation/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION, TRUE, FALSE) + rad_flags = RAD_PROTECT_CONTENTS /obj/item/clothing/suit/radiation name = "radiation suit" @@ -148,9 +145,4 @@ equip_delay_other = 60 flags_inv = HIDEJUMPSUIT resistance_flags = NONE - -/obj/item/clothing/suit/radiation/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION, TRUE, FALSE) - // Just don't want things to be irradiated inside this - // Except things on the mob aren't even inside the suit so ehhhhhh + rad_flags = RAD_PROTECT_CONTENTS diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 0e69db8f51..d0e3fc8b1c 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -11,6 +11,7 @@ weather_immunities = list("ash") possible_a_intents = list(INTENT_HELP, INTENT_HARM) mob_biotypes = list(MOB_ROBOTIC) + rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS var/last_lawchange_announce = 0 @@ -52,10 +53,6 @@ diag_hud_set_status() diag_hud_set_health() -/mob/living/silicon/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION, TRUE, TRUE) - /mob/living/silicon/med_hud_set_health() return //we use a different hud diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 4fe77def51..3b9c3a549b 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -26,14 +26,11 @@ var/bitcoinproduction_drain = 0.15 var/bitcoinmining = FALSE + rad_insulation = RAD_EXTREME_INSULATION /obj/machinery/power/rad_collector/anchored anchored = TRUE -/obj/machinery/power/rad_collector/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_EXTREME_INSULATION, FALSE, FALSE) - /obj/machinery/power/rad_collector/Destroy() return ..() @@ -234,4 +231,4 @@ #undef RAD_COLLECTOR_COEFFICIENT #undef RAD_COLLECTOR_STORED_OUT #undef RAD_COLLECTOR_MINING_CONVERSION_RATE -#undef RAD_COLLECTOR_OUTPUT \ No newline at end of file +#undef RAD_COLLECTOR_OUTPUT diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index fd98c54b81..871fd32b16 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -10,6 +10,7 @@ resistance_flags = FIRE_PROOF interaction_flags_machine = INTERACT_MACHINE_OPEN | INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON obj_flags = CAN_BE_HIT | USES_TGUI + rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE var/datum/gas_mixture/air_contents // internal reservoir var/full_pressure = FALSE var/pressure_charging = TRUE @@ -42,10 +43,6 @@ return INITIALIZE_HINT_LATELOAD //we need turfs to have air -/obj/machinery/disposal/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) - /obj/machinery/disposal/proc/trunk_check() trunk = locate() in loc if(!trunk) diff --git a/code/modules/recycling/disposal/holder.dm b/code/modules/recycling/disposal/holder.dm index 2c0a6aa646..726149ce24 100644 --- a/code/modules/recycling/disposal/holder.dm +++ b/code/modules/recycling/disposal/holder.dm @@ -7,6 +7,7 @@ invisibility = INVISIBILITY_MAXIMUM resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF dir = NONE + rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE var/datum/gas_mixture/gas // gas used to flush, will appear at exit point var/active = FALSE // true if the holder is moving, otherwise inactive var/count = 1000 // can travel 1000 steps before going inactive (in case of loops) @@ -14,10 +15,6 @@ var/tomail = FALSE // contains wrapped package var/hasmob = FALSE // contains a mob -/obj/structure/disposalholder/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) - /obj/structure/disposalholder/Destroy() QDEL_NULL(gas) active = FALSE diff --git a/code/modules/recycling/disposal/outlet.dm b/code/modules/recycling/disposal/outlet.dm index d7a2d5f820..7655988c8f 100644 --- a/code/modules/recycling/disposal/outlet.dm +++ b/code/modules/recycling/disposal/outlet.dm @@ -6,6 +6,7 @@ icon_state = "outlet" density = TRUE anchored = TRUE + rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE var/active = FALSE var/turf/target // this will be where the output objects are 'thrown' to. var/obj/structure/disposalpipe/trunk/trunk // the attached pipe trunk @@ -28,10 +29,6 @@ if(trunk) trunk.linked = src // link the pipe trunk to self -/obj/structure/disposaloutlet/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) - /obj/structure/disposaloutlet/Destroy() if(trunk) trunk.linked = null diff --git a/code/modules/recycling/disposal/pipe.dm b/code/modules/recycling/disposal/pipe.dm index bc073d5e32..6c269e44be 100644 --- a/code/modules/recycling/disposal/pipe.dm +++ b/code/modules/recycling/disposal/pipe.dm @@ -12,6 +12,7 @@ max_integrity = 200 armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30) layer = DISPOSAL_PIPE_LAYER // slightly lower than wires and other pipes + rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE var/dpdir = NONE // bitmask of pipe directions var/initialize_dirs = NONE // bitflags of pipe directions added on init, see \code\_DEFINES\pipe_construction.dm var/flip_type // If set, the pipe is flippable and becomes this type when flipped @@ -42,10 +43,6 @@ dpdir |= turn(dir, 180) update() -/obj/structure/disposalpipe/ComponentInitialize() - . = ..() - AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) - // pipe is deleted // ensure if holder is present, it is expelled /obj/structure/disposalpipe/Destroy()