Merge pull request #4374 from kyrahabattoir/DynamicMaintenanceLoot

Dynamic maintenance loot table and map modification.
This commit is contained in:
Swag McYolosteinen
2014-08-18 19:27:02 +02:00
3 changed files with 120 additions and 18 deletions
-17
View File
@@ -1,17 +0,0 @@
/obj/effect/spawner/lootdrop
icon = 'icons/mob/screen_gen.dmi'
icon_state = "x2"
var/lootcount = 1 //how many items will be spawned
var/lootdoubles = 0 //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()
if(loot && loot.len)
for(var/i = lootcount, i > 0, i--)
if(!loot.len) break
var/lootspawn = pick(loot)
if(!lootdoubles)
loot.Remove(lootspawn)
new lootspawn(get_turf(src))
qdel(src)