mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 17:52:36 +00:00
[MIRROR] TGUI list conversions + bug fixes [MDB IGNORE] (#10355)
* TGUI list conversions + bug fixes * Fixing conflicts * Maintaining a few modular files while we're at it... Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
@@ -452,8 +452,10 @@
|
||||
return
|
||||
if((can_flashlight && gun_light) && (can_bayonet && bayonet)) //give them a choice instead of removing both
|
||||
var/list/possible_items = list(gun_light, bayonet)
|
||||
var/obj/item/item_to_remove = input(user, "Select an attachment to remove", "Attachment Removal") as null|obj in sort_names(possible_items)
|
||||
if(!item_to_remove || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
var/obj/item/item_to_remove = tgui_input_list(user, "Attachment to remove", "Attachment Removal", sort_names(possible_items))
|
||||
if(isnull(item_to_remove))
|
||||
return
|
||||
if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
return remove_gun_attachment(user, I, item_to_remove)
|
||||
|
||||
|
||||
@@ -261,15 +261,12 @@
|
||||
pin_owner = null
|
||||
owned = FALSE
|
||||
return
|
||||
var/transaction_amount = input(user, "Insert valid deposit amount for gun purchase", "Money Deposit") as null|num
|
||||
if(transaction_amount < 1)
|
||||
to_chat(user, span_warning("ERROR: Invalid amount designated."))
|
||||
return
|
||||
if(!transaction_amount)
|
||||
var/transaction_amount = tgui_input_number(user, "Insert valid deposit amount for gun purchase", "Money Deposit", 1, 10000, 1)
|
||||
if(isnull(transaction_amount))
|
||||
return
|
||||
pin_owner = id
|
||||
owned = TRUE
|
||||
payment_amount = transaction_amount
|
||||
payment_amount = round(transaction_amount)
|
||||
gun_owners += user
|
||||
to_chat(user, span_notice("You link the card to the firing pin."))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user