diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index 82d4435b9a..d4daf6cec9 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -39,6 +39,7 @@ /// Used in /obj/structure/pipes/vents/proc/create_gas #define VENT_GAS_SMOKE "Smoke" +#define VENT_GAS_SLEEP "Sleep Gas" #define VENT_GAS_CN20 "CN20 Nerve Gas" #define VENT_GAS_CN20_XENO "CN20-X Nerve Gas" #define VENT_GAS_LSD "ALD-91 LSD Gas" diff --git a/code/game/gamemodes/colonialmarines/colonialmarines.dm b/code/game/gamemodes/colonialmarines/colonialmarines.dm index 48628e99ff..c4216ceed9 100644 --- a/code/game/gamemodes/colonialmarines/colonialmarines.dm +++ b/code/game/gamemodes/colonialmarines/colonialmarines.dm @@ -128,7 +128,6 @@ /datum/game_mode/colonialmarines/ds_first_landed(obj/docking_port/stationary/marine_dropship) . = ..() - clear_lz_hazards() // This shouldn't normally do anything, but is here just in case /* // Assumption: Shuttle origin is its center @@ -219,29 +218,6 @@ warhead.warhead_impact(target) // This is a blocking call playsound(target, 'sound/effects/smoke.ogg', vol=50, vary=1, sound_range=75) -///Spawns miasma smoke in landing zones -/datum/game_mode/colonialmarines/proc/spawn_lz_hazards() - var/datum/cause_data/new_cause_data = create_cause_data("CN20-X miasma") - for(var/area/area in GLOB.all_areas) - if(!area.is_landing_zone) - continue - if(!is_ground_level(area.z)) - continue - for(var/turf/turf in area) - if(turf.density) - if(!istype(turf, /turf/closed/wall)) - continue - var/turf/closed/wall/wall = turf - if(wall.hull) - continue - lz_smoke += new /obj/effect/particle_effect/smoke/miasma(turf, null, new_cause_data) - -///Clears miasma smoke in landing zones -/datum/game_mode/colonialmarines/proc/clear_lz_hazards() - for(var/obj/effect/particle_effect/smoke/miasma/smoke as anything in lz_smoke) - smoke.time_to_live = rand(1, 5) - lz_smoke.Cut() - #define MONKEYS_TO_TOTAL_RATIO 1/32 /datum/game_mode/colonialmarines/proc/spawn_smallhosts() @@ -405,7 +381,6 @@ /datum/game_mode/colonialmarines/ds_first_drop(obj/docking_port/mobile/marine_dropship) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(show_blurb_uscm)), DROPSHIP_DROP_MSG_DELAY) add_current_round_status_to_end_results("First Drop") - clear_lz_hazards() /////////////////////////// //Checks to see who won/// diff --git a/code/game/objects/effects/effect_system/smoke.dm b/code/game/objects/effects/effect_system/smoke.dm index bd9fe3c73a..bf9bd9de17 100644 --- a/code/game/objects/effects/effect_system/smoke.dm +++ b/code/game/objects/effects/effect_system/smoke.dm @@ -17,7 +17,17 @@ var/amount = 2 var/spread_speed = 1 //time in decisecond for a smoke to spread one tile. var/time_to_live = 8 + var/stun_chance = 0 var/smokeranking = SMOKE_RANK_HARMLESS //Override priority. A higher ranked smoke cloud will displace lower and equal ones on spreading. + var/xeno_affecting = FALSE + var/blocked_by_gasmask = TRUE + var/contact_affects_synths = FALSE + var/mob/living/carbon/human/human_creature + var/mob/living/carbon/xenomorph/xeno_creature + var/datum/internal_organ/lungs/lungs + var/datum/internal_organ/eyes/eyes + var/datum/internal_organ/lungs/liver + var/datum/internal_organ/eyes/kidneys var/datum/cause_data/cause_data = null //Remove this bit to use the old smoke @@ -122,10 +132,64 @@ return TRUE -/obj/effect/particle_effect/smoke/proc/affect(mob/living/carbon/affected_mob) - if(!istype(affected_mob)) - return FALSE - return TRUE +/obj/effect/particle_effect/smoke/proc/affect(mob/living/carbon/creature) + if(ishuman(creature)) + human_creature = creature + lungs = human_creature.internal_organs_by_name["lungs"] + eyes = human_creature.internal_organs_by_name["eyes"] + liver = human_creature.internal_organs_by_name["liver"] + kidneys = human_creature.internal_organs_by_name["kidneys"] + if(isxeno(creature)) + xeno_creature = creature + inhalation(creature) + contact(creature) //anything that affects xenos goes in contact_skin + + /*if (istype(creature)) + return 0 + return 1*/ + +/obj/effect/particle_effect/smoke/proc/inhalation(mob/living/carbon/creature) + if(!istype(creature) || issynth(creature) || creature.stat == DEAD) + return TRUE + if(isxeno(creature)) + return TRUE + if(isyautja(creature) && prob(75)) + return TRUE + if(ishuman(creature)) + if(human_creature.wear_mask && CHECK_BITFIELD(human_creature.wear_mask.flags_inventory, BLOCKGASEFFECT)) + return TRUE + if(human_creature.head && CHECK_BITFIELD(human_creature.head.flags_inventory, BLOCKGASEFFECT)) + return TRUE + +/obj/effect/particle_effect/smoke/proc/contact(mob/living/carbon/creature) + if(!contact_affects_synths && issynth(creature)) + return + contact_skin(creature) //anything that affects xenos goes in contact_skin + contact_eyes(creature) + +/obj/effect/particle_effect/smoke/proc/contact_skin(mob/living/carbon/creature) + if(!xeno_affecting && isxeno(creature)) + return TRUE + if(ishuman(creature)) + if(human_creature.w_uniform && CHECK_BITFIELD(human_creature.w_uniform.flags_inventory, BLOCKGASEFFECT)) + return TRUE + if(human_creature.wear_suit && CHECK_BITFIELD(human_creature.wear_suit.flags_inventory, BLOCKGASEFFECT)) + return TRUE + +/obj/effect/particle_effect/smoke/proc/contact_eyes(mob/living/carbon/creature) + if(isxeno(creature)) + return TRUE + if(ishuman(creature)) + if(human_creature.head && CHECK_BITFIELD(human_creature.head.flags_inventory, COVEREYES)) + return TRUE + if(human_creature.glasses && CHECK_BITFIELD(human_creature.glasses.flags_inventory, COVEREYES)) + return TRUE + if(human_creature.wear_mask && CHECK_BITFIELD(human_creature.wear_mask.flags_inventory, COVEREYES)) + return TRUE + if(human_creature.wear_mask && CHECK_BITFIELD(human_creature.wear_mask.flags_inventory, BLOCKGASEFFECT)) + return TRUE + if(human_creature.head && CHECK_BITFIELD(human_creature.head.flags_inventory, BLOCKGASEFFECT)) + return TRUE ///////////////////////////////////////////// // Bad smoke @@ -140,107 +204,18 @@ for(var/mob/living/carbon/affected_mob in get_turf(src)) affect(affected_mob) -/obj/effect/particle_effect/smoke/bad/affect(mob/living/carbon/affected_mob) - . = ..() - if(!.) - return FALSE - if(affected_mob.internal != null && affected_mob.wear_mask && (affected_mob.wear_mask.flags_inventory & ALLOWINTERNALS)) - return FALSE - if(issynth(affected_mob)) - return FALSE - - if(prob(20)) - affected_mob.drop_held_item() - affected_mob.apply_damage(1, OXY) - - if(affected_mob.coughedtime < world.time && !affected_mob.stat) - affected_mob.coughedtime = world.time + 2 SECONDS - if(ishuman(affected_mob)) //Humans only to avoid issues - affected_mob.emote("cough") - return TRUE - -///////////////////////////////////////////// -// Miasma smoke (for LZs) -///////////////////////////////////////////// - -/obj/effect/particle_effect/smoke/miasma - name = "CN20-X miasma" - amount = 1 - time_to_live = INFINITY - smokeranking = SMOKE_RANK_MAX - opacity = FALSE - alpha = 75 - color = "#301934" - /// How much damage to deal per affect() - var/burn_damage = 4 - /// Multiplier to burn_damage for xenos and yautja - var/xeno_yautja_multiplier = 3 - /// Time required for damage to actually apply - var/active_time - -/obj/effect/particle_effect/smoke/miasma/Initialize(mapload, oldamount, datum/cause_data/new_cause_data) - . = ..() - // Mimic dispersal without actually doing spread logic - alpha = 0 - active_time = world.time + 6 SECONDS - addtimer(VARSET_CALLBACK(src, alpha, initial(alpha)), rand(1, 6) SECONDS) - -/obj/effect/particle_effect/smoke/miasma/apply_smoke_effect(turf/cur_turf) - ..() - // coffins - for(var/obj/structure/closet/container in cur_turf) - for(var/mob/living/carbon/mob in container) - affect(mob) - - // vehicles - var/obj/vehicle/multitile/car = locate() in cur_turf - var/datum/interior/car_interior = car?.interior - if(car_interior) - var/list/bounds = car_interior.get_bound_turfs() - for(var/turf/car_turf as anything in block(bounds[1], bounds[2])) - var/obj/effect/particle_effect/smoke/miasma/smoke = locate() in car_turf - if(!smoke) - smoke = new(car_turf) - smoke.time_to_live = rand(7, 12) - -/obj/effect/particle_effect/smoke/miasma/affect(mob/living/carbon/affected_mob) - . = ..() - if(!.) - return FALSE - if(affected_mob.stat == DEAD) - return FALSE - - var/active = world.time > active_time - var/damage = active ? burn_damage : 0 // A little buffer time to get out of it - if(isxeno(affected_mob)) - damage *= xeno_yautja_multiplier - else if(isyautja(affected_mob)) - if(prob(75)) - return FALSE - damage *= xeno_yautja_multiplier - - affected_mob.apply_damage(damage, BURN) - affected_mob.AdjustEyeBlur(0.75) - affected_mob.last_damage_data = cause_data - - if(affected_mob.coughedtime < world.time && !affected_mob.stat) - affected_mob.coughedtime = world.time + 2 SECONDS - if(ishuman(affected_mob)) //Humans only to avoid issues - if(issynth(affected_mob)) - affected_mob.visible_message(SPAN_DANGER("[affected_mob]'s skin is sloughing off!"),\ - SPAN_DANGER("Your skin is sloughing off!")) - else - if(prob(50)) - affected_mob.emote("cough") - else - affected_mob.emote("gasp") - if(prob(20)) - affected_mob.drop_held_item() - to_chat(affected_mob, SPAN_DANGER("Something is not right here...")) - return TRUE - -/obj/effect/particle_effect/smoke/miasma/ex_act(severity) - return +/obj/effect/particle_effect/smoke/bad/inhalation(mob/living/carbon/creature) + if (..()) + return + else + if(prob(20)) + creature.drop_held_item() + creature.apply_damage(1, OXY) + if(creature.coughedtime != 1) + creature.coughedtime = 1 + if(ishuman(creature)) //Humans only to avoid issues + creature.emote("cough") + addtimer(VARSET_CALLBACK(creature, coughedtime, 0), 2 SECONDS) ///////////////////////////////////////////// // Sleep smoke @@ -254,54 +229,15 @@ for(var/mob/living/carbon/affected_mob in get_turf(src)) affect(affected_mob) -/obj/effect/particle_effect/smoke/sleepy/affect(mob/living/carbon/affected_mob) - . = ..() - if(!.) - return FALSE - if(affected_mob.stat == DEAD) - return FALSE - if(issynth(affected_mob)) - return FALSE - - affected_mob.drop_held_item() - affected_mob.sleeping++ - - if(affected_mob.coughedtime < world.time && !affected_mob.stat) - affected_mob.coughedtime = world.time + 2 SECONDS - if(ishuman(affected_mob)) //Humans only to avoid issues - affected_mob.emote("cough") - return TRUE - -///////////////////////////////////////////// -// Mustard Gas -///////////////////////////////////////////// - -/obj/effect/particle_effect/smoke/mustard - name = "mustard gas" - icon = 'icons/effects/effects.dmi' - icon_state = "mustard" - smokeranking = SMOKE_RANK_HIGH - -/obj/effect/particle_effect/smoke/mustard/Move() - . = ..() - for(var/mob/living/carbon/human/creature in get_turf(src)) - affect(creature) - -/obj/effect/particle_effect/smoke/mustard/affect(mob/living/carbon/human/creature) - . = ..() - if(!.) - return FALSE - if(issynth(creature)) - return FALSE - - if(creature.burn_skin(0.75)) - creature.last_damage_data = cause_data - - if(creature.coughedtime < world.time && !creature.stat) - creature.coughedtime = world.time + 2 SECONDS - if(ishuman(creature)) //Humans only to avoid issues - creature.emote("gasp") - return TRUE +/obj/effect/particle_effect/smoke/sleepy/inhalation(mob/living/carbon/creature) + if (..()) + return + creature.drop_held_item() + creature:sleeping++ + if(creature.coughedtime != 1) + creature.coughedtime = 1 + creature.emote("cough") + addtimer(VARSET_CALLBACK(creature, coughedtime, 0), 2 SECONDS) ///////////////////////////////////////////// // Phosphorus Gas @@ -314,6 +250,7 @@ var/burn_damage = 40 var/applied_fire_stacks = 5 var/xeno_yautja_reduction = 0.75 + contact_affects_synths = TRUE /obj/effect/particle_effect/smoke/phosphorus/weak time_to_live = 2 @@ -326,38 +263,30 @@ for(var/mob/living/carbon/affected_mob in get_turf(src)) affect(affected_mob) -/obj/effect/particle_effect/smoke/phosphorus/affect(mob/living/carbon/affected_mob) - . = ..() - if(!.) - return FALSE - - var/damage = burn_damage - if(ishuman(affected_mob)) - if(affected_mob.internal != null && affected_mob.wear_mask && (affected_mob.wear_mask.flags_inventory & ALLOWINTERNALS)) - return FALSE - +/obj/effect/particle_effect/smoke/phosphorus/inhalation(mob/living/carbon/creature) + if (..()) + return + if(ishuman(creature)) if(prob(20)) - affected_mob.drop_held_item() - affected_mob.apply_damage(1, OXY) - - if(affected_mob.coughedtime < world.time && !affected_mob.stat) - affected_mob.coughedtime = world.time + next_cough - if(issynth(affected_mob)) - affected_mob.visible_message(SPAN_DANGER("[affected_mob]'s skin is sloughing off!"),\ - SPAN_DANGER("Your skin is sloughing off!")) - else - affected_mob.emote("cough") - - if(isyautja(affected_mob) || isxeno(affected_mob)) - damage *= xeno_yautja_reduction - - var/reagent = new /datum/reagent/napalm/ut() - affected_mob.burn_skin(damage) - affected_mob.adjust_fire_stacks(applied_fire_stacks, reagent) - affected_mob.IgniteMob() - affected_mob.updatehealth() - affected_mob.last_damage_data = cause_data - return TRUE + creature.drop_held_item() + creature.apply_damage(1, OXY) + creature.updatehealth() + if(creature.coughedtime < world.time) + creature.emote("cough") + creature.coughedtime = world.time + next_cough + +/obj/effect/particle_effect/smoke/phosphorus/contact_skin(mob/living/carbon/creature) + /*if (..()) + return*/ + //does not fucking care what you are, it will set you on fire + creature.last_damage_data = cause_data + if(isyautja(creature) || isxeno(creature)) + burn_damage *= xeno_yautja_reduction + creature.burn_skin(burn_damage) + creature.adjust_fire_stacks(applied_fire_stacks) + creature.fire_reagent = new /datum/reagent/napalm/ut() + creature.IgniteMob() + creature.updatehealth() ///////////////////////////////////////////// // CN20 Nerve Gas @@ -367,97 +296,65 @@ name = "CN20 nerve gas" smokeranking = SMOKE_RANK_HIGH color = "#80c7e4" - var/xeno_affecting = FALSE + xeno_affecting = FALSE opacity = FALSE alpha = 75 - time_to_live = 20 + time_to_live = 10 + stun_chance = 20 + var/effect_amt //I don't know what this is or what it means but the code throws errors without it and I'm tired /obj/effect/particle_effect/smoke/cn20/xeno name = "CN20-X nerve gas" color = "#2da9da" xeno_affecting = TRUE + stun_chance = 35 /obj/effect/particle_effect/smoke/cn20/Move() . = ..() - if(!xeno_affecting) - for(var/mob/living/carbon/human/human in get_turf(src)) - affect(human) - else - for(var/mob/living/carbon/creature in get_turf(src)) - affect(creature) + for(var/mob/living/carbon/creature in get_turf(src)) + affect(creature) /obj/effect/particle_effect/smoke/cn20/affect(mob/living/carbon/creature) - . = ..() - if(!.) - return FALSE - if(creature.stat == DEAD) - return FALSE - if(issynth(creature)) - return FALSE - - var/mob/living/carbon/xenomorph/xeno_creature - var/mob/living/carbon/human/human_creature - var/datum/internal_organ/lungs/lungs - var/datum/internal_organ/eyes/eyes - if(isxeno(creature)) - xeno_creature = creature - else if(ishuman(creature)) - human_creature = creature - lungs = human_creature.internal_organs_by_name["lungs"] - eyes = human_creature.internal_organs_by_name["eyes"] - - if(!xeno_affecting && xeno_creature) - return FALSE - if(isyautja(creature) && prob(75)) - return FALSE - - if(creature.wear_mask && (creature.wear_mask.flags_inventory & BLOCKGASEFFECT)) - return FALSE - if(human_creature && (human_creature.head && (human_creature.head.flags_inventory & BLOCKGASEFFECT))) - return FALSE - - var/effect_amt = floor(6 + amount*6) - - if(xeno_creature) - creature.apply_damage(20, BRUTE) - xeno_creature.AddComponent(/datum/component/status_effect/interference, 10, 10) - xeno_creature.blinded = TRUE - else - creature.apply_damage(18, TOX) - creature.apply_damage(0.75, BRAIN) - creature.apply_damage(1, OXY) - lungs.take_damage(1) - - creature.SetEarDeafness(max(creature.ear_deaf, floor(effect_amt*1.5))) //Paralysis of hearing system, aka deafness - if(!xeno_creature) //Eye exposure damage - to_chat(creature, SPAN_DANGER("Your eyes sting. You can't see!")) - creature.SetEyeBlind(floor(effect_amt/3)) + ..() + effect_amt = round(6 + amount*6) - eyes.take_damage(1) - if(human_creature && creature.coughedtime < world.time && !creature.stat) //Coughing/gasping - creature.coughedtime = world.time + 1.5 SECONDS +/obj/effect/particle_effect/smoke/cn20/inhalation(mob/living/carbon/creature) + if(..()) + return + creature.SetEarDeafness(max(creature.ear_deaf, round(effect_amt*1.5))) + creature.apply_damage(18, TOX) + creature.apply_damage(0.75, BRAIN) + creature.apply_damage(1, OXY) + lungs.take_damage(1) + to_chat(creature, SPAN_DANGER("Your body is going numb, almost as if paralyzed!")) + if(prob(stun_chance)) + creature.apply_effect(1, WEAKEN) + if(prob(60 + round(amount*15))) //Highly likely to drop items due to arms/hands seizing up + creature.drop_held_item() + human_creature.temporary_slowdown = max(human_creature.temporary_slowdown, 4) //One tick every two second + human_creature.recalculate_move_delay = TRUE + if(!xeno_creature && creature.coughedtime != 1 && !creature.stat) //Coughing/gasping + creature.coughedtime = 1 if(prob(50)) creature.emote("cough") else creature.emote("gasp") + addtimer(VARSET_CALLBACK(creature, coughedtime, 0), 1.5 SECONDS) - var/stun_chance = 10 - if(xeno_affecting) - stun_chance = 35 - if(prob(stun_chance)) - creature.KnockDown(2) +/obj/effect/particle_effect/smoke/cn20/contact_skin(mob/living/carbon/creature) + if(..()) + return + if(isxeno(creature)) + creature.apply_damage(20, BRUTE) + xeno_creature.AddComponent(/datum/component/status_effect/interference, 10, 10) + xeno_creature.blinded = TRUE - //Topical damage (neurotoxin on exposed skin) - if(xeno_creature) - to_chat(xeno_creature, SPAN_XENODANGER("You are struggling to move, it's as if you're paralyzed!")) - else - to_chat(creature, SPAN_DANGER("Your body is going numb, almost as if paralyzed!")) - if(prob(60 + floor(amount*15))) //Highly likely to drop items due to arms/hands seizing up - creature.drop_held_item() - if(human_creature) - human_creature.temporary_slowdown = max(human_creature.temporary_slowdown, 4) //One tick every two second - human_creature.recalculate_move_delay = TRUE - return TRUE +/obj/effect/particle_effect/smoke/cn20/contact_eyes(mob/living/carbon/creature) + if(..()) + return + to_chat(creature, SPAN_DANGER("Your eyes sting. You can't see!")) + human_creature.SetEyeBlind(round(effect_amt/3)) + eyes.take_damage(1) ///////////////////////////////////////////// // ALD-91 LSD Gas @@ -470,29 +367,21 @@ opacity = FALSE alpha = 75 time_to_live = 20 - var/stun_chance = 60 + stun_chance = 60 /obj/effect/particle_effect/smoke/LSD/Move() . = ..() for(var/mob/living/carbon/human/human in get_turf(src)) affect(human) -/obj/effect/particle_effect/smoke/LSD/affect(mob/living/carbon/human/creature) - if(!istype(creature) || issynth(creature) || creature.stat == DEAD || isyautja(creature)) - return FALSE - - if(creature.wear_mask && (creature.wear_mask.flags_inventory & BLOCKGASEFFECT)) - return FALSE - if(creature.head.flags_inventory & BLOCKGASEFFECT) - return FALSE - +/obj/effect/particle_effect/smoke/LSD/inhalation(mob/living/carbon/human/creature) + if(..()) + return creature.hallucination += 15 creature.druggy += 1 if(prob(stun_chance)) creature.apply_effect(1, WEAKEN) - - ////////////////////////////////////// // FLASHBANG SMOKE //////////////////////////////////// @@ -527,7 +416,8 @@ anchored = TRUE spread_speed = 6 smokeranking = SMOKE_RANK_BOILER - + contact_affects_synths = TRUE + xeno_affecting = TRUE //it affects hostile hives var/hivenumber = XENO_HIVE_NORMAL var/gas_damage = 20 @@ -558,47 +448,34 @@ /obj/effect/particle_effect/smoke/xeno_burn/Crossed(mob/living/carbon/affected_mob as mob) return -/obj/effect/particle_effect/smoke/xeno_burn/affect(mob/living/carbon/affected_mob) - . = ..() - if(!.) - return FALSE - if(affected_mob.stat == DEAD) - return FALSE - if(affected_mob.ally_of_hivenumber(hivenumber)) - return FALSE - if(isyautja(affected_mob) && prob(75)) - return FALSE - if(HAS_TRAIT(affected_mob, TRAIT_NESTED) && affected_mob.status_flags & XENO_HOST) - return FALSE - - affected_mob.last_damage_data = cause_data - affected_mob.apply_damage(3, OXY) //Basic oxyloss from "can't breathe" +/obj/effect/particle_effect/smoke/xeno_burn/affect(mob/living/carbon/creature) + ..() - if(isxeno(affected_mob)) - affected_mob.apply_damage(gas_damage * XVX_ACID_DAMAGEMULT, BURN) //Inhalation damage - else - affected_mob.apply_damage(gas_damage, BURN) //Inhalation damage + if(creature.ally_of_hivenumber(hivenumber)) + return - if(affected_mob.coughedtime < world.time && !affected_mob.stat && ishuman(affected_mob)) //Coughing/gasping - affected_mob.coughedtime = world.time + 1.5 SECONDS - if(issynth(affected_mob)) - affected_mob.visible_message(SPAN_DANGER("[affected_mob]'s skin is sloughing off!"),\ - SPAN_DANGER("Your skin is sloughing off!")) +/obj/effect/particle_effect/smoke/xeno_burn/inhalation(mob/living/carbon/creature) + if(..()) + return + creature.apply_damage(gas_damage, BURN) //Inhalation damage + creature.apply_damage(3, OXY) //Basic oxyloss from "can't breathe" + if(creature.coughedtime != 1 && !creature.stat) //Coughing/gasping + creature.coughedtime = 1 + if(prob(50)) + creature.emote("cough") else - if(prob(50)) - affected_mob.emote("cough") - else - affected_mob.emote("gasp") + creature.emote("gasp") + addtimer(VARSET_CALLBACK(creature, coughedtime, 0), 1.5 SECONDS) - //Topical damage (acid on exposed skin) - to_chat(affected_mob, SPAN_DANGER("Your skin feels like it is melting away!")) - if(ishuman(affected_mob)) - var/mob/living/carbon/human/human = affected_mob - human.apply_armoured_damage(amount*rand(15, 20), ARMOR_BIO, BURN) //Burn damage, randomizes between various parts //Amount corresponds to upgrade level, 1 to 2.5 +/obj/effect/particle_effect/smoke/xeno_burn/contact_skin(mob/living/carbon/creature) + if(..()) + return + to_chat(creature, SPAN_DANGER("Your skin feels like it is melting away!")) + if(ishuman(creature)) + human_creature.apply_armoured_damage(amount*rand(15, 20), ARMOR_BIO, BURN) //Burn damage, randomizes between various parts //Amount corresponds to upgrade level, 1 to 2.5 else - affected_mob.burn_skin(5) //Failsafe for non-humans - affected_mob.last_damage_data = cause_data - return TRUE + creature.burn_skin(5) //Failsafe for non-humans + creature.updatehealth() //Xeno neurotox smoke. /obj/effect/particle_effect/smoke/xeno_weak @@ -612,51 +489,49 @@ var/msg = "Your skin tingles as the gas consumes you!" // Message given per tick. Changes depending on which species is hit. //No effect when merely entering the smoke turf, for balance reasons -/obj/effect/particle_effect/smoke/xeno_weak/Crossed(mob/living/carbon/moob as mob) +/obj/effect/particle_effect/smoke/xeno_weak/Crossed(mob/living/carbon/creature as mob) return -/obj/effect/particle_effect/smoke/xeno_weak/affect(mob/living/carbon/moob) // This applies every tick someone is in the smoke - . = ..() - if(!.) - return FALSE - if(moob.stat == DEAD) - return FALSE - if(isxeno(moob)) - return FALSE - if(isyautja(moob)) - return FALSE - if(HAS_TRAIT(moob, TRAIT_NESTED) && moob.status_flags & XENO_HOST) - return FALSE +/obj/effect/particle_effect/smoke/xeno_weak/affect(mob/living/carbon/creature) // This applies every tick someone is in the smoke + ..() + if(isxeno(creature)) + return + if(isyautja(creature)) + neuro_dose = neuro_dose*2 // Yautja get half effects + msg = "You resist the tingling smoke's effects!" + return + if(HAS_TRAIT(creature, TRAIT_NESTED) && creature.status_flags & XENO_HOST) + return - var/mob/living/carbon/human/human_moob - if(ishuman(moob)) - human_moob = moob - if(human_moob.chem_effect_flags & CHEM_EFFECT_RESIST_NEURO) - return FALSE - var/effect_amt = floor(6 + amount*6) - moob.eye_blurry = max(moob.eye_blurry, effect_amt) - moob.EyeBlur(max(moob.eye_blurry, effect_amt)) - moob.apply_damage(5, OXY) // Base "I can't breath oxyloss" Slightly more longer lasting then stamina damage +/obj/effect/particle_effect/smoke/xeno_weak/inhalation(mob/living/carbon/creature) + if(ishuman(creature)) + var/mob/living/carbon/human/H = creature + if(H.chem_effect_flags & CHEM_EFFECT_RESIST_NEURO) + return + var/effect_amt = round(6 + amount*6) + creature.eye_blurry = max(creature.eye_blurry, effect_amt) + creature.apply_effect(max(creature.eye_blurry, effect_amt), EYE_BLUR) + creature.apply_damage(5, OXY) // Base "I can't breath oxyloss" Slightly more longer lasting then stamina damage // reworked code below - if(!issynth(moob)) - var/datum/effects/neurotoxin/neuro_effect = locate() in moob.effects_list + if(!issynth(creature)) + var/datum/effects/neurotoxin/neuro_effect = locate() in creature.effects_list if(!neuro_effect) - neuro_effect = new(moob, cause_data.resolve_mob()) + neuro_effect = new(creature, cause_data.resolve_mob()) neuro_effect.strength = effect_amt neuro_effect.duration += neuro_dose - if(human_moob && moob.coughedtime < world.time && !moob.stat) //Coughing/gasping - moob.coughedtime = world.time + 1.5 SECONDS + if(creature.coughedtime != 1 && !creature.stat) //Coughing/gasping + creature.coughedtime = 1 if(prob(50)) - moob.Slow(1) - moob.emote("cough") + creature.Slow(1) + creature.emote("cough") else - moob.emote("gasp") + creature.emote("gasp") + addtimer(VARSET_CALLBACK(creature, coughedtime, 0), 1.5 SECONDS) else msg = "You are consumed by the harmless gas, it is hard to navigate in!" - moob.Slow(1) - to_chat(moob, SPAN_DANGER(msg)) - return TRUE + creature.apply_effect(SLOW,1) + to_chat(creature, SPAN_DANGER(msg)) /obj/effect/particle_effect/smoke/xeno_weak_fire time_to_live = 16 @@ -666,57 +541,47 @@ smokeranking = SMOKE_RANK_BOILER //No effect when merely entering the smoke turf, for balance reasons -/obj/effect/particle_effect/smoke/xeno_weak_fire/Crossed(mob/living/carbon/moob as mob) - if(!istype(moob)) +/obj/effect/particle_effect/smoke/xeno_weak_fire/Crossed(mob/living/carbon/creature as mob) + if(!istype(creature)) return - moob.ExtinguishMob() - . = ..() - -/obj/effect/particle_effect/smoke/xeno_weak_fire/affect(mob/living/carbon/moob) + creature.ExtinguishMob() . = ..() - if(!.) - return FALSE - if(moob.stat == DEAD) - return FALSE - if(isxeno(moob)) - return FALSE - if(isyautja(moob) && prob(75)) - return FALSE - if(HAS_TRAIT(moob, TRAIT_NESTED) && moob.status_flags & XENO_HOST) - return FALSE - var/mob/living/carbon/human/human_moob - if(ishuman(moob)) - human_moob = moob - - var/effect_amt = floor(6 + amount*6) +/obj/effect/particle_effect/smoke/xeno_weak_fire/affect(mob/living/carbon/creature) + ..() - moob.apply_damage(9, OXY) // MUCH harsher - moob.SetEarDeafness(max(moob.ear_deaf, floor(effect_amt*1.5))) //Paralysis of hearing system, aka deafness - if(!moob.eye_blind) //Eye exposure damage - to_chat(moob, SPAN_DANGER("Your eyes sting. You can't see!")) - moob.SetEyeBlind(floor(effect_amt/3)) + if(isxeno(creature)) + return + if(HAS_TRAIT(creature, TRAIT_NESTED) && creature.status_flags & XENO_HOST) + return - if(human_moob && moob.coughedtime < world.time && !moob.stat) //Coughing/gasping - moob.coughedtime = world.time + 1.5 SECONDS - if(!issynth(moob)) - if(prob(50)) - moob.emote("cough") - else - moob.emote("gasp") +/obj/effect/particle_effect/smoke/xeno_weak_fire/inhalation(mob/living/carbon/creature) + var/effect_amt = round(6 + amount*6) - if(prob(20)) - moob.KnockDown(1) + creature.apply_damage(9, OXY) // MUCH harsher + creature.SetEarDeafness(max(creature.ear_deaf, round(effect_amt*1.5))) //Paralysis of hearing system, aka deafness + if(!creature.eye_blind) //Eye exposure damage + to_chat(creature, SPAN_DANGER("Your eyes sting. You can't see!")) + creature.SetEyeBlind(round(effect_amt/3)) + if(creature.coughedtime != 1 && !creature.stat) //Coughing/gasping + creature.coughedtime = 1 + if(prob(50)) + creature.emote("cough") + else + creature.emote("gasp") + addtimer(VARSET_CALLBACK(creature, coughedtime, 0), 1.5 SECONDS) + if (prob(20)) + creature.apply_effect(1, WEAKEN) //Topical damage (neurotoxin on exposed skin) - to_chat(moob, SPAN_DANGER("Your body is going numb, almost as if paralyzed!")) - if(prob(40 + floor(amount*15))) //Highly likely to drop items due to arms/hands seizing up - moob.drop_held_item() - if(human_moob) - human_moob.temporary_slowdown = max(human_moob.temporary_slowdown, 4) //One tick every two second - human_moob.recalculate_move_delay = TRUE - return TRUE + to_chat(creature, SPAN_DANGER("Your body is going numb, almost as if paralyzed!")) + if(prob(40 + round(amount*15))) //Highly likely to drop items due to arms/hands seizing up + creature.drop_held_item() + if(ishuman(creature)) + var/mob/living/carbon/human/Human = creature + Human.temporary_slowdown = max(Human.temporary_slowdown, 4) //One tick every two second + Human.recalculate_move_delay = TRUE /obj/effect/particle_effect/smoke/xeno_weak_fire/spread_smoke(direction) set waitfor = 0 @@ -796,9 +661,6 @@ /datum/effect_system/smoke_spread/sleepy smoke_type = /obj/effect/particle_effect/smoke/sleepy -/datum/effect_system/smoke_spread/mustard - smoke_type = /obj/effect/particle_effect/smoke/mustard - /datum/effect_system/smoke_spread/phosphorus smoke_type = /obj/effect/particle_effect/smoke/phosphorus diff --git a/code/game/objects/structures/pipes/vents/vents.dm b/code/game/objects/structures/pipes/vents/vents.dm index cf9c64058a..dcd5921b31 100644 --- a/code/game/objects/structures/pipes/vents/vents.dm +++ b/code/game/objects/structures/pipes/vents/vents.dm @@ -139,7 +139,7 @@ if(welded) to_chat(usr, SPAN_WARNING("You cannot release gas from a welded vent.")) return FALSE - var/list/options = list(VENT_GAS_SMOKE, VENT_GAS_CN20, VENT_GAS_CN20_XENO, VENT_GAS_LSD) + var/list/options = list(VENT_GAS_SMOKE, VENT_GAS_SLEEP, VENT_GAS_CN20, VENT_GAS_CN20_XENO, VENT_GAS_LSD) var/gas_choice = tgui_input_list(user, "What gas do you wish to use?", "Gas Choice", options, 20 SECONDS) if(!gas_choice) return FALSE @@ -162,6 +162,8 @@ switch(gas_type) if(VENT_GAS_SMOKE) spreader = new /datum/effect_system/smoke_spread/bad + if(VENT_GAS_SLEEP) + spreader = new /datum/effect_system/smoke_spread/sleepy if(VENT_GAS_CN20) spreader = new /datum/effect_system/smoke_spread/cn20 if(VENT_GAS_CN20_XENO) diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index f0ef09b14c..d81671e02c 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -1497,7 +1497,7 @@ GLOBAL_LIST_INIT(allowed_helmet_items, list( armor_rad = CLOTHING_ARMOR_HIGHPLUS force = 0 //"The M3 MOPP mask would be a normal weapon if you were to hit someone with it." throwforce = 0 - flags_inventory = BLOCKSHARPOBJ + flags_inventory = BLOCKSHARPOBJ|BLOCKGASEFFECT flags_marine_helmet = NO_FLAGS flags_atom = NO_SNOW_TYPE|NO_NAME_OVERRIDE flags_inv_hide = HIDEEARS|HIDEALLHAIR diff --git a/code/modules/clothing/under/marine_uniform.dm b/code/modules/clothing/under/marine_uniform.dm index 12ef1628a3..e617307b38 100644 --- a/code/modules/clothing/under/marine_uniform.dm +++ b/code/modules/clothing/under/marine_uniform.dm @@ -480,6 +480,7 @@ desc = "An armored uniform worn by Weyland-Yutani elite commandos. It is well protected while remaining light and comfortable." icon_state = "commando_jumpsuit" worn_state = "commando_jumpsuit" + flags_inventory = BLOCKGASEFFECT /obj/item/clothing/under/marine/veteran/pmc/corporate name = "\improper WY corporate security uniform" @@ -1099,6 +1100,7 @@ desc = "M2 MOPP suits are purpose built to defend the wearer against biological and radioactive contaminants, from nerve gas to nuclear fallout." desc_lore = "The several-paragraph long expository pamphlet that usually comes with these is missing." flags_atom = NO_NAME_OVERRIDE|NO_SNOW_TYPE + flags_inventory = BLOCKGASEFFECT flags_jumpsuit = NO_FLAGS icon_state = "cbrn" worn_state = "cbrn" @@ -1113,6 +1115,7 @@ desc = "M3 MOPP suits are specially designed and engineered to protect the wearer from unshielded exposure to any Chemical, Biological, Radiological, or Nuclear (CBRN) threats in the field. The suit has a recommended lifespan of twenty-four hours once contact with a toxic environment is made, but depending on the severity this can be shortened to eight hours or less." desc_lore = "Since the outbreak of the New Earth Plague in 2157 and the subsequent Interstellar Commerce Commission (ICC) sanctioned decontamination of the colony and its 40 million inhabitants, the abandoned colony has been left under a strict quarantine blockade to prevent any potential scavengers from spreading what’s left of the highly-durable airborne flesh-eating bacteria. Following those events, the three major superpowers have been investing heavily in the development and procurement of CBRN equipment, in no small part due to the extensive damage that the plague and other similar bioweapons could do. The \"Marine 70\" upgrade package and the launch of the M3 pattern armor series saw the first M3-M prototypes approved for CBRN usage." flags_atom = NO_NAME_OVERRIDE|NO_SNOW_TYPE + flags_inventory = BLOCKGASEFFECT icon_state = "cbrn" worn_state = "cbrn" flags_jumpsuit = NO_FLAGS