diff --git a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm index 2ed0632f6346..e9860fa024e5 100644 --- a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm @@ -122,8 +122,7 @@ . = ..() contents = list() - new /obj/item/clothing/head/helmet/marine/fireproof_hood(src) - new /obj/item/clothing/suit/fire/fireproof_suit(src) + new /obj/item/clothing/suit/storage/marine/cbrn/lava(src) new /obj/item/clothing/gloves/marine/fireproof_gloves(src) new /obj/item/clothing/shoes/marine/fireproof_boots(src) new /obj/item/reagent_container/glass/canister/oxygen(src) diff --git a/code/game/turfs/lava.dm b/code/game/turfs/lava.dm index f0552f9efe1d..32049a03e07f 100644 --- a/code/game/turfs/lava.dm +++ b/code/game/turfs/lava.dm @@ -18,25 +18,22 @@ is_weedable = NOT_WEEDABLE allow_construction = FALSE -/turf/open/lava/hot_lava/Entered(atom/movable/AM) - if(iscarbon(AM)) - var/mob/living/carbon/C = AM - var/slow_amount = 0.75 +/turf/open/lava/hot_lava/Entered(atom/thing) + if(iscarbon(thing)) + var/mob/living/carbon/person = thing var/can_stuck = 1 - to_chat(C,SPAN_DANGER("The lava burns!")) - playsound(C,'sound/bullets/acid_impact1.ogg', 10, 1) - if(istype(C, /mob/living/carbon/xenomorph)||isyautja(C)) - slow_amount = 0.45 + to_chat(person,SPAN_DANGER("The lava burns!")) + playsound(person,'sound/bullets/acid_impact1.ogg', 10, 1) + if(istype(person, /mob/living/carbon/xenomorph)||isyautja(person)) can_stuck = 1 - var/new_slowdown = C.next_move_slowdown - if(!HAS_TRAIT(C, TRAIT_HAULED)) + var/new_slowdown = person.next_move_slowdown + if(!HAS_TRAIT(person, TRAIT_HAULED)) if(prob(10)) - to_chat(C, SPAN_WARNING("Moving through the molten lava slows you down.")) //Warning only + to_chat(person, SPAN_WARNING("Moving through the molten lava slows you down.")) //Warning only else if(can_stuck && prob(40)) - to_chat(C, SPAN_WARNING("You get stuck in the molten lava for a moment!")) + to_chat(person, SPAN_WARNING("You get stuck in the molten lava for a moment!")) new_slowdown += 10 - C.next_move_slowdown = new_slowdown - ..() + person.next_move_slowdown = new_slowdown /turf/open/lava/lava_no_burn name = "lava" diff --git a/code/modules/clothing/suits/marine_armor/ert.dm b/code/modules/clothing/suits/marine_armor/ert.dm index ceec4faba336..7885a6a52e80 100644 --- a/code/modules/clothing/suits/marine_armor/ert.dm +++ b/code/modules/clothing/suits/marine_armor/ert.dm @@ -1013,6 +1013,131 @@ flags_cold_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN flags_heat_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN uniform_restricted = list(/obj/item/clothing/under/marine/cbrn) + actions_types = list(/datum/action/item_action/specialist/toggle_cbrn_hood) + + ///Whether the hood and gas mask were worn through the hood toggle verb + var/hood_enabled = FALSE + ///Whether enabling the hood protects you from fire + var/supports_fire_protection = TRUE + ///Typepath of the attached hood + var/hood_type = /obj/item/clothing/head/helmet/marine/cbrn_hood + ///The head clothing that the suit uses as a hood + var/obj/item/clothing/head/linked_hood + +/obj/item/clothing/suit/storage/marine/cbrn/Initialize() + linked_hood = new hood_type(src) + . = ..() + +/obj/item/clothing/suit/storage/marine/cbrn/Destroy() + . = ..() + if(linked_hood) + qdel(linked_hood) + +/obj/item/clothing/suit/storage/marine/cbrn/verb/hood_toggle() + set name = "Toggle Hood" + set desc = "Pull your hood and gasmask up over your face and head." + set src in usr + if(!usr || usr.is_mob_incapacitated(TRUE)) + return + if(!ishuman(usr)) + return + var/mob/living/carbon/human/user = usr + + if(user.wear_suit != src) + to_chat(user, SPAN_WARNING("You must be wearing [src] to put on [linked_hood] attached to it!")) + return + + if(!linked_hood) + to_chat(user, SPAN_BOLDWARNING("You are missing a linked_hood! This should not be possible.")) + CRASH("[user] attempted to toggle hood on [src] that was missing a linked_hood.") + + playsound(user.loc, "armorequip", 25, 1) + if(hood_enabled) + disable_hood(user, FALSE) + return + enable_hood(user) + +/obj/item/clothing/suit/storage/marine/cbrn/proc/enable_hood(mob/living/carbon/human/user) + if(!istype(user)) + user = usr + + if(!linked_hood.mob_can_equip(user, WEAR_HEAD)) + to_chat(user, SPAN_WARNING("You are unable to equip [linked_hood].")) + return + + user.equip_to_slot(linked_hood, WEAR_HEAD) + + hood_enabled = TRUE + RegisterSignal(src, COMSIG_ITEM_UNEQUIPPED, PROC_REF(disable_hood)) + RegisterSignal(linked_hood, COMSIG_ITEM_UNEQUIPPED, PROC_REF(disable_hood)) + + if(!supports_fire_protection) + return + to_chat(user, SPAN_NOTICE("You raise [linked_hood] over your head. You will no longer catch fire.")) + toggle_fire_protection(user, TRUE) + +/obj/item/clothing/suit/storage/marine/cbrn/proc/disable_hood(mob/living/carbon/human/user, forced = TRUE) + if(!istype(user)) + user = usr + + UnregisterSignal(src, COMSIG_ITEM_UNEQUIPPED) + UnregisterSignal(linked_hood, COMSIG_ITEM_UNEQUIPPED) + addtimer(CALLBACK(user, TYPE_PROC_REF(/mob/living/carbon/human, drop_inv_item_to_loc), linked_hood, src), 1) //0.1s delay cause you can grab the hood + addtimer(CALLBACK(src, PROC_REF(check_remove_headgear)), 2) //Checks if it is still not in contents, incase it was dropped + + hood_enabled = FALSE + if(!forced) + to_chat(user, SPAN_NOTICE("You take off [linked_hood].")) + + if(supports_fire_protection) + toggle_fire_protection(user, FALSE) + +/obj/item/clothing/suit/storage/marine/cbrn/proc/check_remove_headgear(obj/item/clothing/suit/storage/marine/cbrn/suit = src) + for(var/current_atom in contents) + if(current_atom == linked_hood) + return + linked_hood.forceMove(suit) + +/obj/item/clothing/suit/storage/marine/cbrn/proc/toggle_fire_protection(mob/living/carbon/user, enable_fire_protection) + if(enable_fire_protection) + RegisterSignal(user, COMSIG_LIVING_PREIGNITION, PROC_REF(fire_shield_is_on)) + RegisterSignal(user, list(COMSIG_LIVING_FLAMER_CROSSED, COMSIG_LIVING_FLAMER_FLAMED), PROC_REF(flamer_fire_callback)) + return + UnregisterSignal(user, list(COMSIG_LIVING_PREIGNITION, COMSIG_LIVING_FLAMER_CROSSED, COMSIG_LIVING_FLAMER_FLAMED)) + +/obj/item/clothing/suit/storage/marine/cbrn/proc/fire_shield_is_on(mob/living/burning_mob) //Stealing it from the pyro spec armor + SIGNAL_HANDLER + + if(burning_mob.fire_reagent?.fire_penetrating) + return + + return COMPONENT_CANCEL_IGNITION + +/obj/item/clothing/suit/storage/marine/cbrn/proc/flamer_fire_callback(mob/living/burning_mob, datum/reagent/fire_reagent) + SIGNAL_HANDLER + + if(fire_reagent?.fire_penetrating) + return + + . = COMPONENT_NO_IGNITE|COMPONENT_NO_BURN + +/datum/action/item_action/specialist/toggle_cbrn_hood + ability_primacy = SPEC_PRIMARY_ACTION_2 + +/datum/action/item_action/specialist/toggle_cbrn_hood/New(obj/item/clothing/suit/storage/marine/cbrn/suit, obj/item/holder) + ..() + name = "Toggle Hood" + button.name = name + button.overlays.Cut() + var/image/button_overlay = image(suit.linked_hood.icon, suit, suit.linked_hood.icon_state) + button.overlays += button_overlay + +/datum/action/item_action/specialist/toggle_cbrn_hood/action_activate() + . = ..() + var/obj/item/clothing/suit/storage/marine/cbrn/suit = holder_item + if(!istype(suit)) + return + suit.hood_toggle() /obj/item/clothing/suit/storage/marine/cbrn/advanced slowdown = SLOWDOWN_ARMOR_LOWHEAVY @@ -1022,3 +1147,4 @@ armor_bio = CLOTHING_ARMOR_GIGAHIGHPLUS armor_rad = CLOTHING_ARMOR_GIGAHIGHPLUS armor_internaldamage = CLOTHING_ARMOR_HIGHPLUS + hood_type = /obj/item/clothing/head/helmet/marine/cbrn_hood/advanced diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index d8abe717c11e..fffb57013ccf 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -207,7 +207,8 @@ // Fireproof suit -/obj/item/clothing/suit/fire/fireproof_suit +///obj/item/clothing/suit/fire/fireproof_suit +/obj/item/clothing/suit/storage/marine/cbrn/lava //child of cbrn suit for fireproofing and hood toggling name = "HZP-12 entry-type proximity suit" desc = "The 'HZP-12' is a bulky extreme environment suit manufactured by Lorenz SysTech Development under Seegson industrial contract for personnel operating in severe thermal hazard zones." icon = 'icons/obj/items/clothing/suits/hazard.dmi' @@ -217,13 +218,31 @@ icon_state = "fireproof_suit" item_state = "fireproof_suit" uniform_restricted = null + storage_slots = 0 + flags_inv_hide = HIDEJUMPSUIT|HIDETAIL + flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS|BODY_FLAG_FEET|BODY_FLAG_ARMS|BODY_FLAG_HANDS + allowed = list( + /obj/item/tool/extinguisher, + + /obj/item/device/flashlight, + /obj/item/device/healthanalyzer, + /obj/item/device/radio, + /obj/item/tank/emergency_oxygen, + /obj/item/tool/crowbar, + /obj/item/tool/pen, + ) + + slowdown = SLOWDOWN_ARMOR_HEAVY + flags_inventory = NOPRESSUREDMAGE fire_intensity_resistance = BURN_LEVEL_TIER_1 max_heat_protection_temperature = ARMOR_MAX_HEAT_PROT unacidable = TRUE - - flags_inv_hide = HIDEJUMPSUIT|HIDETAIL - -/obj/item/clothing/suit/fire/fireproof_suit/Initialize(mapload) - . = ..() - RemoveElement(/datum/element/corp_label/armat) - AddElement(/datum/element/corp_label/seegson) + flags_heat_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS|BODY_FLAG_FEET|BODY_FLAG_ARMS|BODY_FLAG_HANDS + flags_cold_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS|BODY_FLAG_FEET|BODY_FLAG_ARMS|BODY_FLAG_HANDS + armor_melee = CLOTHING_ARMOR_NONE + armor_bullet = CLOTHING_ARMOR_NONE + armor_bomb = CLOTHING_ARMOR_NONE + armor_bio = CLOTHING_ARMOR_NONE + armor_rad = CLOTHING_ARMOR_NONE + armor_internaldamage = CLOTHING_ARMOR_NONE + hood_type = /obj/item/clothing/head/helmet/marine/fireproof_hood diff --git a/code/modules/clothing/under/marine_uniform.dm b/code/modules/clothing/under/marine_uniform.dm index 37fa98527051..311eba308f28 100644 --- a/code/modules/clothing/under/marine_uniform.dm +++ b/code/modules/clothing/under/marine_uniform.dm @@ -2038,136 +2038,11 @@ flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_ARMS|BODY_FLAG_LEGS flags_cold_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_ARMS|BODY_FLAG_LEGS flags_heat_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_ARMS|BODY_FLAG_LEGS - actions_types = list(/datum/action/item_action/specialist/toggle_cbrn_hood) item_icons = list( WEAR_BODY = 'icons/mob/humans/onmob/clothing/uniforms/uniforms_by_faction/UA.dmi', ) - ///Whether the hood and gas mask were worn through the hood toggle verb - var/hood_enabled = FALSE - ///Whether enabling the hood protects you from fire - var/supports_fire_protection = TRUE - ///Typepath of the attached hood - var/hood_type = /obj/item/clothing/head/helmet/marine/cbrn_hood - ///The head clothing that the suit uses as a hood - var/obj/item/clothing/head/linked_hood - -/obj/item/clothing/under/marine/cbrn/Initialize() - linked_hood = new hood_type(src) - . = ..() - -/obj/item/clothing/under/marine/cbrn/Destroy() - . = ..() - if(linked_hood) - qdel(linked_hood) - -/obj/item/clothing/under/marine/cbrn/verb/hood_toggle() - set name = "Toggle Hood" - set desc = "Pull your hood and gasmask up over your face and head." - set src in usr - if(!usr || usr.is_mob_incapacitated(TRUE)) - return - if(!ishuman(usr)) - return - var/mob/living/carbon/human/user = usr - - if(user.w_uniform != src) - to_chat(user, SPAN_WARNING("You must be wearing [src] to put on [linked_hood] attached to it!")) - return - - if(!linked_hood) - to_chat(user, SPAN_BOLDWARNING("You are missing a linked_hood! This should not be possible.")) - CRASH("[user] attempted to toggle hood on [src] that was missing a linked_hood.") - - playsound(user.loc, "armorequip", 25, 1) - if(hood_enabled) - disable_hood(user, FALSE) - return - enable_hood(user) - -/obj/item/clothing/under/marine/cbrn/proc/enable_hood(mob/living/carbon/human/user) - if(!istype(user)) - user = usr - - if(!linked_hood.mob_can_equip(user, WEAR_HEAD)) - to_chat(user, SPAN_WARNING("You are unable to equip [linked_hood].")) - return - - user.equip_to_slot(linked_hood, WEAR_HEAD) - - hood_enabled = TRUE - RegisterSignal(src, COMSIG_ITEM_UNEQUIPPED, PROC_REF(disable_hood)) - RegisterSignal(linked_hood, COMSIG_ITEM_UNEQUIPPED, PROC_REF(disable_hood)) - - if(!supports_fire_protection) - return - to_chat(user, SPAN_NOTICE("You raise [linked_hood] over your head. You will no longer catch fire.")) - toggle_fire_protection(user, TRUE) - -/obj/item/clothing/under/marine/cbrn/proc/disable_hood(mob/living/carbon/human/user, forced = TRUE) - if(!istype(user)) - user = usr - - UnregisterSignal(src, COMSIG_ITEM_UNEQUIPPED) - UnregisterSignal(linked_hood, COMSIG_ITEM_UNEQUIPPED) - addtimer(CALLBACK(user, TYPE_PROC_REF(/mob/living/carbon/human, drop_inv_item_to_loc), linked_hood, src), 1) //0.1s delay cause you can grab the hood - addtimer(CALLBACK(src, PROC_REF(check_remove_headgear)), 2) //Checks if it is still not in contents, incase it was dropped - - hood_enabled = FALSE - if(!forced) - to_chat(user, SPAN_NOTICE("You take off [linked_hood].")) - - if(supports_fire_protection) - toggle_fire_protection(user, FALSE) - -/obj/item/clothing/under/marine/cbrn/proc/check_remove_headgear(obj/item/clothing/under/marine/cbrn/uniform = src) - for(var/current_atom in contents) - if(current_atom == linked_hood) - return - linked_hood.forceMove(uniform) - -/obj/item/clothing/under/marine/cbrn/proc/toggle_fire_protection(mob/living/carbon/user, enable_fire_protection) - if(enable_fire_protection) - RegisterSignal(user, COMSIG_LIVING_PREIGNITION, PROC_REF(fire_shield_is_on)) - RegisterSignal(user, list(COMSIG_LIVING_FLAMER_CROSSED, COMSIG_LIVING_FLAMER_FLAMED), PROC_REF(flamer_fire_callback)) - return - UnregisterSignal(user, list(COMSIG_LIVING_PREIGNITION, COMSIG_LIVING_FLAMER_CROSSED, COMSIG_LIVING_FLAMER_FLAMED)) - -/obj/item/clothing/under/marine/cbrn/proc/fire_shield_is_on(mob/living/burning_mob) //Stealing it from the pyro spec armor - SIGNAL_HANDLER - - if(burning_mob.fire_reagent?.fire_penetrating) - return - - return COMPONENT_CANCEL_IGNITION - -/obj/item/clothing/under/marine/cbrn/proc/flamer_fire_callback(mob/living/burning_mob, datum/reagent/fire_reagent) - SIGNAL_HANDLER - - if(fire_reagent?.fire_penetrating) - return - - . = COMPONENT_NO_IGNITE|COMPONENT_NO_BURN - -/datum/action/item_action/specialist/toggle_cbrn_hood - ability_primacy = SPEC_PRIMARY_ACTION_2 - -/datum/action/item_action/specialist/toggle_cbrn_hood/New(obj/item/clothing/under/marine/cbrn/armor, obj/item/holder) - ..() - name = "Toggle Hood" - button.name = name - button.overlays.Cut() - var/image/button_overlay = image(armor.linked_hood.icon, armor, armor.linked_hood.icon_state) - button.overlays += button_overlay - -/datum/action/item_action/specialist/toggle_cbrn_hood/action_activate() - . = ..() - var/obj/item/clothing/under/marine/cbrn/armor = holder_item - if(!istype(armor)) - return - armor.hood_toggle() - /obj/item/clothing/under/marine/cbrn/advanced armor_melee = CLOTHING_ARMOR_MEDIUM armor_bullet = CLOTHING_ARMOR_MEDIUMHIGH @@ -2175,7 +2050,6 @@ armor_bio = CLOTHING_ARMOR_HARDCORE armor_rad = CLOTHING_ARMOR_GIGAHIGHPLUS armor_internaldamage = CLOTHING_ARMOR_HIGHPLUS - hood_type = /obj/item/clothing/head/helmet/marine/cbrn_hood/advanced // Seegson Security diff --git a/code/modules/fire_colony/lava.dm b/code/modules/fire_colony/lava.dm index eb8b04bef444..66a26c0a6e2a 100644 --- a/code/modules/fire_colony/lava.dm +++ b/code/modules/fire_colony/lava.dm @@ -21,11 +21,23 @@ . = ..() invisibility = 101 -/obj/effect/blocker/lava/Crossed(mob/living/affected_mob) - if(!ismob(affected_mob)) +/obj/effect/blocker/lava/Crossed(atom/thing) + if(ishuman(thing) || isxeno(thing)) //affects everything + var/mob/living/affected_mob = thing + affected_mob.AddComponent(/datum/component/damage_over_time, /obj/effect/blocker/lava, dam_amount = dam_amount, dam_type = dam_type, target_temp = target_temp, temp_delta = temp_delta, synth_dmg_mult=0.8, pred_dmg_mult=0.8, warning_message=warning_message, enviro=TRUE, apply_fire=TRUE, burn_reagent = burn_reagent, burn_stacks = burn_stacks) return - if(!ishuman(affected_mob) && !isxeno(affected_mob)) //affects everything + if(isVehicleMultitile(thing)) + var/obj/vehicle/multitile/vic = thing + //nothing is immune + vic.handle_acidic_environment(src) + START_PROCESSING(SSobj, src) return - affected_mob.AddComponent(/datum/component/damage_over_time, /obj/effect/blocker/lava, dam_amount = dam_amount, dam_type = dam_type, target_temp = target_temp, temp_delta = temp_delta, synth_dmg_mult=0.8, pred_dmg_mult=0.8, warning_message=warning_message, enviro=TRUE, apply_fire=TRUE, burn_reagent = burn_reagent, burn_stacks = burn_stacks) +/obj/effect/blocker/lava/process() + var/targets_present = 0 + for(var/obj/vehicle/multitile/vic in range(0, src)) + targets_present++ + vic.handle_acidic_environment(src) + if(targets_present < 1) + STOP_PROCESSING(SSobj, src) diff --git a/code/modules/vehicles/hardpoints/wheels/locomotion.dm b/code/modules/vehicles/hardpoints/wheels/locomotion.dm index e4aad7c10a00..9cf13ffcb760 100644 --- a/code/modules/vehicles/hardpoints/wheels/locomotion.dm +++ b/code/modules/vehicles/hardpoints/wheels/locomotion.dm @@ -68,6 +68,9 @@ //multitile vehicles are, well, multitile and will be receiving damage for each tile, so damage is low per tile. take_damage = 10 + else if(istype(A, /obj/effect/blocker/lava)) + take_damage = 15 + //then we check whether this locomotion module is acid-resistant if(acid_resistant) take_damage = take_damage / 2