HexMod icon indicating copy to clipboard operation
HexMod copied to clipboard

Pattern conflict checking

Open object-Object opened this issue 1 year ago • 3 comments

Preface: I haven't checked if this is a thing in the new registry, but I wanted to open an issue so it doesn't get lost.

There should probably be a check when patterns are added to the registry to ensure that the given angle signature doesn't already exist and intentionally crash if it does. HexxyCraft recently had an issue where I backported bool_to_number, which has the same pattern as Hexal's type/iota. The game launched fine, and the only indication was the notebook failing to load with an obscure error message which only mentioned one of the patterns involved.

object-Object avatar May 27 '23 23:05 object-Object

Huh I swear I already impled that. Good catch

gamma-delta avatar Jun 07 '23 18:06 gamma-delta

@Talia-12 Do you know if this was implemented on 1.20?

object-Object avatar Jan 11 '24 02:01 object-Object

This seems like its now handled in a way that probablyy won't have unexpected behaviour like that, but doesn't let the user know that something's gone wrong (it is being added to a Map with the pattern signature as the key, and that map is what is used to recognise patterns). I'll make it do a warning to the console if it encounters a duplicate signature.

Talia-12 avatar Feb 06 '24 13:02 Talia-12