Magic and gamerule tweaks (#363)
* - tweak: Wiz hardsuit tweaks. * - tweak: Gamemode tweaks. * - add: Mindswap spell. * - add: Transfer wizard component on mindswap. * - add: Wizard is blight immune.
This commit is contained in:
@@ -23,6 +23,7 @@ using Robust.Shared.Prototypes;
|
||||
using System.Linq;
|
||||
using Content.Server.Objectives;
|
||||
using Content.Server.Station.Components;
|
||||
using Content.Server.StationEvents.Components;
|
||||
using Content.Shared.Mind;
|
||||
using Content.Shared.NPC.Components;
|
||||
using Content.Shared.Objectives.Components;
|
||||
@@ -62,7 +63,6 @@ public sealed class WizardRuleSystem : GameRuleSystem<WizardRuleComponent>
|
||||
SubscribeLocalEvent<RoundStartAttemptEvent>(OnStartAttempt);
|
||||
SubscribeLocalEvent<RulePlayerSpawningEvent>(OnPlayersSpawning);
|
||||
SubscribeLocalEvent<GameRunLevelChangedEvent>(OnRunLevelChanged);
|
||||
SubscribeLocalEvent<WizardComponent, ComponentRemove>(OnComponentRemove);
|
||||
SubscribeLocalEvent<WizardComponent, MobStateChangedEvent>(OnMobStateChanged);
|
||||
SubscribeLocalEvent<WizardComponent, GhostRoleSpawnerUsedEvent>(OnPlayersGhostSpawning);
|
||||
SubscribeLocalEvent<WizardComponent, MindAddedMessage>(OnMindAdded);
|
||||
@@ -123,11 +123,6 @@ public sealed class WizardRuleSystem : GameRuleSystem<WizardRuleComponent>
|
||||
SpawnWizardGhostRole(uid, component);
|
||||
}
|
||||
|
||||
private void OnComponentRemove(EntityUid uid, WizardComponent component, ComponentRemove args)
|
||||
{
|
||||
CheckAnnouncement();
|
||||
}
|
||||
|
||||
private void OnMobStateChanged(EntityUid uid, WizardComponent component, MobStateChangedEvent ev)
|
||||
{
|
||||
if (ev.NewMobState == MobState.Dead)
|
||||
@@ -249,6 +244,10 @@ public sealed class WizardRuleSystem : GameRuleSystem<WizardRuleComponent>
|
||||
|
||||
private void CheckAnnouncement()
|
||||
{
|
||||
// Check for all at once gamemode
|
||||
if (GameTicker.GetActiveGameRules().Where(HasComp<RampingStationEventSchedulerComponent>).Any())
|
||||
return;
|
||||
|
||||
var query = QueryActiveRules();
|
||||
while (query.MoveNext(out _, out _, out var wizard, out _))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user