mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Adds a signal to buying items from the uplink (& fixes TC misinfo) (#81372)
## About The Pull Request Adds a signal when someone buys an item from the uplink and removes single-letter vars from the ``spawn_item`` proc, and adds/standardizes add/removing of telecrystals from uplinks (and admin setting how much TC they have) to ensure the UI always has the right amount of telecrystals displayed in it. ## Why It's Good For The Game There are reasons why someone would want to hook up to a traitor's uplink and listen to items they purchase to do any special effect on-purchase, so this adds support to do anything in the future with it. Also tells players how much TC they actually have without forcing them to close/reopen the UI every time they insert some TC in it by hand. ## Changelog 🆑 fix: Uplinks now update their UI when you add telecrystals in them, so you don't need to close and reopen it. /🆑
This commit is contained in:
@@ -457,9 +457,14 @@
|
||||
if(check_rights(R_FUN))
|
||||
var/datum/component/uplink/U = find_syndicate_uplink()
|
||||
if(U)
|
||||
var/crystals = input("Amount of telecrystals for [key]","Syndicate uplink", U.uplink_handler.telecrystals) as null | num
|
||||
if(!isnull(crystals))
|
||||
U.uplink_handler.telecrystals = crystals
|
||||
var/crystals = tgui_input_number(
|
||||
user = usr,
|
||||
message = "Amount of telecrystals for [key]",
|
||||
title = "Syndicate uplink",
|
||||
default = U.uplink_handler.telecrystals,
|
||||
)
|
||||
if(crystals && isnum(crystals))
|
||||
U.uplink_handler.set_telecrystals(crystals)
|
||||
message_admins("[key_name_admin(usr)] changed [current]'s telecrystal count to [crystals].")
|
||||
log_admin("[key_name(usr)] changed [current]'s telecrystal count to [crystals].")
|
||||
if("progression")
|
||||
|
||||
Reference in New Issue
Block a user