Datumizes Event Antags (#27546)

* Datumizes eventmisc

* DME edit

* Memory edit

* Learned to spell

* Update code/modules/antagonists/event/datum_eventmisc.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Contra Review

* Moves things back to eventmisc

* oops

* return message to admins about antag status

* Fixed event hud

* Updates orbit menu comment for datumized antags

---------

Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
Burzah
2025-01-01 14:19:47 -07:00
committed by GitHub
parent e6f99049f6
commit ef0dedbd87
5 changed files with 28 additions and 23 deletions
+10 -10
View File
@@ -440,7 +440,7 @@
/datum/mind/proc/memory_edit_eventmisc(mob/living/H)
. = _memory_edit_header("event", list())
if(src in SSticker.mode.eventmiscs)
if(has_antag_datum(/datum/antagonist/eventmisc))
. += "<b>YES</b>|<a href='byond://?src=[UID()];eventmisc=clear'>no</a>"
else
. += "<a href='byond://?src=[UID()];eventmisc=eventmisc'>Event Role</a>|<b>NO</b>"
@@ -1206,16 +1206,16 @@
else if(href_list["eventmisc"])
switch(href_list["eventmisc"])
if("clear")
if(src in SSticker.mode.eventmiscs)
SSticker.mode.eventmiscs -= src
SSticker.mode.update_eventmisc_icons_removed(src)
special_role = null
message_admins("[key_name_admin(usr)] has de-eventantag'ed [current].")
log_admin("[key_name(usr)] has de-eventantag'ed [current].")
if(!has_antag_datum(/datum/antagonist/eventmisc))
return
remove_antag_datum(/datum/antagonist/eventmisc)
message_admins("[key_name_admin(usr)] has de-eventantag'ed [current].")
log_admin("[key_name(usr)] has de-eventantag'ed [current].")
if("eventmisc")
SSticker.mode.eventmiscs += src
special_role = SPECIAL_ROLE_EVENTMISC
SSticker.mode.update_eventmisc_icons_added(src)
if(has_antag_datum(/datum/antagonist/eventmisc))
to_chat(usr, "[current] is already an event antag!")
return
add_antag_datum(/datum/antagonist/eventmisc)
message_admins("[key_name_admin(usr)] has eventantag'ed [current].")
log_admin("[key_name(usr)] has eventantag'ed [current].")
current.create_log(MISC_LOG, "[current] was made into an event antagonist by [key_name_admin(usr)]")
-11
View File
@@ -625,17 +625,6 @@
if(something_to_print)
print_command_report(trait_list_desc.Join("<br>"), "NAS Trurl Detected Divergencies", FALSE)
/datum/game_mode/proc/update_eventmisc_icons_added(datum/mind/mob_mind)
var/datum/atom_hud/antag/antaghud = GLOB.huds[ANTAG_HUD_EVENTMISC]
antaghud.join_hud(mob_mind.current)
set_antag_hud(mob_mind.current, "hudevent")
/datum/game_mode/proc/update_eventmisc_icons_removed(datum/mind/mob_mind)
var/datum/atom_hud/antag/antaghud = GLOB.huds[ANTAG_HUD_EVENTMISC]
antaghud.leave_hud(mob_mind.current)
set_antag_hud(mob_mind.current, null)
/// Gets the value of all end of round stats through auto_declare and returns them
/datum/game_mode/proc/get_end_of_round_antagonist_statistics()
. = list()
@@ -0,0 +1,15 @@
RESTRICT_TYPE(/datum/antagonist/eventmisc)
/datum/antagonist/eventmisc
name = "Event"
job_rank = ROLE_EVENTMISC
special_role = SPECIAL_ROLE_EVENTMISC
give_objectives = FALSE
antag_hud_name = "hudevent"
antag_hud_type = ANTAG_HUD_EVENTMISC
/datum/antagonist/eventmisc/add_owner_to_gamemode()
SSticker.mode.eventmiscs |= owner
/datum/antagonist/eventmisc/remove_owner_from_gamemode()
SSticker.mode.eventmiscs -= owner
+2 -2
View File
@@ -107,6 +107,7 @@ GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new)
- vampire
- changelings
- revolutionaries/headrevs
- event
*/
for(var/_A in mind.antag_datums)
var/datum/antagonist/A = _A
@@ -121,8 +122,7 @@ GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new)
other_antags += list(
"Blob" = (mind.special_role == SPECIAL_ROLE_BLOB),
"Nuclear Operative" = (mind in SSticker.mode.syndicates),
"Abductor" = (mind in SSticker.mode.abductors),
"Event Roles" = (mind.special_role == SPECIAL_ROLE_EVENTMISC)
"Abductor" = (mind in SSticker.mode.abductors)
)
for(var/antag_name in other_antags)
+1
View File
@@ -1549,6 +1549,7 @@
#include "code\modules\antagonists\changeling\powers\transform.dm"
#include "code\modules\antagonists\cult\datum_cultist.dm"
#include "code\modules\antagonists\cult\team_cult.dm"
#include "code\modules\antagonists\event\datum_eventmisc.dm"
#include "code\modules\antagonists\mind_flayer\flayer_datum.dm"
#include "code\modules\antagonists\mind_flayer\flayer_power.dm"
#include "code\modules\antagonists\mind_flayer\mindflayer_gamemode.dm"