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

Explosion code refactor #15640

Merged
merged 6 commits into from Mar 6, 2016

Conversation

Projects
None yet
6 participants
@Coolthulhu
Copy link
Contributor

commented Mar 2, 2016

Changed the PR to be more general:

  • Moved the explosion code to new files: explosion.h and explosion.cpp
  • Explosion actor and explosion in fire now use the same structure, which can be loaded from a json with a single function
  • Added the ability of ammo to use its explosion data on ranged hit
  • Explosion structure contains the shrapnel data
  • Added game::explosion( tripoint, explosion_data ) - much cleaner than all those arguments. Changed the old explosion function to a be an overload of the 2 argument one.
@mugling

This comment has been minimized.

Copy link
Contributor

commented Mar 2, 2016

Nice. I was considering looking into the 40mm ammo and this PR should presumably make that much easier?

@Mshock777

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2016

So here's a little story. Back in the days when I was just starting to mess with Cata I made a PR #8727 where I rebalanced some explosives due to the fact that we don't have vehicle armour. If you are going to overhaul explosions you probably should look at how stats where before that PR.

@BevapDin

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2016

Maybe it's time to move the explosion code into a separate place (namespace? or make it a member of explosion_data).

With the additional parameters and return type from @mugling's shrapnel PR, the explosion function should accept a single parameter that contains all the explosion data (for example explosion_data). That would make adding more data to it much easier.

Maeyanie and others added some commits Mar 4, 2016

Typo fix
It was probably harmless, but caused a GCC warning.
Merge branch 'patch-1' of https://github.com/Maeyanie/Cataclysm-DDA i…
…nto custom-explosions

Conflicts:
	src/game.cpp

@Coolthulhu Coolthulhu changed the title [WiP]Custom explosions for items Explosion code refactor Mar 4, 2016

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Mar 4, 2016

the explosion function should accept a single parameter that contains all the explosion data (for example explosion_data).

Went this route.

explosion is still a game method, but now it can be invoked with just 2 arguments.

@kevingranade kevingranade merged commit e566e8a into CleverRaven:master Mar 6, 2016

1 check passed

default This has been rescheduled for testing as the 'master' branch has been updated.

@Coolthulhu Coolthulhu deleted the cataclysmbnteam:custom-explosions branch May 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.