Merge pull request #6 from GenZmeY/gri-advice

add advice in case of problems with GRI replication
This commit is contained in:
GenZmeY 2024-01-08 12:29:33 +03:00 committed by GitHub
commit 85e235316c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 2 deletions

View File

@ -13,6 +13,12 @@ var private localized String IncompatibleGRI;
var const String IncompatibleGRIWarningDefault; var const String IncompatibleGRIWarningDefault;
var private localized String IncompatibleGRIWarning; var private localized String IncompatibleGRIWarning;
var const String NoneGRIDefault;
var private localized String NoneGRI;
var const String NoneGRIWarningDefault;
var private localized String NoneGRIWarning;
var const String SecondsShortDefault; var const String SecondsShortDefault;
var private localized String SecondsShort; var private localized String SecondsShort;
@ -25,6 +31,8 @@ enum E_LTI_LocalMessageType
LTI_WaitingGRI, LTI_WaitingGRI,
LTI_IncompatibleGRI, LTI_IncompatibleGRI,
LTI_IncompatibleGRIWarning, LTI_IncompatibleGRIWarning,
LTI_NoneGRI,
LTI_NoneGRIWarning,
LTI_SecondsShort, LTI_SecondsShort,
LTI_PleaseWait LTI_PleaseWait
}; };
@ -52,6 +60,12 @@ public static function String GetLocalizedString(
case LTI_IncompatibleGRIWarning: case LTI_IncompatibleGRIWarning:
return (default.IncompatibleGRIWarning != "" ? default.IncompatibleGRIWarning : default.IncompatibleGRIWarningDefault); return (default.IncompatibleGRIWarning != "" ? default.IncompatibleGRIWarning : default.IncompatibleGRIWarningDefault);
case LTI_NoneGRI:
return (default.NoneGRI != "" ? default.NoneGRI : default.NoneGRIDefault);
case LTI_NoneGRIWarning:
return (default.NoneGRIWarning != "" ? default.NoneGRIWarning : default.NoneGRIWarningDefault);
case LTI_SecondsShort: case LTI_SecondsShort:
return (default.SecondsShort != "" ? default.SecondsShort : default.SecondsShortDefault); return (default.SecondsShort != "" ? default.SecondsShort : default.SecondsShortDefault);
@ -68,6 +82,8 @@ defaultproperties
WaitingGRIDefault = "Waiting GRI..." WaitingGRIDefault = "Waiting GRI..."
IncompatibleGRIDefault = "Incompatible GRI:" IncompatibleGRIDefault = "Incompatible GRI:"
IncompatibleGRIWarningDefault = "You can enter the game, but the trader may not work correctly."; 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.";
SecondsShortDefault = "s" SecondsShortDefault = "s"
PleaseWaitDefault = "Please wait" PleaseWaitDefault = "Please wait"
} }

View File

@ -150,8 +150,15 @@ private simulated function Finished()
} }
else else
{ {
`Log_Error("Incompatible Replication info:" @ String(GRI)); `Log_Error("Incompatible Game Replication info:" @ String(GRI));
NotifyIncompatibleGRI(); if (GRI == None)
{
NotifyNoneGRI();
}
else
{
NotifyIncompatibleGRI();
}
} }
ShowReadyButton(); ShowReadyButton();
@ -308,6 +315,7 @@ private simulated function KeepNotification()
private simulated function ClientCleanup() private simulated function ClientCleanup()
{ {
`Log_Debug("Cleanup");
ServerCleanup(); ServerCleanup();
SafeDestroy(); SafeDestroy();
} }
@ -363,6 +371,16 @@ private simulated function NotifyIncompatibleGRI()
class'KFLocalMessage'.default.InteractionColor); class'KFLocalMessage'.default.InteractionColor);
} }
private simulated function NotifyNoneGRI()
{
WriteToChatLocalized(
LTI_NoneGRI,
class'KFLocalMessage'.default.InteractionColor);
WriteToChatLocalized(
LTI_NoneGRIWarning,
class'KFLocalMessage'.default.InteractionColor);
}
defaultproperties defaultproperties
{ {
bAlwaysRelevant = false bAlwaysRelevant = false

Binary file not shown.

Binary file not shown.