legobmw99 / Allomancy

Brandon Sanderson's Allomancy, now in Minecraft
https://minecraft.curseforge.com/projects/allomancy
GNU General Public License v3.0
23 stars 18 forks source link

[Feature Request] Make Lerasium registered under the Metal type #77

Closed GitCat3 closed 1 year ago

GitCat3 commented 1 year ago

This would make it a lot easier to use Lerasium from other mods when using this as a dependency, so I think it would be a good addition for the coders.

legobmw99 commented 1 year ago

Currently the metal type is only contains the metals used as powers in the mod. For example, silver and lead also are not included. In what way would adding lerasium to the enum be useful for other mods?

GitCat3 commented 1 year ago

For example if you look at the way the hemalurgy mod works it uses the enum to register the items, but Lerasium spikes did exist in the books

legobmw99 commented 1 year ago

Yeah, Allomancy uses the enum to add items as well, but also has to add some items manually after that.

The reason I'm resistant to adding another metal to the enum is that it is generally easier to work with things that aren't in the enum than it is to skip things which are. For example, if I added Lerasium to the Metal enum and made no other changes, it would start showing on the power selection wheel and would try to make an ore for it.

GitCat3 commented 1 year ago

I already got it to skip lerasium when making a flake and a banner, I just need to figure out how to make it skip making a power, and I was wondering if you could point me to the correct file.

legobmw99 commented 1 year ago

That would be split across a few files, some in the capability, some in the selection screen.

It would also make a lot of the functions for the powers partial, e.g. right now calling playercap.isBurning(metal) can never throw an error, but if we "skip" lerasium than it could, or it would make all of those functions more expensive with bounds checking.

I'll consider in the future exposing both a PowerMetals enum and a Metals enum with the later including things like Silver, Leas, Lerasium, etc. But for now, I won't be adding Lerasium to the Metals without rethinking the enum's meaning.