This should be it

Removed special check for plants. Bees undo it all so it's not worth the trouble just yet.
Credit for Crazylemon for being best coder. He helped me find a lot of issues that I would have been too stupid to find myself. Runtimes are gone
This commit is contained in:
taukausanake
2016-06-22 23:03:09 -05:00
parent a33c41f3ab
commit 4b274dd00f
2 changed files with 32 additions and 34 deletions
+18 -24
View File
@@ -323,26 +323,26 @@
~~~~~~~~~~~~~~~*/
/proc/RoundPlantBar(value)
switch(value * 100)
if(91 to INFINITY)
return "max"
if(81 to 90)
return "90"
if(71 to 80)
return "80"
if(61 to 70)
return "70"
if(51 to 60)
return "60"
if(41 to 50)
return "50"
if(31 to 40)
return "40"
if(21 to 30)
return "30"
if(11 to 20)
return "20"
if(1 to 10)
return "10"
if(10 to 20)
return "20"
if(20 to 30)
return "30"
if(30 to 40)
return "40"
if(40 to 50)
return "50"
if(50 to 60)
return "60"
if(60 to 70)
return "70"
if(70 to 80)
return "80"
if(80 to 90)
return "90"
if(90 to INFINITY)
return "max"
else
return "zero"
return "zero"
@@ -357,16 +357,10 @@
/obj/machinery/portable_atmospherics/hydroponics/proc/plant_hud_set_status()
var/image/holder = hud_list[PLANT_STATUS_HUD]
// Dis be drugs here. And special mention plants
var/list/special = list(/datum/seed/nettle, /datum/seed/apple/poison, /datum/seed/ambrosia, /datum/seed/tobacco, /datum/seed/mushroom, \
/datum/seed/weeds, /datum/seed/grass, /datum/seed/kudzu, /datum/seed/diona, /datum/seed/clown)
if (!seed)
holder.icon_state = ""
return
if (harvest)
if (is_type_in_list(seed, special))
holder.icon_state = "hudharvest2"
return
holder.icon_state = "hudharvest"
return
if (dead)
+14 -10
View File
@@ -87,6 +87,17 @@
/obj/machinery/portable_atmospherics/hydroponics/New()
..()
var/datum/atom_hud/data/hydroponic/hydro_hud = huds[DATA_HUD_HYDROPONIC]
prepare_huds()
hydro_hud.add_to_hud(src)
plant_hud_set_nutrient()
plant_hud_set_water()
plant_hud_set_status()
plant_hud_set_health()
plant_hud_set_toxin()
plant_hud_set_pest()
plant_hud_set_weed()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/hydroponics(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
@@ -103,16 +114,6 @@
if(closed_system)
flags &= ~OPENCONTAINER
var/datum/atom_hud/data/hydroponic/hydro_hud = huds[DATA_HUD_HYDROPONIC]
prepare_huds()
hydro_hud.add_to_hud(src)
plant_hud_set_nutrient()
plant_hud_set_water()
plant_hud_set_status()
plant_hud_set_health()
plant_hud_set_toxin()
plant_hud_set_pest()
plant_hud_set_weed()
/obj/machinery/portable_atmospherics/hydroponics/upgraded/New()
..()
@@ -175,6 +176,8 @@
pestlevel = 0
plant_hud_set_status()
plant_hud_set_health()
plant_hud_set_weed()
plant_hud_set_pest()
//Harvests the product of a plant.
/obj/machinery/portable_atmospherics/hydroponics/proc/harvest(var/mob/user)
@@ -618,6 +621,7 @@
user.visible_message("<span class='danger'>[user] starts uprooting the weeds.</span>", "<span class='danger'>You remove the weeds from the [src].</span>")
weedlevel = 0
update_icon()
plant_hud_set_weed()
else
to_chat(user, "<span class='danger'>This plot is completely devoid of weeds. It doesn't need uprooting.</span>")