Skip to content

Commit

Permalink
Added Yoga command
Browse files Browse the repository at this point in the history
  • Loading branch information
howroyd committed Nov 12, 2023
1 parent cb1f9e6 commit 4c3a0a7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/simonsays_drgreengiant/phasmoactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,21 @@ def distance(self) -> int:
#####################################################################


@dataclasses.dataclass(slots=True)
class Yoga(GenericAction):
"""Look up to the sky"""
name: str = "yoga"
chained: bool = False


@dataclasses.dataclass(slots=True)
class YogaConfig(LookConfig):
"""Look up to the sky config"""
hidconfig: hidactions.Config = dataclasses.field(default_factory=lambda: hidactions.MouseMoveDirectionSmoothActionConfig(4096, hidactions.MouseMoveDirection.UP))

#####################################################################


@dataclasses.dataclass(slots=True)
class RandomAction(GenericActionBase):
"""Pich a random action and run it"""
Expand Down Expand Up @@ -833,6 +848,7 @@ def _get_all(config_fn: gameactions.ConfigFn) -> gameactions.ActionAndConfigDict
DropAllItems(None).name: gameactions.ActionAndConfig(DropAllItems, DropAllItemsConfig()),
Spin(None).name: gameactions.ActionAndConfig(Spin, SpinConfig()),
Headbang(None).name: gameactions.ActionAndConfig(Headbang, HeadbangConfig()),
Yoga(None).name: gameactions.ActionAndConfig(Yoga, YogaConfig()),
}


Expand Down Expand Up @@ -899,6 +915,7 @@ def all_actions(config_fn: gameactions.ConfigFn) -> list[gameactions.Action]:
DropAllItems(config_fn),
Spin(config_fn),
Headbang(config_fn),
Yoga(config_fn),
]


Expand Down Expand Up @@ -943,4 +960,5 @@ def default_config() -> gameactions.Config:
DropAllItems(None).name: DropAllItemsConfig(),
Spin(None).name: SpinConfig(),
Headbang(None).name: HeadbangConfig(),
Yoga(None).name: YogaConfig(),
})

0 comments on commit 4c3a0a7

Please sign in to comment.