mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 03:26:31 +01:00
Merge pull request #4374 from kyrahabattoir/DynamicMaintenanceLoot
Dynamic maintenance loot table and map modification.
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user