[MIRROR] fixes 2 runtimes caused by holding people up with a gun (#3283)

* fixes 2 runtimes caused by holding people up with a gun (#56800)

Fixes two runtimes, one caused by status effects always expecting a return from throw_alert, and another caused by holding yourself up (which you shouldn't even be able to do). Also fixes an issue caused by multiple people holding up the same person, when one of the perpetrators stopped holding up the victim, all of the victim's related alerts disappeared.

* fixes 2 runtimes caused by holding people up with a gun

Co-authored-by: TJatPBnJ <69724863+TJatPBnJ@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-02-11 13:10:46 +01:00
committed by GitHub
parent 27ccb28faa
commit 17b3cf8216
4 changed files with 11 additions and 8 deletions
+3
View File
@@ -197,6 +197,9 @@
if (user.GetComponent(/datum/component/gunpoint))
to_chat(user, "<span class='warning'>You are already holding someone up!</span>")
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
if (user == victim)
to_chat(user,"<span class='warning'>You can't hold yourself up!</span>")
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
user.AddComponent(/datum/component/gunpoint, victim, src)
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN