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

Landmines use old explosives code. #37724

Closed
Brian-Otten opened this issue Feb 5, 2020 · 3 comments
Closed

Landmines use old explosives code. #37724

Brian-Otten opened this issue Feb 5, 2020 · 3 comments
Labels
Items / Item Actions / Item Qualities Items and how they work and interact stale Closed for lack of activity, but still valid.

Comments

@Brian-Otten
Copy link
Contributor

Describe the bug

Landmines still use old explosion code which makes them not behave as the player might expect
in data/json/traps.json, line 363 and 377
"vehicle_data": { "do_explosion": true, "damage": 1000, "shrapnel": 8, "sound_volume": 10 }

Expected behavior

Game handles landmines like it does the other explosives. example:

"vehicle_data": { "do_explosion": true, "explosion": { "power": 240, "shrapnel": { "casing_mass": 217, "fragment_mass": 0.15 } }

The exact values are less important since i will be reworking landmine components/crafting in the near future, but should be similar to the hand grenade.

Additional context

I tried implementing myself but it doesn't expect the explosion code in that json and i have no idea how to make it work.

@Night-Pryanik Night-Pryanik added the Items / Item Actions / Item Qualities Items and how they work and interact label Feb 5, 2020
@CountAlex
Copy link
Contributor

I believe you should check function trapfunc::landmine() at src/trapfunc.cpp:L605
It clearly uses same explosion() function but uses preset values so I think that landmine probably does not use JSON set values at all.

@stale
Copy link

stale bot commented Mar 6, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Mar 6, 2020
@stale
Copy link

stale bot commented Apr 5, 2020

This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it

@stale stale bot closed this as completed Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Items / Item Actions / Item Qualities Items and how they work and interact stale Closed for lack of activity, but still valid.
Projects
None yet
Development

No branches or pull requests

3 participants