mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] selective belly import (#11530)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
8a4c185fb4
commit
87b3497230
@@ -88,7 +88,7 @@
|
||||
/datum/tgui_alert/Destroy(force, ...)
|
||||
SStgui.close_uis(src)
|
||||
state = null
|
||||
QDEL_NULL(buttons)
|
||||
buttons?.Cut()
|
||||
. = ..()
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
return null
|
||||
|
||||
if(!user.read_preference(/datum/preference/toggle/tgui_input_mode))
|
||||
return input(user, message, title) as null|anything in items
|
||||
var/our_input = input(user, message, title) as null|anything in items
|
||||
return our_input ? list(our_input) : null
|
||||
var/datum/tgui_checkbox_input/input = new(user, message, title, items, min_checked, max_checked, timeout, ui_state)
|
||||
input.tgui_interact(user)
|
||||
input.wait()
|
||||
@@ -73,7 +74,7 @@
|
||||
/datum/tgui_checkbox_input/Destroy(force)
|
||||
SStgui.close_uis(src)
|
||||
state = null
|
||||
QDEL_NULL(items)
|
||||
items?.Cut()
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -115,7 +116,7 @@
|
||||
|
||||
return data
|
||||
|
||||
/datum/tgui_checkbox_input/tgui_act(action, list/params)
|
||||
/datum/tgui_checkbox_input/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
|
||||
. = ..()
|
||||
if (.)
|
||||
return
|
||||
@@ -124,7 +125,11 @@
|
||||
if("submit")
|
||||
var/list/selections = params["entry"]
|
||||
if(length(selections) >= min_checked && length(selections) <= max_checked)
|
||||
set_choices(selections)
|
||||
var/list/valid_selections = list()
|
||||
for(var/raw_entry in selections)
|
||||
if(raw_entry in items)
|
||||
valid_selections += raw_entry
|
||||
set_choices(valid_selections)
|
||||
closed = TRUE
|
||||
SStgui.close_uis(src)
|
||||
return TRUE
|
||||
|
||||
@@ -97,7 +97,8 @@
|
||||
/datum/tgui_list_input/Destroy(force)
|
||||
SStgui.close_uis(src)
|
||||
state = null
|
||||
QDEL_NULL(items)
|
||||
items?.Cut()
|
||||
items_map?.Cut()
|
||||
return ..()
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user