[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
@@ -11,7 +11,7 @@
item_state = "crusher0"
force = 0 //You can't hit stuff unless wielded
w_class = WEIGHT_CLASS_BULKY
slot_flags = SLOT_FLAG_BACK
slot_flags = ITEM_SLOT_BACK
throwforce = 5
throw_speed = 4
armour_penetration_flat = 10
@@ -7,7 +7,7 @@
item_state = "analyzer"
w_class = WEIGHT_CLASS_SMALL
flags = CONDUCT
slot_flags = SLOT_FLAG_BELT
slot_flags = ITEM_SLOT_BELT
var/cooldown = 35
var/current_cooldown = 0
@@ -37,7 +37,7 @@
item_state = "analyzer"
w_class = WEIGHT_CLASS_SMALL
flags = CONDUCT
slot_flags = SLOT_FLAG_BELT
slot_flags = ITEM_SLOT_BELT
var/cooldown = 35
var/current_cooldown = 0
var/range = 7
@@ -5,7 +5,7 @@
icon = 'icons/obj/mining_tool.dmi'
icon_state = "pickaxe"
flags = CONDUCT
slot_flags = SLOT_FLAG_BELT
slot_flags = ITEM_SLOT_BELT
force = 15
throwforce = 10
item_state = "pickaxe"
@@ -130,7 +130,7 @@
icon = 'icons/obj/mining_tool.dmi'
icon_state = "shovel"
flags = CONDUCT
slot_flags = SLOT_FLAG_BELT
slot_flags = ITEM_SLOT_BELT
force = 8
throwforce = 4
item_state = "shovel"
@@ -12,7 +12,7 @@ GLOBAL_LIST_EMPTY(wormhole_effect)
throw_speed = 3
throw_range = 5
origin_tech = "bluespace=2"
slot_flags = SLOT_FLAG_BELT
slot_flags = ITEM_SLOT_BELT
/obj/item/wormhole_jaunter/attack_self(mob/user)
user.visible_message("<span class='notice'>[user.name] activates the [name]!</span>")
@@ -55,7 +55,7 @@ GLOBAL_LIST_EMPTY(wormhole_effect)
qdel(src)
/obj/item/wormhole_jaunter/proc/chasm_react(mob/user)
if(user.get_item_by_slot(SLOT_HUD_BELT) == src)
if(user.get_item_by_slot(ITEM_SLOT_BELT) == src)
to_chat(user, "Your [name] activates, saving you from the chasm!</span>")
activate(user, FALSE)
else
+1 -1
View File
@@ -66,7 +66,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
to_chat(user, "<span class='notice'>You start attaching the pack to [A]...</span>")
if(do_after(user, 50, target = A))
to_chat(user, "<span class='notice'>You attach the pack to [A] and activate it.</span>")
user.equip_to_slot_if_possible(src, SLOT_HUD_IN_BACKPACK, FALSE, TRUE)
user.equip_to_slot_if_possible(src, ITEM_SLOT_IN_BACKPACK, FALSE, TRUE)
uses_left--
if(uses_left <= 0)
user.drop_item(src)
@@ -252,7 +252,7 @@
lefthand_file = 'icons/mob/inhands/staves_lefthand.dmi'
righthand_file = 'icons/mob/inhands/staves_righthand.dmi'
item_state = "lavastaff"
slot_flags = SLOT_FLAG_BACK
slot_flags = ITEM_SLOT_BACK
w_class = WEIGHT_CLASS_BULKY
force = 25
damtype = BURN
@@ -10,7 +10,7 @@
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
inhand_x_dimension = 64
inhand_y_dimension = 64
slot_flags = SLOT_FLAG_BACK
slot_flags = ITEM_SLOT_BACK
w_class = WEIGHT_CLASS_BULKY
force = 15
attack_verb = list("clubbed", "beat", "pummeled")
@@ -6,7 +6,7 @@
righthand_file = 'icons/mob/inhands/staves_righthand.dmi'
item_state = "staffofstorms"
icon = 'icons/obj/guns/magic.dmi'
slot_flags = SLOT_FLAG_BACK
slot_flags = ITEM_SLOT_BACK
w_class = WEIGHT_CLASS_BULKY
force = 25
damtype = BURN
@@ -96,7 +96,7 @@
// This early return stops the staff from shooting lightning at someone when being used as a lighter.
if(iscarbon(target))
var/mob/living/carbon/cig_haver = target
var/mask_item = cig_haver.get_item_by_slot(SLOT_HUD_WEAR_MASK)
var/mask_item = cig_haver.get_item_by_slot(ITEM_SLOT_MASK)
if(istype(mask_item, /obj/item/clothing/mask/cigarette) && user.zone_selected == "mouth" && user.a_intent == INTENT_HELP)
return
@@ -18,7 +18,7 @@
desc = "Somehow, it's in two places at once."
icon = 'icons/obj/storage.dmi'
icon_state = "cultpack"
slot_flags = SLOT_FLAG_BACK
slot_flags = ITEM_SLOT_BACK
resistance_flags = INDESTRUCTIBLE
var/obj/item/storage/backpack/shared/bag