137 lines
4.1 KiB
Plaintext
137 lines
4.1 KiB
Plaintext
/obj/effect/spawner/lootdrop
|
|
icon = 'icons/mob/screen_gen.dmi'
|
|
icon_state = "x2"
|
|
color = "#00FF00"
|
|
var/lootcount = 1 //how many items will be spawned
|
|
var/lootdoubles = TRUE //if the same item can be spawned twice
|
|
var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
|
|
|
|
/obj/effect/spawner/lootdrop/Initialize(mapload)
|
|
..()
|
|
if(loot && loot.len)
|
|
var/turf/T = get_turf(src)
|
|
while(lootcount && loot.len)
|
|
var/lootspawn = pickweight(loot)
|
|
if(!lootdoubles)
|
|
loot.Remove(lootspawn)
|
|
|
|
if(lootspawn)
|
|
new lootspawn(T)
|
|
lootcount--
|
|
qdel(src)
|
|
|
|
/obj/effect/spawner/lootdrop/armory_contraband
|
|
name = "armory contraband gun spawner"
|
|
lootdoubles = FALSE
|
|
|
|
loot = list(
|
|
/obj/item/weapon/gun/ballistic/automatic/pistol = 8,
|
|
/obj/item/weapon/gun/ballistic/shotgun/automatic/combat = 5,
|
|
/obj/item/weapon/gun/ballistic/revolver/mateba,
|
|
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle
|
|
)
|
|
|
|
/obj/effect/spawner/lootdrop/gambling
|
|
name = "gambling valuables spawner"
|
|
loot = list(
|
|
/obj/item/weapon/gun/ballistic/revolver/russian = 5,
|
|
/obj/item/weapon/storage/box/syndie_kit/throwing_weapons = 1,
|
|
/obj/item/toy/cards/deck/syndicate = 2
|
|
)
|
|
|
|
/obj/effect/spawner/lootdrop/grille_or_trash
|
|
name = "maint grille or trash spawner"
|
|
loot = list(/obj/structure/grille = 5,
|
|
/obj/item/weapon/cigbutt = 1,
|
|
/obj/item/trash/cheesie = 1,
|
|
/obj/item/trash/candy = 1,
|
|
/obj/item/trash/chips = 1,
|
|
/obj/item/trash/deadmouse = 1,
|
|
/obj/item/trash/pistachios = 1,
|
|
/obj/item/trash/plate = 1,
|
|
/obj/item/trash/popcorn = 1,
|
|
/obj/item/trash/raisins = 1,
|
|
/obj/item/trash/sosjerky = 1,
|
|
/obj/item/trash/syndi_cakes = 1)
|
|
|
|
/obj/effect/spawner/lootdrop/maintenance
|
|
name = "maintenance loot spawner"
|
|
// see code/_globalvars/lists/maintenance_loot.dm for loot table
|
|
|
|
/obj/effect/spawner/lootdrop/maintenance/Initialize(mapload)
|
|
loot = GLOB.maintenance_loot
|
|
..()
|
|
|
|
/obj/effect/spawner/lootdrop/crate_spawner
|
|
name = "lootcrate spawner" //USE PROMO CODE "SELLOUT" FOR 20% OFF!
|
|
lootdoubles = FALSE
|
|
|
|
loot = list(
|
|
/obj/structure/closet/crate/secure/loot = 20,
|
|
"" = 80
|
|
)
|
|
|
|
/obj/effect/spawner/lootdrop/organ_spawner
|
|
name = "organ spawner"
|
|
loot = list(
|
|
/obj/item/organ/heart/gland/bloody = 7,
|
|
/obj/item/organ/heart/gland/bodysnatch = 4,
|
|
/obj/item/organ/heart/gland/egg = 7,
|
|
/obj/item/organ/heart/gland/emp = 3,
|
|
/obj/item/organ/heart/gland/mindshock = 5,
|
|
/obj/item/organ/heart/gland/plasma = 7,
|
|
/obj/item/organ/heart/gland/pop = 5,
|
|
/obj/item/organ/heart/gland/slime = 4,
|
|
/obj/item/organ/heart/gland/spiderman = 5,
|
|
/obj/item/organ/heart/gland/ventcrawling = 1,
|
|
/obj/item/organ/body_egg/alien_embryo = 1,
|
|
/obj/item/organ/regenerative_core = 2)
|
|
lootcount = 3
|
|
|
|
/obj/effect/spawner/lootdrop/two_percent_xeno_egg_spawner
|
|
name = "2% chance xeno egg spawner"
|
|
loot = list(
|
|
/obj/effect/decal/remains/xeno = 49,
|
|
/obj/effect/spawner/xeno_egg_delivery = 1)
|
|
|
|
/obj/effect/spawner/lootdrop/costume
|
|
name = "random costume spawner"
|
|
|
|
/obj/effect/spawner/lootdrop/costume/Initialize()
|
|
loot = list()
|
|
for(var/path in subtypesof(/obj/effect/spawner/bundle/costume))
|
|
loot[path] = TRUE
|
|
..()
|
|
|
|
// Minor lootdrops follow
|
|
|
|
/obj/effect/spawner/lootdrop/minor/beret_or_rabbitears
|
|
name = "beret or rabbit ears spawner"
|
|
loot = list(
|
|
/obj/item/clothing/head/beret = 1,
|
|
/obj/item/clothing/head/rabbitears = 1)
|
|
|
|
/obj/effect/spawner/lootdrop/minor/bowler_or_that
|
|
name = "bowler or top hat spawner"
|
|
loot = list(
|
|
/obj/item/clothing/head/bowler = 1,
|
|
/obj/item/clothing/head/that = 1)
|
|
|
|
/obj/effect/spawner/lootdrop/minor/kittyears_or_rabbitears
|
|
name = "kitty ears or rabbit ears spawner"
|
|
loot = list(
|
|
/obj/item/clothing/head/kitty = 1,
|
|
/obj/item/clothing/head/rabbitears = 1)
|
|
|
|
/obj/effect/spawner/lootdrop/minor/pirate_or_bandana
|
|
name = "pirate hat or bandana spawner"
|
|
loot = list(
|
|
/obj/item/clothing/head/pirate = 1,
|
|
/obj/item/clothing/head/bandana = 1)
|
|
|
|
/obj/effect/spawner/lootdrop/minor/twentyfive_percent_cyborg_mask
|
|
name = "25% cyborg mask spawner"
|
|
loot = list(
|
|
/obj/item/clothing/mask/gas/cyborg = 25,
|
|
"" = 75)
|