diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 9ba56b2ffe..ce97711589 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -61,9 +61,6 @@ var/late_joiner = FALSE var/force_escaped = FALSE // Set by Into The Sunset command of the shuttle manipulator - - var/hijack_speed = 0 //whether or not we can hackerman the shuttle and hijack it. 0 means you can't, 1 is normal speed hack, 2 is double, 0.5 is half, etc. - var/list/learned_recipes //List of learned recipe TYPES. /datum/mind/New(var/key) @@ -717,11 +714,10 @@ G.reenter_corpse() /// Sets our can_hijack to the fastest speed our antag datums allow. -/datum/mind/proc/update_hijack_speed() - hijack_speed = 0 +/datum/mind/proc/get_hijack_speed() + . = 0 for(var/datum/antagonist/A in antag_datums) - hijack_speed = max(hijack_speed, A.hijack_speed()) - return hijack_speed + . = max(., A.hijack_speed()) /datum/mind/proc/has_objective(objective_type) for(var/datum/antagonist/A in antag_datums) diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm index 9f18ca9bea..93516765cc 100644 --- a/code/modules/antagonists/_common/antag_datum.dm +++ b/code/modules/antagonists/_common/antag_datum.dm @@ -73,7 +73,6 @@ GLOBAL_LIST_EMPTY(antagonists) give_antag_moodies() if(is_banned(owner.current) && replace_banned) replace_banned_player() - owner.update_hijack_speed() /datum/antagonist/proc/is_banned(mob/M) if(!M) @@ -101,7 +100,6 @@ GLOBAL_LIST_EMPTY(antagonists) var/datum/team/team = get_team() if(team) team.remove_member(owner) - owner.update_hijack_speed() qdel(src) /datum/antagonist/proc/greet() diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index f9b02ac09e..e532d0b824 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -63,11 +63,9 @@ // needs to be refactored to base /datum/antagonist sometime.. /datum/antagonist/traitor/proc/add_objective(datum/objective/O) objectives += O - owner?.update_hijack_speed() /datum/antagonist/traitor/proc/remove_objective(datum/objective/O) objectives -= O - owner?.update_hijack_speed() /datum/antagonist/traitor/proc/forge_traitor_objectives() switch(traitor_kind) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 299b1982fe..8c5e36076e 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -30,9 +30,9 @@ . = ..() if(hijack_announce) . += "Security systems present on console. Any unauthorized tampering will result in an emergency announcement." - if(user?.mind?.hijack_speed) + if(user?.mind?.get_hijack_speed()) . += "Alt click on this to attempt to hijack the shuttle. This will take multiple tries (current: stage [SSshuttle.emergency.hijack_status]/[HIJACKED])." - . += "It will take you [(hijack_stage_time * user.mind.hijack_speed) / 10] seconds to reprogram a stage of the shuttle's navigational firmware, and the console will undergo automated timed lockout for [hijack_stage_cooldown/10] seconds after each stage." + . += "It will take you [(hijack_stage_time * user.mind.get_hijack_speed()) / 10] seconds to reprogram a stage of the shuttle's navigational firmware, and the console will undergo automated timed lockout for [hijack_stage_cooldown/10] seconds after each stage." if(hijack_announce) . += "It is probably best to fortify your position as to be uninterrupted during the attempt, given the automatic announcements.." @@ -178,7 +178,7 @@ /obj/machinery/computer/emergency_shuttle/proc/attempt_hijack_stage(mob/living/user) if(!user.CanReach(src)) return - if(!user?.mind?.hijack_speed) + if(!user?.mind?.get_hijack_speed()) to_chat(user, "You manage to open a user-mode shell on [src], and hundreds of lines of debugging output fly through your vision. It is probably best to leave this alone.You [SSshuttle.emergency.hijack_status == INTACT? "begin" : "continue"] to override [src]'s navigational protocols.") say("Software override initiated.") . = FALSE - if(do_after(user, hijack_stage_time * user.mind.hijack_speed, target = src)) + if(do_after(user, hijack_stage_time * user.mind.get_hijack_speed(), target = src)) increase_hijack_stage() . = TRUE to_chat(user, "You reprogram some of [src]'s programming, putting it on timeout for [hijack_stage_cooldown/10] seconds.")