From d2149124b74a71ce58bc9a32214dad56af7bbce1 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Wed, 27 Sep 2017 15:10:01 -0500 Subject: [PATCH] Update mobs.dm --- code/__HELPERS/mobs.dm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index cb64f3fb22..ed855c33b9 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -465,13 +465,17 @@ Proc for attack log creation, because really why not if(H.dna && istype(H.dna.species, species_datum)) . = TRUE -/proc/spawn_atom_to_turf(spawn_type, target, amount, admin_spawn=FALSE) +/proc/spawn_atom_to_turf(spawn_type, target, amount, admin_spawn=FALSE, list/extra_args) var/turf/T = get_turf(target) if(!T) CRASH("attempt to spawn atom type: [spawn_type] in nullspace") - for(var/j in 1 to amount) - var/atom/X = new spawn_type(T) + var/list/new_args = list(T) + if(extra_args) + new_args += extra_args + + for(var/j in 1 to amount) + var/atom/X = new spawn_type(arglist(new_args)) X.admin_spawned = admin_spawn /proc/spawn_and_random_walk(spawn_type, target, amount, walk_chance=100, max_walk=3, always_max_walk=FALSE, admin_spawn=FALSE)