quick fixes
This commit is contained in:
@@ -7,6 +7,7 @@ using Content.Shared.Roles;
|
||||
using Content.Shared.White.Cult;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
||||
@@ -41,7 +42,7 @@ public sealed partial class CultRuleComponent : Component
|
||||
[DataField("pentagramThreshold")]
|
||||
public static int PentagramThreshold = 8;
|
||||
|
||||
public Dictionary<IPlayerSession, HumanoidCharacterProfile> StarCandidates = new();
|
||||
public Dictionary<ICommonSession, HumanoidCharacterProfile> StarCandidates = new();
|
||||
|
||||
[DataField("cultistStartingItems", customTypeSerializer: typeof(PrototypeIdListSerializer<EntityPrototype>))]
|
||||
public List<string> StartingItems = new();
|
||||
|
||||
@@ -31,6 +31,7 @@ using Robust.Shared.Random;
|
||||
using Robust.Shared.Utility;
|
||||
using Content.Shared._White;
|
||||
using Content.Shared.Mind;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
|
||||
namespace Content.Server.White.Cult.GameRule;
|
||||
|
||||
@@ -308,7 +309,7 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
|
||||
}
|
||||
}
|
||||
|
||||
private List<MindContainerComponent> FindPotentialTargets(List<IPlayerSession> exclude = null!)
|
||||
private List<MindContainerComponent> FindPotentialTargets(List<ICommonSession> exclude = null!)
|
||||
{
|
||||
var querry = EntityManager.EntityQuery<MindContainerComponent, HumanoidAppearanceComponent, ActorComponent>();
|
||||
|
||||
@@ -332,9 +333,9 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
|
||||
return potentialTargets;
|
||||
}
|
||||
|
||||
private List<IPlayerSession> FindPotentialCultist(in Dictionary<IPlayerSession, HumanoidCharacterProfile> candidates)
|
||||
private List<ICommonSession> FindPotentialCultist(in Dictionary<ICommonSession, HumanoidCharacterProfile> candidates)
|
||||
{
|
||||
var list = new List<IPlayerSession>();
|
||||
var list = new List<ICommonSession>();
|
||||
var pendingQuery = GetEntityQuery<PendingClockInComponent>();
|
||||
|
||||
foreach (var player in candidates.Keys)
|
||||
@@ -349,7 +350,7 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
|
||||
list.Add(player);
|
||||
}
|
||||
|
||||
var prefList = new List<IPlayerSession>();
|
||||
var prefList = new List<ICommonSession>();
|
||||
|
||||
foreach (var player in list)
|
||||
{
|
||||
@@ -388,9 +389,9 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
|
||||
return prefList;
|
||||
}
|
||||
|
||||
private List<IPlayerSession> PickCultists(List<IPlayerSession> prefList)
|
||||
private List<ICommonSession> PickCultists(List<ICommonSession> prefList)
|
||||
{
|
||||
var result = new List<IPlayerSession>();
|
||||
var result = new List<ICommonSession>();
|
||||
if (prefList.Count == 0)
|
||||
{
|
||||
_sawmill.Info("Insufficient ready players to fill up with cultists, stopping the selection.");
|
||||
@@ -410,7 +411,7 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
|
||||
return result;
|
||||
}
|
||||
|
||||
public bool MakeCultist(IPlayerSession cultist)
|
||||
public bool MakeCultist(ICommonSession cultist)
|
||||
{
|
||||
var cultistRule = EntityQuery<CultRuleComponent>().FirstOrDefault();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user