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

refactor Item_factory::load(islot_ammo) to islot_ammo::load #39899

Merged
merged 2 commits into from
Apr 28, 2020

Conversation

KorGgenT
Copy link
Member

Summary

SUMMARY: Infrastructure "refactor Item_factory::load(islot_ammo) to islot_ammo::load"

Purpose of change

Item_factory was from a time before we had generic_factory. I would much rather us use that, as it really decreases maintenance because we don't have to figure item factory out from scratch.

This PR adds islot_ammo::load and utilizes that in item factory, even correctly loading copy-from items. This is the first in a long series of PRs to rework item factory to be itype::load() (and maybe also helper functions for the other stuff it's doing)

Describe alternatives you've considered

well, we could leave it i guess? there is the addage "if it ain't broke, don't fix it" but in this case i think the ease of maintenance will become quite useful as items gain more members.

Testing

loaded the game, made sure no debug messages popped up, checked out some ammo that utilizes copy-from and made sure its ammotype was correct.

Additional context

This is the first in a pretty long series of PRs that i expect will spread out far because it's not very high priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants