Initial implementation of fishing system. A couple bugs fixed, e.g. zombies that are killed by residents actually die.

This commit is contained in:
Storm Dragon
2026-01-24 14:01:38 -05:00
parent 63cf759002
commit 0d711095c1
23 changed files with 837 additions and 47 deletions
+4 -1
View File
@@ -30,6 +30,7 @@ sound_pool p(300);
#include "src/save_system.nvgt"
#include "src/base_system.nvgt"
#include "src/time_system.nvgt"
#include "src/fishing.nvgt"
#include "src/weather.nvgt"
#include "src/audio_utils.nvgt"
#include "src/creature_audio.nvgt"
@@ -400,6 +401,8 @@ void main()
search_timer.restart();
perform_search(x);
}
update_fishing();
// Sling charge detection
if (sling_equipped && (key_down(KEY_LCTRL) || key_down(KEY_RCTRL)) && !sling_charging) {
@@ -434,7 +437,7 @@ void main()
if (spear_equipped) attack_cooldown = 800;
if (axe_equipped) attack_cooldown = 1600;
if((key_down(KEY_LCTRL) || key_down(KEY_RCTRL)) && attack_timer.elapsed > attack_cooldown)
if(!fishing_pole_equipped && (key_down(KEY_LCTRL) || key_down(KEY_RCTRL)) && attack_timer.elapsed > attack_cooldown)
{
attack_timer.restart();
perform_attack(x);