mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user