mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
Adds Botany Jugs, and fixes hydroponic trays draining sealed containers [now without map edits] (#14212)
* Adds Botany Jugs, and lid test for hydro trays * adds 1u and 2u transfer amounts back to changed items * fixed item references in some .dmm * improves weed/pest killer jug sprites, and corrects overlays procs * removes uneeded image def * improves sprites further * adjusts coloring of l4z reagant * Buffs Jugs to 80u each (from 50u) * balances nutrient vending numbers * resizes jugs * fixes conflict in .dmi * Resizes Jugs again * removes commented out code * Fixes * futher fixes * Fixes some issues, adds sounds for jugs. * reverts to using New() * removes jug.dm and reverts all nutrient back to bottles
This commit is contained in:
@@ -27,10 +27,7 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throw_speed = 3
|
||||
throw_range = 10
|
||||
|
||||
/obj/item/reagent_containers/spray/weedspray/New()
|
||||
..()
|
||||
reagents.add_reagent("atrazine", 100)
|
||||
list_reagents = list("atrazine" = 100)
|
||||
|
||||
/obj/item/reagent_containers/spray/weedspray/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is huffing the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
@@ -49,10 +46,7 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throw_speed = 3
|
||||
throw_range = 10
|
||||
|
||||
/obj/item/reagent_containers/spray/pestspray/New()
|
||||
..()
|
||||
reagents.add_reagent("pestkiller", 100)
|
||||
list_reagents = list("pestkiller" = 100)
|
||||
|
||||
/obj/item/reagent_containers/spray/pestspray/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is huffing the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
@@ -222,79 +216,112 @@
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient
|
||||
name = "bottle of nutrient"
|
||||
name = "jug of nutrient"
|
||||
desc = "A decent sized plastic jug."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle16"
|
||||
volume = 50
|
||||
icon_state = "plastic_jug"
|
||||
item_state = "plastic_jug"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(1,2,5,10,15,25,50)
|
||||
possible_transfer_amounts = list(1,2,5,10,20,40,80)
|
||||
container_type = OPENCONTAINER
|
||||
volume = 80
|
||||
hitsound = 'sound/weapons/jug_empty_impact.ogg'
|
||||
throwhitsound = 'sound/weapons/jug_empty_impact.ogg'
|
||||
force = 0.2
|
||||
throwforce = 0.2
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/New()
|
||||
..()
|
||||
add_lid()
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/on_reagent_change()
|
||||
. = ..()
|
||||
update_icon()
|
||||
if(reagents.total_volume)
|
||||
hitsound = 'sound/weapons/jug_filled_impact.ogg'
|
||||
throwhitsound = 'sound/weapons/jug_filled_impact.ogg'
|
||||
else
|
||||
hitsound = 'sound/weapons/jug_empty_impact.ogg'
|
||||
throwhitsound = 'sound/weapons/jug_empty_impact.ogg'
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "plastic_jug10")
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 10)
|
||||
filling.icon_state = "plastic_jug-10"
|
||||
if(11 to 29)
|
||||
filling.icon_state = "plastic_jug25"
|
||||
if(30 to 45)
|
||||
filling.icon_state = "plastic_jug40"
|
||||
if(46 to 61)
|
||||
filling.icon_state = "plastic_jug55"
|
||||
if(62 to 77)
|
||||
filling.icon_state = "plastic_jug70"
|
||||
if(78 to 92)
|
||||
filling.icon_state = "plastic_jug85"
|
||||
if(93 to INFINITY)
|
||||
filling.icon_state = "plastic_jug100"
|
||||
|
||||
filling.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
if(!is_open_container())
|
||||
add_overlay("lid_jug")
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/ez
|
||||
name = "jug of E-Z-Nutrient"
|
||||
desc = "Contains a fertilizer that causes mild mutations with each harvest."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "plastic_jug_ez"
|
||||
list_reagents = list("eznutriment" = 80)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/l4z
|
||||
name = "jug of Left 4 Zed"
|
||||
desc = "Contains a fertilizer that limits plant yields to no more than one and causes significant mutations in plants."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "plastic_jug_l4z"
|
||||
list_reagents = list("left4zednutriment" = 80)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/rh
|
||||
name = "jug of Robust Harvest"
|
||||
desc = "Contains a fertilizer that increases the yield of a plant by 30% while causing no mutations."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "plastic_jug_rh"
|
||||
list_reagents = list("robustharvestnutriment" = 80)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/empty
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "plastic_jug"
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/killer
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "plastic_jug_k"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/killer/New()
|
||||
..()
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/ez
|
||||
name = "bottle of E-Z-Nutrient"
|
||||
desc = "Contains a fertilizer that causes mild mutations with each harvest."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle16"
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/ez/New()
|
||||
..()
|
||||
reagents.add_reagent("eznutriment", 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/l4z
|
||||
name = "bottle of Left 4 Zed"
|
||||
desc = "Contains a fertilizer that limits plant yields to no more than one and causes significant mutations in plants."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle18"
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/l4z/New()
|
||||
..()
|
||||
reagents.add_reagent("left4zednutriment", 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/rh
|
||||
name = "bottle of Robust Harvest"
|
||||
desc = "Contains a fertilizer that increases the yield of a plant by 30% while causing no mutations."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle15"
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/rh/New()
|
||||
..()
|
||||
reagents.add_reagent("robustharvestnutriment", 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/empty
|
||||
name = "bottle"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle16"
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/killer
|
||||
name = "bottle"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle16"
|
||||
volume = 50
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(1,2,5,10,15,25,50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/killer/weedkiller
|
||||
name = "bottle of weed killer"
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/killer/weedkiller
|
||||
name = "jug of weed killer"
|
||||
desc = "Contains a herbicide."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle19"
|
||||
icon_state = "plastic_jug_wk"
|
||||
list_reagents = list("atrazine" = 80)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/killer/weedkiller/New()
|
||||
..()
|
||||
reagents.add_reagent("atrazine", 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/killer/pestkiller
|
||||
name = "bottle of pest spray"
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/killer/pestkiller
|
||||
name = "jug of pest spray"
|
||||
desc = "Contains a pesticide."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle20"
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/killer/pestkiller/New()
|
||||
..()
|
||||
reagents.add_reagent("pestkiller", 50)
|
||||
icon_state = "plastic_jug_pk"
|
||||
list_reagents = list("pestkiller" = 80)
|
||||
|
||||
@@ -744,6 +744,10 @@
|
||||
to_chat(user, "<span class='notice'>[reagent_source] is empty.</span>")
|
||||
return 1
|
||||
|
||||
if(reagent_source.has_lid && !reagent_source.is_drainable()) //if theres a LID then cannot transfer reagents.
|
||||
to_chat(user, "<span class='warning'>You need to open [O] first!</span>")
|
||||
return TRUE
|
||||
|
||||
var/list/trays = list(src)//makes the list just this in cases of syringes and compost etc
|
||||
var/target = myseed ? myseed.plantname : src
|
||||
var/visi_msg = ""
|
||||
|
||||
@@ -603,7 +603,7 @@
|
||||
name = "Left 4 Zed"
|
||||
id = "left4zednutriment"
|
||||
description = "Unstable nutriment that makes plants mutate more often than usual."
|
||||
color = "#1A1E4D" // RBG: 26, 30, 77
|
||||
color = "#2A1680" // RBG: 42, 128, 22
|
||||
tox_prob = 25
|
||||
taste_description = "evolution"
|
||||
|
||||
|
||||
@@ -1054,7 +1054,7 @@
|
||||
id = "atrazine"
|
||||
description = "A herbicidal compound used for destroying unwanted plants."
|
||||
reagent_state = LIQUID
|
||||
color = "#17002D"
|
||||
color = "#773E73" //RGB: 47 24 45
|
||||
lethality = 2 //Atrazine, however, is definitely toxic
|
||||
|
||||
|
||||
|
||||
@@ -50,16 +50,25 @@
|
||||
if(!QDELETED(src))
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/reagent_containers/proc/add_lid()
|
||||
if(has_lid)
|
||||
container_type ^= REFILLABLE | DRAINABLE
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/proc/remove_lid()
|
||||
if(has_lid)
|
||||
container_type |= REFILLABLE | DRAINABLE
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/attack_self(mob/user)
|
||||
if(has_lid)
|
||||
if(is_open_container())
|
||||
to_chat(usr, "<span class='notice'>You put the lid on [src].</span>")
|
||||
container_type ^= REFILLABLE | DRAINABLE
|
||||
add_lid()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You take the lid off [src].</span>")
|
||||
container_type |= REFILLABLE | DRAINABLE
|
||||
update_icon()
|
||||
return
|
||||
remove_lid()
|
||||
|
||||
/obj/item/reagent_containers/attack(mob/M, mob/user, def_zone)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
id = "weed_killer"
|
||||
build_type = BIOGENERATOR
|
||||
materials = list(MAT_BIOMASS = 50)
|
||||
build_path = /obj/item/reagent_containers/glass/bottle/killer/weedkiller
|
||||
build_path = /obj/item/reagent_containers/glass/bottle/nutrient/killer/weedkiller
|
||||
category = list("initial","Botany Chemicals")
|
||||
|
||||
/datum/design/pest_spray
|
||||
@@ -96,12 +96,12 @@
|
||||
id = "pest_spray"
|
||||
build_type = BIOGENERATOR
|
||||
materials = list(MAT_BIOMASS = 50)
|
||||
build_path = /obj/item/reagent_containers/glass/bottle/killer/pestkiller
|
||||
build_path = /obj/item/reagent_containers/glass/bottle/nutrient/killer/pestkiller
|
||||
category = list("initial","Botany Chemicals")
|
||||
|
||||
/datum/design/botany_bottle
|
||||
name = "Empty Bottle"
|
||||
id = "botany_bottle"
|
||||
name = "Empty Jug"
|
||||
id = "botany_jug"
|
||||
build_type = BIOGENERATOR
|
||||
materials = list(MAT_BIOMASS = 5)
|
||||
build_path = /obj/item/reagent_containers/glass/bottle/nutrient/empty
|
||||
|
||||
Reference in New Issue
Block a user