Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit265
This commit is contained in:
@@ -141,8 +141,9 @@
|
||||
endurance = 50
|
||||
maturation = 3
|
||||
yield = 4
|
||||
growthstages = 3
|
||||
growthstages = 2
|
||||
reagents_add = list("sugar" = 0.25)
|
||||
mutatelist = list(/obj/item/seeds/bamboo)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/sugarcane
|
||||
seed = /obj/item/seeds/sugarcane
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
blood_type = B.data["blood_type"]
|
||||
features = B.data["features"]
|
||||
factions = B.data["factions"]
|
||||
factions = B.data["quirks"]
|
||||
quirks = B.data["quirks"]
|
||||
contains_sample = TRUE
|
||||
visible_message("<span class='notice'>The [src] is injected with a fresh blood sample.</span>")
|
||||
else
|
||||
|
||||
@@ -98,6 +98,49 @@
|
||||
/obj/item/grown/log/steel/CheckAccepted(obj/item/I)
|
||||
return FALSE
|
||||
|
||||
/obj/item/seeds/bamboo
|
||||
name = "pack of bamboo seeds"
|
||||
desc = "A plant known for its flexible and resistant logs."
|
||||
icon_state = "seed-bamboo"
|
||||
species = "bamboo"
|
||||
plantname = "Bamboo"
|
||||
product = /obj/item/grown/log/bamboo
|
||||
lifespan = 80
|
||||
endurance = 70
|
||||
maturation = 15
|
||||
production = 2
|
||||
yield = 5
|
||||
potency = 50
|
||||
growthstages = 2
|
||||
growing_icon = 'icons/obj/hydroponics/growing.dmi'
|
||||
icon_dead = "bamboo-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
|
||||
/obj/item/grown/log/bamboo
|
||||
seed = /obj/item/seeds/bamboo
|
||||
name = "bamboo log"
|
||||
desc = "A long and resistant bamboo log."
|
||||
icon_state = "bamboo"
|
||||
plank_type = /obj/item/stack/sheet/mineral/bamboo
|
||||
plank_name = "bamboo sticks"
|
||||
|
||||
/obj/item/grown/log/bamboo/CheckAccepted(obj/item/I)
|
||||
return FALSE
|
||||
|
||||
/obj/structure/punji_sticks
|
||||
name = "punji sticks"
|
||||
desc = "Don't step on this."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "punji"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 30
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/punji_sticks/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/caltrop, 20, 30, 100, CALTROP_BYPASS_SHOES)
|
||||
|
||||
/////////BONFIRES//////////
|
||||
|
||||
/obj/structure/bonfire
|
||||
|
||||
@@ -380,7 +380,11 @@
|
||||
pestlevel = 0 // Reset
|
||||
update_icon()
|
||||
visible_message("<span class='warning'>The [oldPlantName] is overtaken by some [myseed.plantname]!</span>")
|
||||
|
||||
name = "hydroponics tray ([myseed.plantname])"
|
||||
if(myseed.product)
|
||||
desc = initial(myseed.product.desc)
|
||||
else
|
||||
desc = initial(desc)
|
||||
|
||||
/obj/machinery/hydroponics/proc/mutate(lifemut = 2, endmut = 5, productmut = 1, yieldmut = 2, potmut = 25, wrmut = 2, wcmut = 5, traitmut = 0) // Mutates the current seed
|
||||
if(!myseed)
|
||||
@@ -414,7 +418,11 @@
|
||||
sleep(5) // Wait a while
|
||||
update_icon()
|
||||
visible_message("<span class='warning'>[oldPlantName] suddenly mutates into [myseed.plantname]!</span>")
|
||||
|
||||
name = "hydroponics tray ([myseed.plantname])"
|
||||
if(myseed.product)
|
||||
desc = initial(myseed.product.desc)
|
||||
else
|
||||
desc = initial(desc)
|
||||
|
||||
/obj/machinery/hydroponics/proc/mutateweed() // If the weeds gets the mutagent instead. Mind you, this pretty much destroys the old plant
|
||||
if( weedlevel > 5 )
|
||||
@@ -769,6 +777,15 @@
|
||||
to_chat(user, "<span class='notice'>You plant [O].</span>")
|
||||
dead = 0
|
||||
myseed = O
|
||||
name = "hydroponics tray ([myseed.plantname])"
|
||||
if(!myseed.productdesc) //we haven't changed our produce's description
|
||||
if(myseed.product)
|
||||
myseed.productdesc = initial(myseed.product.desc)
|
||||
else if(myseed.desc)
|
||||
myseed.productdesc = myseed.desc
|
||||
else
|
||||
myseed.productdesc = "A fascinating specimen."
|
||||
desc = myseed.productdesc
|
||||
age = 1
|
||||
plant_health = myseed.endurance
|
||||
lastcycle = world.time
|
||||
@@ -834,6 +851,8 @@
|
||||
harvest = FALSE //To make sure they can't just put in another seed and insta-harvest it
|
||||
qdel(myseed)
|
||||
myseed = null
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
weedlevel = 0 //Has a side effect of cleaning up those nasty weeds
|
||||
update_icon()
|
||||
|
||||
@@ -866,6 +885,8 @@
|
||||
qdel(myseed)
|
||||
myseed = null
|
||||
update_icon()
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
else
|
||||
if(user)
|
||||
examine(user)
|
||||
@@ -883,6 +904,8 @@
|
||||
qdel(myseed)
|
||||
myseed = null
|
||||
dead = 0
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
update_icon()
|
||||
|
||||
/// Tray Setters - The following procs adjust the tray or plants variables, and make sure that the stat doesn't go out of bounds.///
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
var/plantname = "Plants" // Name of plant when planted.
|
||||
var/product // A type path. The thing that is created when the plant is harvested.
|
||||
var/obj/item/product // A type path. The thing that is created when the plant is harvested.
|
||||
var/productdesc
|
||||
var/species = "" // Used to update icons. Should match the name in the sprites unless all icon_* are overridden.
|
||||
|
||||
var/growing_icon = 'icons/obj/hydroponics/growing.dmi' //the file that stores the sprites of the growing plant from this seed.
|
||||
@@ -69,6 +70,10 @@
|
||||
genes += new /datum/plant_gene/reagent(reag_id, reagents_add[reag_id])
|
||||
reagents_from_genes() //quality coding
|
||||
|
||||
/obj/item/seeds/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Use a pen on it to rename it or change its description.</span>"
|
||||
|
||||
/obj/item/seeds/proc/Copy()
|
||||
var/obj/item/seeds/S = new type(null, 1)
|
||||
// Copy all the stats
|
||||
@@ -80,6 +85,10 @@
|
||||
S.potency = potency
|
||||
S.weed_rate = weed_rate
|
||||
S.weed_chance = weed_chance
|
||||
S.name = name
|
||||
S.plantname = plantname
|
||||
S.desc = desc
|
||||
S.productdesc = productdesc
|
||||
S.genes = list()
|
||||
for(var/g in genes)
|
||||
var/datum/plant_gene/G = g
|
||||
@@ -157,11 +166,18 @@
|
||||
var/product_name
|
||||
while(t_amount < getYield())
|
||||
var/obj/item/reagent_containers/food/snacks/grown/t_prod = new product(output_loc, src)
|
||||
if(parent.myseed.plantname != initial(parent.myseed.plantname))
|
||||
t_prod.name = lowertext(parent.myseed.plantname)
|
||||
if(productdesc)
|
||||
t_prod.desc = productdesc
|
||||
t_prod.seed.name = parent.myseed.name
|
||||
t_prod.seed.desc = parent.myseed.desc
|
||||
t_prod.seed.plantname = parent.myseed.plantname
|
||||
result.Add(t_prod) // User gets a consumable
|
||||
if(!t_prod)
|
||||
return
|
||||
t_amount++
|
||||
product_name = t_prod.name
|
||||
product_name = parent.myseed.plantname
|
||||
if(getYield() >= 1)
|
||||
SSblackbox.record_feedback("tally", "food_harvested", getYield(), product_name)
|
||||
parent.update_tray(user)
|
||||
@@ -331,14 +347,56 @@
|
||||
to_chat(user, "<span class='notice'>[text]</span>")
|
||||
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/pen))
|
||||
var/choice = input("What would you like to change?") in list("Plant Name", "Seed Description", "Product Description", "Cancel")
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
switch(choice)
|
||||
if("Plant Name")
|
||||
var/newplantname = reject_bad_text(stripped_input(user, "Write a new plant name:", name, plantname))
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if (length(newplantname) > 20)
|
||||
to_chat(user, "That name is too long!")
|
||||
return
|
||||
if(!newplantname)
|
||||
to_chat(user, "That name is invalid.")
|
||||
return
|
||||
else
|
||||
name = "[lowertext(newplantname)]"
|
||||
plantname = newplantname
|
||||
if("Seed Description")
|
||||
var/newdesc = stripped_input(user, "Write a new description:", name, desc)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if (length(newdesc) > 180)
|
||||
to_chat(user, "That description is too long!")
|
||||
return
|
||||
if(!newdesc)
|
||||
to_chat(user, "That description is invalid.")
|
||||
return
|
||||
else
|
||||
desc = newdesc
|
||||
if("Product Description")
|
||||
if(product && !productdesc)
|
||||
productdesc = initial(product.desc)
|
||||
var/newproductdesc = stripped_input(user, "Write a new description:", name, productdesc)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if (length(newproductdesc) > 180)
|
||||
to_chat(user, "That description is too long!")
|
||||
return
|
||||
if(!newproductdesc)
|
||||
to_chat(user, "That description is invalid.")
|
||||
return
|
||||
else
|
||||
productdesc = newproductdesc
|
||||
else
|
||||
return
|
||||
|
||||
..() // Fallthrough to item/attackby() so that bags can pick seeds up
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Checks plants for broken tray icons. Use Advanced Proc Call to activate.
|
||||
// Maybe some day it would be used as unit test.
|
||||
/proc/check_plants_growth_stages_icons()
|
||||
|
||||
Reference in New Issue
Block a user