mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +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 = ""
|
||||
|
||||
Reference in New Issue
Block a user