Sunday, June 23, 2019

FMod - Side tileinfo customization

One Abiathar user told me today that their mod uses nonstandard side tileinfo values to trigger special behavior. Abiathar (and FleexCore2) turn all nonzero left and right tile property values into 1, which is a problem if those fields are to be used for something more than "blocking vs. not".

So today I changed FleexCore2 to have byte Left and Right fields rather than Boolean SolidLeft and SolidRight, then adjusted Abiathar's tileinfo translation functions to account for non-Boolean side values. In the interest of backward compatibility to extensions, I kept the functions that take Booleans; they now delegate to the byte-accepting versions, passing 0 or 1.

Virtually all users will only need binary side properties, so rather than entirely replacing the "Solid" checkboxes in the Tile Property Modifier UI I made dropdowns only appear if configured or if that tile has nonbinary side properties. Like with top, bottom, and special properties, custom side properties can be added to the ADEPS file and will appear in the dropdowns.

I also noticed that canceling the entry of a custom tile property value reset the dropdown to the first entry rather than leaving it where it was before. That's now fixed.

No comments:

Post a Comment