Documentation ¶
Index ¶
- Variables
- func Save(filename string, s *SDE) error
- type Cache
- type Modifier
- type SDE
- func (s *SDE) DoCaching(c bool)
- func (s *SDE) FindTypesThatReference(t *SDEType) ([]*SDEType, error)
- func (s *SDE) GetType(id int) (sdetype *SDEType, err error)
- func (s *SDE) GetTypeByName(name string) ([]*SDEType, error)
- func (s *SDE) GetTypesByTag(tag int) ([]*SDEType, error)
- func (s *SDE) Search(ss string) (sdetypes []*SDEType, err error)
- func (s *SDE) Size() int
- func (s *SDE) VerifySDEPrint()
- type SDEType
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Cache ¶
Cache is a struct that is included within SDE.
Whenever an SDE file is loaded we populate this and whenever an SDE is saved we make the pointer nil. The struct is supposed to provide faster lookups for things like TypeName and mDisplayName
@TODO: Finish implementing Cache relating things
type Modifier ¶
type Modifier struct { StackingPenalized string AttributeName string ModifierValue float64 ModifierType string }
Modifier represents a modifier that a Type has in it's attributes
type SDE ¶
SDE is a struct that owns every type for a given SDE.
func LoadReader ¶
LoadReader returns an SDE pointer given an io.Reader to read from
func (*SDE) FindTypesThatReference ¶
FindTypeThatReferences returns any time that refers to the given type
Suprising how fast this method runs ¶
@TODO:
When our caching system is finished update this to not iterate all ~3400
types lol Not sure how I would cache referencing type attributes.. Hmmm
func (*SDE) GetTypeByName ¶
GetTypeByName @TODO: Finish implementing
func (*SDE) GetTypesByTag ¶
GetTypeByTag @TODO: Finish implementing
func (*SDE) Search ¶
Search checks for the existance of ss in mDisplayName or TypeName in every type and returns a slice of pointers to SDETypes
func (*SDE) VerifySDEPrint ¶
func (s *SDE) VerifySDEPrint()
VerifySDEPrint prints the entire list of types/typeids to check for DB corruption
type SDEType ¶
SDEType is a struct representing a single individual type in an SDE.
func ApplyTypeToType ¶
ApplyTypeToType is a function that applies all the attributes given by tone to ttwo and returns the results as a pointer For now it doesn't work for skills. I'll likly write a different function for it.
func (*SDEType) GetAttribute ¶
GetAttribute checks if the type has the attribute and returns it. If it doesn't exist we lookup the weapons projectile type