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,5 +1,6 @@
#define COOLDOWN_MOB_AUDIO "mob_audio_cooldown"
#define COOLDOWN_HIJACK_BARRAGE "gamemode_explosive_barrage"
#define COOLDOWN_ITEM_HOOD_SOUND "item_hood_sound"

//// COOLDOWN SYSTEMS
/*
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/equipment.dm
Expand Up @@ -188,6 +188,9 @@
#define UNIFORM_JACKET_REMOVED (1<<5)
/// are accessories never hidden by sleeve/jacket state? (meant for snow uniform which rolls collar instead of sleeves)
#define UNIFORM_DO_NOT_HIDE_ACCESSORIES (1<<6)
/// does the uniform have a hood?
#define UNIFORM_HOOD_EXISTS (1<<7)
#define UNIFORM_HOOD_ACTIVE (1<<8)

//===========================================================================================

Expand Down
10 changes: 10 additions & 0 deletions code/modules/clothing/head/head.dm
Expand Up @@ -724,3 +724,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 @@ -224,3 +224,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
14 changes: 14 additions & 0 deletions code/modules/clothing/under/marine_uniform.dm
Expand Up @@ -611,6 +611,20 @@
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
flags_jumpsuit = UNIFORM_HOOD_EXISTS
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"
41 changes: 41 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,46 @@

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)
update_rollsuit_status() //we need the _d version of the sprite anyways.
if(flags_jumpsuit & UNIFORM_HOOD_EXISTS)
NewyearnewmeUwu marked this conversation as resolved.
Show resolved Hide resolved
if(!user.head || istype(user.head, hood_state))
NewyearnewmeUwu marked this conversation as resolved.
Show resolved Hide resolved
flags_jumpsuit ^= UNIFORM_HOOD_ACTIVE
NewyearnewmeUwu marked this conversation as resolved.
Show resolved Hide resolved
if(flags_jumpsuit & UNIFORM_HOOD_ACTIVE)
NewyearnewmeUwu marked this conversation as resolved.
Show resolved Hide resolved
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)
else
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)
else
to_chat(user, SPAN_WARNING("You can't wear a hood while also wearing the [user.head.name]!"))
else if(show_message)
to_chat(user, SPAN_WARNING("Your uniform doesn't have a hood!"))

/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/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.