mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Fixed diona pods being mutable, fixed a few other tweaks, added cuttings.
This commit is contained in:
@@ -266,7 +266,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
/obj/item/weapon/minihoe,
|
/obj/item/weapon/minihoe,
|
||||||
/obj/item/device/analyzer/plant_analyzer,
|
/obj/item/device/analyzer/plant_analyzer,
|
||||||
/obj/item/clothing/gloves/botanic_leather,
|
/obj/item/clothing/gloves/botanic_leather,
|
||||||
/obj/item/clothing/suit/apron) // Updated with new things
|
/obj/item/clothing/suit/apron,
|
||||||
|
/obj/item/weapon/minihoe,
|
||||||
|
/obj/item/weapon/storage/box/botanydisk
|
||||||
|
) // Updated with new things
|
||||||
cost = 15
|
cost = 15
|
||||||
containertype = /obj/structure/closet/crate/hydroponics
|
containertype = /obj/structure/closet/crate/hydroponics
|
||||||
containername = "Hydroponics crate"
|
containername = "Hydroponics crate"
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
//Analyzer, pestkillers, weedkillers, nutrients, hatchets.
|
//Analyzer, pestkillers, weedkillers, nutrients, hatchets, cutters.
|
||||||
|
|
||||||
|
/obj/item/weapon/wirecutters/clippers
|
||||||
|
name = "plant clippers"
|
||||||
|
desc = "A tool used to take samples from plants."
|
||||||
|
|
||||||
/obj/item/device/analyzer/plant_analyzer
|
/obj/item/device/analyzer/plant_analyzer
|
||||||
name = "plant analyzer"
|
name = "plant analyzer"
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
var/lastcycle = 0 // Cycle timing/tracking var.
|
var/lastcycle = 0 // Cycle timing/tracking var.
|
||||||
var/cycledelay = 150 // Delay per cycle.
|
var/cycledelay = 150 // Delay per cycle.
|
||||||
var/closed_system // If set, the tray will attempt to take atmos from a pipe.
|
var/closed_system // If set, the tray will attempt to take atmos from a pipe.
|
||||||
|
var/force_update
|
||||||
|
|
||||||
// Seed details/line data.
|
// Seed details/line data.
|
||||||
var/datum/seed/seed = null // The currently planted seed
|
var/datum/seed/seed = null // The currently planted seed
|
||||||
@@ -117,6 +118,10 @@
|
|||||||
|
|
||||||
/obj/machinery/portable_atmospherics/hydroponics/bullet_act(var/obj/item/projectile/Proj)
|
/obj/machinery/portable_atmospherics/hydroponics/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
|
||||||
|
//Don't act on seeds like dionaea that shouldn't change.
|
||||||
|
if(seed && seed.immutable)
|
||||||
|
return
|
||||||
|
|
||||||
//Override for somatoray projectiles.
|
//Override for somatoray projectiles.
|
||||||
if(istype(Proj ,/obj/item/projectile/energy/floramut) && prob(20))
|
if(istype(Proj ,/obj/item/projectile/energy/floramut) && prob(20))
|
||||||
mutate(1)
|
mutate(1)
|
||||||
@@ -138,8 +143,11 @@
|
|||||||
/obj/machinery/portable_atmospherics/hydroponics/process()
|
/obj/machinery/portable_atmospherics/hydroponics/process()
|
||||||
|
|
||||||
// Update values every cycle rather than every process() tick.
|
// Update values every cycle rather than every process() tick.
|
||||||
if(world.time < (lastcycle + cycledelay))
|
if(force_update)
|
||||||
|
force_update = 0
|
||||||
|
else if(world.time < (lastcycle + cycledelay))
|
||||||
return
|
return
|
||||||
|
|
||||||
lastcycle = world.time
|
lastcycle = world.time
|
||||||
|
|
||||||
// Weeds like water and nutrients, there's a chance the weed population will increase.
|
// Weeds like water and nutrients, there's a chance the weed population will increase.
|
||||||
@@ -380,8 +388,6 @@
|
|||||||
|
|
||||||
/obj/machinery/portable_atmospherics/hydroponics/proc/mutate(var/severity)
|
/obj/machinery/portable_atmospherics/hydroponics/proc/mutate(var/severity)
|
||||||
|
|
||||||
world << "Tray mutation proc called with [severity]."
|
|
||||||
|
|
||||||
// No seed, no mutations.
|
// No seed, no mutations.
|
||||||
if(!seed)
|
if(!seed)
|
||||||
return
|
return
|
||||||
@@ -439,7 +445,22 @@
|
|||||||
|
|
||||||
/obj/machinery/portable_atmospherics/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
/obj/machinery/portable_atmospherics/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||||
|
|
||||||
if (istype(O, /obj/item/weapon/reagent_containers/glass))
|
if(istype(O, /obj/item/weapon/wirecutters) || istype(O, /obj/item/weapon/scalpel))
|
||||||
|
|
||||||
|
if(!seed)
|
||||||
|
user << "There is nothing to take a sample from in \the [src]."
|
||||||
|
return
|
||||||
|
|
||||||
|
seed.harvest(user,yield_mod,1)
|
||||||
|
health -= (rand(1,5)*10)
|
||||||
|
check_level_sanity()
|
||||||
|
|
||||||
|
force_update = 1
|
||||||
|
process()
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
else if (istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||||
var/b_amount = O.reagents.get_reagent_amount("water")
|
var/b_amount = O.reagents.get_reagent_amount("water")
|
||||||
if(b_amount > 0 && waterlevel < 100)
|
if(b_amount > 0 && waterlevel < 100)
|
||||||
if(b_amount + waterlevel > 100)
|
if(b_amount + waterlevel > 100)
|
||||||
@@ -615,7 +636,8 @@
|
|||||||
seed = S.seed //Grab the seed datum.
|
seed = S.seed //Grab the seed datum.
|
||||||
dead = 0
|
dead = 0
|
||||||
age = 1
|
age = 1
|
||||||
health = seed.endurance
|
//Snowflakey, maybe move this to the seed datum
|
||||||
|
health = (istype(S, /obj/item/seeds/cutting) ? round(seed.endurance/rand(2,5)) : seed.endurance)
|
||||||
lastcycle = world.time
|
lastcycle = world.time
|
||||||
|
|
||||||
del(O)
|
del(O)
|
||||||
|
|||||||
@@ -105,8 +105,6 @@ proc/populate_seed_list()
|
|||||||
//Mutates the plant overall (randomly).
|
//Mutates the plant overall (randomly).
|
||||||
/datum/seed/proc/mutate(var/degree,var/turf/source_turf)
|
/datum/seed/proc/mutate(var/degree,var/turf/source_turf)
|
||||||
|
|
||||||
world << "Seed mutation proc called with [degree]."
|
|
||||||
|
|
||||||
if(!degree || immutable) return
|
if(!degree || immutable) return
|
||||||
|
|
||||||
source_turf.visible_message("\blue \The [display_name] quivers!")
|
source_turf.visible_message("\blue \The [display_name] quivers!")
|
||||||
@@ -346,7 +344,7 @@ proc/populate_seed_list()
|
|||||||
return (P ? P : 0)
|
return (P ? P : 0)
|
||||||
|
|
||||||
//Place the plant products at the feet of the user.
|
//Place the plant products at the feet of the user.
|
||||||
/datum/seed/proc/harvest(var/mob/user,var/yield_mod)
|
/datum/seed/proc/harvest(var/mob/user,var/yield_mod,var/harvest_sample)
|
||||||
if(!user)
|
if(!user)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -358,7 +356,7 @@ proc/populate_seed_list()
|
|||||||
if(!got_product)
|
if(!got_product)
|
||||||
user << "\red You fail to harvest anything useful."
|
user << "\red You fail to harvest anything useful."
|
||||||
else
|
else
|
||||||
user << "You harvest from the [display_name]."
|
user << "You [harvest_sample ? "take a sample" : "harvest"] from the [display_name]."
|
||||||
|
|
||||||
//This may be a new line. Update the global if it is.
|
//This may be a new line. Update the global if it is.
|
||||||
if(name == "new line" || !(name in seed_types))
|
if(name == "new line" || !(name in seed_types))
|
||||||
@@ -366,6 +364,12 @@ proc/populate_seed_list()
|
|||||||
name = "[uid]"
|
name = "[uid]"
|
||||||
seed_types[name] = src
|
seed_types[name] = src
|
||||||
|
|
||||||
|
if(harvest_sample)
|
||||||
|
var/obj/item/seeds/seeds = new(get_turf(user))
|
||||||
|
seeds.seed_type = name
|
||||||
|
seeds.update_seed()
|
||||||
|
return
|
||||||
|
|
||||||
var/total_yield
|
var/total_yield
|
||||||
if(isnull(yield_mod) || yield_mod < 1)
|
if(isnull(yield_mod) || yield_mod < 1)
|
||||||
yield_mod = 0
|
yield_mod = 0
|
||||||
|
|||||||
@@ -85,16 +85,18 @@
|
|||||||
/obj/machinery/botany/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/machinery/botany/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(istype(W,/obj/item/seeds))
|
if(istype(W,/obj/item/seeds))
|
||||||
if(seed)
|
if(seed)
|
||||||
if(seed.seed.immutable)
|
user << "There is already a seed loaded."
|
||||||
user << "That seed is not compatible with our genetics technology."
|
|
||||||
else
|
var/obj/item/seeds/S =W
|
||||||
user << "There is already a seed loaded."
|
if(S.seed && S.seed.immutable)
|
||||||
|
user << "That seed is not compatible with our genetics technology."
|
||||||
else
|
else
|
||||||
user.drop_item(W)
|
user.drop_item(W)
|
||||||
W.loc = src
|
W.loc = src
|
||||||
seed = W
|
seed = W
|
||||||
user << "You load [W] into [src]."
|
user << "You load [W] into [src]."
|
||||||
return
|
return
|
||||||
|
|
||||||
if(istype(W,/obj/item/weapon/screwdriver))
|
if(istype(W,/obj/item/weapon/screwdriver))
|
||||||
open = !open
|
open = !open
|
||||||
user << "\blue You [open ? "open" : "close"] the maintenance panel."
|
user << "\blue You [open ? "open" : "close"] the maintenance panel."
|
||||||
|
|||||||
@@ -32,6 +32,14 @@
|
|||||||
if(seed && !seed.roundstart)
|
if(seed && !seed.roundstart)
|
||||||
usr << "It's tagged as variety #[seed.uid]."
|
usr << "It's tagged as variety #[seed.uid]."
|
||||||
|
|
||||||
|
/obj/item/seeds/cutting
|
||||||
|
name = "cuttings"
|
||||||
|
desc = "Some plant cuttings."
|
||||||
|
|
||||||
|
/obj/item/seeds/cutting/update_appearance()
|
||||||
|
..()
|
||||||
|
src.name = "packet of [seed.seed_name] cuttings"
|
||||||
|
|
||||||
/obj/item/seeds/replicapod
|
/obj/item/seeds/replicapod
|
||||||
seed_type = "diona"
|
seed_type = "diona"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user