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.
This commit is contained in:
DZD
2015-05-27 19:10:43 -04:00
parent 2864fb913c
commit 4407f58aa4
+4 -1
View File
@@ -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))