Being assigned a special role now clears 'role_alt_title' (#13205)

This commit is contained in:
mikomyazaki
2022-02-18 12:05:58 +01:00
committed by GitHub
parent 2bcec32202
commit e1aec88cf4
3 changed files with 9 additions and 1 deletions
+1
View File
@@ -199,6 +199,7 @@
//Ensure that antags with ANTAG_OVERRIDE_JOB do not occupy job slots.
if(flags & ANTAG_OVERRIDE_JOB)
player.assigned_role = role_text
player.role_alt_title = role_text
//Ensure that a player cannot be drafted for multiple antag roles, taking up slots for antag roles that they will not fill.
player.special_role = role_text
+2 -1
View File
@@ -6,6 +6,7 @@
//do this again, just in case
if(flags & ANTAG_OVERRIDE_JOB)
player.assigned_role = role_text
player.role_alt_title = role_text
player.special_role = role_text
if(istype(player.current, /mob/abstract))
@@ -122,4 +123,4 @@
//Run the query to update the db entry with the removal time
var/DBQuery/update_query = dbcon.NewQuery("UPDATE ss13_antag_log SET special_role_removed = :special_role_removed: WHERE id = :id:")
update_query.Execute(list("id"=db_log_id,"special_role_removed"="[get_round_duration_formatted()]:00"))
update_query.Execute(list("id"=db_log_id,"special_role_removed"="[get_round_duration_formatted()]:00"))
@@ -0,0 +1,6 @@
author: mikomyazaki
delete-after: True
changes:
- bugfix: "Being assigned a special role now clears 'role_alt_title', which could lead to you getting an ID with your previous job on it when spawning as an antagonist."