[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:
CHOMPStation2StaffMirrorBot
2026-06-09 15:11:15 -07:00
committed by GitHub
parent 2bdf48b78d
commit 2d09ccfdc7
16 changed files with 631 additions and 104 deletions
+23
View File
@@ -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
+2 -1
View File
@@ -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()