diff --git a/aurorastation.dme b/aurorastation.dme index 3885624f91a..7bc88e5be9b 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -2541,6 +2541,7 @@ #include "code\modules\reagents\reagent_containers\food\drinks\bottle.dm" #include "code\modules\reagents\reagent_containers\food\drinks\drinkingglass.dm" #include "code\modules\reagents\reagent_containers\food\drinks\jar.dm" +#include "code\modules\reagents\reagent_containers\food\drinks\yoke.dm" #include "code\modules\reagents\reagent_containers\food\drinks\bottle\robot.dm" #include "code\modules\reagents\reagent_containers\food\snacks\fish.dm" #include "code\modules\reagents\reagent_containers\food\snacks\meat.dm" diff --git a/code/modules/reagents/reagent_containers/food/drinks/yoke.dm b/code/modules/reagents/reagent_containers/food/drinks/yoke.dm new file mode 100644 index 00000000000..57c57672bad --- /dev/null +++ b/code/modules/reagents/reagent_containers/food/drinks/yoke.dm @@ -0,0 +1,101 @@ +/obj/item/storage/box/fancy/yoke + name = "yoke" + desc = "A sturdy device made out of bio-friendly materials. This will hold your energy drinks together easy peasy." + desc_info = "Click drag it to pick it up, click on it to take out a can." + icon = 'icons/obj/drinks.dmi' + icon_state = "yoke" + center_of_mass = list("x" = 16,"y" = 9) + can_hold = list() + starts_with = list() + storage_slots = 6 + icon_overlays = FALSE + closable = FALSE + var/list/obj/item/reagent_containers/food/drinks/cans/cans = list() + var/list/can_positions = list( // these are the correct positions for energy drinks achieved via trial and error + list(4, -4), + list(-2, -2), + list(-8, 0), + list(9, -3), + list(4, 0), + list(-2, 3) + ) + +/obj/item/storage/box/fancy/yoke/fill() + . = ..() + for(var/obj/item/reagent_containers/food/drinks/cans/C in contents) + cans += C + +/obj/item/storage/box/fancy/yoke/update_icon() + for(var/thing in underlays) + underlays -= thing + + for(var/i = 1 to length(cans)) + var/mutable_appearance/can = mutable_appearance(cans[i].icon, cans[i].icon_state) + var/list/positions = can_positions[i] + can.pixel_x = positions[1] + can.pixel_y = positions[2] + underlays += can + +/obj/item/storage/box/fancy/yoke/MouseDrop(mob/user) + if(use_check_and_message(user)) + return + to_chat(user, SPAN_NOTICE("You pick up \the [src].")) + user.put_in_hands(src) + +/obj/item/storage/box/fancy/yoke/attack_hand(mob/user) + if(!length(contents)) // no more cans, continue as normal + return ..() + + if(use_check_and_message(user)) + return + + var/obj/item/reagent_containers/food/drinks/cans/C = cans[length(cans)] + cans -= C + remove_from_storage(C, get_turf(user)) + user.put_in_hands(C) + update_icon() + +/obj/item/storage/box/fancy/yoke/attackby(obj/item/W, mob/user) + to_chat(user, SPAN_WARNING("\The [src] cannot be refilled with items!")) + +/obj/item/storage/box/fancy/yoke/zorasoda + starts_with = list(/obj/item/reagent_containers/food/drinks/cans/zorasoda = 6) + +/obj/item/storage/box/fancy/yoke/zorakois + starts_with = list(/obj/item/reagent_containers/food/drinks/cans/zorakois = 6) + +/obj/item/storage/box/fancy/yoke/zoraphoron + starts_with = list(/obj/item/reagent_containers/food/drinks/cans/zoraphoron = 6) + +/obj/item/storage/box/fancy/yoke/zorahozm + starts_with = list(/obj/item/reagent_containers/food/drinks/cans/zorahozm = 6) + +/obj/item/storage/box/fancy/yoke/zoravenom + starts_with = list(/obj/item/reagent_containers/food/drinks/cans/zoravenom = 6) + +/obj/item/storage/box/fancy/yoke/zoraklax + starts_with = list(/obj/item/reagent_containers/food/drinks/cans/zoraklax = 6) + +/obj/item/storage/box/fancy/yoke/zoracthur + starts_with = list(/obj/item/reagent_containers/food/drinks/cans/zoracthur = 6) + +/obj/item/storage/box/fancy/yoke/random + starts_with = list() + +/obj/item/storage/box/fancy/yoke/random/fill() + for(var/i = 1 to 6) + var/list/energy_options = list( + /obj/item/reagent_containers/food/drinks/cans/zorasoda, + /obj/item/reagent_containers/food/drinks/cans/zorakois, + /obj/item/reagent_containers/food/drinks/cans/zoraphoron, + /obj/item/reagent_containers/food/drinks/cans/zorahozm, + /obj/item/reagent_containers/food/drinks/cans/zoravenom, + /obj/item/reagent_containers/food/drinks/cans/zoraklax, + /obj/item/reagent_containers/food/drinks/cans/zoracthur + ) + var/path = pick(energy_options) + if(starts_with[path]) + starts_with[path] = starts_with[path] + 1 + else + starts_with[path] = 1 + return ..() \ No newline at end of file diff --git a/html/changelogs/geeves-six_pack.yml b/html/changelogs/geeves-six_pack.yml new file mode 100644 index 00000000000..e01fe253bd7 --- /dev/null +++ b/html/changelogs/geeves-six_pack.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Added six pack yokes for energy drinks, a storage item for moving a fast amount of energy drinks quickly. Currently adminspawn only." \ No newline at end of file diff --git a/icons/obj/drinks.dmi b/icons/obj/drinks.dmi index 8572b353689..d223fe2066d 100644 Binary files a/icons/obj/drinks.dmi and b/icons/obj/drinks.dmi differ