Documentation ¶
Overview ¶
Package property provides handling for the different property types that may be encountered within a Satisfactory save file.
Index ¶
- func SerializeProperties(props []*Property, d *data.Data) error
- type ArbitraryStruct
- type ArrayPropertyValue
- type BoolPropertyValue
- type BoxStruct
- type BytePropertyValue
- type ColorStruct
- type DateTimeStruct
- type DoublePropertyValue
- type EnumPropertyValue
- type FloatPropertyValue
- type FluidBoxStruct
- type GUIDStruct
- type Int64PropertyValue
- type Int8PropertyValue
- type IntPropertyValue
- type InterfacePropertyValue
- type InventoryItemStruct
- type LinearColorStruct
- type MapPropertyValue
- type NamePropertyValue
- type ObjectPropertyValue
- type Property
- func (p *Property) GetArrayValue() (*ArrayPropertyValue, error)
- func (p *Property) GetBoolValue() (bool, error)
- func (p *Property) GetByteValue() ([]byte, error)
- func (p *Property) GetDoubleValue() (float64, error)
- func (p *Property) GetEnumPropertyValue() (*EnumPropertyValue, error)
- func (p *Property) GetFloatValue() (float32, error)
- func (p *Property) GetInt64Value() (int64, error)
- func (p *Property) GetInt8Value() (int8, error)
- func (p *Property) GetIntValue() (int32, error)
- func (p *Property) GetInterfaceValue() (*InterfacePropertyValue, error)
- func (p *Property) GetMapPropertyValue() (*MapPropertyValue, error)
- func (p *Property) GetNameValue() (string, error)
- func (p *Property) GetObjectValue() (*ObjectPropertyValue, error)
- func (p *Property) GetStringValue() (string, error)
- func (p *Property) GetStructValue() (*StructPropertyValue, error)
- func (p *Property) GetTextValue() (*TextPropertyValue, error)
- func (p *Property) SerializeProperty(d *data.Data) error
- type QuatStruct
- type RailroadTrackPositionStruct
- type StringPropertyValue
- type StructPropertyValue
- func (v *StructPropertyValue) GetArbitraryStruct() (*ArbitraryStruct, error)
- func (v *StructPropertyValue) GetBoxStruct() (*BoxStruct, error)
- func (v *StructPropertyValue) GetColorStruct() (*ColorStruct, error)
- func (v *StructPropertyValue) GetDateTimeStruct() (*DateTimeStruct, error)
- func (v *StructPropertyValue) GetFluidBoxStruct() (*FluidBoxStruct, error)
- func (v *StructPropertyValue) GetGUIDStruct() (*GUIDStruct, error)
- func (v *StructPropertyValue) GetInventoryItemStruct() (*InventoryItemStruct, error)
- func (v *StructPropertyValue) GetLinearColor() (*LinearColorStruct, error)
- func (v *StructPropertyValue) GetQuatStruct() (*QuatStruct, error)
- func (v *StructPropertyValue) GetRailroadTrackPositionStruct() (*RailroadTrackPositionStruct, error)
- func (v *StructPropertyValue) GetVector2DStruct() (*Vector2DStruct, error)
- func (v *StructPropertyValue) GetVectorStruct() (*VectorStruct, error)
- type StructType
- type StructValue
- type TextBase
- type TextNone
- type TextPropertyValue
- type TextType
- type TextValue
- type Type
- type Value
- type Vector2DStruct
- type VectorStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArbitraryStruct ¶
type ArbitraryStruct struct {
Properties []*Property `json:"properties,omitempty"`
}
type ArrayPropertyValue ¶
type ArrayPropertyValue struct { ValueType Type `json:"value_type,omitempty"` Values []Value `json:"values,omitempty"` StructName string `json:"struct_name,omitempty"` StructBytes []byte `json:"struct_bytes,omitempty"` StructInnerType string `json:"struct_inner_type,omitempty"` StructGUID []int32 `json:"struct_guid,omitempty"` }
func (*ArrayPropertyValue) GetStructValues ¶
func (v *ArrayPropertyValue) GetStructValues() ([]*StructPropertyValue, error)
type BoolPropertyValue ¶
type BoolPropertyValue bool
type BytePropertyValue ¶
type ColorStruct ¶
type DateTimeStruct ¶
type DateTimeStruct int64
type DoublePropertyValue ¶
type DoublePropertyValue float64
type EnumPropertyValue ¶
type FloatPropertyValue ¶
type FloatPropertyValue float32
type FluidBoxStruct ¶
type FluidBoxStruct float32
type GUIDStruct ¶
type GUIDStruct []byte
type Int64PropertyValue ¶
type Int64PropertyValue int64
type Int8PropertyValue ¶
type Int8PropertyValue int8
type IntPropertyValue ¶
type IntPropertyValue int32
type InterfacePropertyValue ¶
type InventoryItemStruct ¶
type LinearColorStruct ¶
type MapPropertyValue ¶
type MapPropertyValue struct { KeyType Type `json:"key_type,omitempty"` ValueType Type `json:"value_type,omitempty"` Values map[Value]Value `json:"values,omitempty"` // contains filtered or unexported fields }
func (*MapPropertyValue) MarshalJSON ¶
func (v *MapPropertyValue) MarshalJSON() ([]byte, error)
type NamePropertyValue ¶
type NamePropertyValue string
type ObjectPropertyValue ¶
type Property ¶
type Property struct { Name string `json:"name"` Type Type `json:"type"` Index int32 `json:"index"` // The Value of the Property. // // Accessing the value can be achieved by calling the appropriate Get method // on the Property based on its Type. Value Value `json:"value"` }
A Property within a save.Component or save.Entity
func (*Property) GetArrayValue ¶
func (p *Property) GetArrayValue() (*ArrayPropertyValue, error)
func (*Property) GetBoolValue ¶
func (*Property) GetByteValue ¶
func (*Property) GetDoubleValue ¶
func (*Property) GetEnumPropertyValue ¶
func (p *Property) GetEnumPropertyValue() (*EnumPropertyValue, error)
func (*Property) GetFloatValue ¶
func (*Property) GetInt64Value ¶
func (*Property) GetInt8Value ¶
func (*Property) GetIntValue ¶
func (*Property) GetInterfaceValue ¶
func (p *Property) GetInterfaceValue() (*InterfacePropertyValue, error)
func (*Property) GetMapPropertyValue ¶
func (p *Property) GetMapPropertyValue() (*MapPropertyValue, error)
func (*Property) GetNameValue ¶
func (*Property) GetObjectValue ¶
func (p *Property) GetObjectValue() (*ObjectPropertyValue, error)
func (*Property) GetStringValue ¶
func (*Property) GetStructValue ¶
func (p *Property) GetStructValue() (*StructPropertyValue, error)
func (*Property) GetTextValue ¶
func (p *Property) GetTextValue() (*TextPropertyValue, error)
type QuatStruct ¶
type StringPropertyValue ¶
type StringPropertyValue string
type StructPropertyValue ¶
type StructPropertyValue struct { GUID []int32 `json:"guid,omitempty"` Type StructType `json:"type,omitempty"` // Value of the Struct // // Accessing the value can be achieved by calling the appropriate Get method // on the StructPropertyValue based on its Type. Value StructValue `json:"value,omitempty"` }
func (*StructPropertyValue) GetArbitraryStruct ¶
func (v *StructPropertyValue) GetArbitraryStruct() (*ArbitraryStruct, error)
func (*StructPropertyValue) GetBoxStruct ¶
func (v *StructPropertyValue) GetBoxStruct() (*BoxStruct, error)
func (*StructPropertyValue) GetColorStruct ¶
func (v *StructPropertyValue) GetColorStruct() (*ColorStruct, error)
func (*StructPropertyValue) GetDateTimeStruct ¶
func (v *StructPropertyValue) GetDateTimeStruct() (*DateTimeStruct, error)
func (*StructPropertyValue) GetFluidBoxStruct ¶
func (v *StructPropertyValue) GetFluidBoxStruct() (*FluidBoxStruct, error)
func (*StructPropertyValue) GetGUIDStruct ¶
func (v *StructPropertyValue) GetGUIDStruct() (*GUIDStruct, error)
func (*StructPropertyValue) GetInventoryItemStruct ¶
func (v *StructPropertyValue) GetInventoryItemStruct() (*InventoryItemStruct, error)
func (*StructPropertyValue) GetLinearColor ¶
func (v *StructPropertyValue) GetLinearColor() (*LinearColorStruct, error)
func (*StructPropertyValue) GetQuatStruct ¶
func (v *StructPropertyValue) GetQuatStruct() (*QuatStruct, error)
func (*StructPropertyValue) GetRailroadTrackPositionStruct ¶
func (v *StructPropertyValue) GetRailroadTrackPositionStruct() (*RailroadTrackPositionStruct, error)
func (*StructPropertyValue) GetVector2DStruct ¶
func (v *StructPropertyValue) GetVector2DStruct() (*Vector2DStruct, error)
func (*StructPropertyValue) GetVectorStruct ¶
func (v *StructPropertyValue) GetVectorStruct() (*VectorStruct, error)
type StructType ¶
type StructType string
const ( BoxStructType StructType = "Box" ColorStructType StructType = "Color" DateTimeStructType StructType = "DateTime" FluidBoxStructType StructType = "FluidBox" GUIDStructType StructType = "GUID" InventoryItemStructType StructType = "InventoryItem" LinearColorStructType StructType = "LinearColor" QuatStructType StructType = "Quat" RailroadTrackPositionStructType StructType = "RailroadTrackPosition" VectorStructType StructType = "Vector" Vector2DStructType StructType = "Vector2D" )
type StructValue ¶
type StructValue interface {
// contains filtered or unexported methods
}
type TextPropertyValue ¶
type TextPropertyValue struct { Flags int32 `json:"flags"` Type TextType `json:"type"` Value TextValue `json:"value"` }
func (*TextPropertyValue) GetBaseText ¶
func (t *TextPropertyValue) GetBaseText() (*TextBase, error)
func (*TextPropertyValue) GetNoneText ¶
func (t *TextPropertyValue) GetNoneText() (*TextNone, error)
type Type ¶
type Type string
Type of a Property
const ( ArrayPropertyType Type = "ArrayProperty" BoolPropertyType Type = "BoolProperty" BytePropertyType Type = "ByteProperty" DoublePropertyType Type = "DoubleProperty" EnumPropertyType Type = "EnumProperty" FloatPropertyType Type = "FloatProperty" Int8PropertyType Type = "Int8Property" Int64PropertyType Type = "Int64Property" InterfacePropertyType Type = "InterfaceProperty" IntPropertyType Type = "IntProperty" MapPropertyType Type = "MapProperty" NamePropertyType Type = "NameProperty" ObjectPropertyType Type = "ObjectProperty" StringPropertyType Type = "StrProperty" StructPropertyType Type = "StructProperty" TextPropertyType Type = "TextProperty" )
type Value ¶
type Value interface {
// contains filtered or unexported methods
}
Value of a Property
type Vector2DStruct ¶
type VectorStruct ¶
Click to show internal directories.
Click to hide internal directories.