From 097bf08323c86f1738191f963a5eea2fc9092731 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 30 Sep 2022 06:27:38 +0200 Subject: [PATCH] [MIRROR] Game panel is a bit more generous when spawning multiple paths for admins [MDB IGNORE] (#16544) * Game panel is a bit more generous when spawning multiple paths for admins (#70078) Changes the limit of paths to spawn via game panel from a hardcoded 5 to be based on the admin spawn limit. Why It's Good For The Game 5 is a bit limiting, especially as it's easily possible to spawn more than five types of something in other ways. QOL. Changelog cl Melbert admin: The game panel now lets you make more than five different types of something at once. /cl * Game panel is a bit more generous when spawning multiple paths for admins Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- code/modules/admin/topic.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index b3228f5278a..7d7f8ce295c 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1212,12 +1212,13 @@ if(!paths) tgui_alert(usr,"The path list you sent is empty.") return - if(length(paths) > 5) - tgui_alert(usr,"Select fewer object types, (max 5).") + + var/number = clamp(text2num(href_list["object_count"]), 1, ADMIN_SPAWN_CAP) + if(length(paths) * number > ADMIN_SPAWN_CAP) + tgui_alert(usr,"Select fewer object types!") return var/list/offset = splittext(href_list["offset"],",") - var/number = clamp(text2num(href_list["object_count"]), 1, ADMIN_SPAWN_CAP) var/X = offset.len > 0 ? text2num(offset[1]) : 0 var/Y = offset.len > 1 ? text2num(offset[2]) : 0 var/Z = offset.len > 2 ? text2num(offset[3]) : 0