diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index db45cfec926..5bb1d0eb69f 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -437,26 +437,26 @@ SUBSYSTEM_DEF(ticker) var/name_override = cui.item_name_override var/desc_override = cui.item_desc_override + if(name_override) + I.name = name_override + if(desc_override) + I.desc = desc_override + if(istype(H.back, /obj/item/storage)) // Try to place it in something on the mob's back var/obj/item/storage/S = H.back - if(S.contents.len < S.storage_slots) + if(length(S.contents) < S.storage_slots) I.forceMove(H.back) ok = TRUE to_chat(H, "Your [I.name] has been added to your [H.back.name].") if(!ok) for(var/obj/item/storage/S in H.contents) // Try to place it in any item that can store stuff, on the mob. - if(S.contents.len < S.storage_slots) + if(length(S.contents) < S.storage_slots) I.forceMove(S) ok = TRUE to_chat(H, "Your [I.name] has been added to your [S.name].") break - if(name_override) - I.name = name_override - if(desc_override) - I.desc = desc_override - if(!ok) // Finally, since everything else failed, place it on the ground var/turf/T = get_turf(H) if(T) @@ -464,8 +464,7 @@ SUBSYSTEM_DEF(ticker) to_chat(H, "Your [I.name] is on the [T.name] below you.") else to_chat(H, "Your [I.name] couldnt spawn anywhere on you or even on the floor below you. Please file a bug report.") - - H.regenerate_icons() + qdel(I) /datum/controller/subsystem/ticker/proc/send_tip_of_the_round() diff --git a/code/datums/custom_user_item.dm b/code/datums/custom_user_item.dm index 4b666c39e9d..9680a990488 100644 --- a/code/datums/custom_user_item.dm +++ b/code/datums/custom_user_item.dm @@ -3,7 +3,7 @@ * * Holder for CUIs * - * This datum is a older that is essentially a "model" of the `customuseritems` + * This datum is a holder that is essentially a "model" of the `customuseritems` * database table, and is used for giving people their CUIs on spawn. * It is instanced as part of the client data loading framework on the client. * @@ -16,7 +16,7 @@ /// Are all jobs allowed? var/all_jobs_allowed = FALSE /// List of allowed jobs - var/allowed_jobs = list() + var/list/allowed_jobs = list() /// Custom item typepath var/object_typepath /// Custom item name override