From ab73add7bde6b7afa0933564b67d11f8f3da090f Mon Sep 17 00:00:00 2001
From: KalevTait <107985691+KalevTait@users.noreply.github.com>
Date: Sun, 10 Jul 2022 13:59:48 +0100
Subject: [PATCH] Code Readability - Hydroponics/lid_state is a bit unclear
(#18235)
* lid_state to lid_open
* lid_open should actually be lid_closed
---
code/modules/hydroponics/hydroponics.dm | 10 +++++-----
code/modules/mob/living/simple_animal/hostile/bees.dm | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm
index 3895f27f6f9..65fef36546b 100644
--- a/code/modules/hydroponics/hydroponics.dm
+++ b/code/modules/hydroponics/hydroponics.dm
@@ -24,7 +24,7 @@
var/obj/item/seeds/myseed = null //The currently planted seed
var/rating = 1
var/wrenchable = TRUE
- var/lid_state = 0
+ var/lid_closed = FALSE
var/recent_bee_visit = FALSE //Have we been visited by a bee recently, so bees dont overpollinate one plant
var/using_irrigation = FALSE //If the tray is connected to other trays via irrigation hoses
var/self_sufficiency_req = 20 //Required total dose to make a self-sufficient hydro tray. 1:1 with earthsblood.
@@ -123,8 +123,8 @@
if(!user || user.stat || user.restrained())
return
- lid_state = !lid_state
- to_chat(user, "You [lid_state ? "close" : "open"] the tray's lid.")
+ lid_closed = !lid_closed
+ to_chat(user, "You [lid_closed ? "close" : "open"] the tray's lid.")
update_icon()
@@ -286,7 +286,7 @@
overlays += image('icons/obj/hydroponics/equipment.dmi', icon_state = "gaia_blessing")
set_light(3)
- if(lid_state)
+ if(lid_closed)
overlays += image('icons/obj/hydroponics/equipment.dmi', icon_state = "hydrocover")
update_icon_hoses()
@@ -924,7 +924,7 @@
/obj/machinery/hydroponics/attack_hand(mob/user)
if(issilicon(user)) //How does AI know what plant is?
return
- if(lid_state)
+ if(lid_closed)
to_chat(user, "You can't reach the plant through the cover.")
return
if(harvest)
diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm
index 63a883b4d00..15c6a87e3da 100644
--- a/code/modules/mob/living/simple_animal/hostile/bees.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bees.dm
@@ -196,7 +196,7 @@
generate_bee_visuals()
/mob/living/simple_animal/hostile/poison/bees/proc/pollinate(obj/machinery/hydroponics/Hydro)
- if(!istype(Hydro) || !Hydro.myseed || Hydro.dead || Hydro.recent_bee_visit || Hydro.lid_state)
+ if(!istype(Hydro) || !Hydro.myseed || Hydro.dead || Hydro.recent_bee_visit || Hydro.lid_closed)
target = null
return