Allow undefined set member to require a minimum number of objects #58
Labels
proposal
pending discussion about something to do
specification
involves the nyan language specification
Currently all sets can be initialized as empty which is not always desirable. It should be possible to require a minimum number of elements that have to be defined by the non-abstract set. This could proof useful for cases where at least one object is expected to be present. For example, a set is supposed to contain a number of animations of which the engine selects one randomly. If the set is initiliazed with no animations present, the mechanic doesn't work.
Possible solution:
The
1
denotes that at least one object is required on the set's initilization. Alsoset(Animation, 0)
would be the same asset(Animation)
. The requirement would only be relevant for the initilization. Patches could still make the set be empty.The text was updated successfully, but these errors were encountered: