I tried to generate a sequence of contracts with DATA_EXPAND and .cfg like so:
CONTRACT_TYPE
{
name = ExampleContract
DATA_EXPAND
{
type = int
stage = [1, 2, 3]
}
DATA
{
type = int
prev = @/stage - 1
}
REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = "ExampleContract."+@/prev
}
...
I got a NullReferenceException. The code for parsing "contractType" doesn't account for it not being immediately evaluated.
By simply using SetValues as ParseValue's validation seems to do the trick. Using validation to set values feels kinda hacky, but is not without a precedent within the codebase, see: WaypointGenerator.cs:433 and 463
I also added MutuallyExclusive since be the logic in the code "tag" and "contractType" are mutually exclusive, but util is not used for some reason and there's no feedback for the contract creator.
I tried to generate a sequence of contracts with DATA_EXPAND and .cfg like so:
I got a NullReferenceException. The code for parsing "contractType" doesn't account for it not being immediately evaluated. By simply using SetValues as ParseValue's validation seems to do the trick. Using validation to set values feels kinda hacky, but is not without a precedent within the codebase, see: WaypointGenerator.cs:433 and 463
I also added MutuallyExclusive since be the logic in the code "tag" and "contractType" are mutually exclusive, but util is not used for some reason and there's no feedback for the contract creator.