Skip to content

Commit

Permalink
Fixes guns slowing down while worn on a belt (#11976)
Browse files Browse the repository at this point in the history
* no worn slowdown

* Update code/modules/mob/living/carbon/human/inventory.dm
  • Loading branch information
PowerfulBacon authored Dec 9, 2024
1 parent e41354b commit ca1c8fc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions code/__DEFINES/obj_flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#define ISWEAPON (1<<15) //! If this item should hit living mobs when used on harm intent
#define EXAMINE_SKIP (1<<16) //! Examine will not read out this item
#define ISCARVABLE (1<<17) //! Examine will not read out this item
#define NO_WORN_SLOWDOWN (1<<18) //! Doesn't slow you down while worn, which is only useful in combination with SLOWS_WHILE_IN_HAND

// Flags for the clothing_flags var on /obj/item/clothing

Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/human/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@
. = ..()
for(var/sloties in get_all_slots() - list(l_store, r_store, s_store))
var/obj/item/thing = sloties
if (thing?.item_flags & NO_WORN_SLOWDOWN)
continue
. += thing?.slowdown

/mob/living/carbon/human/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, was_thrown = FALSE, silent = FALSE)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
worn_icon_state = "gun"
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BELT
item_flags = SLOWS_WHILE_IN_HAND
item_flags = SLOWS_WHILE_IN_HAND | NO_WORN_SLOWDOWN
custom_materials = list(/datum/material/iron=2000)
w_class = WEIGHT_CLASS_LARGE
throwforce = 5
Expand Down

0 comments on commit ca1c8fc

Please sign in to comment.