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:
@@ -1,3 +1,4 @@
|
|||||||
|
using Content.Server.Damage.Components;
|
||||||
using Content.Server.DeviceLinking.Events;
|
using Content.Server.DeviceLinking.Events;
|
||||||
using Content.Server.DeviceLinking.Systems;
|
using Content.Server.DeviceLinking.Systems;
|
||||||
using Content.Server.Power.Components;
|
using Content.Server.Power.Components;
|
||||||
@@ -12,6 +13,7 @@ using Content.Shared.Inventory;
|
|||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
using Content.Shared.PowerCell;
|
using Content.Shared.PowerCell;
|
||||||
using Content.Shared.PowerCell.Components;
|
using Content.Shared.PowerCell.Components;
|
||||||
|
using Content.Shared.Throwing;
|
||||||
using Content.Shared.Timing;
|
using Content.Shared.Timing;
|
||||||
using Content.Shared.Toggleable;
|
using Content.Shared.Toggleable;
|
||||||
using Content.Shared.Verbs;
|
using Content.Shared.Verbs;
|
||||||
@@ -35,6 +37,8 @@ public sealed partial class EnergyDomeSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
|
||||||
|
SubscribeLocalEvent<DamageOtherOnHitComponent, ThrownEvent>(OnThrow);
|
||||||
|
|
||||||
//Generator events
|
//Generator events
|
||||||
SubscribeLocalEvent<EnergyDomeGeneratorComponent, MapInitEvent>(OnInit);
|
SubscribeLocalEvent<EnergyDomeGeneratorComponent, MapInitEvent>(OnInit);
|
||||||
|
|
||||||
@@ -62,6 +66,14 @@ public sealed partial class EnergyDomeSystem : EntitySystem
|
|||||||
SubscribeLocalEvent<EnergyDomeComponent, DamageChangedEvent>(OnDomeDamaged);
|
SubscribeLocalEvent<EnergyDomeComponent, DamageChangedEvent>(OnDomeDamaged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnThrow(Entity<DamageOtherOnHitComponent> ent, ref ThrownEvent args)
|
||||||
|
{
|
||||||
|
if (args.User == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
RaiseLocalEvent(args.User.Value, new EnergyDomeClothesTurnOffEvent());
|
||||||
|
}
|
||||||
|
|
||||||
private void OnClothesTurnOff(Entity<EnergyDomeGeneratorComponent> ent,
|
private void OnClothesTurnOff(Entity<EnergyDomeGeneratorComponent> ent,
|
||||||
ref InventoryRelayedEvent<EnergyDomeClothesTurnOffEvent> args)
|
ref InventoryRelayedEvent<EnergyDomeClothesTurnOffEvent> args)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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.
|
/// What will happen if all of the nuclear operatives will die. Used by LoneOpsSpawn event.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public RoundEndBehavior RoundEndBehavior = RoundEndBehavior.ShuttleCall;
|
public RoundEndBehavior RoundEndBehavior = RoundEndBehavior.InstantEnd;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Text for shuttle call if RoundEndBehavior is ShuttleCall.
|
/// Text for shuttle call if RoundEndBehavior is ShuttleCall.
|
||||||
|
|||||||
@@ -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.
|
/// The minimum amount of time after the round starts that the initial infected will be chosen.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public TimeSpan MinStartDelay = TimeSpan.FromMinutes(10);
|
public TimeSpan MinStartDelay = TimeSpan.FromMinutes(3);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The maximum amount of time after the round starts that the initial infected will be chosen.
|
/// The maximum amount of time after the round starts that the initial infected will be chosen.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public TimeSpan MaxStartDelay = TimeSpan.FromMinutes(15);
|
public TimeSpan MaxStartDelay = TimeSpan.FromMinutes(6);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The sound that plays when someone becomes an initial infected.
|
/// The sound that plays when someone becomes an initial infected.
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ using Robust.Shared.Prototypes;
|
|||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using Content.Server.StationEvents.Components;
|
||||||
using Content.Shared.FixedPoint;
|
using Content.Shared.FixedPoint;
|
||||||
using Content.Shared.Mind;
|
using Content.Shared.Mind;
|
||||||
|
|
||||||
@@ -683,9 +684,14 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
|
|||||||
: WinCondition.AllNukiesDead);
|
: WinCondition.AllNukiesDead);
|
||||||
|
|
||||||
SetWinType(uid, WinType.CrewMajor, nukeops, false);
|
SetWinType(uid, WinType.CrewMajor, nukeops, false);
|
||||||
_roundEndSystem.DoRoundEndBehavior(
|
|
||||||
nukeops.RoundEndBehavior, nukeops.EvacShuttleTime, nukeops.RoundEndTextSender,
|
// WD EDIT, check for all at once gamemode
|
||||||
nukeops.RoundEndTextShuttleCall, nukeops.RoundEndTextAnnouncement);
|
if (!GameTicker.GetActiveGameRules().Where(HasComp<RampingStationEventSchedulerComponent>).Any())
|
||||||
|
{
|
||||||
|
_roundEndSystem.DoRoundEndBehavior(
|
||||||
|
nukeops.RoundEndBehavior, nukeops.EvacShuttleTime, nukeops.RoundEndTextSender,
|
||||||
|
nukeops.RoundEndTextShuttleCall, nukeops.RoundEndTextAnnouncement);
|
||||||
|
}
|
||||||
|
|
||||||
// prevent it called multiple times
|
// prevent it called multiple times
|
||||||
nukeops.RoundEndBehavior = RoundEndBehavior.Nothing;
|
nukeops.RoundEndBehavior = RoundEndBehavior.Nothing;
|
||||||
|
|||||||
@@ -107,10 +107,8 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
|
|||||||
if (CheckCommandLose())
|
if (CheckCommandLose())
|
||||||
{
|
{
|
||||||
// WD EDIT START
|
// WD EDIT START
|
||||||
// Basically check for all in once gamemode
|
// Check for all at once gamemode
|
||||||
if (_gameTicker.GetActiveGameRules().Where(HasComp<RampingStationEventSchedulerComponent>).Any())
|
if (!_gameTicker.GetActiveGameRules().Where(HasComp<RampingStationEventSchedulerComponent>).Any())
|
||||||
_roundEnd.DoRoundEndBehavior(RoundEndBehavior.ShuttleCall, component.ShuttleCallTime);
|
|
||||||
else
|
|
||||||
_roundEnd.EndRound();
|
_roundEnd.EndRound();
|
||||||
|
|
||||||
// WD EDIT END
|
// WD EDIT END
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using Content.Shared.Item;
|
|||||||
using Content.Shared.Bed.Sleep;
|
using Content.Shared.Bed.Sleep;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using Content.Server._White.Wizard;
|
||||||
using Content.Server.Bible.Components;
|
using Content.Server.Bible.Components;
|
||||||
using Content.Server.Maps;
|
using Content.Server.Maps;
|
||||||
using Content.Server.Revenant.Components;
|
using Content.Server.Revenant.Components;
|
||||||
@@ -335,10 +336,12 @@ public sealed partial class RevenantSystem
|
|||||||
|
|
||||||
// WD START
|
// WD START
|
||||||
var cultistQuery = GetEntityQuery<CultistComponent>();
|
var cultistQuery = GetEntityQuery<CultistComponent>();
|
||||||
|
var wizardQuery = GetEntityQuery<WizardComponent>();
|
||||||
var humanoidQuery = GetEntityQuery<HumanoidAppearanceComponent>();
|
var humanoidQuery = GetEntityQuery<HumanoidAppearanceComponent>();
|
||||||
foreach (var e in _lookup.GetEntitiesInRange(uid, component.BlightRadius))
|
foreach (var e in _lookup.GetEntitiesInRange(uid, component.BlightRadius))
|
||||||
{
|
{
|
||||||
if (!humanoidQuery.HasComponent(e) || !_mobState.IsAlive(e) || cultistQuery.HasComponent(e))
|
if (!humanoidQuery.HasComponent(e) || !_mobState.IsAlive(e) || cultistQuery.HasComponent(e) ||
|
||||||
|
wizardQuery.HasComponent(e))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var blight = EnsureComp<BlightComponent>(e);
|
var blight = EnsureComp<BlightComponent>(e);
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace Content.Server.RoundEnd
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Countdown to use where there is no station alert countdown to be found.
|
/// Countdown to use where there is no station alert countdown to be found.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TimeSpan DefaultCountdownDuration { get; set; } = TimeSpan.FromMinutes(10);
|
public TimeSpan DefaultCountdownDuration { get; set; } = TimeSpan.FromMinutes(5);
|
||||||
|
|
||||||
private CancellationTokenSource? _countdownTokenSource;
|
private CancellationTokenSource? _countdownTokenSource;
|
||||||
private CancellationTokenSource? _cooldownTokenSource;
|
private CancellationTokenSource? _cooldownTokenSource;
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ public sealed class CultRuleSystem : GameRuleSystem<CultRuleComponent>
|
|||||||
|
|
||||||
cult.WinCondition = CultWinCondition.Failure;
|
cult.WinCondition = CultWinCondition.Failure;
|
||||||
|
|
||||||
// Check for all in once gamemode
|
// Check for all at once gamemode
|
||||||
if (!GameTicker.GetActiveGameRules().Where(HasComp<RampingStationEventSchedulerComponent>).Any())
|
if (!GameTicker.GetActiveGameRules().Where(HasComp<RampingStationEventSchedulerComponent>).Any())
|
||||||
_roundEndSystem.EndRound();
|
_roundEndSystem.EndRound();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,14 +13,18 @@ using Content.Server.Emp;
|
|||||||
using Content.Server.EUI;
|
using Content.Server.EUI;
|
||||||
using Content.Server.Lightning;
|
using Content.Server.Lightning;
|
||||||
using Content.Server.Magic;
|
using Content.Server.Magic;
|
||||||
|
using Content.Server.Mind;
|
||||||
using Content.Server.Singularity.EntitySystems;
|
using Content.Server.Singularity.EntitySystems;
|
||||||
using Content.Server.Standing;
|
using Content.Server.Standing;
|
||||||
using Content.Server.Weapons.Ranged.Systems;
|
using Content.Server.Weapons.Ranged.Systems;
|
||||||
using Content.Shared._White.BetrayalDagger;
|
using Content.Shared._White.BetrayalDagger;
|
||||||
|
using Content.Shared._White.Cult.Components;
|
||||||
using Content.Shared._White.Events;
|
using Content.Shared._White.Events;
|
||||||
using Content.Shared._White.Wizard;
|
using Content.Shared._White.Wizard;
|
||||||
using Content.Shared._White.Wizard.Magic;
|
using Content.Shared._White.Wizard.Magic;
|
||||||
using Content.Shared.Actions;
|
using Content.Shared.Actions;
|
||||||
|
using Content.Shared.Borer;
|
||||||
|
using Content.Shared.Changeling;
|
||||||
using Content.Shared.Cluwne;
|
using Content.Shared.Cluwne;
|
||||||
using Content.Shared.Coordinates.Helpers;
|
using Content.Shared.Coordinates.Helpers;
|
||||||
using Content.Shared.Hands.Components;
|
using Content.Shared.Hands.Components;
|
||||||
@@ -35,6 +39,7 @@ using Content.Shared.Maps;
|
|||||||
using Content.Shared.Mobs.Components;
|
using Content.Shared.Mobs.Components;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
|
using Content.Shared.Revolutionary.Components;
|
||||||
using Content.Shared.StatusEffect;
|
using Content.Shared.StatusEffect;
|
||||||
using Content.Shared.Throwing;
|
using Content.Shared.Throwing;
|
||||||
using Robust.Shared.Audio.Systems;
|
using Robust.Shared.Audio.Systems;
|
||||||
@@ -71,6 +76,8 @@ public sealed class WizardSpellsSystem : EntitySystem
|
|||||||
[Dependency] private readonly StandingStateSystem _standing = default!;
|
[Dependency] private readonly StandingStateSystem _standing = default!;
|
||||||
[Dependency] private readonly TelefragSystem _telefrag = default!;
|
[Dependency] private readonly TelefragSystem _telefrag = default!;
|
||||||
[Dependency] private readonly EuiManager _euiManager = default!;
|
[Dependency] private readonly EuiManager _euiManager = default!;
|
||||||
|
[Dependency] private readonly MindSystem _mindSystem = default!;
|
||||||
|
[Dependency] private readonly ActionContainerSystem _actionContainer = default!;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -78,6 +85,7 @@ public sealed class WizardSpellsSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
|
||||||
|
SubscribeLocalEvent<MindswapSpellEvent>(OnMindswapSpell);
|
||||||
SubscribeLocalEvent<TeleportSpellEvent>(OnTeleportSpell);
|
SubscribeLocalEvent<TeleportSpellEvent>(OnTeleportSpell);
|
||||||
SubscribeLocalEvent<InstantRecallSpellEvent>(OnInstantRecallSpell);
|
SubscribeLocalEvent<InstantRecallSpellEvent>(OnInstantRecallSpell);
|
||||||
SubscribeLocalEvent<MimeTouchSpellEvent>(OnMimeTouchSpell);
|
SubscribeLocalEvent<MimeTouchSpellEvent>(OnMimeTouchSpell);
|
||||||
@@ -95,6 +103,73 @@ public sealed class WizardSpellsSystem : EntitySystem
|
|||||||
SubscribeLocalEvent<MagicComponent, BeforeCastSpellEvent>(OnBeforeCastSpell);
|
SubscribeLocalEvent<MagicComponent, BeforeCastSpellEvent>(OnBeforeCastSpell);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Mindswap
|
||||||
|
|
||||||
|
private void OnMindswapSpell(MindswapSpellEvent msg)
|
||||||
|
{
|
||||||
|
if (!CanCast(msg))
|
||||||
|
return;
|
||||||
|
|
||||||
|
var target = msg.Target;
|
||||||
|
var uid = msg.Performer;
|
||||||
|
|
||||||
|
if (HasComp<ChangelingComponent>(target) || HasComp<RevolutionaryComponent>(target) ||
|
||||||
|
HasComp<CultistComponent>(target))
|
||||||
|
{
|
||||||
|
_popupSystem.PopupEntity("Не работает на культистов, генокрадов и революционеров.", uid, uid,
|
||||||
|
PopupType.MediumCaution);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TryComp(target, out InfestedBorerComponent? borer) && borer.ControllingBrain)
|
||||||
|
{
|
||||||
|
_popupSystem.PopupEntity("Им уже кто-то управляет.", uid, uid, PopupType.MediumCaution);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var userHasMind = _mindSystem.TryGetMind(uid, out var mindId, out var mind);
|
||||||
|
var targetHasMind = _mindSystem.TryGetMind(target, out var targetMindId, out var targetMind);
|
||||||
|
|
||||||
|
if (!userHasMind)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_mindSystem.TransferTo(mindId, target, mind: mind);
|
||||||
|
|
||||||
|
if (targetHasMind)
|
||||||
|
{
|
||||||
|
_mindSystem.TransferTo(targetMindId, uid, mind: targetMind);
|
||||||
|
_popupSystem.PopupEntity(Loc.GetString("Ваш разум подменили!"), uid, uid, PopupType.LargeCaution);
|
||||||
|
}
|
||||||
|
|
||||||
|
TransferAllMagicActions(uid, target);
|
||||||
|
|
||||||
|
_standing.TryLieDown(uid);
|
||||||
|
_standing.TryLieDown(target);
|
||||||
|
|
||||||
|
msg.Handled = true;
|
||||||
|
Speak(msg);
|
||||||
|
|
||||||
|
var hasWiz = HasComp<WizardComponent>(uid);
|
||||||
|
var targetHasWiz = HasComp<WizardComponent>(target);
|
||||||
|
|
||||||
|
if (hasWiz == targetHasWiz)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (hasWiz)
|
||||||
|
{
|
||||||
|
RemComp<WizardComponent>(uid);
|
||||||
|
EnsureComp<WizardComponent>(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetHasWiz)
|
||||||
|
{
|
||||||
|
RemComp<WizardComponent>(target);
|
||||||
|
EnsureComp<WizardComponent>(uid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Teleport
|
#region Teleport
|
||||||
|
|
||||||
private void OnTeleportSpell(TeleportSpellEvent msg)
|
private void OnTeleportSpell(TeleportSpellEvent msg)
|
||||||
@@ -797,27 +872,48 @@ public sealed class WizardSpellsSystem : EntitySystem
|
|||||||
private void OnBeforeCastSpell(Entity<MagicComponent> ent, ref BeforeCastSpellEvent args)
|
private void OnBeforeCastSpell(Entity<MagicComponent> ent, ref BeforeCastSpellEvent args)
|
||||||
{
|
{
|
||||||
var comp = ent.Comp;
|
var comp = ent.Comp;
|
||||||
|
|
||||||
|
if (!comp.RequiresClothes)
|
||||||
|
return;
|
||||||
|
|
||||||
var hasReqs = false;
|
var hasReqs = false;
|
||||||
|
|
||||||
if (comp.RequiresClothes)
|
var enumerator = _inventory.GetSlotEnumerator(args.Performer, SlotFlags.OUTERCLOTHING | SlotFlags.HEAD);
|
||||||
|
while (enumerator.MoveNext(out var containerSlot))
|
||||||
{
|
{
|
||||||
var enumerator = _inventory.GetSlotEnumerator(args.Performer, SlotFlags.OUTERCLOTHING | SlotFlags.HEAD);
|
if (containerSlot.ContainedEntity is { } item)
|
||||||
while (enumerator.MoveNext(out var containerSlot))
|
hasReqs = HasComp<WizardClothesComponent>(item);
|
||||||
{
|
else
|
||||||
if (containerSlot.ContainedEntity is { } item)
|
hasReqs = false;
|
||||||
hasReqs = HasComp<WizardClothesComponent>(item);
|
|
||||||
else
|
|
||||||
hasReqs = false;
|
|
||||||
|
|
||||||
if (!hasReqs)
|
if (!hasReqs)
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasReqs)
|
if (hasReqs)
|
||||||
|
return;
|
||||||
|
|
||||||
|
args.Cancelled = true;
|
||||||
|
_popupSystem.PopupEntity(Loc.GetString("magic-component-missing-req"), args.Performer, args.Performer);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TransferAllMagicActions(EntityUid uid1, EntityUid uid2)
|
||||||
|
{
|
||||||
|
if (!TryComp(uid1, out ActionsContainerComponent? container1) ||
|
||||||
|
!TryComp(uid2, out ActionsContainerComponent? container2))
|
||||||
|
return;
|
||||||
|
|
||||||
|
var actions1 = container1.Container.ContainedEntities.Where(HasComp<MagicComponent>).ToList();
|
||||||
|
var actions2 = container2.Container.ContainedEntities.Where(HasComp<MagicComponent>).ToList();
|
||||||
|
|
||||||
|
foreach (var act in actions1)
|
||||||
{
|
{
|
||||||
args.Cancelled = true;
|
_actionContainer.TransferActionWithNewAttached(act, uid2, uid2, container: container2);
|
||||||
_popupSystem.PopupEntity(Loc.GetString("magic-component-missing-req"), args.Performer, args.Performer);
|
}
|
||||||
|
|
||||||
|
foreach (var act in actions2)
|
||||||
|
{
|
||||||
|
_actionContainer.TransferActionWithNewAttached(act, uid1, uid1, container: container1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public sealed partial class WizardRuleComponent : Component
|
|||||||
[DataField]
|
[DataField]
|
||||||
public ProtoId<NpcFactionPrototype> Faction = "Wizard";
|
public ProtoId<NpcFactionPrototype> Faction = "Wizard";
|
||||||
|
|
||||||
public RoundEndBehavior RoundEndBehavior = RoundEndBehavior.ShuttleCall;
|
public RoundEndBehavior RoundEndBehavior = RoundEndBehavior.InstantEnd;
|
||||||
|
|
||||||
[DataField]
|
[DataField]
|
||||||
public string RoundEndTextSender = "comms-console-announcement-title-centcom";
|
public string RoundEndTextSender = "comms-console-announcement-title-centcom";
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ using Robust.Shared.Prototypes;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Server.Objectives;
|
using Content.Server.Objectives;
|
||||||
using Content.Server.Station.Components;
|
using Content.Server.Station.Components;
|
||||||
|
using Content.Server.StationEvents.Components;
|
||||||
using Content.Shared.Mind;
|
using Content.Shared.Mind;
|
||||||
using Content.Shared.NPC.Components;
|
using Content.Shared.NPC.Components;
|
||||||
using Content.Shared.Objectives.Components;
|
using Content.Shared.Objectives.Components;
|
||||||
@@ -62,7 +63,6 @@ public sealed class WizardRuleSystem : GameRuleSystem<WizardRuleComponent>
|
|||||||
SubscribeLocalEvent<RoundStartAttemptEvent>(OnStartAttempt);
|
SubscribeLocalEvent<RoundStartAttemptEvent>(OnStartAttempt);
|
||||||
SubscribeLocalEvent<RulePlayerSpawningEvent>(OnPlayersSpawning);
|
SubscribeLocalEvent<RulePlayerSpawningEvent>(OnPlayersSpawning);
|
||||||
SubscribeLocalEvent<GameRunLevelChangedEvent>(OnRunLevelChanged);
|
SubscribeLocalEvent<GameRunLevelChangedEvent>(OnRunLevelChanged);
|
||||||
SubscribeLocalEvent<WizardComponent, ComponentRemove>(OnComponentRemove);
|
|
||||||
SubscribeLocalEvent<WizardComponent, MobStateChangedEvent>(OnMobStateChanged);
|
SubscribeLocalEvent<WizardComponent, MobStateChangedEvent>(OnMobStateChanged);
|
||||||
SubscribeLocalEvent<WizardComponent, GhostRoleSpawnerUsedEvent>(OnPlayersGhostSpawning);
|
SubscribeLocalEvent<WizardComponent, GhostRoleSpawnerUsedEvent>(OnPlayersGhostSpawning);
|
||||||
SubscribeLocalEvent<WizardComponent, MindAddedMessage>(OnMindAdded);
|
SubscribeLocalEvent<WizardComponent, MindAddedMessage>(OnMindAdded);
|
||||||
@@ -123,11 +123,6 @@ public sealed class WizardRuleSystem : GameRuleSystem<WizardRuleComponent>
|
|||||||
SpawnWizardGhostRole(uid, component);
|
SpawnWizardGhostRole(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnComponentRemove(EntityUid uid, WizardComponent component, ComponentRemove args)
|
|
||||||
{
|
|
||||||
CheckAnnouncement();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnMobStateChanged(EntityUid uid, WizardComponent component, MobStateChangedEvent ev)
|
private void OnMobStateChanged(EntityUid uid, WizardComponent component, MobStateChangedEvent ev)
|
||||||
{
|
{
|
||||||
if (ev.NewMobState == MobState.Dead)
|
if (ev.NewMobState == MobState.Dead)
|
||||||
@@ -249,6 +244,10 @@ public sealed class WizardRuleSystem : GameRuleSystem<WizardRuleComponent>
|
|||||||
|
|
||||||
private void CheckAnnouncement()
|
private void CheckAnnouncement()
|
||||||
{
|
{
|
||||||
|
// Check for all at once gamemode
|
||||||
|
if (GameTicker.GetActiveGameRules().Where(HasComp<RampingStationEventSchedulerComponent>).Any())
|
||||||
|
return;
|
||||||
|
|
||||||
var query = QueryActiveRules();
|
var query = QueryActiveRules();
|
||||||
while (query.MoveNext(out _, out _, out var wizard, out _))
|
while (query.MoveNext(out _, out _, out var wizard, out _))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using Content.Shared._White.Events;
|
||||||
using Content.Shared._White.WeaponModules;
|
using Content.Shared._White.WeaponModules;
|
||||||
using Content.Shared.ActionBlocker;
|
using Content.Shared.ActionBlocker;
|
||||||
using Content.Shared.Actions;
|
using Content.Shared.Actions;
|
||||||
@@ -353,6 +354,7 @@ public abstract partial class SharedGunSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RaiseLocalEvent(user, new EnergyDomeClothesTurnOffEvent()); // WD
|
||||||
// Shoot confirmed - sounds also played here in case it's invalid (e.g. cartridge already spent).
|
// Shoot confirmed - sounds also played here in case it's invalid (e.g. cartridge already spent).
|
||||||
Shoot(gunUid, gun, ev.Ammo, fromCoordinates, toCoordinates.Value, out var userImpulse, user, throwItems: attemptEv.ThrowItems);
|
Shoot(gunUid, gun, ev.Ammo, fromCoordinates, toCoordinates.Value, out var userImpulse, user, throwItems: attemptEv.ThrowItems);
|
||||||
var shotEv = new GunShotEvent(user, ev.Ammo);
|
var shotEv = new GunShotEvent(user, ev.Ammo);
|
||||||
|
|||||||
@@ -178,4 +178,10 @@ public sealed partial class TeleportSpellEvent : InstantActionEvent, ISpeakSpell
|
|||||||
public string? Speech { get; private set; }
|
public string? Speech { get; private set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public sealed partial class MindswapSpellEvent : EntityTargetActionEvent, ISpeakSpell
|
||||||
|
{
|
||||||
|
[DataField("speech")]
|
||||||
|
public string? Speech { get; private set; }
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ scroll-component-silence = тишину
|
|||||||
scroll-component-recall = призыв
|
scroll-component-recall = призыв
|
||||||
scroll-component-teleport = телепортацию
|
scroll-component-teleport = телепортацию
|
||||||
scroll-component-smite = кару
|
scroll-component-smite = кару
|
||||||
|
scroll-component-mindswap = подмену сознания
|
||||||
|
|
||||||
ent-BaseScroll = магический свиток
|
ent-BaseScroll = магический свиток
|
||||||
.desc = Этот древний пергамент, ставший реликвией в арканных преданиях, хранит в себе бесчисленные мистические заклятия и забытые заклинания.
|
.desc = Этот древний пергамент, ставший реликвией в арканных преданиях, хранит в себе бесчисленные мистические заклятия и забытые заклинания.
|
||||||
@@ -49,3 +50,5 @@ ent-ScrollTeleport = свиток телепортации
|
|||||||
.desc = { ent-BaseScroll.desc }
|
.desc = { ent-BaseScroll.desc }
|
||||||
ent-ScrollSmite = свиток кары
|
ent-ScrollSmite = свиток кары
|
||||||
.desc = { ent-BaseScroll.desc }
|
.desc = { ent-BaseScroll.desc }
|
||||||
|
ent-ScrollMindswap = свиток подмены сознания
|
||||||
|
.desc = { ent-BaseScroll.desc }
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ spellbook-recall-desc = { ent-ActionInstantRecallSpell.desc }
|
|||||||
spellbook-smite-name = { ent-ActionSmite }
|
spellbook-smite-name = { ent-ActionSmite }
|
||||||
spellbook-smite-desc = { ent-ActionSmite.desc }
|
spellbook-smite-desc = { ent-ActionSmite.desc }
|
||||||
|
|
||||||
|
spellbook-mindswap-name = { ent-ActionMindswapSpell }
|
||||||
|
spellbook-mindswap-desc = { ent-ActionMindswapSpell.desc }
|
||||||
|
|
||||||
spellbook-hardsuit-name = Скафандр волшебника
|
spellbook-hardsuit-name = Скафандр волшебника
|
||||||
spellbook-hardsuit-desc = Украшенный магическими драгоценными камнями скафандр, функционирующий так же, как и обычная мантия волшебника, но в то же время является пригодным для использования в космосе и бронированным. Небольшое замедление. Теперь вы можете произносить заклинания в космосе и местах с низкой температурой! Имеет функцию энергетического щита,который защищает от всех снарядов. Щит разряжается при получении урона и автоматически заряжается.
|
spellbook-hardsuit-desc = Украшенный магическими драгоценными камнями скафандр, функционирующий так же, как и обычная мантия волшебника, но в то же время является пригодным для использования в космосе и бронированным. Небольшое замедление. Теперь вы можете произносить заклинания в космосе и местах с низкой температурой! Имеет функцию энергетического щита,который защищает от всех снарядов. Щит разряжается при получении урона и автоматически заряжается.
|
||||||
|
|
||||||
|
|||||||
@@ -42,3 +42,6 @@ ent-ActionKnock = Стук
|
|||||||
|
|
||||||
ent-ActionSmite = Кара
|
ent-ActionSmite = Кара
|
||||||
.desc = Заряжает вашу руку мерзкой энергией, которую можно использовать для взрыва жертв. Заклинание требует, чтобы вы коснулись своей цели, поэтому вы не сможете использовать его в наручниках или будучи оглушённым. Не работает без волшебной мантии и шляпы.
|
.desc = Заряжает вашу руку мерзкой энергией, которую можно использовать для взрыва жертв. Заклинание требует, чтобы вы коснулись своей цели, поэтому вы не сможете использовать его в наручниках или будучи оглушённым. Не работает без волшебной мантии и шляпы.
|
||||||
|
|
||||||
|
ent-ActionMindswapSpell = Подмена сознания
|
||||||
|
.desc = Позволяет заклинателю переключаться между телами с целью. Вы должны быть рядом с целью, в которую хотите перейти, после чего вы оба будете нокаутированы. Не работает на культистов, генокрадов и революционеров.
|
||||||
|
|||||||
@@ -685,17 +685,19 @@
|
|||||||
toggleable-clothing: !type:ContainerSlot
|
toggleable-clothing: !type:ContainerSlot
|
||||||
- type: PowerCellSlot
|
- type: PowerCellSlot
|
||||||
cellSlotId: cell_slot
|
cellSlotId: cell_slot
|
||||||
|
fitsInCharger: false
|
||||||
- type: ItemSlots
|
- type: ItemSlots
|
||||||
slots:
|
slots:
|
||||||
cell_slot:
|
cell_slot:
|
||||||
name: power-cell-slot-component-slot-name-default
|
name: power-cell-slot-component-slot-name-default
|
||||||
startingItem: PowerCellMicroreactor
|
startingItem: PowerCellMicroreactor
|
||||||
|
disableEject: true
|
||||||
whitelist:
|
whitelist:
|
||||||
tags:
|
tags:
|
||||||
- PowerCell
|
- PowerCell
|
||||||
- PowerCellSmall
|
- PowerCellSmall
|
||||||
- type: EnergyDomeGenerator
|
- type: EnergyDomeGenerator
|
||||||
damageEnergyDraw: 5
|
damageEnergyDraw: 20
|
||||||
domePrototype: EnergyDomeSmallPink
|
domePrototype: EnergyDomeSmallPink
|
||||||
- type: ClothingSpeedModifier
|
- type: ClothingSpeedModifier
|
||||||
walkModifier: 0.9
|
walkModifier: 0.9
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
description: This spell opens nearby doors.
|
description: This spell opens nearby doors.
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
|
- type: Magic
|
||||||
|
requiresClothes: false
|
||||||
- type: InstantAction
|
- type: InstantAction
|
||||||
useDelay: 8
|
useDelay: 8
|
||||||
itemIconStyle: BigAction
|
itemIconStyle: BigAction
|
||||||
|
|||||||
@@ -38,6 +38,8 @@
|
|||||||
name: Force
|
name: Force
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
|
- type: Magic
|
||||||
|
requiresClothes: false
|
||||||
- type: WorldTargetAction
|
- type: WorldTargetAction
|
||||||
itemIconStyle: BigAction
|
itemIconStyle: BigAction
|
||||||
useDelay: 60
|
useDelay: 60
|
||||||
@@ -100,6 +102,8 @@
|
|||||||
name: Cards
|
name: Cards
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
|
- type: Magic
|
||||||
|
requiresClothes: false
|
||||||
- type: WorldTargetAction
|
- type: WorldTargetAction
|
||||||
itemIconStyle: BigAction
|
itemIconStyle: BigAction
|
||||||
useDelay: 60
|
useDelay: 60
|
||||||
@@ -167,6 +171,8 @@
|
|||||||
name: Blink
|
name: Blink
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
|
- type: Magic
|
||||||
|
requiresClothes: false
|
||||||
- type: InstantAction
|
- type: InstantAction
|
||||||
useDelay: 6
|
useDelay: 6
|
||||||
itemIconStyle: BigAction
|
itemIconStyle: BigAction
|
||||||
@@ -216,6 +222,8 @@
|
|||||||
name: Cluwne Curse
|
name: Cluwne Curse
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
|
- type: Magic
|
||||||
|
requiresClothes: false
|
||||||
- type: EntityTargetAction
|
- type: EntityTargetAction
|
||||||
whitelist:
|
whitelist:
|
||||||
components:
|
components:
|
||||||
@@ -235,6 +243,8 @@
|
|||||||
name: Banana Touch
|
name: Banana Touch
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
|
- type: Magic
|
||||||
|
requiresClothes: false
|
||||||
- type: EntityTargetAction
|
- type: EntityTargetAction
|
||||||
whitelist:
|
whitelist:
|
||||||
components:
|
components:
|
||||||
@@ -254,6 +264,8 @@
|
|||||||
name: Mime Touch
|
name: Mime Touch
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
|
- type: Magic
|
||||||
|
requiresClothes: false
|
||||||
- type: EntityTargetAction
|
- type: EntityTargetAction
|
||||||
whitelist:
|
whitelist:
|
||||||
components:
|
components:
|
||||||
@@ -273,6 +285,8 @@
|
|||||||
name: Instant Recall
|
name: Instant Recall
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
|
- type: Magic
|
||||||
|
requiresClothes: false
|
||||||
- type: InstantRecall
|
- type: InstantRecall
|
||||||
- type: InstantAction
|
- type: InstantAction
|
||||||
useDelay: 10
|
useDelay: 10
|
||||||
@@ -288,6 +302,8 @@
|
|||||||
name: Teleport
|
name: Teleport
|
||||||
noSpawn: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
|
- type: Magic
|
||||||
|
requiresClothes: false
|
||||||
- type: InstantAction
|
- type: InstantAction
|
||||||
checkCanInteract: false
|
checkCanInteract: false
|
||||||
useDelay: 60
|
useDelay: 60
|
||||||
@@ -297,3 +313,25 @@
|
|||||||
state: teleport
|
state: teleport
|
||||||
event: !type:TeleportSpellEvent
|
event: !type:TeleportSpellEvent
|
||||||
speech: "SCYAR FIDE!"
|
speech: "SCYAR FIDE!"
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: ActionMindswapSpell
|
||||||
|
name: Mindswap
|
||||||
|
noSpawn: true
|
||||||
|
components:
|
||||||
|
- type: Magic
|
||||||
|
requiresClothes: false
|
||||||
|
- type: EntityTargetAction
|
||||||
|
whitelist:
|
||||||
|
components:
|
||||||
|
- MindContainer
|
||||||
|
- ActionContainer
|
||||||
|
canTargetSelf: false
|
||||||
|
checkCanInteract: false
|
||||||
|
useDelay: 60
|
||||||
|
itemIconStyle: BigAction
|
||||||
|
icon:
|
||||||
|
sprite: Objects/Magic/magicactions.rsi
|
||||||
|
state: mindswap
|
||||||
|
event: !type:MindswapSpellEvent
|
||||||
|
speech: "GIN'YU CAPAN!"
|
||||||
|
|||||||
@@ -151,3 +151,12 @@
|
|||||||
- type: Scroll
|
- type: Scroll
|
||||||
actionId: ActionSmite
|
actionId: ActionSmite
|
||||||
learnPopup: scroll-component-smite
|
learnPopup: scroll-component-smite
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: ScrollMindswap
|
||||||
|
parent: BaseScroll
|
||||||
|
name: "Mindswap scroll"
|
||||||
|
components:
|
||||||
|
- type: Scroll
|
||||||
|
actionId: ActionMindswapSpell
|
||||||
|
learnPopup: scroll-component-mindswap
|
||||||
|
|||||||
@@ -222,13 +222,29 @@
|
|||||||
- !type:ListingLimitedStockCondition
|
- !type:ListingLimitedStockCondition
|
||||||
stock: 1
|
stock: 1
|
||||||
|
|
||||||
|
- type: listing
|
||||||
|
id: SpellBookMindswap
|
||||||
|
name: spellbook-mindswap-name
|
||||||
|
description: spellbook-mindswap-desc
|
||||||
|
productEntity: ScrollMindswap
|
||||||
|
icon:
|
||||||
|
sprite: Objects/Magic/magicactions.rsi
|
||||||
|
state: mindswap
|
||||||
|
cost:
|
||||||
|
SpellPoint: 2
|
||||||
|
categories:
|
||||||
|
- UtilitySpells
|
||||||
|
conditions:
|
||||||
|
- !type:ListingLimitedStockCondition
|
||||||
|
stock: 1
|
||||||
|
|
||||||
- type: listing
|
- type: listing
|
||||||
id: SpellBookHardsuit
|
id: SpellBookHardsuit
|
||||||
name: spellbook-hardsuit-name
|
name: spellbook-hardsuit-name
|
||||||
description: spellbook-hardsuit-desc
|
description: spellbook-hardsuit-desc
|
||||||
productEntity: ClothingOuterHardsuitWizard
|
productEntity: ClothingOuterHardsuitWizard
|
||||||
cost:
|
cost:
|
||||||
SpellPoint: 4
|
SpellPoint: 5
|
||||||
categories:
|
categories:
|
||||||
- MagicItems
|
- MagicItems
|
||||||
conditions:
|
conditions:
|
||||||
|
|||||||
@@ -57,6 +57,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "icebeam_active"
|
"name": "icebeam_active"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mindswap"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
Resources/Textures/Objects/Magic/magicactions.rsi/mindswap.png
Normal file
BIN
Resources/Textures/Objects/Magic/magicactions.rsi/mindswap.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 600 B |
Reference in New Issue
Block a user