Magic 3 (#340)
* - add: Some tweaks and localization. * - add: Teleport spell. * - tweak: Tweak wizard hardsuit. * - add: Turn off shield on cast. * - add: New wizard clothes & update wizard shuttle, * - remove: Remove old clothes from shuttle. * - fix: No teleporting to centcomm.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Content.Shared._White.Events;
|
||||
using Content.Shared._White.StaminaProtection;
|
||||
using Content.Shared.Changeling;
|
||||
using Content.Shared.Chemistry;
|
||||
@@ -32,6 +33,7 @@ public partial class InventorySystem
|
||||
SubscribeLocalEvent<InventoryComponent, StaminaDamageModifyEvent>(RelayInventoryEvent); // WD
|
||||
SubscribeLocalEvent<InventoryComponent, ChemRegenModifyEvent>(RelayInventoryEvent); // WD
|
||||
SubscribeLocalEvent<InventoryComponent, ChangelingRefundEvent>(RelayInventoryEvent); // WD
|
||||
SubscribeLocalEvent<InventoryComponent, EnergyDomeClothesTurnOffEvent>(RelayInventoryEvent); // WD
|
||||
SubscribeLocalEvent<InventoryComponent, GetDefaultRadioChannelEvent>(RelayInventoryEvent);
|
||||
|
||||
// by-ref events
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
using Content.Shared.Inventory;
|
||||
|
||||
namespace Content.Shared._White.Events;
|
||||
|
||||
public sealed class EnergyDomeClothesTurnOffEvent : EntityEventArgs, IInventoryRelayEvent
|
||||
{
|
||||
public SlotFlags TargetSlots => SlotFlags.OUTERCLOTHING;
|
||||
}
|
||||
@@ -38,7 +38,8 @@ public abstract class SharedScrollSystem : EntitySystem
|
||||
if (args.Handled)
|
||||
return;
|
||||
|
||||
var doAfterEventArgs = new DoAfterArgs(EntityManager, args.User, component.LearnTime, new ScrollDoAfterEvent(), uid, target: uid)
|
||||
var doAfterEventArgs = new DoAfterArgs(EntityManager, args.User, component.LearnTime, new ScrollDoAfterEvent(),
|
||||
uid, target: uid)
|
||||
{
|
||||
BreakOnMove = true,
|
||||
BreakOnDamage = true,
|
||||
@@ -50,7 +51,9 @@ public abstract class SharedScrollSystem : EntitySystem
|
||||
_audioSystem.PlayPvs(component.UseSound, args.User);
|
||||
}
|
||||
|
||||
_popupSystem.PopupClient($"You start learning about {component.LearnPopup}.", args.User, args.User, PopupType.Medium);
|
||||
_popupSystem.PopupClient(
|
||||
Loc.GetString("scroll-component-start", ("subject", Loc.GetString(component.LearnPopup))), args.User,
|
||||
args.User, PopupType.Medium);
|
||||
|
||||
_doAfterSystem.TryStartDoAfter(doAfterEventArgs);
|
||||
|
||||
@@ -69,7 +72,9 @@ public abstract class SharedScrollSystem : EntitySystem
|
||||
_audioSystem.PlayEntity(component.AfterUseSound, args.User, args.User);
|
||||
}
|
||||
|
||||
_popupSystem.PopupClient($"You learned much about {component.LearnPopup}. The scroll is slowly burning in your hands.", args.User, args.User, PopupType.Medium);
|
||||
_popupSystem.PopupClient(
|
||||
Loc.GetString("scroll-component-end", ("subject", Loc.GetString(component.LearnPopup))), args.User,
|
||||
args.User, PopupType.Medium);
|
||||
|
||||
BurnScroll(uid);
|
||||
|
||||
@@ -80,7 +85,7 @@ public abstract class SharedScrollSystem : EntitySystem
|
||||
|
||||
#region Helpers
|
||||
|
||||
protected virtual void BurnScroll(EntityUid uid) {}
|
||||
protected virtual void BurnScroll(EntityUid uid) { }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using Content.Shared.Eui;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared._White.Wizard.Teleport;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class TeleportSpellEuiState : EuiStateBase
|
||||
{
|
||||
public Dictionary<int, string> Locations = new();
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class TeleportSpellTargetLocationSelected : EuiMessageBase
|
||||
{
|
||||
public int LocationUid;
|
||||
}
|
||||
@@ -172,4 +172,10 @@ public sealed partial class InstantRecallSpellEvent : InstantActionEvent, ISpeak
|
||||
public string? Speech { get; private set; }
|
||||
}
|
||||
|
||||
public sealed partial class TeleportSpellEvent : InstantActionEvent, ISpeakSpell
|
||||
{
|
||||
[DataField("speech")]
|
||||
public string? Speech { get; private set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user