Looting element for trash piles and more (#17896)

* moved loot tables to element

* fixes

* fixes, and make trashpiles handle single search like loot piles

* cleanup

* var

* proper src

* generic replies

* typo
This commit is contained in:
Will
2025-07-16 18:50:22 -04:00
committed by GitHub
parent e012ce99fa
commit bb85116cb9
11 changed files with 1091 additions and 1011 deletions
+140
View File
@@ -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
+44
View File
@@ -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
)
+257
View File
@@ -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
)
+245
View File
@@ -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
)
+17
View File
@@ -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
)
+174
View File
@@ -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
)
+156
View File
@@ -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)