[MDB IGNORE] BIDDLE TRAITORS - Adds progression traitors. Refactors uplink code in its entirety (#63588)

Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
Co-authored-by: tgstation-server <tgstation-server@tgstation13.org>
Co-authored-by: gbfree <guillaumebfree@gmail.com>
Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
Co-authored-by: Changelogs <action@github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com>
Co-authored-by: oranges <email@oranges.net.nz>
Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: ike709 <ike709@users.noreply.github.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Pepsilawn <reisenrui@gmail.com>
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: SuperNovaa41 <supernovaa41@protonmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: san7890 <34697715+san7890@users.noreply.github.com>
Co-authored-by: MMMiracles <lolaccount1@hotmail.com>
Co-authored-by: Krysonism <49783092+Krysonism@users.noreply.github.com>
Co-authored-by: Aziz Chynaliev <azizonkg@gmail.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
Co-authored-by: Mooshimi <85910816+Mooshimi@users.noreply.github.com>
Co-authored-by: carshalash <carshalash@gmail.com>
Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
This commit is contained in:
Watermelon914
2022-01-11 15:47:10 -08:00
committed by GitHub
co-authored by Watermelon914 tralezab Ghilker tgstation-server gbfree Sealed101 Changelogs John Willard vincentiusvin oranges Seth Scherer Jeremiah Azarak RandomGamer123 LemonInTheDark Kylerace ike709 Iamgoofball MrMelbert Pepsilawn AnturK Mothblocks SuperNovaa41 GoldenAlpharex Fikou san7890 MMMiracles Krysonism Aziz Chynaliev Tastyfish Mooshimi carshalash Ryll Ryll
parent eb6145fb7d
commit 8fd85e9666
141 changed files with 17145 additions and 4035 deletions
@@ -538,3 +538,43 @@
blended_color = "#2eeb9a"
pre_asset.Blend(blended_color, ICON_MULTIPLY)
return pre_asset
/// Sends information needed for uplinks
/datum/asset/json/uplink
name = "uplink"
/datum/asset/json/uplink/generate()
var/list/data = list()
var/list/categories = list()
var/list/items = list()
for(var/datum/uplink_category/category as anything in subtypesof(/datum/uplink_category))
categories += category
categories = sortTim(categories, .proc/cmp_uplink_category_desc)
var/list/new_categories = list()
for(var/datum/uplink_category/category as anything in categories)
new_categories += initial(category.name)
categories = new_categories
for(var/datum/uplink_item/item_path as anything in subtypesof(/datum/uplink_item))
var/datum/uplink_item/item = new item_path()
if(item.item) {
items += list(list(
"id" = item_path,
"name" = item.name,
"cost" = item.cost,
"desc" = item.desc,
"category" = item.category? initial(item.category.name) : null,
"purchasable_from" = item.purchasable_from,
"restricted" = item.restricted,
"limited_stock" = item.limited_stock,
"restricted_roles" = item.restricted_roles,
"progression_minimum" = item.progression_minimum,
))
}
SStraitor.uplink_items += item
SStraitor.uplink_items_by_type[item_path] = item
data["items"] = items
data["categories"] = categories
return data