Fish tank

This commit is contained in:
Mechoid
2020-08-01 20:44:18 -07:00
committed by VirgoBot
parent f03b38636d
commit 78b51c58b4
6 changed files with 184 additions and 19 deletions

View File

@@ -31,6 +31,17 @@
/turf/simulated/floor/water
)
var/randomize_location = TRUE
/mob/living/simple_mob/animal/passive/fish/Initialize()
..()
if(!default_pixel_x && randomize_location)
default_pixel_x = rand(-12, 12)
if(!default_pixel_y && randomize_location)
default_pixel_y = rand(-6, 10)
// Makes the AI unable to willingly go on land.
/mob/living/simple_mob/animal/passive/fish/IMove(newloc)
if(is_type_in_list(newloc, suitable_turf_types))
@@ -39,6 +50,11 @@
// Take damage if we are not in water
/mob/living/simple_mob/animal/passive/fish/handle_breathing()
if(istype(loc, /obj/item/glass_jar/fish))
var/obj/item/glass_jar/fish/F = loc
if(F.filled)
return
var/turf/T = get_turf(src)
if(T && !is_type_in_list(T, suitable_turf_types))
if(prob(50))
@@ -178,8 +194,8 @@
dorsal_image.color = dorsal_color
belly_image.color = belly_color
overlays += dorsal_image
overlays += belly_image
add_overlay(dorsal_image)
add_overlay(belly_image)
/datum/category_item/catalogue/fauna/rockfish
name = "Sivian Fauna - Rock Puffer"
@@ -234,6 +250,7 @@
/mob/living/simple_mob/animal/passive/fish/rockfish/Initialize()
..()
head_color = rgb(rand(min_red,max_red), rand(min_green,max_green), rand(min_blue,max_blue))
update_icon()
/mob/living/simple_mob/animal/passive/fish/rockfish/update_icon()
overlays.Cut()
@@ -245,7 +262,7 @@
head_image.color = head_color
overlays += head_image
add_overlay(head_image)
/datum/category_item/catalogue/fauna/solarfish
name = "Sivian Fauna - Solar Fin"