Upstream core (#284)
* [Feature] Holo Update (#948) * Это база, основа, фундамент. * update icons * based2 * zamena headcoder * протоНовые функции Обновлены окна персонажа для отображения статистики и навыков игрока. Добавлена система боевой музыки, которая активируется во время боя. Реализована функция широковещательной передачи сообщений в чате для нескольких получателей. Внедрены изменения на основе навыков и статистики для медицинских систем, включая дефибриллятор и лечение. Улучшена система ближнего боя с новыми действиями и сообщениями. Введена система предсказуемого рандома для продвинутой генерации случайных значений. Навыки и статистика теперь зависят от назначений на работу. * abilities * zvuk * tweaks & fixes * sprite fix * govno * govno2 * fix govna * GOVNOOOOOOOOOOOO * finally * цена (cherry picked from commit cf4a7d0a7ccb780905e0df7db80d60d2338c02d0) * Automatic changelog update (cherry picked from commit 32a1f13849b4593fa03eafff99179814278f5f11) --------- Co-authored-by: RavmorganButOnCocaine <valtos@nextmail.ru>
This commit is contained in:
49
Content.Shared/Guardian/GuardianCreatorComponent.cs
Normal file
49
Content.Shared/Guardian/GuardianCreatorComponent.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using Content.Shared._White.Guardian;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Shared.Guardian
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a GuardianComponent attached to the user's GuardianHost.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class GuardianCreatorComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Counts as spent upon exhausting the injection
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// We don't mark as deleted as examine depends on this.
|
||||
/// </remarks>
|
||||
[DataField]
|
||||
public bool Used = false;
|
||||
|
||||
/// <summary>
|
||||
/// The prototype of the guardian entity which will be created
|
||||
/// </summary>
|
||||
[DataField("guardianProto",
|
||||
customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>),
|
||||
required: true)]
|
||||
public string GuardianProto;
|
||||
|
||||
/// <summary>
|
||||
/// How long it takes to inject someone.
|
||||
/// </summary>
|
||||
[DataField("delay")]
|
||||
public float InjectionDelay = 5f;
|
||||
|
||||
[DataField("guardiansAvaliable")]
|
||||
public IReadOnlyCollection<string> GuardiansAvaliable = ArraySegment<string>.Empty;
|
||||
|
||||
[DataField]
|
||||
public Dictionary<GuardianSelector, string> GuardianSelectorToProto = new()
|
||||
{
|
||||
{ GuardianSelector.Assasin, "MobHoloparasiteGuardianAssasin" },
|
||||
{ GuardianSelector.Standart, "MobHoloparasiteGuardianStandart" },
|
||||
{ GuardianSelector.Charger, "MobHoloparasiteGuardianCharger" },
|
||||
{ GuardianSelector.Lighting, "MobHoloparasiteGuardianLighting" }
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared._White.Guardian;
|
||||
using Content.Shared.DoAfter;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Guardian;
|
||||
@@ -6,4 +7,5 @@ namespace Content.Shared.Guardian;
|
||||
[Serializable, NetSerializable]
|
||||
public sealed partial class GuardianCreatorDoAfterEvent : SimpleDoAfterEvent
|
||||
{
|
||||
public GuardianSelector SelectedType; // Parsec Edit
|
||||
}
|
||||
|
||||
53
Content.Shared/_White/Guardian/GuardianEvents.cs
Normal file
53
Content.Shared/_White/Guardian/GuardianEvents.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using Content.Shared.Actions;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared._White.Guardian;
|
||||
|
||||
public enum GuardianSelector : byte
|
||||
{
|
||||
Assasin,
|
||||
Standart,
|
||||
Charger,
|
||||
Lighting
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum GuardianSelectorUiKey : byte
|
||||
{
|
||||
Key
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class GuardianSelectorBUIState : BoundUserInterfaceState
|
||||
{
|
||||
public IReadOnlyCollection<string> Ids { get; set; }
|
||||
|
||||
public NetEntity Target { get; set; }
|
||||
|
||||
public GuardianSelectorBUIState(IReadOnlyCollection<string> ids, NetEntity target)
|
||||
{
|
||||
Ids = ids;
|
||||
Target = target;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class GuardianSelectorSelectedBuiMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public GuardianSelector GuardianType;
|
||||
public NetEntity Target;
|
||||
|
||||
public GuardianSelectorSelectedBuiMessage(GuardianSelector guardianType, NetEntity target)
|
||||
{
|
||||
GuardianType = guardianType;
|
||||
Target = target;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed partial class ToggleGuardianPowerActionEvent : InstantActionEvent
|
||||
{
|
||||
}
|
||||
|
||||
public sealed partial class ChargerPowerActionEvent : InstantActionEvent
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user