mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
[REFACTOR] Consolidates SLOT_FLAG and SLOT_HUD into one ITEM_SLOT flag (#26743)
* IT WORKS UP UNTIL THIS POINT * Consolidates SLOT_FLAG and SLOT_HUD into one * Remove cover_both_ears * SLOT_HUD to ITEM_SLOT * Remove clothing_trait changes for the time being * Remove accidental copy-paste * Re-add no-slip var * More failure to copy-paste correctly * Leftover flag * Combine left and right slot flags where possible * UNGOOF MY DEFINES, PHAND IS NOT A THING * Minor spacing changes * Some more fixes from merge * Seperates ITEM SLOT AMOUNT into two defines * ON SECOND THOUGHT LETS NOT DO THAT. * Addresses Contra's review * Thank you GREP * Rename ITEM_SLOT_FEET to ITEM_SLOT_SHOES * Added a comment to the bitmasks in clothing defines * Rename ITEM_SLOT_TIE to ITEM_SLOT_ACCESSORY * These are for a seperate PR. * Magboot fixes * Requested changes * Re-add accidental removal * Wrong flags * Update code/__DEFINES/clothing_defines.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Signed-off-by: Chap <erwin@lombok.demon.nl> * Requested changes * Merge fixes * Fix double headset * Fixes multiple accessories --------- Signed-off-by: Chap <erwin@lombok.demon.nl> Co-authored-by: Adrer <adrermail@gmail.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
@@ -477,7 +477,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
id.registered_name = H.real_name
|
||||
id.assignment = "Captain"
|
||||
id.name = "[id.registered_name]'s ID Card ([id.assignment])"
|
||||
H.equip_to_slot_or_del(id, SLOT_HUD_WEAR_ID)
|
||||
H.equip_to_slot_or_del(id, ITEM_SLOT_ID)
|
||||
H.update_inv_wear_id()
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
@@ -141,16 +141,16 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0)
|
||||
|
||||
/mob/living/carbon/human/proc/equip_syndicate_infiltrator(syndicate_leader_selected = 0, num_tc, flag_mgmt)
|
||||
// Storage items
|
||||
equip_to_slot_or_del(new /obj/item/storage/backpack(src), SLOT_HUD_BACK)
|
||||
equip_to_slot_or_del(new /obj/item/storage/box/survival(src), SLOT_HUD_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/chameleon(src), SLOT_HUD_JUMPSUIT)
|
||||
equip_to_slot_or_del(new /obj/item/storage/backpack(src), ITEM_SLOT_BACK)
|
||||
equip_to_slot_or_del(new /obj/item/storage/box/survival(src), ITEM_SLOT_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/chameleon(src), ITEM_SLOT_JUMPSUIT)
|
||||
if(!flag_mgmt)
|
||||
equip_to_slot_or_del(new /obj/item/flashlight(src), SLOT_HUD_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/storage/belt/utility/full/multitool(src), SLOT_HUD_BELT)
|
||||
equip_to_slot_or_del(new /obj/item/flashlight(src), ITEM_SLOT_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/storage/belt/utility/full/multitool(src), ITEM_SLOT_BELT)
|
||||
|
||||
var/obj/item/clothing/gloves/combat/G = new /obj/item/clothing/gloves/combat(src)
|
||||
G.name = "black gloves"
|
||||
equip_to_slot_or_del(G, SLOT_HUD_GLOVES)
|
||||
equip_to_slot_or_del(G, ITEM_SLOT_GLOVES)
|
||||
|
||||
// Implants:
|
||||
// Uplink
|
||||
@@ -167,11 +167,11 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0)
|
||||
// Radio & PDA
|
||||
var/obj/item/radio/R = new /obj/item/radio/headset/syndicate/syndteam(src)
|
||||
R.set_frequency(SYNDTEAM_FREQ)
|
||||
equip_to_slot_or_del(R, SLOT_HUD_LEFT_EAR)
|
||||
equip_or_collect(new /obj/item/pda(src), SLOT_HUD_IN_BACKPACK)
|
||||
equip_to_slot_or_del(R, ITEM_SLOT_LEFT_EAR)
|
||||
equip_or_collect(new /obj/item/pda(src), ITEM_SLOT_IN_BACKPACK)
|
||||
|
||||
// Other gear
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/chameleon/noslip(src), SLOT_HUD_SHOES)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/chameleon/noslip(src), ITEM_SLOT_SHOES)
|
||||
|
||||
var/obj/item/card/id/syndicate/W = new(src)
|
||||
if(flag_mgmt)
|
||||
@@ -191,6 +191,6 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0)
|
||||
W.access += get_syndicate_access("Syndicate Operative")
|
||||
W.name = "[real_name]'s ID Card ([W.assignment])"
|
||||
W.registered_name = real_name
|
||||
equip_to_slot_or_del(W, SLOT_HUD_WEAR_ID)
|
||||
equip_to_slot_or_del(W, ITEM_SLOT_ID)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
continue
|
||||
qdel(I)
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/costume/kilt(H), SLOT_HUD_JUMPSUIT)
|
||||
H.equip_to_slot_or_del(new /obj/item/radio/headset/heads/captain(H), SLOT_HUD_LEFT_EAR)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), SLOT_HUD_HEAD)
|
||||
H.equip_to_slot_or_del(new /obj/item/claymore/highlander(H), SLOT_HUD_RIGHT_HAND)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), SLOT_HUD_SHOES)
|
||||
H.equip_to_slot_or_del(new /obj/item/pinpointer(H.loc), SLOT_HUD_LEFT_STORE)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/costume/kilt(H), ITEM_SLOT_JUMPSUIT)
|
||||
H.equip_to_slot_or_del(new /obj/item/radio/headset/heads/captain(H), ITEM_SLOT_LEFT_EAR)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), ITEM_SLOT_HEAD)
|
||||
H.equip_to_slot_or_del(new /obj/item/claymore/highlander(H), ITEM_SLOT_RIGHT_HAND)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), ITEM_SLOT_SHOES)
|
||||
H.equip_to_slot_or_del(new /obj/item/pinpointer(H.loc), ITEM_SLOT_LEFT_POCKET)
|
||||
|
||||
var/obj/item/card/id/W = new(H)
|
||||
W.name = "[H.real_name]'s ID Card"
|
||||
@@ -44,7 +44,7 @@
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Highlander"
|
||||
W.registered_name = H.real_name
|
||||
H.equip_to_slot_or_del(W, SLOT_HUD_WEAR_ID)
|
||||
H.equip_to_slot_or_del(W, ITEM_SLOT_ID)
|
||||
H.dna.species.after_equip_job(null, H)
|
||||
H.regenerate_icons()
|
||||
|
||||
@@ -79,13 +79,13 @@
|
||||
messages.Add(H.mind.prepare_announce_objectives(FALSE))
|
||||
to_chat(H, chat_box_red(messages.Join("<br>")))
|
||||
|
||||
var/obj/item/slot_item_ID = H.get_item_by_slot(SLOT_HUD_WEAR_ID)
|
||||
var/obj/item/slot_item_ID = H.get_item_by_slot(ITEM_SLOT_ID)
|
||||
qdel(slot_item_ID)
|
||||
var/obj/item/slot_item_hand = H.get_item_by_slot(SLOT_HUD_RIGHT_HAND)
|
||||
var/obj/item/slot_item_hand = H.get_item_by_slot(ITEM_SLOT_RIGHT_HAND)
|
||||
H.unEquip(slot_item_hand)
|
||||
|
||||
var/obj/item/multisword/pure_evil/multi = new(H)
|
||||
H.equip_to_slot_or_del(multi, SLOT_HUD_RIGHT_HAND)
|
||||
H.equip_to_slot_or_del(multi, ITEM_SLOT_RIGHT_HAND)
|
||||
|
||||
var/obj/item/card/id/W = new(H)
|
||||
W.icon_state = "centcom"
|
||||
@@ -94,7 +94,7 @@
|
||||
W.assignment = "Multiverse Summoner"
|
||||
W.registered_name = H.real_name
|
||||
W.update_label(H.real_name)
|
||||
H.equip_to_slot_or_del(W, SLOT_HUD_WEAR_ID)
|
||||
H.equip_to_slot_or_del(W, ITEM_SLOT_ID)
|
||||
|
||||
H.update_icons()
|
||||
|
||||
|
||||
@@ -23,14 +23,14 @@
|
||||
|
||||
to_chat(H, "<B>You are part of the [station_name()] dodgeball tournament. Throw dodgeballs at crewmembers wearing a different color than you. OOC: Use THROW on an EMPTY-HAND to catch thrown dodgeballs.</B>")
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/radio/headset/heads/captain(H), SLOT_HUD_LEFT_EAR)
|
||||
H.equip_to_slot_or_del(new /obj/item/beach_ball/dodgeball_team(H), SLOT_HUD_RIGHT_HAND)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), SLOT_HUD_SHOES)
|
||||
H.equip_to_slot_or_del(new /obj/item/radio/headset/heads/captain(H), ITEM_SLOT_LEFT_EAR)
|
||||
H.equip_to_slot_or_del(new /obj/item/beach_ball/dodgeball_team(H), ITEM_SLOT_RIGHT_HAND)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), ITEM_SLOT_SHOES)
|
||||
|
||||
if(!team_toggle)
|
||||
GLOB.team_alpha += H
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/red/dodgeball(H), SLOT_HUD_JUMPSUIT)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/red/dodgeball(H), ITEM_SLOT_JUMPSUIT)
|
||||
var/obj/item/card/id/W = new(H)
|
||||
W.name = "[H.real_name]'s ID Card"
|
||||
W.icon_state = "centcom"
|
||||
@@ -38,12 +38,12 @@
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Professional Pee-Wee League Dodgeball Player"
|
||||
W.registered_name = H.real_name
|
||||
H.equip_to_slot_or_del(W, SLOT_HUD_WEAR_ID)
|
||||
H.equip_to_slot_or_del(W, ITEM_SLOT_ID)
|
||||
|
||||
else
|
||||
GLOB.team_bravo += H
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/blue/dodgeball(H), SLOT_HUD_JUMPSUIT)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/blue/dodgeball(H), ITEM_SLOT_JUMPSUIT)
|
||||
var/obj/item/card/id/W = new(H)
|
||||
W.name = "[H.real_name]'s ID Card"
|
||||
W.icon_state = "centcom"
|
||||
@@ -51,7 +51,7 @@
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Professional Pee-Wee League Dodgeball Player"
|
||||
W.registered_name = H.real_name
|
||||
H.equip_to_slot_or_del(W, SLOT_HUD_WEAR_ID)
|
||||
H.equip_to_slot_or_del(W, ITEM_SLOT_ID)
|
||||
|
||||
team_toggle = !team_toggle
|
||||
H.dna.species.after_equip_job(null, H)
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
M.loc = pick(GLOB.prisonwarp)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/prisoner = M
|
||||
prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(prisoner), SLOT_HUD_JUMPSUIT)
|
||||
prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), SLOT_HUD_SHOES)
|
||||
prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(prisoner), ITEM_SLOT_JUMPSUIT)
|
||||
prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), ITEM_SLOT_SHOES)
|
||||
spawn(50)
|
||||
to_chat(M, "<span class='warning'>You have been sent to the prison station!</span>")
|
||||
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.")
|
||||
|
||||
@@ -124,36 +124,36 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
|
||||
/mob/living/carbon/human/proc/equip_syndicate_commando(is_leader = FALSE, full_gear = FALSE)
|
||||
var/obj/item/radio/R = new /obj/item/radio/headset/syndicate/alt/syndteam(src)
|
||||
R.set_frequency(SYNDTEAM_FREQ)
|
||||
equip_to_slot_or_del(R, SLOT_HUD_LEFT_EAR)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(src), SLOT_HUD_JUMPSUIT)
|
||||
equip_to_slot_or_del(R, ITEM_SLOT_LEFT_EAR)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(src), ITEM_SLOT_JUMPSUIT)
|
||||
if(!full_gear)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(src), SLOT_HUD_SHOES)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(src), SLOT_HUD_GLOVES)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(src), ITEM_SLOT_SHOES)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(src), ITEM_SLOT_GLOVES)
|
||||
|
||||
equip_to_slot_or_del(new /obj/item/storage/backpack/security(src), SLOT_HUD_BACK)
|
||||
equip_to_slot_or_del(new /obj/item/storage/box/survival_syndi(src), SLOT_HUD_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/storage/backpack/security(src), ITEM_SLOT_BACK)
|
||||
equip_to_slot_or_del(new /obj/item/storage/box/survival_syndi(src), ITEM_SLOT_IN_BACKPACK)
|
||||
|
||||
equip_to_slot_or_del(new /obj/item/gun/projectile/revolver(src), SLOT_HUD_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/ammo_box/a357(src), SLOT_HUD_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/combat/nanites(src), SLOT_HUD_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/grenade/plastic/c4/x4(src), SLOT_HUD_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/gun/projectile/revolver(src), ITEM_SLOT_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/ammo_box/a357(src), ITEM_SLOT_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/reagent_containers/hypospray/combat/nanites(src), ITEM_SLOT_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/grenade/plastic/c4/x4(src), ITEM_SLOT_IN_BACKPACK)
|
||||
if(is_leader)
|
||||
equip_to_slot_or_del(new /obj/item/pinpointer(src), SLOT_HUD_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/disk/nuclear/unrestricted(src), SLOT_HUD_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/pinpointer(src), ITEM_SLOT_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/disk/nuclear/unrestricted(src), ITEM_SLOT_IN_BACKPACK)
|
||||
else
|
||||
equip_to_slot_or_del(new /obj/item/grenade/plastic/c4/x4(src), SLOT_HUD_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/card/emag(src), SLOT_HUD_RIGHT_STORE)
|
||||
equip_to_slot_or_del(new /obj/item/melee/energy/sword/saber/red(src), SLOT_HUD_LEFT_STORE)
|
||||
equip_to_slot_or_del(new /obj/item/grenade/plastic/c4/x4(src), ITEM_SLOT_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/card/emag(src), ITEM_SLOT_RIGHT_POCKET)
|
||||
equip_to_slot_or_del(new /obj/item/melee/energy/sword/saber/red(src), ITEM_SLOT_LEFT_POCKET)
|
||||
|
||||
if(full_gear)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/mask/gas/syndicate(src), SLOT_HUD_WEAR_MASK)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/suit/space/hardsuit/syndi/elite/sst(src), SLOT_HUD_OUTER_SUIT)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(src), SLOT_HUD_GLASSES)
|
||||
equip_to_slot_or_del(new /obj/item/storage/belt/military/sst(src), SLOT_HUD_BELT)
|
||||
equip_to_slot_or_del(new /obj/item/tank/internals/oxygen/red(src), SLOT_HUD_SUIT_STORE)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/elite(src), SLOT_HUD_SHOES)
|
||||
equip_to_slot_or_del(new /obj/item/gun/projectile/automatic/l6_saw(src), SLOT_HUD_RIGHT_HAND)
|
||||
equip_to_slot_or_del(new /obj/item/ammo_box/magazine/mm556x45(src), SLOT_HUD_IN_BACKPACK)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/mask/gas/syndicate(src), ITEM_SLOT_MASK)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/suit/space/hardsuit/syndi/elite/sst(src), ITEM_SLOT_OUTER_SUIT)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(src), ITEM_SLOT_EYES)
|
||||
equip_to_slot_or_del(new /obj/item/storage/belt/military/sst(src), ITEM_SLOT_BELT)
|
||||
equip_to_slot_or_del(new /obj/item/tank/internals/oxygen/red(src), ITEM_SLOT_SUIT_STORE)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/elite(src), ITEM_SLOT_SHOES)
|
||||
equip_to_slot_or_del(new /obj/item/gun/projectile/automatic/l6_saw(src), ITEM_SLOT_RIGHT_HAND)
|
||||
equip_to_slot_or_del(new /obj/item/ammo_box/magazine/mm556x45(src), ITEM_SLOT_IN_BACKPACK)
|
||||
|
||||
var/obj/item/bio_chip/dust/D = new /obj/item/bio_chip/dust(src)
|
||||
D.implant(src)
|
||||
@@ -163,7 +163,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
|
||||
W.assignment = "Syndicate Commando"
|
||||
W.access += get_syndicate_access(W.assignment)
|
||||
W.registered_name = real_name
|
||||
equip_to_slot_or_del(W, SLOT_HUD_WEAR_ID)
|
||||
equip_to_slot_or_del(W, ITEM_SLOT_ID)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user