From 5bfbcd09487b14d1f04c2867c19ac72479af56af Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Sun, 15 Mar 2020 15:12:35 +0100 Subject: [PATCH] Fixing some GetElement runtimes. --- code/__HELPERS/game.dm | 2 +- code/datums/elements/ghost_role_eligibility.dm | 2 +- code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm | 2 +- code/modules/admin/topic.dm | 2 +- code/modules/mob/living/simple_animal/friendly/dog.dm | 6 ++---- tgstation.dme | 2 +- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 034b5d1825..7703b13018 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -425,7 +425,7 @@ candidates -= M /proc/pollGhostCandidates(Question, jobbanType, datum/game_mode/gametypeCheck, be_special_flag = 0, poll_time = 300, ignore_category = null, flashwindow = TRUE) - var/datum/element/ghost_role_eligibility/eligibility = SSdcs.GetElement(/datum/element/ghost_role_eligibility) + var/datum/element/ghost_role_eligibility/eligibility = SSdcs.GetElement(list(/datum/element/ghost_role_eligibility)) var/list/candidates = eligibility.get_all_ghost_role_eligible() return pollCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category, flashwindow, candidates) diff --git a/code/datums/elements/ghost_role_eligibility.dm b/code/datums/elements/ghost_role_eligibility.dm index d04cf36138..28567c579b 100644 --- a/code/datums/elements/ghost_role_eligibility.dm +++ b/code/datums/elements/ghost_role_eligibility.dm @@ -42,7 +42,7 @@ return candidates /mob/proc/can_reenter_round(silent = FALSE) - var/datum/element/ghost_role_eligibility/eli = SSdcs.GetElement(/datum/element/ghost_role_eligibility) + var/datum/element/ghost_role_eligibility/eli = SSdcs.GetElement(list(/datum/element/ghost_role_eligibility)) return eli.can_reenter_round(src,silent) /datum/element/ghost_role_eligibility/proc/can_reenter_round(var/mob/M,silent = FALSE) diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm index 36b81afc26..e0ad2b8bbc 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm @@ -34,7 +34,7 @@ living_players = trim_list(mode.current_players[CURRENT_LIVING_PLAYERS]) living_antags = trim_list(mode.current_players[CURRENT_LIVING_ANTAGS]) list_observers = trim_list(mode.current_players[CURRENT_OBSERVERS]) - var/datum/element/ghost_role_eligibility/eligibility = SSdcs.GetElement(/datum/element/ghost_role_eligibility) + var/datum/element/ghost_role_eligibility/eligibility = SSdcs.GetElement(list(/datum/element/ghost_role_eligibility)) ghost_eligible = trim_list(eligibility.get_all_ghost_role_eligible()) /datum/dynamic_ruleset/midround/proc/trim_list(list/L = list()) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 6abf2d3f1b..51c2ba4fc6 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1732,7 +1732,7 @@ var/mob/M = locate(href_list["makeeligible"]) if(!ismob(M)) to_chat(usr, "this can only be used on instances of type /mob.") - var/datum/element/ghost_role_eligibility/eli = SSdcs.GetElement(/datum/element/ghost_role_eligibility) + var/datum/element/ghost_role_eligibility/eli = SSdcs.GetElement(list(/datum/element/ghost_role_eligibility)) if(M.ckey in eli.timeouts) eli.timeouts -= M.ckey diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index 46cdc755db..4bf8aa5e23 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -363,10 +363,8 @@ icon_dead = "old_corgi_dead" desc = "At a ripe old age of [record_age] Ian's not as spry as he used to be, but he'll always be the HoP's beloved corgi." //RIP turns_per_move = 20 - var/datum/element/mob_holder/ele = SSdcs.GetElement(/datum/element/mob_holder, held_icon) - if(ele) - ele.Detach(src) - AddElement(/datum/element/mob_holder, "old_corgi") + RemoveElement(/datum/element/mob_holder, held_icon) + AddElement(/datum/element/mob_holder, "old_corgi") /mob/living/simple_animal/pet/dog/corgi/Ian/Life() if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved) diff --git a/tgstation.dme b/tgstation.dme index 06c841e021..8b04b3deac 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1498,6 +1498,7 @@ #include "code\modules\antagonists\swarmer\swarmer.dm" #include "code\modules\antagonists\swarmer\swarmer_event.dm" #include "code\modules\antagonists\traitor\datum_traitor.dm" +#include "code\modules\antagonists\traitor\syndicate_contract.dm" #include "code\modules\antagonists\traitor\classes\ai.dm" #include "code\modules\antagonists\traitor\classes\assassin.dm" #include "code\modules\antagonists\traitor\classes\freeform.dm" @@ -1506,7 +1507,6 @@ #include "code\modules\antagonists\traitor\classes\martyr.dm" #include "code\modules\antagonists\traitor\classes\subterfuge.dm" #include "code\modules\antagonists\traitor\classes\traitor_class.dm" -#include "code\modules\antagonists\traitor\syndicate_contract.dm" #include "code\modules\antagonists\traitor\equipment\contractor.dm" #include "code\modules\antagonists\traitor\equipment\Malf_Modules.dm" #include "code\modules\antagonists\traitor\IAA\internal_affairs.dm"