From 4407f58aa48dd4770e8e26dc29d0e0c0b8ada286 Mon Sep 17 00:00:00 2001 From: DZD Date: Wed, 27 May 2015 19:10:43 -0400 Subject: [PATCH] Fix for custom items not spawning The jobmask wasn't trimming spaces after the comma between job names, and thus thought every job after the first began with a space. --- code/modules/customitems/item_spawning.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/customitems/item_spawning.dm b/code/modules/customitems/item_spawning.dm index e68e41abed1..3818786a3e6 100644 --- a/code/modules/customitems/item_spawning.dm +++ b/code/modules/customitems/item_spawning.dm @@ -47,7 +47,10 @@ testing("\[CustomItem\] Setting up [path] for [M.ckey] ([M.real_name]). jobmask=[jobmask];propadjust=[propadjust]") var/ok=0 if(jobmask!="*") - var/allowed_jobs = text2list(jobmask,",") + var/list/allowed_jobs = text2list(jobmask,",") + for(var/i = 1, i <= allowed_jobs.len, i++) + if(istext(allowed_jobs[i])) + allowed_jobs[i] = trim(allowed_jobs[i]) var/alt_blocked=0 if(M.mind.role_alt_title) if(!(M.mind.role_alt_title in allowed_jobs))