From 7b9ccd564b9c484807cfe78deac5b2a93deacf2a Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 12 Jan 2024 03:17:10 +0100 Subject: [PATCH] [MIRROR] Fixed runtime from unowned cooldown actions (carp rift) [MDB IGNORE] (#26085) * Fixed runtime from unowned cooldown actions (carp rift) (#80895) ## About The Pull Request This might not be the most correct fix but it *makes sense*. Some actions can not have an owner if it is unowned, so this check would runtime. ![image](https://github.com/tgstation/tgstation/assets/51863163/b4787b7f-f481-4601-bdb1-ad001e0fea2a) I assume carp rift is unowned in some places? * Fixed runtime from unowned cooldown actions (carp rift) --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- code/datums/actions/cooldown_action.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/actions/cooldown_action.dm b/code/datums/actions/cooldown_action.dm index ed4309c36e1..cb0d665a5cb 100644 --- a/code/datums/actions/cooldown_action.dm +++ b/code/datums/actions/cooldown_action.dm @@ -177,7 +177,7 @@ /// Starts a cooldown time for other abilities that share a cooldown with this. Has some niche usage with more complicated attack ai! /// Will use default cooldown time if an override is not specified /datum/action/cooldown/proc/StartCooldownOthers(override_cooldown_time) - if(!length(owner.actions)) + if(!length(owner?.actions)) return // Possible if they have an action they don't control for(var/datum/action/cooldown/shared_ability in owner.actions - src) if(!(shared_cooldown & shared_ability.shared_cooldown))