Skip to content

Commit

Permalink
Another Banishment Check For Observers Joining as a Xeno (#4039)
Browse files Browse the repository at this point in the history
# About the pull request

This PR is a followup to #4031 where I found that ctrl clicking an afk
xeno is also a method to join as a xeno. Now this method also checks for
banishment.

# Explain why it's good for the game

Rejoining as a different mob should not circumvent banishment.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>


![image](https://github.com/cmss13-devs/cmss13/assets/76988376/2bed0b6a-b3e6-498b-a7f7-c18bfd48eb6e)

</details>


# Changelog
:cl: Drathek
fix: Fixed ctrl+click joining as an afk xeno not checking banishment
/:cl:
  • Loading branch information
Drulikar committed Jul 30, 2023
1 parent 76aa94a commit f7cb109
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/_onclick/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
ManualFollow(target)
return FALSE

if(xeno.hive)
for(var/mob_name in xeno.hive.banished_ckeys)
if(xeno.hive.banished_ckeys[mob_name] == ckey)
to_chat(src, SPAN_WARNING("You are banished from the [xeno.hive], you may not rejoin unless the Queen re-admits you or dies."))
ManualFollow(target)
return FALSE

if(alert(src, "Are you sure you want to transfer yourself into [xeno]?", "Confirm Transfer", "Yes", "No") != "Yes")
return FALSE
if(((!islarva(xeno) && xeno.away_timer < XENO_LEAVE_TIMER) || (islarva(xeno) && xeno.away_timer < XENO_LEAVE_TIMER_LARVA)) || xeno.stat == DEAD) // Do it again, just in case
Expand Down

0 comments on commit f7cb109

Please sign in to comment.