[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:
Chap
2024-11-13 13:02:29 +00:00
committed by GitHub
co-authored by Contrabang Adrer
parent c297dde150
commit d90a70ecda
232 changed files with 1231 additions and 1192 deletions
+1 -1
View File
@@ -67,7 +67,7 @@
/datum/component/parry/proc/equipped(datum/source, mob/user, slot)
SIGNAL_HANDLER
if(slot in list(SLOT_HUD_LEFT_HAND, SLOT_HUD_RIGHT_HAND))
if(slot & ITEM_SLOT_BOTH_HANDS)
RegisterSignal(user, COMSIG_HUMAN_PARRY, PROC_REF(start_parry))
else
UnregisterSignal(user, COMSIG_HUMAN_PARRY)
+1 -1
View File
@@ -111,7 +111,7 @@
/datum/component/shielded/proc/on_equipped(datum/source, mob/user, slot)
SIGNAL_HANDLER
if((slot == SLOT_HUD_LEFT_HAND || slot == SLOT_HUD_RIGHT_HAND) && !shield_inhand)
if((slot & ITEM_SLOT_BOTH_HANDS) && !shield_inhand)
lost_wearer(source, user)
return
set_wearer(user)
+2 -2
View File
@@ -126,7 +126,7 @@
/datum/component/two_handed/proc/on_equip(datum/source, mob/user, slot)
SIGNAL_HANDLER // COMSIG_ITEM_EQUIPPED
if(require_twohands && (slot == SLOT_HUD_LEFT_HAND || slot == SLOT_HUD_RIGHT_HAND)) // force equip the item
if(require_twohands && (slot & ITEM_SLOT_BOTH_HANDS)) // force equip the item
INVOKE_ASYNC(src, PROC_REF(wield), user)
if(!user.is_holding(parent) && wielded && !require_twohands)
INVOKE_ASYNC(src, PROC_REF(unwield), user)
@@ -277,7 +277,7 @@
parent_item.update_appearance()
if(istype(user)) // tk showed that we might not have a mob here
if(user.get_item_by_slot(SLOT_HUD_BACK) == parent)
if(user.get_item_by_slot(ITEM_SLOT_BACK) == parent)
user.update_inv_back()
else
user.update_inv_l_hand()
+2 -2
View File
@@ -102,8 +102,8 @@
if(isobj(H.wear_suit))
Cl = H.wear_suit
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(SLOT_HUD_JUMPSUIT))
Cl = SLOT_HUD_JUMPSUIT
if(passed && isobj(ITEM_SLOT_JUMPSUIT))
Cl = ITEM_SLOT_JUMPSUIT
passed = prob((Cl.permeability_coefficient*100) - 1)
if(3)
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&HANDS)
+3 -3
View File
@@ -45,15 +45,15 @@
if(!istype(H)) // Xenos don't have masks. They can still feel silly though
return
if(!H.has_organ_for_slot(SLOT_HUD_WEAR_MASK) || !H.canUnEquip(H.get_item_by_slot(SLOT_HUD_WEAR_MASK)))
if(!H.has_organ_for_slot(ITEM_SLOT_MASK) || !H.canUnEquip(H.get_item_by_slot(ITEM_SLOT_MASK)))
return
var/saved_internals = H.internal
H.unEquip(H.get_item_by_slot(SLOT_HUD_WEAR_MASK))
H.unEquip(H.get_item_by_slot(ITEM_SLOT_MASK))
var/obj/item/clothing/mask/gas/clown_hat/peak_comedy = new
peak_comedy.flags |= DROPDEL
H.equip_to_slot_or_del(peak_comedy, SLOT_HUD_WEAR_MASK)
H.equip_to_slot_or_del(peak_comedy, ITEM_SLOT_MASK)
if(saved_internals) // Let's not stealthily suffocate Vox/Plasmamen, this isn't a murder virus
H.internal = saved_internals
+7 -7
View File
@@ -10,7 +10,7 @@
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 0.75
severity = MINOR
/// A mapping of `num2text(SLOT_HUD_XYZ)` -> item path
/// A mapping of `num2text(ITEM_SLOT_XYZ)` -> item path
var/list/magic_fashion = list()
@@ -18,11 +18,11 @@
. = ..()
var/list/magic_fashion_slot_IDs = list(
SLOT_HUD_RIGHT_HAND,
SLOT_HUD_LEFT_HAND,
SLOT_HUD_HEAD,
SLOT_HUD_OUTER_SUIT,
SLOT_HUD_SHOES
ITEM_SLOT_LEFT_HAND,
ITEM_SLOT_RIGHT_HAND,
ITEM_SLOT_HEAD,
ITEM_SLOT_OUTER_SUIT,
ITEM_SLOT_SHOES
)
var/list/magic_fashion_items = list(
/obj/item/staff,
@@ -70,7 +70,7 @@
continue
switch(slot_ID) // Extra filtering for specific slots
if(SLOT_HUD_HEAD)
if(ITEM_SLOT_HEAD)
if(isplasmaman(H))
continue // We want them to spread the magical joy, not burn to death in agony
+1 -1
View File
@@ -20,7 +20,7 @@
/datum/element/earhealing/proc/equippedChanged(datum/source, mob/living/carbon/user, slot)
SIGNAL_HANDLER
if(((slot == SLOT_HUD_LEFT_EAR) || (slot == SLOT_HUD_RIGHT_EAR)) && istype(user))
if((slot & ITEM_SLOT_BOTH_EARS) && istype(user))
user_by_item[source] = user
else
user_by_item -= source
+2 -2
View File
@@ -181,7 +181,7 @@
/// A preset for equipping items onto mob slots
/datum/strippable_item/mob_item_slot
/// The SLOT_FLAG_* to equip to.
/// The ITEM_SLOT_* to equip to.
var/item_slot
/datum/strippable_item/mob_item_slot/get_item(atom/source)
@@ -230,7 +230,7 @@
/datum/strippable_item/mob_item_slot/get_obscuring(atom/source)
if(ishuman(source))
var/mob/living/carbon/human/human_source = source
if(item_slot in human_source.check_obscured_slots())
if(item_slot & human_source.check_obscured_slots())
return STRIPPABLE_OBSCURING_COMPLETELY
return STRIPPABLE_OBSCURING_NONE
+3 -3
View File
@@ -11,7 +11,7 @@
/datum/keybinding/human/bag_equip/down(client/C)
. = ..()
var/mob/living/carbon/human/M = C.mob
M.quick_equip_item(SLOT_HUD_BACK)
M.quick_equip_item(ITEM_SLOT_BACK)
/datum/keybinding/human/belt_equip
name = "Equip Held Object To Belt"
@@ -20,7 +20,7 @@
/datum/keybinding/human/belt_equip/down(client/C)
. = ..()
var/mob/living/carbon/human/M = C.mob
M.quick_equip_item(SLOT_HUD_BELT)
M.quick_equip_item(ITEM_SLOT_BELT)
/datum/keybinding/human/suit_equip
name = "Equip Held Object To Suit Storage"
@@ -29,7 +29,7 @@
/datum/keybinding/human/suit_equip/down(client/C)
. = ..()
var/mob/living/carbon/human/M = C.mob
M.quick_equip_item(SLOT_HUD_SUIT_STORE)
M.quick_equip_item(ITEM_SLOT_SUIT_STORE)
/datum/keybinding/human/toggle_holster
name = "Toggle Holster"
+17 -17
View File
@@ -70,29 +70,29 @@
//Start with uniform,suit,backpack for additional slots
if(uniform)
equip_item(H, uniform, SLOT_HUD_JUMPSUIT)
equip_item(H, uniform, ITEM_SLOT_JUMPSUIT)
if(suit)
equip_item(H, suit, SLOT_HUD_OUTER_SUIT)
equip_item(H, suit, ITEM_SLOT_OUTER_SUIT)
if(back)
equip_item(H, back, SLOT_HUD_BACK)
equip_item(H, back, ITEM_SLOT_BACK)
if(belt)
equip_item(H, belt, SLOT_HUD_BELT)
equip_item(H, belt, ITEM_SLOT_BELT)
if(gloves)
equip_item(H, gloves, SLOT_HUD_GLOVES)
equip_item(H, gloves, ITEM_SLOT_GLOVES)
if(shoes)
equip_item(H, shoes, SLOT_HUD_SHOES)
equip_item(H, shoes, ITEM_SLOT_SHOES)
if(head)
equip_item(H, head, SLOT_HUD_HEAD)
equip_item(H, head, ITEM_SLOT_HEAD)
if(mask)
equip_item(H, mask, SLOT_HUD_WEAR_MASK)
equip_item(H, mask, ITEM_SLOT_MASK)
if(l_ear)
equip_item(H, l_ear, SLOT_HUD_LEFT_EAR)
equip_item(H, l_ear, ITEM_SLOT_LEFT_EAR)
if(r_ear)
equip_item(H, r_ear, SLOT_HUD_RIGHT_EAR)
equip_item(H, r_ear, ITEM_SLOT_RIGHT_EAR)
if(glasses)
equip_item(H, glasses, SLOT_HUD_GLASSES)
equip_item(H, glasses, ITEM_SLOT_EYES)
if(id)
equip_item(H, id, SLOT_HUD_WEAR_ID)
equip_item(H, id, ITEM_SLOT_ID)
if(!H.head && toggle_helmet && istype(H.wear_suit, /obj/item/clothing/suit/space/hardsuit))
var/obj/item/clothing/suit/space/hardsuit/HS = H.wear_suit
@@ -102,7 +102,7 @@
C.quick_activation()
if(suit_store)
equip_item(H, suit_store, SLOT_HUD_SUIT_STORE)
equip_item(H, suit_store, ITEM_SLOT_SUIT_STORE)
if(l_hand)
H.put_in_l_hand(new l_hand(H))
@@ -110,7 +110,7 @@
H.put_in_r_hand(new r_hand(H))
if(pda)
equip_item(H, pda, SLOT_HUD_WEAR_PDA)
equip_item(H, pda, ITEM_SLOT_PDA)
if(uniform)
for(var/path in accessories)
@@ -120,9 +120,9 @@
if(!visualsOnly) // Items in pockets or backpack don't show up on mob's icon.
if(l_pocket)
equip_item(H, l_pocket, SLOT_HUD_LEFT_STORE)
equip_item(H, l_pocket, ITEM_SLOT_LEFT_POCKET)
if(r_pocket)
equip_item(H, r_pocket, SLOT_HUD_RIGHT_STORE)
equip_item(H, r_pocket, ITEM_SLOT_RIGHT_POCKET)
if(box)
if(!backpack_contents)
@@ -135,7 +135,7 @@
if(!number)
number = 1
for(var/i in 1 to number)
H.equip_or_collect(new path(H), SLOT_HUD_IN_BACKPACK)
H.equip_or_collect(new path(H), ITEM_SLOT_IN_BACKPACK)
for(var/path in cybernetic_implants)
var/obj/item/organ/internal/O = new path
+3 -3
View File
@@ -1247,7 +1247,7 @@
if(istype(C))
C.name = "ancient robes"
C.hood.name = "ancient hood"
H.equip_to_slot_or_del(C, SLOT_HUD_IN_BACKPACK)
H.equip_to_slot_or_del(C, ITEM_SLOT_IN_BACKPACK)
var/obj/item/card/id/I = H.wear_id
if(istype(I))
@@ -1289,7 +1289,7 @@
if(istype(C))
C.name = "ancient robes"
C.hood.name = "ancient hood"
H.equip_to_slot_or_del(C, SLOT_HUD_IN_BACKPACK)
H.equip_to_slot_or_del(C, ITEM_SLOT_IN_BACKPACK)
var/obj/item/card/id/I = H.wear_id
if(istype(I))
@@ -1602,7 +1602,7 @@
H.update_dna()
H.wear_mask.adjustmask(H) // push it back on the head
equip_item(H, /obj/item/clothing/mask/cigarette/cigar, SLOT_HUD_WEAR_MASK) // get them their cigar
equip_item(H, /obj/item/clothing/mask/cigarette/cigar, ITEM_SLOT_MASK) // get them their cigar
if(istype(H.glasses, /obj/item/clothing/glasses)) // this is gonna be always true
var/obj/item/clothing/glasses/glassass = H.glasses
glassass.over_mask = TRUE
+1 -1
View File
@@ -22,7 +22,7 @@
id = /obj/item/card/id/admin
pda = /obj/item/pda/centcom
internals_slot = SLOT_HUD_SUIT_STORE
internals_slot = ITEM_SLOT_SUIT_STORE
toggle_helmet = TRUE
cybernetic_implants = list(
+21 -21
View File
@@ -11,37 +11,37 @@
/datum/outfit/varedit/proc/set_equipment_by_slot(slot, item_path)
switch(slot)
if(SLOT_HUD_JUMPSUIT)
if(ITEM_SLOT_JUMPSUIT)
uniform = item_path
if(SLOT_HUD_BACK)
if(ITEM_SLOT_BACK)
back = item_path
if(SLOT_HUD_OUTER_SUIT)
if(ITEM_SLOT_OUTER_SUIT)
suit = item_path
if(SLOT_HUD_BELT)
if(ITEM_SLOT_BELT)
belt = item_path
if(SLOT_HUD_GLOVES)
if(ITEM_SLOT_GLOVES)
gloves = item_path
if(SLOT_HUD_SHOES)
if(ITEM_SLOT_SHOES)
shoes = item_path
if(SLOT_HUD_HEAD)
if(ITEM_SLOT_HEAD)
head = item_path
if(SLOT_HUD_WEAR_MASK)
if(ITEM_SLOT_MASK)
mask = item_path
if(SLOT_HUD_LEFT_EAR)
if(ITEM_SLOT_LEFT_EAR)
l_ear = item_path
if(SLOT_HUD_RIGHT_EAR)
if(ITEM_SLOT_RIGHT_EAR)
r_ear = item_path
if(SLOT_HUD_GLASSES)
if(ITEM_SLOT_EYES)
glasses = item_path
if(SLOT_HUD_WEAR_ID)
if(ITEM_SLOT_ID)
id = item_path
if(SLOT_HUD_WEAR_PDA)
if(ITEM_SLOT_PDA)
pda = item_path
if(SLOT_HUD_SUIT_STORE)
if(ITEM_SLOT_SUIT_STORE)
suit_store = item_path
if(SLOT_HUD_LEFT_STORE)
if(ITEM_SLOT_LEFT_POCKET)
l_pocket = item_path
if(SLOT_HUD_RIGHT_STORE)
if(ITEM_SLOT_RIGHT_POCKET)
r_pocket = item_path
@@ -70,7 +70,7 @@
// Copy equipment
var/list/result = list()
var/list/slots_to_check = list(SLOT_HUD_JUMPSUIT, SLOT_HUD_BACK, SLOT_HUD_OUTER_SUIT, SLOT_HUD_BELT, SLOT_HUD_GLOVES, SLOT_HUD_SHOES, SLOT_HUD_HEAD, SLOT_HUD_WEAR_MASK, SLOT_HUD_LEFT_EAR, SLOT_HUD_RIGHT_EAR, SLOT_HUD_GLASSES, SLOT_HUD_WEAR_ID, SLOT_HUD_WEAR_PDA, SLOT_HUD_SUIT_STORE, SLOT_HUD_LEFT_STORE, SLOT_HUD_RIGHT_STORE)
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)
for(var/s in slots_to_check)
var/obj/item/I = get_item_by_slot(s)
var/vedits = collect_vv(I)
@@ -81,7 +81,7 @@
// Copy access
O.stored_access = list()
var/obj/item/id_slot = get_item_by_slot(SLOT_HUD_WEAR_ID)
var/obj/item/id_slot = get_item_by_slot(ITEM_SLOT_ID)
if(id_slot)
O.stored_access |= id_slot.GetAccess()
var/obj/item/card/id/ID = id_slot.GetID()
@@ -105,7 +105,7 @@
O.vv_values = result
// Copy backpack contents if exist.
var/obj/item/backpack = get_item_by_slot(SLOT_HUD_BACK)
var/obj/item/backpack = get_item_by_slot(ITEM_SLOT_BACK)
if(istype(backpack) && LAZYLEN(backpack.contents) > 0)
var/list/typecounts = list()
for(var/obj/item/I in backpack)
@@ -129,7 +129,7 @@
O.cybernetic_implants |= aug.type
// Copy accessories
var/obj/item/clothing/under/uniform_slot = get_item_by_slot(SLOT_HUD_JUMPSUIT)
var/obj/item/clothing/under/uniform_slot = get_item_by_slot(ITEM_SLOT_JUMPSUIT)
if(uniform_slot)
O.accessories = list()
for(var/obj/item/clothing/accessory/A in uniform_slot.accessories)
@@ -160,7 +160,7 @@
I.vv_edit_var(vname,edits[vname])
// Apply access
var/obj/item/id_slot = H.get_item_by_slot(SLOT_HUD_WEAR_ID)
var/obj/item/id_slot = H.get_item_by_slot(ITEM_SLOT_ID)
if(!id_slot)
return
+7 -7
View File
@@ -54,17 +54,17 @@
unEquip(wear_mask, TRUE)
unEquip(head, TRUE)
unEquip(wear_suit, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/head/wizard/clown, SLOT_HUD_HEAD, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/suit/wizrobe/clown, SLOT_HUD_OUTER_SUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/clown_shoes/magical, SLOT_HUD_SHOES, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/mask/gas/clownwiz, SLOT_HUD_WEAR_MASK, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/head/wizard/clown, ITEM_SLOT_HEAD, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/suit/wizrobe/clown, ITEM_SLOT_OUTER_SUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/clown_shoes/magical, ITEM_SLOT_SHOES, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/mask/gas/clownwiz, ITEM_SLOT_MASK, TRUE, TRUE)
else
qdel(shoes)
qdel(wear_mask)
qdel(w_uniform)
equip_to_slot_if_possible(new /obj/item/clothing/under/rank/civilian/clown/nodrop, SLOT_HUD_JUMPSUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/clown_shoes/nodrop, SLOT_HUD_SHOES, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/mask/gas/clown_hat/nodrop, SLOT_HUD_WEAR_MASK, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/under/rank/civilian/clown/nodrop, ITEM_SLOT_JUMPSUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/clown_shoes/nodrop, ITEM_SLOT_SHOES, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/mask/gas/clown_hat/nodrop, ITEM_SLOT_MASK, TRUE, TRUE)
dna.SetSEState(GLOB.clumsyblock, TRUE, TRUE)
dna.SetSEState(GLOB.comicblock, TRUE, TRUE)
singlemutcheck(src, GLOB.clumsyblock, MUTCHK_FORCED)
+6 -6
View File
@@ -41,10 +41,10 @@
tumor.insert(src)
if(!istype(wear_mask, /obj/item/clothing/mask/cursedclown)) //Infinite loops otherwise
unEquip(wear_mask, 1)
equip_to_slot_if_possible(new /obj/item/clothing/under/cursedclown, SLOT_HUD_JUMPSUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/gloves/cursedclown, SLOT_HUD_GLOVES, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/mask/cursedclown, SLOT_HUD_WEAR_MASK, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/cursedclown, SLOT_HUD_SHOES, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/under/cursedclown, ITEM_SLOT_JUMPSUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/gloves/cursedclown, ITEM_SLOT_GLOVES, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/mask/cursedclown, ITEM_SLOT_MASK, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/cursedclown, ITEM_SLOT_SHOES, TRUE, TRUE)
/mob/living/carbon/human/proc/makeAntiCluwne()
to_chat(src, "<span class='danger'>You don't feel very funny.</span>")
@@ -85,5 +85,5 @@
unEquip(gloves, 1)
qdel(G)
equip_to_slot_if_possible(new /obj/item/clothing/under/rank/procedure/iaa/formal/black, SLOT_HUD_JUMPSUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/black, SLOT_HUD_SHOES, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/under/rank/procedure/iaa/formal/black, ITEM_SLOT_JUMPSUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/black, ITEM_SLOT_SHOES, TRUE, TRUE)
+1 -1
View File
@@ -36,6 +36,6 @@
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a horse!</span>")
if(!target.unEquip(target.wear_mask))
qdel(target.wear_mask)
target.equip_to_slot_if_possible(magichead, SLOT_HUD_WEAR_MASK, TRUE, TRUE)
target.equip_to_slot_if_possible(magichead, ITEM_SLOT_MASK, TRUE, TRUE)
target.flash_eyes()
+4 -4
View File
@@ -138,7 +138,7 @@
return TRUE
/datum/spell/lichdom/proc/equip_lich(mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(H), SLOT_HUD_OUTER_SUIT)
H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(H), SLOT_HUD_HEAD)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H), SLOT_HUD_SHOES)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(H), SLOT_HUD_JUMPSUIT)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(H), ITEM_SLOT_OUTER_SUIT)
H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(H), ITEM_SLOT_HEAD)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H), ITEM_SLOT_SHOES)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(H), ITEM_SLOT_JUMPSUIT)
+6 -6
View File
@@ -37,17 +37,17 @@
unEquip(wear_mask, TRUE)
unEquip(w_uniform, TRUE)
unEquip(wear_suit, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/mask/gas/mime, SLOT_HUD_WEAR_MASK, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/under/rank/civilian/mime, SLOT_HUD_JUMPSUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/suit/suspenders, SLOT_HUD_OUTER_SUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/mask/gas/mime, ITEM_SLOT_MASK, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/under/rank/civilian/mime, ITEM_SLOT_JUMPSUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/suit/suspenders, ITEM_SLOT_OUTER_SUIT, TRUE, TRUE)
Silence(14 SECONDS)
else
qdel(wear_mask)
qdel(w_uniform)
qdel(wear_suit)
equip_to_slot_if_possible(new /obj/item/clothing/mask/gas/mime/nodrop, SLOT_HUD_WEAR_MASK, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/under/rank/civilian/mime/nodrop, SLOT_HUD_JUMPSUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/suit/suspenders/nodrop, SLOT_HUD_OUTER_SUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/mask/gas/mime/nodrop, ITEM_SLOT_MASK, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/under/rank/civilian/mime/nodrop, ITEM_SLOT_JUMPSUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/suit/suspenders/nodrop, ITEM_SLOT_OUTER_SUIT, TRUE, TRUE)
dna.SetSEState(GLOB.muteblock , TRUE, TRUE)
singlemutcheck(src, GLOB.muteblock, MUTCHK_FORCED)
dna.default_blocks.Add(GLOB.muteblock)
+4 -4
View File
@@ -130,12 +130,12 @@
N.visible_message("<span class='warning'>As [item_to_retrieve] vanishes, [N] remains behind!</span>")
break //If you have 2 nads, well, congrats? Keeps message from doubling up
if(target.hand) //left active hand
if(!target.equip_to_slot_if_possible(item_to_retrieve, SLOT_HUD_LEFT_HAND, FALSE, TRUE))
if(!target.equip_to_slot_if_possible(item_to_retrieve, SLOT_HUD_RIGHT_HAND, FALSE, TRUE))
if(!target.equip_to_slot_if_possible(item_to_retrieve, ITEM_SLOT_LEFT_HAND, FALSE, TRUE))
if(!target.equip_to_slot_if_possible(item_to_retrieve, ITEM_SLOT_RIGHT_HAND, FALSE, TRUE))
butterfingers = TRUE
else //right active hand
if(!target.equip_to_slot_if_possible(item_to_retrieve, SLOT_HUD_RIGHT_HAND, FALSE, TRUE))
if(!target.equip_to_slot_if_possible(item_to_retrieve, SLOT_HUD_LEFT_HAND, FALSE, TRUE))
if(!target.equip_to_slot_if_possible(item_to_retrieve, ITEM_SLOT_RIGHT_HAND, FALSE, TRUE))
if(!target.equip_to_slot_if_possible(item_to_retrieve, ITEM_SLOT_LEFT_HAND, FALSE, TRUE))
butterfingers = TRUE
if(butterfingers)
item_to_retrieve.loc = target.loc
+4 -4
View File
@@ -21,12 +21,12 @@
user.put_in_hands(attached_hand)
return
if(user.hand) //left active hand
if(!user.equip_to_slot_if_possible(attached_hand, SLOT_HUD_LEFT_HAND, FALSE, TRUE))
if(!user.equip_to_slot_if_possible(attached_hand, SLOT_HUD_RIGHT_HAND, FALSE, TRUE))
if(!user.equip_to_slot_if_possible(attached_hand, ITEM_SLOT_LEFT_HAND, FALSE, TRUE))
if(!user.equip_to_slot_if_possible(attached_hand, ITEM_SLOT_RIGHT_HAND, FALSE, TRUE))
hand_handled = 0
else //right active hand
if(!user.equip_to_slot_if_possible(attached_hand, SLOT_HUD_RIGHT_HAND, FALSE, TRUE))
if(!user.equip_to_slot_if_possible(attached_hand, SLOT_HUD_LEFT_HAND, FALSE, TRUE))
if(!user.equip_to_slot_if_possible(attached_hand, ITEM_SLOT_RIGHT_HAND, FALSE, TRUE))
if(!user.equip_to_slot_if_possible(attached_hand, ITEM_SLOT_LEFT_HAND, FALSE, TRUE))
hand_handled = 0
if(!hand_handled)
qdel(attached_hand)
+1 -1
View File
@@ -106,7 +106,7 @@
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes)
var/obj/item/clothing/glasses/glasses = H.get_item_by_slot(SLOT_HUD_GLASSES)
var/obj/item/clothing/glasses/glasses = H.get_item_by_slot(ITEM_SLOT_EYES)
if(eyes && HAS_TRAIT(H, TRAIT_COLORBLIND) && (!glasses || !glasses.correct_wires)) // Check if the human has colorblindness.
replace_colors = eyes.replace_colours // Get the colorblind replacement colors list.