Меньше попапов в чат (#143)

* add: less popups in chat

* fix: less brackets
This commit is contained in:
ThereDrD0
2024-02-29 13:36:13 +03:00
committed by GitHub
parent 97b0cb1acb
commit be32d673cb
21 changed files with 18 additions and 51 deletions

View File

@@ -198,8 +198,6 @@ public sealed class PlantHolderSystem : EntitySystem
{
_popup.PopupCursor(Loc.GetString("plant-holder-component-remove-weeds-message",
("name", Comp<MetaDataComponent>(uid).EntityName)), args.User, PopupType.Medium);
_popup.PopupEntity(Loc.GetString("plant-holder-component-remove-weeds-others-message",
("otherName", Comp<MetaDataComponent>(args.User).EntityName)), uid, Filter.PvsExcept(args.User), true);
component.WeedLevel = 0;
UpdateSprite(uid, component);
}
@@ -217,8 +215,6 @@ public sealed class PlantHolderSystem : EntitySystem
{
_popup.PopupCursor(Loc.GetString("plant-holder-component-remove-plant-message",
("name", Comp<MetaDataComponent>(uid).EntityName)), args.User, PopupType.Medium);
_popup.PopupEntity(Loc.GetString("plant-holder-component-remove-plant-others-message",
("name", Comp<MetaDataComponent>(args.User).EntityName)), uid, Filter.PvsExcept(args.User), true);
RemovePlant(uid, component);
}
else

View File

@@ -308,15 +308,9 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
private void OnThrowCollide(EntityUid uid, SharedDisposalUnitComponent component, ThrowHitByEvent args)
{
var canInsert = CanInsert(uid, component, args.Thrown);
var randDouble = _robustRandom.NextDouble();
if (!canInsert || randDouble > 0.75)
{
_audioSystem.PlayPvs(component.MissSound, uid);
_popupSystem.PopupEntity(Loc.GetString("disposal-unit-thrown-missed"), uid);
if (!canInsert) // WD edit
return;
}
var inserted = _containerSystem.Insert(args.Thrown, component.Container);

View File

@@ -390,7 +390,7 @@ public sealed class DrinkSystem : EntitySystem
Loc.GetString("drink-component-try-use-drink-success-slurp-taste", ("flavors", flavors)), args.User,
args.User);
_popup.PopupEntity($"{userName} делает глоток используя {used}", args.User, Filter.PvsExcept(args.User), true);
_popup.PopupEntity($"{userName} делает глоток из {used}", args.User, Filter.PvsExcept(args.User), true);
}
// log successful voluntary drinking

View File

@@ -323,7 +323,7 @@ namespace Content.Server.VendingMachines
if (_accessReader.IsAllowed(sender, uid, accessReader) || HasComp<EmaggedComponent>(uid))
return true;
Popup.PopupEntity(Loc.GetString("vending-machine-component-try-eject-access-denied"), uid);
Popup.PopupClient(Loc.GetString("vending-machine-component-try-eject-access-denied"), uid, sender);
Deny(uid, vendComponent);
return false;
}
@@ -351,14 +351,19 @@ namespace Content.Server.VendingMachines
if (entry == null)
{
Popup.PopupEntity(Loc.GetString("vending-machine-component-try-eject-invalid-item"), uid);
if (sender.HasValue)
Popup.PopupClient(Loc.GetString("vending-machine-component-try-eject-invalid-item"), uid, sender.Value);
Deny(uid, vendComponent);
return;
}
if (entry.Amount <= 0)
{
Popup.PopupEntity(Loc.GetString("vending-machine-component-try-eject-out-of-stock"), uid);
if (sender.HasValue)
Popup.PopupClient(Loc.GetString("vending-machine-component-try-eject-out-of-stock"), uid, sender.Value);
Deny(uid, vendComponent);
return;
}

View File

@@ -35,7 +35,8 @@ public sealed class NodeScannerSystem : EntitySystem
&& !_useDelay.TryResetDelay((uid, useDelay), true))
return;
_popupSystem.PopupEntity(Loc.GetString("node-scan-popup",
("id", $"{artifact.CurrentNodeId}")), target);
// WD edit
_popupSystem.PopupClient(Loc.GetString("node-scan-popup",
("id", $"{artifact.CurrentNodeId}")), target, args.User);
}
}

View File

@@ -50,8 +50,7 @@ public abstract class SharedCombatModeSystem : EntitySystem
if (!_netMan.IsClient || !Timing.IsFirstTimePredicted)
return;
var msg = component.IsInCombatMode ? "action-popup-combat-enabled" : "action-popup-combat-disabled";
_popup.PopupEntity(Loc.GetString(msg), args.Performer, args.Performer);
// WD edit
}
public void SetCanDisarm(EntityUid entity, bool canDisarm, CombatModeComponent? component = null)

View File

@@ -117,9 +117,8 @@ public sealed class ReflectSystem : EntitySystem
var newRot = rotation.RotateVec(locRot.ToVec());
_transform.SetLocalRotation(projectile, newRot.ToAngle());
if (_netManager.IsServer)
if (_netManager.IsServer) // WD edit
{
_popup.PopupEntity(Loc.GetString("reflect-shot"), user);
_audio.PlayPvs(reflect.SoundOnReflect, user, AudioHelpers.WithVariation(0.05f, _random));
}
@@ -176,9 +175,8 @@ public sealed class ReflectSystem : EntitySystem
return false;
}
if (_netManager.IsServer)
if (_netManager.IsServer) // WD edit
{
_popup.PopupEntity(Loc.GetString("reflect-shot"), user);
_audio.PlayPvs(reflect.SoundOnReflect, user, AudioHelpers.WithVariation(0.05f, _random));
}

View File

@@ -48,7 +48,5 @@ public sealed class BackstabSystem : EntitySystem
args.PenetrateArmor = ent.Comp.PenetrateArmor;
if (_net.IsServer)
_popup.PopupEntity($@"Backstab! {damage}", args.User, PopupType.MediumCaution);
}
}

View File

@@ -1,2 +0,0 @@
action-popup-combat-disabled = Combat mode disabled
action-popup-combat-enabled = Combat mode enabled

View File

@@ -18,9 +18,6 @@ disposal-eject-verb-get-data-text = Eject contents
## No hands
disposal-unit-no-hands = You don't have hands!
## missed
disposal-unit-thrown-missed = Missed!
# state
disposal-unit-state-Ready = Ready
# Yes I want it to always say Pressurizing

View File

@@ -71,7 +71,6 @@ petting-failure-medibot = You reach out to pet {THE($target)}, but {POSS-ADJ($ta
## Knocking on windows
# Shown when knocking on a window
comp-window-knock = *knock knock*
## Rattling fences

View File

@@ -1 +0,0 @@
reflect-shot = Reflected!

View File

@@ -11,4 +11,3 @@ comp-window-damaged-6 = It's extremely cracked and on the verge of shattering.
### Interaction Messages
# Shown when knocking on a window
comp-window-knock = *knock knock*

View File

@@ -1,7 +1,5 @@
action-name-combat = [color=red]Боевой режим[/color]
action-description-combat = Войти в боевой режим
action-popup-combat-disabled = Боевой режим отключён!
action-popup-combat-enabled = Боевой режим включён!
action-name-precision = [color=red]Прицельный режим[/color]
action-description-precision = Войдите в прицельный боевой режим, для атаки целей под курсором.
action-popup-precision = Прицельный режим отключён

View File

@@ -20,7 +20,7 @@ disposal-self-insert-verb-get-data-text = Залезть внутрь
disposal-unit-no-hands = У вас нет рук!
disposal-flush-verb-get-data-text = Смыть
disposal-unit-thrown-missed = Промах!
# state
disposal-unit-state-Ready = Готов
# Yes I want it to always say Pressurizing

View File

@@ -58,7 +58,6 @@ petting-failure-cleanbot = Вы тянетесь погладить { $target },
petting-failure-mimebot = Вы тянетесь погладить { THE($target) }, но { SUBJECT($target) } { CONJUGATE-BE($target) } занятый мимикацией!
petting-failure-medibot = Вы тянетесь погладить { $target }, но { $target } едва не пронзает вашу руку шприцом!
# Shown when knocking on a window
comp-window-knock = *тук-тук*
hugging-success-generic = Вы обнимаете { $target }.
hugging-success-generic-others = { CAPITALIZE($user) } обнимает { $target }.
hugging-success-generic-target = { CAPITALIZE($user) } обнимает вас.

View File

@@ -1 +0,0 @@
reflect-shot = Отражено!

View File

@@ -1,7 +1,3 @@
# Reflect
reflect-shot = Отразил!
# Carry
carry-verb = Тащить на руках

View File

@@ -10,5 +10,3 @@ comp-window-damaged-6 = Всё в глубоких трещинах, вот-во
### Interaction Messages
# Shown when knocking on a window
comp-window-knock = *тук-тук*

View File

@@ -95,8 +95,6 @@
lastSignals:
DoorStatus: false
- type: InteractionPopup
interactSuccessString: comp-window-knock
messagePerceivedByOthers: comp-window-knock
interactSuccessSound:
path: /Audio/Effects/glass_knock.ogg

View File

@@ -72,8 +72,6 @@
key: walls
base: window
- type: InteractionPopup
interactSuccessString: comp-window-knock
messagePerceivedByOthers: comp-window-knock
interactSuccessSound:
path: /Audio/Effects/glass_knock.ogg
- type: Construction
@@ -119,8 +117,6 @@
sprite: Structures/Windows/directional.rsi
state: window
- type: InteractionPopup
interactSuccessString: comp-window-knock
messagePerceivedByOthers: comp-window-knock
interactSuccessSound:
path: /Audio/Effects/glass_knock.ogg
- type: Physics
@@ -239,4 +235,4 @@
sprite: Structures/Windows/cracks_diagonal.rsi
- type: Construction
graph: WindowDiagonal
node: windowDiagonal
node: windowDiagonal