* Adds uses before delay so actions can be used multiple times before cooldown * adds methods to get remaining charges, to set uses before delay, and to set use delay * adds method to change action name * moves set usedelay * action upgrade ECS * adds method to reset remaining uses * adds upgrade events * refactors action upgrade event and adds logic to parse it * fix serialization issue * adds level up draft method * adds action commands and a command to upgrade an action * more warning lines to help * Gets action to upgrade properly * Removes unneeded fields from the action upgrade component and now properly raises the level of the new action * Cleans up dead code and comments * Fixes punctuation in actions-commands and adds a TryUpgradeAction method. * removes TODO comment * robust fix * removes RT * readds RT * update RT to 190 * removes change name method * removes remaining uses & related fields and adds that functionality to charges * Adds Charges to action tooltips that require it
25 lines
791 B
C#
25 lines
791 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>
|
|
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
|
|
}
|