mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-11 01:51:51 +00:00
Move the hydroponics reagent items (plant sprays, fertilizer bottles, etc) into a new file: hydro_reagents.dm - Re-used old file, see next line Refactors the reagent handling of hydroponics trays - Now located in tray_reagents.dm (formerly in tray.dm) - No longer relies on global lists that weren't global and were on all trays. - Reagent effects are now grouped together rather than spread across multiple lists of values with little to no meaning - Far more readable if you are looking for everything a reagent does in hydroponics trays - Included an example entry for future coders who want to add new reagent interactions to hydro trays Fixes saltpetre affecting the entire seed datum when added to a single tray - Now diverges and makes a new line of "enhanced" products, which is then modified - More consistent with how mutagens handle affecting stats, but "enhanced" Moved the yield_mod capping to check_sanity_levels() instead of the reagent interaction - Cap unchanged, this just moves it to a more standard location in the code Small tweak to stat-affecting reagent interaction - Now checks for a production value of over 2 before attempting to adjust (previously looked for > 1) - Couldn't be dropped below 2 anyways, so it was a waste of time to try lowering it and then resetting it to 2 when it was there already - Now caps the potency value between 0 and 100, as a negative potency makes no sense. - Currently no reagents lower potency, so this is more of a future-proofing than a correction
127 lines
3.0 KiB
Plaintext
127 lines
3.0 KiB
Plaintext
|
|
/obj/item/weapon/plantspray
|
|
icon = 'icons/obj/hydroponics_machines.dmi'
|
|
item_state = "spray"
|
|
flags = OPENCONTAINER | 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"
|
|
weed_kill_str = 6
|
|
|
|
/obj/item/weapon/plantspray/pests
|
|
name = "pest-spray"
|
|
desc = "It's some pest eliminator spray! <I>Do not inhale!</I>"
|
|
icon_state = "pestspray"
|
|
pest_kill_str = 6
|
|
|
|
/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
|
|
|
|
|
|
// *************************************
|
|
// Weedkiller defines for hydroponics
|
|
// *************************************
|
|
|
|
/obj/item/weedkiller
|
|
name = "bottle of weedkiller"
|
|
icon = 'icons/obj/chemical.dmi'
|
|
icon_state = "bottle16"
|
|
flags = OPENCONTAINER | NOBLUDGEON
|
|
var/toxicity = 0
|
|
var/weed_kill_str = 0
|
|
|
|
/obj/item/weedkiller/triclopyr
|
|
name = "bottle of glyphosate"
|
|
icon = 'icons/obj/chemical.dmi'
|
|
icon_state = "bottle16"
|
|
toxicity = 4
|
|
weed_kill_str = 2
|
|
|
|
/obj/item/weedkiller/lindane
|
|
name = "bottle of triclopyr"
|
|
icon = 'icons/obj/chemical.dmi'
|
|
icon_state = "bottle18"
|
|
toxicity = 6
|
|
weed_kill_str = 4
|
|
|
|
/obj/item/weedkiller/D24
|
|
name = "bottle of 2,4-D"
|
|
icon = 'icons/obj/chemical.dmi'
|
|
icon_state = "bottle15"
|
|
toxicity = 8
|
|
weed_kill_str = 7
|
|
|
|
// *************************************
|
|
// Nutrient defines for hydroponics
|
|
// *************************************
|
|
|
|
/obj/item/weapon/reagent_containers/glass/fertilizer
|
|
name = "fertilizer bottle"
|
|
desc = "A small glass bottle. Can hold up to 10 units."
|
|
icon = 'icons/obj/chemical.dmi'
|
|
icon_state = "bottle16"
|
|
flags = OPENCONTAINER
|
|
possible_transfer_amounts = null
|
|
w_class = 2.0
|
|
|
|
var/fertilizer //Reagent contained, if any.
|
|
|
|
//Like a shot glass!
|
|
amount_per_transfer_from_this = 10
|
|
volume = 10
|
|
|
|
/obj/item/weapon/reagent_containers/glass/fertilizer/New()
|
|
..()
|
|
|
|
src.pixel_x = rand(-5.0, 5)
|
|
src.pixel_y = rand(-5.0, 5)
|
|
|
|
if(fertilizer)
|
|
reagents.add_reagent(fertilizer,10)
|
|
|
|
/obj/item/weapon/reagent_containers/glass/fertilizer/ez
|
|
name = "bottle of E-Z-Nutrient"
|
|
icon_state = "bottle16"
|
|
fertilizer = "eznutrient"
|
|
|
|
/obj/item/weapon/reagent_containers/glass/fertilizer/l4z
|
|
name = "bottle of Left 4 Zed"
|
|
icon_state = "bottle18"
|
|
fertilizer = "left4zed"
|
|
|
|
/obj/item/weapon/reagent_containers/glass/fertilizer/rh
|
|
name = "bottle of Robust Harvest"
|
|
icon_state = "bottle15"
|
|
fertilizer = "robustharvest"
|