Adds common filter input function (#31246)

* Adds common filter input function

* Comment

* 2 more places replaced in too

* Mass delete in zone lines trimmed down now

* Changing function on mass modifying vars

* Reformats this to be more flexible

* Cuts this down too

* Loadout selection

* Nicer to have this be a default value of 0, may as well sneakycode this now

* Handling this in another PR anyways

Co-authored-by: kanef <kanef9x@protonmail.com>
This commit is contained in:
kane-f
2021-11-25 16:50:42 +00:00
committed by GitHub
parent 8858224639
commit e2e469919e
10 changed files with 35 additions and 53 deletions

View File

@@ -1321,19 +1321,10 @@ var/global/floorIsLava = 0
object = copytext(object, 1, variables_start)
var/list/matches = get_matching_types(object, /atom)
if(matches.len==0)
var/chosen = filter_list_input("Select an atom type", "Spawn Atom", get_matching_types(object, /atom))
if(!chosen)
return
var/chosen
if(matches.len==1)
chosen = matches[1]
else
chosen = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
if(!chosen)
return
//preloader is hooked to atom/New(), and is automatically disabled once it 'loads' an object
_preloader.setup(varchanges, chosen)