ADD - add in-game phone administration and configuration (#25)

* ADD - build in-game admin command center

* ADD - open admin panel by command

* ENH - rebuild admin panel as standalone editor

* ENH - compact admin workspace navigation

* ENH - expand admin device controls

* ENH - refine admin panel navigation style

* ADD - add SQL phone configurator

* FIX - expose complete phone configuration

* FIX - make company jobs freely configurable

* FIX - align configurator tables to left

* ENH - organize configurator collection controls

* ENH - organize nested configurator sections

* ENH - add configurator field descriptions

* FIX - hide fixed configurator add controls

* ENH - refine configurator editing experience

* ENH - refine admin configurator controls

* FIX - apply configurator settings instantly

* FIX - close live activity command registration

---------

Co-authored-by: Leon.Schmidt <leonmauricewill15@gmail.com>
This commit is contained in:
DerEchteAlec
2026-08-22 03:26:52 +02:00
committed by GitHub
co-authored by Leon.Schmidt
parent 7aa4677b81
commit a9143b0fba
74 changed files with 12862 additions and 329 deletions
+15 -2
View File
@@ -316,9 +316,16 @@ local function ceil_div(value, divisor)
end
local function initialize_markets()
local next_markets = {}
local next_market_order = {}
local next_market_dynamics = {}
for _, config in ipairs(Config.Crypto.Markets) do
markets[config.Id] = config
market_order[#market_order + 1] = config.Id
if next_markets[config.Id] then
error(("[sky_phone] Config.Crypto.Markets contains duplicate id '%s'."):format(config.Id))
end
next_markets[config.Id] = config
next_market_order[#next_market_order + 1] = config.Id
next_market_dynamics[config.Id] = market_dynamics[config.Id]
Bridge.Database.Query([[
INSERT INTO `sky_phone_crypto_markets`
(`id`,`asset_scale`,`price_scale`,`issued_supply`,`price`,`version`,`status`)
@@ -357,6 +364,10 @@ local function initialize_markets()
INSERT INTO `sky_phone_crypto_balances` (`account_id`,`asset_id`,`available`)
VALUES ('treasury', 'CASH', ?) ON DUPLICATE KEY UPDATE `account_id` = VALUES(`account_id`)
]], { Config.Crypto.TreasuryCash * Config.Crypto.PriceScale })
markets = next_markets
market_order = next_market_order
market_dynamics = next_market_dynamics
market_cursor = math.min(market_cursor, math.max(#market_order, 1))
end
local function require_phone(source)
@@ -1357,6 +1368,8 @@ ensure_schema()
migrate_crypto_keys()
initialize_markets()
AddEventHandler("sky_phone:configurator:serverUpdated", initialize_markets)
local function reconcile_settlements(include_recent)
local age_clause = include_recent and "" or " AND settlement.`updated_at` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 5 MINUTE)"
local rows = Bridge.Database.Query([[