mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Adds subtype friendly method to populate crates.
This commit is contained in:
9
code/_helpers/storage.dm
Normal file
9
code/_helpers/storage.dm
Normal file
@@ -0,0 +1,9 @@
|
||||
/proc/create_objects_in_loc(var/atom/loc, var/list/item_paths)
|
||||
if(!istype(loc))
|
||||
CRASH("Inappropriate loction given.")
|
||||
if(!istype(item_paths))
|
||||
CRASH("Inappropriate item path list given.")
|
||||
|
||||
for(var/item_path in item_paths)
|
||||
for(var/i = 1 to max(1, item_paths[item_path]))
|
||||
new item_path(loc)
|
||||
Reference in New Issue
Block a user