mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-25 18:05:26 +00:00
Del: Waypoint.end_rotation
This commit is contained in:
parent
bc53c9c37a
commit
f27510edd2
@ -351,10 +351,6 @@ class MapControl(Combat, AimDetectorMixin):
|
||||
else:
|
||||
logger.warning(f'Arrive waypoint with unexpected result: {result}')
|
||||
|
||||
end_point = waypoints[-1]
|
||||
if end_point.end_rotation is not None:
|
||||
logger.hr('End rotation', level=2)
|
||||
self.rotation_set(end_point.end_rotation, threshold=end_point.end_rotation_threshold)
|
||||
return results
|
||||
|
||||
def clear_item(self, *waypoints):
|
||||
|
@ -30,9 +30,6 @@ class Waypoint:
|
||||
# True to enable endpoint optimizations, character will smoothly approach target position
|
||||
# False to stop all controls at arrive
|
||||
end_opt: bool = True
|
||||
# Set rotation after arrive, 0~360
|
||||
end_rotation: int = None
|
||||
end_rotation_threshold: int = 15
|
||||
|
||||
"""
|
||||
Walk
|
||||
|
@ -108,8 +108,8 @@ class RouteBase(RouteBase_, RogueExit, RogueEvent):
|
||||
if self.handle_event_option():
|
||||
continue
|
||||
|
||||
def goto(self, *waypoints):
|
||||
result = super().goto(*waypoints)
|
||||
def _goto(self, *args, **kwargs):
|
||||
result = super()._goto(*args, **kwargs)
|
||||
if 'enemy' in result:
|
||||
self.clear_blessing()
|
||||
return result
|
||||
@ -245,11 +245,12 @@ class RouteBase(RouteBase_, RogueExit, RogueEvent):
|
||||
logger.hr('Domain exit', level=1)
|
||||
waypoints = ensure_waypoints(waypoints)
|
||||
end_point = waypoints[-1]
|
||||
end_point.end_rotation = end_rotation
|
||||
end_point.endpoint_threshold = 1.5
|
||||
end_point.end_rotation_threshold = 10
|
||||
result = self.goto(*waypoints)
|
||||
|
||||
logger.hr('End rotation', level=2)
|
||||
self.rotation_set(end_rotation, threshold=10)
|
||||
|
||||
logger.hr('Find domain exit', level=2)
|
||||
direction = self.predict_door_by_name(self.device.image)
|
||||
direction_limit = 55
|
||||
@ -260,7 +261,6 @@ class RouteBase(RouteBase_, RogueExit, RogueEvent):
|
||||
direction = direction_limit
|
||||
elif direction < 0:
|
||||
direction = -direction_limit
|
||||
end_point.end_rotation = None
|
||||
end_point.min_speed = 'run'
|
||||
end_point.interact_radius = 50
|
||||
end_point.expected_end.append(self._domain_exit_expected_end)
|
||||
|
Loading…
Reference in New Issue
Block a user