wip
This commit is contained in:
7
MSKGS/Classes/IMSKGS.uc
Normal file
7
MSKGS/Classes/IMSKGS.uc
Normal file
@ -0,0 +1,7 @@
|
||||
interface IMSKGS;
|
||||
|
||||
public function IncreaseXPBoost(KFPlayerController Booster);
|
||||
public function int GetXPBoost();
|
||||
public function bool GetXPNotifications();
|
||||
public function E_LogLevel GetLogLevel();
|
||||
public function class<KFPawn_Monster> PickProxyZed(class<KFPawn_Monster> MonsterClass);
|
3
MSKGS/Classes/IMSKGS_GameInfo.uc
Normal file
3
MSKGS/Classes/IMSKGS_GameInfo.uc
Normal file
@ -0,0 +1,3 @@
|
||||
interface IMSKGS_GameInfo;
|
||||
|
||||
public static function UpdateGameSettings(KFGameInfo_Survival KFGI, string GameModeClass, IMSKGS MSKGS, bool bCustomGame, bool bUsesStats);
|
36
MSKGS/Classes/MSKGS_Endless.uc
Normal file
36
MSKGS/Classes/MSKGS_Endless.uc
Normal file
@ -0,0 +1,36 @@
|
||||
class MSKGS_Endless extends KFGameInfo_Endless;
|
||||
|
||||
const GIC = "KFGameContent.KFGameInfo_Endless";
|
||||
|
||||
var public IMSKGS_GameInfo GI;
|
||||
var public IMSKGS MSKGS;
|
||||
var public E_LogLevel LogLevel;
|
||||
|
||||
public simulated function ExileServerUsingKickBan()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public function UpdateGameSettings()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (GI != None)
|
||||
{
|
||||
GI.UpdateGameSettings(Self, GIC, MSKGS, bIsCustomGame, !IsUnrankedGame());
|
||||
}
|
||||
}
|
||||
|
||||
protected function DistributeMoneyAndXP(class<KFPawn_Monster> MonsterClass, const out array<DamageInfo> DamageHistory, Controller Killer)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
Super.DistributeMoneyAndXP(MSKGS == None ? MonsterClass : MSKGS.PickProxyZed(MonsterClass), DamageHistory, Killer);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
113
MSKGS/Classes/MSKGS_LocalMessage.uc
Normal file
113
MSKGS/Classes/MSKGS_LocalMessage.uc
Normal file
@ -0,0 +1,113 @@
|
||||
class MSKGS_LocalMessage extends Object;
|
||||
|
||||
enum E_MSKGS_LocalMessageType
|
||||
{
|
||||
MSKGS_PlayerGiveBoostToServer,
|
||||
MSKGS_PlayerGiveBoostToServerFirst,
|
||||
MSKGS_PlayerGiveBoostToServerMax,
|
||||
MSKGS_BoosterLeaveServer,
|
||||
MSKGS_BoosterLeaveServerMax,
|
||||
MSKGS_BoosterLeaveServerNoBoost
|
||||
};
|
||||
|
||||
var const String PlayerGivesBoostDefault;
|
||||
var private localized String PlayerGivesBoost;
|
||||
var const String PlayerGivesBoostFirstDefault;
|
||||
var private localized String PlayerGivesBoostFirst;
|
||||
var const String TotalBoostDefault;
|
||||
var private localized String TotalBoost;
|
||||
var const String MaxDefault;
|
||||
var private localized String Max;
|
||||
var const String PlayerLeftDefault;
|
||||
var private localized String PlayerLeft;
|
||||
var const String NoBoostDefault;
|
||||
var private localized String NoBoost;
|
||||
|
||||
private static function String ReplPlayer(String Str, String Player)
|
||||
{
|
||||
return Repl(Str, "<player>", Player, false);
|
||||
}
|
||||
|
||||
private static function String ReplPlayerBoost(String Str, String Boost)
|
||||
{
|
||||
return Repl(Str, "<playerboost>", Boost, false);
|
||||
}
|
||||
|
||||
private static function String ReplTotalBoost(String Str, String Boost)
|
||||
{
|
||||
return Repl(Str, "<totalboost>", Boost, false);
|
||||
}
|
||||
|
||||
public static function String GetLocalizedString(
|
||||
E_LogLevel LogLevel,
|
||||
E_MSKGS_LocalMessageType LMT,
|
||||
optional String String1,
|
||||
optional String String2,
|
||||
optional String String3)
|
||||
{
|
||||
local String RV;
|
||||
|
||||
`Log_TraceStatic();
|
||||
|
||||
RV = "";
|
||||
|
||||
switch (LMT)
|
||||
{
|
||||
case MSKGS_PlayerGiveBoostToServer:
|
||||
RV = (default.PlayerGivesBoost != "" ? default.PlayerGivesBoost : default.PlayerGivesBoostDefault)
|
||||
@ (default.TotalBoost != "" ? default.TotalBoost : default.TotalBoostDefault);
|
||||
RV = ReplPlayer(RV, String1);
|
||||
RV = ReplPlayerBoost(RV, String2);
|
||||
RV = ReplTotalBoost(RV, String3);
|
||||
break;
|
||||
|
||||
case MSKGS_PlayerGiveBoostToServerFirst:
|
||||
RV = (default.PlayerGivesBoostFirst != "" ? default.PlayerGivesBoostFirst : default.PlayerGivesBoostFirstDefault)
|
||||
@ (default.TotalBoost != "" ? default.TotalBoost : default.TotalBoostDefault);
|
||||
RV = ReplPlayer(RV, String1);
|
||||
RV = ReplTotalBoost(RV, String2);
|
||||
break;
|
||||
|
||||
case MSKGS_PlayerGiveBoostToServerMax:
|
||||
RV = (default.PlayerGivesBoost != "" ? default.PlayerGivesBoost : default.PlayerGivesBoostDefault)
|
||||
@ (default.TotalBoost != "" ? default.TotalBoost : default.TotalBoostDefault)
|
||||
@ (default.Max != "" ? default.Max : default.MaxDefault);
|
||||
RV = ReplPlayer(RV, String1);
|
||||
RV = ReplPlayerBoost(RV, String2);
|
||||
RV = ReplTotalBoost(RV, String3);
|
||||
break;
|
||||
|
||||
case MSKGS_BoosterLeaveServer:
|
||||
RV = (default.PlayerLeft != "" ? default.PlayerLeft : default.PlayerLeftDefault)
|
||||
@ (default.TotalBoost != "" ? default.TotalBoost : default.TotalBoostDefault);
|
||||
RV = ReplPlayer(RV, String1);
|
||||
RV = ReplTotalBoost(RV, String2);
|
||||
break;
|
||||
|
||||
case MSKGS_BoosterLeaveServerMax:
|
||||
RV = (default.PlayerLeft != "" ? default.PlayerLeft : default.PlayerLeftDefault)
|
||||
@ (default.TotalBoost != "" ? default.TotalBoost : default.TotalBoostDefault)
|
||||
@ (default.Max != "" ? default.Max : default.MaxDefault);
|
||||
RV = ReplPlayer(RV, String1);
|
||||
RV = ReplTotalBoost(RV, String2);
|
||||
break;
|
||||
|
||||
case MSKGS_BoosterLeaveServerNoBoost:
|
||||
RV = (default.PlayerLeft != "" ? default.PlayerLeft : default.PlayerLeftDefault)
|
||||
@ (default.NoBoost != "" ? default.NoBoost : default.NoBoostDefault);
|
||||
RV = ReplPlayer(RV, String1);
|
||||
break;
|
||||
}
|
||||
|
||||
return RV;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
PlayerGivesBoostFirstDefault = "<player> gives boost to this server!"
|
||||
PlayerGivesBoostDefault = "<player> gives +<playerboost>% XP boost to this server!"
|
||||
TotalBoostDefault = "Total XP boost: +<totalboost>%"
|
||||
MaxDefault = "(MAX)"
|
||||
PlayerLeftDefault = "<player> left the server."
|
||||
NoBoostDefault = "Now there is no XP boost."
|
||||
}
|
36
MSKGS/Classes/MSKGS_Objective.uc
Normal file
36
MSKGS/Classes/MSKGS_Objective.uc
Normal file
@ -0,0 +1,36 @@
|
||||
class MSKGS_Objective extends KFGameInfo_Objective;
|
||||
|
||||
const GIC = "KFGameContent.KFGameInfo_Objective";
|
||||
|
||||
var public IMSKGS_GameInfo GI;
|
||||
var public IMSKGS MSKGS;
|
||||
var public E_LogLevel LogLevel;
|
||||
|
||||
public simulated function ExileServerUsingKickBan()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public function UpdateGameSettings()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (GI != None)
|
||||
{
|
||||
GI.UpdateGameSettings(Self, GIC, MSKGS, bIsCustomGame, !IsUnrankedGame());
|
||||
}
|
||||
}
|
||||
|
||||
protected function DistributeMoneyAndXP(class<KFPawn_Monster> MonsterClass, const out array<DamageInfo> DamageHistory, Controller Killer)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
Super.DistributeMoneyAndXP(MSKGS == None ? MonsterClass : MSKGS.PickProxyZed(MonsterClass), DamageHistory, Killer);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
295
MSKGS/Classes/MSKGS_RepInfo.uc
Normal file
295
MSKGS/Classes/MSKGS_RepInfo.uc
Normal file
@ -0,0 +1,295 @@
|
||||
class MSKGS_RepInfo extends ReplicationInfo;
|
||||
|
||||
const MSKGS_LMT = class'MSKGS_LocalMessage';
|
||||
|
||||
enum MSKGS_PlayerType
|
||||
{
|
||||
MSKGS_Unknown,
|
||||
MSKGS_Player,
|
||||
MSKGS_Group,
|
||||
MSKGS_Admin,
|
||||
MSKGS_Owner
|
||||
};
|
||||
|
||||
var private IMSKGS MSKGS;
|
||||
var private bool ServerOwner;
|
||||
var private bool GroupMember;
|
||||
|
||||
var private repnotify E_LogLevel LogLevel;
|
||||
var private repnotify UniqueNetId GroupID;
|
||||
var private repnotify float CheckGroupTimer;
|
||||
|
||||
var private bool ObtainLogLevel;
|
||||
var private bool ObtainGroupID;
|
||||
var private bool ObtainCheckGroupTimer;
|
||||
|
||||
var private KFPlayerController KFPC;
|
||||
var private OnlineSubsystemSteamworks OSS;
|
||||
|
||||
replication
|
||||
{
|
||||
if (bNetInitial)
|
||||
LogLevel, GroupID, CheckGroupTimer, ServerOwner;
|
||||
}
|
||||
|
||||
public simulated event ReplicatedEvent(name VarName)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
switch (VarName)
|
||||
{
|
||||
case 'LogLevel':
|
||||
ObtainLogLevel = true;
|
||||
CheckGroupMembership();
|
||||
break;
|
||||
|
||||
case 'GroupID':
|
||||
ObtainGroupID = true;
|
||||
CheckGroupMembership();
|
||||
break;
|
||||
|
||||
case 'CheckGroupTimer':
|
||||
ObtainCheckGroupTimer = true;
|
||||
CheckGroupMembership();
|
||||
break;
|
||||
|
||||
default:
|
||||
super.ReplicatedEvent(VarName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public function Init(
|
||||
E_LogLevel _LogLevel,
|
||||
IMSKGS _MSKGS,
|
||||
UniqueNetId _GroupID,
|
||||
float _CheckGroupTimer,
|
||||
bool _ServerOwner)
|
||||
{
|
||||
LogLevel = _LogLevel;
|
||||
MSKGS = _MSKGS;
|
||||
GroupID = _GroupID;
|
||||
CheckGroupTimer = _CheckGroupTimer;
|
||||
ServerOwner = _ServerOwner;
|
||||
|
||||
`Log_Trace();
|
||||
}
|
||||
|
||||
public simulated function bool SafeDestroy()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
return (bPendingDelete || bDeleteMe || Destroy());
|
||||
}
|
||||
|
||||
public simulated event PreBeginPlay()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
Super.PreBeginPlay();
|
||||
}
|
||||
|
||||
public simulated event PostBeginPlay()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (bPendingDelete || bDeleteMe) return;
|
||||
|
||||
Super.PostBeginPlay();
|
||||
}
|
||||
|
||||
private simulated function CheckGroupMembership()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (WorldInfo.NetMode == NM_StandAlone
|
||||
|| (ObtainLogLevel && ObtainGroupID && ObtainCheckGroupTimer && Role < ROLE_Authority))
|
||||
{
|
||||
if (GetKFPC() != None && KFPC.bIsEosPlayer)
|
||||
{
|
||||
`Log_Debug("EGS Player, skip group check");
|
||||
return;
|
||||
}
|
||||
|
||||
if (OSS == None)
|
||||
{
|
||||
OSS = OnlineSubsystemSteamworks(class'GameEngine'.static.GetOnlineSubsystem());
|
||||
}
|
||||
|
||||
if (OSS != None)
|
||||
{
|
||||
if (OSS.CheckPlayerGroup(GroupID))
|
||||
{
|
||||
ClearTimer(nameof(CheckGroupMembership));
|
||||
GroupMember = true;
|
||||
ServerApplyMembership();
|
||||
}
|
||||
else if (!IsTimerActive(nameof(CheckGroupMembership)) && CheckGroupTimer > 0.0f)
|
||||
{
|
||||
SetTimer(CheckGroupTimer, true, nameof(CheckGroupMembership));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
`Log_Error("Can't get online subsystem steamworks!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public simulated function MSKGS_PlayerType PlayerType()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (IsServerOwner())
|
||||
{
|
||||
return MSKGS_Owner;
|
||||
}
|
||||
|
||||
if (IsAdmin())
|
||||
{
|
||||
return MSKGS_Admin;
|
||||
}
|
||||
|
||||
if (IsGroupMember())
|
||||
{
|
||||
return MSKGS_Group;
|
||||
}
|
||||
|
||||
return MSKGS_Player;
|
||||
}
|
||||
|
||||
public simulated function bool IsServerOwner()
|
||||
{
|
||||
return ServerOwner;
|
||||
}
|
||||
|
||||
public simulated function bool IsAdmin()
|
||||
{
|
||||
return (GetKFPC() != None && KFPC.PlayerReplicationInfo != None && KFPC.PlayerReplicationInfo.bAdmin);
|
||||
}
|
||||
|
||||
public simulated function bool IsGroupMember()
|
||||
{
|
||||
return GroupMember;
|
||||
}
|
||||
|
||||
public simulated function KFPlayerController GetKFPC()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (KFPC != None) return KFPC;
|
||||
|
||||
KFPC = KFPlayerController(Owner);
|
||||
|
||||
if (KFPC == None && ROLE < ROLE_Authority)
|
||||
{
|
||||
KFPC = KFPlayerController(GetALocalPlayerController());
|
||||
}
|
||||
|
||||
return KFPC;
|
||||
}
|
||||
|
||||
private reliable server function ServerApplyMembership()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
GroupMember = true;
|
||||
|
||||
if (PlayerType() <= MSKGS_Group)
|
||||
{
|
||||
`Log_Info("Increase boost:" @ PlayerType());
|
||||
MSKGS.IncreaseXPBoost(GetKFPC());
|
||||
}
|
||||
}
|
||||
|
||||
public reliable client function WriteToChatLocalized(E_MSKGS_LocalMessageType LMT, String HexColor, optional String String1, optional String String2, optional String String3)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
WriteToChat(MSKGS_LMT.static.GetLocalizedString(LogLevel, LMT, String1, String2, String3), HexColor);
|
||||
}
|
||||
|
||||
public reliable client function WriteToChat(String Message, String HexColor)
|
||||
{
|
||||
local KFGFxHudWrapper HUD;
|
||||
|
||||
`Log_Trace();
|
||||
|
||||
if (GetKFPC() == None) return;
|
||||
|
||||
if (KFPC.MyGFxManager.PartyWidget != None && KFPC.MyGFxManager.PartyWidget.PartyChatWidget != None)
|
||||
{
|
||||
KFPC.MyGFxManager.PartyWidget.PartyChatWidget.AddChatMessage(Message, HexColor);
|
||||
}
|
||||
|
||||
HUD = KFGFxHudWrapper(KFPC.myHUD);
|
||||
if (HUD != None && HUD.HUDMovie != None && HUD.HUDMovie.HudChatBox != None)
|
||||
{
|
||||
HUD.HUDMovie.HudChatBox.AddChatMessage(Message, HexColor);
|
||||
}
|
||||
}
|
||||
|
||||
public reliable client function WriteToHUDLocalized(E_MSKGS_LocalMessageType LMT, optional String String1, optional String String2, optional String String3, optional float DisplayTime = 0.0f)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
WriteToHUD(MSKGS_LMT.static.GetLocalizedString(LogLevel, LMT, String1, String2, String3), DisplayTime);
|
||||
}
|
||||
|
||||
public reliable client function WriteToHUD(String Message, optional float DisplayTime = 0.0f)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (GetKFPC() == None) return;
|
||||
|
||||
if (DisplayTime <= 0.0f)
|
||||
{
|
||||
DisplayTime = CalcDisplayTime(Message);
|
||||
}
|
||||
|
||||
if (KFPC.MyGFxHUD != None)
|
||||
{
|
||||
KFPC.MyGFxHUD.DisplayMapText(Message, DisplayTime, false);
|
||||
}
|
||||
}
|
||||
|
||||
public reliable client function DefferedClearMessageHUD(optional float Time = 0.0f)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
SetTimer(Time, false, nameof(ClearMessageHUD));
|
||||
}
|
||||
|
||||
public reliable client function ClearMessageHUD()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (GetKFPC() == None) return;
|
||||
|
||||
if (KFPC.MyGFxHUD != None && KFPC.MyGFxHUD.MapTextWidget != None)
|
||||
{
|
||||
KFPC.MyGFxHUD.MapTextWidget.StoredMessageList.Length = 0;
|
||||
KFPC.MyGFxHUD.MapTextWidget.HideMessage();
|
||||
}
|
||||
}
|
||||
|
||||
private simulated function float CalcDisplayTime(String Message)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
return FClamp(Len(Message) / 20.0f, 3, 30);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bAlwaysRelevant = false
|
||||
bOnlyRelevantToOwner = true
|
||||
bSkipActorPropertyReplication = false
|
||||
|
||||
GroupMember = false;
|
||||
ServerOwner = false;
|
||||
|
||||
ObtainLogLevel = false;
|
||||
ObtainGroupID = false;
|
||||
ObtainCheckGroupTimer = false;
|
||||
}
|
36
MSKGS/Classes/MSKGS_Survival.uc
Normal file
36
MSKGS/Classes/MSKGS_Survival.uc
Normal file
@ -0,0 +1,36 @@
|
||||
class MSKGS_Survival extends KFGameInfo_Survival;
|
||||
|
||||
const GIC = "KFGameContent.KFGameInfo_Survival";
|
||||
|
||||
var public IMSKGS_GameInfo GI;
|
||||
var public IMSKGS MSKGS;
|
||||
var public E_LogLevel LogLevel;
|
||||
|
||||
public simulated function ExileServerUsingKickBan()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public function UpdateGameSettings()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (GI != None)
|
||||
{
|
||||
GI.UpdateGameSettings(Self, GIC, MSKGS, bIsCustomGame, !IsUnrankedGame());
|
||||
}
|
||||
}
|
||||
|
||||
protected function DistributeMoneyAndXP(class<KFPawn_Monster> MonsterClass, const out array<DamageInfo> DamageHistory, Controller Killer)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
Super.DistributeMoneyAndXP(MSKGS == None ? MonsterClass : MSKGS.PickProxyZed(MonsterClass), DamageHistory, Killer);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
36
MSKGS/Classes/MSKGS_VersusSurvival.uc
Normal file
36
MSKGS/Classes/MSKGS_VersusSurvival.uc
Normal file
@ -0,0 +1,36 @@
|
||||
class MSKGS_VersusSurvival extends KFGameInfo_VersusSurvival;
|
||||
|
||||
const GIC = "KFGameContent.KFGameInfo_VersusSurvival";
|
||||
|
||||
var public IMSKGS_GameInfo GI;
|
||||
var public IMSKGS MSKGS;
|
||||
var public E_LogLevel LogLevel;
|
||||
|
||||
public simulated function ExileServerUsingKickBan()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public function UpdateGameSettings()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (GI != None)
|
||||
{
|
||||
GI.UpdateGameSettings(Self, GIC, MSKGS, bIsCustomGame, !IsUnrankedGame());
|
||||
}
|
||||
}
|
||||
|
||||
protected function DistributeMoneyAndXP(class<KFPawn_Monster> MonsterClass, const out array<DamageInfo> DamageHistory, Controller Killer)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
Super.DistributeMoneyAndXP(MSKGS == None ? MonsterClass : MSKGS.PickProxyZed(MonsterClass), DamageHistory, Killer);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
36
MSKGS/Classes/MSKGS_WeeklySurvival.uc
Normal file
36
MSKGS/Classes/MSKGS_WeeklySurvival.uc
Normal file
@ -0,0 +1,36 @@
|
||||
class MSKGS_WeeklySurvival extends KFGameInfo_WeeklySurvival;
|
||||
|
||||
const GIC = "KFGameContent.KFGameInfo_WeeklySurvival";
|
||||
|
||||
var public IMSKGS_GameInfo GI;
|
||||
var public IMSKGS MSKGS;
|
||||
var public E_LogLevel LogLevel;
|
||||
|
||||
public simulated function ExileServerUsingKickBan()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public function UpdateGameSettings()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (GI != None)
|
||||
{
|
||||
GI.UpdateGameSettings(Self, GIC, MSKGS, bIsCustomGame, !IsUnrankedGame());
|
||||
}
|
||||
}
|
||||
|
||||
protected function DistributeMoneyAndXP(class<KFPawn_Monster> MonsterClass, const out array<DamageInfo> DamageHistory, Controller Killer)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
Super.DistributeMoneyAndXP(MSKGS == None ? MonsterClass : MSKGS.PickProxyZed(MonsterClass), DamageHistory, Killer);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
20
MSKGS/Classes/_Logger.uc
Normal file
20
MSKGS/Classes/_Logger.uc
Normal file
@ -0,0 +1,20 @@
|
||||
class _Logger extends Object
|
||||
abstract;
|
||||
|
||||
enum E_LogLevel
|
||||
{
|
||||
LL_WrongLevel,
|
||||
LL_None,
|
||||
LL_Fatal,
|
||||
LL_Error,
|
||||
LL_Warning,
|
||||
LL_Info,
|
||||
LL_Debug,
|
||||
LL_Trace,
|
||||
LL_All
|
||||
};
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
2
MSKGS/Constants.uci
Normal file
2
MSKGS/Constants.uci
Normal file
@ -0,0 +1,2 @@
|
||||
// Constants
|
||||
`define NO_CONFIG 0
|
3
MSKGS/Globals.uci
Normal file
3
MSKGS/Globals.uci
Normal file
@ -0,0 +1,3 @@
|
||||
// Imports
|
||||
`include(Logger.uci)
|
||||
`include(Constants.uci)
|
15
MSKGS/Logger.uci
Normal file
15
MSKGS/Logger.uci
Normal file
@ -0,0 +1,15 @@
|
||||
// Logger
|
||||
`define Log_Tag 'MSKGS'
|
||||
|
||||
`define LocationStatic "`{ClassName}::" $ GetFuncName()
|
||||
|
||||
`define Log_Base(msg, cond) `log(`msg `if(`cond), `cond`{endif}, `Log_Tag)
|
||||
|
||||
`define Log_Fatal(msg) `log("FATAL:" @ `msg, (LogLevel >= LL_Fatal), `Log_Tag)
|
||||
`define Log_Error(msg) `log("ERROR:" @ `msg, (LogLevel >= LL_Error), `Log_Tag)
|
||||
`define Log_Warn(msg) `log("WARN:" @ `msg, (LogLevel >= LL_Warning), `Log_Tag)
|
||||
`define Log_Info(msg) `log("INFO:" @ `msg, (LogLevel >= LL_Info), `Log_Tag)
|
||||
`define Log_Debug(msg) `log("DEBUG:" @ `msg, (LogLevel >= LL_Debug), `Log_Tag)
|
||||
|
||||
`define Log_Trace(msg) `log("TRACE:" @ `Location `if(`msg) @ `msg`{endif}, (LogLevel >= LL_Trace), `Log_Tag)
|
||||
`define Log_TraceStatic(msg) `log("TRACE:" @ `LocationStatic `if(`msg) @ `msg`{endif}, (LogLevel >= LL_Trace), `Log_Tag)
|
Reference in New Issue
Block a user