diff --git a/Content.Client/_White/Contract/UI/ContractorBUI.cs b/Content.Client/_White/Contract/UI/ContractorBUI.cs new file mode 100644 index 0000000000..041bcbc5e4 --- /dev/null +++ b/Content.Client/_White/Contract/UI/ContractorBUI.cs @@ -0,0 +1,10 @@ +namespace Content.Client._White.Contract.UI; + +public sealed class ContractorBUI : BoundUserInterface +{ + private ContractorWindow? _window; + + public ContractorBUI(EntityUid owner, Enum uiKey) : base(owner, uiKey) + { + } +} diff --git a/Content.Client/_White/Contract/UI/ContractorWindow.xaml b/Content.Client/_White/Contract/UI/ContractorWindow.xaml new file mode 100644 index 0000000000..0682bd2d87 --- /dev/null +++ b/Content.Client/_White/Contract/UI/ContractorWindow.xaml @@ -0,0 +1,42 @@ + + + + + + + + + + + diff --git a/Content.Client/_White/Contract/UI/ContractorWindow.xaml.cs b/Content.Client/_White/Contract/UI/ContractorWindow.xaml.cs new file mode 100644 index 0000000000..8316359b85 --- /dev/null +++ b/Content.Client/_White/Contract/UI/ContractorWindow.xaml.cs @@ -0,0 +1,17 @@ +using Content.Client.UserInterface.Controls; +using Robust.Client.AutoGenerated; +using Robust.Client.UserInterface.CustomControls; +using Robust.Client.UserInterface.XAML; + +namespace Content.Client._White.Contract.UI; + +[GenerateTypedNameReferences] +public sealed partial class ContractorWindow : DefaultWindow +{ + private readonly ContractorBoundUserInterface _owner; + public ContractorWindow() + { + RobustXamlLoader.Load(this); + IoCManager.InjectDependencies(this); + } +} diff --git a/Content.Server/Guardian/GuardianComponent.cs b/Content.Server/Guardian/GuardianComponent.cs index f9958f08f7..66a5ff04a8 100644 --- a/Content.Server/Guardian/GuardianComponent.cs +++ b/Content.Server/Guardian/GuardianComponent.cs @@ -78,5 +78,7 @@ public sealed partial class GuardianComponent : Component public EntProtoId Action = "ActionToggleGuardian"; [DataField] public EntityUid? ActionEntity; + + [DataField] public TimeSpan KnockDownCharger = TimeSpan.FromSeconds(2); } } diff --git a/Content.Server/Guardian/GuardianSystem.cs b/Content.Server/Guardian/GuardianSystem.cs index 1622a45576..c05383fab3 100644 --- a/Content.Server/Guardian/GuardianSystem.cs +++ b/Content.Server/Guardian/GuardianSystem.cs @@ -2,6 +2,7 @@ using Content.Server.Body.Systems; using Content.Server.Lightning; using Content.Server.Popups; +using Content.Server.Stunnable; using Content.Shared._White.Guardian; using Content.Shared.Actions; using Content.Shared.Damage; @@ -40,6 +41,7 @@ public sealed class GuardianSystem : EntitySystem [Dependency] private readonly SharedUserInterfaceSystem _ui = default!; [Dependency] private readonly LightningSystem _lightningSystem = default!; [Dependency] private readonly DamageableSystem _damageableSystem = default!; + [Dependency] private readonly StunSystem _stunSystem = default!; public override void Initialize() { @@ -305,6 +307,8 @@ private void OnGuardianAttackAttempt(EntityUid uid, GuardianComponent component, _handsSystem.TryDrop(target, hand); } + _stunSystem.TryKnockdown(target, component.KnockDownCharger, true); + component.IsCharged = false; } } diff --git a/Content.Shared/_White/Contract/ContractEntry.cs b/Content.Shared/_White/Contract/ContractEntry.cs new file mode 100644 index 0000000000..b8693d85bf --- /dev/null +++ b/Content.Shared/_White/Contract/ContractEntry.cs @@ -0,0 +1,51 @@ +using Robust.Shared.Serialization; + +namespace Content.Shared._White.Contract; + +[Serializable, NetSerializable] +public sealed partial class ContractEntry +{ + public string Id { get; set; } = string.Empty; + + public string Name { get; set; } = string.Empty; + + public string Description { get; set; } = string.Empty; + + public ContractDifficulty Difficulty { get; set; } = ContractDifficulty.Easy; + + public int TCReward { get; set; } + + public int ReputationReward { get; set; } + + public ContractStatus Status { get; set; } = ContractStatus.Available; + + public EntityUid Target { get; set; } + + public ContractEntry(string id, string name, string description, ContractDifficulty difficulty, int tcReward, int reputationReward, ContractStatus status, EntityUid target) + { + Id = id; + Name = name; + Description = description; + Difficulty = difficulty; + TCReward = tcReward; + ReputationReward = reputationReward; + Status = status; + Target = target; + } +} + +public enum ContractStatus : byte +{ + Available, + Active, + Completed, + Cancelled +} + +public enum ContractDifficulty : byte +{ + Easy, + Medium, + Hard +} + diff --git a/Content.Shared/_White/Contract/ContractorBoundUserInterfaceState.cs b/Content.Shared/_White/Contract/ContractorBoundUserInterfaceState.cs new file mode 100644 index 0000000000..a35ae5a4c2 --- /dev/null +++ b/Content.Shared/_White/Contract/ContractorBoundUserInterfaceState.cs @@ -0,0 +1,22 @@ +using Robust.Shared.Serialization; + +namespace Content.Shared._White.Contract +{ + [Serializable, NetSerializable] + public enum ContractorUplinkUiKey + { + Key + } + + public sealed class ContractorBoundUserInterfaceState : BoundUserInterfaceState + { + public readonly List Contracts; + public readonly int Reputation; + + public ContractorBoundUserInterfaceState(List contracts, int reputation) + { + Contracts = contracts; + Reputation = reputation; + } + } +} diff --git a/Resources/Prototypes/Entities/Mobs/Player/guardian.yml b/Resources/Prototypes/Entities/Mobs/Player/guardian.yml index 68192a5d50..94d1c23491 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/guardian.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/guardian.yml @@ -21,6 +21,7 @@ - type: MobMover - type: InputMover - type: Puller + needsHands: false - type: MovementSpeedModifier baseWalkSpeed: 4 baseSprintSpeed: 5.5 @@ -99,7 +100,7 @@ # From the uplink injector - type: entity - name: HoloparasiteStandart + name: Holoparasite id: MobHoloparasiteGuardianStandart parent: MobGuardianBase description: A mesmerising whirl of hard-light patterns weaves a marvelous, yet oddly familiar visage. It stands proud, tuning into its owner's life to sustain itself. @@ -157,7 +158,7 @@ task: SimpleHumanoidHostileCompound - type: entity - name: HoloparasiteAssasin + name: Holoparasite id: MobHoloparasiteGuardianAssasin parent: MobGuardianBase description: A mesmerising whirl of hard-light patterns weaves a marvelous, yet oddly familiar visage. It stands proud, tuning into its owner's life to sustain itself. @@ -215,7 +216,7 @@ task: SimpleHumanoidHostileCompound - type: entity - name: HoloparasiteCharger + name: Holoparasite id: MobHoloparasiteGuardianCharger parent: MobGuardianBase description: A mesmerising whirl of hard-light patterns weaves a marvelous, yet oddly familiar visage. It stands proud, tuning into its owner's life to sustain itself. @@ -270,7 +271,7 @@ task: SimpleHumanoidHostileCompound - type: entity - name: HoloparasiteLighting + name: Holoparasite id: MobHoloparasiteGuardianLighting parent: MobGuardianBase description: A mesmerising whirl of hard-light patterns weaves a marvelous, yet oddly familiar visage. It stands proud, tuning into its owner's life to sustain itself. diff --git a/Resources/Prototypes/_White/Contract/contractUplink.yml b/Resources/Prototypes/_White/Contract/contractUplink.yml new file mode 100644 index 0000000000..f33ce838c0 --- /dev/null +++ b/Resources/Prototypes/_White/Contract/contractUplink.yml @@ -0,0 +1,13 @@ +- type: entity + parent: BaseItem + id: SyndicateContractUplink + name: Аплинк контрактника + description: Suspiciously looking... + components: + - type: Sprite + sprite: White/Contract/contractor.rsi + state: icon + - type: Item + size: Normal + sprite: White/Contract/contractor.rsi + - type: GiftIgnore \ No newline at end of file diff --git a/Resources/Textures/White/Contract/contractor.rsi/icon.png b/Resources/Textures/White/Contract/contractor.rsi/icon.png new file mode 100644 index 0000000000..591b76510d Binary files /dev/null and b/Resources/Textures/White/Contract/contractor.rsi/icon.png differ diff --git a/Resources/Textures/White/Contract/contractor.rsi/meta.json b/Resources/Textures/White/Contract/contractor.rsi/meta.json new file mode 100644 index 0000000000..4a5e1447f6 --- /dev/null +++ b/Resources/Textures/White/Contract/contractor.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Base sprite taken by tg station, remade by CaypenNow", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + } + ] +} \ No newline at end of file