Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds in hoods + OWLF placeholder items #2877

Merged
merged 9 commits into from Mar 31, 2023
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.