Skip to content

Commit

Permalink
maybe fixes fishing
Browse files Browse the repository at this point in the history
  • Loading branch information
thgvr committed Feb 17, 2024
1 parent acdb1a2 commit 340bfbc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions code/modules/fishing/fish/_fish.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/// What type of reagent this fish needs to be fed.
var/food = /datum/reagent/consumable/nutriment
/// How often the fish needs to be fed
var/feeding_frequency = 20 MINUTES
var/feeding_frequency = 30 MINUTES
/// Time of last feedeing
var/last_feeding

Expand Down Expand Up @@ -263,12 +263,14 @@

/obj/item/fish/proc/process_health(delta_time)
var/health_change_per_second = 0

if(!proper_environment())
health_change_per_second -= 3 //Dying here
if(world.time - last_feeding <= feeding_frequency)
health_change_per_second += 0.5 //Slowly healing
if(world.time - last_feeding >= feeding_frequency)
health_change_per_second -= 0.5 //Starving
else
return
health_change_per_second += 0.5 //Slowly healing

adjust_health(health + health_change_per_second)

/obj/item/fish/proc/adjust_health(amt)
Expand All @@ -291,8 +293,6 @@
return
if(length(aquarium.tracked_fish) >= AQUARIUM_MAX_BREEDING_POPULATION) //so aquariums full of fish don't need to do these expensive checks
return
if(world.time - last_feeding >= feeding_frequency)
return
var/list/other_fish_of_same_type = list()
for(var/obj/item/fish/fish_in_aquarium in aquarium)
if(fish_in_aquarium == src || fish_in_aquarium.type != type)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/fishing/fishing_minigame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
if(reward_path != FISHING_DUD)
playsound(lure, 'sound/effects/bigsplash.ogg', 100)
else
user.balloon_alert(user, "it got away")
user.balloon_alert(user, "it got away!")
SEND_SIGNAL(src, COMSIG_FISHING_CHALLENGE_COMPLETED, user, win, perfect_win)
qdel(src)

Expand Down

0 comments on commit 340bfbc

Please sign in to comment.