Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
25 changes: 11 additions & 14 deletions code/game/turfs/lava.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
126 changes: 126 additions & 0 deletions code/modules/clothing/suits/marine_armor/ert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
35 changes: 27 additions & 8 deletions code/modules/clothing/suits/utility.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
126 changes: 0 additions & 126 deletions code/modules/clothing/under/marine_uniform.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2038,144 +2038,18 @@
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
armor_bomb = CLOTHING_ARMOR_HIGHPLUS
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

Expand Down
Loading
Loading