Files
Bubberstation/code/game/objects/effects/spawners/lootsite.dm
SkyratBot edf22edc9b [MIRROR] [READY] decorations loot crate! +3 new fancy carpets! (#1522)
* [READY] decorations loot crate!  +3 new fancy carpets! (#54612)

* base

* fixes

* crate

* Update code/game/turfs/open/floor/fancy_floor.dm

Co-authored-by: Fikou <piotrbryla@ onet.pl>

* adds the crate to the pool.

* the crate is pretty rare, why not let it drop four items?

* Update lootdrop.dm

Newline phone edit

* ungoofed

Co-authored-by: Fikou <piotrbryla@ onet.pl>

* [READY] decorations loot crate!  +3 new fancy carpets!

Co-authored-by: Krysonism <49783092+Krysonism@users.noreply.github.com>
Co-authored-by: Fikou <piotrbryla@ onet.pl>
2020-10-31 06:06:12 +00:00

24 lines
983 B
Plaintext

///this spawner usually spawns a boring crate, but has a chance to replace the crate with "loot crate" with a different loot table or a decorative site.
/obj/effect/loot_site_spawner
icon = 'icons/effects/landmarks_static.dmi'
icon_state = "loot_site"
///This is the loot table for the spawner. Try to make sure the weights add up to 1000, so it is easy to understand.
var/list/loot_table = list(/obj/structure/closet/crate/maint = 765,
/obj/structure/closet/crate/trashcart/filled = 75,
/obj/effect/spawner/bundle/moisture_trap = 50,
/obj/effect/spawner/bundle/hobo_squat = 30,
/obj/structure/closet/mini_fridge = 35,
/obj/effect/spawner/lootdrop/gross_decal_spawner = 30,
/obj/structure/closet/crate/decorations = 15)
/obj/effect/loot_site_spawner/Initialize()
..()
if(!length(loot_table))
return INITIALIZE_HINT_QDEL
var/spawned_object = pickweight(loot_table)
new spawned_object(get_turf(src))
return INITIALIZE_HINT_QDEL