Xenomorph attack click refactor

Changelog

🆑 Vanagandr

rscadd: Refactors xenomorph attack click delay behaviour. Xeno attacks now count as a full-delay XENO_ATTACK_ACTION, 0.4 second XENO_NONCOMBAT_ACTION, zero delay XENO_NO_DELAY_ACTION, or half-delay. Error messages have no delay. This does mean 'You can't do that!'-type messages are spammable, but only the user can see those.

rscadd: A missed xeno melee attempt now has a half-delay and audio-visual feedback, plus a message. Should make the true causes of 'eaten clicks' more apparent.

rscdel: Xenos can no longer click tiles to attack mobs in them. The functionality still exists but is now accessed indirectly through directional attacks and the next change. Weeds & blood etc. often blocked this anyway.

tweak: As a xeno, clicking your own sprite now attacks the tile underneath the mouse pointer. This means that you will no longer miss otherwise-viable attacks because your own dummy thicc sprite got in the way.

tweak: If conducting a tile attack where you and a prone enemy are on the same tile, it will now attempt to target the enemy rather than the standing mob (you).

rscdel: Nibbling allied xenos removed: no attack delay for harm-intent clicking them.

bugfix: Timed xeno actions (as distinguished from ability actions) such as tipping vending machines etc. now apply delays when they start, rather than when they finish.

tweak: Attack delay for missing a directional attack is now 0.25 seconds, down from (usually) 1 second.

tweak: Directional attacks now calculate angles more precisely, so your mouse doesn't need to be perfectly lined up to attack in a cardinal direction.

tweak: The non-help intent self-harm preference toggle doesn't apply to xenomorphs anymore, as they can't do anything to themselves unless someone someday gives them weapon items. This prevents the toggle from messing you up when you click your own sprite while trying to attack someone.

tweak: Changed the layer of the residue left by an abandoned ovipositor so that it's above weeds and weed nodes.

rscadd: Added xeno attack animation to slashing resin, resin nests, dropship chairs, claymores, broken powerloader wreckage, discarded ovipositor object, empty eggs, resin fruits, tipping vending machines.

tweak: Only attacks on mobs add to xeno slash stats. Previously all xeno clicks did, making it a useless statistic.

tweak: Xenos no longer need to be on harm intent to open lockers.

tweak: Xeno snow clearing must be done on disarm or grab intents, as harm intent counts as a missed slash and help intent does nothing.

tweak: Clicking resin structures (spikes, sticky resin etc.) on help intent applies no delays.

/🆑

Details

Xenomorph unarmedattack now passes click params.

Example of weird delay behaviour: clicking vending machine to tip it over. 1: click, 0.4 second delay, unarmedattack starts. Xeno unarmedattack applies its delay when it finishes. Vending machine tip code has a do_after. This means you have a 0.4 second delay, then a wait while the machine tips, then after you tip it you get a one second xeno attack delay.

There were some unnecessary overrides.

Ideally there'd be a system to limit message spam that doesn't go through click delay.

Not 100% certain about the missed slash sfx, made it quiet but it might still be annoying.

Closes endless frustration for beno mains.

Edited by Vanagandr

Merge request reports

Loading
Loading