mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-14 08:35:39 +01:00
Tweaks to xenoflora, added plant icons and colours to all plants.
This commit is contained in:
@@ -996,7 +996,7 @@ var/global/floorIsLava = 0
|
||||
|
||||
/datum/admins/proc/spawn_fruit()
|
||||
set category = "Debug"
|
||||
set desc = "(seed index) Spawn the product of a seed."
|
||||
set desc = "Spawn the product of a seed."
|
||||
set name = "Spawn Fruit"
|
||||
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
// *************************************
|
||||
|
||||
/obj/item/weapon/plantspray
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/hydroponics_machines.dmi'
|
||||
item_state = "spray"
|
||||
flags = NOBLUDGEON
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#define HYDRO_SPEED_MULTIPLIER 1
|
||||
var/global/list/plant_icon_cache = list()
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics
|
||||
name = "hydroponics tray"
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/hydroponics_machines.dmi'
|
||||
icon_state = "hydrotray3"
|
||||
density = 1
|
||||
anchored = 1
|
||||
@@ -455,21 +456,40 @@
|
||||
overlays += "over_lowhealth3"
|
||||
|
||||
if(dead)
|
||||
overlays += "[seed.plant_icon]-dead"
|
||||
else if(harvest)
|
||||
overlays += "[seed.plant_icon]-harvest"
|
||||
else if(age < seed.maturation)
|
||||
|
||||
var/t_growthstate
|
||||
if(age >= seed.maturation)
|
||||
t_growthstate = seed.growth_stages
|
||||
else
|
||||
t_growthstate = round(seed.maturation / seed.growth_stages)
|
||||
|
||||
overlays += "[seed.plant_icon]-grow[t_growthstate]"
|
||||
lastproduce = age
|
||||
var/ikey = "[seed.plant_icon]-dead"
|
||||
var/image/dead_overlay = plant_icon_cache["[ikey]"]
|
||||
if(!dead_overlay)
|
||||
dead_overlay = image('icons/obj/hydroponics_growing.dmi', "[ikey]")
|
||||
overlays |= dead_overlay
|
||||
else
|
||||
overlays += "[seed.plant_icon]-grow[seed.growth_stages]"
|
||||
if(!seed.growth_stages)
|
||||
seed.update_growth_stages()
|
||||
if(!seed.growth_stages)
|
||||
world << "<span class='danger'>Seed type [seed.plant_icon] cannot find a growth stage value.</span>"
|
||||
return
|
||||
var/overlay_stage = 1
|
||||
if(age >= seed.maturation)
|
||||
overlay_stage = seed.growth_stages
|
||||
lastproduce = age
|
||||
else
|
||||
overlay_stage = max(1,round(seed.maturation / seed.growth_stages))
|
||||
|
||||
var/ikey = "[seed.plant_icon]-[overlay_stage]"
|
||||
var/image/plant_overlay = plant_icon_cache["[ikey]-[seed.plant_colour]"]
|
||||
if(!plant_overlay)
|
||||
plant_overlay = image('icons/obj/hydroponics_growing.dmi', "[ikey]")
|
||||
plant_overlay.color = seed.plant_colour
|
||||
plant_icon_cache["[ikey]-[seed.plant_colour]"] = plant_overlay
|
||||
overlays |= plant_overlay
|
||||
|
||||
if(harvest)
|
||||
ikey = "[seed.product_icon]"
|
||||
var/image/harvest_overlay = plant_icon_cache["product-[ikey]-[seed.product_colour]"]
|
||||
if(!harvest_overlay)
|
||||
harvest_overlay = image('icons/obj/hydroponics_products.dmi', "[ikey]")
|
||||
harvest_overlay.color = seed.product_colour
|
||||
plant_icon_cache["product-[ikey]-[seed.product_colour]"] = harvest_overlay
|
||||
overlays |= harvest_overlay
|
||||
|
||||
//Draw the cover.
|
||||
if(closed_system)
|
||||
@@ -793,7 +813,6 @@
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil
|
||||
name = "soil"
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon_state = "soil"
|
||||
density = 0
|
||||
use_power = 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
/obj/item/weapon/disk/botany
|
||||
name = "flora data disk"
|
||||
desc = "A small disk used for carrying data on plant genetics."
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/hydroponics_machines.dmi'
|
||||
icon_state = "disk"
|
||||
w_class = 1.0
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
new /obj/item/weapon/disk/botany(src)
|
||||
|
||||
/obj/machinery/botany
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/hydroponics_machines.dmi'
|
||||
icon_state = "hydrotray3"
|
||||
density = 1
|
||||
anchored = 1
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
if(istype(W,/obj/item/weapon/screwdriver))
|
||||
open = !open
|
||||
user << "\blue You [open ? "open" : "close"] the maintenance panel."
|
||||
user << "<span class='notice'>You [open ? "open" : "close"] the maintenance panel.</span>"
|
||||
return
|
||||
|
||||
if(open)
|
||||
|
||||
@@ -132,13 +132,13 @@
|
||||
lastproduce = age
|
||||
|
||||
if(harvest)
|
||||
var/image/fruit_overlay = image('icons/obj/hydroponics.dmi',"")
|
||||
var/image/fruit_overlay = image('icons/obj/hydroponics_vines.dmi',"")
|
||||
if(seed.product_colour)
|
||||
fruit_overlay.color = seed.product_colour
|
||||
overlays += fruit_overlay
|
||||
|
||||
if(seed.flowers)
|
||||
var/image/flower_overlay = image('icons/obj/hydroponics.dmi',"[seed.flower_icon]")
|
||||
var/image/flower_overlay = image('icons/obj/hydroponics_vines.dmi',"[seed.flower_icon]")
|
||||
if(seed.flower_colour)
|
||||
flower_overlay.color = seed.flower_colour
|
||||
overlays += flower_overlay
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
/obj/item/weapon/reagent_containers/spray/plantbgone // -- Skie
|
||||
name = "Plant-B-Gone"
|
||||
desc = "Kills those pesky weeds!"
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/hydroponics_machines.dmi'
|
||||
icon_state = "plantbgone"
|
||||
item_state = "plantbgone"
|
||||
volume = 100
|
||||
|
||||
Reference in New Issue
Block a user