diff --git a/code/__DEFINES/_flags/item_flags.dm b/code/__DEFINES/_flags/item_flags.dm index c6e60bf07ca..8235fa8c69a 100644 --- a/code/__DEFINES/_flags/item_flags.dm +++ b/code/__DEFINES/_flags/item_flags.dm @@ -40,6 +40,7 @@ DEFINE_BITFIELD(item_flags, list( BITFIELD(SURGICAL_TOOL), BITFIELD(IN_STORAGE), BITFIELD(ITEM_THROW_UNCATCHABLE), + BITFIELD(ITEM_NO_TOOL_ATTACK), )) //! Flags for the clothing_flags var on /obj/item diff --git a/code/__DEFINES/inventory/slots.dm b/code/__DEFINES/inventory/slots.dm index 0366a8c9dbd..d6a73c83146 100644 --- a/code/__DEFINES/inventory/slots.dm +++ b/code/__DEFINES/inventory/slots.dm @@ -29,6 +29,11 @@ /// use proc #define SLOT_EQUIP_CHECK_USE_PROC (1<<1) +DEFINE_BITFIELD(slot_equip_checks, list( + BITFIELD(SLOT_EQUIP_CHECK_USE_FLAGS), + BITFIELD(SLOT_EQUIP_CHECK_USE_PROC), +)) + //! slot meta inventory_slot_flags flags /// render on mob #define INV_SLOT_IS_RENDERED (1<<0) @@ -49,6 +54,18 @@ /// do not show on strip panel unless it's occupied by an item #define INV_SLOT_STRIP_ONLY_REMOVES (1<<8) +DEFINE_BITFIELD(inventory_slot_flags, list( + BITFIELD(INV_SLOT_IS_RENDERED), + BITFIELD(INV_SLOT_CONSIDERED_WORN), + BITFIELD(INV_SLOT_ALLOW_RANDOM_ID), + BITFIELD(INV_SLOT_IS_INVENTORY), + BITFIELD(INV_SLOT_HUD_REQUIRES_EXPAND), + BITFIELD(INV_SLOT_IS_ABSTRACT), + BITFIELD(INV_SLOT_IS_STRIPPABLE), + BITFIELD(INV_SLOT_STRIP_SIMPLE_LINK), + BITFIELD(INV_SLOT_STRIP_ONLY_REMOVES), +)) + //! slot flags // Item inventory slot bitmasks. #define SLOT_OCLOTHING (1<<0) @@ -73,6 +90,29 @@ // todo: this shouldn't be a slot flag wtf #define SLOT_HOLSTER (1<<15) +#define SLOT_FLAG_BITFIELDS list( \ + BITFIELD(SLOT_OCLOTHING), \ + BITFIELD(SLOT_ICLOTHING), \ + BITFIELD(SLOT_GLOVES), \ + BITFIELD(SLOT_EYES), \ + BITFIELD(SLOT_EARS), \ + BITFIELD(SLOT_MASK), \ + BITFIELD(SLOT_HEAD), \ + BITFIELD(SLOT_FEET), \ + BITFIELD(SLOT_ID), \ + BITFIELD(SLOT_BELT), \ + BITFIELD(SLOT_BACK), \ + BITFIELD(SLOT_POCKET), \ + BITFIELD(SLOT_DENYPOCKET), \ + BITFIELD(SLOT_TWOEARS), \ + BITFIELD(SLOT_TIE), \ + BITFIELD(SLOT_HOLSTER), \ +) + +DEFINE_BITFIELD(slot_flags, SLOT_FLAG_BITFIELDS) +DEFINE_BITFIELD(slot_flags_required, SLOT_FLAG_BITFIELDS) +DEFINE_BITFIELD(slot_flags_forbidden, SLOT_FLAG_BITFIELDS) + //! legacy /// Takes 40ds = 4s to strip someone. #define HUMAN_STRIP_DELAY 4 SECONDS diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index b9a8c4b4ba5..e4d9c5c59a6 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -228,7 +228,7 @@ playsound(src, W.tool_sound, 100, 1) user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.") - if(do_after(user, 40 * W.tool_speed)) + if(do_after(user, 40 * W.tool_speed) && state == 1) if(!src) return to_chat(user, "You cut the airlock wires.!") new/obj/item/stack/cable_coil(src.loc, 1) diff --git a/code/modules/mob/inventory/items.dm b/code/modules/mob/inventory/items.dm index 57acc7c3f6c..7a248630cb3 100644 --- a/code/modules/mob/inventory/items.dm +++ b/code/modules/mob/inventory/items.dm @@ -198,7 +198,7 @@ * checks if we need something to attach to in a certain slot */ /obj/item/proc/equip_check_beltlink(mob/M, slot, mob/user, flags) - if(item_flags & EQUIP_IGNORE_BELTLINK) + if(clothing_flags & EQUIP_IGNORE_BELTLINK) return TRUE if(!ishuman(M)) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 6077f4a4fd6..d3750a813b3 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -5,14 +5,15 @@ if(machine && !CanMouseDrop(machine, src)) machine = null - handle_regular_hud_updates() - handle_vision() - handle_light() - if(handle_regular_UI_updates()) // Status & health update, are we dead or alive etc. handle_disabilities() // eye, ear, brain damages handle_statuses() //all special effects, stunned, weakened, jitteryness, hallucination, sleeping, etc + handle_regular_hud_updates() + + handle_vision() + handle_light() + handle_actions() update_canmove() diff --git a/code/modules/organs/external/_external_icons.dm b/code/modules/organs/external/_external_icons.dm index 60d9c999d11..ff134a35f23 100644 --- a/code/modules/organs/external/_external_icons.dm +++ b/code/modules/organs/external/_external_icons.dm @@ -1,4 +1,4 @@ -var/global/list/limb_icon_cache = list() +GLOBAL_LIST_EMPTY(limb_icon_cache) /obj/item/organ/external/proc/compile_icon() cut_overlays() @@ -189,11 +189,11 @@ var/global/list/limb_icon_cache = list() if(body_hair && islist(h_col) && h_col.len >= 3) var/cache_key = "[body_hair]-[icon_name]-[h_col[1]][h_col[2]][h_col[3]]" - if(!limb_icon_cache[cache_key]) + if(!GLOB.limb_icon_cache[cache_key]) var/icon/I = icon(species.get_icobase(owner), "[icon_name]_[body_hair]") I.Blend(rgb(h_col[1],h_col[2],h_col[3]), ICON_MULTIPLY) - limb_icon_cache[cache_key] = I - mob_icon.Blend(limb_icon_cache[cache_key], ICON_OVERLAY) + GLOB.limb_icon_cache[cache_key] = I + mob_icon.Blend(GLOB.limb_icon_cache[cache_key], ICON_OVERLAY) if(model) icon_cache_key += "_model_[model]" @@ -209,11 +209,11 @@ var/global/list/limb_icon_cache = list() if(body_hair && islist(h_col) && h_col.len >= 3) var/cache_key = "[body_hair]-[icon_name]-[h_col[1]][h_col[2]][h_col[3]]" - if(!limb_icon_cache[cache_key]) + if(!GLOB.limb_icon_cache[cache_key]) var/icon/I = icon(species.get_icobase(owner), "[icon_name]_[body_hair]") I.Blend(rgb(h_col[1],h_col[2],h_col[3]), ICON_MULTIPLY) - limb_icon_cache[cache_key] = I - mob_icon.Blend(limb_icon_cache[cache_key], ICON_OVERLAY) + GLOB.limb_icon_cache[cache_key] = I + mob_icon.Blend(GLOB.limb_icon_cache[cache_key], ICON_OVERLAY) dir = EAST icon = mob_icon @@ -280,9 +280,9 @@ var/list/robot_hud_colours = list("#CFCFCF","#AFAFAF","#8F8F8F","#6F6F6F","#4F4F // This looks convoluted, but it's this way to avoid icon proc calls. if(!hud_damage_image) var/cache_key = "dambase-[icon_cache_key]" - if(!icon_cache_key || !limb_icon_cache[cache_key]) - limb_icon_cache[cache_key] = icon(get_icon(), null, SOUTH) - var/image/temp = image(limb_icon_cache[cache_key]) + if(!icon_cache_key || !GLOB.limb_icon_cache[cache_key]) + GLOB.limb_icon_cache[cache_key] = icon(get_icon(), null, SOUTH) + var/image/temp = image(GLOB.limb_icon_cache[cache_key]) if((robotic < ORGAN_ROBOT) && species) // Calculate the required colour matrix. var/r = 0.30 * species.health_hud_intensity diff --git a/code/modules/organs/external/species/diona.dm b/code/modules/organs/external/species/diona.dm index f647ad81eec..67d7aca36c1 100644 --- a/code/modules/organs/external/species/diona.dm +++ b/code/modules/organs/external/species/diona.dm @@ -36,7 +36,7 @@ vital = TRUE cannot_amputate = TRUE parent_organ = null - gendered_icon = TRUE + gendered_icon = FALSE /obj/item/organ/external/diona/groin name = "fork" @@ -47,7 +47,7 @@ w_class = ITEMSIZE_LARGE body_part = LOWER_TORSO parent_organ = BP_TORSO - gendered_icon = TRUE + gendered_icon = FALSE /obj/item/organ/external/diona/arm name = "left upper tendril"