diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm index 4d4fd7f1b4b..9540bd6ad69 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/game/machinery/biogenerator.dm @@ -110,6 +110,14 @@ amount = list(1,2,3,4,5), emag = 0 ), + "jug" = list( + name = "Empty Jug", + class = "Items", + object = /obj/item/reagent_containers/glass/fertilizer, + cost = 100, + amount = list(1,2,3,4,5), + emag = 0 + ), "custom_cigarettes" = list( name = "Empty Cigarettes (x6)", class = "Items", diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index d9ef3522256..80036df099b 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -451,6 +451,9 @@ //A special case for if the container has only water, for manual watering with buckets if (istype(O,/obj/item/reagent_containers)) var/obj/item/reagent_containers/RC = O + if(!RC.is_open_container()) + to_chat(user, SPAN_WARNING("You need to open \the [RC] first!")) + return if (RC.reagents.reagent_list.len == 1) if (RC.reagents.has_reagent(/datum/reagent/water, 1)) if (waterlevel < maxWaterLevel) diff --git a/code/modules/hydroponics/trays/tray_reagents.dm b/code/modules/hydroponics/trays/tray_reagents.dm index 6cd624f8575..8946516de5d 100644 --- a/code/modules/hydroponics/trays/tray_reagents.dm +++ b/code/modules/hydroponics/trays/tray_reagents.dm @@ -85,17 +85,25 @@ // ************************************* /obj/item/reagent_containers/glass/fertilizer - name = "fertilizer bottle" - desc = "A small glass bottle. Can hold up to 60 units." + name = "jug" + desc = "A decent sized plastic jug. Can hold up to 80 units." icon = 'icons/obj/chemical.dmi' - icon_state = "bottle16" - flags = OPENCONTAINER - possible_transfer_amounts = null - w_class = ITEMSIZE_SMALL + icon_state = "plastic_jug" + item_state = "plastic_jug" + flags = 0 + possible_transfer_amounts = list(5, 10, 20, 40, 80) + volume = 80 + w_class = ITEMSIZE_NORMAL - //Like a shot glass! - amount_per_transfer_from_this = 10 - volume = 60 + hitsound = 'sound/weapons/jug_empty_impact.ogg' + drop_sound = 'sound/weapons/jug_empty_impact.ogg' + + fragile = 0 + shatter = FALSE + unacidable = FALSE + + force = 1 + throwforce = 1 /obj/item/reagent_containers/glass/fertilizer/Initialize() . = ..() @@ -103,17 +111,61 @@ src.pixel_x = rand(-5.0, 5) src.pixel_y = rand(-5.0, 5) +/obj/item/reagent_containers/glass/fertilizer/on_reagent_change() + . = ..() + update_icon() + if(reagents.total_volume) + var/fraction = reagents.total_volume / volume + force = max(10 * fraction, 1) + throwforce = max(8 * fraction, 1) + hitsound = 'sound/weapons/jug_filled_impact.ogg' + drop_sound = 'sound/weapons/jug_filled_impact.ogg' + else + force = 1 + throwforce = 1 + hitsound = 'sound/weapons/jug_empty_impact.ogg' + drop_sound = 'sound/weapons/jug_empty_impact.ogg' + +/obj/item/reagent_containers/glass/fertilizer/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(1 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(99 to INFINITY) + filling.icon_state = "plastic_jug100" + + filling.color = reagents.get_color() + add_overlay(filling) + + if(!is_open_container()) + add_overlay("lid_jug") + /obj/item/reagent_containers/glass/fertilizer/ez - name = "bottle of E-Z-Nutrient" - icon_state = "bottle16" - reagents_to_add = list(/datum/reagent/toxin/fertilizer/eznutrient = 60) + name = "jug of E-Z-Nutrient" + icon_state = "plastic_jug_ez" + reagents_to_add = list(/datum/reagent/toxin/fertilizer/eznutrient = 80) /obj/item/reagent_containers/glass/fertilizer/l4z - name = "bottle of Left 4 Zed" - icon_state = "bottle18" - reagents_to_add = list(/datum/reagent/toxin/fertilizer/left4zed = 60) + name = "jug of Left-4-Zed" + icon_state = "plastic_jug_l4z" + reagents_to_add = list(/datum/reagent/toxin/fertilizer/left4zed = 80) /obj/item/reagent_containers/glass/fertilizer/rh - name = "bottle of Robust Harvest" - icon_state = "bottle15" - reagents_to_add = list(/datum/reagent/toxin/fertilizer/robustharvest = 60) + name = "jug of Robust Harvest" + icon_state = "plastic_jug_rh" + reagents_to_add = list(/datum/reagent/toxin/fertilizer/robustharvest = 80) \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index 97b98364c81..264a9e58618 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -298,12 +298,15 @@ /datum/reagent/toxin/fertilizer/eznutrient name = "EZ Nutrient" + color = "#168042" /datum/reagent/toxin/fertilizer/left4zed name = "Left-4-Zed" + color = "#2A1680" /datum/reagent/toxin/fertilizer/robustharvest name = "Robust Harvest" + color = "#801616" /datum/reagent/toxin/fertilizer/monoammoniumphosphate name = "Monoammonium Phosphate" diff --git a/html/changelogs/geeves-jugs.yml b/html/changelogs/geeves-jugs.yml new file mode 100644 index 00000000000..55d4f215395 --- /dev/null +++ b/html/changelogs/geeves-jugs.yml @@ -0,0 +1,8 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Replaced the fragile bottles of fertilizer with industrial jugs, sprites and sounds from Paradise." + - rscadd: "The biogenerator can now print empty jugs." + - bugfix: "You can no longer pour reagents from a container onto a tray or soil patch if the container's lid is on." diff --git a/icons/obj/chemical.dmi b/icons/obj/chemical.dmi index 5daba614e1f..9153ff85afd 100644 Binary files a/icons/obj/chemical.dmi and b/icons/obj/chemical.dmi differ diff --git a/icons/obj/reagentfillings.dmi b/icons/obj/reagentfillings.dmi index 2c659daa831..9dc6493b492 100644 Binary files a/icons/obj/reagentfillings.dmi and b/icons/obj/reagentfillings.dmi differ diff --git a/sound/weapons/jug_empty_impact.ogg b/sound/weapons/jug_empty_impact.ogg new file mode 100644 index 00000000000..d78c1c5e554 Binary files /dev/null and b/sound/weapons/jug_empty_impact.ogg differ diff --git a/sound/weapons/jug_filled_impact.ogg b/sound/weapons/jug_filled_impact.ogg new file mode 100644 index 00000000000..05e2d364373 Binary files /dev/null and b/sound/weapons/jug_filled_impact.ogg differ