More Details - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki
Verb Label Strategy
The label of a verb is the first one of these that is not null or empty:
- The
visualLabel
field of the correspondingAdditionalVerbProps
. - The
label
field of the verb. - The label of the projectile fired by the verb, if it fires projectiles.
- The label of the owner of this verb.
Verb Icon Strategy
The icon of a verb is the first one of these that is a valid texture:
- If this is a toggle gizmo, the
toggleIcon
field of the correspondingAdditionalVerbProps
. - The
graphic
field of the correspondingAdditionalVerbProps
. - The
commandIcon
field of the verb. - The icon of the projectile fired by the verb, if it fires projectiles.
- The icon of the item that provides this verb, if it exists. Which it will, unless this verb is given by a Hediff.
- The default vanilla "Attack" icon.
DrawPosition
DrawPosition
is the class used to determine where to draw a verb that has drawing enabled. All the Vector2
s are offsets from the center of the pawn. It has the following fields:
defName
: string
If in specificPositions
this is used to find which types of pawns this specific position to be used on. If this is the defaultPosition
, then this field is ignored.
Default
: Vector2
(default: (0, 0)
)
The default position, if the current rotation does not have a entry.
Up
, Down
, Left
, and Right
: Vector2
(default: Default
)
Specific positions depending on the rotation of the pawn.
bodyType
: BodyTypeDef
(optional)
If provided, only applies this DrawPosition
to pawns with this body type.
Scaling
To scale the drawn verb differently based on the owner, you can provide a scalings
list, which is a list Scaling
objects.
BodyType
: BodyTypeDef
(optional)
If provided, this scaling only applies to pawns of this body type.
defName
: string
Limits this scaling to only pawns with this defName.
scaling
: float
(required)
What scale to draw at if this scaling's prereqs match.