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:
Aviu00
2024-06-18 14:55:21 +00:00
committed by GitHub
parent 99629a2ba3
commit f25ad286b9
23 changed files with 238 additions and 37 deletions

View File

@@ -30,7 +30,7 @@ public sealed partial class NukeopsRuleComponent : Component
/// What will happen if all of the nuclear operatives will die. Used by LoneOpsSpawn event.
/// </summary>
[DataField]
public RoundEndBehavior RoundEndBehavior = RoundEndBehavior.ShuttleCall;
public RoundEndBehavior RoundEndBehavior = RoundEndBehavior.InstantEnd;
/// <summary>
/// Text for shuttle call if RoundEndBehavior is ShuttleCall.

View File

@@ -36,13 +36,13 @@ public sealed partial class ZombieRuleComponent : Component
/// The minimum amount of time after the round starts that the initial infected will be chosen.
/// </summary>
[DataField]
public TimeSpan MinStartDelay = TimeSpan.FromMinutes(10);
public TimeSpan MinStartDelay = TimeSpan.FromMinutes(3);
/// <summary>
/// The maximum amount of time after the round starts that the initial infected will be chosen.
/// </summary>
[DataField]
public TimeSpan MaxStartDelay = TimeSpan.FromMinutes(15);
public TimeSpan MaxStartDelay = TimeSpan.FromMinutes(6);
/// <summary>
/// The sound that plays when someone becomes an initial infected.

View File

@@ -45,6 +45,7 @@ using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Utility;
using System.Linq;
using Content.Server.StationEvents.Components;
using Content.Shared.FixedPoint;
using Content.Shared.Mind;
@@ -683,9 +684,14 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
: WinCondition.AllNukiesDead);
SetWinType(uid, WinType.CrewMajor, nukeops, false);
_roundEndSystem.DoRoundEndBehavior(
nukeops.RoundEndBehavior, nukeops.EvacShuttleTime, nukeops.RoundEndTextSender,
nukeops.RoundEndTextShuttleCall, nukeops.RoundEndTextAnnouncement);
// WD EDIT, check for all at once gamemode
if (!GameTicker.GetActiveGameRules().Where(HasComp<RampingStationEventSchedulerComponent>).Any())
{
_roundEndSystem.DoRoundEndBehavior(
nukeops.RoundEndBehavior, nukeops.EvacShuttleTime, nukeops.RoundEndTextSender,
nukeops.RoundEndTextShuttleCall, nukeops.RoundEndTextAnnouncement);
}
// prevent it called multiple times
nukeops.RoundEndBehavior = RoundEndBehavior.Nothing;

View File

@@ -107,10 +107,8 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
if (CheckCommandLose())
{
// WD EDIT START
// Basically check for all in once gamemode
if (_gameTicker.GetActiveGameRules().Where(HasComp<RampingStationEventSchedulerComponent>).Any())
_roundEnd.DoRoundEndBehavior(RoundEndBehavior.ShuttleCall, component.ShuttleCallTime);
else
// Check for all at once gamemode
if (!_gameTicker.GetActiveGameRules().Where(HasComp<RampingStationEventSchedulerComponent>).Any())
_roundEnd.EndRound();
// WD EDIT END
@@ -429,4 +427,4 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
EnsureComp<RevolutionaryComponent>(transferTo);
RemComp<RevolutionaryComponent>(transferFrom);
}
}
}