KF2-LootedTraderInventory/LTI/Classes/LTI_LocalMessage.uc

89 lines
2.7 KiB
Ucode
Raw Permalink Normal View History

2023-05-14 00:22:31 +00:00
class LTI_LocalMessage extends Object
abstract;
var const String SyncItemsDefault;
var private localized String SyncItems;
var const String WaitingGRIDefault;
var private localized String WaitingGRI;
var const String IncompatibleGRIDefault;
var private localized String IncompatibleGRI;
2023-05-14 00:47:20 +00:00
var const String IncompatibleGRIWarningDefault;
var private localized String IncompatibleGRIWarning;
2023-05-14 00:22:31 +00:00
var const String NoneGRIDefault;
var private localized String NoneGRI;
var const String NoneGRIWarningDefault;
var private localized String NoneGRIWarning;
2023-05-14 00:22:31 +00:00
var const String SecondsShortDefault;
var private localized String SecondsShort;
2023-10-08 17:20:17 +00:00
var const String PleaseWaitDefault;
var private localized String PleaseWait;
2023-05-14 00:22:31 +00:00
enum E_LTI_LocalMessageType
{
LTI_SyncItems,
LTI_WaitingGRI,
LTI_IncompatibleGRI,
2023-05-14 00:47:20 +00:00
LTI_IncompatibleGRIWarning,
LTI_NoneGRI,
LTI_NoneGRIWarning,
2023-10-08 17:20:17 +00:00
LTI_SecondsShort,
LTI_PleaseWait
2023-05-14 00:22:31 +00:00
};
public static function String GetLocalizedString(
E_LogLevel LogLevel,
E_LTI_LocalMessageType LMT,
optional String String1,
optional String String2,
optional String String3)
{
`Log_TraceStatic();
switch (LMT)
{
case LTI_SyncItems:
return (default.SyncItems != "" ? default.SyncItems : default.SyncItemsDefault);
case LTI_WaitingGRI:
return (default.WaitingGRI != "" ? default.WaitingGRI : default.WaitingGRIDefault);
case LTI_IncompatibleGRI:
2023-05-14 00:47:20 +00:00
return (default.IncompatibleGRI != "" ? default.IncompatibleGRI : default.IncompatibleGRIDefault) @ String1;
2023-05-14 00:22:31 +00:00
2023-05-14 00:47:20 +00:00
case LTI_IncompatibleGRIWarning:
return (default.IncompatibleGRIWarning != "" ? default.IncompatibleGRIWarning : default.IncompatibleGRIWarningDefault);
2023-05-14 00:22:31 +00:00
case LTI_NoneGRI:
return (default.NoneGRI != "" ? default.NoneGRI : default.NoneGRIDefault);
case LTI_NoneGRIWarning:
return (default.NoneGRIWarning != "" ? default.NoneGRIWarning : default.NoneGRIWarningDefault);
2023-05-14 00:22:31 +00:00
case LTI_SecondsShort:
return (default.SecondsShort != "" ? default.SecondsShort : default.SecondsShortDefault);
2023-10-08 17:20:17 +00:00
case LTI_PleaseWait:
return (default.PleaseWait != "" ? default.PleaseWait : default.PleaseWaitDefault);
2023-05-14 00:22:31 +00:00
}
return "";
}
defaultproperties
{
2023-05-14 00:47:20 +00:00
SyncItemsDefault = "Sync items:"
WaitingGRIDefault = "Waiting GRI..."
IncompatibleGRIDefault = "Incompatible GRI:"
IncompatibleGRIWarningDefault = "You can enter the game, but the trader may not work correctly.";
NoneGRIDefault = "GRI is not initialized!"
NoneGRIWarningDefault = "It is recommended to reconnect. If you enter the game right now, the trader may not work correctly.";
2023-05-14 00:47:20 +00:00
SecondsShortDefault = "s"
2023-10-08 17:20:17 +00:00
PleaseWaitDefault = "Please wait"
2022-09-18 21:49:43 +00:00
}