Skip to content

Commit

Permalink
Iteration VII
Browse files Browse the repository at this point in the history
Thanks Dan, appreciate the mentoring!
  • Loading branch information
OverDriveZ committed Oct 10, 2023
1 parent 79a1e93 commit fa5a7e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
8 changes: 1 addition & 7 deletions code/modules/mob/inventory.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//This variable is needed in order to remember the origin of the storage of an item.
// GLOBAL_VAR_INIT(quick_equip_memory_item, 0)
// GLOBAL_VAR_INIT(quick_equip_memory_origin, 0)
GLOBAL_VAR_INIT(quick_equip_cowboy_delay_negation, 0)
//These procs handle putting s tuff in your hands
//as they handle all relevant stuff like adding it to the player's screen and updating their overlays.

Expand Down Expand Up @@ -518,10 +514,8 @@ GLOBAL_VAR_INIT(quick_equip_cowboy_delay_negation, 0)
firearm = F
break
if(firearm && !firearm.on_found(src))
GLOB.quick_equip_cowboy_delay_negation = 1
firearm.allow_quickdraw = TRUE
firearm.attack_hand(src) //Slap my hands with the contents of this storage, which is allegedly only one item.
spawn(1) //it's not needed, but let's wait for the system to actually process the firedelay.
GLOB.quick_equip_cowboy_delay_negation = 0
return
storage = get_item_by_slot(SLOT_SHOES) //Shoes are a little different, we don't want to return the item itself, but rather its contents.
if(storage) //Are we carrying something in this storage slot?
Expand Down
5 changes: 4 additions & 1 deletion code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ ATTACHMENTS
var/use_casing_sounds
/// Is one of Kelp's wands?
var/is_kelpwand = FALSE
/// Allow quickdraw (delay to draw the gun is 0s)
var/allow_quickdraw = FALSE
/// Cooldown between times the gun will tell you it shot, 0.5 seconds cus its not super duper important
COOLDOWN_DECLARE(shoot_message_antispam)

Expand Down Expand Up @@ -876,7 +878,8 @@ ATTACHMENTS
/obj/item/gun/proc/weapondraw(obj/item/gun/G, mob/living/user) // Eventually, this will be /obj/item/weapon and guns will be /obj/item/weapon/gun/etc. SOON.tm
user.visible_message(span_danger("[user] grabs \a [G]!")) // probably could code in differences as to where you're picking it up from and so forth. later.
var/time_till_gun_is_ready = max(draw_time,(user.AmountWeaponDrawDelay()))
if(GLOB.quick_equip_cowboy_delay_negation)
if(allow_quickdraw)
allow_quickdraw = FALSE
time_till_gun_is_ready = 0
user.SetWeaponDrawDelay(time_till_gun_is_ready)
if(safety && user.a_intent == INTENT_HARM)
Expand Down

0 comments on commit fa5a7e1

Please sign in to comment.