Tweaks (#559)
* - tweak: Less bee health. * - add: Uplink krait ammo. * - add: ContextMenuInteractionBlockerComponent. * - tweak: Update development config. * - fix: Folder naming. * - add: More logic.
@@ -1,16 +1,22 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using Content.Client.Actions;
|
||||||
using Content.Client.CombatMode;
|
using Content.Client.CombatMode;
|
||||||
using Content.Client.Examine;
|
using Content.Client.Examine;
|
||||||
using Content.Client.Gameplay;
|
using Content.Client.Gameplay;
|
||||||
using Content.Client.Popups;
|
using Content.Client.Popups;
|
||||||
|
using Content.Client.UserInterface.Systems.Actions;
|
||||||
using Content.Client.Verbs;
|
using Content.Client.Verbs;
|
||||||
using Content.Client.Verbs.UI;
|
using Content.Client.Verbs.UI;
|
||||||
|
using Content.Shared._White.Item;
|
||||||
|
using Content.Shared.Actions;
|
||||||
using Content.Shared.CCVar;
|
using Content.Shared.CCVar;
|
||||||
using Content.Shared.Examine;
|
using Content.Shared.Examine;
|
||||||
|
using Content.Shared.Hands.Components;
|
||||||
using Content.Shared.IdentityManagement;
|
using Content.Shared.IdentityManagement;
|
||||||
using Content.Shared.Input;
|
using Content.Shared.Input;
|
||||||
using Content.Shared.Mobs.Components;
|
using Content.Shared.Mobs.Components;
|
||||||
|
using Content.Shared.Ninja.Components;
|
||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
using Robust.Client.GameObjects;
|
using Robust.Client.GameObjects;
|
||||||
using Robust.Client.Graphics;
|
using Robust.Client.Graphics;
|
||||||
@@ -48,12 +54,14 @@ namespace Content.Client.ContextMenu.UI
|
|||||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||||
[Dependency] private readonly ContextMenuUIController _context = default!;
|
[Dependency] private readonly ContextMenuUIController _context = default!;
|
||||||
[Dependency] private readonly VerbMenuUIController _verb = default!;
|
[Dependency] private readonly VerbMenuUIController _verb = default!;
|
||||||
|
[Dependency] private readonly ActionUIController _controller = default!; // WD EDIT
|
||||||
|
|
||||||
[UISystemDependency] private readonly VerbSystem _verbSystem = default!;
|
[UISystemDependency] private readonly VerbSystem _verbSystem = default!;
|
||||||
[UISystemDependency] private readonly ExamineSystem _examineSystem = default!;
|
[UISystemDependency] private readonly ExamineSystem _examineSystem = default!;
|
||||||
[UISystemDependency] private readonly TransformSystem _xform = default!;
|
[UISystemDependency] private readonly TransformSystem _xform = default!;
|
||||||
[UISystemDependency] private readonly CombatModeSystem _combatMode = default!;
|
[UISystemDependency] private readonly CombatModeSystem _combatMode = default!;
|
||||||
[UISystemDependency] private readonly PopupSystem _popup = default!; // WD EDIT
|
[UISystemDependency] private readonly PopupSystem _popup = default!; // WD EDIT
|
||||||
|
[UISystemDependency] private readonly ActionsSystem _actions = default!; // WD EDIT
|
||||||
|
|
||||||
private bool _updating;
|
private bool _updating;
|
||||||
|
|
||||||
@@ -129,12 +137,8 @@ namespace Content.Client.ContextMenu.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
// WD START
|
// WD START
|
||||||
var localEntity = _playerManager.LocalEntity;
|
if (args.Function == EngineKeyFunctions.Use && !CheckForUseBlocker(entity.Value))
|
||||||
if (args.Function == EngineKeyFunctions.Use &&
|
|
||||||
EntityManager.HasComponent<MobStateComponent>(entity.Value) && entity.Value != localEntity)
|
|
||||||
{
|
{
|
||||||
_popup.PopupClient(Loc.GetString("context-menu-cant-interact"),
|
|
||||||
entity.Value, localEntity, PopupType.MediumCaution);
|
|
||||||
_context.Close();
|
_context.Close();
|
||||||
args.Handle();
|
args.Handle();
|
||||||
return;
|
return;
|
||||||
@@ -176,6 +180,43 @@ namespace Content.Client.ContextMenu.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WD START
|
||||||
|
private bool CheckForUseBlocker(EntityUid entity)
|
||||||
|
{
|
||||||
|
var localEntity = _playerManager.LocalEntity;
|
||||||
|
if (!EntityManager.TryGetComponent(localEntity, out HandsComponent? hands))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (!EntityManager.HasComponent<MobStateComponent>(entity) || entity == localEntity.Value)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (_controller.SelectingTargetFor is { } actionId &&
|
||||||
|
_actions.TryGetActionData(actionId, out var baseAction) && baseAction is EntityTargetActionComponent)
|
||||||
|
{
|
||||||
|
InteractFailPopup(entity, localEntity.Value);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var held = hands.ActiveHandEntity;
|
||||||
|
if (held != null)
|
||||||
|
{
|
||||||
|
if (!EntityManager.HasComponent<ContextMenuInteractionBlockerComponent>(held.Value))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (!EntityManager.HasComponent<StunProviderComponent>(localEntity.Value))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
InteractFailPopup(entity, localEntity.Value);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InteractFailPopup(EntityUid entity, EntityUid localEntity)
|
||||||
|
{
|
||||||
|
_popup.PopupClient(Loc.GetString("context-menu-cant-interact"), entity, localEntity,
|
||||||
|
PopupType.MediumCaution);
|
||||||
|
}
|
||||||
|
// WD END
|
||||||
|
|
||||||
private bool HandleOpenEntityMenu(in PointerInputCmdHandler.PointerInputCmdArgs args)
|
private bool HandleOpenEntityMenu(in PointerInputCmdHandler.PointerInputCmdArgs args)
|
||||||
{
|
{
|
||||||
if (args.State != BoundKeyState.Down)
|
if (args.State != BoundKeyState.Down)
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Content.Shared._White.Item;
|
||||||
|
|
||||||
|
[RegisterComponent]
|
||||||
|
public sealed partial class ContextMenuInteractionBlockerComponent : Component
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -32,3 +32,9 @@ enabled = false
|
|||||||
|
|
||||||
[white]
|
[white]
|
||||||
ert_load = false
|
ert_load = false
|
||||||
|
|
||||||
|
[stalin]
|
||||||
|
enabled = false
|
||||||
|
|
||||||
|
[aspects]
|
||||||
|
enabled = false
|
||||||
|
|||||||
@@ -23,4 +23,4 @@ alerts-blocked-name = Атака заблокирована
|
|||||||
alerts-blocked-desc = Невозможно блокировать некоторое время.
|
alerts-blocked-desc = Невозможно блокировать некоторое время.
|
||||||
melee-block-component-delay = Может блокировать атаку ближнего боя каждые {$delay} секунд.
|
melee-block-component-delay = Может блокировать атаку ближнего боя каждые {$delay} секунд.
|
||||||
|
|
||||||
context-menu-cant-interact = Невозможно взаимодействовать через контекстное меню!
|
context-menu-cant-interact = Невозможно взаимодействовать этим через контекстное меню!
|
||||||
|
|||||||
@@ -118,6 +118,12 @@ uplink-pistol-box-desc = Содержит 3 магазина на 10 патро
|
|||||||
uplink-pistol-box-caseless-name = Коробка с пистолетными магазинами (.25 безгильзовые)
|
uplink-pistol-box-caseless-name = Коробка с пистолетными магазинами (.25 безгильзовые)
|
||||||
uplink-pistol-box-caseless-desc = Содержит 3 магазина на 10 патронов. Совместимо с Коброй.
|
uplink-pistol-box-caseless-desc = Содержит 3 магазина на 10 патронов. Совместимо с Коброй.
|
||||||
|
|
||||||
|
uplink-grenade-blast-name = Фугасная граната
|
||||||
|
uplink-grenade-blast-desc = Маленький радиус поражения, большая мощность взрыва. Совместимо с Крайтом.
|
||||||
|
|
||||||
|
uplink-grenade-frag-name = Осколочная граната
|
||||||
|
uplink-grenade-frag-desc = Большой радиус поражения, маленькая мощность взрыва. Совместимо с Крайтом.
|
||||||
|
|
||||||
# Utility
|
# Utility
|
||||||
uplink-holopara-kit-name = Набор Голопаразита
|
uplink-holopara-kit-name = Набор Голопаразита
|
||||||
uplink-holopara-kit-desc =
|
uplink-holopara-kit-desc =
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
- type: MobThresholds
|
- type: MobThresholds
|
||||||
thresholds:
|
thresholds:
|
||||||
0: Alive
|
0: Alive
|
||||||
10: Dead
|
5: Dead
|
||||||
- type: Stamina
|
- type: Stamina
|
||||||
critThreshold: 10
|
critThreshold: 10
|
||||||
- type: DamageStateVisuals
|
- type: DamageStateVisuals
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
- HighRiskItem
|
- HighRiskItem
|
||||||
- type: StealTarget
|
- type: StealTarget
|
||||||
stealGroup: Hypospray
|
stealGroup: Hypospray
|
||||||
|
- type: ContextMenuInteractionBlocker
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: gorlex hypospray
|
name: gorlex hypospray
|
||||||
@@ -52,6 +53,7 @@
|
|||||||
onlyAffectsMobs: false
|
onlyAffectsMobs: false
|
||||||
- type: UseDelay
|
- type: UseDelay
|
||||||
delay: 0.5
|
delay: 0.5
|
||||||
|
- type: ContextMenuInteractionBlocker
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: borghypo
|
name: borghypo
|
||||||
@@ -76,6 +78,7 @@
|
|||||||
onlyAffectsMobs: false
|
onlyAffectsMobs: false
|
||||||
- type: UseDelay
|
- type: UseDelay
|
||||||
delay: 0.5
|
delay: 0.5
|
||||||
|
- type: ContextMenuInteractionBlocker
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: experimental hypospray
|
name: experimental hypospray
|
||||||
@@ -132,6 +135,7 @@
|
|||||||
price: 75 # These are limited supply items.
|
price: 75 # These are limited supply items.
|
||||||
- type: TrashOnSolutionEmpty
|
- type: TrashOnSolutionEmpty
|
||||||
solution: pen
|
solution: pen
|
||||||
|
- type: ContextMenuInteractionBlocker
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: emergency medipen
|
name: emergency medipen
|
||||||
@@ -465,6 +469,7 @@
|
|||||||
delay: 0.5
|
delay: 0.5
|
||||||
- type: StaticPrice # A new shitcurity meta
|
- type: StaticPrice # A new shitcurity meta
|
||||||
price: 75
|
price: 75
|
||||||
|
- type: ContextMenuInteractionBlocker
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: BaseItem
|
parent: BaseItem
|
||||||
|
|||||||
@@ -252,6 +252,26 @@
|
|||||||
categories:
|
categories:
|
||||||
- UplinkAmmo
|
- UplinkAmmo
|
||||||
|
|
||||||
|
- type: listing
|
||||||
|
id: UplinkGrendeBlast
|
||||||
|
name: uplink-grenade-blast-name
|
||||||
|
description: uplink-grenade-blast-desc
|
||||||
|
productEntity: GrenadeBlast
|
||||||
|
cost:
|
||||||
|
Telecrystal: 2
|
||||||
|
categories:
|
||||||
|
- UplinkAmmo
|
||||||
|
|
||||||
|
- type: listing
|
||||||
|
id: UplinkGrendeFrag
|
||||||
|
name: uplink-grenade-frag-name
|
||||||
|
description: uplink-grenade-frag-desc
|
||||||
|
productEntity: GrenadeFrag
|
||||||
|
cost:
|
||||||
|
Telecrystal: 2
|
||||||
|
categories:
|
||||||
|
- UplinkAmmo
|
||||||
|
|
||||||
- type: listing
|
- type: listing
|
||||||
id: UplinkMindSlaveImplanter
|
id: UplinkMindSlaveImplanter
|
||||||
name: uplink-mind-slave
|
name: uplink-mind-slave
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
deleteOnDrop: true
|
deleteOnDrop: true
|
||||||
- type: CultItem
|
- type: CultItem
|
||||||
canPickUp: false
|
canPickUp: false
|
||||||
|
- type: ContextMenuInteractionBlocker
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: BaseCultHand
|
parent: BaseCultHand
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 269 B |
|
Before Width: | Height: | Size: 399 B After Width: | Height: | Size: 399 B |
|
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 433 B After Width: | Height: | Size: 433 B |
|
Before Width: | Height: | Size: 420 B After Width: | Height: | Size: 420 B |
|
Before Width: | Height: | Size: 399 B After Width: | Height: | Size: 399 B |
|
Before Width: | Height: | Size: 475 B After Width: | Height: | Size: 475 B |
|
Before Width: | Height: | Size: 697 B After Width: | Height: | Size: 697 B |
|
Before Width: | Height: | Size: 550 B After Width: | Height: | Size: 550 B |
|
Before Width: | Height: | Size: 518 B After Width: | Height: | Size: 518 B |
|
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 520 B |
|
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 428 B |
|
Before Width: | Height: | Size: 419 B After Width: | Height: | Size: 419 B |
|
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 666 B |