mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 02:56:14 +01:00
Unlucky trait (#18463)
* this compiles * more edits * Upports OP21's immovable rod Makes it NOT shit. * actually enable this lol * CLANG * we all fall down * break it * stairs * bye async * makes doorcrushes less lethal * more unluck! * dice and stumble vore * major version * Update clang.dm * More tweaks. BS Cracker Makes bluespace cracker better code quality too * Cut down on lists here * Adds the traits * glass shapnel * Update unlucky.dm * Modular Shock * Charger and thrown * Defib nat 1 * Gravity Falls * gibby * no longer gib, just hurt a LOT * Better Washer * Update washing_machine.dm * Even less jank * Moves some stuff around * linters * Update unlucky.dm * Table stubbing * fixes mirror break, evil only * PIPEBOMB * Update negative.dm * Update mail.dm * glasses fly off your face if you fall * Update unlucky.dm * evil beaker and spooky events in the dark * Evil beaker spilling * Unlucky people have custom maint loot * Get sick while searching * Update _lootable.dm * whoop * Update _lootable.dm * washer will always wash * Lowered to 5 * ash * Update areas.dm * get knocked * picking up items * Dice * Update unlucky.dm * Update code/game/objects/items/devices/defib.dm Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> * Update code/modules/economy/vending.dm Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> * Update code/game/area/areas.dm Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> * Update code/datums/components/traits/unlucky.dm Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> * Update code/datums/components/traits/unlucky.dm Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> * Update code/datums/components/traits/unlucky.dm Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> * Update code/datums/components/traits/unlucky.dm Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> * Nicer damage * these * this * mini DCS update * Excludes * Proper inherit * Update unlucky.dm * Update code/datums/components/traits/unlucky.dm * These * thes too * user * no hardrefs * only these 2 --------- Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
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/unlucky_loot = list() // Unlucky is the worst tier. Only people with the unlucky trait can get this stuff. Primed grenades, dangerous syringes, etc.
|
||||
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.
|
||||
@@ -47,7 +48,17 @@
|
||||
var/obj/item/loot = null
|
||||
var/span = "notice" // Blue
|
||||
|
||||
if(prob(chance_uncommon) && uncommon_loot.len) // You might still get something good.
|
||||
if(HAS_TRAIT(L, TRAIT_UNLUCKY) && unlucky_loot.len) // If you're unlucky, you will always find bad stuff.
|
||||
loot = produce_unlucky_item(source)
|
||||
span = "cult" // Purple and bold.
|
||||
if(prob(1))
|
||||
to_chat(L, span_danger("You cut your hand on something in the trash!"))
|
||||
L.apply_damage(2, BRUTE, pick(BP_L_HAND, BP_R_HAND), used_weapon = "sharp object")
|
||||
var/datum/disease/advance/random/random_disease = new /datum/disease/advance/random()
|
||||
random_disease.spread_flags |= DISEASE_SPREAD_NON_CONTAGIOUS
|
||||
L.ForceContractDisease(random_disease)
|
||||
|
||||
else if(prob(chance_uncommon) && uncommon_loot.len) // You might still get something good.
|
||||
loot = produce_uncommon_item(source)
|
||||
span = "alium" // Green
|
||||
|
||||
@@ -96,6 +107,9 @@
|
||||
if(delete_on_depletion)
|
||||
qdel(source)
|
||||
|
||||
/datum/element/lootable/proc/produce_unlucky_item(atom/source)
|
||||
var/path = pick(unlucky_loot)
|
||||
return new path(source)
|
||||
|
||||
/datum/element/lootable/proc/produce_common_item(atom/source)
|
||||
var/path = pick(common_loot)
|
||||
|
||||
@@ -1,6 +1,44 @@
|
||||
// Contains loads of different types of boxes, which may have items inside!
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/datum/element/lootable/boxes
|
||||
|
||||
unlucky_loot = list(
|
||||
/obj/item/grenade/flashbang/clusterbang/primed,
|
||||
/obj/item/storage/box/old_syringes,
|
||||
/obj/item/storage/box/donut/empty,
|
||||
/obj/item/grenade/smokebomb/primed,
|
||||
/obj/item/storage/box,
|
||||
/obj/item/storage/box/cups,
|
||||
/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/spacecash/c1,
|
||||
/obj/item/card/emag_broken,
|
||||
/obj/effect/decal/remains/lizard,
|
||||
/obj/effect/decal/remains/mouse,
|
||||
/obj/effect/decal/remains/robot,
|
||||
/obj/item/pizzabox/old,
|
||||
/obj/item/paper/crumpled
|
||||
)
|
||||
|
||||
common_loot = list(
|
||||
/obj/item/storage/box,
|
||||
/obj/item/storage/box/beakers,
|
||||
|
||||
@@ -1,6 +1,43 @@
|
||||
// Has large amounts of possible items, most of which may or may not be useful.
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/datum/element/lootable/maint/junk
|
||||
unlucky_loot = list(
|
||||
/obj/item/grenade/flashbang/clusterbang/primed,
|
||||
/obj/item/storage/box/old_syringes,
|
||||
/obj/item/storage/box/donut/empty,
|
||||
/obj/item/grenade/smokebomb/primed,
|
||||
/obj/item/storage/box,
|
||||
/obj/item/storage/box/cups,
|
||||
/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/spacecash/c1,
|
||||
/obj/item/card/emag_broken,
|
||||
/obj/effect/decal/remains/lizard,
|
||||
/obj/effect/decal/remains/mouse,
|
||||
/obj/effect/decal/remains/robot,
|
||||
/obj/item/pizzabox/old,
|
||||
/obj/item/paper/crumpled
|
||||
)
|
||||
|
||||
common_loot = list(
|
||||
/obj/item/flashlight/flare,
|
||||
/obj/item/flashlight/glowstick,
|
||||
@@ -94,6 +131,43 @@
|
||||
// Contains mostly useless garbage.
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/datum/element/lootable/maint/trash
|
||||
unlucky_loot = list(
|
||||
/obj/item/grenade/flashbang/clusterbang/primed,
|
||||
/obj/item/storage/box/old_syringes,
|
||||
/obj/item/storage/box/donut/empty,
|
||||
/obj/item/grenade/smokebomb/primed,
|
||||
/obj/item/storage/box,
|
||||
/obj/item/storage/box/cups,
|
||||
/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/spacecash/c1,
|
||||
/obj/item/card/emag_broken,
|
||||
/obj/effect/decal/remains/lizard,
|
||||
/obj/effect/decal/remains/mouse,
|
||||
/obj/effect/decal/remains/robot,
|
||||
/obj/item/pizzabox/old,
|
||||
/obj/item/paper/crumpled
|
||||
)
|
||||
|
||||
common_loot = list(
|
||||
/obj/item/trash/candle,
|
||||
/obj/item/trash/candy,
|
||||
|
||||
@@ -5,6 +5,43 @@
|
||||
chance_rare = 2
|
||||
chance_gamma = 1 // Special single drop table
|
||||
|
||||
unlucky_loot = list(
|
||||
/obj/item/grenade/flashbang/clusterbang/primed,
|
||||
/obj/item/storage/box/old_syringes,
|
||||
/obj/item/storage/box/donut/empty,
|
||||
/obj/item/grenade/smokebomb/primed,
|
||||
/obj/item/storage/box,
|
||||
/obj/item/storage/box/cups,
|
||||
/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/spacecash/c1,
|
||||
/obj/item/card/emag_broken,
|
||||
/obj/effect/decal/remains/lizard,
|
||||
/obj/effect/decal/remains/mouse,
|
||||
/obj/effect/decal/remains/robot,
|
||||
/obj/item/pizzabox/old,
|
||||
/obj/item/paper/crumpled
|
||||
)
|
||||
|
||||
common_loot = list(
|
||||
/obj/item/clothing/gloves/rainbow,
|
||||
/obj/item/clothing/gloves/white,
|
||||
|
||||
Reference in New Issue
Block a user