Skip to content

Commit

Permalink
Return of the neck slot! (#27188)
Browse files Browse the repository at this point in the history
* this turned out to be wayyyy more than just a test

* remove bedsheet icons from back.dmi

* hud+better icons

* error fixed

* fixes a few bedsheet icons

* Update code/game/objects/items/weapons/storage/garment.dm

Co-authored-by: Henri215 <[email protected]>
Signed-off-by: Bm0n <[email protected]>

* review

* spacing

* TGUI Bundle Rebuild

* TGUI Bundle Rebuild

* TGUI Bundle Rebuild

* TGUI Bundle Rebuild

* lint?

* guh

* lint

* TGUI Bundle Rebuild

* test

* fix

* dead golem fix

* TGUI Bundle Rebuild

* TGUI Bundle Rebuild

* TGUI Bundle Rebuild

---------

Signed-off-by: Bm0n <[email protected]>
Co-authored-by: Bmon <[email protected]>
Co-authored-by: Henri215 <[email protected]>
  • Loading branch information
3 people authored Nov 27, 2024
1 parent 0a6425b commit 6eb1269
Show file tree
Hide file tree
Showing 46 changed files with 226 additions and 54 deletions.
5 changes: 3 additions & 2 deletions code/__DEFINES/clothing_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
#define ITEM_SLOT_PDA (1<<20) // pda
#define ITEM_SLOT_ACCESSORY (1<<21) // accessories
#define ITEM_SLOT_COLLAR (1<<22) // pet collar
#define ITEM_SLOT_AMOUNT_FLAG (1<<ITEM_SLOT_AMOUNT)
#define ITEM_SLOT_AMOUNT 22 // IF YOU ADD ANY NEW CLOTHING SLOTS, MAKE SURE TO UPDATE THIS TO THE AMOUNT OF SLOTS.
#define ITEM_SLOT_NECK (1<<23) // neck
#define ITEM_SLOT_AMOUNT_FLAG (1<<(ITEM_SLOT_AMOUNT-1))
#define ITEM_SLOT_AMOUNT 24 // IF YOU ADD ANY NEW CLOTHING SLOTS, MAKE SURE TO UPDATE THIS TO THE AMOUNT OF SLOTS.

/// Translates an ITEM_SLOT back to an index that can be looked up in inv_slots. e.g. (1<<19) becomes 19.
#define ITEM_SLOT_2_INDEX(slot) (log(2, slot) + 1)
Expand Down
4 changes: 3 additions & 1 deletion code/__DEFINES/hud_locations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,13 @@
#define ui_gloves "WEST+2:10,SOUTH+1:7"


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

#define ui_neck "WEST:6,SOUTH+2:9"

#define ui_head "WEST+1:8,SOUTH+3:11"

// AI
Expand Down
55 changes: 28 additions & 27 deletions code/__DEFINES/misc_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,32 +185,33 @@
#define FOAM_REACT_BEFORE_SPREAD (1<<3)

//Human Overlays Indexes/////////
#define EYES_OVERLAY_LAYER 48
#define MISC_LAYER 47 // Handles eye_shine() -> cybernetic eyes, specific eye traits.
#define WING_LAYER 46
#define WING_UNDERLIMBS_LAYER 45
#define MUTANTRACE_LAYER 44
#define TAIL_UNDERLIMBS_LAYER 43 //Tail split-rendering.
#define LIMBS_LAYER 42
#define MARKINGS_LAYER 41
#define INTORGAN_LAYER 40
#define UNDERWEAR_LAYER 39
#define MUTATIONS_LAYER 38
#define H_DAMAGE_LAYER 37
#define UNIFORM_LAYER 36
#define ID_LAYER 35
#define HANDS_LAYER 34 //Exists to overlay hands over jumpsuits
#define SHOES_LAYER 33
#define L_FOOT_BLOOD_LAYER 32 // Blood overlay separation Left-Foot
#define R_FOOT_BLOOD_LAYER 31 // Blood overlay separation Right-Foot
#define GLOVES_LAYER 30
#define L_HAND_BLOOD_LAYER 29 // Blood overlay separation Left-Hand
#define R_HAND_BLOOD_LAYER 28 // Blood overlay separation Right-Hand
#define LEFT_EAR_LAYER 27
#define RIGHT_EAR_LAYER 26
#define BELT_LAYER 25 //Possible make this an overlay of something required to wear a belt?
#define SUIT_LAYER 24
#define SPECIAL_BELT_LAYER 23
#define EYES_OVERLAY_LAYER 49
#define MISC_LAYER 48 // Handles eye_shine() -> cybernetic eyes, specific eye traits.
#define WING_LAYER 47
#define WING_UNDERLIMBS_LAYER 46
#define MUTANTRACE_LAYER 45
#define TAIL_UNDERLIMBS_LAYER 44 //Tail split-rendering.
#define LIMBS_LAYER 43
#define MARKINGS_LAYER 42
#define INTORGAN_LAYER 41
#define UNDERWEAR_LAYER 40
#define MUTATIONS_LAYER 39
#define H_DAMAGE_LAYER 38
#define UNIFORM_LAYER 37
#define ID_LAYER 36
#define HANDS_LAYER 35 //Exists to overlay hands over jumpsuits
#define SHOES_LAYER 34
#define L_FOOT_BLOOD_LAYER 33 // Blood overlay separation Left-Foot
#define R_FOOT_BLOOD_LAYER 32 // Blood overlay separation Right-Foot
#define GLOVES_LAYER 31
#define L_HAND_BLOOD_LAYER 30 // Blood overlay separation Left-Hand
#define R_HAND_BLOOD_LAYER 29 // Blood overlay separation Right-Hand
#define LEFT_EAR_LAYER 28
#define RIGHT_EAR_LAYER 27
#define BELT_LAYER 26 //Possible make this an overlay of something required to wear a belt?
#define SUIT_LAYER 25
#define SPECIAL_BELT_LAYER 24
#define NECK_LAYER 23
#define SUIT_STORE_LAYER 22
#define BACK_LAYER 21
#define HEAD_ACCESSORY_LAYER 20
Expand All @@ -233,7 +234,7 @@
#define HALO_LAYER 3 //blood cult ascended halo, because there's currently no better solution for adding/removing
#define FIRE_LAYER 2 //If you're on fire
#define FROZEN_LAYER 1
#define TOTAL_LAYERS 48
#define TOTAL_LAYERS 49

///Access Region Codes///
#define REGION_ALL 0
Expand Down
15 changes: 15 additions & 0 deletions code/_onclick/hud/human_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,16 @@
inv_box.alpha = ui_alpha
toggleable_inventory += inv_box

inv_box = new /atom/movable/screen/inventory()
inv_box.name = "neck"
inv_box.icon = ui_style
inv_box.icon_state = "neck"
inv_box.screen_loc = ui_neck
inv_box.slot_id = ITEM_SLOT_NECK
inv_box.color = ui_color
inv_box.alpha = ui_alpha
toggleable_inventory += inv_box

inv_box = new /atom/movable/screen/inventory()
inv_box.name = "back"
inv_box.icon = ui_style
Expand Down Expand Up @@ -434,6 +444,9 @@
if(H.wear_mask)
H.wear_mask.screen_loc = ui_mask
screenmob.client.screen += H.wear_mask
if(H.neck)
H.neck.screen_loc = ui_neck
screenmob.client.screen += H.neck
if(H.head)
H.head.screen_loc = ui_head
screenmob.client.screen += H.head
Expand All @@ -454,6 +467,8 @@
screenmob.client.screen -= H.wear_suit
if(H.wear_mask)
screenmob.client.screen -= H.wear_mask
if(H.neck)
screenmob.client.screen -= H.neck
if(H.head)
screenmob.client.screen -= H.head

Expand Down
7 changes: 4 additions & 3 deletions code/datums/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,10 @@
var/obj/item/voice_changer/V = target
V.set_voice(usr)

/datum/action/item_action/herald
name = "Mirror Walk"
desc = "Use near a mirror to enter it."

// for clothing accessories like holsters
/datum/action/item_action/accessory
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_LYING|AB_CHECK_CONSCIOUS
Expand All @@ -637,9 +641,6 @@
name = "View Storage"


/datum/action/item_action/accessory/herald
name = "Mirror Walk"
desc = "Use near a mirror to enter it."

//Preset for spells
/datum/action/spell_action
Expand Down
9 changes: 8 additions & 1 deletion code/datums/outfits/outfit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
var/shoes = null
var/head = null
var/mask = null
var/neck = null
var/l_ear = null
var/r_ear = null
var/glasses = null
Expand Down Expand Up @@ -85,6 +86,8 @@
equip_item(H, head, ITEM_SLOT_HEAD)
if(mask)
equip_item(H, mask, ITEM_SLOT_MASK)
if(neck)
equip_item(H, neck, ITEM_SLOT_NECK)
if(l_ear)
equip_item(H, l_ear, ITEM_SLOT_LEFT_EAR)
if(r_ear)
Expand Down Expand Up @@ -172,6 +175,8 @@
H.wear_suit.add_fingerprint(H, 1)
if(H.wear_mask)
H.wear_mask.add_fingerprint(H, 1)
if(H.neck)
H.neck.add_fingerprint(H, 1)
if(H.head)
H.head.add_fingerprint(H, 1)
if(H.shoes)
Expand Down Expand Up @@ -199,7 +204,7 @@
return 1

/datum/outfit/proc/get_chameleon_disguise_info()
var/list/types = list(uniform, suit, back, belt, gloves, shoes, head, mask, l_ear, r_ear, glasses, id, l_pocket, r_pocket, suit_store, r_hand, l_hand, pda)
var/list/types = list(uniform, suit, back, belt, gloves, shoes, head, mask, neck, l_ear, r_ear, glasses, id, l_pocket, r_pocket, suit_store, r_hand, l_hand, pda)
types += chameleon_extras
listclearnulls(types)
return types
Expand All @@ -225,6 +230,7 @@
shoes = text2path(outfit_data["shoes"])
head = text2path(outfit_data["head"])
mask = text2path(outfit_data["mask"])
neck = text2path(outfit_data["neck"])
l_ear = text2path(outfit_data["l_ear"])
r_ear = text2path(outfit_data["r_ear"])
glasses = text2path(outfit_data["glasses"])
Expand Down Expand Up @@ -281,6 +287,7 @@
.["shoes"] = shoes
.["head"] = head
.["mask"] = mask
.["neck"] = neck
.["l_ear"] = l_ear
.["r_ear"] = r_ear
.["glasses"] = glasses
Expand Down
4 changes: 3 additions & 1 deletion code/datums/outfits/vv_outfit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
head = item_path
if(ITEM_SLOT_MASK)
mask = item_path
if(ITEM_SLOT_NECK)
neck = item_path
if(ITEM_SLOT_LEFT_EAR)
l_ear = item_path
if(ITEM_SLOT_RIGHT_EAR)
Expand Down Expand Up @@ -70,7 +72,7 @@

// Copy equipment
var/list/result = list()
var/list/slots_to_check = list(ITEM_SLOT_JUMPSUIT, ITEM_SLOT_BACK, ITEM_SLOT_OUTER_SUIT, ITEM_SLOT_BELT, ITEM_SLOT_GLOVES, ITEM_SLOT_SHOES, ITEM_SLOT_HEAD, ITEM_SLOT_MASK, ITEM_SLOT_LEFT_EAR, ITEM_SLOT_RIGHT_EAR, ITEM_SLOT_EYES, ITEM_SLOT_ID, ITEM_SLOT_PDA, ITEM_SLOT_SUIT_STORE, ITEM_SLOT_LEFT_POCKET, ITEM_SLOT_RIGHT_POCKET)
var/list/slots_to_check = list(ITEM_SLOT_JUMPSUIT, ITEM_SLOT_BACK, ITEM_SLOT_OUTER_SUIT, ITEM_SLOT_BELT, ITEM_SLOT_GLOVES, ITEM_SLOT_SHOES, ITEM_SLOT_HEAD, ITEM_SLOT_MASK, ITEM_SLOT_LEFT_EAR, ITEM_SLOT_RIGHT_EAR, ITEM_SLOT_EYES, ITEM_SLOT_ID, ITEM_SLOT_PDA, ITEM_SLOT_SUIT_STORE, ITEM_SLOT_LEFT_POCKET, ITEM_SLOT_RIGHT_POCKET, ITEM_SLOT_NECK)
for(var/s in slots_to_check)
var/obj/item/I = get_item_by_slot(s)
var/vedits = collect_vv(I)
Expand Down
3 changes: 3 additions & 0 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,9 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
if(belt)
if(belt.clean_blood(radiation_clean))
update_inv_belt()
if(neck)
if(neck.clean_blood(radiation_clean))
update_inv_neck()
..(clean_hands, clean_mask, clean_feet)
update_icons() //apply the now updated overlays to the mob

Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,8 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
owner.update_inv_ears()
if(flags & ITEM_SLOT_MASK)
owner.update_inv_wear_mask()
if(flags & ITEM_SLOT_NECK)
owner.update_inv_neck()
if(flags & ITEM_SLOT_HEAD)
owner.update_inv_head()
if(flags & ITEM_SLOT_SHOES)
Expand Down
8 changes: 8 additions & 0 deletions code/game/objects/items/weapons/storage/garment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
/obj/item/clothing/suit/space,
/obj/item/clothing/mask/cigarette,
/obj/item/clothing/mask/facehugger, //Why would you do this
/obj/item/clothing/neck/cloak,
/obj/item/clothing/accessory/medal,
/obj/item/clothing/suit/armor/riot,
/obj/item/clothing/suit/armor/reactive,
Expand All @@ -33,6 +34,7 @@
new /obj/item/clothing/head/beret/captain(src)
new /obj/item/clothing/head/beret/captain/white(src)
new /obj/item/clothing/head/crown/fancy(src)
new /obj/item/clothing/neck/cloak/captain(src)
new /obj/item/clothing/suit/armor/vest/capcarapace(src)
new /obj/item/clothing/suit/armor/vest/capcarapace/jacket(src)
new /obj/item/clothing/suit/armor/vest/capcarapace/jacket/tunic(src)
Expand All @@ -58,6 +60,7 @@
/obj/item/storage/bag/garment/head_of_personnel/populate_contents()
new /obj/item/clothing/head/hop(src)
new /obj/item/clothing/head/beret/hop(src)
new /obj/item/clothing/neck/cloak/head_of_personnel(src)
new /obj/item/clothing/suit/mantle/armor/hop(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/suit/hopcoat(src)
Expand All @@ -83,6 +86,7 @@
/obj/item/storage/bag/garment/head_of_security/populate_contents()
new /obj/item/clothing/head/HoS(src)
new /obj/item/clothing/head/beret/hos(src)
new /obj/item/clothing/neck/cloak/head_of_security(src)
new /obj/item/clothing/suit/armor/hos(src)
new /obj/item/clothing/suit/armor/hos/alt(src)
new /obj/item/clothing/suit/mantle/armor(src)
Expand All @@ -101,6 +105,7 @@

/obj/item/storage/bag/garment/research_director/populate_contents()
new /obj/item/clothing/head/beret/sci(src)
new /obj/item/clothing/neck/cloak/research_director(src)
new /obj/item/clothing/under/rank/rnd/research_director(src)
new /obj/item/clothing/suit/storage/labcoat/rd(src)
new /obj/item/clothing/suit/mantle/labcoat(src)
Expand All @@ -122,6 +127,7 @@
new /obj/item/clothing/head/surgery/blue(src)
new /obj/item/clothing/head/surgery/green(src)
new /obj/item/clothing/head/surgery/purple(src)
new /obj/item/clothing/neck/cloak/chief_medical_officer(src)
new /obj/item/clothing/under/rank/medical/chief_medical_officer(src)
new /obj/item/clothing/under/rank/medical/chief_medical_officer/skirt(src)
new /obj/item/clothing/under/rank/medical/scrubs(src)
Expand All @@ -143,6 +149,7 @@
new /obj/item/clothing/head/hardhat/white(src)
new /obj/item/clothing/head/beret/ce(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/neck/cloak/chief_engineer(src)
new /obj/item/clothing/under/rank/engineering/chief_engineer(src)
new /obj/item/clothing/under/rank/engineering/chief_engineer/skirt(src)
new /obj/item/clothing/suit/mantle/chief_engineer(src)
Expand Down Expand Up @@ -225,6 +232,7 @@
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/head/qm(src)
new /obj/item/clothing/head/beret/qm(src)
new /obj/item/clothing/neck/cloak/quartermaster(src)
new /obj/item/clothing/head/hardhat/orange(src)
new /obj/item/clothing/suit/qmcoat(src)
new /obj/item/clothing/suit/mantle/qm(src)
Expand Down
3 changes: 1 addition & 2 deletions code/game/objects/structures/bedsheet_bin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ LINEN BINS
desc = "A surprisingly soft linen bedsheet."
icon = 'icons/obj/bedsheet.dmi'
icon_state = "sheet"
item_state = "bedsheet"
lefthand_file = 'icons/mob/inhands/bedsheet_lefthand.dmi'
righthand_file = 'icons/mob/inhands/bedsheet_righthand.dmi'
layer = 4
Expand All @@ -19,7 +18,7 @@ LINEN BINS
w_class = WEIGHT_CLASS_TINY
item_color = "white"
resistance_flags = FLAMMABLE
slot_flags = ITEM_SLOT_BACK
slot_flags = ITEM_SLOT_NECK
dog_fashion = /datum/dog_fashion/head/ghost
dyeing_key = DYE_REGISTRY_BEDSHEET

Expand Down
1 change: 1 addition & 0 deletions code/modules/asset_cache/assets/asset_strip.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"inventory-glasses.png" = 'icons/ui_icons/inventory/glasses.png',
"inventory-head.png" = 'icons/ui_icons/inventory/head.png',
"inventory-mask.png" = 'icons/ui_icons/inventory/mask.png',
"inventory-neck.png" = 'icons/ui_icons/inventory/neck.png',
"inventory-ears.png" = 'icons/ui_icons/inventory/ears.png',
"inventory-uniform.png" = 'icons/ui_icons/inventory/uniform.png',
"inventory-suit.png" = 'icons/ui_icons/inventory/suit.png',
Expand Down
6 changes: 6 additions & 0 deletions code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1185,3 +1185,9 @@
deconstruct(FALSE)
else
..()

/obj/item/clothing/neck
name = "necklace"
icon = 'icons/obj/clothing/neck.dmi'
body_parts_covered = UPPER_TORSO
slot_flags = ITEM_SLOT_NECK
47 changes: 47 additions & 0 deletions code/modules/clothing/neck/cloaks.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
//Cloaks. No, not THAT kind of cloak.

/obj/item/clothing/neck/cloak
name = "grey cloak"
desc = "It's a cloak that can be worn around your neck in a pretty dull color."
icon_state = "cloak"
w_class = WEIGHT_CLASS_SMALL
body_parts_covered = UPPER_TORSO | ARMS

/obj/item/clothing/neck/cloak/head_of_security
name = "head of security's cloak"
desc = "Worn by the leader of Brigston, ruling the station with an iron fist."
icon_state = "hoscloak"

/obj/item/clothing/neck/cloak/quartermaster
name = "quartermaster's cloak"
desc = "Worn by the God-emperor of Cargonia, supplying the station with the necessary tools for survival."
icon_state = "qmcloak"

/obj/item/clothing/neck/cloak/chief_medical_officer
name = "chief medical officer's cloak"
desc = "Worn by the leader of Medistan, the valiant men and women keeping pestilence at bay."
icon_state = "cmocloak"

/obj/item/clothing/neck/cloak/chief_engineer
name = "chief engineer's cloak"
desc = "Worn by the leader of both Atmosia and Delamistan, wielder of unlimited power."
icon_state = "cecloak"

/obj/item/clothing/neck/cloak/research_director
name = "research director's cloak"
desc = "Worn by the leader of Scientopia, the greatest thaumaturgist and researcher of rapid unexpected self disassembly."
icon_state = "rdcloak"

/obj/item/clothing/neck/cloak/captain
name = "captain's cloak"
desc = "Worn by the supreme leader of Space Station 13."
icon_state = "capcloak"

/obj/item/clothing/neck/cloak/captain/Initialize(mapload)
. = ..()
desc = "Worn by the supreme leader of [station_name()]."

/obj/item/clothing/neck/cloak/head_of_personnel
name = "head of personnel's cloak"
desc = "Worn by the Head of Personnel. It smells faintly of bureaucracy."
icon_state = "hopcloak"
2 changes: 1 addition & 1 deletion code/modules/clothing/suits/job_suits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
)

/obj/item/clothing/suit/mantle/armor/captain
name = "captain's cloak"
name = "captain's mantle"
desc = "An armor-plated piece of fashion for the ruling elite. Protect your upper half in style."
icon_state = "capmantle"
item_state = "capmantle"
Expand Down
Loading

0 comments on commit 6eb1269

Please sign in to comment.