mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-21 21:23:58 +01:00
[MIRROR] Department Goals Subsystem (#12816)
Co-authored-by: Will <7099514+Willburd@users.noreply.github.com> Co-authored-by: Guti <guti23400@gmail.com>
This commit is contained in:
committed by
GitHub
parent
2bdf48b78d
commit
2d09ccfdc7
@@ -305,3 +305,26 @@
|
||||
news.Swap(1, 3) // List is sorted in ascending order of timestamp, we want descending
|
||||
|
||||
return news
|
||||
|
||||
/datum/data/pda/app/goals
|
||||
name = "Departmental Goals"
|
||||
icon = "list-check"
|
||||
template = "pda_depgoals"
|
||||
|
||||
/datum/data/pda/app/goals/update_ui(mob/user, list/data)
|
||||
data["goals"] = get_goals()
|
||||
|
||||
/datum/data/pda/app/goals/proc/get_goals()
|
||||
var/list/goals = list()
|
||||
var/index = 0
|
||||
|
||||
for(var/category in SSdepartmentgoals.active_department_goals)
|
||||
var/list/dept_goal = SSdepartmentgoals.active_department_goals[category]
|
||||
for(var/datum/goal/goal in dept_goal)
|
||||
goals += list(list(
|
||||
"name" = goal.name,
|
||||
"description" = goal.goal_text,
|
||||
"count" = FLOOR((goal.current_count / goal.goal_count) * 100, 1),
|
||||
"index" = ++index
|
||||
))
|
||||
return goals
|
||||
|
||||
@@ -50,7 +50,8 @@
|
||||
new/datum/data/pda/app/nerdle,
|
||||
new/datum/data/pda/app/game_launcher,
|
||||
new/datum/data/pda/utility/scanmode/notes,
|
||||
new/datum/data/pda/utility/flashlight)
|
||||
new/datum/data/pda/utility/flashlight,
|
||||
new/datum/data/pda/app/goals)
|
||||
var/list/shortcut_cache = list()
|
||||
var/list/shortcut_cat_order = list()
|
||||
var/list/notifying_programs = list()
|
||||
|
||||
Reference in New Issue
Block a user