Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows maintenance jack to be quick drawn #6275

Merged
merged 6 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
#define HTML_USE_INITAL_ICON (1<<18)
// Whether or not the object sees emotes
#define USES_SEEING (1<<19)
// Can be quick drawn
#define QUICK_DRAWABLE (1<<20)

//==========================================================================================

Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ DEFINE_BITFIELD(flags_atom, list(
"ATOM_DECORATED" = ATOM_DECORATED,
"USES_HEARING" = USES_HEARING,
"HTML_USE_INITAL_ICON" = HTML_USE_INITAL_ICON,
"QUICK_DRAWABLE" = QUICK_DRAWABLE,
))

DEFINE_BITFIELD(turf_flags, list(
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/tools/maintenance_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@
w_class = SIZE_LARGE
force = MELEE_FORCE_STRONG
flags_equip_slot = SLOT_SUIT_STORE
flags_atom = FPRINT|QUICK_DRAWABLE
pry_capable = IS_PRY_CAPABLE_FORCE //but not really
///Whether the Maintenance Jack is on crowbar or wrench mode
var/crowbar_mode = TRUE //False for wrench mode
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/weapons/weapon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name = "weapon"
icon = 'icons/obj/items/weapons/weapons.dmi'
hitsound = "swing_hit"
flags_atom = FPRINT|QUICK_DRAWABLE

/obj/item/get_examine_text(mob/user)
. = ..()
Expand Down
6 changes: 3 additions & 3 deletions code/modules/projectiles/gun_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -517,11 +517,11 @@ DEFINES in setup.dm, referenced here.
return FALSE

if(istype(slot) && (slot.storage_flags & STORAGE_ALLOW_QUICKDRAW))
for(var/obj/cycled_weapon in slot.return_inv())
if(isweapon(cycled_weapon))
for(var/obj/cycled_object in slot.return_inv())
if(cycled_object.flags_atom & QUICK_DRAWABLE)
return slot

if(isweapon(slot)) //then check for weapons
if(slot.flags_atom & QUICK_DRAWABLE)
return slot

return FALSE
Expand Down
Loading