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 all 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
4 changes: 2 additions & 2 deletions code/game/objects/items/weapons/blades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
desc = "A dusty sword commonly seen in historical museums. Where you got this is a mystery, for sure. Only a mercenary would be nuts enough to carry one of these. Sharpened to deal massive damage."
icon_state = "mercsword"
item_state = "machete"
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
flags_equip_slot = SLOT_WAIST
force = MELEE_FORCE_STRONG
throwforce = MELEE_FORCE_WEAK
Expand Down Expand Up @@ -114,7 +114,7 @@
icon_state = "throwing_knife"
item_state = "combat_knife"
desc = "A military knife designed to be thrown at the enemy. Much quieter than a firearm, but requires a steady hand to be used optimally, although you should probably just use a gun instead."
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
sharp = IS_SHARP_ITEM_ACCURATE
force = MELEE_FORCE_TIER_1
w_class = SIZE_SMALL
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/weapons/energy.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/obj/item/weapon/energy
var/active = 0
flags_atom = FPRINT|NOBLOODY
flags_atom = FPRINT|QUICK_DRAWABLE|NOBLOODY

/obj/item/weapon/energy/axe
name = "energy axe"
Expand All @@ -11,7 +11,7 @@
throw_speed = SPEED_FAST
throw_range = 5
w_class = SIZE_MEDIUM
flags_atom = FPRINT|CONDUCT|NOBLOODY
flags_atom = FPRINT|CONDUCT|QUICK_DRAWABLE|NOBLOODY
flags_item = NOSHIELD

attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
Expand Down Expand Up @@ -47,7 +47,7 @@
throw_speed = SPEED_FAST
throw_range = 5
w_class = SIZE_SMALL
flags_atom = FPRINT|NOBLOODY
flags_atom = FPRINT|QUICK_DRAWABLE|NOBLOODY
flags_item = NOSHIELD

attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
desc = "A tool used by great men to placate the frothing masses."
icon_state = "chain"
item_state = "chain"
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
flags_equip_slot = SLOT_WAIST
force = MELEE_FORCE_WEAK
throwforce = MELEE_FORCE_WEAK
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/shields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
desc = "A shield capable of stopping most projectile and melee attacks. It can be retracted, expanded, and stored anywhere."
icon = 'icons/obj/items/weapons/weapons.dmi'
icon_state = "eshield0" // eshield1 for expanded
flags_atom = FPRINT|CONDUCT|NOBLOODY
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT|NOBLOODY
force = 3
passive_block = 50 // Shield activation takes over functionality, and no slowdown.
readied_block = 50
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/weapons/twohanded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
edge = 1
w_class = SIZE_LARGE
flags_equip_slot = SLOT_BACK
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
flags_item = TWOHANDED
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")

Expand Down Expand Up @@ -161,7 +161,7 @@
edge = 0
w_class = SIZE_LARGE
flags_equip_slot = SLOT_BACK
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
flags_item = TWOHANDED
attack_verb = list("smashed", "beaten", "slammed", "struck", "smashed", "battered", "cracked")

Expand All @@ -188,7 +188,7 @@
force_wielded = 75
wieldsound = 'sound/weapons/saberon.ogg'
unwieldsound = 'sound/weapons/saberoff.ogg'
flags_atom = FPRINT|NOBLOODY
flags_atom = FPRINT|QUICK_DRAWABLE|NOBLOODY
flags_item = NOSHIELD|TWOHANDED

attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
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
4 changes: 2 additions & 2 deletions code/game/objects/items/weapons/weaponry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit."
icon_state = "wiredrod"
item_state = "rods"
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
force = MELEE_FORCE_WEAK
throwforce = MELEE_FORCE_WEAK
w_class = SIZE_MEDIUM
Expand Down Expand Up @@ -175,7 +175,7 @@
<p>Katanas are thrice as sharp as European swords and thrice as hard for that matter too. Anything a longsword can cut through, a katana can cut through better. I'm pretty sure a katana could easily bisect a knight wearing full plate with a simple vertical slash.</p>\
<p>Ever wonder why medieval Europe never bothered conquering Japan? That's right, they were too scared to fight the disciplined Samurai and their katanas of destruction. Even in World War II, American soldiers targeted the men with the katanas first because their killing power was feared and respected.</p>"
icon_state = "katana"
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
force = 4444
throwforce = MELEE_FORCE_VERY_STRONG
sharp = IS_SHARP_ITEM_BIG
Expand Down
14 changes: 7 additions & 7 deletions code/modules/cm_preds/yaut_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
desc = "A segmented, lightweight whip made of durable, acid-resistant metal. Not very common among Yautja Hunters, but still a dangerous weapon capable of shredding prey."
icon_state = "whip"
item_state = "whip"
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
flags_item = ITEM_PREDATOR
flags_equip_slot = SLOT_WAIST
embeddable = FALSE
Expand All @@ -172,7 +172,7 @@
name = "clan sword"
desc = "An expertly crafted Yautja blade carried by hunters who wish to fight up close. Razor sharp and capable of cutting flesh into ribbons. Commonly carried by aggressive and lethal hunters."
icon_state = "clansword"
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
flags_item = ITEM_PREDATOR
flags_equip_slot = SLOT_BACK
force = MELEE_FORCE_TIER_7
Expand All @@ -197,7 +197,7 @@
desc = "A huge, incredibly sharp dual blade used for hunting dangerous prey. This weapon is commonly carried by Yautja who wish to disable and slice apart their foes."
icon_state = "predscythe"
item_state = "scythe_dual"
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
flags_item = ITEM_PREDATOR
flags_equip_slot = SLOT_WAIST
force = MELEE_FORCE_TIER_6
Expand Down Expand Up @@ -234,7 +234,7 @@
name = "combi-stick"
desc = "A compact yet deadly personal weapon. Can be concealed when folded. Functions well as a throwing weapon or defensive tool. A common sight in Yautja packs due to its versatility."
icon_state = "combistick"
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
flags_equip_slot = SLOT_BACK
flags_item = TWOHANDED|ITEM_PREDATOR
w_class = SIZE_LARGE
Expand Down Expand Up @@ -475,7 +475,7 @@
desc = "A viciously sharp dagger inscribed with ancient Yautja markings. Smells thickly of blood. Carried by some hunters."
icon_state = "predknife"
item_state = "knife"
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
flags_item = ITEM_PREDATOR|CAN_DIG_SHRAPNEL
flags_equip_slot = SLOT_STORE
sharp = IS_SHARP_ITEM_ACCURATE
Expand Down Expand Up @@ -759,7 +759,7 @@
throwforce = MELEE_FORCE_TIER_3
embeddable = FALSE //so predators don't lose their glaive when thrown.
sharp = IS_SHARP_ITEM_BIG
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
attack_verb = list("sliced", "slashed", "carved", "diced", "gored")
attack_speed = 14 //Default is 7.

Expand Down Expand Up @@ -1132,7 +1132,7 @@
w_class = SIZE_HUGE
force = 0
fire_delay = 3
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
flags_item = NOBLUDGEON|DELONDROP|IGNITING_ITEM //Can't bludgeon with this.
flags_gun_features = GUN_UNUSUAL_DESIGN
has_empty_icon = 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 @@ -23,7 +23,7 @@
WEAR_L_HAND = 'icons/mob/humans/onmob/items_lefthand_1.dmi',
WEAR_R_HAND = 'icons/mob/humans/onmob/items_righthand_1.dmi'
)
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
flags_item = TWOHANDED
light_system = DIRECTIONAL_LIGHT

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
2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/revolvers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@
desc = "Used to swap the barrels of a mateba revolver."
icon = 'icons/obj/items/items.dmi'
icon_state = "matebakey"
flags_atom = FPRINT|CONDUCT
flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT
force = 5
w_class = SIZE_TINY
throwforce = 5
Expand Down
Loading