Slows Plant Aging

Now with a define instead of a magic number for easy tweaking.
This commit is contained in:
FalseIncarnate
2017-02-12 23:22:02 -05:00
parent 525ecaef8e
commit 030dba205d
+10 -2
View File
@@ -1,3 +1,5 @@
#define HYDRO_CYCLES_PER_AGE 3 //Adjust this to adjust how many hydroponics cycles it takes to increase age. Positive integers only.
/obj/machinery/hydroponics
name = "hydroponics tray"
icon = 'icons/obj/hydroponics/equipment.dmi'
@@ -20,6 +22,7 @@
var/lastproduce = 0 //Last time it was harvested
var/lastcycle = 0 //Used for timing of cycles.
var/cycledelay = 200 //About 10 seconds / cycle
var/current_cycle = 0 //Used for tracking when to age
var/harvest = 0 //Ready to harvest?
var/obj/item/seeds/myseed = null //The currently planted seed
var/rating = 1
@@ -136,7 +139,10 @@
lastcycle = world.time
if(myseed && !dead)
// Advance age
age++
current_cycle++
if(current_cycle == HYDRO_CYCLES_PER_AGE)
age++
current_cycle = 0
if(age < myseed.maturation)
lastproduce = age
@@ -1013,4 +1019,6 @@
to_chat(user, "<span class='notice'>You clear up [src]!</span>")
qdel(src)
else
..()
..()
#undefine HYDRO_CYCLES_PER_AGE