mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Item Plants, Grown Weapons, Botany Fixes/Changes
Botany plants can grow preset items, mobs, or fruit - Turns out that the code for mob harvestables could be used almost unchanged to support item harvestables - Changed some variable names to better reflect this Re-introduces the Egg Plant! - Grow eggs to throw at the security officer who confiscated your ambrosia! - Mutant species of Eggplants - Exactly the same as eggs laid by chickens, except they shouldn't hatch Adjusts code and logic order to avoid a conflict with TRAIT_SPREAD fruits that can be converted into other items - Grass, aloe, and comfrey were either unable to be converted or unable to be planted outside a tray if they had TRAIT_SPREAD due to logic ordering - You must now be in DISARM intent to plant spreading fruits - Being in HELP or GRAB will attempt to convert the fruit into a poultice or other item as appropriate. - If the plant does not have TRAIT_SPREAD, you may also use DISARM to accomplish this Adds Money Trees! - Literally grows money-filled fruit called Cashpods - Fruit contains gold and silver reagents, or can be turned into space cash by using it in-hand like grass or aloe - Value of the resulting space cash is related to potency. Higher potency = higher dosh! - Eating the fruit doesn't give you money, but may fill you with guilt (not really). - Mutant species of lemons. - When life gives you lemons... Adds the ability to convert sunflowers and novaflowers into their "weapon" forms - Done exactly the same as converting grass, aloe, comfrey, or cashpods (use in-hand on help/grab intent) - Sunflower conversion is silent, though the item description changes - Novaflower conversion is not silent. You'll know when it happens. - Hitting someone with a sunflower (weapon form) or novaflower (weapon form) will assault both parties with a green and yellow message. FLOWER POWER! - Hitting someone with a novaflower (weapon form) will increase their body temperature, and may cause burns as a result - Picking up a novaflower (weapon form) without gloves will cause burns, but doesn't drop the flower. COMPLETELY DELETES the code\objects\items\weapons\hydroponics.dm file - This file was 90% commented out already, and I moved the remaining code into code\modules\hydroponics\grown_inedible.dm for organization - This affects the .dme by removing a single line as the file is no longer included.
This commit is contained in:
@@ -113,7 +113,7 @@
|
||||
descriptors |= "hallucinogenic"
|
||||
if(reagents.has_reagent("styptic_powder"))
|
||||
descriptors |= "medicinal"
|
||||
if(reagents.has_reagent("gold"))
|
||||
if(reagents.has_reagent("gold") || reagents.has_reagent("silver"))
|
||||
descriptors |= "shiny"
|
||||
if(reagents.has_reagent("lube"))
|
||||
descriptors |= "slippery"
|
||||
@@ -377,22 +377,7 @@
|
||||
if(src) qdel(src)
|
||||
return
|
||||
|
||||
if(seed.kitchen_tag == "grass")
|
||||
user.show_message("<span class='notice'>You make a grass tile out of \the [src]!</span>", 1)
|
||||
for(var/i=0,i<2,i++)
|
||||
var/obj/item/stack/tile/grass/G = new (user.loc)
|
||||
G.color = seed.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
for (var/obj/item/stack/tile/grass/NG in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
if(NG.amount>=NG.max_amount)
|
||||
continue
|
||||
NG.attackby(G, user)
|
||||
user << "You add the newly-formed grass to the stack. It now contains [G.amount] tiles."
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(seed.get_trait(TRAIT_SPREAD) > 0)
|
||||
if(user.a_intent == I_DISARM && seed.get_trait(TRAIT_SPREAD) > 0) //Using disarm so we can tell if you want to plant or convert non-final plants
|
||||
user << "<span class='notice'>You plant the [src.name].</span>"
|
||||
new /obj/machinery/portable_atmospherics/hydroponics/soil/invisible(get_turf(user),src.seed)
|
||||
new /obj/effect/plant(get_turf(user), src.seed)
|
||||
@@ -400,7 +385,7 @@
|
||||
return
|
||||
|
||||
|
||||
if(seed.kitchen_tag)
|
||||
if(!seed.final_form) //This isn't even my final form! (sorry, it had to be done)
|
||||
switch(seed.kitchen_tag)
|
||||
if("comfrey")
|
||||
var/obj/item/stack/medical/bruise_pack/comfrey/poultice = new /obj/item/stack/medical/bruise_pack/comfrey(user.loc)
|
||||
@@ -414,7 +399,70 @@
|
||||
user << "<span class='notice'>You mash the petals into a poultice.</span>"
|
||||
qdel(src)
|
||||
return
|
||||
if("grass")
|
||||
user.show_message("<span class='notice'>You make a grass tile out of \the [src]!</span>", 1)
|
||||
for(var/i=0,i<2,i++)
|
||||
var/obj/item/stack/tile/grass/G = new (user.loc)
|
||||
G.color = seed.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
for (var/obj/item/stack/tile/grass/NG in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
if(NG.amount>=NG.max_amount)
|
||||
continue
|
||||
NG.attackby(G, user)
|
||||
user << "You add the newly-formed grass to the stack. It now contains [G.amount] tiles."
|
||||
qdel(src)
|
||||
return
|
||||
if("sunflower")
|
||||
var/obj/item/weapon/grown/sunflower/SF = new /obj/item/weapon/grown/sunflower(user.loc)
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(SF)
|
||||
qdel(src)
|
||||
return
|
||||
if("novaflower")
|
||||
var/obj/item/weapon/grown/novaflower/NF = new /obj/item/weapon/grown/novaflower(user.loc)
|
||||
user.say("PRAISE THE SUN!")
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(NF)
|
||||
qdel(src)
|
||||
return
|
||||
if("cashpod")
|
||||
user << "You crack open the cash pod..."
|
||||
var/value = round(seed.get_trait(TRAIT_POTENCY))
|
||||
var/dosh
|
||||
user.unEquip(src)
|
||||
switch(value)
|
||||
if(0)
|
||||
user << "It's empty! What a waste..."
|
||||
if(1 to 10)
|
||||
user << "It's got a space dollar inside. Woo."
|
||||
dosh = new /obj/item/weapon/spacecash(user.loc)
|
||||
if(11 to 20)
|
||||
user << "It's got 10 space dollars inside!"
|
||||
dosh = new /obj/item/weapon/spacecash/c10(user.loc)
|
||||
if(21 to 30)
|
||||
user << "It's got 20 space dollars inside! Cool!"
|
||||
dosh = new /obj/item/weapon/spacecash/c20(user.loc)
|
||||
if(31 to 40)
|
||||
user << "It's got 50 space dollars inside! Nice!"
|
||||
dosh = new /obj/item/weapon/spacecash/c50(user.loc)
|
||||
if(41 to 50)
|
||||
user << "It's got 100 space dollars inside! Sweet!"
|
||||
dosh = new /obj/item/weapon/spacecash/c100(user.loc)
|
||||
if(51 to 60)
|
||||
user << "It's got 200 space dollars inside! Awesome!"
|
||||
dosh = new /obj/item/weapon/spacecash/c200(user.loc)
|
||||
if(61 to 80)
|
||||
user << "It's got 500 space dollars inside! CHA-CHING!"
|
||||
dosh = new /obj/item/weapon/spacecash/c500(user.loc)
|
||||
else
|
||||
user << "It's got 1000 space dollars inside! JACKPOT!"
|
||||
dosh = new /obj/item/weapon/spacecash/c1000(user.loc)
|
||||
|
||||
if(dosh)
|
||||
user.put_in_hands(dosh)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/pickup(mob/user)
|
||||
..()
|
||||
|
||||
@@ -84,3 +84,47 @@
|
||||
throwforce = 0
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
|
||||
// Sunflower
|
||||
|
||||
/obj/item/weapon/grown/sunflower
|
||||
name = "sunflower"
|
||||
desc = "A large, fresh-grown sunflower. How cheery!"
|
||||
icon = 'icons/obj/harvest.dmi'
|
||||
icon_state = "sunflower"
|
||||
item_state = "sunflower"
|
||||
w_class = 2.0
|
||||
throwforce = 0
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
/obj/item/weapon/grown/sunflower/attack(mob/M as mob, mob/user as mob)
|
||||
M << "<font color='green'><b> [user] smacks you with a [name]!</font><font color='yellow'><b>FLOWER POWER<b></font>"
|
||||
user << "<font color='green'> Your [name]'s </font><font color='yellow'><b>FLOWER POWER</b></font><font color='green'> strikes [M]</font>"
|
||||
|
||||
|
||||
// Novaflower
|
||||
|
||||
/obj/item/weapon/grown/novaflower
|
||||
name = "novaflower"
|
||||
desc = "A large, fresh-grown novaflower. It seems to radiate heat."
|
||||
icon = 'icons/obj/harvest.dmi'
|
||||
icon_state = "novaflower"
|
||||
item_state = "sunflower"
|
||||
w_class = 2.0
|
||||
throwforce = 0
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
/obj/item/weapon/grown/novaflower/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
M << "<font color='green'>[user] smacks you with a [name]!</font><font color='yellow'><b>FLOWER POWER</b></font>"
|
||||
user << "<font color='green'> Your [name]'s </font><font color='yellow'><b>FLOWER POWER</b></font><font color='green'> strikes [M]</font>"
|
||||
if(istype(M, /mob/living))
|
||||
M << "<span class='warning'>You are heated by the warmth of the of the [name]!</span>"
|
||||
M.bodytemperature += potency/2 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
|
||||
/obj/item/weapon/grown/novaflower/pickup(mob/living/carbon/human/user as mob)
|
||||
if(!user.gloves)
|
||||
user << "<span class='warning'>The [name] burns your bare hand!</span>"
|
||||
user.adjustFireLoss(rand(1,5))
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
var/kitchen_tag // Used by the reagent grinder.
|
||||
var/trash_type // Garbage item produced when eaten.
|
||||
var/splat_type = /obj/effect/decal/cleanable/fruit_smudge // Graffiti decal.
|
||||
var/has_mob_product
|
||||
var/preset_product
|
||||
var/final_form = 1
|
||||
var/modular_icon = 0 // Dictates if the product uses a modular sprite. 0 = preset, 1 = modular
|
||||
var/preset_icon = "undef" // Name of the iconstate in icon/obj/harvest.dmi to use for preset sprite
|
||||
// Make sure to set this to the correct icon if not using a modular sprite
|
||||
@@ -650,8 +651,8 @@
|
||||
consume_gasses |= new_gasses
|
||||
gene.values["[TRAIT_CONSUME_GASSES]"] = null
|
||||
if(GENE_METABOLISM)
|
||||
has_mob_product = gene.values["mob_product"]
|
||||
gene.values["mob_product"] = null
|
||||
preset_product = gene.values["alt_product"]
|
||||
gene.values["alt_product"] = null
|
||||
|
||||
for(var/trait in gene.values)
|
||||
set_trait(trait,gene.values["[trait]"])
|
||||
@@ -680,7 +681,7 @@
|
||||
if(GENE_HARDINESS)
|
||||
traits_to_copy = list(TRAIT_TOXINS_TOLERANCE,TRAIT_PEST_TOLERANCE,TRAIT_WEED_TOLERANCE,TRAIT_ENDURANCE)
|
||||
if(GENE_METABOLISM)
|
||||
P.values["mob_product"] = has_mob_product
|
||||
P.values["alt_product"] = preset_product
|
||||
traits_to_copy = list(TRAIT_REQUIRES_NUTRIENTS,TRAIT_REQUIRES_WATER,TRAIT_ALTER_TEMP)
|
||||
if(GENE_VIGOUR)
|
||||
traits_to_copy = list(TRAIT_PRODUCTION,TRAIT_MATURATION,TRAIT_YIELD,TRAIT_SPREAD)
|
||||
@@ -740,14 +741,13 @@
|
||||
currently_querying = list()
|
||||
for(var/i = 0;i<total_yield;i++)
|
||||
var/obj/item/product
|
||||
if(has_mob_product)
|
||||
product = new has_mob_product(get_turf(user),name)
|
||||
if(preset_product)
|
||||
product = new preset_product(get_turf(user),name)
|
||||
else
|
||||
product = new /obj/item/weapon/reagent_containers/food/snacks/grown(get_turf(user),name)
|
||||
if(get_trait(TRAIT_PRODUCT_COLOUR))
|
||||
if(modular_icon == 1)
|
||||
if(!has_mob_product || (has_mob_product && has_mob_product != /mob/living/simple_animal/diona))
|
||||
product.color = get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
product.color = get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
if(istype(product,/obj/item/weapon/reagent_containers/food))
|
||||
var/obj/item/weapon/reagent_containers/food/food = product
|
||||
food.filling_color = get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
@@ -782,7 +782,8 @@
|
||||
new_seed.can_self_harvest = can_self_harvest
|
||||
new_seed.kitchen_tag = kitchen_tag
|
||||
new_seed.trash_type = trash_type
|
||||
new_seed.has_mob_product = has_mob_product
|
||||
new_seed.preset_product = preset_product
|
||||
new_seed.final_form = final_form
|
||||
//Copy over everything else.
|
||||
if(mutants) new_seed.mutants = mutants.Copy()
|
||||
if(chems) new_seed.chems = chems.Copy()
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
display_name = "killer tomato plant"
|
||||
mutants = null
|
||||
can_self_harvest = 1
|
||||
has_mob_product = /mob/living/simple_animal/tomato
|
||||
preset_product = /mob/living/simple_animal/tomato
|
||||
preset_icon = "killertomato"
|
||||
|
||||
/datum/seed/tomato/killer/New()
|
||||
@@ -250,7 +250,7 @@
|
||||
name = "eggplant"
|
||||
seed_name = "eggplant"
|
||||
display_name = "eggplants"
|
||||
mutants = list("realeggplant")
|
||||
mutants = list("egg-plant")
|
||||
chems = list("plantmatter" = list(1,10))
|
||||
kitchen_tag = "eggplant"
|
||||
preset_icon = "eggplant"
|
||||
@@ -266,6 +266,25 @@
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#892694")
|
||||
set_trait(TRAIT_PLANT_ICON,"bush4")
|
||||
|
||||
/datum/seed/egg_plant
|
||||
name = "egg-plant"
|
||||
seed_name = "egg-plant"
|
||||
display_name = "egg-plants"
|
||||
mutants = null
|
||||
chems = list("egg" = list(1,10))
|
||||
preset_product = /obj/item/weapon/reagent_containers/food/snacks/egg
|
||||
|
||||
/datum/seed/egg_plant/New()
|
||||
..()
|
||||
set_trait(TRAIT_HARVEST_REPEAT,1)
|
||||
set_trait(TRAIT_MATURATION,6)
|
||||
set_trait(TRAIT_PRODUCTION,6)
|
||||
set_trait(TRAIT_YIELD,2)
|
||||
set_trait(TRAIT_POTENCY,20)
|
||||
set_trait(TRAIT_PRODUCT_ICON,"eggplant")
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#FFFFE5")
|
||||
set_trait(TRAIT_PLANT_ICON,"bush4")
|
||||
|
||||
//Apples/varieties.
|
||||
/datum/seed/apple
|
||||
name = "apple"
|
||||
@@ -528,7 +547,7 @@
|
||||
display_name = "walking mushrooms"
|
||||
mutants = null
|
||||
can_self_harvest = 1
|
||||
has_mob_product = /mob/living/simple_animal/hostile/mushroom
|
||||
preset_product = /mob/living/simple_animal/hostile/mushroom
|
||||
preset_icon = "walkingmushroom"
|
||||
|
||||
/datum/seed/mushroom/plump/walking/New()
|
||||
@@ -696,6 +715,7 @@
|
||||
display_name = "poppies"
|
||||
chems = list("plantmatter" = list(1,20), "styptic_powder" = list(1,10))
|
||||
kitchen_tag = "poppy"
|
||||
modular_icon = 1
|
||||
preset_icon = "poppy"
|
||||
|
||||
/datum/seed/flower/poppy/New()
|
||||
@@ -715,6 +735,8 @@
|
||||
mutants = list("moonflowers", "novaflowers")
|
||||
display_name = "sunflowers"
|
||||
preset_icon = "sunflower"
|
||||
final_form = 0
|
||||
kitchen_tag = "sunflower"
|
||||
|
||||
/datum/seed/flower/sunflower/New()
|
||||
..()
|
||||
@@ -730,6 +752,8 @@
|
||||
mutants = null
|
||||
display_name = "moonflowers"
|
||||
preset_icon = "moonflower"
|
||||
final_form = 1
|
||||
kitchen_tag = ""
|
||||
|
||||
/datum/seed/flower/moonflower/New()
|
||||
..()
|
||||
@@ -746,6 +770,8 @@
|
||||
chems = list("fuel" = list(1,10))
|
||||
display_name = "novaflowers"
|
||||
preset_icon = "novaflower"
|
||||
final_form = 0
|
||||
kitchen_tag = "novaflower"
|
||||
|
||||
/datum/seed/flower/novaflower/New()
|
||||
..()
|
||||
@@ -1104,6 +1130,7 @@
|
||||
seed_name = "lemon"
|
||||
display_name = "lemon trees"
|
||||
chems = list("plantmatter" = list(1,20))
|
||||
mutants = list("cashtree")
|
||||
kitchen_tag = "lemon"
|
||||
preset_icon = "lemon"
|
||||
|
||||
@@ -1112,6 +1139,27 @@
|
||||
set_trait(TRAIT_PRODUCES_POWER,1)
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#F0E226")
|
||||
|
||||
/datum/seed/cashtree
|
||||
name = "cashtree"
|
||||
seed_name = "money tree"
|
||||
seed_noun = "coins"
|
||||
display_name = "money trees"
|
||||
chems = list("gold" = list(1,10), "silver" = list(1,5))
|
||||
mutants = null
|
||||
final_form = 0
|
||||
kitchen_tag = "cashpod"
|
||||
preset_icon = "cashpod"
|
||||
|
||||
/datum/seed/cashtree/New()
|
||||
..()
|
||||
set_trait(TRAIT_MATURATION,6)
|
||||
set_trait(TRAIT_PRODUCTION,6)
|
||||
set_trait(TRAIT_YIELD,2)
|
||||
set_trait(TRAIT_POTENCY,10)
|
||||
set_trait(TRAIT_PRODUCT_ICON,"cash")
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#F0E226")
|
||||
set_trait(TRAIT_PLANT_ICON,"tree")
|
||||
|
||||
/datum/seed/citrus/orange
|
||||
name = "orange"
|
||||
seed_name = "orange"
|
||||
@@ -1131,6 +1179,7 @@
|
||||
chems = list("plantmatter" = list(1,20))
|
||||
kitchen_tag = "grass"
|
||||
modular_icon = 1
|
||||
final_form = 0
|
||||
|
||||
/datum/seed/grass/New()
|
||||
..()
|
||||
@@ -1209,7 +1258,7 @@
|
||||
seed_noun = "nodes"
|
||||
display_name = "replicant pods"
|
||||
can_self_harvest = 1
|
||||
has_mob_product = /mob/living/simple_animal/diona
|
||||
preset_product = /mob/living/simple_animal/diona
|
||||
|
||||
/datum/seed/diona/New()
|
||||
..()
|
||||
@@ -1230,7 +1279,8 @@
|
||||
seed_noun = "pods"
|
||||
display_name = "laughing clowns"
|
||||
can_self_harvest = 1
|
||||
has_mob_product = /mob/living/simple_animal/hostile/retaliate/clown
|
||||
modular_icon = 1
|
||||
preset_product = /mob/living/simple_animal/hostile/retaliate/clown
|
||||
|
||||
/datum/seed/clown/New()
|
||||
..()
|
||||
@@ -1251,6 +1301,7 @@
|
||||
chems = list("styptic_powder" = list(0,10))
|
||||
kitchen_tag = "comfrey"
|
||||
modular_icon = 1
|
||||
final_form = 0
|
||||
|
||||
/datum/seed/comfrey/New()
|
||||
..()
|
||||
@@ -1270,6 +1321,7 @@
|
||||
chems = list("silver_sulfadiazine" = list(3,5))
|
||||
kitchen_tag = "aloe"
|
||||
modular_icon = 1
|
||||
final_form = 0
|
||||
|
||||
/datum/seed/aloe/New()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user