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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a Pants slot #19999

Merged
merged 11 commits into from
Nov 15, 2024
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
7 changes: 4 additions & 3 deletions aurorastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1845,6 +1845,7 @@
#include "code\modules\client\preference_setup\loadout\items\gloves.dm"
#include "code\modules\client\preference_setup\loadout\items\head.dm"
#include "code\modules\client\preference_setup\loadout\items\mask.dm"
#include "code\modules\client\preference_setup\loadout\items\pants.dm"
#include "code\modules\client\preference_setup\loadout\items\religion.dm"
#include "code\modules\client\preference_setup\loadout\items\shoes.dm"
#include "code\modules\client\preference_setup\loadout\items\smoking.dm"
Expand Down Expand Up @@ -1932,6 +1933,9 @@
#include "code\modules\clothing\masks\xeno\skrell.dm"
#include "code\modules\clothing\masks\xeno\tajara.dm"
#include "code\modules\clothing\masks\xeno\unathi.dm"
#include "code\modules\clothing\pants\pants.dm"
#include "code\modules\clothing\pants\shorts.dm"
#include "code\modules\clothing\pants\skirts.dm"
#include "code\modules\clothing\rings\material.dm"
#include "code\modules\clothing\rings\rings.dm"
#include "code\modules\clothing\rings\xeno\tajara.dm"
Expand Down Expand Up @@ -2005,9 +2009,6 @@
#include "code\modules\clothing\under\color.dm"
#include "code\modules\clothing\under\dresses.dm"
#include "code\modules\clothing\under\miscellaneous.dm"
#include "code\modules\clothing\under\pants.dm"
#include "code\modules\clothing\under\shorts.dm"
#include "code\modules\clothing\under\skirts.dm"
#include "code\modules\clothing\under\syndicate.dm"
#include "code\modules\clothing\under\accessories\accessory.dm"
#include "code\modules\clothing\under\accessories\armband.dm"
Expand Down
77 changes: 40 additions & 37 deletions code/__DEFINES/icon_layering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,43 @@
#define TAIL_SOUTH_LAYER 6
#define TAIL_SOUTH_ACC_LAYER 7
#define SHOES_LAYER_ALT 8
#define WRISTS_LAYER_UNDER 9
#define UNIFORM_LAYER 10
#define MOB_DAMAGE_LAYER 11
#define ID_LAYER 12
#define BANDAGE_LAYER 13
#define SHOES_LAYER 14
#define GLOVES_LAYER 15
#define BELT_LAYER 16
#define WRISTS_LAYER_UNIFORM 17
#define SUIT_LAYER 18
#define ID_LAYER_ALT 19
#define TAIL_NORTH_LAYER 20
#define TAIL_NORTH_ACC_LAYER 21
#define HAIR_LAYER_ALT 22
#define HAIR_LAYER_ALT_EMISSIVE 23
#define GLASSES_LAYER 24
#define BELT_LAYER_ALT 25
#define SUIT_STORE_LAYER 26
#define BACK_LAYER 27
#define HAIR_LAYER 28
#define HAIR_LAYER_EMISSIVE 29
#define GLASSES_LAYER_ALT 30
#define L_EAR_LAYER 31
#define R_EAR_LAYER 32
#define FACEMASK_LAYER 33
#define HEAD_LAYER 34
#define L_EAR_LAYER_ALT 35
#define R_EAR_LAYER_ALT 36
#define GLASSES_LAYER_OVER 37
#define COLLAR_LAYER 38
#define WRISTS_LAYER_OVER 39
#define HANDCUFF_LAYER 40
#define LEGCUFF_LAYER 41
#define L_HAND_LAYER 42
#define R_HAND_LAYER 43
#define FIRE_LAYER_UPPER 44
#define TOTAL_LAYERS 44
#define UNDER_UNIFORM_LAYER_WR 9
#define UNDER_UNIFORM_LAYER_PA 10
#define UNIFORM_LAYER 11
#define MOB_DAMAGE_LAYER 12
#define ID_LAYER 13
#define BANDAGE_LAYER 14
#define SHOES_LAYER 15
#define GLOVES_LAYER 16
#define BELT_LAYER 17
#define ABOVE_UNIFORM_LAYER_WR 18
#define ABOVE_UNIFORM_LAYER_PA 19
#define SUIT_LAYER 20
#define ID_LAYER_ALT 21
#define TAIL_NORTH_LAYER 22
#define TAIL_NORTH_ACC_LAYER 23
#define HAIR_LAYER_ALT 24
#define HAIR_LAYER_ALT_EMISSIVE 25
#define GLASSES_LAYER 26
#define BELT_LAYER_ALT 27
#define SUIT_STORE_LAYER 28
#define BACK_LAYER 29
#define HAIR_LAYER 30
#define HAIR_LAYER_EMISSIVE 31
#define GLASSES_LAYER_ALT 32
#define L_EAR_LAYER 33
#define R_EAR_LAYER 34
#define FACEMASK_LAYER 35
#define HEAD_LAYER 36
#define L_EAR_LAYER_ALT 37
#define R_EAR_LAYER_ALT 38
#define GLASSES_LAYER_OVER 39
#define COLLAR_LAYER 40
#define ABOVE_SUIT_LAYER_WR 41
#define ABOVE_SUIT_LAYER_PA 42
#define HANDCUFF_LAYER 43
#define LEGCUFF_LAYER 44
#define L_HAND_LAYER 45
#define R_HAND_LAYER 46
#define FIRE_LAYER_UPPER 47
#define TOTAL_LAYERS 47
12 changes: 8 additions & 4 deletions code/__DEFINES/items_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#define SLOT_HOLSTER BITFLAG(14)
#define SLOT_WRISTS BITFLAG(15)
#define SLOT_S_STORE BITFLAG(16)
#define SLOT_PANTS BITFLAG(17)

// Bitmasks for the flags_inv variable. These determine when a piece of clothing hides another, i.e. a helmet hiding glasses.
#define HIDEGLOVES 0x1
Expand All @@ -32,9 +33,10 @@
#define HIDEEYES 0x80 // Glasses.
#define HIDEFACE 0x100// Dictates whether we appear as "Unknown".
#define HIDEWRISTS 0x200
#define BLOCKHEADHAIR 0x400// Hides the user's hair overlay. Leaves facial hair.
#define BLOCKHAIR 0x800/// Hides the user's hair, facial and otherwise.
#define ALWAYSDRAW 0x1000//If set, this item is always rendered even if its slot is hidden by other clothing
#define HIDEPANTS 0x400
#define BLOCKHEADHAIR 0x800// Hides the user's hair overlay. Leaves facial hair.
#define BLOCKHAIR 0x1000/// Hides the user's hair, facial and otherwise.
#define ALWAYSDRAW 0x2000//If set, this item is always rendered even if its slot is hidden by other clothing
//Note that the item may still not be visible if its sprite is actually covered up.

// Slots.
Expand All @@ -59,7 +61,7 @@
#define slot_in_backpack 19
#define slot_legcuffed 20
#define slot_r_ear 21
#define slot_legs 22
#define slot_pants 22
#define slot_tie 23
#define slot_in_belt 24
#define slot_wrists 25
Expand All @@ -81,6 +83,7 @@
#define slot_wear_suit_str "slot_suit"
#define slot_l_ear_str "slot_l_ear"
#define slot_r_ear_str "slot_r_ear"
#define slot_pants_str "slot_pants"
#define slot_shoes_str "slot_shoes"
#define slot_wrists_str "slot_wrists"
#define slot_gloves_str "slot_gloves"
Expand All @@ -105,6 +108,7 @@
#define WORN_ID "_id"
#define WORN_MASK "_ma"
#define WORN_WRISTS "_wr"
#define WORN_PANTS "_pa"

// Bitflags for clothing parts.
#define HEAD 0x1
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@
#define INV_R_EAR_DEF_ICON 'icons/mob/r_ear.dmi'
#define INV_SHOES_DEF_ICON 'icons/mob/feet.dmi'
#define INV_WRISTS_DEF_ICON 'icons/mob/wrist.dmi'
#define INV_PANTS_DEF_ICON 'icons/mob/pants.dmi'

// IPC tags
#define IPC_OWNERSHIP_SELF "Self Owned"
Expand Down
21 changes: 12 additions & 9 deletions code/_onclick/hud/_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,21 @@
//Pop-up inventory
#define ui_shoes "WEST+1:8,SOUTH:5"

#define ui_iclothing "WEST:6,SOUTH+1:7"
#define ui_oclothing "WEST+1:8,SOUTH+1:7"
#define ui_gloves "WEST+2:10,SOUTH+1:7"
#define ui_gloves "WEST:6,SOUTH+1:7"
#define ui_pants "WEST+1:8,SOUTH+1:7"
// "WEST+2:10,SOUTH+1:7"

#define ui_glasses "WEST:6,SOUTH+2:9"
#define ui_mask "WEST+1:8,SOUTH+2:9"
#define ui_l_ear "WEST+2:10,SOUTH+3:11"
#define ui_r_ear "WEST:6,SOUTH+3:11"
#define ui_wrists "WEST:6,SOUTH+2:9"
#define ui_iclothing "WEST+1:8,SOUTH+2:9"
#define ui_oclothing "WEST+2:10,SOUTH+2:9"

#define ui_head "WEST+1:8,SOUTH+3:11"
// "WEST+2:10,SOUTH+3:11"
#define ui_mask "WEST+1:8,SOUTH+3:11"
#define ui_glasses "WEST:6,SOUTH+3:11"

#define ui_wrists "WEST+2:10,SOUTH+2:9"
#define ui_r_ear "WEST:6,SOUTH+4:13"
#define ui_head "WEST+1:8,SOUTH+4:13"
#define ui_l_ear "WEST+2:10,SOUTH+4:13"

//Intent small buttons
#define ui_help_small "EAST-3:8,SOUTH:1"
Expand Down
19 changes: 13 additions & 6 deletions code/_onclick/hud/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,16 @@ var/list/global_huds
H.w_uniform.screen_loc = hud_data["loc"]
if(slot_wear_suit)
if(H.wear_suit)
H.wear_suit.screen_loc =hud_data["loc"]
H.wear_suit.screen_loc = hud_data["loc"]
if(slot_wear_mask)
if(H.wear_mask)
H.wear_mask.screen_loc =hud_data["loc"]
H.wear_mask.screen_loc = hud_data["loc"]
if(slot_wrists)
if(H.wrists)
H.wrists.screen_loc = hud_data["loc"]
H.wrists.screen_loc = hud_data["loc"]
if(slot_pants)
if(H.pants)
H.pants.screen_loc = hud_data["loc"]
else
switch(hud_data["slot"])
if(slot_head)
Expand All @@ -235,16 +238,20 @@ var/list/global_huds
H.glasses.screen_loc = null
if(slot_w_uniform)
if(H.w_uniform)
H.w_uniform.screen_loc =null
H.w_uniform.screen_loc = null
if(slot_wear_suit)
if(H.wear_suit)
H.wear_suit.screen_loc = null
if(slot_wear_mask)
if(H.wear_mask)
H.wear_mask.screen_loc =null
H.wear_mask.screen_loc = null
if(slot_wrists)
if(H.wrists)
H.wrists.screen_loc = null
H.wrists.screen_loc = null
if(slot_pants)
if(H.pants)
H.pants.screen_loc = null


/datum/hud/proc/persistant_inventory_update()
if(!mymob)
Expand Down
4 changes: 4 additions & 0 deletions code/datums/outfits/outfit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
var/belt = null
var/gloves = null
var/wrist = null
var/pants = null
var/shoes = null

var/head = null
Expand Down Expand Up @@ -108,6 +109,7 @@
belt,
gloves,
wrist,
pants,
shoes,

head,
Expand Down Expand Up @@ -406,6 +408,8 @@
if(wrist)
equip_item(H, wrist, slot_wrists)
var/got_shoes = FALSE
if(pants)
equip_item(H, pants, slot_pants)
if(length(species_shoes))
var/path = species_shoes[H.species.name]
if(path)
Expand Down
6 changes: 1 addition & 5 deletions code/datums/outfits/outfit_antag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,14 @@
/obj/item/clothing/under/lance,
/obj/item/clothing/under/legion/pilot,
/obj/item/clothing/under/offworlder,
/obj/item/clothing/under/pants/jeans,
/obj/item/clothing/under/pants/camo,
/obj/item/clothing/under/pants/khaki,
/obj/item/clothing/under/pants/mustang,
/obj/item/clothing/under/rank/bartender,
/obj/item/clothing/under/rank/hangar_technician/heph,
/obj/item/clothing/under/rank/chef,
/obj/item/clothing/under/rank/chaplain,
/obj/item/clothing/under/rank/engineer,
/obj/item/clothing/under/rank/sol,
/obj/item/clothing/under/rank/miner,
/obj/item/clothing/under/skirt/offworlder,
/obj/item/clothing/pants/skirt/offworlder,
/obj/item/clothing/under/suit_jacket/tan,
/obj/item/clothing/under/tactical,
/obj/item/clothing/under/tajaran,
Expand Down
2 changes: 1 addition & 1 deletion code/datums/trading/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
/obj/item/clothing/suit/storage/hooded/tajaran = TRADER_ALL,
/obj/item/clothing/under/tajaran/fancy = TRADER_THIS_TYPE,
/obj/item/clothing/under/tajaran/summer = TRADER_THIS_TYPE,
/obj/item/clothing/under/pants/tajaran = TRADER_THIS_TYPE,
/obj/item/clothing/pants/tajaran = TRADER_THIS_TYPE,
/obj/item/clothing/under/tajaran/raakti_shariim = TRADER_THIS_TYPE,
/obj/item/clothing/suit/storage/tajaran/fancy = TRADER_THIS_TYPE,
/obj/item/clothing/under/tajaran/nka_noble = TRADER_THIS_TYPE,
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/vending_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,7 @@
/obj/item/material/knife/butterfly/switchblade = 2,
/obj/item/reagent_containers/hypospray/autoinjector/stimpack = 2,
/obj/item/clothing/under/tajaran/summer = 2,
/obj/item/clothing/under/pants/tajaran = 2,
/obj/item/clothing/pants/tajaran = 2,
/obj/item/clothing/under/dress/tajaran =2,
/obj/item/clothing/under/dress/tajaran/blue = 2,
/obj/item/clothing/under/dress/tajaran/green = 2,
Expand Down
2 changes: 1 addition & 1 deletion code/game/modifiers/modifiers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ it should be avoided in favour of manual removal where possible
//This list can be overridden if you want a custom slot whitelist
var/list/valid_equipment_slots = list(slot_back, slot_wear_mask, slot_handcuffed, slot_belt, \
slot_wear_id, slot_l_ear, slot_glasses, slot_gloves, slot_head, slot_shoes, slot_wear_suit, \
slot_w_uniform,slot_legcuffed, slot_r_ear, slot_legs, slot_tie, slot_wrists)
slot_w_uniform,slot_legcuffed, slot_r_ear, slot_pants, slot_tie, slot_wrists)



Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,8 @@ var/list/global/slot_flags_enumeration = list(
"[slot_w_uniform]" = SLOT_ICLOTHING,
"[slot_wear_id]" = SLOT_ID,
"[slot_tie]" = SLOT_TIE,
"[slot_wrists]" = SLOT_WRISTS
"[slot_wrists]" = SLOT_WRISTS,
"[slot_pants]" = SLOT_PANTS
)

//the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't.
Expand Down
12 changes: 6 additions & 6 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,19 @@
item_state = "wristset"
slot_flags = SLOT_WRISTS
canhear_range = 1
var/mob_wear_layer = WRISTS_LAYER_OVER
var/mob_wear_layer = ABOVE_SUIT_LAYER_WR
EarSound = FALSE

/obj/item/device/radio/headset/wrist/verb/change_layer()
set category = "Object"
set name = "Change Wrist Layer"
set src in usr

if(mob_wear_layer == WRISTS_LAYER_OVER)
mob_wear_layer = WRISTS_LAYER_UNIFORM
if(mob_wear_layer == ABOVE_SUIT_LAYER_WR)
mob_wear_layer = ABOVE_UNIFORM_LAYER_WR
else
mob_wear_layer = WRISTS_LAYER_OVER
to_chat(usr, SPAN_NOTICE("\The [src] will now layer [mob_wear_layer == WRISTS_LAYER_OVER ? "over" : "under"] your outerwear."))
mob_wear_layer = ABOVE_SUIT_LAYER_WR
to_chat(usr, SPAN_NOTICE("\The [src] will now layer [mob_wear_layer == ABOVE_SUIT_LAYER_WR ? "over" : "under"] your outerwear."))
if (ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
if(H.wrists == src)
Expand Down Expand Up @@ -268,7 +268,7 @@
/obj/item/device/radio/headset/wrist/clip/get_wrist_examine_text(mob/living/carbon/human/user)
if(!istype(user))
return ..()
return "clipped to [user.get_pronoun("his")] [(mob_wear_layer == WRISTS_LAYER_OVER) && user.wear_suit ? user.wear_suit.name : user.w_uniform ? user.w_uniform.name : "chest"]"
return "clipped to [user.get_pronoun("his")] [(mob_wear_layer == ABOVE_SUIT_LAYER_WR) && user.wear_suit ? user.wear_suit.name : user.w_uniform ? user.w_uniform.name : "chest"]"

/obj/item/device/radio/headset/wrist/clip/get_ear_examine_text(mob/living/carbon/human/user)
if(!istype(user))
Expand Down
10 changes: 5 additions & 5 deletions code/game/objects/structures/crates_lockers/closets/fitness.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
/obj/structure/closet/athletic_mixed/fill()
new /obj/item/towel/random(src)
new /obj/item/towel/random(src)
new /obj/item/clothing/under/shorts/athletic/grey(src)
new /obj/item/clothing/under/shorts/athletic/black(src)
new /obj/item/clothing/under/shorts/athletic/red(src)
new /obj/item/clothing/under/shorts/athletic/blue(src)
new /obj/item/clothing/under/shorts/athletic/green(src)
new /obj/item/clothing/pants/shorts/athletic/grey(src)
new /obj/item/clothing/pants/shorts/athletic/black(src)
new /obj/item/clothing/pants/shorts/athletic/red(src)
new /obj/item/clothing/pants/shorts/athletic/blue(src)
new /obj/item/clothing/pants/shorts/athletic/green(src)
new /obj/item/clothing/under/swimsuit/red(src)
new /obj/item/clothing/under/swimsuit/black(src)
new /obj/item/clothing/under/swimsuit/blue(src)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@

/obj/structure/closet/crate/secure/gear_loadout/frontier_cowboys/fill()
for(var/i in 1 to 6)
var/obj/item/clothing/under/shorts/khaki/pants = new(src)
var/obj/item/clothing/pants/shorts/khaki/pants = new(src)
var/obj/item/clothing/accessory/dressshirt/rolled/shirt = new(src)
var/obj/item/clothing/accessory/chaps/chaps = new(src)
var/obj/item/clothing/accessory/suspenders/suspenders = new(src)
Expand All @@ -256,7 +256,7 @@
new /obj/item/gun/projectile/shotgun/pump/lever_action(src)

/obj/structure/closet/crate/secure/gear_loadout/frontier_cowboys/single/fill()
var/obj/item/clothing/under/shorts/khaki/pants = new(src)
var/obj/item/clothing/pants/shorts/khaki/pants = new(src)
var/obj/item/clothing/accessory/dressshirt/rolled/shirt = new(src)
var/obj/item/clothing/accessory/chaps/chaps = new(src)
var/obj/item/clothing/accessory/suspenders/suspenders = new(src)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/trash_pile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
/obj/item/clothing/mask/gas/alt = 2,
/obj/item/clothing/mask/gas/half = 2,
/obj/item/clothing/shoes/galoshes = 2,
/obj/item/clothing/under/pants/camo = 2,
/obj/item/clothing/pants/camo = 2,
/obj/item/clothing/under/syndicate/tacticool = 2,
/obj/item/device/camera = 2,
/obj/item/device/flashlight/flare = 2,
Expand Down
Loading
Loading