|
@@ -18,7 +18,7 @@ class BaseFireActorInteraction(BaseActorInteraction):
|
18
|
18
|
def draw_pending(self) -> None:
|
19
|
19
|
for actor in self.layer_manager.edit_layer.selection:
|
20
|
20
|
actor_grid_position = self.layer_manager.grid_manager.get_grid_position(actor.position)
|
21
|
|
- actor_pixel_position = self.layer_manager.grid_manager.get_pixel_position_of_grid_position(
|
|
21
|
+ actor_pixel_position = self.layer_manager.grid_manager.get_world_position_of_grid_position(
|
22
|
22
|
actor_grid_position,
|
23
|
23
|
)
|
24
|
24
|
mouse_grid_position = self.layer_manager.grid_manager.get_grid_position(
|
|
@@ -28,7 +28,7 @@ class BaseFireActorInteraction(BaseActorInteraction):
|
28
|
28
|
)
|
29
|
29
|
draw_to_pixel = self.layer_manager.edit_layer.screen_mouse
|
30
|
30
|
|
31
|
|
- obstacle_grid_position = self.layer_manager.edit_layer.physics.get_visibility_obstacle(
|
|
31
|
+ obstacle_grid_position = self.layer_manager.gui.physics.get_visibility_obstacle(
|
32
|
32
|
subject=actor.subject,
|
33
|
33
|
to_position=mouse_grid_position,
|
34
|
34
|
matrix_name='visibility',
|
|
@@ -37,34 +37,34 @@ class BaseFireActorInteraction(BaseActorInteraction):
|
37
|
37
|
|
38
|
38
|
# DEBUG
|
39
|
39
|
if self.layer_manager.debug:
|
40
|
|
- grid_paths = self.layer_manager.edit_layer.physics.matrixes.get_path_positions(
|
|
40
|
+ grid_paths = self.layer_manager.gui.physics.matrixes.get_path_positions(
|
41
|
41
|
from_=actor_grid_position,
|
42
|
42
|
to=mouse_grid_position,
|
43
|
43
|
)
|
44
|
44
|
previous_grid_path = None
|
45
|
45
|
for grid_path in grid_paths:
|
46
|
46
|
if previous_grid_path:
|
47
|
|
- previous_grid_path_pixel = self.layer_manager.grid_manager.get_pixel_position_of_grid_position(
|
|
47
|
+ previous_grid_path_pixel = self.layer_manager.grid_manager.get_world_position_of_grid_position(
|
48
|
48
|
previous_grid_path,
|
49
|
49
|
)
|
50
|
|
- current_grid_pixel = self.layer_manager.grid_manager.get_pixel_position_of_grid_position(
|
|
50
|
+ current_grid_pixel = self.layer_manager.grid_manager.get_world_position_of_grid_position(
|
51
|
51
|
grid_path,
|
52
|
52
|
)
|
53
|
53
|
draw_line(
|
54
|
|
- previous_grid_path_pixel,
|
55
|
|
- current_grid_pixel,
|
|
54
|
+ self.layer_manager.scrolling_manager.world_to_screen(*previous_grid_path_pixel),
|
|
55
|
+ self.layer_manager.scrolling_manager.world_to_screen(*current_grid_pixel),
|
56
|
56
|
(25, 125, 25),
|
57
|
57
|
)
|
58
|
58
|
previous_grid_path = grid_path
|
59
|
59
|
|
60
|
60
|
if obstacle_grid_position:
|
61
|
|
- obstacle_pixel = self.layer_manager.grid_manager.get_pixel_position_of_grid_position(
|
|
61
|
+ obstacle_pixel = self.layer_manager.grid_manager.get_world_position_of_grid_position(
|
62
|
62
|
obstacle_grid_position,
|
63
|
63
|
)
|
64
|
|
- draw_to_pixel = obstacle_pixel
|
|
64
|
+ draw_to_pixel = self.layer_manager.scrolling_manager.world_to_screen(*obstacle_pixel)
|
65
|
65
|
|
66
|
66
|
draw_line(
|
67
|
|
- obstacle_pixel,
|
|
67
|
+ self.layer_manager.scrolling_manager.world_to_screen(*obstacle_pixel),
|
68
|
68
|
self.layer_manager.edit_layer.screen_mouse,
|
69
|
69
|
self.not_visible_color,
|
70
|
70
|
)
|