diff --git a/code/modules/modular_computers/file_system/programs/civilian/janitor.dm b/code/modules/modular_computers/file_system/programs/civilian/janitor.dm index 3cbd4f256d1..535b0aefc59 100644 --- a/code/modules/modular_computers/file_system/programs/civilian/janitor.dm +++ b/code/modules/modular_computers/file_system/programs/civilian/janitor.dm @@ -56,6 +56,7 @@ VUEUI_SET_CHECK(data["sel_category"], sel_type, ., data) var/status = "" + var/list/supplies = list() for(var/atom/A in global.janitorial_supplies) if(istype(A, /obj/item/mop) && sel_type == "Mops") @@ -78,21 +79,23 @@ if(AT && AreConnectedZLevels(AT.z, p.z)) dir = dir2text(get_dir(p, AT)) if(!dir) - dir = "ERR" + continue dir = uppertext(dir) - var/list/L = ++data["supplies"] - var/idx = length(L) - data["supplies"][idx] = list( + var/list/L = list( "name" = A.name, - "key" = idx, + "key" = length(supplies), "x" = AT.x, "y" = AT.y, "dir" = dir, "status" = status ) + supplies[++supplies.len] = L + + data["supplies"] = supplies + return data /datum/computer_file/program/civilian/janitor/Topic(href, href_list) diff --git a/html/changelogs/johnwildkins-bucketlist.yml b/html/changelogs/johnwildkins-bucketlist.yml new file mode 100644 index 00000000000..41666d045dc --- /dev/null +++ b/html/changelogs/johnwildkins-bucketlist.yml @@ -0,0 +1,6 @@ +author: JohnWildkins + +delete-after: True + +changes: + - bugfix: "Fixed the Custodial Supplies Locator app not functioning." diff --git a/vueui/src/components/view/mcomputer/janitor.vue b/vueui/src/components/view/mcomputer/janitor.vue index a7eee7ac94b..146365b7c1e 100644 --- a/vueui/src/components/view/mcomputer/janitor.vue +++ b/vueui/src/components/view/mcomputer/janitor.vue @@ -39,7 +39,8 @@ export default { }, methods: { generateName(n, k) { - if(n && k) { + if(n && !isNaN(k)) { + k += 1 return n + " (#" + k + ")" } } @@ -55,4 +56,4 @@ table { tr { line-height: 135%; } - \ No newline at end of file +