diff --git a/baystation12.dme b/baystation12.dme index 75e3fabb6c0..f0f28d7b613 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -551,6 +551,7 @@ #include "code\game\objects\items\bodybag.dm" #include "code\game\objects\items\contraband.dm" #include "code\game\objects\items\crayons.dm" +#include "code\game\objects\items\glassjar.dm" #include "code\game\objects\items\latexballoon.dm" #include "code\game\objects\items\shooting_range.dm" #include "code\game\objects\items\toys.dm" diff --git a/code/game/machinery/autolathe_datums.dm b/code/game/machinery/autolathe_datums.dm index 68bf61b7f11..1e35a4be5d7 100644 --- a/code/game/machinery/autolathe_datums.dm +++ b/code/game/machinery/autolathe_datums.dm @@ -42,6 +42,11 @@ path = /obj/item/weapon/extinguisher category = "General" +/datum/autolathe/recipe/jar + name = "jar" + path = /obj/item/glass_jar + category = "General" + /datum/autolathe/recipe/crowbar name = "crowbar" path = /obj/item/weapon/crowbar diff --git a/code/game/objects/items/glassjar.dm b/code/game/objects/items/glassjar.dm new file mode 100644 index 00000000000..54062ff8530 --- /dev/null +++ b/code/game/objects/items/glassjar.dm @@ -0,0 +1,108 @@ +/obj/item/glass_jar + name = "glass jar" + desc = "A small empty jar." + icon = 'icons/obj/items.dmi' + icon_state = "jar" + w_class = 2 + matter = list("glass" = 200) + flags = NOBLUDGEON + var/list/accept_mobs = list(/mob/living/simple_animal/lizard, /mob/living/simple_animal/mouse) + var/contains = 0 // 0 = nothing, 1 = money, 2 = animal, 3 = spiderling + +/obj/item/glass_jar/New() + ..() + update_icon() + +/obj/item/glass_jar/afterattack(var/atom/A, var/mob/user, var/proximity) + if(!proximity || contains) + return + if(istype(A, /mob)) + var/accept = 0 + for(var/D in accept_mobs) + if(istype(A, D)) + accept = 1 + if(!accept) + user << "[A] doesn't fit into \the [src]." + return + var/mob/L = A + user.visible_message("[user] scoops [L] into \the [src].", "You scoop [L] into \the [src].") + L.loc = src + contains = 2 + update_icon() + return + else if(istype(A, /obj/effect/spider/spiderling)) + var/obj/effect/spider/spiderling/S = A + user.visible_message("[user] scoops [S] into \the [src].", "You scoop [S] into \the [src].") + S.loc = src + processing_objects.Remove(S) // No growing inside jars + contains = 3 + update_icon() + return + +/obj/item/glass_jar/attack_self(var/mob/user) + switch(contains) + if(1) + for(var/obj/O in src) + O.loc = user.loc + user << "You take money out of \the [src]." + contains = 0 + update_icon() + return + if(2) + for(var/mob/M in src) + M.loc = user.loc + user.visible_message("[user] releases [M] from \the [src].", "You release [M] from \the [src].") + contains = 0 + update_icon() + return + if(3) + for(var/obj/effect/spider/spiderling/S in src) + S.loc = user.loc + user.visible_message("[user] releases [S] from \the [src].", "You release [S] from \the [src].") + processing_objects.Add(S) // They can grow after being let out though + contains = 0 + update_icon() + return + +/obj/item/glass_jar/attackby(var/obj/item/W, var/mob/user) + if(istype(W, /obj/item/weapon/spacecash)) + if(contains == 0) + contains = 1 + if(contains != 1) + return + var/obj/item/weapon/spacecash/S = W + user.visible_message("[user] puts [S.worth] [S.worth > 1 ? "thalers" : "thaler"] into \the [src].") + user.drop_from_inventory(S) + S.loc = src + update_icon() + +/obj/item/glass_jar/update_icon() // Also updates name and desc + underlays.Cut() + overlays.Cut() + switch(contains) + if(0) + name = initial(name) + desc = initial(desc) + if(1) + name = "tip jar" + desc = "A small jar with money inside." + for(var/obj/item/weapon/spacecash/S in src) + var/image/money = image(S.icon, S.icon_state) + money.pixel_x = rand(-2, 3) + money.pixel_y = rand(-6, 6) + money.transform *= 0.6 + underlays += money + if(2) + for(var/mob/M in src) + var/image/victim = image(M.icon, M.icon_state) + victim.pixel_y = 6 + underlays += victim + name = "glass jar with [M]" + desc = "A small jar with [M] inside." + if(3) + for(var/obj/effect/spider/spiderling/S in src) + var/image/victim = image(S.icon, S.icon_state) + underlays += victim + name = "glass jar with [S]" + desc = "A small jar with [S] inside." + return \ No newline at end of file diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index 7e8957d0adc..2b986b7de74 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ diff --git a/maps/exodus-1.dmm b/maps/exodus-1.dmm index e3ead60180f..09a43e869c0 100644 --- a/maps/exodus-1.dmm +++ b/maps/exodus-1.dmm @@ -1678,7 +1678,7 @@ "aGn" = (/obj/structure/sign/poster{pixel_x = 0; pixel_y = 0},/turf/simulated/wall,/area/crew_quarters/toilet) "aGo" = (/obj/machinery/light/small{dir = 8},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/hologram/holopad,/turf/simulated/floor/wood,/area/crew_quarters/bar) "aGp" = (/obj/structure/disposalpipe/segment,/turf/simulated/floor/wood,/area/crew_quarters/bar) -"aGq" = (/obj/structure/closet/gmcloset{icon_closed = "black"; icon_state = "black"; name = "formal wardrobe"},/obj/item/device/eftpos{eftpos_name = "Bar EFTPOS scanner"},/obj/machinery/light/small{dir = 4},/turf/simulated/floor/wood,/area/crew_quarters/bar) +"aGq" = (/obj/structure/closet/gmcloset{icon_closed = "black"; icon_state = "black"; name = "formal wardrobe"},/obj/item/device/eftpos{eftpos_name = "Bar EFTPOS scanner"},/obj/machinery/light/small{dir = 4},/obj/item/glass_jar,/turf/simulated/floor/wood,/area/crew_quarters/bar) "aGr" = (/obj/machinery/door/airlock/maintenance{req_access = list(12)},/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/door/firedoor/border_only,/turf/simulated/floor/plating,/area/hallway/primary/starboard) "aGs" = (/turf/simulated/floor/plating,/area/maintenance/bar) "aGt" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced,/turf/simulated/floor/plating,/area/maintenance/bar) @@ -1923,9 +1923,9 @@ "aKY" = (/obj/machinery/access_button{command = "cycle_interior"; frequency = 1379; master_tag = "arrivals_airlock"; name = "interior access button"; pixel_x = -25; pixel_y = 25; req_access = list(13)},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating{icon_state = "warnplate"; dir = 1},/area/maintenance/arrivals) "aKZ" = (/turf/simulated/wall,/area/crew_quarters/kitchen) "aLa" = (/obj/structure/sink/kitchen{pixel_y = 28},/obj/machinery/atmospherics/unary/vent_pump/on{dir = 4},/turf/simulated/floor{icon_state = "showroomfloor"},/area/crew_quarters/kitchen) -"aLb" = (/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 4},/turf/simulated/floor{icon_state = "showroomfloor"},/area/crew_quarters/kitchen) -"aLc" = (/obj/structure/closet/chefcloset,/obj/machinery/light/small{dir = 1},/obj/item/device/eftpos{eftpos_name = "Kitchen EFTPOS scanner"},/turf/simulated/floor{icon_state = "showroomfloor"},/area/crew_quarters/kitchen) -"aLd" = (/obj/machinery/light{dir = 8},/obj/machinery/camera/network/civilian_east{c_tag = "Chapel North"; dir = 4},/turf/simulated/floor{icon_state = "dark"},/area/chapel/main) +"aLb" = (/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 4},/turf/simulated/floor{icon_state = "showroomfloor"},/area/crew_quarters/kitchen) +"aLc" = (/obj/structure/closet/chefcloset,/obj/machinery/light/small{dir = 1},/obj/item/device/eftpos{eftpos_name = "Kitchen EFTPOS scanner"},/obj/item/glass_jar,/turf/simulated/floor{icon_state = "showroomfloor"},/area/crew_quarters/kitchen) +"aLd" = (/obj/machinery/light{dir = 8},/obj/machinery/camera/network/civilian_east{c_tag = "Chapel North"; dir = 4},/turf/simulated/floor{icon_state = "dark"},/area/chapel/main) "aLe" = (/obj/machinery/door/airlock/external{frequency = 1380; icon_state = "door_locked"; id_tag = "escape_pod_2_hatch"; locked = 1; name = "Escape Pod Hatch"; req_access = list(13)},/turf/simulated/shuttle/floor,/area/shuttle/escape_pod2/station) "aLf" = (/turf/simulated/wall,/area/hydroponics) "aLg" = (/obj/machinery/navbeacon{codes_txt = "delivery;dir=2"; freq = 1400; location = "Hydroponics"},/obj/structure/plasticflaps{opacity = 1},/obj/machinery/door/firedoor/border_only{dir = 2},/turf/simulated/floor{icon_state = "bot"; dir = 1},/area/hydroponics) @@ -6437,9 +6437,9 @@ "ctO" = (/obj/machinery/atmospherics/pipe/simple/hidden/purple,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor{icon_state = "white"},/area/medical/virology) "ctP" = (/obj/machinery/light{dir = 4; icon_state = "tube1"},/turf/simulated/floor{icon_state = "white"},/area/medical/virology) "ctQ" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/machinery/door/blast/shutters{density = 0; dir = 8; icon_state = "shutter0"; id = "surgeryobs2"; name = "Operating Theatre Privacy Shutters"; opacity = 0},/turf/simulated/floor/plating,/area/medical/surgeryprep) -"ctR" = (/obj/structure/cable/green{d1 = 1; d2 = 4; icon_state = "1-4"},/obj/structure/cable/green{d1 = 2; d2 = 4; icon_state = "2-4"},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) +"ctR" = (/obj/structure/cable/green{d1 = 1; d2 = 4; icon_state = "1-4"},/obj/structure/cable/green{d1 = 2; d2 = 4; icon_state = "2-4"},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) "ctS" = (/obj/structure/disposalpipe/segment,/obj/machinery/camera/network/research{c_tag = "Xenobiology Southeast"; dir = 8},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) -"ctT" = (/obj/structure/table,/obj/item/weapon/storage/box/beakers{pixel_x = 2; pixel_y = 2},/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) +"ctT" = (/obj/structure/table,/obj/item/weapon/storage/box/beakers{pixel_x = 2; pixel_y = 2},/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/item/glass_jar,/obj/item/glass_jar,/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) "ctU" = (/obj/structure/table,/obj/item/weapon/storage/box/syringes,/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) "ctV" = (/obj/structure/bed/chair{dir = 4},/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) "ctW" = (/obj/machinery/light{dir = 4; icon_state = "tube1"},/obj/machinery/firealarm{dir = 4; pixel_x = 24},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology)