Vendors now will say "Thanks for using!" (#23023)
* comit1 * comit2 * comit 3 * Update Content.Server/VendingMachines/VendingMachineSystem.cs --------- Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using Content.Server.Cargo.Systems;
|
using Content.Server.Cargo.Systems;
|
||||||
|
using Content.Server.Chat.Systems;
|
||||||
using Content.Server.Emp;
|
using Content.Server.Emp;
|
||||||
using Content.Server.Power.Components;
|
using Content.Server.Power.Components;
|
||||||
using Content.Server.Power.EntitySystems;
|
using Content.Server.Power.EntitySystems;
|
||||||
@@ -35,6 +36,7 @@ namespace Content.Server.VendingMachines
|
|||||||
[Dependency] private readonly ThrowingSystem _throwingSystem = default!;
|
[Dependency] private readonly ThrowingSystem _throwingSystem = default!;
|
||||||
[Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!;
|
[Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!;
|
||||||
[Dependency] private readonly IGameTiming _timing = default!;
|
[Dependency] private readonly IGameTiming _timing = default!;
|
||||||
|
[Dependency] private readonly ChatSystem _chat = default!;
|
||||||
|
|
||||||
private ISawmill _sawmill = default!;
|
private ISawmill _sawmill = default!;
|
||||||
|
|
||||||
@@ -384,6 +386,9 @@ namespace Content.Server.VendingMachines
|
|||||||
_throwingSystem.TryThrow(ent, direction, vendComponent.NonLimitedEjectForce);
|
_throwingSystem.TryThrow(ent, direction, vendComponent.NonLimitedEjectForce);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Send message after dispensing
|
||||||
|
_chat.TrySendInGameICMessage(uid, Loc.GetString("vending-machine-thanks", ("name", Name(uid))), InGameICChatType.Speak, true);
|
||||||
|
|
||||||
vendComponent.NextItemToEject = null;
|
vendComponent.NextItemToEject = null;
|
||||||
vendComponent.ThrowNextItem = false;
|
vendComponent.ThrowNextItem = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
vending-machine-thanks = Thanks for using { $name }!
|
||||||
Reference in New Issue
Block a user