diff --git a/aurorastation.dme b/aurorastation.dme
index 0742a4a3b09..9308f1b5c9b 100644
--- a/aurorastation.dme
+++ b/aurorastation.dme
@@ -1027,6 +1027,7 @@
#include "code\game\objects\structures\therapy.dm"
#include "code\game\objects\structures\tranqcabinet.dm"
#include "code\game\objects\structures\transit_tubes.dm"
+#include "code\game\objects\structures\trash_pile.dm"
#include "code\game\objects\structures\under_wardrobe.dm"
#include "code\game\objects\structures\warp_drive.dm"
#include "code\game\objects\structures\watercloset.dm"
diff --git a/code/game/objects/structures/trash_pile.dm b/code/game/objects/structures/trash_pile.dm
new file mode 100644
index 00000000000..79ea0029347
--- /dev/null
+++ b/code/game/objects/structures/trash_pile.dm
@@ -0,0 +1,222 @@
+/obj/structure/trash_pile
+ name = "trash pile"
+ desc = "A heap of garbage, but maybe there's something interesting inside?"
+ icon = 'icons/obj/trash_piles.dmi'
+ icon_state = "randompile"
+ anchored = TRUE
+
+ var/list/searched_by // Characters that have searched this trashpile, with values of searched time.
+ var/mob/living/hider // Someone or something hiding inside our pile
+
+ var/chance_alpha = 79 // Alpha list is junk items and normal random stuff.
+ var/chance_beta = 20 // Beta list is actually maybe some useful illegal items. If it's not alpha or gamma, it's beta.
+ var/chance_gamma = 1 // Gamma list is unique items only, and will only spawn one of each. This is a sub-chance of beta chance.
+
+ //These are types that can only spawn once, and then will be removed from this list.
+ //Alpha and beta lists are in their respective procs.
+ var/list/unique_gamma = list(
+ /obj/item/hand_tele,
+ /obj/item/rfd/construction,
+ /obj/item/reagent_containers/hypospray/cmo,
+ /obj/item/gun/projectile/improvised_handgun/loaded,
+ /obj/item/gun/launcher/crossbow,
+ /obj/item/gun/launcher/pneumatic
+ )
+
+/obj/structure/trash_pile/Initialize()
+ . = ..()
+ if(icon_state == initial(icon_state))
+ icon_state = pick(icon_states(icon) - icon_state)
+
+/obj/structure/trash_pile/MouseDrop_T(obj/structure/trash_pile/target, mob/user)
+ if(!Adjacent(user) || use_check_and_message(user))
+ return
+ user.visible_message("[user] starts climbing into \the [src]...", SPAN_NOTICE("You start climbing into \the [src]..."))
+ if(do_after(user, 3 SECONDS))
+ user.visible_message("[user] climbs into \the [src], disappearing from sight.", SPAN_NOTICE("You climb into \the [src], finally finding a good spot to hide."))
+ user.forceMove(src)
+ hider = user
+ if(ishuman(user) && prob(5))
+ var/mob/living/carbon/human/H = user
+ H.take_overall_damage(5, 0, DAM_SHARP, src)
+ to_chat(user, SPAN_WARNING("You cut yourself while climbing into \the [src]!"))
+
+/obj/structure/trash_pile/relaymove(mob/user)
+ if(user.stat || user.resting) // don't care too much about use_check here, checking these will suffice
+ return
+ user.forceMove(get_turf(src))
+ if(user == hider)
+ hider = null
+
+/obj/structure/trash_pile/attack_hand(mob/user)
+ //Human mob
+ if(ishuman(user))
+ var/mob/living/carbon/human/H = user
+ if(H.a_intent == I_HURT)
+ H.visible_message("[user] starts taking \the [src] apart...", SPAN_NOTICE("You start taking \the [src] apart..."))
+ if(do_after(user, 2 MINUTES))
+ H.visible_message("[user] takes \the [src] apart.", SPAN_NOTICE("You takes \the [src] apart."))
+ for(var/i = 1 to 5)
+ var/obj/item/I = give_item()
+ I.forceMove(get_turf(src))
+ eject_hider(100, user)
+ qdel(src)
+ return
+ H.visible_message("[user] starts searching through \the [src]...", SPAN_NOTICE("You start searching through \the [src]..."))
+ if(hider)
+ to_chat(hider, SPAN_WARNING("[user] is searching the trash pile you're in!"))
+ //Do the searching
+ if(do_after(user, rand(4 SECONDS, 6 SECONDS)))
+ var/unique_string = "[user.ckey]-[user.real_name]"
+ //If there was a hider, chance to reveal them
+ if(eject_hider(50, user))
+ return
+
+ // This person already searched through this pile
+ else if(unique_string in searched_by)
+ to_chat(H, SPAN_WARNING("You already searched through \the [src], you find nothing of value, though someone else might."))
+
+ //You found an item!
+ else
+ var/obj/item/I = give_item()
+ //We either have an item to hand over or we don't, at this point!
+ if(I)
+ LAZYADD(searched_by, unique_string)
+ H.put_in_hands(I)
+ to_chat(H, SPAN_NOTICE("You found \a [I]!"))
+ else
+ return ..()
+
+/obj/structure/trash_pile/proc/eject_hider(var/chance, var/mob/user)
+ if(hider && prob(chance))
+ to_chat(hider, SPAN_DANGER("You've been discovered!"))
+ hider.forceMove(get_turf(src))
+ to_chat(user, SPAN_DANGER("You discover that \the [hider] was hiding inside \the [src]!"))
+ hider = null
+ return TRUE
+ return FALSE
+
+/obj/structure/trash_pile/proc/give_item()
+ var/obj/item/I
+ var/luck = rand(1, 100)
+ if(luck <= chance_alpha)
+ I = produce_alpha_item()
+ else if(luck <= chance_alpha + chance_beta)
+ I = produce_beta_item()
+ else if(luck <= chance_alpha + chance_beta + chance_gamma)
+ I = produce_gamma_item()
+ return I
+
+//Random lists
+/obj/structure/trash_pile/proc/produce_alpha_item()
+ var/list/possible_path = list(
+ /obj/item/clothing/gloves/black = 5,
+ /obj/item/clothing/gloves/white = 5,
+ /obj/item/storage/backpack = 5,
+ /obj/item/storage/backpack/satchel = 5,
+ /obj/item/storage/box = 5,
+ /obj/item/clothing/head/hardhat = 4,
+ /obj/item/clothing/mask/breath = 4,
+ /obj/item/clothing/shoes/black = 4,
+ /obj/item/clothing/shoes/laceup = 4,
+ /obj/item/clothing/shoes/laceup/brown = 4,
+ /obj/item/clothing/suit/storage/hazardvest = 4,
+ /obj/item/clothing/under/color/grey = 4,
+ /obj/item/clothing/suit/caution = 4,
+ /obj/item/cell/device = 4,
+ /obj/item/reagent_containers/food/snacks/liquidfood = 4,
+ /obj/item/spacecash/c1 = 4,
+ /obj/item/storage/backpack/satchel = 4,
+ /obj/item/storage/briefcase = 4,
+ /obj/item/clothing/accessory/storage/webbing = 3,
+ /obj/item/clothing/gloves/botanic_leather = 3,
+ /obj/item/clothing/head/hardhat/red = 3,
+ /obj/item/clothing/mask/gas = 3,
+ /obj/item/clothing/suit/apron = 3,
+ /obj/item/clothing/suit/storage/toggle/bomber = 3,
+ /obj/item/clothing/suit/storage/toggle/brown_jacket = 3,
+ /obj/item/clothing/suit/storage/hooded/wintercoat/hoodie = 3,
+ /obj/item/clothing/suit/storage/hooded/wintercoat/hoodie/short = 3,
+ /obj/item/clothing/suit/storage/hooded/wintercoat/hoodie/sleeveless = 3,
+ /obj/item/storage/box/fancy/cigarettes = 3,
+ /obj/item/storage/box/fancy/cigarettes/acmeco = 3,
+ /obj/item/storage/box/fancy/cigarettes/blank = 3,
+ /obj/item/device/radio/headset = 3,
+ /obj/item/camera_assembly = 3,
+ /obj/item/clothing/head/cone = 3,
+ /obj/item/cell/high = 3,
+ /obj/item/spacecash/c10 = 3,
+ /obj/item/spacecash/c20 = 3,
+ /obj/item/storage/backpack/duffel = 3,
+ /obj/item/storage/box/donkpockets = 3,
+ /obj/item/storage/box/mousetraps = 3,
+ /obj/item/storage/wallet = 3,
+ /obj/item/clothing/gloves/fyellow = 2,
+ /obj/item/clothing/gloves/latex = 2,
+ /obj/item/clothing/head/welding = 2,
+ /obj/item/clothing/mask/gas/alt = 2,
+ /obj/item/clothing/shoes/galoshes = 2,
+ /obj/item/clothing/under/pants/camo = 2,
+ /obj/item/clothing/under/syndicate/tacticool = 2,
+ /obj/item/device/camera = 2,
+ /obj/item/device/flashlight/flare = 2,
+ /obj/item/device/flashlight/flare/glowstick/random = 2,
+ /obj/item/cell/super = 2,
+ /obj/item/contraband/poster = 2,
+ /obj/item/reagent_containers/glass/rag = 2,
+ /obj/item/storage/box/sinpockets = 2,
+ /obj/item/storage/secure/briefcase = 2,
+ /obj/item/clothing/glasses/sunglasses = 1,
+ /obj/item/clothing/glasses/welding = 1,
+ /obj/item/clothing/gloves/yellow = 1,
+ /obj/item/clothing/head/bio_hood/general = 1,
+ /obj/item/clothing/head/ushanka = 1,
+ /obj/item/clothing/shoes/syndigaloshes = 1,
+ /obj/item/clothing/suit/bio_suit/general = 1,
+ /obj/item/clothing/suit/space/emergency = 1,
+ /obj/item/clothing/under/gearharness = 1,
+ /obj/item/clothing/under/tactical = 1,
+ /obj/item/clothing/suit/armor/material/makeshift/plasteel = 1,
+ /obj/item/clothing/mask/gas/voice = 1,
+ /obj/item/spacecash/c100 = 1,
+ /obj/item/spacecash/c200 = 1,
+ )
+
+ var/path = pickweight(possible_path)
+ var/obj/item/I = new path()
+ return I
+
+/obj/structure/trash_pile/proc/produce_beta_item()
+ var/list/possible_path = list(
+ /obj/item/storage/pill_bottle/mortaphenyl = 6,
+ /obj/item/storage/pill_bottle/minaphobin = 4,
+ /obj/item/storage/pill_bottle/inaprovaline = 4,
+ /obj/item/seeds/ambrosiavulgarisseed = 4,
+ /obj/item/gun/energy/mousegun = 4,
+ /obj/item/material/knife/butterfly = 3,
+ /obj/item/material/knife/butterfly/switchblade = 3,
+ /obj/item/clothing/gloves/brassknuckles = 3,
+ /obj/item/reagent_containers/syringe/drugs = 3,
+ /obj/item/handcuffs = 2,
+ /obj/item/legcuffs = 2,
+ /obj/item/grenade/chem_grenade/gas = 2,
+ /obj/item/clothing/suit/storage/vest/heavy = 1,
+ /obj/item/device/radiojammer = 1,
+ /obj/item/trap = 1,
+ /obj/item/cell/hyper/empty = 1,
+ /obj/item/material/knife/tacknife = 1,
+ /obj/item/storage/firstaid/brute = 1,
+ /obj/item/reagent_containers/pill/dexalin_plus = 1
+ )
+
+ var/path = pickweight(possible_path)
+ var/obj/item/I = new path()
+ return I
+
+/obj/structure/trash_pile/proc/produce_gamma_item()
+ var/path = pick_n_take(unique_gamma)
+ if(path)
+ var/obj/item/I = new path()
+ return I
+ else
+ return produce_beta_item()
diff --git a/code/modules/projectiles/guns/projectile/improvised.dm b/code/modules/projectiles/guns/projectile/improvised.dm
index 5e3a36b98f3..027085dbc92 100644
--- a/code/modules/projectiles/guns/projectile/improvised.dm
+++ b/code/modules/projectiles/guns/projectile/improvised.dm
@@ -152,6 +152,9 @@
jam_chance = 20
needspin = FALSE
+/obj/item/gun/projectile/improvised_handgun/loaded
+ magazine_type = /obj/item/ammo_magazine/c45m
+
/obj/item/gun/projectile/improvised_handgun/examine(mob/user)
..(user)
switch(jam_chance)
diff --git a/html/changelogs/geeves-trash_piles.yml b/html/changelogs/geeves-trash_piles.yml
new file mode 100644
index 00000000000..de6cdd78b73
--- /dev/null
+++ b/html/changelogs/geeves-trash_piles.yml
@@ -0,0 +1,6 @@
+author: Geeves
+
+delete-after: True
+
+changes:
+ - rscadd: "Added various trash piles to maintenance, holding loot for anyone to discover."
\ No newline at end of file
diff --git a/icons/obj/trash_piles.dmi b/icons/obj/trash_piles.dmi
new file mode 100644
index 00000000000..a8eea0b14ed
Binary files /dev/null and b/icons/obj/trash_piles.dmi differ
diff --git a/maps/aurora/aurora-3_sublevel.dmm b/maps/aurora/aurora-3_sublevel.dmm
index 98bc5474358..1e4c3edb77e 100644
--- a/maps/aurora/aurora-3_sublevel.dmm
+++ b/maps/aurora/aurora-3_sublevel.dmm
@@ -34907,6 +34907,10 @@
},
/turf/simulated/floor/tiled,
/area/outpost/engineering/hallway)
+"uMk" = (
+/obj/structure/trash_pile,
+/turf/simulated/floor/tiled,
+/area/maintenance/disposal)
"uMH" = (
/obj/effect/floor_decal/corner/green{
dir = 1
@@ -34967,6 +34971,10 @@
/obj/machinery/power/tesla_coil,
/turf/simulated/floor/plating,
/area/outpost/engineering/power)
+"uRE" = (
+/obj/structure/trash_pile,
+/turf/simulated/floor/plating,
+/area/maintenance/research_xenobiology)
"uRU" = (
/obj/structure/table/standard,
/obj/structure/window/reinforced,
@@ -61915,7 +61923,7 @@ aFV
aFV
aFV
aFV
-aJW
+uRE
awa
aFW
aba
@@ -65751,7 +65759,7 @@ aFW
aGS
aHX
aHX
-aJW
+uRE
aKY
aMb
aMb
@@ -66046,7 +66054,7 @@ aaa
aaa
aaa
aZV
-aZW
+uMk
aZW
aZW
bcb
diff --git a/maps/aurora/aurora-4_mainlevel.dmm b/maps/aurora/aurora-4_mainlevel.dmm
index 713b0733b6b..6580a94ea1e 100644
--- a/maps/aurora/aurora-4_mainlevel.dmm
+++ b/maps/aurora/aurora-4_mainlevel.dmm
@@ -30821,7 +30821,7 @@
/turf/simulated/floor/carpet/blue,
/area/crew_quarters/heads/cryo)
"bbo" = (
-/obj/random/junk,
+/obj/structure/trash_pile,
/turf/simulated/floor/plating,
/area/maintenance/maintcentral)
"bbp" = (
@@ -35699,7 +35699,6 @@
/obj/machinery/conveyor_switch/oneway{
desc = "A conveyor control switch. It appears to only go in one direction. Controls the components conveyor belt.";
id = "Robocompo";
- name = "conveyor switch";
pixel_x = -10
},
/turf/simulated/floor/tiled,
@@ -59351,12 +59350,20 @@
/obj/structure/closet/lawcloset,
/turf/simulated/floor/wood,
/area/lawoffice/representative)
+"cXG" = (
+/obj/structure/trash_pile,
+/turf/simulated/floor/plating,
+/area/maintenance/atmos_control)
"cXM" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 5
},
/turf/simulated/floor/plating,
/area/maintenance/research_port)
+"cXY" = (
+/obj/structure/trash_pile,
+/turf/simulated/floor/plating,
+/area/maintenance/research_port)
"das" = (
/obj/structure/table/rack,
/obj/random/loot,
@@ -60943,6 +60950,11 @@
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/tiled/old,
/area/maintenance/vault)
+"gJn" = (
+/obj/effect/decal/cleanable/dirt,
+/obj/structure/trash_pile,
+/turf/simulated/floor/plating,
+/area/maintenance/bar)
"gKs" = (
/obj/machinery/door/firedoor,
/obj/structure/disposalpipe/segment,
@@ -61546,6 +61558,11 @@
},
/turf/simulated/floor/plating,
/area/quartermaster/storage)
+"hQf" = (
+/obj/effect/decal/cleanable/dirt,
+/obj/structure/trash_pile,
+/turf/simulated/floor/plating,
+/area/maintenance/vault)
"hQD" = (
/obj/structure/disposalpipe/segment{
dir = 4
@@ -63585,6 +63602,11 @@
"mKz" = (
/turf/simulated/wall,
/area/maintenance/library)
+"mKD" = (
+/obj/effect/decal/cleanable/dirt,
+/obj/structure/trash_pile,
+/turf/simulated/floor/plating,
+/area/maintenance/research_port)
"mMJ" = (
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/tiled/old_dark,
@@ -64414,6 +64436,11 @@
},
/turf/simulated/floor/plating,
/area/maintenance/research_port)
+"oDJ" = (
+/obj/effect/decal/cleanable/dirt,
+/obj/structure/trash_pile,
+/turf/simulated/floor/plating,
+/area/maintenance/medbay)
"oEG" = (
/obj/effect/floor_decal/corner/yellow{
dir = 4
@@ -64624,6 +64651,10 @@
/obj/effect/floor_decal/spline/plain,
/turf/simulated/floor/carpet,
/area/lawoffice/consular)
+"peg" = (
+/obj/structure/trash_pile,
+/turf/simulated/floor/plating,
+/area/maintenance/bar)
"pfO" = (
/obj/structure/table/steel,
/obj/item/reagent_containers/food/drinks/bottle{
@@ -65500,6 +65531,10 @@
},
/turf/simulated/floor/plating,
/area/maintenance/vault)
+"qOX" = (
+/obj/structure/trash_pile,
+/turf/simulated/floor/plating,
+/area/maintenance/library)
"qPd" = (
/obj/effect/floor_decal/corner/grey/diagonal,
/obj/random/junk,
@@ -66379,6 +66414,10 @@
},
/turf/simulated/floor/wood,
/area/maintenance/bar)
+"sAC" = (
+/obj/structure/trash_pile,
+/turf/simulated/floor/plating,
+/area/maintenance/security_starboard)
"sAE" = (
/obj/structure/disposalpipe/segment,
/obj/structure/cable{
@@ -68407,6 +68446,10 @@
},
/turf/simulated/floor/tiled/white,
/area/medical/medbay)
+"weJ" = (
+/obj/structure/trash_pile,
+/turf/simulated/floor/plating,
+/area/maintenance/bridge_elevator)
"wfx" = (
/obj/machinery/button/remote/airlock{
dir = 8;
@@ -84565,7 +84608,7 @@ aKV
aOw
aQc
aRQ
-bcY
+cXY
bbs
bbs
aXI
@@ -87112,7 +87155,7 @@ qba
eFC
aja
vOd
-aid
+cXG
aih
ahk
anJ
@@ -88179,7 +88222,7 @@ bbq
bbs
bbs
bnt
-bcY
+cXY
bqh
brq
bss
@@ -89758,7 +89801,7 @@ bPs
bPs
bQF
bcY
-bPs
+mKD
bbs
bFT
bcY
@@ -91817,7 +91860,7 @@ sYg
aKT
bNn
bRK
-bNn
+qOX
cbQ
rXO
oud
@@ -93097,7 +93140,7 @@ fqD
xqw
bRK
bNn
-bNn
+qOX
bSh
bSh
bSh
@@ -99448,7 +99491,7 @@ aaV
aaA
aaA
aaA
-aah
+sAC
aah
aae
aah
@@ -101350,7 +101393,7 @@ bEK
bPH
bGC
bGC
-bGC
+peg
bEK
aab
aab
@@ -101599,13 +101642,13 @@ bZt
bSM
bGC
bGC
-bGC
+peg
bMU
pDF
cdi
bEK
bMV
-bGC
+peg
bPH
bGC
bEK
@@ -103366,7 +103409,7 @@ bMp
bMp
bGC
eNR
-pie
+gJn
bNO
jPX
yfc
@@ -103915,7 +103958,7 @@ bGC
bGC
bEK
bFF
-bGC
+peg
bEK
aab
aab
@@ -104061,7 +104104,7 @@ aah
aah
aah
aah
-aah
+sAC
aaV
abE
aeJ
@@ -105868,7 +105911,7 @@ afj
ePU
eZE
pFK
-xOq
+hQf
nHe
hRF
tzU
@@ -110017,7 +110060,7 @@ baW
bct
aYy
bfw
-aSL
+bbo
bhZ
bjp
bku
@@ -112034,7 +112077,7 @@ aaa
aox
aox
nHe
-xOq
+hQf
qqz
txW
amk
@@ -112352,7 +112395,7 @@ blN
blN
blN
blL
-bJq
+oDJ
blN
bBo
hSJ
@@ -114675,7 +114718,7 @@ dNy
hTO
bMu
dNy
-dNy
+weJ
hTO
aaa
aaa
@@ -117728,7 +117771,7 @@ bal
bal
bal
aTf
-aSL
+bbo
aSL
bam
aab
@@ -118750,9 +118793,9 @@ aUU
aUS
aXF
aXC
-aSL
bbo
-aSL
+bbo
+bbo
aSL
aSL
bha
diff --git a/maps/aurora/aurora-5_interstitial.dmm b/maps/aurora/aurora-5_interstitial.dmm
index 85816da5523..c16343d4594 100644
--- a/maps/aurora/aurora-5_interstitial.dmm
+++ b/maps/aurora/aurora-5_interstitial.dmm
@@ -3967,8 +3967,7 @@
"iw" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/door/blast/regular{
- id = "sat_blast";
- name = "Blast Door"
+ id = "sat_blast"
},
/turf/simulated/floor/plating,
/area/bridge/selfdestruct)
@@ -9718,6 +9717,10 @@
},
/turf/simulated/floor/tiled/white,
/area/maintenance/medbay_virology)
+"JB" = (
+/obj/structure/trash_pile,
+/turf/simulated/floor/plating,
+/area/maintenance/interstitial_cargo)
"JC" = (
/turf/simulated/floor/tiled,
/area/maintenance/bridge_elevator)
@@ -12442,7 +12445,7 @@
/turf/simulated/floor/plating,
/area/maintenance/medbay_interstitial)
"XA" = (
-/obj/structure/closet/firecloset/full,
+/obj/structure/trash_pile,
/turf/simulated/floor/plating,
/area/maintenance/elevator)
"XG" = (
@@ -44111,7 +44114,7 @@ aa
aa
aa
KJ
-Lk
+JB
Lv
Ly
KJ
diff --git a/maps/aurora/aurora-6_surface.dmm b/maps/aurora/aurora-6_surface.dmm
index 604ca7b6db4..c4bf1c11a96 100644
--- a/maps/aurora/aurora-6_surface.dmm
+++ b/maps/aurora/aurora-6_surface.dmm
@@ -12825,6 +12825,10 @@
},
/turf/simulated/floor/wood,
/area/store)
+"yt" = (
+/obj/structure/trash_pile,
+/turf/simulated/floor/plating,
+/area/turret_protected/tcomsat)
"yu" = (
/obj/machinery/atmospherics/pipe/simple/hidden{
dir = 4
@@ -22710,8 +22714,7 @@
/turf/simulated/floor/grass/alt,
/area/hydroponics/garden)
"QO" = (
-/obj/structure/table/rack,
-/obj/random/loot,
+/obj/structure/trash_pile,
/turf/simulated/floor/plating,
/area/maintenance/elevator)
"QP" = (
@@ -22812,6 +22815,10 @@
},
/turf/simulated/floor/tiled,
/area/hallway/secondary/entry/port)
+"QZ" = (
+/obj/structure/trash_pile,
+/turf/simulated/floor/plating,
+/area/maintenance/telecoms_ladder)
"Ra" = (
/turf/simulated/wall/shuttle/unique/research{
desc = "The largest commercially available sublight engine, with a shuttle built around it and painted in NanoTrasen research division colors. Looks sleek, and fast.";
@@ -36909,7 +36916,7 @@ aP
aa
bg
bg
-bx
+yt
bW
cr
cI
@@ -41049,7 +41056,7 @@ bg
Of
Mp
cl
-Mp
+QZ
Nc
ag
ag