Skip to content

Commit

Permalink
[MIRROR] Riot armor and helmets (and similar gear) protect against mo…
Browse files Browse the repository at this point in the history
…re melee-based attacks (like RNG punches), bottles aren't near guaranteed knockdowns (#1133)

* Riot armor and helmets (and similar gear) protect against more melee-based attacks (like RNG punches), bottles aren't near guaranteed knockdowns

* Update _species.dm

* Update _species.dm

---------

Co-authored-by: necromanceranne <[email protected]>
Co-authored-by: Mal <[email protected]>
  • Loading branch information
3 people authored and StealsThePRs committed Feb 26, 2024
1 parent 56d4faa commit fbd9ba0
Show file tree
Hide file tree
Showing 21 changed files with 103 additions and 48 deletions.
6 changes: 4 additions & 2 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,10 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_BLOOD_DEFICIENCY "blood_deficiency"
#define TRAIT_JOLLY "jolly"
#define TRAIT_NOCRITDAMAGE "no_crit"
/// Prevents shovies against a dense object from knocking them down.
#define TRAIT_SHOVE_KNOCKDOWN_BLOCKED "shove_knockdown_blocked"
/// Prevents shovies and some strong blows such as unarmed punches and (unreliably) tackles the owner down
#define TRAIT_BRAWLING_KNOCKDOWN_BLOCKED "brawling_knockdown_blocked"
/// Prevents some severe head injuries being sustained from heavy collisions or blunt force injuries.
#define TRAIT_HEAD_INJURY_BLOCKED "head_injury_blocked"
/// Prevents staggering.
#define TRAIT_NO_STAGGER "no_stagger"
/// Getting hit by thrown movables won't push you away
Expand Down
3 changes: 2 additions & 1 deletion code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_BONSAI" = TRAIT_BONSAI,
"TRAIT_BOOZE_SLIDER" = TRAIT_BOOZE_SLIDER,
"TRAIT_BRAINWASHING" = TRAIT_BRAINWASHING,
"TRAIT_BRAWLING_KNOCKDOWN_BLOCKED" = TRAIT_BRAWLING_KNOCKDOWN_BLOCKED,
"TRAIT_BYPASS_EARLY_IRRADIATED_CHECK" = TRAIT_BYPASS_EARLY_IRRADIATED_CHECK,
"TRAIT_BYPASS_MEASURES" = TRAIT_BYPASS_MEASURES,
"TRAIT_CANNOT_BE_UNBUCKLED" = TRAIT_CANNOT_BE_UNBUCKLED,
Expand Down Expand Up @@ -238,6 +239,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_HAS_CRANIAL_FISSURE" = TRAIT_HAS_CRANIAL_FISSURE,
"TRAIT_HAS_MARKINGS" = TRAIT_HAS_MARKINGS,
"TRAIT_HATED_BY_DOGS" = TRAIT_HATED_BY_DOGS,
"TRAIT_HEAD_INJURY_BLOCKED" = TRAIT_HEAD_INJURY_BLOCKED,
"TRAIT_HEALS_FROM_CARP_RIFTS" = TRAIT_HEALS_FROM_CARP_RIFTS,
"TRAIT_HEALS_FROM_CULT_PYLONS" = TRAIT_HEALS_FROM_CULT_PYLONS,
"TRAIT_HEAR_THROUGH_DARKNESS" = TRAIT_HEAR_THROUGH_DARKNESS,
Expand Down Expand Up @@ -404,7 +406,6 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_SHAVED" = TRAIT_SHAVED,
"TRAIT_SHIFTY_EYES" = TRAIT_SHIFTY_EYES,
"TRAIT_SHOCKIMMUNE" = TRAIT_SHOCKIMMUNE,
"TRAIT_SHOVE_KNOCKDOWN_BLOCKED" = TRAIT_SHOVE_KNOCKDOWN_BLOCKED,
"TRAIT_SIGN_LANG" = TRAIT_SIGN_LANG,
"TRAIT_PAPER_MASTER" = TRAIT_PAPER_MASTER,
"TRAIT_SILENT_FOOTSTEPS" = TRAIT_SILENT_FOOTSTEPS,
Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@
glasses.add_mob_blood(src)
update_worn_glasses()

if(!attacking_item.get_sharpness() && armor_block < 50)
if(!attacking_item.get_sharpness() && !HAS_TRAIT(src, TRAIT_HEAD_INJURY_BLOCKED))
if(prob(damage_done))
adjustOrganLoss(ORGAN_SLOT_BRAIN, 20)
if(stat == CONSCIOUS)
Expand Down Expand Up @@ -420,7 +420,7 @@
w_uniform.add_mob_blood(src)
update_worn_undersuit()

if(stat == CONSCIOUS && !attacking_item.get_sharpness() && armor_block < 50)
if(stat == CONSCIOUS && !attacking_item.get_sharpness() && !HAS_TRAIT(src, TRAIT_BRAWLING_KNOCKDOWN_BLOCKED))
if(prob(damage_done))
visible_message(
span_danger("[src] is knocked down!"),
Expand Down
16 changes: 6 additions & 10 deletions code/datums/components/tackle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@
defense_mod += 2
if(tackle_target.mob_negates_gravity())
defense_mod += 1
if(HAS_TRAIT(tackle_target, TRAIT_SHOVE_KNOCKDOWN_BLOCKED)) // riot armor and such
if(HAS_TRAIT(tackle_target, TRAIT_BRAWLING_KNOCKDOWN_BLOCKED)) // riot armor and such
defense_mod += 5

var/obj/item/organ/external/tail/lizard/el_tail = tackle_target.get_organ_slot(ORGAN_SLOT_EXTERNAL_TAIL)
Expand Down Expand Up @@ -451,7 +451,7 @@
attack_mod += 15
human_sacker.adjustStaminaLoss(100) //AHAHAHAHAHAHAHAHA

if(HAS_TRAIT(human_sacker, TRAIT_SHOVE_KNOCKDOWN_BLOCKED)) // tackling with riot specialized armor, like riot armor, is effective but tiring
if(HAS_TRAIT(human_sacker, TRAIT_BRAWLING_KNOCKDOWN_BLOCKED)) // tackling with riot specialized armor, like riot armor, is effective but tiring
attack_mod += 2
human_sacker.adjustStaminaLoss(20)

Expand Down Expand Up @@ -499,14 +499,10 @@
var/danger_zone = (speed - 1) * 13 // for every extra speed we have over 1, take away 13 of the safest chance
danger_zone = max(min(danger_zone, 100), 1)

if(ishuman(user))
var/mob/living/carbon/human/S = user
var/head_slot = S.get_item_by_slot(ITEM_SLOT_HEAD)
var/suit_slot = S.get_item_by_slot(ITEM_SLOT_OCLOTHING)
if(head_slot && (istype(head_slot,/obj/item/clothing/head/helmet) || istype(head_slot,/obj/item/clothing/head/utility/hardhat)))
oopsie_mod -= 6
if(suit_slot && (istype(suit_slot,/obj/item/clothing/suit/armor/riot)))
oopsie_mod -= 6
if(HAS_TRAIT(user, TRAIT_BRAWLING_KNOCKDOWN_BLOCKED))
oopsie_mod -= 6
if(HAS_TRAIT(user, TRAIT_HEAD_INJURY_BLOCKED))
oopsie_mod -= 6

if(HAS_TRAIT(user, TRAIT_CLUMSY))
oopsie_mod += 6 //honk!
Expand Down
5 changes: 3 additions & 2 deletions code/modules/clothing/head/hardhat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
var/hat_type = "yellow"
///Whether the headlamp is on or off.
var/on = FALSE

clothing_traits = list(TRAIT_HEAD_INJURY_BLOCKED)

/datum/armor/utility_hardhat
melee = 15
Expand Down Expand Up @@ -224,6 +224,7 @@
light_color = "#fff2bf"
worn_y_offset = 1
dog_fashion = /datum/dog_fashion/head/pumpkin/unlit
clothing_traits = list()

/obj/item/clothing/head/utility/hardhat/pumpkinhead/set_light_on(new_value)
. = ..()
Expand Down Expand Up @@ -277,6 +278,6 @@
flags_inv = 0
armor_type = /datum/armor/none
light_range = 1 //luminosity when on

clothing_traits = list()

dog_fashion = /datum/dog_fashion/head/reindeer
3 changes: 3 additions & 0 deletions code/modules/clothing/head/helmet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
visor_flags_inv = HIDEFACE|HIDESNOUT
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF
visor_flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF
clothing_traits = list(TRAIT_HEAD_INJURY_BLOCKED)

/datum/armor/toggleable_riot
melee = 50
Expand Down Expand Up @@ -247,6 +248,7 @@
strip_delay = 80
resistance_flags = FIRE_PROOF | ACID_PROOF
dog_fashion = null
clothing_traits = list(TRAIT_HEAD_INJURY_BLOCKED)

/datum/armor/helmet_swat
melee = 40
Expand Down Expand Up @@ -394,6 +396,7 @@
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
strip_delay = 80
dog_fashion = null
clothing_traits = list(TRAIT_HEAD_INJURY_BLOCKED)

/datum/armor/helmet_knight
melee = 50
Expand Down
4 changes: 2 additions & 2 deletions code/modules/clothing/suits/armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
armor_type = /datum/armor/armor_riot
strip_delay = 80
equip_delay_other = 60
clothing_traits = list(TRAIT_SHOVE_KNOCKDOWN_BLOCKED)
clothing_traits = list(TRAIT_BRAWLING_KNOCKDOWN_BLOCKED)

/datum/armor/armor_riot
melee = 50
Expand Down Expand Up @@ -410,7 +410,7 @@
max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT
slowdown = 0.7
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
clothing_traits = list(TRAIT_SHOVE_KNOCKDOWN_BLOCKED)
clothing_traits = list(TRAIT_BRAWLING_KNOCKDOWN_BLOCKED)


//All of the armor below is mostly unused
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/alien/adult/queen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// as a wise man once wrote: "pull over that ass too fat"
REMOVE_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
// that'd be a too cheeky shield bashing strat
ADD_TRAIT(src, TRAIT_SHOVE_KNOCKDOWN_BLOCKED, INNATE_TRAIT)
ADD_TRAIT(src, TRAIT_BRAWLING_KNOCKDOWN_BLOCKED, INNATE_TRAIT)
AddComponent(/datum/component/seethrough_mob)

/mob/living/carbon/alien/adult/royal/on_lying_down(new_lying_angle)
Expand Down
8 changes: 7 additions & 1 deletion code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,18 @@
span_userdanger("You violently crash into [victim][extra_speed ? " extra hard" : ""], but [victim] managed to block the worst of it!"))
log_combat(src, victim, "crashed into and was blocked by")
return
else if(HAS_TRAIT(src, TRAIT_BRAWLING_KNOCKDOWN_BLOCKED))
victim.take_bodypart_damage(10 + 5 * extra_speed, check_armor = TRUE, wound_bonus = extra_speed * 5)
victim.apply_damage(10 + 10 * extra_speed, STAMINA)
victim.adjust_staggered_up_to(STAGGERED_SLOWDOWN_LENGTH * 2, 10 SECONDS)
visible_message(span_danger("[src] crashes into [victim][extra_speed ? " really hard" : ""], but [victim] was able to stay on their feet!"),\
span_userdanger("You violently crash into [victim][extra_speed ? " extra hard" : ""], but [victim] managed to stay on their feet!"))
else
victim.Paralyze(2 SECONDS)
victim.take_bodypart_damage(10 + 5 * extra_speed, check_armor = TRUE, wound_bonus = extra_speed * 5)
visible_message(span_danger("[src] crashes into [victim][extra_speed ? " really hard" : ""], knocking them both over!"),\
span_userdanger("You violently crash into [victim][extra_speed ? " extra hard" : ""]!"))
log_combat(src, victim, "crashed into")
log_combat(src, victim, "crashed into")

if(oof_noise)
playsound(src,'sound/weapons/punch1.ogg',50,TRUE)
Expand Down
22 changes: 12 additions & 10 deletions code/modules/mob/living/carbon/human/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1229,16 +1229,18 @@ GLOBAL_LIST_EMPTY(features_by_species)
log_combat(user, target, "punched")

//If we rolled a punch high enough to hit our stun threshold, or our target is staggered and they have at least 40 damage+stamina loss, we knock them down
if((target.stat != DEAD) && prob(limb_accuracy) || (target.stat != DEAD) && staggered && (target.getStaminaLoss() + user.getBruteLoss()) >= 40)
target.visible_message(span_danger("[user] knocks [target] down!"), \
span_userdanger("You're knocked down by [user]!"), span_hear("You hear aggressive shuffling followed by a loud thud!"), COMBAT_MESSAGE_RANGE, user)
to_chat(user, span_danger("You knock [target] down!"))
/* NOVA EDIT REMOVAL - Less combat lethality and hard stuns
var/knockdown_duration = 4 SECONDS + (target.getStaminaLoss() + (target.getBruteLoss()*0.5))*0.8 //50 total damage = 4 second base stun + 4 second stun modifier = 8 second knockdown duration
target.apply_effect(knockdown_duration, EFFECT_KNOCKDOWN, armor_block)
NOVA EDIT REMOVAL END */
target.StaminaKnockdown(20) //NOVA EDIT ADDITION
log_combat(user, target, "got a stun punch with their previous punch")
//This does not work against opponents who are knockdown immune, such as from wearing riot armor.
if(!HAS_TRAIT(src, TRAIT_BRAWLING_KNOCKDOWN_BLOCKED))
if((target.stat != DEAD) && prob(limb_accuracy) || (target.stat != DEAD) && staggered && (target.getStaminaLoss() + user.getBruteLoss()) >= 40)
target.visible_message(span_danger("[user] knocks [target] down!"), \
span_userdanger("You're knocked down by [user]!"), span_hear("You hear aggressive shuffling followed by a loud thud!"), COMBAT_MESSAGE_RANGE, user)
to_chat(user, span_danger("You knock [target] down!"))
/* NOVA EDIT REMOVAL START - Less combat lethality and hard stuns
var/knockdown_duration = 4 SECONDS + (target.getStaminaLoss() + (target.getBruteLoss()*0.5))*0.8 //50 total damage = 4 second base stun + 4 second stun modifier = 8 second knockdown duration
target.apply_effect(knockdown_duration, EFFECT_KNOCKDOWN, armor_block)
NOVA EDIT REMOVAL END */
target.StaminaKnockdown(20) // NOVA EDIT ADDITION
log_combat(user, target, "got a stun punch with their previous punch")

/datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(user.body_position != STANDING_UP)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
return
if(!(shove_flags & SHOVE_KNOCKDOWN_BLOCKED))
target.Knockdown(SHOVE_KNOCKDOWN_HUMAN)
if(!HAS_TRAIT(src, TRAIT_SHOVE_KNOCKDOWN_BLOCKED))
if(!HAS_TRAIT(src, TRAIT_BRAWLING_KNOCKDOWN_BLOCKED))
Knockdown(SHOVE_KNOCKDOWN_COLLATERAL)
target.visible_message(span_danger("[shover] shoves [target.name] into [name]!"),
span_userdanger("You're shoved into [name] by [shover]!"), span_hear("You hear aggressive shuffling followed by a loud thud!"), COMBAT_MESSAGE_RANGE, src)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/living_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@
. |= SHOVE_CAN_MOVE
if(!buckled)
. |= SHOVE_CAN_HIT_SOMETHING
if(HAS_TRAIT(src, TRAIT_SHOVE_KNOCKDOWN_BLOCKED))
if(HAS_TRAIT(src, TRAIT_BRAWLING_KNOCKDOWN_BLOCKED))
. |= SHOVE_KNOCKDOWN_BLOCKED

///Send the chat feedback message for shoving
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/silicon/silicon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
TRAIT_MADNESS_IMMUNE,
TRAIT_MARTIAL_ARTS_IMMUNE,
TRAIT_NOFIRE_SPREAD,
TRAIT_SHOVE_KNOCKDOWN_BLOCKED,
TRAIT_BRAWLING_KNOCKDOWN_BLOCKED,
)

add_traits(traits_to_apply, ROUNDSTART_TRAIT)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mod/mod_theme.dm
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@
a few years out of date, leading to an overall lower capacity for modules."
default_skin = "security"
armor_type = /datum/armor/mod_theme_security
complexity_max = DEFAULT_MAX_COMPLEXITY - 3
complexity_max = DEFAULT_MAX_COMPLEXITY - 2
slowdown_inactive = 1
slowdown_active = 0.5
allowed_suit_storage = list(
Expand Down
7 changes: 7 additions & 0 deletions code/modules/mod/mod_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
/obj/item/mod/module/flashlight,
/obj/item/mod/module/tether,
/obj/item/mod/module/magboot,
/obj/item/mod/module/headprotector,
)
default_pins = list(
/obj/item/mod/module/magboot,
Expand All @@ -72,6 +73,7 @@
/obj/item/mod/module/magboot,
/obj/item/mod/module/t_ray,
/obj/item/mod/module/quick_carry,
/obj/item/mod/module/headprotector,
)
default_pins = list(
/obj/item/mod/module/magboot,
Expand All @@ -87,6 +89,7 @@
/obj/item/mod/module/rad_protection,
/obj/item/mod/module/flashlight,
/obj/item/mod/module/jetpack,
/obj/item/mod/module/headprotector,
)
default_pins = list(
/obj/item/mod/module/magboot/advanced,
Expand Down Expand Up @@ -153,6 +156,7 @@
/obj/item/mod/module/flashlight,
/obj/item/mod/module/circuit,
/obj/item/mod/module/t_ray,
/obj/item/mod/module/headprotector,
)

/obj/item/mod/control/pre_equipped/security
Expand All @@ -165,6 +169,7 @@
/obj/item/mod/module/criminalcapture,
/obj/item/mod/module/dispenser/mirage,
/obj/item/mod/module/quick_cuff,
/obj/item/mod/module/headprotector,
)

/obj/item/mod/control/pre_equipped/safeguard
Expand All @@ -179,6 +184,7 @@
/obj/item/mod/module/projectile_dampener,
/obj/item/mod/module/pepper_shoulders,
/obj/item/mod/module/quick_cuff,
/obj/item/mod/module/headprotector,
)
default_pins = list(
/obj/item/mod/module/jetpack,
Expand All @@ -194,6 +200,7 @@
/obj/item/mod/module/jetpack/advanced,
/obj/item/mod/module/pathfinder,
/obj/item/mod/module/quick_cuff,
/obj/item/mod/module/headprotector,
)
default_pins = list(
/obj/item/mod/module/jetpack/advanced,
Expand Down
17 changes: 12 additions & 5 deletions code/modules/mod/modules/modules_antag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
module_type = MODULE_TOGGLE
active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
removable = FALSE
incompatible_modules = list(/obj/item/mod/module/armor_booster, /obj/item/mod/module/welding)
incompatible_modules = list(/obj/item/mod/module/armor_booster, /obj/item/mod/module/welding, /obj/item/mod/module/headprotector)
cooldown_time = 0.5 SECONDS
overlay_state_inactive = "module_armorbooster_off"
overlay_state_active = "module_armorbooster_on"
Expand All @@ -26,6 +26,8 @@
var/list/armor_mod = /datum/armor/mod_module_armor_boost
/// List of parts of the suit that are spaceproofed, for giving them back the pressure protection.
var/list/spaceproofed = list()
/// List of traits added when the mod is activated
var/list/traits_to_add = list(TRAIT_HEAD_INJURY_BLOCKED)

/datum/armor/mod_module_armor_boost
melee = 25
Expand All @@ -50,6 +52,7 @@
actual_speed_added = max(0, min(mod.slowdown_active, speed_added))
mod.slowdown -= actual_speed_added
mod.wearer.update_equipment_speed_mods()
mod.wearer.add_traits(traits_to_add, MOD_TRAIT)
var/list/parts = mod.mod_parts + mod
for(var/obj/item/part as anything in parts)
part.set_armor(part.get_armor().add_other_armor(armor_mod))
Expand All @@ -69,6 +72,7 @@
balloon_alert(mod.wearer, "armor retracts, EVA ready")
mod.slowdown += actual_speed_added
mod.wearer.update_equipment_speed_mods()
mod.wearer.remove_traits(traits_to_add, MOD_TRAIT)
var/list/parts = mod.mod_parts + mod
for(var/obj/item/part as anything in parts)
part.set_armor(part.get_armor().subtract_other_armor(armor_mod))
Expand Down Expand Up @@ -483,12 +487,15 @@
/obj/item/mod/module/infiltrator
name = "MOD infiltration core programs module"
desc = "The primary stealth systems operating within the suit. Utilizing electromagnetic signals, \
the wearer simply cannot be observed closely, or heard clearly by those around them."
the wearer simply cannot be observed closely, or heard clearly by those around them.\
It also contains some dampening systems to help protect a user from blows to the head."
icon_state = "infiltrator"
complexity = 0
removable = FALSE
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0
incompatible_modules = list(/obj/item/mod/module/infiltrator, /obj/item/mod/module/armor_booster, /obj/item/mod/module/welding)
incompatible_modules = list(/obj/item/mod/module/infiltrator, /obj/item/mod/module/armor_booster, /obj/item/mod/module/welding, /obj/item/mod/module/headprotector)
/// List of traits added when the suit is activated
var/list/traits_to_add = list(TRAIT_SILENT_FOOTSTEPS, TRAIT_UNKNOWN, TRAIT_HEAD_INJURY_BLOCKED)

/obj/item/mod/module/infiltrator/on_install()
mod.item_flags |= EXAMINE_SKIP
Expand All @@ -497,11 +504,11 @@
mod.item_flags &= ~EXAMINE_SKIP

/obj/item/mod/module/infiltrator/on_suit_activation()
mod.wearer.add_traits(list(TRAIT_SILENT_FOOTSTEPS, TRAIT_UNKNOWN), MOD_TRAIT)
mod.wearer.add_traits(traits_to_add, MOD_TRAIT)
mod.helmet.flash_protect = FLASH_PROTECTION_WELDER

/obj/item/mod/module/infiltrator/on_suit_deactivation(deleting = FALSE)
mod.wearer.remove_traits(list(TRAIT_SILENT_FOOTSTEPS, TRAIT_UNKNOWN), MOD_TRAIT)
mod.wearer.remove_traits(traits_to_add, MOD_TRAIT)
if(deleting)
return
mod.helmet.flash_protect = initial(mod.helmet.flash_protect)
Expand Down
18 changes: 18 additions & 0 deletions code/modules/mod/modules/modules_engineering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,24 @@
rcd_scan(src, fade_time = 10 SECONDS)
drain_power(use_power_cost)

///Safety-First Head Protection - Protects your brain matter from sudden impacts.
/obj/item/mod/module/headprotector
name = "MOD Safety-First Head Protection module"
desc = "A series of dampening plates are installed along the back and upper areas of \
the helmet. These plates absorb abrupt kinetic shocks delivered to the skull. \
The bulk of this module prevents it from being installed in any suit that is capable \
of combat armor adjustments. However, the rudimentry nature of the module makes it \
relatively easy to install into most other suits."
icon_state = "welding"
complexity = 1
incompatible_modules = list(/obj/item/mod/module/armor_booster, /obj/item/mod/module/infiltrator)

/obj/item/mod/module/constructor/on_suit_activation()
ADD_TRAIT(mod.wearer, TRAIT_HEAD_INJURY_BLOCKED, MOD_TRAIT)

/obj/item/mod/module/constructor/on_suit_deactivation(deleting = FALSE)
REMOVE_TRAIT(mod.wearer, TRAIT_HEAD_INJURY_BLOCKED, MOD_TRAIT)

///Mister - Sprays water over an area.
/obj/item/mod/module/mister
name = "MOD water mister module"
Expand Down
Loading

0 comments on commit fbd9ba0

Please sign in to comment.