JennDahm / KerbalSorter

A mod for Kerbal Space Program that allows players to sort their crew rosters
BSD 3-Clause "New" or "Revised" License
1 stars 2 forks source link

Implement hashing function on definition objects #18

Closed JennDahm closed 9 years ago

JennDahm commented 9 years ago

Doing this would allow a better guarantee that things don't get screwed up when buttons are added/removed from sort bars.

I've been considering using a 32-bit Rabin fingerprint as the hash.

JennDahm commented 9 years ago

I've got an implementation of a 32-bit Rabin fingerprinting algorithm now, and it's now being used to generate hashes for the sort button and sort bar definitions. Additionally, SortBar now uses these hashes to validate states that the user gives it in the SetState() method. Closing this now.