fix antag selection being evil (#28197)
* fix antag selection being evil * fix test * untroll the other tests * remove role timer troll * Allow tests to modify antag preferences * Fix antag selection * Misc test fixes * Add AntagPreferenceTest * Fix lazy mistakes * Test cleanup * Try stop players in lobbies from being assigned mid-round antags * ranting * I am going insane --------- Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
This commit is contained in:
@@ -146,8 +146,10 @@ public abstract class SharedJobSystem : EntitySystem
|
||||
|
||||
public bool CanBeAntag(ICommonSession player)
|
||||
{
|
||||
// If the player does not have any mind associated with them (e.g., has not spawned in or is in the lobby), then
|
||||
// they are eligible to be given an antag role/entity.
|
||||
if (_playerSystem.ContentData(player) is not { Mind: { } mindId })
|
||||
return false;
|
||||
return true;
|
||||
|
||||
if (!MindTryGetJob(mindId, out _, out var prototype))
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user