Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and jsonize item dropping and trap conversion in trap-vehicle interaction #33459

Merged
merged 7 commits into from
Aug 25, 2019

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented Aug 22, 2019

Summary

SUMMARY: Bugfixes "Fix bugs in trap-vehicle interaction"

Purpose of change

  1. Fix some traps (such as bear traps) duplicating when run over by vehicles.
  2. Fix known traps forgotten after being run over and converted to other traps (such as tr_shotgun_2 converted to tr_shotgun_1).
  3. Make traps known to the player if seen in action during trap-vehicle interaction.
  4. Fix double-barrel shotgun trap turning into single-barrel shotgun trap when run over by vehicles.
  5. Vehicles now trigger traps when running into them, instead of running off, to be consistent with player-trap interaction.
  6. Jsonize item dropping and trap conversion in trap-vehicle interaction.

Describe the solution

1 is fixed with json modification.
4 is fixed by adding a new "tr_shotgun_2_1" trap type as the half-fired double-barrel shotgun trap.
5 is fixed by handling trap-vehicle interaction after moving vehicles.

Additional context

There are some inconsistencies between trap-vehicle interaction and player-trap interaction (such as those of shotgun traps), but that's out of the reach of this PR.

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Vehicles Vehicles, parts, mechanics & interactions labels Aug 22, 2019
@ZhilkinSerg ZhilkinSerg self-assigned this Aug 24, 2019
data/json/traps.json Outdated Show resolved Hide resolved
data/json/traps.json Outdated Show resolved Hide resolved
data/json/traps.json Outdated Show resolved Hide resolved
data/json/traps.json Outdated Show resolved Hide resolved
data/json/traps.json Outdated Show resolved Hide resolved
@ZhilkinSerg ZhilkinSerg removed their assignment Aug 24, 2019
Qrox and others added 2 commits August 25, 2019 10:09
# Conflicts:
#	gfx/RetroDaysTileset/tile_config.json
@ZhilkinSerg ZhilkinSerg merged commit ab9996b into CleverRaven:master Aug 25, 2019
@Qrox Qrox deleted the trap-vehicle-runover branch August 29, 2019 01:26
misterprimus pushed a commit to misterprimus/Cataclysm-DDA that referenced this pull request Sep 21, 2019
…eraction (CleverRaven#33459)

* JSONize trap-vehicle run-over drops and trap conversions

Also fix item duplication when traps are run over by vehicles

* Keep known traps known, and make seen traps in action known

* Fix double barrel shotgun trap turning into single barrel shotgun trap when run over by vehicles

* Fix vehicle triggering traps when moving off them

* Update gfx configs

* Apply suggestions from code review

Co-Authored-By: ZhilkinSerg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. [JSON] Changes (can be) made in JSON Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants