Closed chaosvolt closed 2 years ago
This exact bug is Cata++ problem, but it would happen in vanilla as well: bionic claws and monomolecular blade do not have the no-drop flag, so the only thing preventing them from existing as standalone items is that they can't be dropped in most ways.
That's what I was asking about, can it be induced in vanilla? I'm fairly certain you can install them on an NPC via an autodoc?
Not sure, but I think a dying player character will do the same thing, meaning it's still replicable.
Nice. So adding NO_DROP to the item should suffice? If I get the chance to test it today while I'm out, might be able to PR a fix for it then.
Good news from my findings, adding NO_DROP
seems to work as expected without messing with bionic weapon behavior, for both bionic melee weapons and bionic ranged weapons.
However, bionic ranged weapons still act up a bit in other ways when given to NPCs. They seem to treat them like bionic melee weapons, wielding them when activated. This draws up the placeholder sprite it's given (at least in UDP) when it's not shown for players firing it, suggesting that it's being called up in a different manner when NPCs use it.
They then don't even seem to properly unwield it, or at least I've yet to cajole one into unwielding it, and they'll just shoot the player with it constantly. Soon as I stepped within a few tiles of the test NPC he killed me with a single dozen-round burst. Goading another such NPC into trying the same jackass stunt and killing him before he could fire had the wielded pseudoitem correctly vanish on death, as mentioned above.
So based off this I'd likely:
NO_DROP
to all bionic weapons, including the ranged ones just in case, but also remove BIONIC_NPC_USABLE
from the ranged bionics until that behavior is fixed. That should (I think?) prevent players from autodoc'ing the offending bionics onto an NPC, which should be the only Side note, I finally decided to test if you can install bionics on NPCs via an autodoc. Get a companion NPC, get them standing on an autodoc couch, examine it with the stuff needed to install...
You can indeed install bionics onto NPCs, though looks like it's more along the lines of forcing the NPC to self-install:
Next I'm going to make sure that removing the flag for NPC use is what actually controls if you can install it on an NPC or not.
EDIT: Yep, removing that flag will prevent installation:
Follow-up: it seems that bionic melee weapons still cleanup properly in the case of players dropping them on death, even without NO_DROP
. I don't know if this means if:
Just in case I'll still go through with using NO_DROP
so that cleanup will happen correctly if other things break in the future.
Describe the bug
If an NPC is set to use a weapon bionic, for example Chain Lightning, and are killed while it's active, they'll drop the otherwise unobtainable bionic weapon on death. Since these item have the
NO_UNWIELD
flags, picking them up and wielding them is also a Bad Idea.Steps To Reproduce
Expected behavior
Either:
Screenshots
Versions and configuration
Additional context
I'm not sure if this even shows up in vanilla. The only NPC to start with bionics is the prototype cyborg if I recall, who has fingertip razors instead. Can you install CBMs on NPCs via an autodoc?