From cd8d72bac3935fdd2736f7700205150955e3085a Mon Sep 17 00:00:00 2001 From: Sergey Zavodnov <41265986+SERGOPLC@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:21:31 +0300 Subject: [PATCH 1/2] Update requirements.txt --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2264a45..db64196 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,8 @@ pygame==2.5.0 moderngl==5.8.2 numba==0.57.1 PyGLM==2.7.0 -numpy<1.25,>=1.21 +numpy==1.24 opensimplex[numpy]==0.4.4 -pillow~=10.4.0 \ No newline at end of file +pillow~=10.4.0 From 34d91db32b23bd209488881e615d574708e5f488 Mon Sep 17 00:00:00 2001 From: Sergey Zavodnov <41265986+SERGOPLC@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:23:02 +0300 Subject: [PATCH 2/2] Update scene.py --- scene.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/scene.py b/scene.py index 62d0447..337cfcf 100644 --- a/scene.py +++ b/scene.py @@ -60,9 +60,20 @@ def update(self): if time.time() - self.time > 2 and not self.read_only: try: - load_states = np.load('/home/berick/PycharmProjects/experiential-minecraft/examples/output/state_output.npy', allow_pickle=True).item() - load_edges = np.load('/home/berick/PycharmProjects/experiential-minecraft/examples/output/edge_output.npy', allow_pickle=True).item() - load_grid = np.load('/home/berick/PycharmProjects/experiential-minecraft/examples/output/grid_output.npy', allow_pickle=True).item() + # Get the current script's directory + current_dir = os.path.dirname(os.path.abspath(__file__)) + + # Construct relative paths + output_dir = os.path.join(current_dir, '..', 'client', 'output') + + state_path = os.path.join(output_dir, 'state_output.npy') + edge_path = os.path.join(output_dir, 'edge_output.npy') + grid_path = os.path.join(output_dir, 'grid_output.npy') + + # Load the files + load_states = np.load(state_path, allow_pickle=True).item() + load_edges = np.load(edge_path, allow_pickle=True).item() + load_grid = np.load(grid_path, allow_pickle=True).item() self.time = time.time() @@ -249,4 +260,4 @@ def render(self): case 5: # 5 - Only Imperfect Match Edges if self.edges[key].mode == 0: - self.edges[key].render() \ No newline at end of file + self.edges[key].render()