* Added TransferActionWithNewAttached and TransferAllActionsWithNewAttached and OnActionAdded event method to ActionContainerSystem. These are needed where the action needs to have a different attached entity for usage. Fixed a bug with not being able to upgrade actions between levels. Added a way to grant and remove a singular action. * adds an action container component to mind on action added to fix tests * Swaps trycomp for hascomp * Maybe this will fix the thests * Grants action container to performer as well * Wait that makes no sense, removing that * fixes mind action grant logic * Changes ent check back to netent check * Reverts unintended container changes
26 lines
811 B
C#
26 lines
811 B
C#
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Actions;
|
|
|
|
// For actions that can use basic upgrades
|
|
// Not all actions should be upgradable
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(ActionUpgradeSystem))]
|
|
public sealed partial class ActionUpgradeComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Current Level of the action.
|
|
/// </summary>
|
|
[ViewVariables]
|
|
public int Level = 1;
|
|
|
|
/// <summary>
|
|
/// What level(s) effect this action?
|
|
/// You can skip levels, so you can have this entity change at level 2 but then won't change again until level 5.
|
|
/// </summary>
|
|
[DataField("effectedLevels"), ViewVariables]
|
|
public Dictionary<int, EntProtoId> EffectedLevels = new();
|
|
|
|
// TODO: Branching level upgrades
|
|
}
|