From 2dd01611fc063a280a51b66eb81895e6e0177da1 Mon Sep 17 00:00:00 2001
From: skoglol <33292112+kriskog@users.noreply.github.com>
Date: Fri, 25 Oct 2019 09:15:26 +0200
Subject: [PATCH] Some input() sorting fixes (#47354)
* dynamic gamemodes
* Some input fixes
---
code/game/objects/items/pinpointer.dm | 2 +-
code/modules/admin/topic.dm | 6 +++---
code/modules/surgery/organ_manipulation.dm | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/code/game/objects/items/pinpointer.dm b/code/game/objects/items/pinpointer.dm
index 1c39af41fce..4c1b01d4366 100644
--- a/code/game/objects/items/pinpointer.dm
+++ b/code/game/objects/items/pinpointer.dm
@@ -141,7 +141,7 @@
user.visible_message("[user]'s pinpointer fails to detect a signal.", "Your pinpointer fails to detect a signal.")
return
- var/A = input(user, "Person to track", "Pinpoint") in sortNames(names)
+ var/A = input(user, "Person to track", "Pinpoint") in sortList(names)
if(!A || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated())
return
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index c43e464bb41..bfd8196f4bb 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -609,7 +609,7 @@
for (var/rule in subtypesof(/datum/dynamic_ruleset/roundstart))
var/datum/dynamic_ruleset/roundstart/newrule = new rule()
roundstart_rules[newrule.name] = newrule
- var/added_rule = input(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", null) as null|anything in sortNames(roundstart_rules)
+ var/added_rule = input(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", null) as null|anything in sortList(roundstart_rules)
if (added_rule)
GLOB.dynamic_forced_roundstart_ruleset += roundstart_rules[added_rule]
log_admin("[key_name(usr)] set [added_rule] to be a forced roundstart ruleset.")
@@ -644,7 +644,7 @@
for (var/rule in subtypesof(/datum/dynamic_ruleset/latejoin))
var/datum/dynamic_ruleset/latejoin/newrule = new rule()
latejoin_rules[newrule.name] = newrule
- var/added_rule = input(usr,"What ruleset do you want to force upon the next latejoiner? This will bypass threat level and population restrictions.", "Rigging Latejoin", null) as null|anything in sortNames(latejoin_rules)
+ var/added_rule = input(usr,"What ruleset do you want to force upon the next latejoiner? This will bypass threat level and population restrictions.", "Rigging Latejoin", null) as null|anything in sortList(latejoin_rules)
if (added_rule)
var/datum/game_mode/dynamic/mode = SSticker.mode
mode.forced_latejoin_rule = latejoin_rules[added_rule]
@@ -673,7 +673,7 @@
for (var/rule in subtypesof(/datum/dynamic_ruleset/midround))
var/datum/dynamic_ruleset/midround/newrule = new rule()
midround_rules[newrule.name] = rule
- var/added_rule = input(usr,"What ruleset do you want to force right now? This will bypass threat level and population restrictions.", "Execute Ruleset", null) as null|anything in sortNames(midround_rules)
+ var/added_rule = input(usr,"What ruleset do you want to force right now? This will bypass threat level and population restrictions.", "Execute Ruleset", null) as null|anything in sortList(midround_rules)
if (added_rule)
var/datum/game_mode/dynamic/mode = SSticker.mode
log_admin("[key_name(usr)] executed the [added_rule] ruleset.")
diff --git a/code/modules/surgery/organ_manipulation.dm b/code/modules/surgery/organ_manipulation.dm
index 9f85a041146..6e5102eac27 100644
--- a/code/modules/surgery/organ_manipulation.dm
+++ b/code/modules/surgery/organ_manipulation.dm
@@ -111,7 +111,7 @@
organs -= O
organs[O.name] = O
- I = input("Remove which organ?", "Surgery", null, null) as null|anything in sortNames(organs)
+ I = input("Remove which organ?", "Surgery", null, null) as null|anything in sortList(organs)
if(I && user && target && user.Adjacent(target) && user.get_active_held_item() == tool)
I = organs[I]
if(!I)