Reduce vendor thank you message spam and add variety (#23746)
* Moved vendor thank you messages into AdvertisementPack, making them vendor-specific. Wrote a few example messages. * Only display thank yous when closing the UI after a purchase. * Tweaked a few messages * More custom messages * Missed one
This commit is contained in:
@@ -74,6 +74,17 @@ namespace Content.Server.Advertise
|
||||
_chat.TrySendInGameICMessage(uid, Loc.GetString(_random.Pick(advertisements.Advertisements)), InGameICChatType.Speak, true);
|
||||
}
|
||||
|
||||
public void SayThankYou(EntityUid uid, AdvertiseComponent? advertise = null)
|
||||
{
|
||||
if (!Resolve(uid, ref advertise))
|
||||
return;
|
||||
|
||||
if (_prototypeManager.TryIndex(advertise.PackPrototypeId, out AdvertisementsPackPrototype? advertisements))
|
||||
{
|
||||
_chat.TrySendInGameICMessage(uid, Loc.GetString(_random.Pick(advertisements.ThankYous), ("name", Name(uid))), InGameICChatType.Speak, true);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetEnabled(EntityUid uid, bool enable, AdvertiseComponent? advertise = null)
|
||||
{
|
||||
if (!Resolve(uid, ref advertise))
|
||||
|
||||
Reference in New Issue
Block a user