From: Brendan Hansen Date: Sun, 20 Mar 2022 23:52:41 +0000 (-0500) Subject: cleanup X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=b81e0bc25bbafad7c3f78c84345d07e1a470ae44;p=bar-game.git cleanup --- diff --git a/docs/patron_behavior.md b/docs/patron_behavior.md new file mode 100644 index 0000000..2b5503e --- /dev/null +++ b/docs/patron_behavior.md @@ -0,0 +1,3 @@ +Patron Behavior +=============== + diff --git a/docs/plan.md b/docs/plan.md index 809df49..b146925 100644 --- a/docs/plan.md +++ b/docs/plan.md @@ -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 diff --git a/docs/todo.txt b/docs/todo.txt index fccef98..ff0e370 100644 --- a/docs/todo.txt +++ b/docs/todo.txt @@ -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 diff --git a/src/build.onyx b/src/build.onyx index 429f03f..dc59513 100644 --- a/src/build.onyx +++ b/src/build.onyx @@ -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" diff --git a/src/entity/components/collision_mask.onyx b/src/entity/components/collision_mask.onyx index 2b4c7da..8732a53 100644 --- a/src/entity/components/collision_mask.onyx +++ b/src/entity/components/collision_mask.onyx @@ -150,4 +150,4 @@ CollisionMaskComponent :: struct { } } } -} \ No newline at end of file +} diff --git a/src/entity/components/patron.onyx b/src/entity/components/patron.onyx index eff116a..6c06a15 100644 --- a/src/entity/components/patron.onyx +++ b/src/entity/components/patron.onyx @@ -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 { diff --git a/src/entity/store.onyx b/src/entity/store.onyx index 11f5652..119ec47 100644 --- a/src/entity/store.onyx +++ b/src/entity/store.onyx @@ -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;