Merge branch 'hydroponics-pr' of https://github.com/Zuhayr/Baystation12 into dev

This commit is contained in:
Zuhayr
2014-07-25 23:02:21 +09:30
30 changed files with 5295 additions and 4858 deletions

View File

@@ -311,7 +311,6 @@
#include "code\game\machinery\newscaster.dm"
#include "code\game\machinery\OpTable.dm"
#include "code\game\machinery\overview.dm"
#include "code\game\machinery\podmen.dm"
#include "code\game\machinery\portable_turret.dm"
#include "code\game\machinery\recharger.dm"
#include "code\game\machinery\rechargestation.dm"
@@ -857,7 +856,11 @@
#include "code\modules\hydroponics\grown_inedible.dm"
#include "code\modules\hydroponics\hydro_tools.dm"
#include "code\modules\hydroponics\hydro_tray.dm"
#include "code\modules\hydroponics\seed_datums.dm"
#include "code\modules\hydroponics\seed_machines.dm"
#include "code\modules\hydroponics\seed_mobs.dm"
#include "code\modules\hydroponics\seeds.dm"
#include "code\modules\hydroponics\vines.dm"
#include "code\modules\library\lib_items.dm"
#include "code\modules\library\lib_machines.dm"
#include "code\modules\library\lib_readme.dm"
@@ -1268,6 +1271,7 @@
#include "code\modules\research\xenoarchaeology\finds\finds_talkingitem.dm"
#include "code\modules\research\xenoarchaeology\genetics\prehistoric_animals.dm"
#include "code\modules\research\xenoarchaeology\genetics\prehistoric_plants.dm"
#include "code\modules\research\xenoarchaeology\genetics\prehistoric_seeds.dm"
#include "code\modules\research\xenoarchaeology\genetics\reconstitutor.dm"
#include "code\modules\research\xenoarchaeology\machinery\artifact_analyser.dm"
#include "code\modules\research\xenoarchaeology\machinery\artifact_harvester.dm"

View File

@@ -65,7 +65,6 @@ var/jungle_plants_init = 0
reagent_effects = shuffle(reagent_effects)
/obj/item/weapon/reagent_containers/food/snacks/grown/jungle_fruit
seed = ""
name = "jungle fruit"
desc = "It smells weird and looks off."
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'

View File

@@ -109,7 +109,6 @@ datum/controller/game_controller/proc/setup_objects()
var/obj/machinery/atmospherics/unary/vent_scrubber/T = U
T.broadcast_status()
//Create the mining ore distribution map.
//Create the mining ore distribution map.
asteroid_ore_map = new /datum/ore_distribution()
asteroid_ore_map.populate_distribution_map()
@@ -120,6 +119,9 @@ datum/controller/game_controller/proc/setup_objects()
//Set up gear list.
populate_gear_list()
//Set up roundstart seed list.
populate_seed_list()
world << "\red \b Initializations complete."
sleep(-1)

View File

@@ -848,6 +848,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Arts and Crafts crate"
group = "Operations"
/datum/supply_packs/randomised/contraband
num_contained = 5
contains = list(/obj/item/seeds/bloodtomatoseed,

View File

@@ -1,247 +1,3 @@
// SPACE VINES (Note that this code is very similar to Biomass code)
/obj/effect/spacevine
name = "space vines"
desc = "An extremely expansionistic species of vine."
icon = 'icons/effects/spacevines.dmi'
icon_state = "Light1"
anchored = 1
density = 0
layer = 5
pass_flags = PASSTABLE | PASSGRILLE
var/energy = 0
var/obj/effect/spacevine_controller/master = null
var/mob/living/buckled_mob
New()
return
Del()
if(master)
master.vines -= src
master.growth_queue -= src
..()
/obj/effect/spacevine/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (!W || !user || !W.type) return
switch(W.type)
if(/obj/item/weapon/circular_saw) del src
if(/obj/item/weapon/kitchen/utensil/knife) del src
if(/obj/item/weapon/scalpel) del src
if(/obj/item/weapon/twohanded/fireaxe) del src
if(/obj/item/weapon/hatchet) del src
if(/obj/item/weapon/melee/energy) del src
//less effective weapons
if(/obj/item/weapon/wirecutters)
if(prob(25)) del src
if(/obj/item/weapon/shard)
if(prob(25)) del src
else //weapons with subtypes
if(istype(W, /obj/item/weapon/melee/energy/sword)) del src
else if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user)) del src
else
manual_unbuckle(user)
return
//Plant-b-gone damage is handled in its entry in chemistry-reagents.dm
..()
/obj/effect/spacevine/attack_hand(mob/user as mob)
manual_unbuckle(user)
/obj/effect/spacevine/attack_paw(mob/user as mob)
manual_unbuckle(user)
/obj/effect/spacevine/proc/unbuckle()
if(buckled_mob)
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
buckled_mob = null
return
/obj/effect/spacevine/proc/manual_unbuckle(mob/user as mob)
if(buckled_mob)
if(prob(50))
if(buckled_mob.buckled == src)
if(buckled_mob != user)
buckled_mob.visible_message(\
"<span class='notice'>[user.name] frees [buckled_mob.name] from the vines.</span>",\
"<span class='notice'>[user.name] frees you from the vines.</span>",\
"<span class='warning'>You hear shredding and ripping.</span>")
else
buckled_mob.visible_message(\
"<span class='notice'>[buckled_mob.name] struggles free of the vines.</span>",\
"<span class='notice'>You untangle the vines from around yourself.</span>",\
"<span class='warning'>You hear shredding and ripping.</span>")
unbuckle()
else
var/text = pick("rips","tears","pulls")
user.visible_message(\
"<span class='notice'>[user.name] [text] at the vines.</span>",\
"<span class='notice'>You [text] at the vines.</span>",\
"<span class='warning'>You hear shredding and ripping.</span>")
return
/obj/effect/spacevine_controller
var/list/obj/effect/spacevine/vines = list()
var/list/growth_queue = list()
var/reached_collapse_size
var/reached_slowdown_size
//What this does is that instead of having the grow minimum of 1, required to start growing, the minimum will be 0,
//meaning if you get the spacevines' size to something less than 20 plots, it won't grow anymore.
New()
if(!istype(src.loc,/turf/simulated/floor))
del(src)
spawn_spacevine_piece(src.loc)
processing_objects.Add(src)
Del()
processing_objects.Remove(src)
..()
proc/spawn_spacevine_piece(var/turf/location)
var/obj/effect/spacevine/SV = new(location)
growth_queue += SV
vines += SV
SV.master = src
process()
if(!vines)
del(src) //space vines exterminated. Remove the controller
return
if(!growth_queue)
del(src) //Sanity check
return
if(vines.len >= 250 && !reached_collapse_size)
reached_collapse_size = 1
if(vines.len >= 30 && !reached_slowdown_size )
reached_slowdown_size = 1
var/length = 0
if(reached_collapse_size)
length = 0
else if(reached_slowdown_size)
if(prob(25))
length = 1
else
length = 0
else
length = 1
length = min( 30 , max( length , vines.len / 5 ) )
var/i = 0
var/list/obj/effect/spacevine/queue_end = list()
for( var/obj/effect/spacevine/SV in growth_queue )
i++
queue_end += SV
growth_queue -= SV
if(SV.energy < 2) //If tile isn't fully grown
if(prob(20))
SV.grow()
else //If tile is fully grown
SV.buckle_mob()
//if(prob(25))
SV.spread()
if(i >= length)
break
growth_queue = growth_queue + queue_end
//sleep(5)
//src.process()
/obj/effect/spacevine/proc/grow()
if(!energy)
src.icon_state = pick("Med1", "Med2", "Med3")
energy = 1
src.opacity = 1
layer = 5
else
src.icon_state = pick("Hvy1", "Hvy2", "Hvy3")
energy = 2
/obj/effect/spacevine/proc/buckle_mob()
if(!buckled_mob && prob(25))
for(var/mob/living/carbon/V in src.loc)
if((V.stat != DEAD) && (V.buckled != src)) //if mob not dead or captured
V.buckled = src
V.loc = src.loc
V.update_canmove()
src.buckled_mob = V
V << "<span class='danger'>The vines [pick("wind", "tangle", "tighten")] around you!</span>"
break //only capture one mob at a time.
/obj/effect/spacevine/proc/spread()
var/direction = pick(cardinal)
var/step = get_step(src,direction)
if(istype(step,/turf/simulated/floor))
var/turf/simulated/floor/F = step
if(!locate(/obj/effect/spacevine,F))
if(F.Enter(src))
if(master)
master.spawn_spacevine_piece( F )
/*
/obj/effect/spacevine/proc/Life()
if (!src) return
var/Vspread
if (prob(50)) Vspread = locate(src.x + rand(-1,1),src.y,src.z)
else Vspread = locate(src.x,src.y + rand(-1, 1),src.z)
var/dogrowth = 1
if (!istype(Vspread, /turf/simulated/floor)) dogrowth = 0
for(var/obj/O in Vspread)
if (istype(O, /obj/structure/window) || istype(O, /obj/effect/forcefield) || istype(O, /obj/effect/blob) || istype(O, /obj/effect/alien/weeds) || istype(O, /obj/effect/spacevine)) dogrowth = 0
if (istype(O, /obj/machinery/door/))
if(O:p_open == 0 && prob(50)) O:open()
else dogrowth = 0
if (dogrowth == 1)
var/obj/effect/spacevine/B = new /obj/effect/spacevine(Vspread)
B.icon_state = pick("vine-light1", "vine-light2", "vine-light3")
spawn(20)
if(B)
B.Life()
src.growth += 1
if (src.growth == 10)
src.name = "Thick Space Kudzu"
src.icon_state = pick("vine-med1", "vine-med2", "vine-med3")
src.opacity = 1
src.waittime = 80
if (src.growth == 20)
src.name = "Dense Space Kudzu"
src.icon_state = pick("vine-hvy1", "vine-hvy2", "vine-hvy3")
src.density = 1
spawn(src.waittime)
if (src.growth < 20) src.Life()
*/
/obj/effect/spacevine/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(90))
del(src)
return
if(3.0)
if (prob(50))
del(src)
return
return
/obj/effect/spacevine/fire_act(null, temp, volume) //hotspots kill vines
del src
//Carn: Spacevines random event.
/proc/spacevine_infestation()
@@ -256,5 +12,5 @@
if(turfs.len) //Pick a turf to spawn at if we can
var/turf/simulated/floor/T = pick(turfs)
new/obj/effect/spacevine_controller(T) //spawn a controller at turf
new/obj/effect/plant_controller(T) //spawn a controller at turf
message_admins("\blue Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])")

View File

@@ -170,13 +170,13 @@
//find some plants, harvest
for(var/obj/machinery/hydroponics/H in view(7, src))
if(H.planted && !H.dead && H.myseed && prob(owned_bee_swarms.len * 10))
if(H.seed && !H.dead && prob(owned_bee_swarms.len * 10))
src.nutrilevel++
H.nutrilevel++
if(mut < H.mutmod - 1)
mut = H.mutmod - 1
else if(mut > H.mutmod - 1)
H.mutmod = mut
if(mut < H.mutation_mod - 1)
mut = H.mutation_mod - 1
else if(mut > H.mutation_mod - 1)
H.mutation_mod = mut
//flowers give us pollen (nutrients)
/* - All plants should be giving nutrients to the hive.
@@ -188,11 +188,11 @@
if(prob(10))
H.lastcycle -= 5
if(prob(10))
H.myseed.lifespan = max(initial(H.myseed.lifespan) * 1.5, H.myseed.lifespan + 1)
H.seed.lifespan = max(initial(H.seed.lifespan) * 1.5, H.seed.lifespan + 1)
if(prob(10))
H.myseed.endurance = max(initial(H.myseed.endurance) * 1.5, H.myseed.endurance + 1)
if(H.toxic && prob(10))
H.toxic = min(0, H.toxic - 1)
H.seed.endurance = max(initial(H.seed.endurance) * 1.5, H.seed.endurance + 1)
if(H.toxins && prob(10))
H.toxins = min(0, H.toxins - 1)
toxic++
/obj/machinery/apiary/proc/die()

View File

@@ -1,158 +0,0 @@
/* Moved all the plant people code here for ease of reference and coherency.
Injecting a pod person with a blood sample will grow a pod person with the memories and persona of that mob.
Growing it to term with nothing injected will grab a ghost from the observers. */
/obj/item/seeds/replicapod
name = "pack of dionaea-replicant seeds"
desc = "These seeds grow into 'replica pods' or 'dionaea', a form of strange sapient plantlife."
icon_state = "seed-replicapod"
mypath = "/obj/item/seeds/replicapod"
species = "replicapod"
plantname = "Dionaea"
productname = "/mob/living/carbon/human" //verrry special -- Urist
lifespan = 50 //no idea what those do
endurance = 8
maturation = 5
production = 10
yield = 1 //seeds if there isn't a dna inside
oneharvest = 1
potency = 30
plant_type = 0
growthstages = 6
var/ckey = null
var/realName = null
var/mob/living/carbon/human/source //Donor of blood, if any.
gender = MALE
var/obj/machinery/hydroponics/parent = null
var/found_player = 0
/obj/item/seeds/replicapod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/reagent_containers))
user << "You inject the contents of the syringe into the seeds."
var/datum/reagent/blood/B
//Find a blood sample to inject.
for(var/datum/reagent/R in W:reagents.reagent_list)
if(istype(R,/datum/reagent/blood))
B = R
break
if(B)
source = B.data["donor"]
user << "The strange, sluglike seeds quiver gently and swell with blood."
if(!source.client && source.mind)
for(var/mob/dead/observer/O in player_list)
if(O.mind == source.mind && config.revival_pod_plants)
O << "<b><font color = #330033><font size = 3>Your blood has been placed into a replica pod seed. Return to your body if you want to be returned to life as a pod person!</b> (Verbs -> Ghost -> Re-enter corpse)</font color>"
break
else
user << "Nothing happens."
return
if (!istype(source))
return
if(source.ckey)
realName = source.real_name
ckey = source.ckey
W:reagents.clear_reagents()
return
return ..()
/obj/item/seeds/replicapod/harvest(mob/user = usr)
parent = loc
var/found_player = 0
user.visible_message("\blue [user] carefully begins to open the pod...","\blue You carefully begin to open the pod...")
//If a sample is injected (and revival is allowed) the plant will be controlled by the original donor.
if(source && source.stat == 2 && source.client && source.ckey && config.revival_pod_plants)
transfer_personality(source.client)
else // If no sample was injected or revival is not allowed, we grab an interested observer.
request_player()
spawn(75) //If we don't have a ghost or the ghost is now unplayed, we just give the harvester some seeds.
if(!found_player)
parent.visible_message("The pod has formed badly, and all you can do is salvage some of the seeds.")
var/seed_count = 1
if(prob(yield * parent.yieldmod * 20))
seed_count++
for(var/i=0,i<seed_count,i++)
new /obj/item/seeds/replicapod(user.loc)
parent.update_tray()
return
/obj/item/seeds/replicapod/proc/request_player()
for(var/mob/dead/observer/O in player_list)
if(jobban_isbanned(O, "Dionaea") || (!is_alien_whitelisted(src, "Diona") && config.usealienwhitelist))
continue
if(O.client)
if(O.client.prefs.be_special & BE_PLANT)
question(O.client)
/obj/item/seeds/replicapod/proc/question(var/client/C)
spawn(0)
if(!C) return
var/response = alert(C, "Someone is harvesting a diona pod. Would you like to play as a diona?", "Dionaea harvest", "Yes", "No", "Never for this round.")
if(!C || ckey)
return
if(response == "Yes")
transfer_personality(C)
else if (response == "Never for this round")
C.prefs.be_special ^= BE_PLANT
/obj/item/seeds/replicapod/proc/transfer_personality(var/client/player)
if(!player) return
found_player = 1
var/mob/living/carbon/monkey/diona/podman = new(parent.loc)
podman.ckey = player.ckey
if(player.mob && player.mob.mind)
player.mob.mind.transfer_to(podman)
if(realName)
podman.real_name = realName
podman.dna.real_name = podman.real_name
// Update mode specific HUD icons.
callHook("harvest_podman", list(podman))
switch(ticker.mode.name)
if ("revolution")
if (podman.mind in ticker.mode:revolutionaries)
ticker.mode:add_revolutionary(podman.mind)
ticker.mode:update_all_rev_icons() //So the icon actually appears
if (podman.mind in ticker.mode:head_revolutionaries)
ticker.mode:update_all_rev_icons()
if ("nuclear emergency")
if (podman.mind in ticker.mode:syndicates)
ticker.mode:update_all_synd_icons()
if ("cult")
if (podman.mind in ticker.mode:cult)
ticker.mode:add_cultist(podman.mind)
ticker.mode:update_all_cult_icons() //So the icon actually appears
// -- End mode specific stuff
podman << "\green <B>You awaken slowly, feeling your sap stir into sluggish motion as the warm air caresses your bark.</B>"
if(source && ckey && podman.ckey == ckey)
podman << "<B>Memories of a life as [source] drift oddly through a mind unsuited for them, like a skin of oil over a fathomless lake.</B>"
podman << "<B>You are now one of the Dionaea, a race of drifting interstellar plantlike creatures that sometimes share their seeds with human traders.</B>"
podman << "<B>Too much darkness will send you into shock and starve you, but light will help you heal.</B>"
if(!realName)
var/newname = input(podman,"Enter a name, or leave blank for the default name.", "Name change","") as text
if (newname != "")
podman.real_name = newname
parent.visible_message("\blue The pod disgorges a fully-formed plant creature!")
parent.update_tray()

View File

@@ -7,44 +7,33 @@
anchored = 1
obj/machinery/seed_extractor/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/))
var/obj/item/weapon/reagent_containers/food/snacks/grown/F = O
user.drop_item()
user << "<span class='notice'>You extract some seeds from the [F.name].</span>"
var/seed = text2path(F.seed)
var/t_amount = 0
var/t_max = rand(1,4)
while(t_amount < t_max)
var/obj/item/seeds/t_prod = new seed(loc)
t_prod.species = F.species
t_prod.lifespan = F.lifespan
t_prod.endurance = F.endurance
t_prod.maturation = F.maturation
t_prod.production = F.production
t_prod.yield = F.yield
t_prod.potency = F.potency
t_amount++
del(O)
else if(istype(O, /obj/item/weapon/grown/))
var/obj/item/weapon/grown/F = O
user.drop_item()
user << "<span class='notice'>You extract some seeds from the [F.name].</span>"
var/seed = text2path(F.seed)
var/t_amount = 0
var/t_max = rand(1,4)
while(t_amount < t_max)
var/obj/item/seeds/t_prod = new seed(loc)
t_prod.species = F.species
t_prod.lifespan = F.lifespan
t_prod.endurance = F.endurance
t_prod.maturation = F.maturation
t_prod.production = F.production
t_prod.yield = F.yield
t_prod.potency = F.potency
t_amount++
// Fruits and vegetables.
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown) || istype(O, /obj/item/weapon/grown))
user.drop_item(O)
var/datum/seed/new_seed_type
if(istype(O, /obj/item/weapon/grown))
var/obj/item/weapon/grown/F = O
new_seed_type = seed_types[F.plantname]
else
var/obj/item/weapon/reagent_containers/food/snacks/grown/F = O
new_seed_type = seed_types[F.plantname]
if(new_seed_type)
user << "<span class='notice'>You extract some seeds from [O].</span>"
var/produce = rand(1,4)
for(var/i = 0;i<=produce;i++)
var/obj/item/seeds/seeds = new(get_turf(src))
seeds.seed_type = new_seed_type.name
seeds.update_seed()
else
user << "[O] doesn't seem to have any usable seeds inside it."
del(O)
//Grass.
else if(istype(O, /obj/item/stack/tile/grass))
var/obj/item/stack/tile/grass/S = O
user << "<span class='notice'>You extract some seeds from the [S.name].</span>"

View File

@@ -804,7 +804,7 @@
product_ads = "We like plants!;Don't you want some?;The greenest thumbs ever.;We like big plants.;Soft soil..."
icon_state = "nutri"
icon_deny = "nutri-deny"
products = list(/obj/item/nutrient/ez = 35,/obj/item/nutrient/l4z = 25,/obj/item/nutrient/rh = 15,/obj/item/weapon/pestspray = 20,
products = list(/obj/item/nutrient/ez = 35,/obj/item/nutrient/l4z = 25,/obj/item/nutrient/rh = 15,/obj/item/weapon/plantspray/pests = 20,
/obj/item/weapon/reagent_containers/syringe = 5,/obj/item/weapon/storage/bag/plants = 5)
premium = list(/obj/item/weapon/reagent_containers/glass/bottle/ammonia = 10,/obj/item/weapon/reagent_containers/glass/bottle/diethylamine = 5)

View File

@@ -81,7 +81,7 @@
var/damage = rand(15,30)
var/mob/living/carbon/human/H = M
if(!istype(M))
if(!istype(H))
H << "\red You land heavily!"
M.adjustBruteLoss(damage)
return

View File

@@ -5,26 +5,39 @@
/obj/item/weapon/grown // Grown weapons
name = "grown_weapon"
icon = 'icons/obj/weapons.dmi'
var/seed = ""
var/plantname = ""
var/productname = ""
var/species = ""
var/lifespan = 20
var/endurance = 15
var/maturation = 7
var/production = 7
var/yield = 2
var/plantname
var/potency = 1
var/plant_type = 0
New()
var/datum/reagents/R = new/datum/reagents(50)
reagents = R
R.my_atom = src
/obj/item/weapon/grown/New()
..()
var/datum/reagents/R = new/datum/reagents(50)
reagents = R
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
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))
/obj/item/weapon/grown/proc/changePotency(newValue) //-QualityVan
potency = newValue
/obj/item/weapon/grown/log
name = "towercap"
name = "tower-cap log"
desc = "It's better than bad, it's good!"
icon = 'icons/obj/harvest.dmi'
@@ -35,9 +48,7 @@
w_class = 3.0
throw_speed = 3
throw_range = 3
plant_type = 2
origin_tech = "materials=1"
seed = "/obj/item/seeds/towermycelium"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -55,8 +66,8 @@
del(src)
return
/obj/item/weapon/grown/sunflower // FLOWER POWER!
plantname = "sunflowers"
name = "sunflower"
desc = "It's beautiful! A certain person might beat you to death if you trample these."
icon = 'icons/obj/harvest.dmi'
@@ -68,40 +79,13 @@
w_class = 1.0
throw_speed = 1
throw_range = 3
plant_type = 1
seed = "/obj/item/seeds/sunflower"
/obj/item/weapon/grown/sunflower/attack(mob/M as mob, mob/user as mob)
M << "<font color='green'><b> [user] smacks you with a sunflower!</font><font color='yellow'><b>FLOWER POWER<b></font>"
user << "<font color='green'> Your sunflower's </font><font color='yellow'><b>FLOWER POWER</b></font><font color='green'> strikes [M]</font>"
/*
/obj/item/weapon/grown/gibtomato
desc = "A plump tomato."
icon = 'icons/obj/harvest.dmi'
name = "Gib Tomato"
icon_state = "gibtomato"
damtype = "fire"
force = 0
flags = TABLEPASS
throwforce = 1
w_class = 2.0
throw_speed = 1
throw_range = 3
plant_type = 1
seed = "/obj/item/seeds/gibtomato"
New()
..()
/obj/item/weapon/grown/gibtomato/New()
..()
src.gibs = new /obj/effect/gibspawner/human(get_turf(src))
src.gibs.attach(src)
src.smoke.set_up(10, 0, usr.loc)
*/
/obj/item/weapon/grown/nettle // -- Skie
plantname = "nettle"
desc = "It's probably <B>not</B> wise to touch it with bare hands..."
icon = 'icons/obj/weapons.dmi'
name = "nettle"
@@ -113,17 +97,12 @@
w_class = 2.0
throw_speed = 1
throw_range = 3
plant_type = 1
origin_tech = "combat=1"
seed = "/obj/item/seeds/nettleseed"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
reagents.add_reagent("nutriment", 1+round((potency / 50), 1))
reagents.add_reagent("sacid", round(potency, 1))
spawn(5)
force = round((5+potency/5), 1)
/obj/item/weapon/grown/nettle/pickup(mob/living/carbon/human/user as mob)
if(!user.gloves)
user << "\red The nettle burns your bare hand!"
@@ -135,7 +114,6 @@
else
user.take_organ_damage(0,force)
/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
if(!proximity) return
if(force > 0)
@@ -145,14 +123,12 @@
usr << "All the leaves have fallen off the nettle from violent whacking."
del(src)
/obj/item/weapon/grown/nettle/changePotency(newValue) //-QualityVan
potency = newValue
force = round((5+potency/5), 1)
/obj/item/weapon/grown/deathnettle // -- Skie
plantname = "deathnettle"
desc = "The \red glowing \black nettle incites \red<B>rage</B>\black in you just from looking at it!"
icon = 'icons/obj/weapons.dmi'
name = "deathnettle"
@@ -164,22 +140,17 @@
w_class = 2.0
throw_speed = 1
throw_range = 3
plant_type = 1
seed = "/obj/item/seeds/deathnettleseed"
origin_tech = "combat=3"
attack_verb = list("stung")
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
reagents.add_reagent("nutriment", 1+round((potency / 50), 1))
reagents.add_reagent("pacid", round(potency, 1))
spawn(5)
force = round((5+potency/2.5), 1)
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.</b>"
return (BRUTELOSS|TOXLOSS)
/obj/item/weapon/grown/deathnettle/pickup(mob/living/carbon/human/user as mob)
if(!user.gloves)
if(istype(user, /mob/living/carbon/human))
@@ -193,7 +164,6 @@
user.Paralyse(5)
user << "\red You are stunned by the Deathnettle when you try picking it up!"
/obj/item/weapon/grown/deathnettle/attack(mob/living/carbon/M as mob, mob/user as mob)
if(!..()) return
if(istype(M, /mob/living))
@@ -211,7 +181,6 @@
M.Weaken(force/15)
M.drop_item()
/obj/item/weapon/grown/deathnettle/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
if(!proximity) return
if (force > 0)
@@ -221,13 +190,10 @@
usr << "All the leaves have fallen off the deathnettle from violent whacking."
del(src)
/obj/item/weapon/grown/deathnettle/changePotency(newValue) //-QualityVan
potency = newValue
force = round((5+potency/2.5), 1)
/obj/item/weapon/corncob
name = "corn cob"
desc = "A reminder of meals gone by."
@@ -239,7 +205,6 @@
throw_speed = 4
throw_range = 20
/obj/item/weapon/corncob/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/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/kitchenknife/ritual))

View File

@@ -1,105 +1,210 @@
//Analyzer, pestkillers, weedkillers, nutrients, hatchets.
/obj/item/device/analyzer/plant_analyzer
name = "plant analyzer"
icon = 'icons/obj/device.dmi'
icon_state = "hydro"
item_state = "analyzer"
attack_self(mob/user as mob)
return 0
/obj/item/device/analyzer/plant_analyzer/attack_self(mob/user as mob)
return 0
/obj/item/device/analyzer/plant_analyzer/afterattack(obj/target, mob/user, flag)
if(!flag) return
// *************************************
// Pestkiller defines for hydroponics
// *************************************
var/datum/seed/grown_seed
var/datum/reagents/grown_reagents
if(istype(target,/obj/item/weapon/reagent_containers/food/snacks/grown))
/obj/item/pestkiller
name = "bottle of pestkiller"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
var/toxicity = 0
var/PestKillStr = 0
New()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
var/obj/item/weapon/reagent_containers/food/snacks/grown/G = target
grown_seed = seed_types[G.plantname]
grown_reagents = G.reagents
/obj/item/pestkiller/carbaryl
name = "bottle of carbaryl"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
toxicity = 4
PestKillStr = 2
New()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
else if(istype(target,/obj/item/weapon/grown))
/obj/item/pestkiller/lindane
name = "bottle of lindane"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle18"
flags = FPRINT | TABLEPASS
toxicity = 6
PestKillStr = 4
New()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
var/obj/item/weapon/grown/G = target
grown_seed = seed_types[G.plantname]
grown_reagents = G.reagents
/obj/item/pestkiller/phosmet
name = "bottle of phosmet"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle15"
flags = FPRINT | TABLEPASS
toxicity = 8
PestKillStr = 7
New()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
else if(istype(target,/obj/item/seeds))
var/obj/item/seeds/S = target
grown_seed = S.seed
else if(istype(target,/obj/machinery/hydroponics))
var/obj/machinery/hydroponics/H = target
grown_seed = H.seed
grown_reagents = H.reagents
if(!grown_seed)
user << "\red [src] can tell you nothing about [target]."
return
var/dat = "<h3>Plant data for [target]</h3>"
user.visible_message("\blue [user] runs the scanner over [target].")
dat += "<h2>General Data</h2>"
dat += "<table>"
dat += "<tr><td><b>Endurance</b></td><td>[grown_seed.endurance]</td></tr>"
dat += "<tr><td><b>Yield</b></td><td>[grown_seed.yield]</td></tr>"
dat += "<tr><td><b>Lifespan</b></td><td>[grown_seed.lifespan]</td></tr>"
dat += "<tr><td><b>Maturation time</b></td><td>[grown_seed.maturation]</td></tr>"
dat += "<tr><td><b>Production time</b></td><td>[grown_seed.production]</td></tr>"
dat += "<tr><td><b>Potency</b></td><td>[grown_seed.potency]</td></tr>"
dat += "</table>"
if(grown_reagents && grown_reagents.reagent_list && grown_reagents.reagent_list.len)
dat += "<h2>Reagent Data</h2>"
dat += "<br>This sample contains: "
for(var/datum/reagent/R in grown_reagents.reagent_list)
dat += "<br>- [R.id], [grown_reagents.get_reagent_amount(R.id)] unit(s)"
dat += "<h2>Other Data</h2>"
if(grown_seed.harvest_repeat)
dat += "This plant can be harvested repeatedly.<br>"
if(grown_seed.immutable)
dat += "This plant does not possess genetics that are alterable.<br>"
if(grown_seed.products && grown_seed.products.len)
dat += "The mature plant will produce [grown_seed.products.len == 1 ? "fruit" : "[grown_seed.products.len] varieties of fruit"].<br>"
if(grown_seed.requires_nutrients)
if(grown_seed.nutrient_consumption < 0.05)
dat += "It consumes a small amount of nutrient fluid.<br>"
else if(grown_seed.nutrient_consumption > 0.2)
dat += "It requires a heavy supply of nutrient fluid.<br>"
else
dat += "It requires a supply of nutrient fluid.<br>"
if(grown_seed.requires_water)
if(grown_seed.water_consumption < 1)
dat += "It requires very little water.<br>"
else if(grown_seed.water_consumption > 5)
dat += "It requires a large amount of water.<br>"
else
dat += "It requires a stable supply of water.<br>"
if(grown_seed.mutants && grown_seed.mutants.len)
dat += "It exhibits a high degree of potential subspecies shift.<br>"
dat += "It thrives in a temperature of [grown_seed.ideal_heat] Kelvin."
if(grown_seed.lowkpa_tolerance < 20)
dat += "<br>It is well adapted to low pressure levels."
if(grown_seed.highkpa_tolerance > 220)
dat += "<br>It is well adapted to high pressure levels."
if(grown_seed.heat_tolerance > 30)
dat += "<br>It is well adapted to a range of temperatures."
else if(grown_seed.heat_tolerance < 10)
dat += "<br>It is very sensitive to temperature shifts."
dat += "<br>It thrives in a light level of [grown_seed.ideal_light] lumen[grown_seed.ideal_light == 1 ? "" : "s"]."
if(grown_seed.light_tolerance > 10)
dat += "<br>It is well adapted to a range of light levels."
else if(grown_seed.light_tolerance < 3)
dat += "<br>It is very sensitive to light level shifts."
if(grown_seed.toxins_tolerance < 3)
dat += "<br>It is highly sensitive to toxins."
else if(grown_seed.toxins_tolerance > 6)
dat += "<br>It is remarkably resistant to toxins."
if(grown_seed.pest_tolerance < 3)
dat += "<br>It is highly sensitive to pests."
else if(grown_seed.pest_tolerance > 6)
dat += "<br>It is remarkably resistant to pests."
if(grown_seed.weed_tolerance < 3)
dat += "<br>It is highly sensitive to weeds."
else if(grown_seed.weed_tolerance > 6)
dat += "<br>It is remarkably resistant to weeds."
switch(grown_seed.spread)
if(1)
dat += "<br>It is capable of growing beyond the confines of a tray."
if(2)
dat += "<br>It is a robust and vigorous vine that will spread rapidly."
switch(grown_seed.carnivorous)
if(1)
dat += "<br>It is carniovorous and will eat tray pests for sustenance."
if(2)
dat += "<br>It is carnivorous and poses a significant threat to living things around it."
if(grown_seed.parasite)
dat += "<br>It is capable of parisitizing and gaining sustenance from tray weeds."
if(grown_seed.alter_temp)
dat += "<br>It will periodically alter the local temperature by [grown_seed.alter_temp] degrees Kelvin."
if(grown_seed.biolum)
dat += "<br>It is [grown_seed.biolum_colour ? "<font color='[grown_seed.biolum_colour]'>bio-luminescent</font>" : "bio-luminescent"]."
if(grown_seed.flowers)
dat += "<br>It has [grown_seed.flower_colour ? "<font color='[grown_seed.flower_colour]'>flowers</font>" : "flowers"]."
if(dat)
user << browse(dat,"window=plant_analyzer")
return
// *************************************
// Hydroponics Tools
// *************************************
/obj/item/weapon/weedspray // -- Skie
desc = "It's a toxic mixture, in spray form, to kill small weeds."
/obj/item/weapon/plantspray
icon = 'icons/obj/hydroponics.dmi'
item_state = "spray"
flags = TABLEPASS | OPENCONTAINER | FPRINT | NOBLUDGEON
slot_flags = SLOT_BELT
throwforce = 4
w_class = 2.0
throw_speed = 2
throw_range = 10
var/toxicity = 4
var/pest_kill_str = 0
var/weed_kill_str = 0
/obj/item/weapon/plantspray/weeds // -- Skie
name = "weed-spray"
desc = "It's a toxic mixture, in spray form, to kill small weeds."
icon_state = "weedspray"
item_state = "spray"
flags = TABLEPASS | OPENCONTAINER | FPRINT | NOBLUDGEON
slot_flags = SLOT_BELT
throwforce = 4
w_class = 2.0
throw_speed = 2
throw_range = 10
var/toxicity = 4
var/WeedKillStr = 2
weed_kill_str = 2
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.</b>"
return (TOXLOSS)
/obj/item/weapon/pestspray // -- Skie
desc = "It's some pest eliminator spray! <I>Do not inhale!</I>"
icon = 'icons/obj/hydroponics.dmi'
/obj/item/weapon/plantspray/pests
name = "pest-spray"
desc = "It's some pest eliminator spray! <I>Do not inhale!</I>"
icon_state = "pestspray"
item_state = "spray"
flags = TABLEPASS | OPENCONTAINER | FPRINT | NOBLUDGEON
slot_flags = SLOT_BELT
throwforce = 4
w_class = 2.0
throw_speed = 2
throw_range = 10
var/toxicity = 4
var/PestKillStr = 2
pest_kill_str = 2
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.</b>"
return (TOXLOSS)
/obj/item/weapon/plantspray/pests/old
name = "bottle of pestkiller"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
/obj/item/weapon/plantspray/pests/old/carbaryl
name = "bottle of carbaryl"
icon_state = "bottle16"
toxicity = 4
pest_kill_str = 2
/obj/item/weapon/plantspray/pests/old/lindane
name = "bottle of lindane"
icon_state = "bottle18"
toxicity = 6
pest_kill_str = 4
/obj/item/weapon/plantspray/pests/old/phosmet
name = "bottle of phosmet"
icon_state = "bottle15"
toxicity = 8
pest_kill_str = 7
/obj/item/weapon/minihoe // -- Numbers
name = "mini hoe"
@@ -125,7 +230,7 @@
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
var/toxicity = 0
var/WeedKillStr = 0
var/weed_kill_str = 0
/obj/item/weedkiller/triclopyr
name = "bottle of glyphosate"
@@ -133,7 +238,7 @@
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
toxicity = 4
WeedKillStr = 2
weed_kill_str = 2
/obj/item/weedkiller/lindane
name = "bottle of triclopyr"
@@ -141,7 +246,7 @@
icon_state = "bottle18"
flags = FPRINT | TABLEPASS
toxicity = 6
WeedKillStr = 4
weed_kill_str = 4
/obj/item/weedkiller/D24
name = "bottle of 2,4-D"
@@ -149,7 +254,7 @@
icon_state = "bottle15"
flags = FPRINT | TABLEPASS
toxicity = 8
WeedKillStr = 7
weed_kill_str = 7
// *************************************
@@ -175,9 +280,6 @@
flags = FPRINT | TABLEPASS
mutmod = 1
yieldmod = 1
New()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
/obj/item/nutrient/l4z
name = "bottle of Left 4 Zed"
@@ -185,22 +287,13 @@
icon_state = "bottle18"
flags = FPRINT | TABLEPASS
mutmod = 2
yieldmod = 0
New()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
/obj/item/nutrient/rh
name = "bottle of Robust Harvest"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle15"
flags = FPRINT | TABLEPASS
mutmod = 0
yieldmod = 2
New()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
//Hatchets and things to kill kudzu
/obj/item/weapon/hatchet
@@ -215,7 +308,7 @@
throw_speed = 4
throw_range = 4
sharp = 1
edge = 1
edge = 1
matter = list("metal" = 15000)
origin_tech = "materials=2;combat=1"
attack_verb = list("chopped", "torn", "cut")
@@ -232,7 +325,6 @@
icon_state = "unathiknife"
attack_verb = list("ripped", "torn", "cut")
/obj/item/weapon/scythe
icon_state = "scythe0"
name = "scythe"
@@ -249,8 +341,8 @@
/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(istype(A, /obj/effect/spacevine))
for(var/obj/effect/spacevine/B in orange(A,1))
if(istype(A, /obj/effect/plantsegment))
for(var/obj/effect/plantsegment/B in orange(A,1))
if(prob(80))
del B
del A

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,324 @@
/obj/item/weapon/disk/botany
name = "flora data disk"
desc = "A small disk used for carrying data on plant genetics."
icon = 'icons/obj/hydroponics.dmi'
icon_state = "disk"
var/list/genes = list()
var/genesource = "unknown"
/obj/item/weapon/disk/botany/attack_self(var/mob/user as mob)
if(genes.len)
user << "You wipe the disk data."
name = initial(name)
desc = initial(name)
genes = list()
genesource = "unknown"
/obj/item/weapon/storage/box/botanydisk
name = "flora disk box"
desc = "A box of flora data disks, apparently."
/obj/item/weapon/storage/box/botanydisk/New()
..()
for(var/i = 0;i<7;i++)
new /obj/item/weapon/disk/botany(src)
/obj/machinery/botany
icon = 'icons/obj/hydroponics.dmi'
icon_state = "hydrotray3"
density = 1
anchored = 1
use_power = 1
var/obj/item/seeds/seed // Currently loaded seed packet.
var/obj/item/weapon/disk/botany/loaded_disk //Currently loaded data disk.
var/open = 0
var/active = 0
var/action_time = 100
var/last_action = 0
var/eject_disk = 0
var/failed_task = 0
var/disk_needs_genes = 0
/obj/machinery/botany/process()
..()
if(!active) return
if(world.time > last_action + action_time)
finished_task()
/obj/machinery/botany/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/botany/attack_ai(mob/user as mob)
return attack_hand(user)
/obj/machinery/botany/attack_hand(mob/user as mob)
ui_interact(user)
/obj/machinery/botany/proc/finished_task()
active = 0
if(failed_task)
failed_task = 0
visible_message("\icon[src] [src] pings unhappily, flashing a red warning light.")
else
visible_message("\icon[src] [src] pings happily.")
if(eject_disk)
eject_disk = 0
if(loaded_disk)
loaded_disk.loc = get_turf(src)
visible_message("\icon[src] [src] beeps and spits out [loaded_disk].")
loaded_disk = null
/obj/machinery/botany/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/seeds))
if(seed)
if(seed.seed.immutable)
user << "That seed is not compatible with our genetics technology."
else
user << "There is already a seed loaded."
else
user.drop_item(W)
W.loc = src
seed = W
user << "You load [W] into [src]."
return
if(istype(W,/obj/item/weapon/screwdriver))
open = !open
user << "\blue You [open ? "open" : "close"] the maintenance panel."
return
if(open)
if(istype(W, /obj/item/weapon/crowbar))
dismantle()
return
if(istype(W,/obj/item/weapon/disk/botany))
if(loaded_disk)
user << "There is already a data disk loaded."
return
else
var/obj/item/weapon/disk/botany/B = W
if(B.genes && B.genes.len)
if(!disk_needs_genes)
user << "That disk already has gene data loaded."
return
else
if(disk_needs_genes)
user << "That disk does not have any gene data loaded."
return
user.drop_item(W)
W.loc = src
loaded_disk = W
user << "You load [W] into [src]."
return
..()
// Allows for a trait to be extracted from a seed packet, destroying that seed.
/obj/machinery/botany/extractor
name = "lysis-isolation centrifuge"
icon_state = "traitcopier"
var/datum/seed/genetics // Currently scanned seed genetic structure.
var/degradation = 0 // Increments with each scan, stops allowing gene mods after a certain point.
/obj/machinery/botany/extractor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!user)
return
var/list/data = list()
var/list/geneMasks[0]
for(var/gene_tag in gene_tag_masks)
geneMasks.Add(list(list("tag" = gene_tag, "mask" = gene_tag_masks[gene_tag])))
data["geneMasks"] = geneMasks
data["activity"] = active
data["degradation"] = degradation
if(loaded_disk)
data["disk"] = 1
else
data["disk"] = 0
if(seed)
data["loaded"] = "[seed.name]"
else
data["loaded"] = 0
if(genetics)
data["hasGenetics"] = 1
data["sourceName"] = genetics.display_name
if(!genetics.roundstart)
data["sourceName"] += " (variety #[genetics.uid])"
else
data["hasGenetics"] = 0
data["sourceName"] = 0
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "botany_isolator.tmpl", "Lysis-isolation Centrifuge UI", 470, 450)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
/obj/machinery/botany/Topic(href, href_list)
if(..())
return
if(href_list["eject_packet"])
if(!seed) return
seed.loc = get_turf(src)
if(seed.seed.name == "new line" || isnull(seed_types[seed.seed.name]))
seed.seed.uid = seed_types.len + 1
seed.seed.name = "[uid]"
seed_types[seed.seed.name] = seed.seed
seed.update_seed()
visible_message("\icon[src] [src] beeps and spits out [seed].")
seed = null
if(href_list["eject_disk"])
if(!loaded_disk) return
loaded_disk.loc = get_turf(src)
visible_message("\icon[src] [src] beeps and spits out [loaded_disk].")
loaded_disk = null
usr.set_machine(src)
src.add_fingerprint(usr)
/obj/machinery/botany/extractor/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["scan_genome"])
if(!seed) return
last_action = world.time
active = 1
if(seed && seed.seed)
genetics = seed.seed
del(seed)
seed = null
if(href_list["get_gene"])
if(!genetics || !loaded_disk) return
last_action = world.time
active = 1
var/datum/plantgene/P = genetics.get_gene(href_list["get_gene"])
if(!P) return
loaded_disk.genes += P
loaded_disk.genesource = "[genetics.display_name]"
if(!genetics.roundstart)
loaded_disk.genesource += " (variety #[genetics.uid])"
loaded_disk.name += " ([gene_tag_masks[href_list["get_gene"]]])"
loaded_disk.desc += " The label reads \'gene [gene_tag_masks[href_list["get_gene"]]], sampled from [genetics.display_name]\'."
eject_disk = 1
degradation += rand(20,60)
if(degradation >= 100)
failed_task = 1
genetics = null
degradation = 0
if(href_list["clear_buffer"])
if(!genetics) return
genetics = null
degradation = 0
src.updateUsrDialog()
return
// Fires an extracted trait into another packet of seeds with a chance
// of destroying it based on the size/complexity of the plasmid.
/obj/machinery/botany/editor
name = "bioballistic delivery system"
icon_state = "traitgun"
disk_needs_genes = 1
/obj/machinery/botany/editor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!user)
return
var/list/data = list()
data["activity"] = active
if(seed)
data["degradation"] = seed.modified
else
data["degradation"] = 0
if(loaded_disk && loaded_disk.genes.len)
data["disk"] = 1
data["sourceName"] = loaded_disk.genesource
data["locus"] = ""
for(var/datum/plantgene/P in loaded_disk.genes)
if(data["locus"] != "") data["locus"] += ", "
data["locus"] += "[gene_tag_masks[P.genetype]]"
else
data["disk"] = 0
data["sourceName"] = 0
data["locus"] = 0
if(seed)
data["loaded"] = "[seed.name]"
else
data["loaded"] = 0
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "botany_editor.tmpl", "Bioballistic Delivery UI", 470, 450)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
/obj/machinery/botany/editor/Topic(href, href_list)
if(..())
return
if(href_list["apply_gene"])
if(!loaded_disk || !seed) return
last_action = world.time
active = 1
if(!isnull(seed_types[seed.seed.name]))
seed.seed = seed.seed.diverge(1)
seed.seed_type = seed.seed.name
seed.update_seed()
if(prob(seed.modified))
failed_task = 1
seed.modified = 101
for(var/datum/plantgene/gene in loaded_disk.genes)
seed.seed.apply_gene(gene)
seed.modified += rand(5,10)
usr.set_machine(src)
src.add_fingerprint(usr)

View File

@@ -0,0 +1,80 @@
/datum/seed
var/product_requires_player // If yes, product will ask for a player among the ghosts.
var/list/currently_querying // Used to avoid asking the same ghost repeatedly.
// The following procs are used to grab players for mobs produced by a seed (mostly for dionaea).
/datum/seed/proc/handle_living_product(var/mob/living/host)
if(!host || !istype(host)) return
if(product_requires_player)
spawn(0)
request_player(host)
spawn(75)
if(!host.ckey && !host.client)
host.death() // This seems redundant, but a lot of mobs don't
host.stat = 2 // handle death() properly. Better safe than etc.
host.visible_message("\red <b>[host] is malformed and unable to survive. It expires pitifully, leaving behind some seeds.")
var/total_yield = rand(1,3)
for(var/j = 0;j<=total_yield;j++)
var/obj/item/seeds/S = new(get_turf(host))
S.seed_type = name
S.update_seed()
/datum/seed/proc/request_player(var/mob/living/host)
if(!host) return
for(var/mob/dead/observer/O in player_list)
if(jobban_isbanned(O, "Dionaea") || (!is_alien_whitelisted(src, "Diona") && config.usealienwhitelist))
continue
if(O.client)
if(O.client.prefs.be_special & BE_PLANT && !(O.client in currently_querying))
currently_querying |= O.client
question(O.client,host)
/datum/seed/proc/question(var/client/C,var/mob/living/host)
spawn(0)
if(!C || !host || !(C.mob && istype(C.mob,/mob/dead))) return // We don't want to spam them repeatedly if they're already in a mob.
var/response = alert(C, "Someone is harvesting [display_name]. Would you like to play as one?", "Sentient plant harvest", "Yes", "No", "Never for this round.")
if(!C || !host || !(C.mob && istype(C.mob,/mob/dead))) return // ...or accidentally accept an invalid argument for transfer.
if(response == "Yes")
transfer_personality(C,host)
else if (response == "Never for this round")
C.prefs.be_special ^= BE_PLANT
currently_querying -= C
/datum/seed/proc/transfer_personality(var/client/player,var/mob/living/host)
//Something is wrong, abort.
if(!player || !host) return
//Host already has a controller, pike off slowpoke.
if(host.client && host.ckey) return
//Transfer them over.
host.ckey = player.ckey
if(player.mob && player.mob.mind)
player.mob.mind.transfer_to(host)
if(host.dna) host.dna.real_name = host.real_name
// Update mode specific HUD icons.
callHook("harvest_podman", list(host))
host << "\green <B>You awaken slowly, stirring into sluggish motion as the air caresses you.</B>"
// This is a hack, replace with some kind of species blurb proc.
if(istype(host,/mob/living/carbon/monkey/diona))
host << "<B>You are [host], one of a race of drifting interstellar plantlike creatures that sometimes share their seeds with human traders.</B>"
host << "<B>Too much darkness will send you into shock and starve you, but light will help you heal.</B>"
var/newname = input(host,"Enter a name, or leave blank for the default name.", "Name change","") as text
newname = sanitize(newname)
if (newname != "")
host.real_name = newname
host.name = host.real_name

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,386 @@
// SPACE VINES (Note that this code is very similar to Biomass code)
/obj/effect/plantsegment
name = "space vines"
desc = "An extremely expansionistic species of vine."
icon = 'icons/effects/spacevines.dmi'
icon_state = "Light1"
anchored = 1
density = 0
layer = 5
pass_flags = PASSTABLE | PASSGRILLE
// Vars used by vines with seed data.
var/age = 0
var/lastproduce = 0
var/harvest = 0
var/list/chems
var/plant_damage_noun = "Thorns"
var/limited_growth = 0
// Life vars/
var/energy = 0
var/obj/effect/plant_controller/master = null
var/mob/living/buckled_mob
var/datum/seed/seed
/obj/effect/plantsegment/New()
return
/obj/effect/plantsegment/Del()
if(master)
master.vines -= src
master.growth_queue -= src
..()
/obj/effect/plantsegment/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (!W || !user || !W.type) return
switch(W.type)
if(/obj/item/weapon/circular_saw) del src
if(/obj/item/weapon/kitchen/utensil/knife) del src
if(/obj/item/weapon/scalpel) del src
if(/obj/item/weapon/twohanded/fireaxe) del src
if(/obj/item/weapon/hatchet) del src
if(/obj/item/weapon/melee/energy) del src
// Less effective weapons
if(/obj/item/weapon/wirecutters)
if(prob(25)) del src
if(/obj/item/weapon/shard)
if(prob(25)) del src
// Weapons with subtypes
else
if(istype(W, /obj/item/weapon/melee/energy/sword)) del src
else if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user)) del src
else
manual_unbuckle(user)
return
// Plant-b-gone damage is handled in its entry in chemistry-reagents.dm
..()
/obj/effect/plantsegment/attack_hand(mob/user as mob)
if(user.a_intent == "help" && seed && harvest)
seed.harvest(user,1)
harvest = 0
lastproduce = age
update()
return
manual_unbuckle(user)
/obj/effect/plantsegment/attack_paw(mob/user as mob)
manual_unbuckle(user)
/obj/effect/plantsegment/proc/unbuckle()
if(buckled_mob)
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
buckled_mob = null
return
/obj/effect/plantsegment/proc/manual_unbuckle(mob/user as mob)
if(buckled_mob)
if(prob(seed ? min(max(0,100 - seed.potency),100) : 50))
if(buckled_mob.buckled == src)
if(buckled_mob != user)
buckled_mob.visible_message(\
"<span class='notice'>[user.name] frees [buckled_mob.name] from [src].</span>",\
"<span class='notice'>[user.name] frees you from [src].</span>",\
"<span class='warning'>You hear shredding and ripping.</span>")
else
buckled_mob.visible_message(\
"<span class='notice'>[buckled_mob.name] struggles free of [src].</span>",\
"<span class='notice'>You untangle [src] from around yourself.</span>",\
"<span class='warning'>You hear shredding and ripping.</span>")
unbuckle()
else
var/text = pick("rips","tears","pulls")
user.visible_message(\
"<span class='notice'>[user.name] [text] at [src].</span>",\
"<span class='notice'>You [text] at [src].</span>",\
"<span class='warning'>You hear shredding and ripping.</span>")
return
/obj/effect/plantsegment/proc/grow()
if(!energy)
src.icon_state = pick("Med1", "Med2", "Med3")
energy = 1
//Low-lying creepers do not block vision or grow thickly.
if(limited_growth)
energy = 2
return
src.opacity = 1
layer = 5
else if(!limited_growth)
src.icon_state = pick("Hvy1", "Hvy2", "Hvy3")
energy = 2
/obj/effect/plantsegment/proc/entangle_mob()
if(limited_growth)
return
if(prob(seed ? seed.potency : 25))
if(!buckled_mob)
var/mob/living/carbon/V = locate() in src.loc
if(V && (V.stat != DEAD) && (V.buckled != src)) // If mob exists and is not dead or captured.
V.buckled = src
V.loc = src.loc
V.update_canmove()
src.buckled_mob = V
V << "<span class='danger'>The vines [pick("wind", "tangle", "tighten")] around you!</span>"
// FEED ME, SEYMOUR.
if(buckled_mob && seed && (buckled_mob.stat != DEAD)) //Don't bother with a dead mob.
var/mob/living/M = buckled_mob
if(!istype(M)) return
var/mob/living/carbon/human/H = buckled_mob
// Drink some blood/cause some brute.
if(seed.carnivorous == 2)
buckled_mob << "<span class='danger'>\The [src] pierces your flesh greedily!</span>"
var/damage = rand(round(seed.potency/2),seed.potency)
if(!istype(H))
H.adjustBruteLoss(damage)
return
var/datum/organ/external/affecting = H.get_organ(pick("l_foot","r_foot","l_leg","r_leg","l_hand","r_hand","l_arm", "r_arm","head","chest","groin"))
if(affecting)
affecting.take_damage(damage, 0)
if(affecting.parent)
affecting.parent.add_autopsy_data("[plant_damage_noun]", damage)
else
H.adjustBruteLoss(damage)
H.UpdateDamageIcon()
H.updatehealth()
// Inject some chems.
if(seed.chems && seed.chems.len && istype(H))
H << "<span class='danger'>You feel something seeping into your skin!</span>"
for(var/rid in seed.chems)
var/injecting = min(5,max(1,seed.potency/5))
H.reagents.add_reagent(rid,injecting)
/obj/effect/plantsegment/proc/update()
if(!seed) return
// Update bioluminescence.
if(seed.biolum)
SetLuminosity(1+round(seed.potency/10))
if(seed.biolum_colour)
l_color = seed.biolum_colour
else
l_color = null
return
else
SetLuminosity(0)
// Update flower/product overlay.
overlays.Cut()
if(age >= seed.maturation)
if(prob(20) && seed.products && seed.products.len && !harvest && ((age-lastproduce) > seed.production))
harvest = 1
lastproduce = age
if(harvest)
var/image/fruit_overlay = image('icons/obj/hydroponics.dmi',"")
if(seed.product_colour)
fruit_overlay.color = seed.product_colour
overlays += fruit_overlay
if(seed.flowers)
var/image/flower_overlay = image('icons/obj/hydroponics.dmi',"[seed.flower_icon]")
if(seed.flower_colour)
flower_overlay.color = seed.flower_colour
overlays += flower_overlay
/obj/effect/plantsegment/proc/spread()
var/direction = pick(cardinal)
var/step = get_step(src,direction)
if(istype(step,/turf/simulated/floor))
var/turf/simulated/floor/F = step
if(!locate(/obj/effect/plantsegment,F))
if(F.Enter(src))
if(master)
master.spawn_piece( F )
// Explosion damage.
/obj/effect/plantsegment/ex_act(severity)
switch(severity)
if(1.0)
die()
return
if(2.0)
if (prob(90))
die()
return
if(3.0)
if (prob(50))
die()
return
return
// Hotspots kill vines.
/obj/effect/plantsegment/fire_act(null, temp, volume)
del src
/obj/effect/plantsegment/proc/die()
if(seed && harvest)
seed.harvest(src,1)
del(src)
/obj/effect/plantsegment/proc/life()
if(!seed)
return
if(prob(30))
age++
var/turf/T = loc
var/datum/gas_mixture/environment
if(T) environment = T.return_air()
if(!environment)
return
var/pressure = environment.return_pressure()
if(pressure < seed.lowkpa_tolerance || pressure > seed.highkpa_tolerance)
die()
return
if(abs(environment.temperature - seed.ideal_heat) > seed.heat_tolerance)
die()
return
var/area/A = T.loc
if(A)
var/light_available
if(A.lighting_use_dynamic)
light_available = max(0,min(10,T.lighting_lumcount)-5)
else
light_available = 5
if(abs(light_available - seed.ideal_light) > seed.light_tolerance)
die()
return
/obj/effect/plant_controller
//What this does is that instead of having the grow minimum of 1, required to start growing, the minimum will be 0,
//meaning if you get the spacevines' size to something less than 20 plots, it won't grow anymore.
var/list/obj/effect/plantsegment/vines = list()
var/list/growth_queue = list()
var/reached_collapse_size
var/reached_slowdown_size
var/datum/seed/seed
var/collapse_limit = 250
var/slowdown_limit = 30
var/limited_growth = 0
/obj/effect/plant_controller/creeper
collapse_limit = 50
slowdown_limit = 5
limited_growth = 1
/obj/effect/plant_controller/New()
if(!istype(src.loc,/turf/simulated/floor))
del(src)
spawn(0)
spawn_piece(src.loc)
processing_objects.Add(src)
/obj/effect/plant_controller/Del()
processing_objects.Remove(src)
..()
/obj/effect/plant_controller/proc/spawn_piece(var/turf/location)
var/obj/effect/plantsegment/SV = new(location)
SV.limited_growth = src.limited_growth
growth_queue += SV
vines += SV
SV.master = src
if(seed)
SV.seed = seed
SV.name = "[seed.seed_name] vines"
SV.update()
/obj/effect/plant_controller/process()
// Space vines exterminated. Remove the controller
if(!vines)
del(src)
return
// Sanity check.
if(!growth_queue)
del(src)
return
// Check if we're too big for our own good.
if(vines.len >= (seed ? seed.potency * collapse_limit : 250) && !reached_collapse_size)
reached_collapse_size = 1
if(vines.len >= (seed ? seed.potency * slowdown_limit : 30) && !reached_slowdown_size )
reached_slowdown_size = 1
var/length = 0
if(reached_collapse_size)
length = 0
else if(reached_slowdown_size)
if(prob(seed ? seed.potency : 25))
length = 1
else
length = 0
else
length = 1
length = min(30, max(length, vines.len/5))
// Update as many pieces of vine as we're allowed to.
// Append updated vines to the end of the growth queue.
var/i = 0
var/list/obj/effect/plantsegment/queue_end = list()
for(var/obj/effect/plantsegment/SV in growth_queue)
i++
queue_end += SV
growth_queue -= SV
SV.life()
if(SV.energy < 2) //If tile isn't fully grown
var/chance
if(seed)
chance = limited_growth ? round(seed.potency/2,1) : seed.potency
else
chance = 20
if(prob(chance))
SV.grow()
else if(!seed || !limited_growth) //If tile is fully grown and not just a creeper.
SV.entangle_mob()
SV.update()
SV.spread()
if(i >= length)
break
growth_queue = growth_queue + queue_end

View File

@@ -16,80 +16,78 @@
mecha = null//This does not appear to be used outside of reference in mecha.dm.
attack_self(mob/user as mob)
if(brainmob && !brainmob.key && searching == 0)
//Start the process of searching for a new user.
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
icon_state = "posibrain-searching"
src.searching = 1
src.request_player()
spawn(600) reset_search()
/obj/item/device/mmi/posibrain/attack_self(mob/user as mob)
if(brainmob && !brainmob.key && searching == 0)
//Start the process of searching for a new user.
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
icon_state = "posibrain-searching"
src.searching = 1
src.request_player()
spawn(600) reset_search()
proc/request_player()
for(var/mob/dead/observer/O in player_list)
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
continue
if(jobban_isbanned(O, "pAI"))
continue
if(O.client)
if(O.client.prefs.be_special & BE_PAI)
question(O.client)
/obj/item/device/mmi/posibrain/proc/request_player()
for(var/mob/dead/observer/O in player_list)
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
continue
if(jobban_isbanned(O, "pAI"))
continue
if(O.client)
if(O.client.prefs.be_special & BE_PAI)
question(O.client)
proc/question(var/client/C)
spawn(0)
if(!C) return
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
if(response == "Yes")
transfer_personality(C.mob)
else if (response == "Never for this round")
C.prefs.be_special ^= BE_PAI
/obj/item/device/mmi/posibrain/proc/question(var/client/C)
spawn(0)
if(!C) return
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
if(response == "Yes")
transfer_personality(C.mob)
else if (response == "Never for this round")
C.prefs.be_special ^= BE_PAI
transfer_identity(var/mob/living/carbon/H)
name = "positronic brain ([H])"
brainmob.name = H.real_name
brainmob.real_name = H.real_name
brainmob.dna = H.dna
brainmob.timeofhostdeath = H.timeofdeath
brainmob.stat = 0
if(brainmob.mind)
brainmob.mind.assigned_role = "Positronic Brain"
if(H.mind)
H.mind.transfer_to(brainmob)
brainmob << "\blue You feel slightly disoriented. That's normal when you're just a metal cube."
icon_state = "posibrain-occupied"
return
/obj/item/device/mmi/posibrain/transfer_identity(var/mob/living/carbon/H)
name = "positronic brain ([H])"
brainmob.name = H.real_name
brainmob.real_name = H.real_name
brainmob.dna = H.dna
brainmob.timeofhostdeath = H.timeofdeath
brainmob.stat = 0
if(brainmob.mind)
brainmob.mind.assigned_role = "Positronic Brain"
if(H.mind)
H.mind.transfer_to(brainmob)
brainmob << "\blue You feel slightly disoriented. That's normal when you're just a metal cube."
icon_state = "posibrain-occupied"
return
proc/transfer_personality(var/mob/candidate)
/obj/item/device/mmi/posibrain/proc/transfer_personality(var/mob/candidate)
src.searching = 0
src.brainmob.mind = candidate.mind
//src.brainmob.key = candidate.key
src.brainmob.ckey = candidate.ckey
src.name = "positronic brain ([src.brainmob.name])"
src.searching = 0
src.brainmob.mind = candidate.mind
src.brainmob.ckey = candidate.ckey
src.name = "positronic brain ([src.brainmob.name])"
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
src.brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
src.brainmob << "<b>Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
src.brainmob << "<b>Use say :b to speak to other artificial intelligences.</b>"
src.brainmob.mind.assigned_role = "Positronic Brain"
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
src.brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
src.brainmob << "<b>Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
src.brainmob << "<b>Use say :b to speak to other artificial intelligences.</b>"
src.brainmob.mind.assigned_role = "Positronic Brain"
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain chimes quietly.")
icon_state = "posibrain-occupied"
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain chimes quietly.")
icon_state = "posibrain-occupied"
/obj/item/device/mmi/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
if(src.brainmob && src.brainmob.key) return
if(src.brainmob && src.brainmob.key) return
src.searching = 0
icon_state = "posibrain"
src.searching = 0
icon_state = "posibrain"
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
/obj/item/device/mmi/posibrain/examine()

View File

@@ -155,10 +155,10 @@
turns_per_move = rand(1,3)
else if(feral < 0)
turns_since_move = 0
else if(!my_hydrotray || my_hydrotray.loc != src.loc || !my_hydrotray.planted || my_hydrotray.dead || !my_hydrotray.myseed)
else if(!my_hydrotray || my_hydrotray.loc != src.loc || my_hydrotray.dead || !my_hydrotray.seed)
var/obj/machinery/hydroponics/my_hydrotray = locate() in src.loc
if(my_hydrotray)
if(my_hydrotray.planted && !my_hydrotray.dead && my_hydrotray.myseed)
if(!my_hydrotray.dead && my_hydrotray.seed)
turns_per_move = rand(20,50)
else
my_hydrotray = null

View File

@@ -45,8 +45,8 @@
if(udder && prob(5))
udder.add_reagent("milk", rand(5, 10))
if(locate(/obj/effect/spacevine) in loc)
var/obj/effect/spacevine/SV = locate(/obj/effect/spacevine) in loc
if(locate(/obj/effect/plantsegment) in loc)
var/obj/effect/plantsegment/SV = locate(/obj/effect/plantsegment) in loc
del(SV)
if(prob(10))
say("Nom")
@@ -55,7 +55,7 @@
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
var/step = get_step(src, direction)
if(step)
if(locate(/obj/effect/spacevine) in step)
if(locate(/obj/effect/plantsegment) in step)
Move(step)
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
@@ -65,8 +65,8 @@
/mob/living/simple_animal/hostile/retaliate/goat/Move()
..()
if(!stat)
if(locate(/obj/effect/spacevine) in loc)
var/obj/effect/spacevine/SV = locate(/obj/effect/spacevine) in loc
if(locate(/obj/effect/plantsegment) in loc)
var/obj/effect/plantsegment/SV = locate(/obj/effect/plantsegment) in loc
del(SV)
if(prob(10))
say("Nom")

View File

@@ -736,10 +736,15 @@ note dizziness decrements automatically in the mob's Life() proc.
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
/mob/proc/update_canmove()
if(buckled && (!buckled.movable))
var/is_movable
if(buckled && istype(buckled))
is_movable = buckled.movable
if(buckled && !is_movable)
anchored = 1
canmove = 0
if( istype(buckled,/obj/structure/stool/bed/chair) )
if(istype(buckled,/obj/structure/stool/bed/chair) )
lying = 0
else if(istype(buckled, /obj/vehicle))
var/obj/vehicle/V = buckled
@@ -749,7 +754,7 @@ note dizziness decrements automatically in the mob's Life() proc.
lying = 1
else
lying = 1
else if(buckled && (buckled.movable))
else if(buckled && is_movable)
anchored = 0
canmove = 1
lying = 0
@@ -757,7 +762,6 @@ note dizziness decrements automatically in the mob's Life() proc.
lying = 1
canmove = 0
else if( stunned )
// lying = 0
canmove = 0
else if(captured)
anchored = 1

View File

@@ -1332,7 +1332,7 @@ datum
if(!M) M = holder.my_atom
if(ishuman(M))
var/mob/living/carbon/human/H = M
//Peridaxon is hard enough to get, it's probably fair to make this all internal organs
for(var/datum/organ/internal/I in H.internal_organs)
if(I.damage > 0)
@@ -1760,7 +1760,7 @@ datum
alien_weeds.healthcheck()
else if(istype(O,/obj/effect/glowshroom)) //even a small amount is enough to kill it
del(O)
else if(istype(O,/obj/effect/spacevine))
else if(istype(O,/obj/effect/plantsegment))
if(prob(50)) del(O) //Kills kudzu too.
// Damage that is done to growing plants is separately at code/game/machinery/hydroponics at obj/item/hydroponics

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +1,3 @@
/obj/item/seeds/telriis
name = "pack of telriis seeds"
desc = "These seeds grow into telriis grass. Not recommended for consumption by sentient species."
icon_state = "seed-alien1"
mypath = "/obj/item/seeds/telriis"
species = "telriis"
plantname = "Telriis grass"
productname = "/obj/item/weapon/telriis_clump"
lifespan = 50 //number of ticks
endurance = 50 //
maturation = 5 //ticks to full growth stage
production = 5 //ticks till ready to harvest
yield = 4 //number produced when harvest
potency = 5
plant_type = 1 //1=weed, 2=shroom, 0=normal
growthstages = 4
/obj/item/weapon/reagent_containers/food/snacks/grown/telriis_clump
name = "telriis grass"
desc = "A clump of telriis grass, not recommended for consumption by sentients."
@@ -27,24 +9,6 @@
reagents.add_reagent("nutriment", potency)
bitesize = 1+round(reagents.total_volume / 2, 1)
/obj/item/seeds/thaadra
name = "pack of thaa'dra seeds"
desc = "These seeds grow into Thaa'dra lichen. Likes the cold."
icon_state = "seed-alien3"
mypath = "/obj/item/seeds/thaadra"
species = "thaadra"
plantname = "Thaa'dra lichen"
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/thaadra"
lifespan = 20
endurance = 10
maturation = 5
production = 9
yield = 2
potency = 5
plant_type = 2
growthstages = 4
/obj/item/weapon/reagent_containers/food/snacks/grown/thaadrabloom
name = "thaa'dra bloom"
desc = "Looks chewy, might be good to eat."
@@ -56,23 +20,6 @@
reagents.add_reagent("nutriment", potency)
bitesize = 1+round(reagents.total_volume / 2, 1)
/obj/item/seeds/jurlmah
name = "pack of jurl'mah seeds"
desc = "These seeds grow into jurl'mah reeds, which produce large syrupy pods."
icon_state = "seed-alien3"
mypath = "/obj/item/seeds/jurlmah"
species = "jurlmah"
plantname = "jurl'mah reeds"
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/jurlmah"
lifespan = 20
endurance = 12
maturation = 8
production = 9
yield = 3
potency = 10
growthstages = 5
/obj/item/weapon/reagent_containers/food/snacks/grown/jurlmah
name = "jurl'mah pod"
desc = "Bulbous and veiny, it appears to pulse slightly as you look at it."
@@ -84,23 +31,6 @@
reagents.add_reagent("nutriment", potency)
bitesize = 1+round(reagents.total_volume / 2, 1)
/obj/item/seeds/amauri
name = "pack of amauri seeds"
desc = "Grows into a straight, dark plant with small round fruit."
icon_state = "seed-alien3"
mypath = "/obj/item/seeds/amauri"
species = "amauri"
plantname = "amauri plant"
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/amauri"
lifespan = 30
endurance = 10
maturation = 8
production = 9
yield = 4
potency = 10
growthstages = 3
/obj/item/weapon/reagent_containers/food/snacks/grown/amauri
name = "amauri fruit"
desc = "It is small, round and hard. Its skin is a thick dark purple."
@@ -113,23 +43,6 @@
reagents.add_reagent("nutriment", potency)
bitesize = 1+round(reagents.total_volume / 2, 1)
/obj/item/seeds/gelthi
name = "pack of gelthi seeds"
desc = "Grows into a bright, wavy plant with many small fruits."
icon_state = "seed-alien2"
mypath = "/obj/item/seeds/gelthi"
species = "gelthi"
plantname = "gelthi plant"
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/gelthi"
lifespan = 20
endurance = 15
maturation = 6
production = 6
yield = 2
potency = 1
growthstages = 3
/obj/item/weapon/reagent_containers/food/snacks/grown/gelthi
name = "gelthi berries"
desc = "They feel fluffy and slightly warm to the touch."
@@ -143,23 +56,6 @@
reagents.add_reagent("nutriment", potency)
bitesize = 1+round(reagents.total_volume / 2, 1)
/obj/item/seeds/vale
name = "pack of vale seeds"
desc = "The vale bush is often depicted in ancient heiroglyphs and is similar to cherry blossoms."
icon_state = "seed-alien2"
mypath = "/obj/item/seeds/vale"
species = "vale"
plantname = "vale bush"
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/vale"
lifespan = 25
endurance = 15
maturation = 8
production = 10
yield = 3
potency = 3
growthstages = 4
/obj/item/weapon/reagent_containers/food/snacks/grown/vale
name = "vale leaves"
desc = "Small, curly leaves covered in a soft pale fur."
@@ -172,23 +68,6 @@
reagents.add_reagent("nutriment", potency)
bitesize = 1+round(reagents.total_volume / 2, 1)
/obj/item/seeds/surik
name = "pack of surik seeds"
desc = "A spiky blue vine with large fruit resembling pig ears."
icon_state = "seed-alien3"
mypath = "/obj/item/seeds/surik"
species = "surik"
plantname = "surik vine"
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/surik"
lifespan = 30
endurance = 18
maturation = 7
production = 7
yield = 3
potency = 3
growthstages = 4
/obj/item/weapon/reagent_containers/food/snacks/grown/surik
name = "surik fruit"
desc = "Multiple layers of blue skin peeling away to reveal a spongey core, vaguely resembling an ear."
@@ -199,4 +78,4 @@
reagents.add_reagent("impedrezene", potency * 3)
reagents.add_reagent("synaptizine", potency * 2)
reagents.add_reagent("nutriment", potency)
bitesize = 1+round(reagents.total_volume / 2, 1)
bitesize = 1+round(reagents.total_volume / 2, 1)

View File

@@ -0,0 +1,139 @@
/datum/seed/telriis
name = "telriis"
seed_name = "telriis"
display_name = "telriis grass"
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/telriis_clump)
packet_icon = "seed-alien1"
plant_icon = "telriis"
lifespan = 50
endurance = 50
maturation = 5
production = 5
yield = 4
potency = 5
growth_stages = 4
/datum/seed/thaadra
name = "thaadra"
seed_name = "thaa'dra"
display_name = "thaa'dra lichen"
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/thaadrabloom)
packet_icon = "seed-alien3"
plant_icon = "thaadra"
lifespan = 20
endurance = 10
maturation = 5
production = 9
yield = 2
potency = 5
growth_stages = 4
/datum/seed/jurlmah
name = "jurlmah"
seed_name = "jurl'mah"
display_name = "jurl'mah reeds"
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/jurlmah)
packet_icon = "seed-alien3"
plant_icon = "jurlmah"
lifespan = 20
endurance = 12
maturation = 8
production = 9
yield = 3
potency = 10
growth_stages = 5
/datum/seed/amauri
name = "amauri"
seed_name = "amauri"
display_name = "amauri plant"
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/amauri)
packet_icon = "seed-alien3"
plant_icon = "amauri"
lifespan = 30
endurance = 10
maturation = 8
production = 9
yield = 4
potency = 10
growth_stages = 3
/datum/seed/gelthi
name = "gelthi"
seed_name = "gelthi"
display_name = "gelthi plant"
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/gelthi)
packet_icon = "seed-alien2"
plant_icon = "gelthi"
lifespan = 20
endurance = 15
maturation = 6
production = 6
yield = 2
potency = 1
growth_stages = 3
/datum/seed/vale
name = "vale"
seed_name = "vale"
display_name = "vale bush"
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/vale)
packet_icon = "seed-alien2"
plant_icon = "vale"
lifespan = 25
endurance = 15
maturation = 8
production = 10
yield = 3
potency = 3
growth_stages = 4
/datum/seed/surik
name = "surik"
seed_name = "surik"
display_name = "surik vine"
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/surik)
packet_icon = "seed-alien3"
plant_icon = "surik"
lifespan = 30
endurance = 18
maturation = 7
production = 7
yield = 3
potency = 3
growth_stages = 4
/obj/item/seeds/jurlmah
seed_type = "jurlmah"
/obj/item/seeds/amauri
seed_type = "amauri"
/obj/item/seeds/gelthi
seed_type = "gelthi"
/obj/item/seeds/vale
seed_type = "vale"
/obj/item/seeds/surik
seed_type = "surik"
/obj/item/seeds/telriis
seed_type = "telriis"
/obj/item/seeds/thaadra
seed_type = "thaadra"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

After

Width:  |  Height:  |  Size: 159 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,56 @@
<!--
Title: Bioballistic Delivery System UI
Used In File(s): \code\modules\hydroponics\seed_machines.dm
-->
{{if data.activity}}
Scanning...
{{else}}
<h3>Buffered Genetic Data</h3>
{{if data.disk}}
<div class="item">
<div class="itemLabel">
Source:
</div>
<div class="itemContent">
{{:data.sourceName}}
</div>
<div class="itemLabel">
Gene decay:
</div>
<div class="itemContent">
{{if data.degradation <= 100}}
{{:data.degradation}}%
{{else}}
<font = '#FF0000'><b>FURTHER AMENDMENTS NONVIABLE</b></font>
{{/if}}
</div>
<div class="itemLabel">
Locus:
</div>
<div class="itemContent">
{{:data.locus}}
</div>
{{:helper.link('Eject Disk', 'circle-arrow-e', {'eject_disk' : 1}, null)}}
</div>
{{else}}
<div class="notice">No disk loaded.</div>
{{/if}}
<h3>Loaded Material</h3>
{{if data.loaded}}
<div class = "item">
<div class = "itemLabel">
Target:
</div>
<div class = "itemContent">
{{:data.loaded}}
</div>
{{if data.degradation <= 100}}
{{:helper.link('Apply Gene Mods', 'gear', {'apply_gene' : 1}, null)}}
{{/if}}
{{:helper.link('Eject Target', 'circle-arrow-e', {'eject_packet' : 1}, null)}}
</div>
{{else}}
<div class="notice">No target seed packet loaded</div>
{{/if}}
{{/if}}

View File

@@ -0,0 +1,73 @@
<!--
Title: Lysis-isolation Centrifuge UI
Used In File(s): \code\modules\hydroponics\seed_machines.dm
-->
{{if data.activity}}
Scanning...
{{else}}
<h3>Buffered Genetic Data</h3>
{{if data.hasGenetics}}
<div class="item">
<div class="itemLabel">
Source:
</div>
<div class="itemContent">
{{:data.sourceName}}
</div>
<div class="itemLabel">
Gene decay:
</div>
<div class="itemContent">
{{:data.degradation}}%
</div>
</div>
{{if data.disk}}
{{for data.geneMasks}}
<div class="item">
<div class="itemLabel">
{{:value.mask}}
</div>
<div class="itemContent">
{{:helper.link('Extract', 'circle-arrow-s', {'get_gene' : value.tag}, null)}}
</div>
</div>
{{empty}}
<div class="notice">Data error. Genetic record corrupt.</div>
{{/for}}
<br>
<div class="item">
{{:helper.link('Eject Loaded Disk', 'circle-arrow-e', {'eject_disk' : 1}, null)}}
{{:helper.link('Clear Genetic Buffer', 'gear', {'clear_buffer' : 1}, null)}}
</div>
{{else}}
<div class="notice">No disk inserted.</div>
{{/if}}
{{else}}
<div class="notice">No data buffered.</div>
{{if data.disk}}
<br>
<div class="item">
{{:helper.link('Eject Loaded Disk', 'circle-arrow-e', {'eject_disk' : 1}, null)}}
</div>
{{else}}
<div class="notice">No disk inserted.</div>
{{/if}}
{{/if}}
<h3>Loaded Material</h3>
{{if data.loaded}}
<div class="item">
<div class="itemLabel">
Packet loaded:
</div>
<div class="itemContent">
{{:data.loaded}}
</div>
<div class="item">
{{:helper.link('Process Genome', 'gear', {'scan_genome' : 1}, null)}}{{:helper.link('Eject Packet', 'circle-arrow-e', {'eject_packet' : 1}, null)}}
</div>
</div>
{{else}}
<div class="notice">No seeds loaded.</div>
{{/if}}
{{/if}}