mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
* Part 1: fix tgui * Fix overdark layering * Vector code rework * misc. tgui things * final DM side fixes * TGUI try to fix #1 * Nuclear option. Bring all TGUI files. Will begin UNTGification in later commits. * Untgify: callback * untgify : config flags & config datums * Fixes GLOBAL_VAR_INIT * Purge HASTRAIT * .dme cleanup * file by file: status_alert.dm * file by file : preference datums + remove unused content * file by file : tgui_input/text.dm * file by file : fixes asset_cache_client.dm * file by file : tgui_panel / external.dm * file by file : tgui / external.dm * file by file : tgui / states.dm * file by file : subsystems/assets.dm [unused return type] * file by file : subsystems/tgui.dm [tg-macro for process()] * file by file : asset_cache_item.dm [minor proc call fix] * file by file : fixes a mistype for datum/asset_cache_item * file by file : removes bugs and unimplemented features in asset_list.dm * multifile : some more work on asset manager * File deleted : spirtesheet tg_assets. Don't need them * Remove unused TG content, fix asset_list.dm * Fixes a few issues with wrong type paths. * remove tgui_panel : this is for tgchat/stat2, which we don't use * fix thing * misc changes to tgui.dm. Defining QDELETED macro * final TGui fix * TGUI file convert : camera console and religion screen * Works * GPS fixed + fontAwesome fixed * Mecha console control * Fixes blurry icons * fixes iconbase64 regression * Misc bug/runtimes fixes * Fixes runtime funtime * Add merch computer TGUI * Fixes TGUI ticking interfaces + MSGS * PCMC * Power Monitor working * Power monitor * Bugfixes + robot console * Fixes mecha messages * Spess dot TV * TEG * Syndicate Uplink * Bump defines and connection warning * fix? * Fucking highscores * Fixes mistakes --------- Co-authored-by: west3436 <66280799+west3436@users.noreply.github.com>
39 lines
1.8 KiB
Plaintext
39 lines
1.8 KiB
Plaintext
/datum/unit_test/highscores/start()
|
|
var/datum/persistence_task/highscores/task = SSpersistence_misc.tasks["/datum/persistence_task/highscores"]
|
|
task.file_path = "data/persistence/money_highscores_test.json"
|
|
task.clear_records()
|
|
|
|
var/datum/data/record/money/test_record = new("somebody", "Assistant", 40000)
|
|
var/datum/data/record/money/test_record2 = new("a condom", "Captain", 35000)
|
|
var/datum/data/record/money/test_record3 = new("this should not appear", "Nobody", 10000)
|
|
var/datum/data/record/money/test_record4 = new("cuban pete", "Miner", 50000)
|
|
var/datum/data/record/money/test_record5 = new("pedro cubano", "Miner", 30000)
|
|
var/datum/data/record/money/test_record6 = new("frank sinatra", "Miner", 9999999)
|
|
var/list/records = list(test_record, test_record2, test_record3, test_record4, test_record5, test_record6)
|
|
|
|
task.insert_records(records)
|
|
|
|
assert_eq(task.data[1].fields["cash"], 9999999)
|
|
assert_eq(task.data[2].fields["cash"], 50000)
|
|
assert_eq(task.data[3].fields["cash"], 40000)
|
|
assert_eq(task.data[4].fields["cash"], 35000)
|
|
assert_eq(task.data[5].fields["cash"], 30000)
|
|
|
|
assert_eq(task.data[1].fields["role"], "Miner")
|
|
assert_eq(task.data[2].fields["role"], "Miner")
|
|
assert_eq(task.data[3].fields["role"], "Assistant")
|
|
assert_eq(task.data[4].fields["role"], "Captain")
|
|
assert_eq(task.data[5].fields["role"], "Miner")
|
|
|
|
if(task.data.len > 5)
|
|
fail("[task.name] is storing more than five entries. Len: [task.data.len]")
|
|
|
|
task.on_shutdown()
|
|
task.on_init()
|
|
|
|
assert_eq(task.data[1].fields["cash"], 9999999)
|
|
assert_eq(task.data[2].fields["cash"], 50000)
|
|
assert_eq(task.data[3].fields["cash"], 40000)
|
|
assert_eq(task.data[4].fields["cash"], 35000)
|
|
assert_eq(task.data[5].fields["cash"], 30000)
|