mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
Hydroponics Tray USB Port (plus a tiny refactor needed to fit it in) (#62652)
Adds a USB port to constructable hydroponic trays. I had to refactor some hydro tray code, which is kinda old, to fit the USB circuit and the new signals in.
This commit is contained in:
@@ -42,13 +42,13 @@
|
||||
seed.set_potency(100) // Sets the seed potency to 100.
|
||||
seed.set_instability(0) // Sets the seed instability to 0, to prevent mutations.
|
||||
|
||||
tray.myseed = seed
|
||||
tray.set_seed(seed)
|
||||
seed.forceMove(tray)
|
||||
tray.name = tray.myseed ? "[initial(tray.name)] ([tray.myseed.plantname])" : initial(tray.name)
|
||||
|
||||
tray.plant_health = seed.endurance
|
||||
tray.set_plant_health(seed.endurance)
|
||||
tray.age = 20
|
||||
tray.harvest = TRUE
|
||||
tray.set_plant_status(HYDROTRAY_PLANT_HARVESTABLE)
|
||||
|
||||
/datum/unit_test/hydroponics_harvest/proc/test_seed(obj/machinery/hydroponics/tray, obj/item/seeds/seed, mob/living/carbon/user)
|
||||
tray.reagents.add_reagent(/datum/reagent/plantnutriment/eznutriment, 20)
|
||||
@@ -91,9 +91,8 @@
|
||||
TEST_ASSERT_EQUAL(found_vitamins, expected_vitamins * max_volume, "Hydroponics harvest from [saved_name] has a [expected_vitamins] vitamin gene (expecting [expected_nutriments * max_volume]) but only had [found_vitamins] units of vitamins inside.")
|
||||
|
||||
if(tray.myseed)
|
||||
tray.harvest = FALSE
|
||||
tray.age = 0
|
||||
tray.plant_health = 0
|
||||
tray.set_plant_health(0)
|
||||
|
||||
QDEL_NULL(tray.myseed)
|
||||
tray.set_seed(null)
|
||||
tray.name = tray.myseed ? "[initial(tray.name)] ([tray.myseed.plantname])" : initial(tray.name)
|
||||
|
||||
Reference in New Issue
Block a user