From 3b37884a710ec1a5134bca40841e45a52c9bdde5 Mon Sep 17 00:00:00 2001 From: Matthew Kelley Date: Thu, 22 Mar 2018 02:21:47 -0500 Subject: [PATCH 1/2] Should fix infi fish issue --- code/modules/fish/fishtank.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm index 16ec28dc929..13918fc6ff6 100644 --- a/code/modules/fish/fishtank.dm +++ b/code/modules/fish/fishtank.dm @@ -313,14 +313,19 @@ egg_list.Cut() //Destroy any excess eggs, clearing the egg_list /obj/machinery/fishtank/proc/harvest_fish(var/mob/user) - if(!fish_count) //Can't catch non-existant fish! + if(fish_count = 0) //Can't catch non-existant fish! to_chat(usr, "There are no fish in \the [src] to catch!") + else if(fish_count < 0) + to_chat(usr, "Alert adminds to this bug.") return var/list/fish_names_list = list() for(var/datum/fish/fish_type in fish_list) fish_names_list += list("[fish_type.fish_name]" = fish_type) var/caught_fish = input("Select a fish to catch.", "Fishing") as null|anything in fish_names_list //Select a fish from the tank - if(caught_fish) + if(fish_count = 0) + to_chat(usr, "There are no fish in \the [src] to catch!") + return + else(caught_fish) user.visible_message("[user.name] harvests \a [caught_fish] from \the [src].", "You scoop \a [caught_fish] out of \the [src].") var/datum/fish/fish_type = fish_names_list[caught_fish] var/fish_item = fish_type.fish_item From 589c2d17a125ae1d926c5514650050aa6a8cc48d Mon Sep 17 00:00:00 2001 From: Matthew Kelley Date: Thu, 22 Mar 2018 15:41:27 -0500 Subject: [PATCH 2/2] = is not == FailFish --- code/modules/fish/fishtank.dm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm index 13918fc6ff6..82bb656f4fe 100644 --- a/code/modules/fish/fishtank.dm +++ b/code/modules/fish/fishtank.dm @@ -313,19 +313,17 @@ egg_list.Cut() //Destroy any excess eggs, clearing the egg_list /obj/machinery/fishtank/proc/harvest_fish(var/mob/user) - if(fish_count = 0) //Can't catch non-existant fish! + if(fish_count <= 0) //Can't catch non-existant fish! to_chat(usr, "There are no fish in \the [src] to catch!") - else if(fish_count < 0) - to_chat(usr, "Alert adminds to this bug.") return var/list/fish_names_list = list() for(var/datum/fish/fish_type in fish_list) fish_names_list += list("[fish_type.fish_name]" = fish_type) var/caught_fish = input("Select a fish to catch.", "Fishing") as null|anything in fish_names_list //Select a fish from the tank - if(fish_count = 0) + if(fish_count <= 0) to_chat(usr, "There are no fish in \the [src] to catch!") return - else(caught_fish) + else if(caught_fish) user.visible_message("[user.name] harvests \a [caught_fish] from \the [src].", "You scoop \a [caught_fish] out of \the [src].") var/datum/fish/fish_type = fish_names_list[caught_fish] var/fish_item = fish_type.fish_item