This commit is contained in:
Zuhayr
2015-02-21 20:56:55 +10:30
parent 451337476d
commit 0b2ca42600
4 changed files with 14 additions and 16 deletions
@@ -144,3 +144,6 @@ var/global/datum/controller/plants/plant_controller // Set in New().
/datum/controller/plants/proc/add_plant(var/obj/effect/plant/plant)
plant_queue |= plant
/datum/controller/plants/proc/remove_plant(var/obj/effect/plant/plant)
plant_queue -= plant
+4 -11
View File
@@ -34,7 +34,7 @@
/obj/machinery/seed_storage/random // This is mostly for testing, but I guess admins could spawn it
name = "Random seed storage"
scanner = list("stats", "produce", "soil", "temperature", "light", "mutants")
scanner = list("stats", "produce", "soil", "temperature", "light")
starting_seeds = list(/obj/item/seeds/random = 50)
/obj/machinery/seed_storage/garden
@@ -44,7 +44,7 @@
/obj/machinery/seed_storage/xenobotany
name = "Xenobotany seed storage"
scanner = list("stats", "produce", "soil", "temperature", "light", "mutants")
scanner = list("stats", "produce", "soil", "temperature", "light")
starting_seeds = list(/obj/item/seeds/ambrosiavulgarisseed = 3, /obj/item/seeds/appleseed = 3, /obj/item/seeds/amanitamycelium = 2, /obj/item/seeds/bananaseed = 3, /obj/item/seeds/berryseed = 3, /obj/item/seeds/cabbageseed = 3, /obj/item/seeds/carrotseed = 3, /obj/item/seeds/chantermycelium = 3, /obj/item/seeds/cherryseed = 3, /obj/item/seeds/chiliseed = 3, /obj/item/seeds/cocoapodseed = 3, /obj/item/seeds/cornseed = 3, /obj/item/seeds/replicapod = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/glowshroom = 2, /obj/item/seeds/grapeseed = 3, /obj/item/seeds/grassseed = 3, /obj/item/seeds/lemonseed = 3, /obj/item/seeds/libertymycelium = 2, /obj/item/seeds/limeseed = 3, /obj/item/seeds/mtearseed = 2, /obj/item/seeds/nettleseed = 2, /obj/item/seeds/orangeseed = 3, /obj/item/seeds/peanutseed = 3, /obj/item/seeds/plastiseed = 3, /obj/item/seeds/plumpmycelium = 3, /obj/item/seeds/poppyseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/pumpkinseed = 3, /obj/item/seeds/reishimycelium = 2, /obj/item/seeds/riceseed = 3, /obj/item/seeds/soyaseed = 3, /obj/item/seeds/sugarcaneseed = 3, /obj/item/seeds/sunflowerseed = 3, /obj/item/seeds/shandseed = 2, /obj/item/seeds/tobaccoseed = 3, /obj/item/seeds/tomatoseed = 3, /obj/item/seeds/towermycelium = 3, /obj/item/seeds/watermelonseed = 3, /obj/item/seeds/wheatseed = 3, /obj/item/seeds/whitebeetseed = 3)
/obj/machinery/seed_storage/attack_hand(mob/user as mob)
@@ -72,7 +72,7 @@
dat += "<table style='text-align:center;border-style:solid;border-width:1px;padding:4px'><tr><td>Name</td>"
dat += "<td>Variety</td>"
if ("stats" in scanner)
dat += "<td>E</td><td>Y</td><td>L</td><td>M</td><td>Pr</td><td>Pt</td><td>Harvest</td>"
dat += "<td>E</td><td>Y</td><td>M</td><td>Pr</td><td>Pt</td><td>Harvest</td>"
if ("temperature" in scanner)
dat += "<td>Temp</td>"
if ("light" in scanner)
@@ -81,7 +81,7 @@
dat += "<td>Nutri</td><td>Water</td>"
dat += "<td>Notes</td><td>Amount</td><td></td></tr>"
for (var/datum/seed_pile/S in piles)
var/datum/seed/seed = plant_controller.seeds[S.seed_type]
var/datum/seed/seed = S.seed_type
if(!seed)
continue
dat += "<tr>"
@@ -118,13 +118,6 @@
dat += "<td>No</td>"
dat += "<td>"
if ("mutants" in scanner)
if(seed.mutants && seed.mutants.len)
dat += "SUBSP "
if(seed.get_trait(TRAIT_IMMUTABLE) == -1)
dat += "MUT "
else if(seed.get_trait(TRAIT_IMMUTABLE) > 0)
dat += "NOMUT "
switch(seed.get_trait(TRAIT_CARNIVOROUS))
if(1)
dat += "CARN "
@@ -60,6 +60,10 @@
var/last_tick = 0
var/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/plant
/obj/effect/plant/Del()
if(plant_controller)
plant_controller.remove_plant(src)
..()
/obj/effect/plant/single
spread_chance = 0
@@ -218,9 +222,8 @@
if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/scalpel))
if(!seed)
user << "There is nothing to take a sample from in \the [src]."
user << "There is nothing to take a sample from."
return
// Create a sample.
seed.harvest(user,0,1)
health -= (rand(3,5)*10)
else
@@ -250,4 +253,4 @@
die_off()
/obj/effect/plant/proc/is_mature()
return (health < (max_health/3))
return (health >= (max_health/3))
@@ -56,8 +56,7 @@
last_tick = world.time
update_neighbors()
if(neighbors.len && prob(spread_chance))
if(is_mature() && neighbors.len && prob(spread_chance))
for(var/i=1,i<=seed.get_trait(TRAIT_YIELD),i++)
if(prob(spread_chance))
sleep(rand(3,5))