Spawn triggered bear trap only after creature escapes from it #76312
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Bugfixes "Spawn triggered bear trap only after creature escapes from it"
Purpose of change
Closes #64587.
Describe the solution
Spawn triggered bear trap only after creature escapes from it, not after trap's trigger. This forbids picking up and other means of interacting with triggered trap until you're freed from it.
Describe alternatives you've considered
Convert bear trap into an "armor" which will be forcefully worn on affected limb (like a splint) on trigger, and be very hard to remove, and may even lead to a removal of a limb, as stated in comments:
Cataclysm-DDA/src/character_escape.cpp
Lines 89 to 91 in bbf0077
This is a preferred solution, but obviously it would require much more work to implement it properly.
Testing
Got caught in a trap. No trap (both as a trap and as as item) on the ground. Tried to free. After escape, triggered bear trap is spawned on character's location.
Additional context
None.