fish-station/Content.Shared/_Sunrise/Pets/PettableOnInteractComponent.cs
ThereDrD 8efeca7f48
Питомцы (#391)
* init

* port better radials

* change wizden radials to new radials

* minor radial ui refactor

* less redundant values

* cleanup

* minor cleanup + refactor

* rename action + base ghost logic

* ghost actions update

* attack action + better action granting

* add missing translation

* add debug entity for testing

* add radial actions sprites

* micro fixes

* translations for ghost panel

* fix attack action logic

* new pet action sprites

* better attack target action params

* add 2 new stock pets

* add translation string for new pets

* add additional checks for petting + cute effect for successful petting

* add transfer pets to new body logic for cloning and gibbing

* add summary for OnMasterGibbed

* add stock pets to loadout menu

* fix OnMasterGibbed logic and change it to OnMasterShutdown

* add localisation support

* add logic for shutdown pet component

* pets that spawned as loadout automatically linked now

* added new pets

* cleanup

* more pets

* ы

* фиксы

---------

Co-authored-by: SplikZerys <tronezero700@yandex.ru>
Co-authored-by: Vigers Ray <60344369+VigersRay@users.noreply.github.com>
Co-authored-by: Vigers Ray <vigersray@gmail.com>
2025-01-11 07:53:23 +03:00

47 lines
1.5 KiB
C#

using Content.Shared._Sunrise.Pets.Prototypes;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared._Sunrise.Pets;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedPettingSystem))]
public sealed partial class PettableOnInteractComponent : Component
{
/// <summary>
/// Владелец питомца. Для изменения использовать PettingSystem.SetMaster()
/// </summary>
[AutoNetworkedField]
public EntityUid? Master;
/// <summary>
/// Звук, который воспроизводится после успешного приручения
/// </summary>
[DataField]
public SoundCollectionSpecifier? PettingSuccessfulSound;
/// <summary>
/// Доступные кнопки в меню управления питомца
/// </summary>
[DataField, AutoNetworkedField]
public HashSet<ProtoId<PetControlPrototype>> AvailableControls = new();
/// <summary>
/// Доступные питомцу приказы
/// </summary>
[DataField(required: true)]
public HashSet<PetOrderType> AllowedOrders = new HashSet<PetOrderType> {PetOrderType.Follow, PetOrderType.Stay};
}
/// <summary>
/// Типы приказов для питомца
/// </summary>
[Serializable, NetSerializable]
public enum PetOrderType : byte
{
Stay,
Follow,
Attack,
}