Cutstuff Forum

Mega Man 8-bit Deathmatch => Bugs/Suggestions => MM8BDM Discussion => Closed => Topic started by: JaxOf7 on November 02, 2015, 04:43:34 AM

Title: Ammo array condense
Post by: JaxOf7 on November 02, 2015, 04:43:34 AM
http://www.best-ever.org/download?file=mm8bdmammoarraycondense.pk3

Ok so there's an array dedicated to the names of weapons and ammo, and then another array dedicated to listing their max ammos  and ammo multipliers.
First off, listing max ammos isn't needed anymore because GetAmmoCapacity is a thing, and using GetAmmoCapacity would allow compatibility with mods that use SetAmmoCapacity.
And ammo multipliers can be inputted as strings in the main array and then read as integers. Maybe that takes up processing? It's certainly more convenient though.

So yeah, just one array. Cool, isn't it?
Title: Re: Ammo array condense
Post by: Messatsu on November 02, 2015, 02:42:48 PM
I would love to condense the arrays.  One hesitation I have with the suggestion, however, is using strings to store integers.  While this might work, it is not a good coding practice and the potential for unexpected problems to arise concerns me.  I think it SHOULD be possible to remove the 2nd array (and maybe even the buster array) by using GetAmmoCapacity and some expansion on the main array.  I will look into this and see if this can be done.  Thanks for the heads up!

Moved to pending.
Title: Re: Ammo array condense
Post by: Russel on December 07, 2015, 06:27:22 AM
A modification of this suggestion was applied, moved to closed.