mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-20 07:12:55 +00:00
* Adds the check components * Adds in trailing newlines * Converts all CRLF to LF * Post merge EOF * Post merge line endings * Final commit
26 lines
657 B
Plaintext
26 lines
657 B
Plaintext
/obj/effect/spawner/away/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/loot = "" //a list of possible items to spawn- a string of paths
|
|
|
|
/obj/effect/spawner/away/lootdrop/Initialize()
|
|
..()
|
|
var/list/things = params2list(loot)
|
|
|
|
if(things && things.len)
|
|
for(var/i = lootcount, i > 0, i--)
|
|
if(!things.len)
|
|
return
|
|
|
|
var/loot_spawn = pick(things)
|
|
var/loot_path = text2path(loot_spawn)
|
|
|
|
if(!loot_path || !lootdoubles)
|
|
things.Remove(loot_spawn)
|
|
continue
|
|
|
|
new loot_path(get_turf(src))
|
|
qdel(src)
|