25 lines
679 B
Go
25 lines
679 B
Go
package goap
|
|
|
|
type SchemaValueData struct {
|
|
FullValueType[string]
|
|
}
|
|
|
|
func (namedata *SchemaValueData) GetSelfOrBase() (BaseApChain, bool) {
|
|
return namedata.Next, true
|
|
}
|
|
|
|
func (namedata *SchemaValueData) MarshalToMap() map[string]any {
|
|
return namedata.MarshalToMapWithName(KEY_SCHEMA_VALUE)
|
|
}
|
|
|
|
func ParseSchemaValueData(raw map[string]any, next BaseApChain) (BaseApChain, error) {
|
|
tmp, err := ParseValueTypeWithName[string](raw, next, KEY_SCHEMA_VALUE)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &SchemaValueData{*tmp}, nil
|
|
}
|
|
|
|
func AppendSchemaValueData(base BaseApChain, data ValueValue[string]) BaseApChain {
|
|
return &SchemaValueData{FullValueType[string]{base, data}}
|
|
}
|