Item click delay revision.

Changelog

🆑 Vanagandr

tweak: Removed attack_speed delay when clicking one item with another when in storage (backpacks pouches etc.). Delay varied based on attacking item.

tweak: Reduced delay when putting items on tables/racks. Delay varied based on item, is now 0.2 seconds.

tweak: Removed extra delay when picking up an item not in first-layer inventory (in backpack, on table, on floor etc.). Total delay was 0.6 seconds, is now 0.2. The pickup verb 0.8 second delay was not changed.

tweak: Removed extra delay when clicking things in inventory with an open hand. If an item in pocket, clothing, opening a pouch etc. total delay was 0.05 seconds, now 0; if drawing item from fast-draw toggled pouches etc. total delay was 0.25 seconds, is now 0.2.

bugfix: Clicking the inventory spacers in slotless storage items (satchels, backpacks, some boxes) now behaves exactly the same as clicking the item sprites directly. With the item-removal click delays now 0.2s across the board, the main effect of this is that you can't pull things (M15...) out of your satchel while resting or in a xeno stomach.

bugfix: Can't attempt to throw stuff at objects inside storage items anymore.

bugfix: Updated mob/../carbon attackhand to add the attack delay to the attacker rather than the victim. Originally they all had this code but humans and xenos were updated to their current state while /carbon was left unchanged. Being punched/disarmed should no longer add action delay to you. Note that this is for human -> human or human -> xeno attacks with an open hand; this had nothing to do with xeno -> human attacks.

/🆑

Details

Clicking an item directly inside a storage item has a 6 decisecond delay (4 for attack_adjacenting an item not in first-layer inventory, 2 for attack_handing an item not in first-layer inventory).

Meanwhile, clicking the space-filling storage box in slotless inventory (satchel etc.) has a 2 decisecond delay because it calls attack_hand directly.

Further, there's a number of bugs with clicking inventory boxes while resting, devoured by a xeno, nested storage etc. because it goes through clicked() instead of the usual do_click and attackhand checks.

The first commit brings their behaviour in line with that of clicking the item directly, and fixes those bugs. Though admittedly the only item still capable of that nested storage bug is bodybag boxes.

A number of checks seem aimed at speeding up inventory clicks, but of course items in storage don't qualify for loc == user.

Using E to equip items or hotkeys to swap hands don't add action delay, so I removed it from clicking the corresponding inventory buttons as well.

Strictly speaking I also removed the human and xeno attackhand action delay overrides now that the /carbon one is fixed, but wasn't sure how to word that in a changelog without giving the wrong impression.

Closes

Edited by Vanagandr

Merge request reports

Loading
Loading