From cbacdd7a260c1a2593297b7d4378de421480cf66 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 24 Jan 2026 19:22:19 -0500 Subject: [PATCH] Tweaked fishing a bit. Fixed bug with residents letting fires go out. --- src/base_system.nvgt | 3 ++- src/fishing.nvgt | 9 ++++++++- src/player.nvgt | 1 + src/save_system.nvgt | 1 + 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/base_system.nvgt b/src/base_system.nvgt index 9d92076..23ae728 100644 --- a/src/base_system.nvgt +++ b/src/base_system.nvgt @@ -116,7 +116,8 @@ void attempt_resident_fish_smoking() { void keep_base_fires_fed() { if (residents_count <= 0) return; - if (get_storage_count(ITEM_MEAT) <= 0) return; + int total_food = get_storage_count(ITEM_MEAT) + get_storage_count(ITEM_SMOKED_FISH); + if (total_food <= 0) return; if (get_storage_count(ITEM_STICKS) <= 0 && get_storage_count(ITEM_LOGS) <= 0) return; for (uint i = 0; i < world_fires.length(); i++) { diff --git a/src/fishing.nvgt b/src/fishing.nvgt index 3fe136c..f4441bf 100644 --- a/src/fishing.nvgt +++ b/src/fishing.nvgt @@ -38,6 +38,7 @@ void reset_fishing_session() { is_reeling = false; cast_position = -1; reel_position = -1; + line_position = -1; cast_origin_x = -1; cast_direction = 0; reel_direction = 0; @@ -203,12 +204,14 @@ void release_cast() { if (is_any_water_at(cast_position)) { line_in_water = true; + line_position = cast_position; catch_chance = 0; fishing_checks_done = 0; fishing_timer.restart(); p.play_stationary("sounds/actions/start_fishing.ogg", false); } else { p.play_stationary("sounds/actions/bad_cast.ogg", false); + line_position = -1; if (random(1, 100) <= FISHING_BAD_CAST_BREAK_CHANCE) { break_fishing_pole("Your fishing pole broke."); return; @@ -234,7 +237,7 @@ void update_waiting_for_fish() { if (catch_chance > 0 && random(1, 100) <= catch_chance) { line_in_water = false; fish_on_line = true; - reel_position = get_random_stream_tile(); + reel_position = (line_position >= 0) ? line_position : get_random_stream_tile(); reel_direction = 0; hooked_fish_type = get_random_fish_type(); speak_with_history("A fish is on the line!", true); @@ -245,6 +248,9 @@ void update_waiting_for_fish() { void start_reeling() { if (!fish_on_line || is_reeling) return; + if (reel_position < 0) { + reel_position = (line_position >= 0) ? line_position : get_random_stream_tile(); + } is_reeling = true; reel_start_direction = (reel_position < x) ? 1 : -1; reel_direction = reel_start_direction; @@ -385,6 +391,7 @@ void update_fishing() { if (line_in_water) { if (ctrl_pressed && !fish_on_line && !is_reeling) { line_in_water = false; + line_position = -1; catch_chance = 0; fishing_checks_done = 0; fishing_timer.restart(); diff --git a/src/player.nvgt b/src/player.nvgt index dce8653..0774a3c 100644 --- a/src/player.nvgt +++ b/src/player.nvgt @@ -42,6 +42,7 @@ bool fish_on_line = false; // Fish caught, reeling phase bool is_reeling = false; // Holding control during reel int cast_position = -1; // Current position of cast cursor int reel_position = -1; // Position of fish during reel +int line_position = -1; // Where the line landed in the water int cast_origin_x = -1; // Player position when casting started int cast_direction = 0; // 1 = moving toward stream, -1 = moving back int reel_direction = 0; // 1 = moving toward player, -1 = moving past diff --git a/src/save_system.nvgt b/src/save_system.nvgt index 1f3fe52..f42565b 100644 --- a/src/save_system.nvgt +++ b/src/save_system.nvgt @@ -179,6 +179,7 @@ void reset_game_state() { is_reeling = false; cast_position = -1; reel_position = -1; + line_position = -1; cast_origin_x = -1; cast_direction = 0; reel_direction = 0;