Skip to content
Snippets Groups Projects
Commit 0272e1a0 authored by Fabian Heinrich's avatar Fabian Heinrich
Browse files

Config item to choose if movement inputs cancel interaction with counters

parent 0533380f
No related branches found
No related tags found
No related merge requests found
......@@ -91,6 +91,7 @@ player_config:
restricted_view: False
view_angle: 70
view_range: 4 # in grid units, can be "null"
movement_stops_interact: false
effect_manager:
FireManager:
......
......@@ -85,6 +85,8 @@ player_config:
restricted_view: False
view_angle: 70
view_range: 4 # in grid units, can be "null"
movement_stops_interact: false
effect_manager:
FireManager:
......
......@@ -44,6 +44,8 @@ class PlayerConfig:
"""Angle of the players view if restricted."""
view_range: float | None = None
"""Range of the players view if restricted. In grid units."""
movement_stops_interact: bool = True
"""If the player moves, the interaction with the counter stops."""
class Player:
......@@ -108,7 +110,7 @@ class Player:
function of the environment"""
self.current_movement = move_vector
self.movement_until = move_until
if self.interacting:
if self.player_config.movement_stops_interact and self.interacting:
self.perform_interact_stop()
def move_abs(self, new_pos: npt.NDArray[float]):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment