Skip to content

Commit

Permalink
Adds in hoods + OWLF placeholder items (#2877)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->

# About the pull request
This adds in a new system for 'hoods' or integrated helmets akin to
normal SS13's voidsuits. None of this has stats apart from the uniform,
and this is meant to be a foundation for properly implementing OWLF in
the future, as a possible replacement pred hunting ERT for DD.
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
It's cool, the code works, and this is soulful.
<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding, and may discourage maintainers from reviewing or merging
your PR. This section is not strictly required for (non-controversial)
fix PRs or backend PRs. -->


# Testing Photographs and Procedure
<!-- Include any screenshots/videos/debugging steps of the modified code
functioning successfully, ideally including edge cases. -->
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. Please note that
maintainers freely reserve the right to remove and add tags should they
deem it appropriate. You can attempt to finagle the system all you want,
but it's best to shoot for clear communication right off the bat. -->
<!-- If you add a name after the ':cl', that name will be used in the
changelog. You must add your CKEY after the CL if your GitHub name
doesn't match. Be sure to properly mark your PRs to prevent unnecessary
GBP loss. Maintainers freely reserve the right to remove and add tags
should they deem it appropriate. -->

:cl:
add: Added OWLF placeholder items, none of which are properly statted
yet.
code: CM's code now has support for integrated hoods for uniforms.
/:cl:

<!-- Both :cl:'s are required for the changelog to work! -->

---------

Co-authored-by: harryob <me@harryob.live>
  • Loading branch information
NewyearnewmeUwu and harryob committed Mar 31, 2023
1 parent f04092e commit 70c3e3b
Show file tree
Hide file tree
Showing 16 changed files with 96 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/cooldowns.dm
@@ -1,6 +1,7 @@
#define COOLDOWN_MOB_AUDIO "mob_audio_cooldown"
#define COOLDOWN_IDLOCK_TEXTALERT "mob_idlock_textalert"
#define COOLDOWN_HIJACK_BARRAGE "gamemode_explosive_barrage"
#define COOLDOWN_ITEM_HOOD_SOUND "item_hood_sound"

//Define for ship alt
#define COOLDOWN_ALTITUDE_CHANGE "altitude_change"
Expand Down
8 changes: 8 additions & 0 deletions code/__DEFINES/traits.dm
Expand Up @@ -188,6 +188,8 @@
#define TRAIT_TOOL_SIMPLE_BLOWTORCH "t_tool_simple_blowtorch"

#define TRAIT_TOOL_PEN "t_tool_pen"
// CLOTHING TRAITS
#define TRAIT_CLOTHING_HOOD "t_clothing_hood"

// GUN TRAITS
#define TRAIT_GUN_SILENCED "t_gun_silenced"
Expand Down Expand Up @@ -275,6 +277,9 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_OVERRIDE_CLICKDRAG" = TRAIT_OVERRIDE_CLICKDRAG,
"TRAIT_ITEM_RENAME_SPECIAL" = TRAIT_ITEM_RENAME_SPECIAL,
),
/obj/item/clothing = list(
"TRAIT_CLOTHING_HOOD" = TRAIT_CLOTHING_HOOD
),
/obj/item/weapon/gun = list(
"TRAIT_GUN_SILENCED" = TRAIT_GUN_SILENCED,
),
Expand Down Expand Up @@ -332,3 +337,6 @@ GLOBAL_LIST(trait_name_map)
#define TRAIT_SOURCE_WEAPON "t_s_weapon"
///Status trait coming from generic items
#define TRAIT_SOURCE_ITEM "t_s_item"

//Status trait coming from clothing.
#define TRAIT_SOURCE_CLOTHING "t_s_clothing"
10 changes: 10 additions & 0 deletions code/modules/clothing/head/head.dm
Expand Up @@ -754,3 +754,13 @@ D
desc = "The combination cover of the legendary Marine dress blues, virtually unchanged since the 19th century. Features a gold stripe and silvered logo, emblematic of an officer."
icon_state = "o_cap"
item_state = "o_cap"

/obj/item/clothing/head/owlf_hood
name = "\improper OWLF thermal hood"
desc = "This hood is attached to a high-tech suit with built-in thermal cloaking technology."
icon = 'icons/obj/items/clothing/cm_hats.dmi'
icon_state = "owlf_hood"
item_icons = list(
WEAR_HEAD = 'icons/mob/humans/onmob/head_1.dmi'
)
item_state = "owlf_hood"
11 changes: 11 additions & 0 deletions code/modules/clothing/masks/breath.dm
Expand Up @@ -225,3 +225,14 @@
/obj/item/clothing/mask/tornscarf/black
icon_state = "torn_scarf_black"
item_state = "torn_scarf_black"

/obj/item/clothing/mask/owlf_mask
name = "\improper OWLF gas mask"
desc = "A close-fitting mask that can be connected to an air supply."
icon_state = "owlf_mask"
item_state = "owlf_mask"
flags_inventory = COVERMOUTH|ALLOWINTERNALS
flags_armor_protection = 0
w_class = SIZE_SMALL
gas_transfer_coefficient = 0.10
permeability_coefficient = 0.50
13 changes: 13 additions & 0 deletions code/modules/clothing/under/marine_uniform.dm
Expand Up @@ -619,6 +619,19 @@
flags_cold_protection = ICE_PLANET_MIN_COLD_PROT
has_sensor = UNIFORM_NO_SENSORS

//=========================//OWLF\\================================\\
/obj/item/clothing/under/marine/veteran/owlf
name = "\improper OWLF thermal field uniform"
desc = "A high-tech uniform with built-in thermal cloaking technology. It looks like it's worth more than your life."
flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS //This is all a copy and paste of the Dutch's stuff for now.
flags_cold_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS
flags_heat_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS
icon_state = "owlf_uniform"
worn_state = "owlf_uniform"
has_sensor = UNIFORM_NO_SENSORS
hood_state = /obj/item/clothing/head/owlf_hood

//===========================//HELGHAST - MERCENARY\\================================\\
//=====================================================================\\
Expand Down
8 changes: 8 additions & 0 deletions code/modules/clothing/under/ties.dm
Expand Up @@ -628,6 +628,7 @@

hold = /obj/item/storage/internal/accessory/drop_pouch


/obj/item/storage/internal/accessory/drop_pouch
w_class = SIZE_LARGE //Allow storage containers that's medium or below
storage_slots = null
Expand Down Expand Up @@ -789,3 +790,10 @@
new /obj/item/clothing/accessory/holobadge/cord(src)
..()
return

/obj/item/clothing/accessory/storage/owlf_vest
name = "\improper OWLF agent vest"
desc = "This is a fancy-looking ballistics vest, meant to be attached to a uniform." //No stats for these yet, just placeholder implementation.
icon = 'icons/obj/items/clothing/ties.dmi'
icon_state = "owlf_vest"
item_state = "owlf_vest"
45 changes: 45 additions & 0 deletions code/modules/clothing/under/under.dm
Expand Up @@ -30,6 +30,7 @@
var/list/suit_restricted //for uniforms that only accept to be combined with certain suits
var/removed_parts = 0
var/worn_state = null
var/hood_state //for uniforms with hoods.
drag_unequip = TRUE
valid_accessory_slots = list(ACCESSORY_SLOT_UTILITY, ACCESSORY_SLOT_ARMBAND, ACCESSORY_SLOT_RANK, ACCESSORY_SLOT_DECOR, ACCESSORY_SLOT_MEDAL, ACCESSORY_SLOT_ARMOR_C)
restricted_accessory_slots = list(ACCESSORY_SLOT_UTILITY, ACCESSORY_SLOT_ARMBAND, ACCESSORY_SLOT_RANK, ACCESSORY_SLOT_ARMOR_C)
Expand Down Expand Up @@ -308,6 +309,50 @@

roll_suit_jacket(TRUE, usr)

/obj/item/clothing/under/verb/togglehood()
set name = "Toggle Hood"
set category = "Object"
set src in usr
if(!isliving(usr))
return
if(usr.stat)
return
toggle_uniform_hood(TRUE, usr)

/obj/item/clothing/under/proc/toggle_uniform_hood(show_message = TRUE, mob/living/carbon/human/user)
if(!hood_state)
if(show_message)
to_chat(user, SPAN_WARNING("Your uniform doesn't have a hood!"))
return
update_rollsuit_status() //we need the _d version of the sprite anyways. In the future we might need to make a different version of the sprite to accomodate for rolling sleeves and hoods.
if(user.head && !istype(user.head, hood_state))
to_chat(user, SPAN_WARNING("You can't wear a hood while also wearing the [user.head]!"))
return

if(!HAS_TRAIT(src, TRAIT_CLOTHING_HOOD))
to_chat(user, SPAN_NOTICE("You pull your hood up."))
user.equip_to_slot_if_possible(new hood_state(user), WEAR_HEAD) //This is a 'phantom' hood. It disappears if the jumpsuit is unequipped/if it's toggled.
LAZYSET(item_state_slots, WEAR_BODY, "[worn_state]_d")
RegisterSignal(src, COMSIG_ITEM_UNEQUIPPED, PROC_REF(toggle_uniform_hood)) //These will unequip the phantom hood and toggle the state of the suit
RegisterSignal(user.head, COMSIG_ITEM_UNEQUIPPED, PROC_REF(toggle_uniform_hood)) // If either is unequipped.
update_clothing_icon()
if(!TIMER_COOLDOWN_CHECK(user, COOLDOWN_ITEM_HOOD_SOUND))
playsound(user.loc, pick('sound/handling/armorequip_1.ogg', 'sound/handling/armorequip_2.ogg'), 25, 1)
TIMER_COOLDOWN_START(user, COOLDOWN_ITEM_HOOD_SOUND, 1 SECONDS)
ADD_TRAIT(src, TRAIT_CLOTHING_HOOD, TRAIT_SOURCE_CLOTHING)
return

to_chat(user, SPAN_NOTICE("You pull your hood down."))
UnregisterSignal(src, COMSIG_ITEM_UNEQUIPPED) //See above, these deregister the signals so that it doesn't fire twice.
UnregisterSignal(user.head, COMSIG_ITEM_UNEQUIPPED)
qdel(user.head) //This will only delete the hood, see the typecheck above.
LAZYSET(item_state_slots, WEAR_BODY, worn_state)
update_clothing_icon()
if(!TIMER_COOLDOWN_CHECK(user, COOLDOWN_ITEM_HOOD_SOUND))
playsound(user.loc, pick('sound/handling/armorequip_1.ogg', 'sound/handling/armorequip_2.ogg'), 25, 1)
TIMER_COOLDOWN_START(user, COOLDOWN_ITEM_HOOD_SOUND, 1 SECONDS)
REMOVE_TRAIT(src, TRAIT_CLOTHING_HOOD, TRAIT_SOURCE_CLOTHING)

/obj/item/clothing/under/attackby(obj/item/B, mob/user)
if(istype(B, /obj/item/attachable/bayonet) && (user.a_intent == INTENT_HARM))
cut_suit_jacket(TRUE, user, B)
Expand Down
Binary file modified icons/mob/humans/onmob/head_1.dmi
Binary file not shown.
Binary file modified icons/mob/humans/onmob/mask.dmi
Binary file not shown.
Binary file modified icons/mob/humans/onmob/ties.dmi
Binary file not shown.
Binary file modified icons/mob/humans/onmob/uniform_0.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/cm_hats.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/masks.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/ties.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/ties_overlay.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/uniforms.dmi
Binary file not shown.

0 comments on commit 70c3e3b

Please sign in to comment.