diff --git a/code/__defines/dcs/signals.dm b/code/__defines/dcs/signals.dm index 23db2a5a35..b9ea35b815 100644 --- a/code/__defines/dcs/signals.dm +++ b/code/__defines/dcs/signals.dm @@ -784,6 +784,9 @@ ///from base of [/datum/element/light_eater/proc/devour]: (atom/eaten_light) #define COMSIG_LIGHT_EATER_DEVOUR "light_eater_devour" +// Lootpiles +#define COMSIG_LOOT_REWARD "lootpile_reward_drop" + // conflict checking elements /// (id) - returns flags - Registered on something by conflict checking elements. #define COMSIG_CONFLICT_ELEMENT_CHECK "conflict_element_check" diff --git a/code/datums/elements/lootable/_lootable.dm b/code/datums/elements/lootable/_lootable.dm new file mode 100644 index 0000000000..76e542d969 --- /dev/null +++ b/code/datums/elements/lootable/_lootable.dm @@ -0,0 +1,140 @@ +GLOBAL_LIST_INIT(allocated_gamma_loot,list()) +GLOBAL_LIST_INIT(unique_gamma_loot,list(\ + /obj/item/perfect_tele,\ + /obj/item/bluespace_harpoon,\ + /obj/item/clothing/glasses/thermal/syndi,\ + /obj/item/gun/energy/netgun,\ + /obj/item/gun/projectile/dartgun,\ + /obj/item/clothing/gloves/black/bloodletter,\ + /obj/item/gun/energy/mouseray/metamorphosis)) + +/datum/element/lootable + var/chance_nothing = 0 // Unlucky people might need to loot multiple spots to find things. + var/chance_uncommon = 10 // Probability of pulling from the uncommon_loot list. + var/chance_rare = 1 // Ditto, but for rare_loot list. + var/chance_gamma = 0 // Singledrop global loot table shared with all piles. + + var/allow_multiple_looting = FALSE // If true, the same person can loot multiple times. Mostly for debugging. + var/loot_depletion = FALSE // If true, loot piles can be 'depleted' after a certain number of searches by different players, where no more loot can be obtained. + var/loot_left = 0 // When this reaches zero, and loot_depleted is true, you can't obtain anymore loot. + var/delete_on_depletion = FALSE // If true, and if the loot gets depleted as above, the pile is deleted. + + var/list/common_loot = list() // Common is generally less-than-useful junk and filler, at least for maint loot piles. + var/list/uncommon_loot = list() // Uncommon is actually maybe some useful items, usually the reason someone bothers looking inside. + var/list/rare_loot = list() // Rare is really powerful, or at least unique items. + +/datum/element/lootable/Attach(atom/target) + . = ..() + if(!isatom(target)) + return ELEMENT_INCOMPATIBLE + RegisterSignal(target, COMSIG_LOOT_REWARD, PROC_REF(loot)) + +/datum/element/lootable/Detach(atom/target) + . = ..() + UnregisterSignal(target, COMSIG_LOOT_REWARD) + +/// Calculates and drops loot, the source's turf is where it will be dropped, L is the searching mob, and searched_by is a passed list for storing who has searched a loot pile. +/datum/element/lootable/proc/loot(atom/source,mob/living/L,var/list/searched_by) + SIGNAL_HANDLER + // The loot's all gone. + if(loot_depletion && loot_left <= 0) + to_chat(L, span_warning("\The [source] has been picked clean.")) + return + + // You got unlucky. + if(chance_nothing && prob(chance_nothing)) + to_chat(L, span_warning("Nothing in \the [source] really catches your eye...")) + return + + if(L && islist(searched_by)) // This can handle no mob and no list if you just want to use this as a way to hold drop tables + //You already searched this one + if((L.ckey in searched_by) && !allow_multiple_looting) + to_chat(L, span_warning("You can't find anything else vaguely useful in \the [source]. Another set of eyes might, however.")) + return + searched_by |= L.ckey // List is stored in the caller! + + // You found something! + var/obj/item/loot = null + var/span = "notice" // Blue + + if(prob(chance_uncommon) && uncommon_loot.len) // You might still get something good. + loot = produce_uncommon_item(source) + span = "alium" // Green + + else if(prob(chance_rare) && rare_loot.len) // You won THE GRAND PRIZE! + loot = produce_rare_item(source) + span = "cult" // Purple and bold. + + else if(prob(chance_gamma) && GLOB.unique_gamma_loot.len) // ULTRA GRAND PRIZE + loot = produce_gamma_item(source) + span = "cult" // Purple and bold. + + else // Welp. + loot = produce_common_item(source) + + // Handle randomized items in our tables. + if(istype(loot,/obj/random)) + var/obj/random/randy = loot + var/new_I = randy.spawn_item() + qdel_swap(loot,new_I) + + //We either have an item to hand over or we don't, at this point! + if(!loot) + return + loot.forceMove(get_turf(source)) + var/final_message = "You found \a [loot]!" + switch(span) + if("notice") + final_message = span_notice(final_message) + if("cult") + final_message = span_cult(final_message) + if("alium") + final_message = span_alium(final_message) + to_chat(L, span_info(final_message)) + + // Check if we should delete on depletion + if(!loot_depletion) + return + loot_left-- + if(loot_left > 0) + return + to_chat(L, span_warning("You seem to have gotten the last of the spoils in \the [source].")) + if(delete_on_depletion) + qdel(source) + + +/datum/element/lootable/proc/produce_common_item(atom/source) + var/path = pick(common_loot) + return new path(source) + +/datum/element/lootable/proc/produce_uncommon_item(atom/source) + var/path = pick(uncommon_loot) + return new path(source) + +/datum/element/lootable/proc/produce_rare_item(atom/source) + var/path = pick(rare_loot) + return new path(source) + +/// These are types that can only spawn once, and then will be removed from this list. +/datum/element/lootable/proc/produce_gamma_item(atom/source) + var/path = pick_n_take(GLOB.unique_gamma_loot) + if(!path) //Tapped out, reallocate? + for(var/P in GLOB.allocated_gamma_loot) + var/datum/weakref/WF = GLOB.allocated_gamma_loot[P] + var/obj/item/I = WF?.resolve() + if(QDELETED(I) || istype(I.loc,/obj/machinery/computer/cryopod)) + restore_gamma_loot(P) + path = P + break + + if(path) + var/obj/item/I = new path(source) + GLOB.allocated_gamma_loot[path] = WEAKREF(I) + return I + + return produce_rare_item(source) + +/// Restores a removed gamma loot item back to the loot table +/proc/restore_gamma_loot(var/w_type) + GLOB.allocated_gamma_loot -= w_type + GLOB.unique_gamma_loot += w_type diff --git a/code/datums/elements/lootable/boxes.dm b/code/datums/elements/lootable/boxes.dm new file mode 100644 index 0000000000..7001ac4a96 --- /dev/null +++ b/code/datums/elements/lootable/boxes.dm @@ -0,0 +1,44 @@ +// Contains loads of different types of boxes, which may have items inside! +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/boxes + common_loot = list( + /obj/item/storage/box, + /obj/item/storage/box/beakers, + /obj/item/storage/box/botanydisk, + /obj/item/storage/box/cups, + /obj/item/storage/box/disks, + /obj/item/storage/box/donkpockets, + /obj/item/storage/box/donut, + /obj/item/storage/box/donut/empty, + /obj/item/storage/box/evidence, + /obj/item/storage/box/lights/mixed, + /obj/item/storage/box/lights/tubes, + /obj/item/storage/box/lights/bulbs, + /obj/item/storage/box/injectors, + /obj/item/storage/box/masks, + /obj/item/storage/box/ids, + /obj/item/storage/box/mousetraps, + /obj/item/storage/box/syringes, + /obj/item/storage/box/survival, + /obj/item/storage/box/gloves, + /obj/item/storage/box/PDAs + ) + + uncommon_loot = list( + /obj/item/storage/box/sinpockets, + /obj/item/ammo_magazine/ammo_box/b12g/practice, + /obj/item/ammo_magazine/ammo_box/b12g/blank, + /obj/item/storage/box/smokes, + /obj/item/storage/box/metalfoam, + /obj/item/storage/box/handcuffs, + /obj/item/storage/box/seccarts, + /obj/item/storage/box/old_syringes, + ) + + rare_loot = list( + /obj/item/storage/box/flashbangs, + /obj/item/storage/box/empslite, + /obj/item/ammo_magazine/ammo_box/b12g/flash, + /obj/item/ammo_magazine/ammo_box/b12g/stunshell, + /obj/item/storage/box/teargas + ) diff --git a/code/datums/elements/lootable/maint.dm b/code/datums/elements/lootable/maint.dm new file mode 100644 index 0000000000..6f318ca2b6 --- /dev/null +++ b/code/datums/elements/lootable/maint.dm @@ -0,0 +1,257 @@ +// Has large amounts of possible items, most of which may or may not be useful. +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/maint/junk + common_loot = list( + /obj/item/flashlight/flare, + /obj/item/flashlight/glowstick, + /obj/item/flashlight/glowstick/blue, + /obj/item/flashlight/glowstick/orange, + /obj/item/flashlight/glowstick/red, + /obj/item/flashlight/glowstick/yellow, + /obj/item/flashlight/pen, + /obj/item/cell, + /obj/item/cell/device, + /obj/item/clothing/mask/gas, + /obj/item/clothing/mask/gas/half, + /obj/item/clothing/mask/breath, + /obj/item/reagent_containers/glass/rag, + /obj/item/reagent_containers/food/snacks/liquidfood, + /obj/item/storage/secure/briefcase, + /obj/item/storage/briefcase, + /obj/item/storage/backpack, + /obj/item/storage/backpack/satchel/norm, + /obj/item/storage/backpack/satchel, + /obj/item/storage/backpack/dufflebag, + /obj/item/storage/box, + /obj/item/storage/wallet, + /obj/item/clothing/shoes/galoshes, + /obj/item/clothing/shoes/black, + /obj/item/clothing/shoes/laceup, + /obj/item/clothing/shoes/laceup/grey, + /obj/item/clothing/shoes/laceup/brown, + /obj/item/clothing/gloves/botanic_leather, + /obj/item/clothing/gloves/sterile/latex, + /obj/item/clothing/gloves/white, + /obj/item/clothing/gloves/rainbow, + /obj/item/clothing/gloves/fyellow, + /obj/item/clothing/glasses/sunglasses, + /obj/item/clothing/glasses/meson, + /obj/item/clothing/glasses/meson/prescription, + /obj/item/clothing/glasses/welding, + /obj/item/clothing/head/bio_hood/general, + /obj/item/clothing/head/hardhat, + /obj/item/clothing/head/hardhat/red, + /obj/item/clothing/head/ushanka, + /obj/item/clothing/head/welding, + /obj/item/clothing/suit/storage/hazardvest, + /obj/item/clothing/suit/space/emergency, + /obj/item/clothing/suit/storage/toggle/bomber, + /obj/item/clothing/suit/bio_suit/general, + /obj/item/clothing/suit/storage/toggle/hoodie/black, + /obj/item/clothing/suit/storage/toggle/hoodie/blue, + /obj/item/clothing/suit/storage/toggle/hoodie/red, + /obj/item/clothing/suit/storage/toggle/hoodie/yellow, + /obj/item/clothing/suit/storage/toggle/brown_jacket, + /obj/item/clothing/suit/storage/toggle/leather_jacket, + /obj/item/clothing/suit/storage/apron, + /obj/item/clothing/under/color/grey, + /obj/item/clothing/under/syndicate/tacticool, + /obj/item/clothing/under/pants/camo, + /obj/item/clothing/under/harness, + /obj/item/clothing/accessory/storage/webbing, + /obj/item/spacecash/c1, + /obj/item/spacecash/c5, + /obj/item/spacecash/c10, + /obj/item/spacecash/c20, + /obj/item/camera_assembly, + /obj/item/clothing/suit/caution, + /obj/item/clothing/head/cone, + /obj/item/card/emag_broken, + /obj/item/camera, + /obj/item/pda, + /obj/item/radio/headset, + /obj/item/paicard, + /obj/item/reagent_containers/hypospray/autoinjector/biginjector/glucose, + /obj/item/reagent_containers/syringe/old + ) + + uncommon_loot = list( + /obj/item/clothing/shoes/syndigaloshes, + /obj/item/clothing/gloves/yellow, + /obj/item/clothing/under/tactical, + /obj/item/beartrap, + /obj/item/clothing/suit/storage/vest/press, + /obj/item/material/knife/tacknife, + /obj/item/material/butterfly/switchblade + ) + + rare_loot = list( + /obj/item/clothing/suit/storage/vest/heavy/merc, + /obj/item/clothing/shoes/boots/combat, + ) + + +// Contains mostly useless garbage. +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/maint/trash + common_loot = list( + /obj/item/trash/candle, + /obj/item/trash/candy, + /obj/item/trash/candy/proteinbar, + /obj/item/trash/candy/gums, + /obj/item/trash/cheesie, + /obj/item/trash/chips, + /obj/item/trash/chips/bbq, + /obj/item/trash/liquidfood, + /obj/item/trash/pistachios, + /obj/item/trash/plate, + /obj/item/trash/popcorn, + /obj/item/trash/raisins, + /obj/item/trash/semki, + /obj/item/trash/snack_bowl, + /obj/item/trash/sosjerky, + /obj/item/trash/syndi_cakes, + /obj/item/trash/tastybread, + /obj/item/trash/coffee, + /obj/item/trash/tray, + /obj/item/trash/unajerky, + /obj/item/trash/waffles, + /obj/item/reagent_containers/food/snacks/xenomeat/spidermeat, + /obj/item/reagent_containers/food/snacks/mysterysoup, + /obj/item/reagent_containers/food/snacks/old/hotdog, + /obj/item/pizzabox/old, + /obj/item/ammo_casing/spent, + /obj/item/stack/rods{amount = 5}, + /obj/item/stack/material/steel{amount = 5}, + /obj/item/stack/material/cardboard{amount = 5}, + /obj/item/poster, + /obj/item/poster/custom, + /obj/item/newspaper, + /obj/item/paper/crumpled, + /obj/item/paper/crumpled/bloody, + /obj/item/reagent_containers/syringe/old + ) + + uncommon_loot = list( + /obj/item/reagent_containers/syringe/steroid, + /obj/item/storage/pill_bottle/zoom, + /obj/item/storage/pill_bottle/happy, + /obj/item/storage/pill_bottle/paracetamol + ) + + +// One of the more useful maint piles, contains electrical components. +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/maint/technical + common_loot = list( + /obj/item/stock_parts/gear, + /obj/item/stock_parts/console_screen, + /obj/item/stock_parts/spring, + /obj/item/stock_parts/capacitor, + /obj/item/stock_parts/capacitor/adv, + /obj/item/stock_parts/capacitor/super, + /obj/item/stock_parts/manipulator, + /obj/item/stock_parts/manipulator/nano, + /obj/item/stock_parts/manipulator/pico, + /obj/item/stock_parts/matter_bin, + /obj/item/stock_parts/matter_bin/adv, + /obj/item/stock_parts/matter_bin/super, + /obj/item/stock_parts/scanning_module, + /obj/item/stock_parts/scanning_module/adv, + /obj/item/stock_parts/scanning_module/phasic, + /obj/item/stock_parts/subspace/amplifier, + /obj/item/stock_parts/subspace/analyzer, + /obj/item/stock_parts/subspace/ansible, + /obj/item/stock_parts/subspace/crystal, + /obj/item/stock_parts/subspace/sub_filter, + /obj/item/stock_parts/subspace/transmitter, + /obj/item/stock_parts/subspace/treatment, + /obj/item/frame, + /obj/item/broken_device/random, + /obj/item/borg/upgrade/utility/restart, + /obj/item/cell, + /obj/item/cell/high, + /obj/item/cell/device, + /obj/item/circuitboard/broken, + /obj/item/circuitboard/arcade, + /obj/item/circuitboard/autolathe, + /obj/item/circuitboard/atmos_alert, + /obj/item/circuitboard/airalarm, + /obj/item/circuitboard/fax, + /obj/item/circuitboard/jukebox, + /obj/item/circuitboard/batteryrack, + /obj/item/circuitboard/message_monitor, + /obj/item/circuitboard/rcon_console, + /obj/item/smes_coil, + /obj/item/cartridge/engineering, + /obj/item/analyzer, + /obj/item/healthanalyzer, + /obj/item/extrapolator, + /obj/item/gene_scanner, + /obj/item/robotanalyzer, + /obj/item/lightreplacer, + /obj/item/radio, + /obj/item/hailer, + /obj/item/gps, + /obj/item/geiger, + /obj/item/mass_spectrometer, + /obj/item/tool/wrench, + /obj/item/tool/screwdriver, + /obj/item/tool/wirecutters, + /obj/item/mining_scanner/advanced, + /obj/item/multitool, + /obj/item/mecha_parts/mecha_equipment/generator, + /obj/item/mecha_parts/mecha_equipment/tool/cable_layer, + /obj/item/mecha_parts/mecha_equipment/tool/drill, + /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp, + /obj/item/mecha_parts/mecha_equipment/tool/passenger, + /obj/item/mecha_parts/mecha_equipment/tool/sleeper, + /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun, + /obj/item/robot_parts/robot_component/binary_communication_device, + /obj/item/robot_parts/robot_component/armour, + /obj/item/robot_parts/robot_component/actuator, + /obj/item/robot_parts/robot_component/camera, + /obj/item/robot_parts/robot_component/diagnosis_unit, + /obj/item/robot_parts/robot_component/radio + ) + + uncommon_loot = list( + /obj/item/cell/super, + /obj/item/cell/device/weapon, + /obj/item/circuitboard/security, + /obj/item/circuitboard/crew, + /obj/item/aiModule/reset, + /obj/item/smes_coil/super_capacity, + /obj/item/smes_coil/super_io, + /obj/item/cartridge/captain, + /obj/item/disk/integrated_circuit/upgrade/advanced, + /obj/item/tvcamera, + /obj/item/universal_translator, + /obj/item/aicard, + /obj/item/borg/upgrade/advanced/jetpack, + /obj/item/borg/upgrade/advanced/advhealth, + /obj/item/borg/upgrade/basic/vtec, + /obj/item/borg/upgrade/restricted/tasercooler, + /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, + /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill, + /obj/item/rig_module/device/drill, + /obj/item/rig_module/device/plasmacutter, + /obj/item/rig_module/device/healthscanner, + /obj/item/rig_module/device/orescanner, + /obj/item/rig_module/device/anomaly_scanner, + /obj/item/rig_module/datajack, + /obj/item/rig_module/vision/medhud, + /obj/item/rig_module/vision/meson, + /obj/item/rig_module/vision/sechud, + /obj/item/rig_module/sprinter + ) + + rare_loot = list( + /obj/item/cell/hyper, + /obj/item/aiModule/freeform, + /obj/item/aiModule/asimov, + /obj/item/aiModule/paladin, + /obj/item/aiModule/safeguard, + /obj/item/disposable_teleporter, + /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay + ) diff --git a/code/datums/elements/lootable/mecha.dm b/code/datums/elements/lootable/mecha.dm new file mode 100644 index 0000000000..781d59ac7f --- /dev/null +++ b/code/datums/elements/lootable/mecha.dm @@ -0,0 +1,245 @@ +// Subtype for mecha and mecha accessories. These might not always be on the surface. +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/mecha + chance_uncommon = 20 + chance_rare = 10 + + loot_depletion = TRUE + loot_left = 9 + + common_loot = list( + /obj/random/tool, + /obj/random/tool, + /obj/random/tool, + /obj/random/tool, + /obj/item/stack/cable_coil/random, + /obj/random/tank, + /obj/random/tech_supply/component, + /obj/random/tech_supply/component, + /obj/random/tech_supply/component, + /obj/effect/decal/remains/lizard, + /obj/effect/decal/remains/mouse, + /obj/effect/decal/remains/robot, + /obj/item/stack/material/steel{amount = 40} + ) + + uncommon_loot = list( + /obj/item/mecha_parts/mecha_equipment/weapon/energy/taser, + /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, + /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp, + /obj/item/mecha_parts/mecha_equipment/tool/drill, + /obj/item/mecha_parts/mecha_equipment/generator + ) + + rare_loot = list( + /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser, + /obj/item/mecha_parts/mecha_equipment/generator/nuclear, + /obj/item/mecha_parts/mecha_equipment/tool/jetpack + ) + +// Stuff you may find attached to a ripley. +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/mecha/ripley + common_loot = list( + /obj/random/tool, + /obj/item/stack/cable_coil/random, + /obj/random/tank, + /obj/random/tech_supply/component, + /obj/item/stack/material/steel{amount = 25}, + /obj/item/stack/material/glass{amount = 10}, + /obj/item/stack/material/plasteel{amount = 5}, + /obj/item/mecha_parts/chassis/ripley, + /obj/item/mecha_parts/part/ripley_torso, + /obj/item/mecha_parts/part/ripley_left_arm, + /obj/item/mecha_parts/part/ripley_right_arm, + /obj/item/mecha_parts/part/ripley_left_leg, + /obj/item/mecha_parts/part/ripley_right_leg, + /obj/item/kit/paint/ripley, + /obj/item/kit/paint/ripley/flames_red, + /obj/item/kit/paint/ripley/flames_blue + ) + + uncommon_loot = list( + /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp, + /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill, + /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster, + /obj/item/mecha_parts/mecha_equipment/tool/extinguisher, + ) + + rare_loot = list( + /obj/item/mecha_parts/mecha_equipment/gravcatapult, + /obj/item/mecha_parts/mecha_equipment/tool/rcd, + /obj/item/mecha_parts/mecha_equipment/weapon/energy/flamer/rigged + ) + +// Death-Ripley, same common, but more combat-exosuit-based +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/mecha/deathripley + common_loot = list( + /obj/random/tool, + /obj/item/stack/cable_coil/random, + /obj/random/tank, + /obj/random/tech_supply/component, + /obj/item/stack/material/steel{amount = 40}, + /obj/item/stack/material/glass{amount = 20}, + /obj/item/stack/material/plasteel{amount = 10}, + /obj/item/mecha_parts/chassis/ripley, + /obj/item/mecha_parts/part/ripley_torso, + /obj/item/mecha_parts/part/ripley_left_arm, + /obj/item/mecha_parts/part/ripley_right_arm, + /obj/item/mecha_parts/part/ripley_left_leg, + /obj/item/mecha_parts/part/ripley_right_leg, + /obj/item/kit/paint/ripley/death + ) + + uncommon_loot = list( + /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp/safety, + /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, + /obj/item/mecha_parts/mecha_equipment/repair_droid, + /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay + ) + + rare_loot = list( + /obj/item/mecha_parts/mecha_equipment/tool/rcd, + /obj/item/mecha_parts/mecha_equipment/wormhole_generator, + /obj/item/mecha_parts/mecha_equipment/weapon/energy/flamer/rigged + ) + +// Medimech loot +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/mecha/odysseus + common_loot = list( + /obj/random/tool, + /obj/item/stack/cable_coil/random, + /obj/random/tank, + /obj/random/tech_supply/component, + /obj/item/stack/material/steel{amount = 25}, + /obj/item/stack/material/glass{amount = 10}, + /obj/item/stack/material/plasteel{amount = 5}, + /obj/item/mecha_parts/chassis/odysseus, + /obj/item/mecha_parts/part/odysseus_head, + /obj/item/mecha_parts/part/odysseus_torso, + /obj/item/mecha_parts/part/odysseus_left_arm, + /obj/item/mecha_parts/part/odysseus_right_arm, + /obj/item/mecha_parts/part/odysseus_left_leg, + /obj/item/mecha_parts/part/odysseus_right_leg + ) + + uncommon_loot = list( + /obj/item/mecha_parts/mecha_equipment/tool/sleeper, + /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun, + /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flare, + /obj/item/mecha_parts/mecha_equipment/tool/extinguisher, + ) + + rare_loot = list( + /obj/item/mecha_parts/mecha_equipment/gravcatapult, + /obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster, + /obj/item/mecha_parts/mecha_equipment/shocker + ) + +// Gygax loot +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/mecha/gygax + common_loot = list( + /obj/random/tool, + /obj/item/stack/cable_coil/random, + /obj/random/tank, + /obj/random/tech_supply/component, + /obj/item/stack/material/steel{amount = 25}, + /obj/item/stack/material/glass{amount = 10}, + /obj/item/stack/material/plasteel{amount = 5}, + /obj/item/mecha_parts/chassis/gygax, + /obj/item/mecha_parts/part/gygax_head, + /obj/item/mecha_parts/part/gygax_torso, + /obj/item/mecha_parts/part/gygax_left_arm, + /obj/item/mecha_parts/part/gygax_right_arm, + /obj/item/mecha_parts/part/gygax_left_leg, + /obj/item/mecha_parts/part/gygax_right_leg, + /obj/item/mecha_parts/part/gygax_armour + ) + + uncommon_loot = list( + /obj/item/mecha_parts/mecha_equipment/shocker, + /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/grenade, + /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser, + /obj/item/mecha_parts/mecha_equipment/weapon/energy/taser, + /obj/item/kit/paint/gygax, + /obj/item/kit/paint/gygax/darkgygax, + /obj/item/kit/paint/gygax/recitence + ) + + rare_loot = list( + /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay, + /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg, + /obj/item/mecha_parts/mecha_equipment/repair_droid, + /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy + ) + +// Gygax loot +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/mecha/durand + common_loot = list( + /obj/random/tool, + /obj/item/stack/cable_coil/random, + /obj/random/tank, + /obj/random/tech_supply/component, + /obj/item/stack/material/steel{amount = 25}, + /obj/item/stack/material/glass{amount = 10}, + /obj/item/stack/material/plasteel{amount = 5}, + /obj/item/mecha_parts/chassis/durand, + /obj/item/mecha_parts/part/durand_head, + /obj/item/mecha_parts/part/durand_torso, + /obj/item/mecha_parts/part/durand_left_arm, + /obj/item/mecha_parts/part/durand_right_arm, + /obj/item/mecha_parts/part/durand_left_leg, + /obj/item/mecha_parts/part/durand_right_leg, + /obj/item/mecha_parts/part/durand_armour + ) + + uncommon_loot = list( + /obj/item/mecha_parts/mecha_equipment/shocker, + /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/grenade, + /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser, + /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster, + /obj/item/kit/paint/durand, + /obj/item/kit/paint/durand/seraph, + /obj/item/kit/paint/durand/phazon + ) + + rare_loot = list( + /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay, + /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot, + /obj/item/mecha_parts/mecha_equipment/repair_droid, + /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy + ) + +// Phazon loot +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/mecha/phazon + common_loot = list( + /obj/item/storage/toolbox/syndicate/powertools, + /obj/item/stack/material/plasteel{amount = 20}, + /obj/item/stack/material/durasteel{amount = 10}, + /obj/item/mecha_parts/chassis/phazon, + /obj/item/mecha_parts/part/phazon_head, + /obj/item/mecha_parts/part/phazon_torso, + /obj/item/mecha_parts/part/phazon_left_arm, + /obj/item/mecha_parts/part/phazon_right_arm, + /obj/item/mecha_parts/part/phazon_left_leg, + /obj/item/mecha_parts/part/phazon_right_leg + ) + + uncommon_loot = list( + /obj/item/mecha_parts/mecha_equipment/shocker, + /obj/item/mecha_parts/mecha_equipment/weapon/energy/flamer/rigged, + /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy, + /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster + ) + + rare_loot = list( + /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay, + /obj/item/mecha_parts/mecha_equipment/weapon/energy/ion, + /obj/item/mecha_parts/mecha_equipment/repair_droid, + /obj/item/mecha_parts/mecha_equipment/teleporter + ) diff --git a/code/datums/elements/lootable/misc.dm b/code/datums/elements/lootable/misc.dm new file mode 100644 index 0000000000..eda416f4d1 --- /dev/null +++ b/code/datums/elements/lootable/misc.dm @@ -0,0 +1,17 @@ +// Contains old mediciation, most of it unidentified and has a good chance of being useless. +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/expired_medicine + chance_uncommon = 0 + chance_rare = 0 + common_loot = list( + /obj/random/unidentified_medicine/old_medicine + ) + +// Like the above but has way better odds, in exchange for being in a place still inhabited (or was recently). +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/fresh_medicine + chance_uncommon = 0 + chance_rare = 0 + common_loot = list( + /obj/random/unidentified_medicine/fresh_medicine + ) diff --git a/code/datums/elements/lootable/surface.dm b/code/datums/elements/lootable/surface.dm new file mode 100644 index 0000000000..0edfb9f46c --- /dev/null +++ b/code/datums/elements/lootable/surface.dm @@ -0,0 +1,174 @@ +// Surface loot piles are considerably harder and more dangerous to reach, so you're more likely to get rare things. +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/surface + chance_uncommon = 20 + chance_rare = 5 + loot_depletion = TRUE + loot_left = 5 // This is to prevent people from asking the whole station to go down to some alien ruin to get massive amounts of phat lewt. + +// Base type for alien piles. +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/surface/alien + common_loot = list( + /obj/item/prop/alien/junk + ) + + +// May contain alien tools. +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/surface/alien/engineering + uncommon_loot = list( + /obj/item/multitool/alien, + /obj/item/stack/cable_coil/alien, + /obj/item/tool/crowbar/alien, + /obj/item/tool/screwdriver/alien, + /obj/item/weldingtool/alien, + /obj/item/tool/wirecutters/alien, + /obj/item/tool/wrench/alien + ) + rare_loot = list( + /obj/item/storage/belt/utility/alien/full + ) + + +// May contain alien surgery equipment or powerful medication. +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/surface/alien/medical + uncommon_loot = list( + /obj/item/surgical/FixOVein/alien, + /obj/item/surgical/bone_clamp/alien, + /obj/item/surgical/cautery/alien, + /obj/item/surgical/circular_saw/alien, + /obj/item/surgical/hemostat/alien, + /obj/item/surgical/retractor/alien, + /obj/item/surgical/scalpel/alien, + /obj/item/surgical/surgicaldrill/alien + ) + rare_loot = list( + /obj/item/storage/belt/medical/alien + ) + +// May contain powercells or alien weaponry. +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/surface/alien/security + uncommon_loot = list( + /obj/item/cell/device/weapon/recharge/alien, + /obj/item/clothing/suit/armor/alien, + /obj/item/clothing/head/helmet/alien + ) + rare_loot = list( + /obj/item/clothing/suit/armor/alien/tank, + /obj/item/gun/energy/alien + ) + +// The pile found at the very end, and as such has the best loot. +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/surface/alien/end + chance_uncommon = 30 + chance_rare = 10 + + common_loot = list( + /obj/item/multitool/alien, + /obj/item/stack/cable_coil/alien, + /obj/item/tool/crowbar/alien, + /obj/item/tool/screwdriver/alien, + /obj/item/weldingtool/alien, + /obj/item/tool/wirecutters/alien, + /obj/item/tool/wrench/alien, + /obj/item/surgical/FixOVein/alien, + /obj/item/surgical/bone_clamp/alien, + /obj/item/surgical/cautery/alien, + /obj/item/surgical/circular_saw/alien, + /obj/item/surgical/hemostat/alien, + /obj/item/surgical/retractor/alien, + /obj/item/surgical/scalpel/alien, + /obj/item/surgical/surgicaldrill/alien, + /obj/item/cell/device/weapon/recharge/alien, + /obj/item/clothing/suit/armor/alien, + /obj/item/clothing/head/helmet/alien, + /obj/item/gun/energy/alien + ) + uncommon_loot = list( + /obj/item/storage/belt/medical/alien, + /obj/item/storage/belt/utility/alien/full, + /obj/item/clothing/suit/armor/alien/tank, + /obj/item/clothing/head/helmet/alien/tank, + ) + +// POI bones of other less fortunate explos +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/surface/bones + delete_on_depletion = TRUE + common_loot = list( + /obj/item/bone, + /obj/item/bone/skull, + /obj/item/bone/skull/tajaran, + /obj/item/bone/skull/unathi, + /obj/item/bone/skull/unknown, + /obj/item/bone/leg, + /obj/item/bone/arm, + /obj/item/bone/ribs, + ) + uncommon_loot = list( + /obj/item/coin/gold, + /obj/item/coin/silver, + /obj/item/deck/tarot, + /obj/item/flame/lighter/zippo/gold, + /obj/item/flame/lighter/zippo/black, + /obj/item/material/knife/tacknife/survival, + /obj/item/material/knife/tacknife/combatknife, + /obj/item/material/knife/machete/hatchet, + /obj/item/material/knife/butch, + /obj/item/storage/wallet/random, + /obj/item/clothing/accessory/bracelet/material/gold, + /obj/item/clothing/accessory/bracelet/material/silver, + /obj/item/clothing/accessory/locket, + /obj/item/clothing/accessory/poncho/blue, + /obj/item/clothing/shoes/boots/cowboy, + /obj/item/clothing/suit/storage/toggle/bomber, + /obj/item/clothing/under/frontier, + /obj/item/clothing/under/overalls, + /obj/item/clothing/under/pants/classicjeans/ripped, + /obj/item/clothing/under/sl_suit + ) + rare_loot = list( + /obj/item/storage/belt/utility/alien/full, + /obj/item/gun/projectile/revolver, + /obj/item/gun/projectile/sec, + /obj/item/gun/launcher/crossbow + ) + +// Surface drone loot +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Since the actual drone loot is a bit stupid in how it is handled, this is a sparse and empty list with items I don't exactly want in it. But until we can get the proper items in . . . +/datum/element/lootable/surface/drone + common_loot = list( + /obj/random/tool, + /obj/item/stack/cable_coil/random, + /obj/random/tank, + /obj/random/tech_supply/component, + /obj/item/stack/material/steel{amount = 25}, + /obj/item/stack/material/glass{amount = 10}, + /obj/item/stack/material/plasteel{amount = 5}, + /obj/item/cell, + /obj/item/material/shard + ) + + uncommon_loot = list( + /obj/item/cell/high, + /obj/item/robot_parts/robot_component/actuator, + /obj/item/robot_parts/robot_component/armour, + /obj/item/robot_parts/robot_component/binary_communication_device, + /obj/item/robot_parts/robot_component/camera, + /obj/item/robot_parts/robot_component/diagnosis_unit, + /obj/item/robot_parts/robot_component/radio + ) + + rare_loot = list( + /obj/item/cell/super, + /obj/item/borg/upgrade/utility/restart, + /obj/item/borg/upgrade/advanced/jetpack, + /obj/item/borg/upgrade/restricted/tasercooler, + /obj/item/borg/upgrade/basic/syndicate, + /obj/item/borg/upgrade/basic/vtec + ) diff --git a/code/datums/elements/lootable/trash.dm b/code/datums/elements/lootable/trash.dm new file mode 100644 index 0000000000..6ce7fe9524 --- /dev/null +++ b/code/datums/elements/lootable/trash.dm @@ -0,0 +1,156 @@ +// Special loot pile that uses gamma items. These spawn only once! +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/datum/element/lootable/trash_pile + chance_uncommon = 20 + chance_rare = 2 + chance_gamma = 1 // Special single drop table + + common_loot = list( + /obj/item/clothing/gloves/rainbow, + /obj/item/clothing/gloves/white, + /obj/item/storage/backpack, + /obj/item/storage/backpack/satchel/norm, + /obj/item/storage/box, + // /obj/random/cigarettes, + /obj/item/broken_device/random, + /obj/item/clothing/head/hardhat, + /obj/item/clothing/mask/breath, + /obj/item/clothing/shoes/black, + /obj/item/clothing/shoes/black, + /obj/item/clothing/shoes/laceup, + /obj/item/clothing/shoes/laceup/brown, + /obj/item/clothing/suit/storage/hazardvest, + /obj/item/clothing/under/color/grey, + /obj/item/clothing/suit/caution, + /obj/item/cell, + /obj/item/cell/device, + /obj/item/reagent_containers/food/snacks/liquidfood, + /obj/item/spacecash/c1, + /obj/item/storage/backpack/satchel, + /obj/item/storage/briefcase, + /obj/item/clothing/accessory/storage/webbing, + /obj/item/clothing/glasses/meson, + /obj/item/clothing/gloves/botanic_leather, + /obj/item/clothing/head/hardhat/red, + /obj/item/clothing/mask/gas, + /obj/item/clothing/suit/storage/apron, + /obj/item/clothing/suit/storage/toggle/bomber, + /obj/item/clothing/suit/storage/toggle/brown_jacket, + /obj/item/clothing/suit/storage/toggle/hoodie/black, + /obj/item/clothing/suit/storage/toggle/hoodie/blue, + /obj/item/clothing/suit/storage/toggle/hoodie/red, + /obj/item/clothing/suit/storage/toggle/hoodie/yellow, + /obj/item/clothing/suit/storage/toggle/leather_jacket, + /obj/item/pda, + /obj/item/radio/headset, + /obj/item/camera_assembly, + /obj/item/clothing/head/cone, + /obj/item/cell/high, + /obj/item/spacecash/c10, + /obj/item/spacecash/c20, + /obj/item/storage/backpack/dufflebag, + /obj/item/storage/box/donkpockets, + /obj/item/storage/box/mousetraps, + /obj/item/storage/wallet) + + uncommon_loot = list( + /obj/item/clothing/glasses/meson/prescription, + /obj/item/clothing/gloves/fyellow, + /obj/item/clothing/gloves/sterile/latex, + /obj/item/clothing/head/welding, + /obj/item/clothing/mask/gas/half, + /obj/item/clothing/shoes/galoshes, + /obj/item/clothing/under/pants/camo, + /obj/item/clothing/under/syndicate/tacticool, + /obj/item/clothing/under/hyperfiber, + /obj/item/camera, + /obj/item/flashlight/flare, + /obj/item/flashlight/glowstick, + /obj/item/flashlight/glowstick/blue, + /obj/item/card/emag_broken, + /obj/item/cell/super, + /obj/item/poster, + /obj/item/reagent_containers/glass/rag, + /obj/item/storage/box/sinpockets, + /obj/item/storage/secure/briefcase, + /obj/item/clothing/under/fluff/latexmaid, + /obj/item/toy/tennis, + /obj/item/toy/tennis/red, + /obj/item/toy/tennis/yellow, + /obj/item/toy/tennis/green, + /obj/item/toy/tennis/cyan, + /obj/item/toy/tennis/blue, + /obj/item/toy/tennis/purple, + /obj/item/toy/baseball, + /obj/item/storage/box/brainzsnax, + /obj/item/storage/box/brainzsnax/red, + /obj/item/clothing/glasses/sunglasses, + /obj/item/clothing/glasses/sunglasses/bigshot, + /obj/item/clothing/glasses/welding, + /obj/item/clothing/gloves/yellow, + /obj/item/clothing/head/bio_hood/general, + /obj/item/clothing/head/ushanka, + /obj/item/clothing/shoes/syndigaloshes, + /obj/item/clothing/suit/bio_suit/general, + /obj/item/clothing/suit/space/emergency, + /obj/item/clothing/under/harness, + /obj/item/clothing/under/tactical, + /obj/item/clothing/suit/armor/material/makeshift, + /obj/item/flashlight/glowstick/orange, + /obj/item/flashlight/glowstick/red, + /obj/item/flashlight/glowstick/yellow, + /obj/item/flashlight/pen, + /obj/item/paicard, + /obj/item/clothing/accessory/permit/gun, + /obj/item/clothing/mask/gas/voice, + /obj/item/spacecash/c100, + /obj/item/spacecash/c50, + /obj/item/storage/backpack/dufflebag/syndie, + /obj/item/storage/box/cups) + + rare_loot = list( + /obj/item/pizzavoucher, + /obj/item/storage/pill_bottle/paracetamol, + /obj/item/storage/pill_bottle/happy, + /obj/item/storage/pill_bottle/zoom, + /obj/item/seeds/ambrosiavulgarisseed, + /obj/item/gun/energy/sizegun, + /obj/item/slow_sizegun, + /obj/item/clothing/accessory/collar/shock/bluespace, + /obj/item/cracker, + /obj/item/material/butterfly, + /obj/item/material/butterfly/switchblade, + /obj/item/clothing/accessory/knuckledusters, + /obj/item/clothing/gloves/heavy_engineer, + /obj/item/reagent_containers/syringe/drugs, + /obj/item/reagent_containers/syringe/old, + /obj/item/implanter/sizecontrol, + /obj/item/handcuffs/fuzzy, + /obj/item/handcuffs/legcuffs/fuzzy, + /obj/item/storage/box/syndie_kit/spy, + /obj/item/grenade/anti_photon, + /obj/item/clothing/under/hyperfiber/bluespace, + /obj/item/selectable_item/chemistrykit/size, + /obj/item/selectable_item/chemistrykit/gender, + /obj/item/clothing/gloves/bluespace/emagged, + /obj/item/reagent_containers/glass/beaker/vial/sustenance, + /obj/item/clothing/suit/storage/vest/heavy/merc, + /obj/item/nif/bad, + /obj/item/radio_jammer, + /obj/item/sleevemate, + /obj/item/bodysnatcher, + /obj/item/beartrap, + /obj/item/cell/hyper/empty, + /obj/item/disk/nifsoft/compliance, + /obj/item/implanter/compliance, + /obj/item/material/knife/tacknife, + /obj/item/storage/box/survival/space, + /obj/item/storage/secure/briefcase/trashmoney, + /obj/item/survivalcapsule/popcabin, + /obj/item/reagent_containers/syringe/steroid, + /obj/item/capture_crystal, + /obj/item/perfect_tele/one_beacon, + /obj/item/clothing/gloves/bluespace, + /obj/item/gun/energy/mouseray, + /obj/item/clothing/accessory/collar/shock/bluespace/modified, + /obj/item/gun/energy/sizegun/backfire) diff --git a/code/game/objects/structures/loot_piles.dm b/code/game/objects/structures/loot_piles.dm index ef8370ecd2..086685662f 100644 --- a/code/game/objects/structures/loot_piles.dm +++ b/code/game/objects/structures/loot_piles.dm @@ -22,24 +22,11 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh density = FALSE anchored = TRUE unacidable = TRUE - var/list/icon_states_to_use = list() // List of icon states the pile can choose from on initialization. If empty or null, it will stay the initial icon_state. - var/list/searched_by = list() // Keys that have searched this loot pile, with values of searched time. - var/allow_multiple_looting = FALSE // If true, the same person can loot multiple times. Mostly for debugging. + var/list/searchedby = list() // Keys that have searched this loot pile, with values of searched time. var/busy = FALSE // Used so you can't spamclick to loot. - - var/chance_nothing = 0 // Unlucky people might need to loot multiple spots to find things. - - var/chance_uncommon = 10 // Probability of pulling from the uncommon_loot list. - var/chance_rare = 1 // Ditto, but for rare_loot list. - var/loot_depletion = FALSE // If true, loot piles can be 'depleted' after a certain number of searches by different players, where no more loot can be obtained. - var/loot_left = 0 // When this reaches zero, and loot_depleted is true, you can't obtain anymore loot. - var/delete_on_depletion = FALSE // If true, and if the loot gets depleted as above, the pile is deleted. - - var/list/common_loot = list() // Common is generally less-than-useful junk and filler, at least for maint loot piles. - var/list/uncommon_loot = list() // Uncommon is actually maybe some useful items, usually the reason someone bothers looking inside. - var/list/rare_loot = list() // Rare is really powerful, or at least unique items. + var/loot_element_path = null /obj/structure/loot_pile/attack_ai(var/mob/user) if(isrobot(user) && Adjacent(user)) @@ -59,704 +46,106 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh //Do the searching busy = TRUE if(do_after(user,rand(4 SECONDS,6 SECONDS),src)) - // The loot's all gone. - if(loot_depletion && loot_left <= 0) - to_chat(L, span_warning("\The [src] has been picked clean.")) - busy = FALSE - return - - //You already searched this one - if( (user.ckey in searched_by) && !allow_multiple_looting) - to_chat(L, span_warning("You can't find anything else vaguely useful in \the [src]. Another set of eyes might, however.")) - busy = FALSE - return - - // You got unlucky. - if(chance_nothing && prob(chance_nothing)) - to_chat(L, span_warning("Nothing in this pile really catches your eye...")) - searched_by |= user.ckey - busy = FALSE - return - - // You found something! - var/obj/item/loot = null - var/span = "notice" // Blue - - if(prob(chance_rare) && rare_loot.len) // You won THE GRAND PRIZE! - loot = produce_rare_item() - span = "cult" // Purple and bold. - - else if(prob(chance_uncommon) && uncommon_loot.len) // Otherwise you might still get something good. - loot = produce_uncommon_item() - span = "alium" // Green - - else // Welp. - loot = produce_common_item() - - //VOREstation edit - Randomized map objects were put in loot piles, so handle them... - if(istype(loot,/obj/random)) - var/obj/random/randy = loot - var/new_I = randy.spawn_item() - qdel(loot) - loot = new_I // swap it - //VOREstation edit end - - if(loot) - searched_by |= user.ckey - loot.forceMove(get_turf(src)) - var/final_message = "You found \a [loot]!" - switch(span) - if("notice") - final_message = span_notice(final_message) - if("cult") - final_message = span_cult(final_message) - if("alium") - final_message = span_alium(final_message) - to_chat(L, span_info(final_message)) - if(loot_depletion) - loot_left-- - if(loot_left <= 0) - to_chat(L, span_warning("You seem to have gotten the last of the spoils inside \the [src].")) - if(delete_on_depletion) - qdel(src) - + SEND_SIGNAL(src,COMSIG_LOOT_REWARD,L,searchedby) busy = FALSE else return ..() -/obj/structure/loot_pile/proc/produce_common_item() - var/path = pick(common_loot) - return new path(src) - -/obj/structure/loot_pile/proc/produce_uncommon_item() - var/path = pick(uncommon_loot) - return new path(src) - -/obj/structure/loot_pile/proc/produce_rare_item() - var/path = pick(rare_loot) - return new path(src) - /obj/structure/loot_pile/Initialize(mapload) if(icon_states_to_use && icon_states_to_use.len) icon_state = pick(icon_states_to_use) . = ..() + if(loot_element_path) + AddElement(loot_element_path) -// Has large amounts of possible items, most of which may or may not be useful. + +// Maintenance junk piles with common to fun loot /obj/structure/loot_pile/maint/junk name = "pile of junk" desc = "Lots of junk lying around. They say one man's trash is another man's treasure." icon_states_to_use = list("junk_pile1", "junk_pile2", "junk_pile3", "junk_pile4", "junk_pile5") + loot_element_path = /datum/element/lootable/maint/junk - common_loot = list( - /obj/item/flashlight/flare, - /obj/item/flashlight/glowstick, - /obj/item/flashlight/glowstick/blue, - /obj/item/flashlight/glowstick/orange, - /obj/item/flashlight/glowstick/red, - /obj/item/flashlight/glowstick/yellow, - /obj/item/flashlight/pen, - /obj/item/cell, - /obj/item/cell/device, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas/half, - /obj/item/clothing/mask/breath, - /obj/item/reagent_containers/glass/rag, - /obj/item/reagent_containers/food/snacks/liquidfood, - /obj/item/storage/secure/briefcase, - /obj/item/storage/briefcase, - /obj/item/storage/backpack, - /obj/item/storage/backpack/satchel/norm, - /obj/item/storage/backpack/satchel, - /obj/item/storage/backpack/dufflebag, - /obj/item/storage/box, - /obj/item/storage/wallet, - /obj/item/clothing/shoes/galoshes, - /obj/item/clothing/shoes/black, - /obj/item/clothing/shoes/laceup, - /obj/item/clothing/shoes/laceup/grey, - /obj/item/clothing/shoes/laceup/brown, - /obj/item/clothing/gloves/botanic_leather, - /obj/item/clothing/gloves/sterile/latex, - /obj/item/clothing/gloves/white, - /obj/item/clothing/gloves/rainbow, - /obj/item/clothing/gloves/fyellow, - /obj/item/clothing/glasses/sunglasses, - /obj/item/clothing/glasses/meson, - /obj/item/clothing/glasses/meson/prescription, - /obj/item/clothing/glasses/welding, - /obj/item/clothing/head/bio_hood/general, - /obj/item/clothing/head/hardhat, - /obj/item/clothing/head/hardhat/red, - /obj/item/clothing/head/ushanka, - /obj/item/clothing/head/welding, - /obj/item/clothing/suit/storage/hazardvest, - /obj/item/clothing/suit/space/emergency, - /obj/item/clothing/suit/storage/toggle/bomber, - /obj/item/clothing/suit/bio_suit/general, - /obj/item/clothing/suit/storage/toggle/hoodie/black, - /obj/item/clothing/suit/storage/toggle/hoodie/blue, - /obj/item/clothing/suit/storage/toggle/hoodie/red, - /obj/item/clothing/suit/storage/toggle/hoodie/yellow, - /obj/item/clothing/suit/storage/toggle/brown_jacket, - /obj/item/clothing/suit/storage/toggle/leather_jacket, - /obj/item/clothing/suit/storage/apron, - /obj/item/clothing/under/color/grey, - /obj/item/clothing/under/syndicate/tacticool, - /obj/item/clothing/under/pants/camo, - /obj/item/clothing/under/harness, - /obj/item/clothing/accessory/storage/webbing, - /obj/item/spacecash/c1, - /obj/item/spacecash/c5, - /obj/item/spacecash/c10, - /obj/item/spacecash/c20, - /obj/item/camera_assembly, - /obj/item/clothing/suit/caution, - /obj/item/clothing/head/cone, - /obj/item/card/emag_broken, - /obj/item/camera, - /obj/item/pda, - /obj/item/radio/headset, - /obj/item/paicard, - /obj/item/reagent_containers/hypospray/autoinjector/biginjector/glucose, - /obj/item/reagent_containers/syringe/old - ) - - uncommon_loot = list( - /obj/item/clothing/shoes/syndigaloshes, - /obj/item/clothing/gloves/yellow, - /obj/item/clothing/under/tactical, - /obj/item/beartrap, - /obj/item/clothing/suit/storage/vest/press, - /obj/item/material/knife/tacknife, - /obj/item/material/butterfly/switchblade - ) - - rare_loot = list( - /obj/item/clothing/suit/storage/vest/heavy/merc, - /obj/item/clothing/shoes/boots/combat, - ) - -// Contains mostly useless garbage. /obj/structure/loot_pile/maint/trash name = "pile of trash" desc = "Lots of garbage in one place. Might be able to find something if you're in the mood for dumpster diving." icon_states_to_use = list("trash_pile1", "trash_pile2") + loot_element_path = /datum/element/lootable/maint/trash - common_loot = list( - /obj/item/trash/candle, - /obj/item/trash/candy, - /obj/item/trash/candy/proteinbar, - /obj/item/trash/candy/gums, - /obj/item/trash/cheesie, - /obj/item/trash/chips, - /obj/item/trash/chips/bbq, - /obj/item/trash/liquidfood, - /obj/item/trash/pistachios, - /obj/item/trash/plate, - /obj/item/trash/popcorn, - /obj/item/trash/raisins, - /obj/item/trash/semki, - /obj/item/trash/snack_bowl, - /obj/item/trash/sosjerky, - /obj/item/trash/syndi_cakes, - /obj/item/trash/tastybread, - /obj/item/trash/coffee, - /obj/item/trash/tray, - /obj/item/trash/unajerky, - /obj/item/trash/waffles, - /obj/item/reagent_containers/food/snacks/xenomeat/spidermeat, - /obj/item/reagent_containers/food/snacks/mysterysoup, - /obj/item/reagent_containers/food/snacks/old/hotdog, - /obj/item/pizzabox/old, - /obj/item/ammo_casing/spent, - /obj/item/stack/rods{amount = 5}, - /obj/item/stack/material/steel{amount = 5}, - /obj/item/stack/material/cardboard{amount = 5}, - /obj/item/poster, - /obj/item/poster/custom, - /obj/item/newspaper, - /obj/item/paper/crumpled, - /obj/item/paper/crumpled/bloody, - /obj/item/reagent_containers/syringe/old - ) - - uncommon_loot = list( - /obj/item/reagent_containers/syringe/steroid, - /obj/item/storage/pill_bottle/zoom, - /obj/item/storage/pill_bottle/happy, - /obj/item/storage/pill_bottle/paracetamol //VOREStation Edit - ) - -// Contains loads of different types of boxes, which may have items inside! /obj/structure/loot_pile/maint/boxfort name = "pile of boxes" desc = "A large pile of boxes sits here." density = TRUE icon_states_to_use = list("boxfort") + loot_element_path = /datum/element/lootable/boxes - common_loot = list( - /obj/item/storage/box, - /obj/item/storage/box/beakers, - /obj/item/storage/box/botanydisk, - /obj/item/storage/box/cups, - /obj/item/storage/box/disks, - /obj/item/storage/box/donkpockets, - /obj/item/storage/box/donut, - /obj/item/storage/box/donut/empty, - /obj/item/storage/box/evidence, - /obj/item/storage/box/lights/mixed, - /obj/item/storage/box/lights/tubes, - /obj/item/storage/box/lights/bulbs, - /obj/item/storage/box/injectors, - /obj/item/storage/box/masks, - /obj/item/storage/box/ids, - /obj/item/storage/box/mousetraps, - /obj/item/storage/box/syringes, - /obj/item/storage/box/survival, - /obj/item/storage/box/gloves, - /obj/item/storage/box/PDAs - ) - - uncommon_loot = list( - /obj/item/storage/box/sinpockets, - /obj/item/ammo_magazine/ammo_box/b12g/practice, - /obj/item/ammo_magazine/ammo_box/b12g/blank, - /obj/item/storage/box/smokes, - /obj/item/storage/box/metalfoam, - /obj/item/storage/box/handcuffs, - /obj/item/storage/box/seccarts, - /obj/item/storage/box/old_syringes, - ) - - rare_loot = list( - /obj/item/storage/box/flashbangs, - /obj/item/storage/box/empslite, - /obj/item/ammo_magazine/ammo_box/b12g/flash, - /obj/item/ammo_magazine/ammo_box/b12g/stunshell, - /obj/item/storage/box/teargas - ) - -// One of the more useful maint piles, contains electrical components. /obj/structure/loot_pile/maint/technical name = "broken machine" desc = "A destroyed machine with unknown purpose, and doesn't look like it can be fixed. It might still have some functional components?" density = TRUE icon_states_to_use = list("technical_pile1", "technical_pile2", "technical_pile3") - - common_loot = list( - /obj/item/stock_parts/gear, - /obj/item/stock_parts/console_screen, - /obj/item/stock_parts/spring, - /obj/item/stock_parts/capacitor, - /obj/item/stock_parts/capacitor/adv, - /obj/item/stock_parts/capacitor/super, - /obj/item/stock_parts/manipulator, - /obj/item/stock_parts/manipulator/nano, - /obj/item/stock_parts/manipulator/pico, - /obj/item/stock_parts/matter_bin, - /obj/item/stock_parts/matter_bin/adv, - /obj/item/stock_parts/matter_bin/super, - /obj/item/stock_parts/scanning_module, - /obj/item/stock_parts/scanning_module/adv, - /obj/item/stock_parts/scanning_module/phasic, - /obj/item/stock_parts/subspace/amplifier, - /obj/item/stock_parts/subspace/analyzer, - /obj/item/stock_parts/subspace/ansible, - /obj/item/stock_parts/subspace/crystal, - /obj/item/stock_parts/subspace/sub_filter, - /obj/item/stock_parts/subspace/transmitter, - /obj/item/stock_parts/subspace/treatment, - /obj/item/frame, - /obj/item/broken_device/random, - /obj/item/borg/upgrade/utility/restart, - /obj/item/cell, - /obj/item/cell/high, - /obj/item/cell/device, - /obj/item/circuitboard/broken, - /obj/item/circuitboard/arcade, - /obj/item/circuitboard/autolathe, - /obj/item/circuitboard/atmos_alert, - /obj/item/circuitboard/airalarm, - /obj/item/circuitboard/fax, - /obj/item/circuitboard/jukebox, - /obj/item/circuitboard/batteryrack, - /obj/item/circuitboard/message_monitor, - /obj/item/circuitboard/rcon_console, - /obj/item/smes_coil, - /obj/item/cartridge/engineering, - /obj/item/analyzer, - /obj/item/healthanalyzer, - /obj/item/extrapolator, - /obj/item/gene_scanner, - /obj/item/robotanalyzer, - /obj/item/lightreplacer, - /obj/item/radio, - /obj/item/hailer, - /obj/item/gps, - /obj/item/geiger, - /obj/item/mass_spectrometer, - /obj/item/tool/wrench, - /obj/item/tool/screwdriver, - /obj/item/tool/wirecutters, - /obj/item/mining_scanner/advanced, - /obj/item/multitool, - /obj/item/mecha_parts/mecha_equipment/generator, - /obj/item/mecha_parts/mecha_equipment/tool/cable_layer, - /obj/item/mecha_parts/mecha_equipment/tool/drill, - /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp, - /obj/item/mecha_parts/mecha_equipment/tool/passenger, - /obj/item/mecha_parts/mecha_equipment/tool/sleeper, - /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun, - /obj/item/robot_parts/robot_component/binary_communication_device, - /obj/item/robot_parts/robot_component/armour, - /obj/item/robot_parts/robot_component/actuator, - /obj/item/robot_parts/robot_component/camera, - /obj/item/robot_parts/robot_component/diagnosis_unit, - /obj/item/robot_parts/robot_component/radio - ) - - uncommon_loot = list( - /obj/item/cell/super, - /obj/item/cell/device/weapon, - /obj/item/circuitboard/security, - /obj/item/circuitboard/crew, - /obj/item/aiModule/reset, - /obj/item/smes_coil/super_capacity, - /obj/item/smes_coil/super_io, - /obj/item/cartridge/captain, - /obj/item/disk/integrated_circuit/upgrade/advanced, - /obj/item/tvcamera, - /obj/item/universal_translator, - /obj/item/aicard, - /obj/item/borg/upgrade/advanced/jetpack, - /obj/item/borg/upgrade/advanced/advhealth, - /obj/item/borg/upgrade/basic/vtec, - /obj/item/borg/upgrade/restricted/tasercooler, - /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, - /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill, - /obj/item/rig_module/device/drill, - /obj/item/rig_module/device/plasmacutter, - /obj/item/rig_module/device/healthscanner, - /obj/item/rig_module/device/orescanner, - /obj/item/rig_module/device/anomaly_scanner, - /obj/item/rig_module/datajack, - /obj/item/rig_module/vision/medhud, - /obj/item/rig_module/vision/meson, - /obj/item/rig_module/vision/sechud, - /obj/item/rig_module/sprinter - ) - - rare_loot = list( - /obj/item/cell/hyper, - /obj/item/aiModule/freeform, - /obj/item/aiModule/asimov, - /obj/item/aiModule/paladin, - /obj/item/aiModule/safeguard, - /obj/item/disposable_teleporter, - /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay - ) + loot_element_path = /datum/element/lootable/maint/technical -// Surface base type -/obj/structure/loot_pile/surface - // Surface loot piles are considerably harder and more dangerous to reach, so you're more likely to get rare things. - chance_uncommon = 20 - chance_rare = 5 - loot_depletion = TRUE - loot_left = 5 // This is to prevent people from asking the whole station to go down to some alien ruin to get massive amounts of phat lewt. - -// Base type for alien piles. +// Surface piles for POIs, most have rarer loot /obj/structure/loot_pile/surface/alien name = "alien pod" desc = "A pod which looks bigger on the inside. Something quite shiny might be inside?" icon_state = "alien_pile1" - -/obj/structure/loot_pile/surface/alien - common_loot = list( - /obj/item/prop/alien/junk - ) - -// May contain alien tools. + loot_element_path = /datum/element/lootable/surface/alien /obj/structure/loot_pile/surface/alien/engineering - uncommon_loot = list( - /obj/item/multitool/alien, - /obj/item/stack/cable_coil/alien, - /obj/item/tool/crowbar/alien, - /obj/item/tool/screwdriver/alien, - /obj/item/weldingtool/alien, - /obj/item/tool/wirecutters/alien, - /obj/item/tool/wrench/alien - ) - rare_loot = list( - /obj/item/storage/belt/utility/alien/full - ) - -// May contain alien surgery equipment or powerful medication. + loot_element_path = /datum/element/lootable/surface/alien/engineering /obj/structure/loot_pile/surface/alien/medical - uncommon_loot = list( - /obj/item/surgical/FixOVein/alien, - /obj/item/surgical/bone_clamp/alien, - /obj/item/surgical/cautery/alien, - /obj/item/surgical/circular_saw/alien, - /obj/item/surgical/hemostat/alien, - /obj/item/surgical/retractor/alien, - /obj/item/surgical/scalpel/alien, - /obj/item/surgical/surgicaldrill/alien - ) - rare_loot = list( - /obj/item/storage/belt/medical/alien - ) - -// May contain powercells or alien weaponry. + loot_element_path = /datum/element/lootable/surface/alien/medical /obj/structure/loot_pile/surface/alien/security - uncommon_loot = list( - /obj/item/cell/device/weapon/recharge/alien, - /obj/item/clothing/suit/armor/alien, - /obj/item/clothing/head/helmet/alien - ) - rare_loot = list( - /obj/item/clothing/suit/armor/alien/tank, - /obj/item/gun/energy/alien - ) - -// The pile found at the very end, and as such has the best loot. + loot_element_path = /datum/element/lootable/surface/alien/security /obj/structure/loot_pile/surface/alien/end - chance_uncommon = 30 - chance_rare = 10 - - common_loot = list( - /obj/item/multitool/alien, - /obj/item/stack/cable_coil/alien, - /obj/item/tool/crowbar/alien, - /obj/item/tool/screwdriver/alien, - /obj/item/weldingtool/alien, - /obj/item/tool/wirecutters/alien, - /obj/item/tool/wrench/alien, - /obj/item/surgical/FixOVein/alien, - /obj/item/surgical/bone_clamp/alien, - /obj/item/surgical/cautery/alien, - /obj/item/surgical/circular_saw/alien, - /obj/item/surgical/hemostat/alien, - /obj/item/surgical/retractor/alien, - /obj/item/surgical/scalpel/alien, - /obj/item/surgical/surgicaldrill/alien, - /obj/item/cell/device/weapon/recharge/alien, - /obj/item/clothing/suit/armor/alien, - /obj/item/clothing/head/helmet/alien, - /obj/item/gun/energy/alien - ) - uncommon_loot = list( - /obj/item/storage/belt/medical/alien, - /obj/item/storage/belt/utility/alien/full, - /obj/item/clothing/suit/armor/alien/tank, - /obj/item/clothing/head/helmet/alien/tank, - ) + loot_element_path = /datum/element/lootable/surface/alien/end /obj/structure/loot_pile/surface/bones name = "bone pile" desc = "A pile of various dusty bones. Your graverobbing instincts tell you there might be valuables here." icon = 'icons/obj/bones.dmi' icon_state = "bonepile" - delete_on_depletion = TRUE + loot_element_path = /datum/element/lootable/surface/bones - common_loot = list( - /obj/item/bone, - /obj/item/bone/skull, - /obj/item/bone/skull/tajaran, - /obj/item/bone/skull/unathi, - /obj/item/bone/skull/unknown, - /obj/item/bone/leg, - /obj/item/bone/arm, - /obj/item/bone/ribs, - ) - uncommon_loot = list( - /obj/item/coin/gold, - /obj/item/coin/silver, - /obj/item/deck/tarot, - /obj/item/flame/lighter/zippo/gold, - /obj/item/flame/lighter/zippo/black, - /obj/item/material/knife/tacknife/survival, - /obj/item/material/knife/tacknife/combatknife, - /obj/item/material/knife/machete/hatchet, - /obj/item/material/knife/butch, - /obj/item/storage/wallet/random, - /obj/item/clothing/accessory/bracelet/material/gold, - /obj/item/clothing/accessory/bracelet/material/silver, - /obj/item/clothing/accessory/locket, - /obj/item/clothing/accessory/poncho/blue, - /obj/item/clothing/shoes/boots/cowboy, - /obj/item/clothing/suit/storage/toggle/bomber, - /obj/item/clothing/under/frontier, - /obj/item/clothing/under/overalls, - /obj/item/clothing/under/pants/classicjeans/ripped, - /obj/item/clothing/under/sl_suit - ) - rare_loot = list( - /obj/item/storage/belt/utility/alien/full, - /obj/item/gun/projectile/revolver, - /obj/item/gun/projectile/sec, - /obj/item/gun/launcher/crossbow - ) +/obj/structure/loot_pile/surface/drone + name = "drone wreckage" + desc = "The ruins of some unfortunate drone. Perhaps something is salvageable." + icon = 'icons/mob/animal.dmi' + icon_state = "drone_dead" + loot_element_path = /datum/element/lootable/surface/drone -// Subtype for mecha and mecha accessories. These might not always be on the surface. +// Mechaparts loot piles /obj/structure/loot_pile/mecha name = "pod wreckage" desc = "The ruins of some unfortunate pod. Perhaps something is salvageable." icon = 'icons/mecha/mecha.dmi' icon_state = "engineering_pod-broken" + loot_element_path = /datum/element/lootable/mecha density = TRUE anchored = FALSE // In case a dead mecha-mob dies in a bad spot. - chance_uncommon = 20 - chance_rare = 10 - - loot_depletion = TRUE - loot_left = 9 - - common_loot = list( - /obj/random/tool, - /obj/random/tool, - /obj/random/tool, - /obj/random/tool, - /obj/item/stack/cable_coil/random, - /obj/random/tank, - /obj/random/tech_supply/component, - /obj/random/tech_supply/component, - /obj/random/tech_supply/component, - /obj/effect/decal/remains/lizard, - /obj/effect/decal/remains/mouse, - /obj/effect/decal/remains/robot, - /obj/item/stack/material/steel{amount = 40} - ) - - uncommon_loot = list( - /obj/item/mecha_parts/mecha_equipment/weapon/energy/taser, - /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, - /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp, - /obj/item/mecha_parts/mecha_equipment/tool/drill, - /obj/item/mecha_parts/mecha_equipment/generator - ) - - rare_loot = list( - /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser, - /obj/item/mecha_parts/mecha_equipment/generator/nuclear, - /obj/item/mecha_parts/mecha_equipment/tool/jetpack - ) - -//Stuff you may find attached to a ripley. /obj/structure/loot_pile/mecha/ripley name = "ripley wreckage" desc = "The ruins of some unfortunate ripley. Perhaps something is salvageable." icon_state = "ripley-broken" - - common_loot = list( - /obj/random/tool, - /obj/item/stack/cable_coil/random, - /obj/random/tank, - /obj/random/tech_supply/component, - /obj/item/stack/material/steel{amount = 25}, - /obj/item/stack/material/glass{amount = 10}, - /obj/item/stack/material/plasteel{amount = 5}, - /obj/item/mecha_parts/chassis/ripley, - /obj/item/mecha_parts/part/ripley_torso, - /obj/item/mecha_parts/part/ripley_left_arm, - /obj/item/mecha_parts/part/ripley_right_arm, - /obj/item/mecha_parts/part/ripley_left_leg, - /obj/item/mecha_parts/part/ripley_right_leg, - /obj/item/kit/paint/ripley, - /obj/item/kit/paint/ripley/flames_red, - /obj/item/kit/paint/ripley/flames_blue - ) - - uncommon_loot = list( - /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp, - /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill, - /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster, - /obj/item/mecha_parts/mecha_equipment/tool/extinguisher, - ) - - rare_loot = list( - /obj/item/mecha_parts/mecha_equipment/gravcatapult, - /obj/item/mecha_parts/mecha_equipment/tool/rcd, - /obj/item/mecha_parts/mecha_equipment/weapon/energy/flamer/rigged - ) - + loot_element_path = /datum/element/lootable/mecha/ripley /obj/structure/loot_pile/mecha/ripley/firefighter icon_state = "firefighter-broken" - /obj/structure/loot_pile/mecha/ripley/random_sprite icon_states_to_use = list("ripley-broken", "firefighter-broken", "ripley-broken-old") -//Death-Ripley, same common, but more combat-exosuit-based /obj/structure/loot_pile/mecha/deathripley name = "strange ripley wreckage" icon_state = "deathripley-broken" - - common_loot = list( - /obj/random/tool, - /obj/item/stack/cable_coil/random, - /obj/random/tank, - /obj/random/tech_supply/component, - /obj/item/stack/material/steel{amount = 40}, - /obj/item/stack/material/glass{amount = 20}, - /obj/item/stack/material/plasteel{amount = 10}, - /obj/item/mecha_parts/chassis/ripley, - /obj/item/mecha_parts/part/ripley_torso, - /obj/item/mecha_parts/part/ripley_left_arm, - /obj/item/mecha_parts/part/ripley_right_arm, - /obj/item/mecha_parts/part/ripley_left_leg, - /obj/item/mecha_parts/part/ripley_right_leg, - /obj/item/kit/paint/ripley/death - ) - - uncommon_loot = list( - /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp/safety, - /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, - /obj/item/mecha_parts/mecha_equipment/repair_droid, - /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay - ) - - rare_loot = list( - /obj/item/mecha_parts/mecha_equipment/tool/rcd, - /obj/item/mecha_parts/mecha_equipment/wormhole_generator, - /obj/item/mecha_parts/mecha_equipment/weapon/energy/flamer/rigged - ) + loot_element_path = /datum/element/lootable/mecha/deathripley /obj/structure/loot_pile/mecha/odysseus name = "odysseus wreckage" desc = "The ruins of some unfortunate odysseus. Perhaps something is salvageable." icon_state = "odysseus-broken" - - common_loot = list( - /obj/random/tool, - /obj/item/stack/cable_coil/random, - /obj/random/tank, - /obj/random/tech_supply/component, - /obj/item/stack/material/steel{amount = 25}, - /obj/item/stack/material/glass{amount = 10}, - /obj/item/stack/material/plasteel{amount = 5}, - /obj/item/mecha_parts/chassis/odysseus, - /obj/item/mecha_parts/part/odysseus_head, - /obj/item/mecha_parts/part/odysseus_torso, - /obj/item/mecha_parts/part/odysseus_left_arm, - /obj/item/mecha_parts/part/odysseus_right_arm, - /obj/item/mecha_parts/part/odysseus_left_leg, - /obj/item/mecha_parts/part/odysseus_right_leg - ) - - uncommon_loot = list( - /obj/item/mecha_parts/mecha_equipment/tool/sleeper, - /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun, - /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flare, - /obj/item/mecha_parts/mecha_equipment/tool/extinguisher, - ) - - rare_loot = list( - /obj/item/mecha_parts/mecha_equipment/gravcatapult, - /obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster, - /obj/item/mecha_parts/mecha_equipment/shocker - ) - + loot_element_path = /datum/element/lootable/mecha/odysseus /obj/structure/loot_pile/mecha/odysseus/murdysseus icon_state = "murdysseus-broken" @@ -769,52 +158,14 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh name = "gygax wreckage" desc = "The ruins of some unfortunate gygax. Perhaps something is salvageable." icon_state = "gygax-broken" - - common_loot = list( - /obj/random/tool, - /obj/item/stack/cable_coil/random, - /obj/random/tank, - /obj/random/tech_supply/component, - /obj/item/stack/material/steel{amount = 25}, - /obj/item/stack/material/glass{amount = 10}, - /obj/item/stack/material/plasteel{amount = 5}, - /obj/item/mecha_parts/chassis/gygax, - /obj/item/mecha_parts/part/gygax_head, - /obj/item/mecha_parts/part/gygax_torso, - /obj/item/mecha_parts/part/gygax_left_arm, - /obj/item/mecha_parts/part/gygax_right_arm, - /obj/item/mecha_parts/part/gygax_left_leg, - /obj/item/mecha_parts/part/gygax_right_leg, - /obj/item/mecha_parts/part/gygax_armour - ) - - uncommon_loot = list( - /obj/item/mecha_parts/mecha_equipment/shocker, - /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/grenade, - /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser, - /obj/item/mecha_parts/mecha_equipment/weapon/energy/taser, - /obj/item/kit/paint/gygax, - /obj/item/kit/paint/gygax/darkgygax, - /obj/item/kit/paint/gygax/recitence - ) - - rare_loot = list( - /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay, - /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg, - /obj/item/mecha_parts/mecha_equipment/repair_droid, - /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy - ) - + loot_element_path = /datum/element/lootable/mecha/gygax /obj/structure/loot_pile/mecha/gygax/dark icon_state = "darkgygax-broken" - -// Todo: Better loot. /obj/structure/loot_pile/mecha/gygax/dark/adv icon_state = "darkgygax_adv-broken" icon_scale_x = 1.5 icon_scale_y = 1.5 pixel_y = 8 - /obj/structure/loot_pile/mecha/gygax/medgax icon_state = "medgax-broken" @@ -822,53 +173,17 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh name = "durand wreckage" desc = "The ruins of some unfortunate durand. Perhaps something is salvageable." icon_state = "durand-broken" + loot_element_path = /datum/element/lootable/mecha/durand - common_loot = list( - /obj/random/tool, - /obj/item/stack/cable_coil/random, - /obj/random/tank, - /obj/random/tech_supply/component, - /obj/item/stack/material/steel{amount = 25}, - /obj/item/stack/material/glass{amount = 10}, - /obj/item/stack/material/plasteel{amount = 5}, - /obj/item/mecha_parts/chassis/durand, - /obj/item/mecha_parts/part/durand_head, - /obj/item/mecha_parts/part/durand_torso, - /obj/item/mecha_parts/part/durand_left_arm, - /obj/item/mecha_parts/part/durand_right_arm, - /obj/item/mecha_parts/part/durand_left_leg, - /obj/item/mecha_parts/part/durand_right_leg, - /obj/item/mecha_parts/part/durand_armour - ) - - uncommon_loot = list( - /obj/item/mecha_parts/mecha_equipment/shocker, - /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/grenade, - /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser, - /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster, - /obj/item/kit/paint/durand, - /obj/item/kit/paint/durand/seraph, - /obj/item/kit/paint/durand/phazon - ) - - rare_loot = list( - /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay, - /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot, - /obj/item/mecha_parts/mecha_equipment/repair_droid, - /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy - ) - -/obj/structure/loot_pile/mecha/marauder +/obj/structure/loot_pile/mecha/marauder // Todo: Better loot. name = "marauder wreckage" desc = "The ruins of some unfortunate marauder. Perhaps something is salvagable." icon_state = "marauder-broken" - // Todo: Better loot. /obj/structure/loot_pile/mecha/marauder/seraph name = "seraph wreckage" desc = "The ruins of some unfortunate seraph. Perhaps something is salvagable." icon_state = "seraph-broken" - /obj/structure/loot_pile/mecha/marauder/mauler name = "mauler wreckage" desc = "The ruins of some unfortunate mauler. Perhaps something is salvagable." @@ -878,93 +193,19 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh name = "phazon wreckage" desc = "The ruins of some unfortunate phazon. Perhaps something is salvageable." icon_state = "phazon-broken" + loot_element_path = /datum/element/lootable/mecha/phazon - common_loot = list( - /obj/item/storage/toolbox/syndicate/powertools, - /obj/item/stack/material/plasteel{amount = 20}, - /obj/item/stack/material/durasteel{amount = 10}, - /obj/item/mecha_parts/chassis/phazon, - /obj/item/mecha_parts/part/phazon_head, - /obj/item/mecha_parts/part/phazon_torso, - /obj/item/mecha_parts/part/phazon_left_arm, - /obj/item/mecha_parts/part/phazon_right_arm, - /obj/item/mecha_parts/part/phazon_left_leg, - /obj/item/mecha_parts/part/phazon_right_leg - ) - uncommon_loot = list( - /obj/item/mecha_parts/mecha_equipment/shocker, - /obj/item/mecha_parts/mecha_equipment/weapon/energy/flamer/rigged, - /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy, - /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster - ) - - rare_loot = list( - /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay, - /obj/item/mecha_parts/mecha_equipment/weapon/energy/ion, - /obj/item/mecha_parts/mecha_equipment/repair_droid, - /obj/item/mecha_parts/mecha_equipment/teleporter - ) - -/obj/structure/loot_pile/surface/drone - name = "drone wreckage" - desc = "The ruins of some unfortunate drone. Perhaps something is salvageable." - icon = 'icons/mob/animal.dmi' - icon_state = "drone_dead" - -// Since the actual drone loot is a bit stupid in how it is handled, this is a sparse and empty list with items I don't exactly want in it. But until we can get the proper items in . . . - - common_loot = list( - /obj/random/tool, - /obj/item/stack/cable_coil/random, - /obj/random/tank, - /obj/random/tech_supply/component, - /obj/item/stack/material/steel{amount = 25}, - /obj/item/stack/material/glass{amount = 10}, - /obj/item/stack/material/plasteel{amount = 5}, - /obj/item/cell, - /obj/item/material/shard - ) - - uncommon_loot = list( - /obj/item/cell/high, - /obj/item/robot_parts/robot_component/actuator, - /obj/item/robot_parts/robot_component/armour, - /obj/item/robot_parts/robot_component/binary_communication_device, - /obj/item/robot_parts/robot_component/camera, - /obj/item/robot_parts/robot_component/diagnosis_unit, - /obj/item/robot_parts/robot_component/radio - ) - - rare_loot = list( - /obj/item/cell/super, - /obj/item/borg/upgrade/utility/restart, - /obj/item/borg/upgrade/advanced/jetpack, - /obj/item/borg/upgrade/restricted/tasercooler, - /obj/item/borg/upgrade/basic/syndicate, - /obj/item/borg/upgrade/basic/vtec - ) - -// Contains old mediciation, most of it unidentified and has a good chance of being useless. /obj/structure/loot_pile/surface/medicine_cabinet name = "abandoned medicine cabinet" desc = "An old cabinet, it might still have something of use inside." icon_state = "medicine_cabinet" density = FALSE - chance_uncommon = 0 - chance_rare = 0 + loot_element_path = /datum/element/lootable/expired_medicine - common_loot = list( - /obj/random/unidentified_medicine/old_medicine - ) - -// Like the above but has way better odds, in exchange for being in a place still inhabited (or was recently). /obj/structure/loot_pile/surface/medicine_cabinet/fresh name = "medicine cabinet" desc = "A cabinet designed to hold medicine, it might still have something of use inside." icon_state = "medicine_cabinet" density = FALSE - - common_loot = list( - /obj/random/unidentified_medicine/fresh_medicine - ) + loot_element_path = /datum/element/lootable/fresh_medicine diff --git a/code/game/objects/structures/trash_pile_vr.dm b/code/game/objects/structures/trash_pile_vr.dm index 9c435318b7..a08c2a8933 100644 --- a/code/game/objects/structures/trash_pile_vr.dm +++ b/code/game/objects/structures/trash_pile_vr.dm @@ -6,18 +6,11 @@ density = TRUE anchored = TRUE + var/busy = FALSE // Used so you can't spamclick to loot. var/list/searchedby = list()// Characters that have searched this trashpile, with values of searched time. var/mob/living/hider // A simple animal that might be hiding in the pile - var/obj/structure/mob_spawner/mouse_nest/mouse_nest = null - 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. - /obj/structure/trash_pile/Initialize(mapload) . = ..() icon_state = pick( @@ -33,6 +26,7 @@ "trashbag", "brokecomp") mouse_nest = new(src) + AddElement(/datum/element/lootable/trash_pile) AddElement(/datum/element/climbable) /obj/structure/trash_pile/Destroy() @@ -42,14 +36,12 @@ /obj/structure/trash_pile/attackby(obj/item/W as obj, mob/user as mob) var/w_type = W.type - if(w_type in GLOB.allocated_gamma) + if(w_type in GLOB.allocated_gamma_loot) to_chat(user,span_notice("You feel \the [W] slip from your hand, and disappear into the trash pile.")) user.unEquip(W) W.forceMove(src) - GLOB.allocated_gamma -= w_type - GLOB.unique_gamma += w_type + restore_gamma_loot(w_type) qdel(W) - else return ..() @@ -77,11 +69,9 @@ to_chat(user, span_warning("Spawning as a mouse is currently disabled.")) return - //VOREStation Add Start if(jobban_isbanned(user, JOB_GHOSTROLES)) to_chat(user, span_warning("You cannot become a mouse because you are banned from playing ghost roles.")) return - //VOREStation Add End if(!user.MayRespawn(1)) return @@ -119,224 +109,30 @@ //Human mob if(ishuman(user)) var/mob/living/carbon/human/H = user + + if(busy) + to_chat(H, span_warning("\The [src] is already being searched.")) + return + H.visible_message("[user] searches through \the [src].",span_notice("You search through \the [src].")) if(hider) to_chat(hider,span_warning("[user] is searching the trash pile you're in!")) //Do the searching + busy = TRUE if(do_after(user,rand(4 SECONDS,6 SECONDS),src)) - - //If there was a hider, chance to reveal them if(hider && prob(50)) + //If there was a hider, chance to reveal them to_chat(hider,span_danger("You've been discovered!")) hider.forceMove(get_turf(src)) hider = null to_chat(user,span_danger("Some sort of creature leaps out of \the [src]!")) - - //You already searched this one bruh - else if(user.ckey in searchedby) - to_chat(H,span_warning("There's nothing else for you in \the [src]!")) - - //You found an item! else - var/luck = rand(1,100) - var/obj/item/I - 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() - - //VOREstation edit - Randomized map objects were put in loot piles, so handle them... - if(istype(I,/obj/random)) - var/obj/random/randy = I - var/new_I = randy.spawn_item() - qdel(I) - I = new_I // swap it - //VOREstation edit end - - //We either have an item to hand over or we don't, at this point! - if(I) - searchedby += user.ckey - I.forceMove(get_turf(src)) - to_chat(H,span_notice("You found \a [I]!")) - + SEND_SIGNAL(src,COMSIG_LOOT_REWARD,user,searchedby) + busy = FALSE else return ..() -//Random lists -/obj/structure/trash_pile/proc/produce_alpha_item() - var/path = pick(prob(5);/obj/item/clothing/gloves/rainbow, - prob(5);/obj/item/clothing/gloves/white, - prob(5);/obj/item/storage/backpack, - prob(5);/obj/item/storage/backpack/satchel/norm, - prob(5);/obj/item/storage/box, - // prob(5);/obj/random/cigarettes, - prob(4);/obj/item/broken_device/random, - prob(4);/obj/item/clothing/head/hardhat, - prob(4);/obj/item/clothing/mask/breath, - prob(4);/obj/item/clothing/shoes/black, - prob(4);/obj/item/clothing/shoes/black, - prob(4);/obj/item/clothing/shoes/laceup, - prob(4);/obj/item/clothing/shoes/laceup/brown, - prob(4);/obj/item/clothing/suit/storage/hazardvest, - prob(4);/obj/item/clothing/under/color/grey, - prob(4);/obj/item/clothing/suit/caution, - prob(4);/obj/item/cell, - prob(4);/obj/item/cell/device, - prob(4);/obj/item/reagent_containers/food/snacks/liquidfood, - prob(4);/obj/item/spacecash/c1, - prob(4);/obj/item/storage/backpack/satchel, - prob(4);/obj/item/storage/briefcase, - prob(3);/obj/item/clothing/accessory/storage/webbing, - prob(3);/obj/item/clothing/glasses/meson, - prob(3);/obj/item/clothing/gloves/botanic_leather, - prob(3);/obj/item/clothing/head/hardhat/red, - prob(3);/obj/item/clothing/mask/gas, - prob(3);/obj/item/clothing/suit/storage/apron, - prob(3);/obj/item/clothing/suit/storage/toggle/bomber, - prob(3);/obj/item/clothing/suit/storage/toggle/brown_jacket, - prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/black, - prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/blue, - prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/red, - prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/yellow, - prob(3);/obj/item/clothing/suit/storage/toggle/leather_jacket, - prob(3);/obj/item/pda, - prob(3);/obj/item/radio/headset, - prob(3);/obj/item/camera_assembly, - prob(3);/obj/item/clothing/head/cone, - prob(3);/obj/item/cell/high, - prob(3);/obj/item/spacecash/c10, - prob(3);/obj/item/spacecash/c20, - prob(3);/obj/item/storage/backpack/dufflebag, - prob(3);/obj/item/storage/box/donkpockets, - prob(3);/obj/item/storage/box/mousetraps, - prob(3);/obj/item/storage/wallet, - prob(2);/obj/item/clothing/glasses/meson/prescription, - prob(2);/obj/item/clothing/gloves/fyellow, - prob(2);/obj/item/clothing/gloves/sterile/latex, - prob(2);/obj/item/clothing/head/welding, - prob(2);/obj/item/clothing/mask/gas/half, - prob(2);/obj/item/clothing/shoes/galoshes, - prob(2);/obj/item/clothing/under/pants/camo, - prob(2);/obj/item/clothing/under/syndicate/tacticool, - prob(2);/obj/item/clothing/under/hyperfiber, - prob(2);/obj/item/camera, - prob(2);/obj/item/flashlight/flare, - prob(2);/obj/item/flashlight/glowstick, - prob(2);/obj/item/flashlight/glowstick/blue, - prob(2);/obj/item/card/emag_broken, - prob(2);/obj/item/cell/super, - prob(2);/obj/item/poster, - prob(2);/obj/item/reagent_containers/glass/rag, - prob(2);/obj/item/storage/box/sinpockets, - prob(2);/obj/item/storage/secure/briefcase, - prob(2);/obj/item/clothing/under/fluff/latexmaid, - prob(2);/obj/item/toy/tennis, - prob(2);/obj/item/toy/tennis/red, - prob(2);/obj/item/toy/tennis/yellow, - prob(2);/obj/item/toy/tennis/green, - prob(2);/obj/item/toy/tennis/cyan, - prob(2);/obj/item/toy/tennis/blue, - prob(2);/obj/item/toy/tennis/purple, - prob(1);/obj/item/toy/baseball, - prob(1);/obj/item/storage/box/brainzsnax, - prob(1);/obj/item/storage/box/brainzsnax/red, - prob(1);/obj/item/clothing/glasses/sunglasses, - prob(1);/obj/item/clothing/glasses/sunglasses/bigshot, - prob(1);/obj/item/clothing/glasses/welding, - prob(1);/obj/item/clothing/gloves/yellow, - prob(1);/obj/item/clothing/head/bio_hood/general, - prob(1);/obj/item/clothing/head/ushanka, - prob(1);/obj/item/clothing/shoes/syndigaloshes, - prob(1);/obj/item/clothing/suit/bio_suit/general, - prob(1);/obj/item/clothing/suit/space/emergency, - prob(1);/obj/item/clothing/under/harness, - prob(1);/obj/item/clothing/under/tactical, - prob(1);/obj/item/clothing/suit/armor/material/makeshift, - prob(1);/obj/item/flashlight/glowstick/orange, - prob(1);/obj/item/flashlight/glowstick/red, - prob(1);/obj/item/flashlight/glowstick/yellow, - prob(1);/obj/item/flashlight/pen, - prob(1);/obj/item/paicard, - prob(1);/obj/item/clothing/accessory/permit/gun, - prob(1);/obj/item/clothing/mask/gas/voice, - prob(1);/obj/item/spacecash/c100, - prob(1);/obj/item/spacecash/c50, - prob(1);/obj/item/storage/backpack/dufflebag/syndie, - prob(1);/obj/item/storage/box/cups, - prob(1);/obj/item/pizzavoucher) - - var/obj/item/I = new path() - return I - -/obj/structure/trash_pile/proc/produce_beta_item() - var/path = pick(prob(6);/obj/item/storage/pill_bottle/paracetamol, - prob(4);/obj/item/storage/pill_bottle/happy, - prob(4);/obj/item/storage/pill_bottle/zoom, - prob(4);/obj/item/seeds/ambrosiavulgarisseed, - prob(4);/obj/item/gun/energy/sizegun, - prob(4);/obj/item/slow_sizegun, - prob(4);/obj/item/clothing/accessory/collar/shock/bluespace, - prob(3);/obj/item/cracker, - prob(3);/obj/item/material/butterfly, - prob(3);/obj/item/material/butterfly/switchblade, - prob(3);/obj/item/clothing/accessory/knuckledusters, - prob(3);/obj/item/clothing/gloves/heavy_engineer, - prob(3);/obj/item/reagent_containers/syringe/drugs, - prob(3);/obj/item/reagent_containers/syringe/old, - prob(2);/obj/item/implanter/sizecontrol, - prob(2);/obj/item/handcuffs/fuzzy, - prob(2);/obj/item/handcuffs/legcuffs/fuzzy, - prob(2);/obj/item/storage/box/syndie_kit/spy, - prob(2);/obj/item/grenade/anti_photon, - prob(2);/obj/item/clothing/under/hyperfiber/bluespace, - prob(2);/obj/item/selectable_item/chemistrykit/size, - prob(2);/obj/item/selectable_item/chemistrykit/gender, - prob(2);/obj/item/clothing/gloves/bluespace/emagged, - prob(2);/obj/item/reagent_containers/glass/beaker/vial/sustenance, - prob(1);/obj/item/clothing/suit/storage/vest/heavy/merc, - prob(1);/obj/item/nif/bad, - prob(1);/obj/item/radio_jammer, - prob(1);/obj/item/sleevemate, - prob(1);/obj/item/bodysnatcher, - prob(1);/obj/item/beartrap, - prob(1);/obj/item/cell/hyper/empty, - prob(1);/obj/item/disk/nifsoft/compliance, - prob(1);/obj/item/implanter/compliance, - prob(1);/obj/item/material/knife/tacknife, - prob(1);/obj/item/storage/box/survival/space, - prob(1);/obj/item/storage/secure/briefcase/trashmoney, - prob(1);/obj/item/survivalcapsule/popcabin, - prob(1);/obj/item/reagent_containers/syringe/steroid, - prob(1);/obj/item/capture_crystal, - prob(1);/obj/item/perfect_tele/one_beacon, - prob(1);/obj/item/clothing/gloves/bluespace, - prob(1);/obj/item/gun/energy/mouseray, - prob(1);/obj/item/clothing/accessory/collar/shock/bluespace/modified, - prob(1);/obj/item/gun/energy/sizegun/backfire) - - var/obj/item/I = new path() - return I - -/obj/structure/trash_pile/proc/produce_gamma_item() - var/path = pick_n_take(GLOB.unique_gamma) - if(!path) //Tapped out, reallocate? - for(var/P in GLOB.allocated_gamma) - var/obj/item/I = GLOB.allocated_gamma[P] - if(QDELETED(I) || istype(I.loc,/obj/machinery/computer/cryopod)) - GLOB.allocated_gamma -= P - path = P - break - - if(path) - var/obj/item/I = new path() - GLOB.allocated_gamma[path] = I - return I - else - return produce_beta_item() - /obj/structure/mob_spawner/mouse_nest name = "trash" desc = "A small heap of trash, perfect for mice and other pests to nest in." diff --git a/vorestation.dme b/vorestation.dme index 393b92fd31..4bd3e4bd65 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -658,6 +658,13 @@ #include "code\datums\elements\light_blocking.dm" #include "code\datums\elements\slosh.dm" #include "code\datums\elements\turf_transparency.dm" +#include "code\datums\elements\lootable\_lootable.dm" +#include "code\datums\elements\lootable\boxes.dm" +#include "code\datums\elements\lootable\maint.dm" +#include "code\datums\elements\lootable\mecha.dm" +#include "code\datums\elements\lootable\misc.dm" +#include "code\datums\elements\lootable\surface.dm" +#include "code\datums\elements\lootable\trash.dm" #include "code\datums\game_masters\_common.dm" #include "code\datums\helper_datums\construction_datum.dm" #include "code\datums\helper_datums\events.dm"