(id string, base float64)
| 79 | } |
| 80 | |
| 81 | func (p *Entity) SetAttribute(id string, base float64) { |
| 82 | p.attr_mu.Lock() |
| 83 | defer p.attr_mu.Unlock() |
| 84 | i := slices.IndexFunc(p.attributes, func(att Attribute) bool { return att.Id == id }) |
| 85 | if i == -1 { |
| 86 | return |
| 87 | } |
| 88 | p.attributes[i].Base = base |
| 89 | } |
| 90 | |
| 91 | // Metadata returns a clone of the metadata of this state |
| 92 | func (p *Entity) Metadata() metadata.Metadata { |
nothing calls this directly
no outgoing calls
no test coverage detected