cleanup
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 20 Mar 2022 23:52:41 +0000 (18:52 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 20 Mar 2022 23:52:41 +0000 (18:52 -0500)
docs/patron_behavior.md [new file with mode: 0644]
docs/plan.md
docs/todo.txt
src/build.onyx
src/entity/components/collision_mask.onyx
src/entity/components/patron.onyx
src/entity/store.onyx

diff --git a/docs/patron_behavior.md b/docs/patron_behavior.md
new file mode 100644 (file)
index 0000000..2b5503e
--- /dev/null
@@ -0,0 +1,3 @@
+Patron Behavior
+===============
+
index 809df49e1f4638f4bd961d1a8766003c366c8b47..b1469257ebc06a0a3f81fb46a46ae9da510fc270 100644 (file)
@@ -4,14 +4,11 @@ MadLabs Brewery Bar Arcade Game
 Think Overcooked meets Stardew Valley.
 
 Chaotic order-meeting tasks, with small town people with consistent orders.
-When they've been here a couple of times, they should have to ask for their usual.
+When they've been here a couple of times, they shouldn't have to ask for their usual.
 
 As this is an arcade game, the controls will be rather limited:
     - At most 2 players
     - 1 joystick and 2 buttons each
     - 1 button for interacting
-    - 1 button for canelling
+    - 1 button for cancelling
 
-* Spilling beer
-* Mopping spills
-* Throwing up people
index fccef98e25b0ae13111c62f9c6313eb64d53a139..ff0e370edd54816f4661c5eb7fe4f558304bd2c7 100644 (file)
@@ -15,4 +15,10 @@ customizable behavior, without having to change the code.
 
 * Waves / Continuous flow
 
-* Purchase bar-upgrades between days
\ No newline at end of file
+* Purchase bar-upgrades between days
+
+* Spilling beer
+
+* Mopping spills
+
+* Throwing up people
index 429f03f0b985e9b7070f76bad99790f37645440b..dc595139e33014e869521e224e3e6b5bf768d830 100644 (file)
@@ -9,7 +9,9 @@ MINOR_VERSION :: 1
 
 #load_path ONYX_PATH
 #load_path "./../lib"
-#library_path "./lib"
+
+#if (package runtime).arch == .X86_64  { #library_path "./lib" }
+#if (package runtime).arch == .AARCH64 { #library_path "./lib/aarch64" }
 
 #load "core/std"
 
index 2b4c7dab42fa0ca8c764c109e26e2b9f2459977b..8732a5359a63d223550d7ec7db362a7f1725dffc 100644 (file)
@@ -150,4 +150,4 @@ CollisionMaskComponent :: struct {
             }
         }
     }
-}
\ No newline at end of file
+}
index eff116a24b3433fcd05e3a13feca51991c40c4ad..6c06a15e770e054441b50492ce890ce40b7e69a5 100644 (file)
@@ -130,7 +130,7 @@ PatronComponent :: struct {
                 target_entity := scene->get(target);
                 target_location := target_entity.pos;
                 if Vector2.square_mag(target_location - entity.pos) < 4 {
-                    break;    
+                    break;
                 }
 
                 if path.count == 0 {
index 11f56529d326d1b69e65237626425bf37359b49c..119ec478a4034f367cf9bfdc98cc109a0877b053 100644 (file)
@@ -85,7 +85,7 @@ scene_save_to_file :: (use this: ^Scene, filename: str) {
     }
 }
 
-scene_load_from_file :: (use this: ^Scene, filename: str) {
+scene_load_from_file :: (use this: ^Scene, filename: str, reset_scene := true) {
     err, input_file := os.open(filename, .Read);
     if err != .None {
         debug_log(.Error, "Failed to open file: {}", filename);
@@ -94,10 +94,12 @@ scene_load_from_file :: (use this: ^Scene, filename: str) {
     defer os.close(^input_file);
     reader := io.reader_make(^input_file);
 
-    for entities do this->delete(it, false);
-    array.clear(^entities);
-    map.clear(^entity_map);
-    next_entity_id = 0;
+    if reset_scene {
+        for entities do this->delete(it, false);
+        array.clear(^entities);
+        map.clear(^entity_map);
+        next_entity_id = 0;
+    }
 
     use type_info;