mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-22 04:28:33 +01:00
First pass on xenoflora expansion.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
var/plantname
|
||||
var/potency = 1
|
||||
|
||||
/obj/item/weapon/grown/New()
|
||||
/obj/item/weapon/grown/New(newloc,planttype)
|
||||
|
||||
..()
|
||||
|
||||
@@ -17,21 +17,20 @@
|
||||
R.my_atom = src
|
||||
|
||||
//Handle some post-spawn var stuff.
|
||||
spawn(1)
|
||||
// Fill the object up with the appropriate reagents.
|
||||
if(!isnull(plantname))
|
||||
var/datum/seed/S = seed_types[plantname]
|
||||
if(!S || !S.chems)
|
||||
return
|
||||
if(planttype)
|
||||
plantname = planttype
|
||||
var/datum/seed/S = seed_types[plantname]
|
||||
if(!S || !S.chems)
|
||||
return
|
||||
|
||||
potency = S.potency
|
||||
potency = S.potency
|
||||
|
||||
for(var/rid in S.chems)
|
||||
var/list/reagent_data = S.chems[rid]
|
||||
var/rtotal = reagent_data[1]
|
||||
if(reagent_data.len > 1 && potency > 0)
|
||||
rtotal += round(potency/reagent_data[2])
|
||||
reagents.add_reagent(rid,max(1,rtotal))
|
||||
for(var/rid in S.chems)
|
||||
var/list/reagent_data = S.chems[rid]
|
||||
var/rtotal = reagent_data[1]
|
||||
if(reagent_data.len > 1 && potency > 0)
|
||||
rtotal += round(potency/reagent_data[2])
|
||||
reagents.add_reagent(rid,max(1,rtotal))
|
||||
|
||||
/obj/item/weapon/grown/log
|
||||
name = "towercap"
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
switch(grown_seed.spread)
|
||||
if(1)
|
||||
dat += "<br>It is capable of growing beyond the confines of a tray."
|
||||
dat += "<br>It is able to be planted outside of a tray."
|
||||
if(2)
|
||||
dat += "<br>It is a robust and vigorous vine that will spread rapidly."
|
||||
|
||||
@@ -156,6 +156,21 @@
|
||||
if(grown_seed.flowers)
|
||||
dat += "<br>It has [grown_seed.flower_colour ? "<font color='[grown_seed.flower_colour]'>flowers</font>" : "flowers"]."
|
||||
|
||||
if(grown_seed.produces_power)
|
||||
user << "<br>The fruit will function as a battery if prepared appropriately."
|
||||
|
||||
if(grown_seed.thorny)
|
||||
user << "<br>The fruit is covered in sharp, hollow thorns."
|
||||
|
||||
if(grown_seed.juicy)
|
||||
user << "<br>The fruit is excessively juicy."
|
||||
|
||||
if(grown_seed.explosive)
|
||||
user << "<br>The fruit is internally unstable."
|
||||
|
||||
if(grown_seed.teleporting)
|
||||
user << "<br>The fruit is temporal/spatially unstable."
|
||||
|
||||
if(dat)
|
||||
user << browse(dat,"window=plant_analyzer")
|
||||
|
||||
|
||||
@@ -642,12 +642,7 @@
|
||||
|
||||
user << "You plant the [S.seed.seed_name] [S.seed.seed_noun]."
|
||||
|
||||
if(S.seed.spread == 1)
|
||||
msg_admin_attack("[key_name(user)] has planted a creeper packet.")
|
||||
var/obj/effect/plant_controller/creeper/PC = new(get_turf(src))
|
||||
if(PC)
|
||||
PC.seed = S.seed
|
||||
else if(S.seed.spread == 2)
|
||||
if(S.seed.spread == 2)
|
||||
msg_admin_attack("[key_name(user)] has planted a spreading vine packet.")
|
||||
var/obj/effect/plant_controller/PC = new(get_turf(src))
|
||||
if(PC)
|
||||
|
||||
@@ -113,6 +113,70 @@ proc/populate_seed_list()
|
||||
var/flower_icon = "vine_fruit" // Which overlay to use.
|
||||
var/flower_colour // Which colour to use.
|
||||
|
||||
// Special traits.
|
||||
var/produces_power // Can be used to make a battery.
|
||||
var/thorny // Harvested thorns can act as syringes for injecting plant reagents.
|
||||
var/juicy // When thrown, causes a splatter decal.
|
||||
var/explosive // When thrown, acts as a grenade.
|
||||
var/teleporting // Uses the bluespace tomato effect.
|
||||
var/splat_type = /obj/effect/decal/cleanable/tomato_smudge
|
||||
|
||||
//Applies an effect to a target atom.
|
||||
/datum/seed/proc/thrown_at(var/obj/item/thrown,var/atom/target)
|
||||
|
||||
var/splatted
|
||||
|
||||
if(istype(target,/mob/living))
|
||||
splatted = apply_special_effect(target,thrown)
|
||||
else if(istype(target,/turf))
|
||||
splatted = 1
|
||||
for(var/mob/living/M in target,thrown)
|
||||
apply_special_effect(M)
|
||||
|
||||
if(juicy && splatted)
|
||||
|
||||
if(thrown.reagents)
|
||||
thrown.reagents.reaction(get_turf(target))
|
||||
for(var/atom/hit_atom in get_turf(target))
|
||||
thrown.reagents.reaction(hit_atom)
|
||||
|
||||
new splat_type (get_turf(thrown))
|
||||
thrown.visible_message("The [thrown.name] splatters against [target]!")
|
||||
del(thrown)
|
||||
|
||||
/datum/seed/proc/apply_special_effect(var/mob/living/target,var/obj/item/thrown)
|
||||
|
||||
var/impact = 1
|
||||
|
||||
// Thorns have a chance of injecting reagents.
|
||||
if(thorny && prob(50))
|
||||
target << "<span class='danger'>Several thorns are embedded in your flesh!</span>"
|
||||
//Todo: cause brute, transfer some reagents over.
|
||||
|
||||
// Bluespace tomato code copied over from grown.dm.
|
||||
if(teleporting)
|
||||
|
||||
//Plant potency determines radius of teleport.
|
||||
var/outer_teleport_radius = potency/10
|
||||
var/inner_teleport_radius = potency/15
|
||||
|
||||
var/list/turfs
|
||||
if(inner_teleport_radius > 0)
|
||||
turfs = orange(target,outer_teleport_radius) - orange(target,inner_teleport_radius)
|
||||
|
||||
if(!turfs.len)
|
||||
target.visible_message("<span class='notice'>The [thrown.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
|
||||
del(thrown)
|
||||
return
|
||||
|
||||
// Moves the mob, causes sparks.
|
||||
var/turf/picked = pick(turfs)
|
||||
new/obj/effect/decal/cleanable/molten_item(picked) //Leave a pile of goo behind for dramatic effect...
|
||||
target.loc = picked//And teleport them to the chosen location.
|
||||
impact = 1
|
||||
|
||||
return impact
|
||||
|
||||
//Creates a random seed. MAKE SURE THE LINE HAS DIVERGED BEFORE THIS IS CALLED.
|
||||
/datum/seed/proc/randomize()
|
||||
|
||||
@@ -598,7 +662,14 @@ proc/populate_seed_list()
|
||||
currently_querying = list()
|
||||
for(var/i = 0;i<total_yield;i++)
|
||||
var/product_type = pick(products)
|
||||
var/obj/item/product = new product_type(get_turf(user))
|
||||
var/obj/item/product = new product_type(get_turf(user),name)
|
||||
|
||||
if(product_colour)
|
||||
product.color = product_colour
|
||||
if(istype(product,/obj/item/weapon/reagent_containers/food))
|
||||
var/obj/item/weapon/reagent_containers/food/food = product
|
||||
food.filling_color = product_colour
|
||||
|
||||
if(mysterious)
|
||||
product.name += "?"
|
||||
product.desc += " On second thought, something about this one looks strange."
|
||||
@@ -614,15 +685,6 @@ proc/populate_seed_list()
|
||||
product.visible_message("\blue The pod disgorges [product]!")
|
||||
handle_living_product(product)
|
||||
|
||||
// Make sure the product is inheriting the correct seed type reference.
|
||||
else if(istype(product,/obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/grown/current_product = product
|
||||
current_product.plantname = name
|
||||
else if(istype(product,/obj/item/weapon/grown))
|
||||
var/obj/item/weapon/grown/current_product = product
|
||||
current_product.plantname = name
|
||||
|
||||
|
||||
// When the seed in this machine mutates/is modified, the tray seed value
|
||||
// is set to a new datum copied from the original. This datum won't actually
|
||||
// be put into the global datum list until the product is harvested, though.
|
||||
@@ -727,6 +789,7 @@ proc/populate_seed_list()
|
||||
plant_icon = "berry"
|
||||
harvest_repeat = 1
|
||||
chems = list("nutriment" = list(1,10))
|
||||
juicy = 1
|
||||
|
||||
lifespan = 20
|
||||
maturation = 5
|
||||
@@ -743,6 +806,7 @@ proc/populate_seed_list()
|
||||
packet_icon = "seed-glowberry"
|
||||
plant_icon = "glowberry"
|
||||
chems = list("nutriment" = list(1,10), "uranium" = list(3,5))
|
||||
spread = 1
|
||||
|
||||
lifespan = 30
|
||||
maturation = 5
|
||||
@@ -815,6 +879,7 @@ proc/populate_seed_list()
|
||||
plant_icon = "tomato"
|
||||
harvest_repeat = 1
|
||||
chems = list("nutriment" = list(1,10))
|
||||
juicy = 1
|
||||
|
||||
lifespan = 25
|
||||
maturation = 8
|
||||
@@ -831,6 +896,7 @@ proc/populate_seed_list()
|
||||
packet_icon = "seed-bloodtomato"
|
||||
plant_icon = "bloodtomato"
|
||||
chems = list("nutriment" = list(1,10), "blood" = list(1,5))
|
||||
splat_type = /obj/effect/decal/cleanable/blood/splatter
|
||||
|
||||
yield = 3
|
||||
|
||||
@@ -838,7 +904,7 @@ proc/populate_seed_list()
|
||||
name = "killertomato"
|
||||
seed_name = "killer tomato"
|
||||
display_name = "killer tomato plant"
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/killertomato)
|
||||
products = list(/mob/living/simple_animal/tomato)
|
||||
mutants = null
|
||||
packet_icon = "seed-killertomato"
|
||||
plant_icon = "killertomato"
|
||||
@@ -855,6 +921,7 @@ proc/populate_seed_list()
|
||||
packet_icon = "seed-bluetomato"
|
||||
plant_icon = "bluetomato"
|
||||
chems = list("nutriment" = list(1,20), "lube" = list(1,5))
|
||||
splat_type = /obj/effect/decal/cleanable/blood/oil
|
||||
|
||||
/datum/seed/tomato/blue/teleport
|
||||
name = "bluespacetomato"
|
||||
@@ -865,6 +932,7 @@ proc/populate_seed_list()
|
||||
packet_icon = "seed-bluespacetomato"
|
||||
plant_icon = "bluespacetomato"
|
||||
chems = list("nutriment" = list(1,20), "singulo" = list(1,5))
|
||||
teleporting = 1
|
||||
|
||||
//Eggplants/varieties.
|
||||
/datum/seed/eggplant
|
||||
@@ -990,6 +1058,7 @@ proc/populate_seed_list()
|
||||
mutants = null
|
||||
//mutants = list("wallrot") //TBD.
|
||||
plant_icon = "mold"
|
||||
spread = 1
|
||||
|
||||
lifespan = 50
|
||||
maturation = 10
|
||||
@@ -1092,6 +1161,7 @@ proc/populate_seed_list()
|
||||
packet_icon = "mycelium-glowshroom"
|
||||
plant_icon = "glowshroom"
|
||||
chems = list("radium" = list(1,20))
|
||||
spread = 1
|
||||
|
||||
lifespan = 120
|
||||
maturation = 15
|
||||
@@ -1105,7 +1175,7 @@ proc/populate_seed_list()
|
||||
name = "walkingmushroom"
|
||||
seed_name = "walking mushroom"
|
||||
display_name = "walking mushrooms"
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom)
|
||||
products = list(/mob/living/simple_animal/mushroom)
|
||||
mutants = null
|
||||
packet_icon = "mycelium-walkingmushroom"
|
||||
plant_icon = "walkingmushroom"
|
||||
@@ -1310,6 +1380,7 @@ proc/populate_seed_list()
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/potato)
|
||||
plant_icon = "potato"
|
||||
chems = list("nutriment" = list(1,10))
|
||||
produces_power = 1
|
||||
|
||||
lifespan = 30
|
||||
maturation = 10
|
||||
@@ -1437,6 +1508,7 @@ proc/populate_seed_list()
|
||||
plant_icon = "watermelon"
|
||||
harvest_repeat = 1
|
||||
chems = list("nutriment" = list(1,6))
|
||||
juicy = 1
|
||||
|
||||
lifespan = 50
|
||||
maturation = 6
|
||||
@@ -1470,6 +1542,7 @@ proc/populate_seed_list()
|
||||
plant_icon = "lime"
|
||||
harvest_repeat = 1
|
||||
chems = list("nutriment" = list(1,20))
|
||||
juicy = 1
|
||||
|
||||
lifespan = 55
|
||||
maturation = 6
|
||||
@@ -1486,6 +1559,8 @@ proc/populate_seed_list()
|
||||
plant_icon = "lemon"
|
||||
harvest_repeat = 1
|
||||
chems = list("nutriment" = list(1,20))
|
||||
produces_power = 1
|
||||
juicy = 1
|
||||
|
||||
lifespan = 55
|
||||
maturation = 6
|
||||
@@ -1502,6 +1577,7 @@ proc/populate_seed_list()
|
||||
plant_icon = "orange"
|
||||
harvest_repeat = 1
|
||||
chems = list("nutriment" = list(1,20))
|
||||
juicy = 1
|
||||
|
||||
lifespan = 60
|
||||
maturation = 6
|
||||
@@ -1551,6 +1627,7 @@ proc/populate_seed_list()
|
||||
plant_icon = "cherry"
|
||||
harvest_repeat = 1
|
||||
chems = list("nutriment" = list(1,15), "sugar" = list(1,15))
|
||||
juicy = 1
|
||||
|
||||
lifespan = 35
|
||||
maturation = 5
|
||||
@@ -1594,42 +1671,3 @@ proc/populate_seed_list()
|
||||
production = 10
|
||||
yield = 1
|
||||
potency = 30
|
||||
|
||||
/datum/seed/clown
|
||||
name = "clown"
|
||||
seed_name = "clown"
|
||||
seed_noun = "pods"
|
||||
display_name = "laughing clowns"
|
||||
packet_icon = "seed-replicapod"
|
||||
products = list(/mob/living/simple_animal/hostile/retaliate/clown)
|
||||
plant_icon = "replicapod"
|
||||
product_requires_player = 1
|
||||
|
||||
lifespan = 100
|
||||
endurance = 8
|
||||
maturation = 1
|
||||
production = 1
|
||||
yield = 10
|
||||
potency = 30
|
||||
|
||||
/datum/seed/test
|
||||
name = "test"
|
||||
seed_name = "testing"
|
||||
seed_noun = "data"
|
||||
display_name = "runtimes"
|
||||
packet_icon = "seed-replicapod"
|
||||
products = list(/mob/living/simple_animal/cat/Runtime)
|
||||
plant_icon = "replicapod"
|
||||
|
||||
requires_nutrients = 0
|
||||
nutrient_consumption = 0
|
||||
requires_water = 0
|
||||
water_consumption = 0
|
||||
pest_tolerance = 11
|
||||
weed_tolerance = 11
|
||||
lifespan = 1000
|
||||
endurance = 100
|
||||
maturation = 1
|
||||
production = 1
|
||||
yield = 1
|
||||
potency = 1
|
||||
@@ -1,46 +1,107 @@
|
||||
//Grown foods.
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown
|
||||
|
||||
|
||||
// ***********************************************************
|
||||
// Foods that are produced from hydroponics ~~~~~~~~~~
|
||||
// Data from the seeds carry over to these grown foods
|
||||
// ***********************************************************
|
||||
|
||||
//Grown foods
|
||||
//Subclass so we can pass on values
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/
|
||||
var/plantname
|
||||
var/potency = -1
|
||||
name = "fruit"
|
||||
desc = "It's a fruit."
|
||||
icon = 'icons/obj/harvest.dmi'
|
||||
New(newloc,newpotency)
|
||||
if (!isnull(newpotency))
|
||||
potency = newpotency
|
||||
..()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/New()
|
||||
var/plantname
|
||||
var/datum/seed/seed
|
||||
var/potency = -1
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/New(newloc,planttype)
|
||||
|
||||
..()
|
||||
|
||||
//Handle some post-spawn var stuff.
|
||||
spawn(1)
|
||||
// Fill the object up with the appropriate reagents.
|
||||
if(!isnull(plantname))
|
||||
var/datum/seed/S = seed_types[plantname]
|
||||
if(!S || !S.chems)
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
// Fill the object up with the appropriate reagents.
|
||||
if(planttype)
|
||||
plantname = planttype
|
||||
seed = seed_types[plantname]
|
||||
if(!seed || !seed.chems)
|
||||
return
|
||||
|
||||
potency = seed.potency
|
||||
|
||||
for(var/rid in seed.chems)
|
||||
var/list/reagent_data = seed.chems[rid]
|
||||
var/rtotal = reagent_data[1]
|
||||
if(reagent_data.len > 1 && potency > 0)
|
||||
rtotal += round(potency/reagent_data[2])
|
||||
reagents.add_reagent(rid,max(1,rtotal))
|
||||
|
||||
if(reagents.total_volume > 0)
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/Crossed(var/mob/living/M)
|
||||
if(seed && seed.juicy)
|
||||
if(istype(M))
|
||||
|
||||
if(M.buckled)
|
||||
return
|
||||
|
||||
potency = S.potency
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.shoes && H.shoes.flags & NOSLIP)
|
||||
return
|
||||
|
||||
for(var/rid in S.chems)
|
||||
var/list/reagent_data = S.chems[rid]
|
||||
var/rtotal = reagent_data[1]
|
||||
if(reagent_data.len > 1 && potency > 0)
|
||||
rtotal += round(potency/reagent_data[2])
|
||||
reagents.add_reagent(rid,max(1,rtotal))
|
||||
M.stop_pulling()
|
||||
M << "\blue You slipped on the [name]!"
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Stun(8)
|
||||
M.Weaken(5)
|
||||
|
||||
if(reagents.total_volume > 0)
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/throw_impact(atom/hit_atom)
|
||||
|
||||
..()
|
||||
if(!seed)
|
||||
return
|
||||
seed.thrown_at(src,hit_atom)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(seed && seed.produces_power)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(C.use(5))
|
||||
//TODO: generalize this.
|
||||
user << "<span class='notice'>You add some cable to the [src.name] and slide it inside the battery encasing.</span>"
|
||||
var/obj/item/weapon/cell/potato/pocell = new /obj/item/weapon/cell/potato(user.loc)
|
||||
pocell.maxcharge = src.potency * 10
|
||||
pocell.charge = pocell.maxcharge
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/attack_self(mob/user as mob)
|
||||
|
||||
if(!seed || !seed.spread != 1)
|
||||
return
|
||||
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
|
||||
// TODO: Generalize.
|
||||
var/obj/effect/glowshroom/planted = new /obj/effect/glowshroom(user.loc)
|
||||
planted.delay = 50
|
||||
planted.endurance = 100
|
||||
planted.potency = potency
|
||||
|
||||
user << "<span class='notice'>You plant the [src.name].</span>"
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/pickup(mob/user)
|
||||
if(seed && seed.biolum)
|
||||
user.SetLuminosity(user.luminosity + seed.biolum)
|
||||
SetLuminosity(0)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/dropped(mob/user)
|
||||
if(seed && seed.biolum)
|
||||
user.SetLuminosity(user.luminosity - seed.biolum)
|
||||
SetLuminosity(seed.biolum)
|
||||
|
||||
// Food object defines follow.
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/corn
|
||||
name = "ear of corn"
|
||||
desc = "Needs some butter!"
|
||||
@@ -82,18 +143,6 @@
|
||||
filling_color = "#E6E8DA"
|
||||
plantname = "potato"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(C.use(5))
|
||||
user << "<span class='notice'>You add some cable to the potato and slide it inside the battery encasing.</span>"
|
||||
var/obj/item/weapon/cell/potato/pocell = new /obj/item/weapon/cell/potato(user.loc)
|
||||
pocell.maxcharge = src.potency * 10
|
||||
pocell.charge = pocell.maxcharge
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/grapes
|
||||
name = "bunch of grapes"
|
||||
desc = "Nutritious!"
|
||||
@@ -139,62 +188,13 @@
|
||||
filling_color = "#C4C4C4"
|
||||
plantname = "plastic"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/shand
|
||||
name = "S'rendarr's Hand leaf"
|
||||
desc = "A leaf sample from a lowland thicket shrub. Smells strongly like wax."
|
||||
icon_state = "shand"
|
||||
filling_color = "#70C470"
|
||||
plantname = "shand"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mtear
|
||||
name = "sprig of Messa's Tear"
|
||||
desc = "A mountain climate herb with a soft, cold blue flower, known to contain an abundance of healing chemicals."
|
||||
icon_state = "mtear"
|
||||
filling_color = "#70C470"
|
||||
plantname = "mtear"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mtear/attack_self(mob/user as mob)
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
var/obj/item/stack/medical/ointment/tajaran/poultice = new /obj/item/stack/medical/ointment/tajaran(user.loc)
|
||||
|
||||
poultice.heal_burn = potency
|
||||
del(src)
|
||||
|
||||
user << "<span class='notice'>You mash the petals into a poultice.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/shand/attack_self(mob/user as mob)
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
var/obj/item/stack/medical/bruise_pack/tajaran/poultice = new /obj/item/stack/medical/bruise_pack/tajaran(user.loc)
|
||||
|
||||
poultice.heal_brute = potency
|
||||
del(src)
|
||||
|
||||
user << "<span class='notice'>You mash the leaves into a poultice.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries
|
||||
name = "bunch of glow-berries"
|
||||
desc = "Nutritious!"
|
||||
var/light_on = 1
|
||||
var/brightness_on = 2 //luminosity when on
|
||||
filling_color = "#D3FF9E"
|
||||
icon_state = "glowberrypile"
|
||||
plantname = "glowberries"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/Del()
|
||||
if(istype(loc,/mob))
|
||||
loc.SetLuminosity(round(loc.luminosity - potency/5,1))
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/pickup(mob/user)
|
||||
src.SetLuminosity(0)
|
||||
user.SetLuminosity(round(user.luminosity + (potency/5),1))
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/dropped(mob/user)
|
||||
user.SetLuminosity(round(user.luminosity - (potency/5),1))
|
||||
src.SetLuminosity(round(potency/5,1))
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod
|
||||
name = "cocoa pod"
|
||||
desc = "Can be ground into cocoa powder."
|
||||
@@ -279,22 +279,6 @@
|
||||
slices_num = 5
|
||||
plantname = "watermelon"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin
|
||||
name = "pumpkin"
|
||||
desc = "It's large and scary."
|
||||
icon_state = "pumpkin"
|
||||
potency = 10
|
||||
filling_color = "#FAB728"
|
||||
plantname = "pumpkin"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/twohanded/fireaxe) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/melee/energy))
|
||||
user.show_message("<span class='notice'>You carve a face into [src]!</span>", 1)
|
||||
new /obj/item/clothing/head/pumpkinhead (user.loc)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/lime
|
||||
name = "lime"
|
||||
desc = "It's so sour, your face will twist."
|
||||
@@ -313,7 +297,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/orange
|
||||
name = "orange"
|
||||
desc = "It's a tangy fruit."
|
||||
desc = "It's an tangy fruit."
|
||||
icon_state = "orange"
|
||||
potency = 20
|
||||
filling_color = "#FAAD28"
|
||||
@@ -367,30 +351,6 @@
|
||||
potency = 10
|
||||
plantname = "tomato"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
new/obj/effect/decal/cleanable/tomato_smudge(src.loc)
|
||||
src.visible_message("<span class='notice'>The [src.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/killertomato
|
||||
name = "killer-tomato"
|
||||
desc = "I say to-mah-to, you say tom-mae-to... OH GOD IT'S EATING MY LEGS!!"
|
||||
icon_state = "killertomato"
|
||||
potency = 10
|
||||
filling_color = "#FF0000"
|
||||
potency = 30
|
||||
plantname = "killertomato"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/killertomato/attack_self(mob/user as mob)
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
new /mob/living/simple_animal/tomato(user.loc)
|
||||
del(src)
|
||||
|
||||
user << "<span class='notice'>You plant the killer-tomato.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bloodtomato
|
||||
name = "blood-tomato"
|
||||
desc = "So bloody...so...very...bloody....AHHHH!!!!"
|
||||
@@ -399,16 +359,6 @@
|
||||
filling_color = "#FF0000"
|
||||
plantname = "bloodtomato"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bloodtomato/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
new/obj/effect/decal/cleanable/blood/splatter(src.loc)
|
||||
src.visible_message("<span class='notice'>The [src.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
|
||||
src.reagents.reaction(get_turf(hit_atom))
|
||||
for(var/atom/A in get_turf(hit_atom))
|
||||
src.reagents.reaction(A)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato
|
||||
name = "blue-tomato"
|
||||
desc = "I say blue-mah-to, you say blue-mae-to."
|
||||
@@ -417,21 +367,6 @@
|
||||
filling_color = "#586CFC"
|
||||
plantname = "bluetomato"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
new/obj/effect/decal/cleanable/blood/oil(src.loc)
|
||||
src.visible_message("<span class='notice'>The [src.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
|
||||
src.reagents.reaction(get_turf(hit_atom))
|
||||
for(var/atom/A in get_turf(hit_atom))
|
||||
src.reagents.reaction(A)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/Crossed(AM as mob|obj)
|
||||
if (istype(AM, /mob/living))
|
||||
var/mob/living/M = AM
|
||||
M.slip("the [src]!")
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat
|
||||
name = "wheat"
|
||||
desc = "Sigh... wheat... a-grain?"
|
||||
@@ -518,14 +453,6 @@
|
||||
potency = 30
|
||||
plantname = "walkingmushroom"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/attack_self(mob/user as mob)
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
new /mob/living/simple_animal/mushroom(user.loc)
|
||||
del(src)
|
||||
|
||||
user << "<span class='notice'>You plant the walking mushroom.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle
|
||||
name = "chanterelle cluster"
|
||||
desc = "<I>Cantharellus Cibarius</I>: These jolly yellow little shrooms sure look tasty!"
|
||||
@@ -541,37 +468,6 @@
|
||||
potency = 30
|
||||
plantname = "glowshroom"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user as mob)
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
var/obj/effect/glowshroom/planted = new /obj/effect/glowshroom(user.loc)
|
||||
|
||||
planted.delay = 50
|
||||
planted.endurance = 100
|
||||
planted.potency = potency
|
||||
del(src)
|
||||
|
||||
user << "<span class='notice'>You plant the glowshroom.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/Del()
|
||||
if(istype(loc,/mob))
|
||||
loc.SetLuminosity(round(loc.luminosity - potency/10,1))
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/pickup(mob/user)
|
||||
SetLuminosity(0)
|
||||
user.SetLuminosity(round(user.luminosity + (potency/10),1))
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/dropped(mob/user)
|
||||
user.SetLuminosity(round(user.luminosity - (potency/10),1))
|
||||
SetLuminosity(round(potency/10,1))
|
||||
|
||||
|
||||
// *************************************
|
||||
// Complex Grown Object Defines -
|
||||
// Putting these at the bottom so they don't clutter the list up. -Cheridan
|
||||
// *************************************
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluespacetomato
|
||||
name = "blue-space tomato"
|
||||
desc = "So lubricated, you might slip through space-time."
|
||||
@@ -581,52 +477,53 @@
|
||||
filling_color = "#91F8FF"
|
||||
plantname = "bluespacetomato"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluespacetomato/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
var/mob/M = usr
|
||||
var/outer_teleport_radius = potency/10 //Plant potency determines radius of teleport.
|
||||
var/inner_teleport_radius = potency/15
|
||||
var/list/turfs = new/list()
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
if(inner_teleport_radius < 1) //Wasn't potent enough, it just splats.
|
||||
new/obj/effect/decal/cleanable/blood/oil(src.loc)
|
||||
src.visible_message("<span class='notice'>The [src.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
|
||||
del(src)
|
||||
// Super special snowflake grown items below.
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/shand
|
||||
name = "S'rendarr's Hand leaf"
|
||||
desc = "A leaf sample from a lowland thicket shrub. Smells strongly like wax."
|
||||
icon_state = "shand"
|
||||
filling_color = "#70C470"
|
||||
plantname = "shand"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mtear
|
||||
name = "sprig of Messa's Tear"
|
||||
desc = "A mountain climate herb with a soft, cold blue flower, known to contain an abundance of healing chemicals."
|
||||
icon_state = "mtear"
|
||||
filling_color = "#70C470"
|
||||
plantname = "mtear"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mtear/attack_self(mob/user as mob)
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
for(var/turf/T in orange(M,outer_teleport_radius))
|
||||
if(T in orange(M,inner_teleport_radius)) continue
|
||||
if(istype(T,/turf/space)) continue
|
||||
if(T.density) continue
|
||||
if(T.x>world.maxx-outer_teleport_radius || T.x<outer_teleport_radius) continue
|
||||
if(T.y>world.maxy-outer_teleport_radius || T.y<outer_teleport_radius) continue
|
||||
turfs += T
|
||||
if(!turfs.len)
|
||||
var/list/turfs_to_pick_from = list()
|
||||
for(var/turf/T in orange(M,outer_teleport_radius))
|
||||
if(!(T in orange(M,inner_teleport_radius)))
|
||||
turfs_to_pick_from += T
|
||||
turfs += pick(/turf in turfs_to_pick_from)
|
||||
var/turf/picked = pick(turfs)
|
||||
if(!isturf(picked)) return
|
||||
switch(rand(1,2))//Decides randomly to teleport the thrower or the throwee.
|
||||
if(1) // Teleports the person who threw the tomato.
|
||||
s.set_up(3, 1, M)
|
||||
s.start()
|
||||
new/obj/effect/decal/cleanable/molten_item(M.loc) //Leaves a pile of goo behind for dramatic effect.
|
||||
M.loc = picked //
|
||||
sleep(1)
|
||||
s.set_up(3, 1, M)
|
||||
s.start() //Two set of sparks, one before the teleport and one after.
|
||||
if(2) //Teleports mob the tomato hit instead.
|
||||
for(var/mob/A in get_turf(hit_atom))//For the mobs in the tile that was hit...
|
||||
s.set_up(3, 1, A)
|
||||
s.start()
|
||||
new/obj/effect/decal/cleanable/molten_item(A.loc) //Leave a pile of goo behind for dramatic effect...
|
||||
A.loc = picked//And teleport them to the chosen location.
|
||||
sleep(1)
|
||||
s.set_up(3, 1, A)
|
||||
s.start()
|
||||
new/obj/effect/decal/cleanable/blood/oil(src.loc)
|
||||
src.visible_message("<span class='notice'>The [src.name] has been squashed, causing a distortion in space-time.</span>","<span class='moderate'>You hear a splat and a crackle.</span>")
|
||||
var/obj/item/stack/medical/ointment/tajaran/poultice = new /obj/item/stack/medical/ointment/tajaran(user.loc)
|
||||
|
||||
poultice.heal_burn = potency
|
||||
del(src)
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You mash the petals into a poultice.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/shand/attack_self(mob/user as mob)
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
var/obj/item/stack/medical/bruise_pack/tajaran/poultice = new /obj/item/stack/medical/bruise_pack/tajaran(user.loc)
|
||||
|
||||
poultice.heal_brute = potency
|
||||
del(src)
|
||||
|
||||
user << "<span class='notice'>You mash the leaves into a poultice.</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin
|
||||
name = "pumpkin"
|
||||
desc = "It's large and scary."
|
||||
icon_state = "pumpkin"
|
||||
potency = 10
|
||||
filling_color = "#FAB728"
|
||||
plantname = "pumpkin"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/twohanded/fireaxe) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/melee/energy))
|
||||
user.show_message("<span class='notice'>You carve a face into [src]!</span>", 1)
|
||||
new /obj/item/clothing/head/pumpkinhead (user.loc)
|
||||
del(src)
|
||||
return
|
||||
Reference in New Issue
Block a user