Make only advertise vendors say thanks for using (#23726)
* :trollface: * :trollface: 2
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Server.Advertise;
|
||||
using Content.Server.Cargo.Systems;
|
||||
using Content.Server.Chat.Systems;
|
||||
using Content.Server.Emp;
|
||||
@@ -386,8 +387,11 @@ namespace Content.Server.VendingMachines
|
||||
_throwingSystem.TryThrow(ent, direction, vendComponent.NonLimitedEjectForce);
|
||||
}
|
||||
|
||||
// Send message after dispensing
|
||||
_chat.TrySendInGameICMessage(uid, Loc.GetString("vending-machine-thanks", ("name", Name(uid))), InGameICChatType.Speak, true);
|
||||
// Only vendors that advertise will send message after dispensing
|
||||
if (TryComp<AdvertiseComponent>(uid, out var advertise))
|
||||
{
|
||||
_chat.TrySendInGameICMessage(uid, Loc.GetString("vending-machine-thanks", ("name", Name(uid))), InGameICChatType.Speak, true);
|
||||
}
|
||||
|
||||
vendComponent.NextItemToEject = null;
|
||||
vendComponent.ThrowNextItem = false;
|
||||
|
||||
Reference in New Issue
Block a user