mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-09 06:04:23 +01:00
03cca11f95
* Init Sanity Unit Test * Oops * Update code/modules/unit_tests/init_sanity.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Signed-off-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * Makes noticeboard less silly --------- Signed-off-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
27 lines
684 B
Plaintext
27 lines
684 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 && length(things))
|
|
for(var/i = lootcount, i > 0, i--)
|
|
if(!length(things))
|
|
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))
|
|
|
|
return INITIALIZE_HINT_QDEL
|