serverization??? (#1457)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
using Content.Shared._CP14.MagicSpellStorage;
|
||||
|
||||
namespace Content.Client._CP14.MagicSpellStorage;
|
||||
|
||||
public sealed partial class CP14ClientSpellStorageSystem : CP14SharedSpellStorageSystem
|
||||
{
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
using Content.Shared._CP14.MagicSpellStorage.Components;
|
||||
using Content.Server._CP14.MagicSpellStorage.Components;
|
||||
using Content.Shared.Clothing;
|
||||
using Content.Shared.Hands;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpellStorage;
|
||||
namespace Content.Server._CP14.MagicSpellStorage;
|
||||
|
||||
public sealed partial class CP14SpellStorageSystem
|
||||
{
|
||||
@@ -1,24 +1,23 @@
|
||||
using Content.Server._CP14.MagicSpellStorage.Components;
|
||||
using Content.Shared._CP14.MagicSpell.Components;
|
||||
using Content.Shared._CP14.MagicSpell.Events;
|
||||
using Content.Shared._CP14.MagicSpellStorage.Components;
|
||||
using Content.Shared._CP14.MagicSpellStorage;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Hands.EntitySystems;
|
||||
using Content.Shared.Mind;
|
||||
using Robust.Shared.Network;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpellStorage;
|
||||
namespace Content.Server._CP14.MagicSpellStorage;
|
||||
|
||||
/// <summary>
|
||||
/// this part of the system is responsible for storing spells in items, and the methods players use to obtain them.
|
||||
/// </summary>
|
||||
public sealed partial class CP14SpellStorageSystem : EntitySystem
|
||||
public sealed partial class CP14SpellStorageSystem : CP14SharedSpellStorageSystem
|
||||
{
|
||||
[Dependency] private readonly ActionContainerSystem _actionContainer = default!;
|
||||
[Dependency] private readonly SharedActionsSystem _actions = default!;
|
||||
[Dependency] private readonly SharedMindSystem _mind = default!;
|
||||
[Dependency] private readonly SharedHandsSystem _hands = default!;
|
||||
[Dependency] private readonly INetManager _net = default!;
|
||||
[Dependency] private readonly DamageableSystem _damageable = default!;
|
||||
|
||||
public override void Initialize()
|
||||
@@ -41,9 +40,6 @@ public sealed partial class CP14SpellStorageSystem : EntitySystem
|
||||
/// </summary>
|
||||
private void OnMagicStorageInit(Entity<CP14SpellStorageComponent> storage, ref MapInitEvent args)
|
||||
{
|
||||
if (_net.IsClient)
|
||||
return;
|
||||
|
||||
foreach (var spell in storage.Comp.Spells)
|
||||
{
|
||||
var spellEnt = _actionContainer.AddAction(storage, spell);
|
||||
@@ -72,9 +68,6 @@ public sealed partial class CP14SpellStorageSystem : EntitySystem
|
||||
|
||||
private void OnMagicStorageShutdown(Entity<CP14SpellStorageComponent> mStorage, ref ComponentShutdown args)
|
||||
{
|
||||
if (_net.IsClient)
|
||||
return;
|
||||
|
||||
foreach (var spell in mStorage.Comp.SpellEntities)
|
||||
{
|
||||
QueueDel(spell);
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Content.Shared._CP14.MagicSpellStorage.Components;
|
||||
namespace Content.Server._CP14.MagicSpellStorage.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Denotes that this item's spells can be accessed while holding it in your hand
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Content.Shared._CP14.MagicSpellStorage.Components;
|
||||
namespace Content.Server._CP14.MagicSpellStorage.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Denotes that this item's spells can be accessed while wearing it on your body
|
||||
@@ -1,6 +1,6 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpellStorage.Components;
|
||||
namespace Content.Server._CP14.MagicSpellStorage.Components;
|
||||
|
||||
/// <summary>
|
||||
/// A component that allows you to store spells in items
|
||||
@@ -1,6 +1,6 @@
|
||||
using Content.Shared.Damage;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpellStorage.Components;
|
||||
namespace Content.Server._CP14.MagicSpellStorage.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Causes damage to the Spell storage when spells from it are used
|
||||
@@ -10,7 +10,7 @@ namespace Content.Shared._CP14.Demiplane.Components;
|
||||
public sealed partial class CP14DemiplaneTimedDestructionComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
public TimeSpan TimeToDestruction = TimeSpan.FromSeconds(130f);
|
||||
public TimeSpan TimeToDestruction = TimeSpan.FromSeconds(240f);
|
||||
|
||||
[DataField, AutoPausedField]
|
||||
public TimeSpan EndTime = TimeSpan.Zero;
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
using Content.Shared._CP14.MagicSpellStorage;
|
||||
using Content.Shared.FixedPoint;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Blocks the target from using magic if they are pacified.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem), typeof(CP14SpellStorageSystem))]
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
|
||||
public sealed partial class CP14MagicEffectPacifiedBlockComponent : Component
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Content.Shared._CP14.MagicRitual.Prototypes;
|
||||
using Content.Shared._CP14.MagicSpell.Spells;
|
||||
using Content.Shared._CP14.MagicSpellStorage;
|
||||
using Content.Shared._CP14.MagicSpellStorage.Components;
|
||||
using Content.Shared.DoAfter;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
@@ -10,7 +9,7 @@ namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
/// <summary>
|
||||
/// Stores the results and appearance of the magic effect
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem), typeof(CP14SpellStorageSystem))]
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem), typeof(CP14SharedSpellStorageSystem))]
|
||||
public sealed partial class CP14MagicEffectComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Content.Shared._CP14.MagicSpellStorage;
|
||||
using Content.Shared.FixedPoint;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
@@ -6,7 +5,7 @@ namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
/// <summary>
|
||||
/// Restricts the use of this action, by spending mana or user requirements.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem), typeof(CP14SpellStorageSystem))]
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
|
||||
public sealed partial class CP14MagicEffectManaCostComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using Content.Shared._CP14.MagicSpellStorage;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpell.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Restricts the use of this action, by spending stamina.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem), typeof(CP14SpellStorageSystem))]
|
||||
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
|
||||
public sealed partial class CP14MagicEffectStaminaCostComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace Content.Shared._CP14.MagicSpellStorage;
|
||||
|
||||
public abstract partial class CP14SharedSpellStorageSystem : EntitySystem
|
||||
{
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
namespace Content.Shared._CP14.MagicSpellStorage.Components;
|
||||
|
||||
/// <summary>
|
||||
/// The component allows you to use actions nested in an object not through hotbar, but through direct interaction with the object.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(CP14SpellStorageSystem))]
|
||||
public sealed partial class CP14SpellStorageInteractionComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The selected action will automatically attempt to be used when interacting with the item.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public int SelectedAction;
|
||||
}
|
||||
Reference in New Issue
Block a user