diff --git a/code/datums/mind.dm b/code/datums/mind.dm index fdd576067b..e917fc6b70 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -200,7 +200,6 @@ /datum/mind/proc/has_antag_datum(datum_type, check_subtypes = TRUE) if(!datum_type) return - . = FALSE for(var/a in antag_datums) var/datum/antagonist/A = a if(check_subtypes && istype(A, datum_type)) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 1c6c444fb4..7f3c2b8550 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -13,6 +13,7 @@ GLOBAL_LIST_EMPTY(objectives) var/completed = FALSE //currently only used for custom objectives. var/completable = TRUE //Whether this objective shows greentext when completed var/martyr_compatible = FALSE //If the objective is compatible with martyr objective, i.e. if you can still do it while dead. + var/objective_name = "Objective" //name used in printing this objective (Objective #1) /datum/objective/New(var/text) GLOB.objectives += src // CITADEL EDIT FOR CRYOPODS diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm index 75de61aecc..dc5ef55248 100644 --- a/code/modules/antagonists/_common/antag_datum.dm +++ b/code/modules/antagonists/_common/antag_datum.dm @@ -169,6 +169,8 @@ GLOBAL_LIST_EMPTY(antagonists) owner.remove_skill_modifier(GET_SKILL_MOD_ID(A, type)) if(!LAZYLEN(owner.antag_datums)) owner.current.remove_from_current_living_antags() + if(info_button) + QDEL_NULL(info_button) if(!silent && owner.current) farewell() var/datum/team/team = get_team() @@ -364,6 +366,32 @@ GLOBAL_LIST_EMPTY(antagonists) return ..() +///ANTAGONIST UI STUFF + +/datum/antagonist/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, ui_name, name) + ui.open() + +/datum/antagonist/ui_state(mob/user) + return GLOB.always_state + +///generic helper to send objectives as data through tgui. supports smart objectives too! +/datum/antagonist/proc/get_objectives() + var/objective_count = 1 + var/list/objective_data = list() + //all obj + for(var/datum/objective/objective in objectives) + objective_data += list(list( + "count" = objective_count, + "name" = objective.objective_name, + "explanation" = objective.explanation_text, + "complete" = objective.completed, + )) + objective_count++ + return objective_data + //button for antags to review their descriptions/info /datum/action/antag_info