From 0fbd36436b64ec95400a36a1dc1d6dfba3d58070 Mon Sep 17 00:00:00 2001 From: adacovsk <94659603+adacovsk@users.noreply.github.com> Date: Sat, 21 May 2022 07:10:39 -0400 Subject: [PATCH] tanks --- __DEFINES/reagents.dm | 2 +- code/modules/fish/fish_tank.dm | 32 +++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/__DEFINES/reagents.dm b/__DEFINES/reagents.dm index d7c9b5623bd..53b91f67c51 100644 --- a/__DEFINES/reagents.dm +++ b/__DEFINES/reagents.dm @@ -547,7 +547,7 @@ var/list/cheartstopper = list(/*"potassium_chloride",*/ CHEESYGLOOP) //this stop #define LEXORINS list(LEXORIN, CORIAMYRTIN) #define DEXALINS list(DEXALIN, THYMOL) #define PETRITRICINCURES list(SACID, PACID, FORMIC_ACID, PACID, PHENOL, ACIDSPIT, ACIDTEA) -#define WATERS list(WATER, HOLYWATER) +#define WATERS list(WATER, HOLYWATER, ICE) #define CORES list(SOFTCORES, MEDCORES) #define ALLNANITES list(NANITES, AUTISTNANITES) diff --git a/code/modules/fish/fish_tank.dm b/code/modules/fish/fish_tank.dm index 65c1b5b5a4f..0821551d6ec 100644 --- a/code/modules/fish/fish_tank.dm +++ b/code/modules/fish/fish_tank.dm @@ -52,6 +52,7 @@ var/leaking = NO_LEAK var/shard_count = 0 // Number of glass shards to salvage when broken (1 less than the number of sheets to build the tank) var/automated = 0 // Cleans the aquarium on its own + var/acidic = FALSE /obj/machinery/fishtank/bowl name = "fish bowl" @@ -234,12 +235,15 @@ water_type = "clean" if (FILTH_THRESHOLD to MAX_FILTH) water_type = "dirty" - - switch (water_level/water_capacity) - if (0.01 to 0.85) // Lest there can be fish in waterless environements - overlays += icon('icons/obj/fish_items.dmi', "over_[tank_type]_half_[water_type]", WATER_LAYER) - if (0.85 to 1) - overlays += icon('icons/obj/fish_items.dmi', "over_[tank_type]_full_[water_type]", WATER_LAYER) + // Lest there can be fish in waterless environments + if(!acidic && water_level/water_capacity < 0.85)) + overlays += icon('icons/obj/fish_items.dmi', "over_[tank_type]_half_[water_type]", WATER_LAYER) + else if (!acidic) + overlays += icon('icons/obj/fish_items.dmi', "over_[tank_type]_full_[water_type]", WATER_LAYER) + else if (water_level/water_capacity < 0.85) + overlays += icon('icons/obj/fish_items.dmi', "over_[tank_type]_full_[water_type]_acidic", WATER_LAYER) + else + overlays += icon('icons/obj/fish_items.dmi', "over_[tank_type]_full_[water_type]_acidic", WATER_LAYER) ////////////////////////////// // PROCESS PROC // @@ -670,10 +674,20 @@ //Containers with any reagents will get dumped in if(C.reagents.total_volume) var/water_value = 0 - water_value += C.reagents.get_reagent_amount(WATER) //Water is full value - water_value += C.reagents.get_reagent_amount(HOLYWATER) *1.1 //Holywater is (somehow) better. Who said religion had to make sense? + if(C.reagents.get_reagent_amount(WATERS) > 0 && acidic) + acidic = FALSE + water_value += C.reagents.get_reagent_amount(WATER) //Water is full value + water_value += C.reagents.get_reagent_amount(HOLYWATER) *1.1 //Holywater is (somehow) better. Who said religion had to make sense? + water_value += C.reagents.get_reagent_amount(ICE) * 0.80 //Ice is 80% value + else if(C.reagents.get_reagent_amount(PACIDS) > 0 || C.reagents.get_reagent_amount(SACIDS) > 0 && !acidic) + acidic = TRUE + water_value += C.reagents.get_reagent_amount(PACIDS) * 2 + water_value += C.reagents.get_reagent_amount(SACIDS) + else + water_value += C.reagents.get_reagent_amount(WATER) + water_value += C.reagents.get_reagent_amount(HOLYWATER) *1.1 + water_value += C.reagents.get_reagent_amount(ICE) * 0.80 - water_value += C.reagents.get_reagent_amount(ICE) * 0.80 //Ice is 80% value var/message = "" if(!water_value) //The container has no water value, clear everything in it message = "The filtration process removes everything, leaving the water level unchanged."