powerof3 / Spell-Perk-Item-Distributor

MIT License
29 stars 8 forks source link

Type inferring for Linked Forms and Linking of DeathItems #27

Closed adya closed 6 months ago

adya commented 7 months ago

22

This change expands Linked Forms feature by allowing to make any regular entry as linked using Linked prefix, e.g. LinkedItem, LinkedOutfit, etc. This also introduces type inference by allowing to write LinkedForm and let SPID figure out form's type.

As a side benefit it adds support for linking DeathItems. Note that Only DeathItems can be linked to other DeathItems 🙂

TODO:

This now also allows to write

Form = 0x12345|...

without specifying type of the form you want.

Explicit form type is still useful as it can check whether user's intention matches the actual form type.

P.S. Performance impact of type inference is negligible. (2030 forms scored average ~204ms with both explicit and inferred types)