/
apl_values_properties.go
47 lines (41 loc) · 1.14 KB
/
apl_values_properties.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package core
import (
"time"
"github.com/wowsims/sod/sim/core/proto"
)
type APLValueChannelClipDelay struct {
DefaultAPLValueImpl
unit *Unit
}
func (rot *APLRotation) newValueChannelClipDelay(config *proto.APLValueChannelClipDelay) APLValue {
return &APLValueChannelClipDelay{
unit: rot.unit,
}
}
func (value *APLValueChannelClipDelay) Type() proto.APLValueType {
return proto.APLValueType_ValueTypeDuration
}
func (value *APLValueChannelClipDelay) GetDuration(sim *Simulation) time.Duration {
return value.unit.ChannelClipDelay
}
func (value *APLValueChannelClipDelay) String() string {
return "Channel Clip Delay()"
}
type APLValueFrontOfTarget struct {
DefaultAPLValueImpl
unit *Unit
}
func (rot *APLRotation) newValueFrontOfTarget(config *proto.APLValueFrontOfTarget) APLValue {
return &APLValueFrontOfTarget{
unit: rot.unit,
}
}
func (value *APLValueFrontOfTarget) Type() proto.APLValueType {
return proto.APLValueType_ValueTypeBool
}
func (value *APLValueFrontOfTarget) GetBool(sim *Simulation) bool {
return value.unit.PseudoStats.InFrontOfTarget
}
func (value *APLValueFrontOfTarget) String() string {
return "Front of Target()"
}