diff options
| author | yum <yum.food.vr@gmail.com> | 2023-09-10 18:11:08 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2023-09-10 18:11:08 -0700 |
| commit | 4f3b9382068a29731de664eb0810f9eb3a267905 (patch) | |
| tree | d63d6755a42dc14013fd62bcbfcb077186b0fc66 /Scripts/generate_utils.py | |
| parent | 3db7723aa5c16358f73e3e8d3bb20a959ce43d5d (diff) | |
Bugfix: eliminate dead-end in certain animator layers
Because the custom chatbox doesn't necessarily have an even multiple of
`sync_params` character slots, some layers in the animator write N
character slots while others write N-1. In the layers with only N-1
slots, they need something to do while slot N is being selected. This
patch creates a return-home transition in that case.
Diffstat (limited to 'Scripts/generate_utils.py')
| -rw-r--r-- | Scripts/generate_utils.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Scripts/generate_utils.py b/Scripts/generate_utils.py index 1e12103..7d231f9 100644 --- a/Scripts/generate_utils.py +++ b/Scripts/generate_utils.py @@ -23,6 +23,15 @@ class Config(): else: return ceil(float_result) + def layerNeedsParity(self, which_layer): + num_cells = self.BOARD_ROWS * self.BOARD_COLS + layers_in_last_region = num_cells % self.CHARS_PER_SYNC + float_result = num_cells / self.CHARS_PER_SYNC + if which_layer >= layers_in_last_region: + return True + else: + return False + config = Config() # Implementation detail. We use this parameter to return from the terminal |
