r_leg

Vars | |
left_leg_mask_cache | The associated list of all the left leg mask keys associated to their cached left leg masks. It's static, so it's shared between all the left legs there is. Be careful. Why? Both legs share the same layer for rendering, and since we don't want to do redraws on each dir changes, we're doing it with a mask instead, which we cache for efficiency reasons. |
---|---|
left_leg_mask_key | We store this here to generate our icon key more easily. |
Procs | |
generate_masked_right_leg | This proc serves as a way to ensure that right legs don't overlap above left legs when their dir is WEST on a mob. |
on_owner_paralysis_gain | Proc to react to the owner gaining the TRAIT_PARALYSIS_R_LEG trait. |
on_owner_paralysis_loss | Proc to react to the owner losing the TRAIT_PARALYSIS_R_LEG trait. |
Var Details
left_leg_mask_cache

The associated list of all the left leg mask keys associated to their cached left leg masks. It's static, so it's shared between all the left legs there is. Be careful. Why? Both legs share the same layer for rendering, and since we don't want to do redraws on each dir changes, we're doing it with a mask instead, which we cache for efficiency reasons.
left_leg_mask_key

We store this here to generate our icon key more easily.
Proc Details
generate_masked_right_leg
This proc serves as a way to ensure that right legs don't overlap above left legs when their dir is WEST on a mob.
It's using the left_leg_mask_cache
to avoid generating a new mask when unnecessary, which means that there needs to be one
for the proc to return anything.
Arguments:
- right_leg_icon_file - The icon file of the right leg overlay we're trying to apply a mask to.
- right_leg_icon_state - The icon_state of the right leg overlay we're trying to apply a mask to.
- image_dir - The direction applied to the icon, only meant for when the leg is dropped, so it remains facing SOUTH all the time.
Returns the /image
of the right leg that was masked, or null
if the mask didn't exist.
on_owner_paralysis_gain
Proc to react to the owner gaining the TRAIT_PARALYSIS_R_LEG trait.
on_owner_paralysis_loss
Proc to react to the owner losing the TRAIT_PARALYSIS_R_LEG trait.