Should fix infi fish issue

This commit is contained in:
Matthew Kelley
2018-03-25 01:38:27 -05:00
parent bf2d9fd485
commit 3b37884a71
+7 -2
View File
@@ -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