From 7cbf4833dbdf42f90db0b3ac5b9e9d1f081be216 Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Sat, 12 Jun 2021 23:11:37 +0300 Subject: [PATCH] add logger --- ScoreboardExt/Build.uci | 2 + ScoreboardExt/Classes/ClassicStyle.uc | 3 + ScoreboardExt/Classes/CustomRanks.uc | 3 + ScoreboardExt/Classes/DynamicLevelColor.uc | 10 ++ ScoreboardExt/Classes/DynamicPingColor.uc | 10 ++ ScoreboardExt/Classes/DynamicStateColor.uc | 10 ++ ScoreboardExt/Classes/GUIStyleBase.uc | 3 + ScoreboardExt/Classes/KF2GUIController.uc | 3 + ScoreboardExt/Classes/KF2GUIInput.uc | 4 + ScoreboardExt/Classes/KF2Style.uc | 3 + ScoreboardExt/Classes/KFColorHelper.uc | 4 + ScoreboardExt/Classes/KFGUIConsoleHack.uc | 3 + ScoreboardExt/Classes/KFGUI_Base.uc | 4 + ScoreboardExt/Classes/KFGUI_Button.uc | 4 + ScoreboardExt/Classes/KFGUI_CategoryButton.uc | 4 + ScoreboardExt/Classes/KFGUI_CategoryList.uc | 4 + ScoreboardExt/Classes/KFGUI_CheckBox.uc | 4 + ScoreboardExt/Classes/KFGUI_Clickable.uc | 4 + ScoreboardExt/Classes/KFGUI_ColorSlider.uc | 3 + ScoreboardExt/Classes/KFGUI_ColumnList.uc | 3 + ScoreboardExt/Classes/KFGUI_ColumnTop.uc | 3 + ScoreboardExt/Classes/KFGUI_ComboBox.uc | 3 + ScoreboardExt/Classes/KFGUI_ComboSelector.uc | 3 + ScoreboardExt/Classes/KFGUI_ComponentList.uc | 3 + ScoreboardExt/Classes/KFGUI_EditBox.uc | 3 + ScoreboardExt/Classes/KFGUI_EditControl.uc | 3 + ScoreboardExt/Classes/KFGUI_FloatingWindow.uc | 3 + .../Classes/KFGUI_FloatingWindowHeader.uc | 3 + ScoreboardExt/Classes/KFGUI_Frame.uc | 5 +- ScoreboardExt/Classes/KFGUI_Image.uc | 3 + ScoreboardExt/Classes/KFGUI_List.uc | 3 + ScoreboardExt/Classes/KFGUI_ListHorz.uc | 3 + ScoreboardExt/Classes/KFGUI_ListItem.uc | 3 + ScoreboardExt/Classes/KFGUI_MultiComponent.uc | 3 + ScoreboardExt/Classes/KFGUI_Page.uc | 3 + ScoreboardExt/Classes/KFGUI_ProgressBar.uc | 3 + ScoreboardExt/Classes/KFGUI_RightClickMenu.uc | 3 + ScoreboardExt/Classes/KFGUI_ScrollBarBase.uc | 3 + ScoreboardExt/Classes/KFGUI_ScrollBarH.uc | 3 + ScoreboardExt/Classes/KFGUI_ScrollBarV.uc | 3 + ScoreboardExt/Classes/KFGUI_Slider.uc | 3 + ScoreboardExt/Classes/KFGUI_SwitchMenuBar.uc | 3 + ScoreboardExt/Classes/KFGUI_TextField.uc | 3 + ScoreboardExt/Classes/KFGUI_TextLable.uc | 3 + ScoreboardExt/Classes/KFGUI_TextScroll.uc | 3 + ScoreboardExt/Classes/KFGUI_Tooltip.uc | 3 + ScoreboardExt/Classes/KFScoreBoard.uc | 3 + ScoreboardExt/Classes/PlayerRankRelations.uc | 3 + ScoreboardExt/Classes/ScoreboardExtHUD.uc | 3 + ScoreboardExt/Classes/ScoreboardExtMut.uc | 96 ++++++++++++------- ScoreboardExt/Classes/ScoreboardExtRepInfo.uc | 35 +++++++ ScoreboardExt/Classes/ScoreboardStyle.uc | 12 ++- .../Classes/SteamGroupRankRelations.uc | 3 + ScoreboardExt/Classes/SystemAdminRank.uc | 10 ++ ScoreboardExt/Classes/SystemPlayerRank.uc | 10 ++ ScoreboardExt/Classes/Types.uc | 3 + ScoreboardExt/Logger.uci | 9 ++ 57 files changed, 320 insertions(+), 35 deletions(-) create mode 100644 ScoreboardExt/Build.uci create mode 100644 ScoreboardExt/Logger.uci diff --git a/ScoreboardExt/Build.uci b/ScoreboardExt/Build.uci new file mode 100644 index 0000000..5eb784a --- /dev/null +++ b/ScoreboardExt/Build.uci @@ -0,0 +1,2 @@ +`define bEnableCallstack true +`define CurrentVersion 1 \ No newline at end of file diff --git a/ScoreboardExt/Classes/ClassicStyle.uc b/ScoreboardExt/Classes/ClassicStyle.uc index 7a49a9a..45380c4 100644 --- a/ScoreboardExt/Classes/ClassicStyle.uc +++ b/ScoreboardExt/Classes/ClassicStyle.uc @@ -1,5 +1,8 @@ Class ClassicStyle extends KF2Style; +`include(Build.uci) +`include(Logger.uci) + function RenderFramedWindow( KFGUI_FloatingWindow P ) { local int XS,YS,TitleHeight; diff --git a/ScoreboardExt/Classes/CustomRanks.uc b/ScoreboardExt/Classes/CustomRanks.uc index 23d3a0a..260428f 100644 --- a/ScoreboardExt/Classes/CustomRanks.uc +++ b/ScoreboardExt/Classes/CustomRanks.uc @@ -1,5 +1,8 @@ class CustomRanks extends Object dependson(Types) config(ScoreboardExt); + +`include(Build.uci) +`include(Logger.uci) var config array Rank; diff --git a/ScoreboardExt/Classes/DynamicLevelColor.uc b/ScoreboardExt/Classes/DynamicLevelColor.uc index bae02e7..3f2d2cb 100644 --- a/ScoreboardExt/Classes/DynamicLevelColor.uc +++ b/ScoreboardExt/Classes/DynamicLevelColor.uc @@ -2,6 +2,9 @@ class DynamicLevelColor extends Object dependson(Types) config(ScoreboardExt); +`include(Build.uci) +`include(Logger.uci) + var config bool bEnabled; var config int Normal_Low; var config int Normal_High; @@ -15,6 +18,9 @@ var config int HellOnEarth_High; public static function SCESettingsLevel DefaultSettings() { local SCESettingsLevel Settings; + + `callstack_static("DefaultSettings"); + return Settings; } @@ -22,6 +28,8 @@ public static function SCESettingsLevel Settings() { local SCESettingsLevel Settings; + `callstack_static("Settings"); + Settings.Dynamic = default.bEnabled; Settings.Low[0] = default.Normal_Low; Settings.High[0] = default.Normal_High; @@ -37,6 +45,8 @@ public static function SCESettingsLevel Settings() public static function WriteSettings(SCESettingsLevel Settings) { + `callstack_static("WriteSettings"); + default.bEnabled = Settings.Dynamic; default.Normal_Low = Settings.Low[0]; default.Normal_High = Settings.High[0]; diff --git a/ScoreboardExt/Classes/DynamicPingColor.uc b/ScoreboardExt/Classes/DynamicPingColor.uc index 7df188b..aeb122d 100644 --- a/ScoreboardExt/Classes/DynamicPingColor.uc +++ b/ScoreboardExt/Classes/DynamicPingColor.uc @@ -2,6 +2,9 @@ class DynamicPingColor extends Object dependson(Types) config(ScoreboardExt); +`include(Build.uci) +`include(Logger.uci) + var config bool bEnabled; var config int Low; var config int High; @@ -10,6 +13,9 @@ var config bool bShowPingBars; public static function SCESettingsPing DefaultSettings() { local SCESettingsPing Settings; + + `callstack_static("DefaultSettings"); + return Settings; } @@ -17,6 +23,8 @@ public static function SCESettingsPing Settings() { local SCESettingsPing Settings; + `callstack_static("Settings"); + Settings.Dynamic = default.bEnabled; Settings.Low = default.Low; Settings.High = default.High; @@ -27,6 +35,8 @@ public static function SCESettingsPing Settings() public static function WriteSettings(SCESettingsPing Settings) { + `callstack_static("WriteSettings"); + default.bEnabled = Settings.Dynamic; default.Low = Settings.Low; default.High = Settings.High; diff --git a/ScoreboardExt/Classes/DynamicStateColor.uc b/ScoreboardExt/Classes/DynamicStateColor.uc index 93ace49..158420d 100644 --- a/ScoreboardExt/Classes/DynamicStateColor.uc +++ b/ScoreboardExt/Classes/DynamicStateColor.uc @@ -2,6 +2,9 @@ class DynamicStateColor extends Object dependson(Types) config(ScoreboardExt); +`include(Build.uci) +`include(Logger.uci) + var config bool bEnabled; var config int Low; var config int High; @@ -9,6 +12,9 @@ var config int High; public static function SCESettingsState DefaultSettings() { local SCESettingsState Settings; + + `callstack_static("DefaultSettings"); + return Settings; } @@ -16,6 +22,8 @@ public static function SCESettingsState Settings() { local SCESettingsState Settings; + `callstack_static("Settings"); + Settings.Dynamic = default.bEnabled; Settings.Low = default.Low; Settings.High = default.High; @@ -25,6 +33,8 @@ public static function SCESettingsState Settings() public static function WriteSettings(SCESettingsState Settings) { + `callstack_static("WriteSettings"); + default.bEnabled = Settings.Dynamic; default.Low = Settings.Low; default.High = Settings.High; diff --git a/ScoreboardExt/Classes/GUIStyleBase.uc b/ScoreboardExt/Classes/GUIStyleBase.uc index 452f011..6395ce5 100644 --- a/ScoreboardExt/Classes/GUIStyleBase.uc +++ b/ScoreboardExt/Classes/GUIStyleBase.uc @@ -1,6 +1,9 @@ Class GUIStyleBase extends Object abstract; +`include(Build.uci) +`include(Logger.uci) + var Texture2D ItemTex; var array BorderTextures, ArrowTextures, ButtonTextures, TabTextures, ItemBoxTextures, PerkBox, CheckBoxTextures, ProgressBarTextures, SliderTextures; var Texture2D ScrollTexture,FavoriteIcon,BankNoteIcon; diff --git a/ScoreboardExt/Classes/KF2GUIController.uc b/ScoreboardExt/Classes/KF2GUIController.uc index e6211e9..6398033 100644 --- a/ScoreboardExt/Classes/KF2GUIController.uc +++ b/ScoreboardExt/Classes/KF2GUIController.uc @@ -1,6 +1,9 @@ Class KF2GUIController extends Info transient; +`include(Build.uci) +`include(Logger.uci) + var() class DefaultStyle; var PlayerController PlayerOwner; diff --git a/ScoreboardExt/Classes/KF2GUIInput.uc b/ScoreboardExt/Classes/KF2GUIInput.uc index 40eb1e4..7b50f41 100644 --- a/ScoreboardExt/Classes/KF2GUIInput.uc +++ b/ScoreboardExt/Classes/KF2GUIInput.uc @@ -1,6 +1,10 @@ // Input while in a menu. class KF2GUIInput extends KFPlayerInput; +`include(Build.uci) +`include(Logger.uci) + + var KF2GUIController ControllerOwner; var PlayerInput BaseInput; diff --git a/ScoreboardExt/Classes/KF2Style.uc b/ScoreboardExt/Classes/KF2Style.uc index 3bc549b..14d0268 100644 --- a/ScoreboardExt/Classes/KF2Style.uc +++ b/ScoreboardExt/Classes/KF2Style.uc @@ -1,5 +1,8 @@ Class KF2Style extends GUIStyleBase; +`include(Build.uci) +`include(Logger.uci) + var Texture2D LoadedTex[2]; const TOOLTIP_BORDER=4; diff --git a/ScoreboardExt/Classes/KFColorHelper.uc b/ScoreboardExt/Classes/KFColorHelper.uc index 1de97db..b8ebad0 100644 --- a/ScoreboardExt/Classes/KFColorHelper.uc +++ b/ScoreboardExt/Classes/KFColorHelper.uc @@ -2,6 +2,10 @@ class KFColorHelper extends Object transient; +`include(Build.uci) +`include(Logger.uci) + + struct HSVColour { var() float H, S, V, A; diff --git a/ScoreboardExt/Classes/KFGUIConsoleHack.uc b/ScoreboardExt/Classes/KFGUIConsoleHack.uc index 8d111cb..7ab73a9 100644 --- a/ScoreboardExt/Classes/KFGUIConsoleHack.uc +++ b/ScoreboardExt/Classes/KFGUIConsoleHack.uc @@ -1,6 +1,9 @@ // Ugly hack to draw ontop of flash UI! Class KFGUIConsoleHack extends Console; +`include(Build.uci) +`include(Logger.uci) + var KF2GUIController OutputObject; function PostRender_Console(Canvas Canvas) diff --git a/ScoreboardExt/Classes/KFGUI_Base.uc b/ScoreboardExt/Classes/KFGUI_Base.uc index 2fd3f4e..086a948 100644 --- a/ScoreboardExt/Classes/KFGUI_Base.uc +++ b/ScoreboardExt/Classes/KFGUI_Base.uc @@ -2,6 +2,10 @@ Class KFGUI_Base extends Object abstract; +`include(Build.uci) +`include(Logger.uci) + + var KF2GUIController Owner; var ScoreboardExtHUD HUDOwner; var KFGUI_Base ParentComponent; // Parent component if any. diff --git a/ScoreboardExt/Classes/KFGUI_Button.uc b/ScoreboardExt/Classes/KFGUI_Button.uc index a69eeb9..bda0df2 100644 --- a/ScoreboardExt/Classes/KFGUI_Button.uc +++ b/ScoreboardExt/Classes/KFGUI_Button.uc @@ -1,5 +1,9 @@ Class KFGUI_Button extends KFGUI_Clickable; +`include(Build.uci) +`include(Logger.uci) + + var() Canvas.CanvasIcon OverlayTexture; var() string ButtonText,GamepadButtonName; var() color TextColor; diff --git a/ScoreboardExt/Classes/KFGUI_CategoryButton.uc b/ScoreboardExt/Classes/KFGUI_CategoryButton.uc index c7d3336..bdd856a 100644 --- a/ScoreboardExt/Classes/KFGUI_CategoryButton.uc +++ b/ScoreboardExt/Classes/KFGUI_CategoryButton.uc @@ -1,5 +1,9 @@ class KFGUI_CategoryButton extends KFGUI_Button; +`include(Build.uci) +`include(Logger.uci) + + var transient bool bOpened; var Texture2D Icon; var Color IconColor; diff --git a/ScoreboardExt/Classes/KFGUI_CategoryList.uc b/ScoreboardExt/Classes/KFGUI_CategoryList.uc index 8438ae7..b23641f 100644 --- a/ScoreboardExt/Classes/KFGUI_CategoryList.uc +++ b/ScoreboardExt/Classes/KFGUI_CategoryList.uc @@ -1,5 +1,9 @@ class KFGUI_CategoryList extends KFGUI_ComponentList; +`include(Build.uci) +`include(Logger.uci) + + // Broken, does not work correctly when closing a menu and re-opening it if a category is open struct FCategoryItems { diff --git a/ScoreboardExt/Classes/KFGUI_CheckBox.uc b/ScoreboardExt/Classes/KFGUI_CheckBox.uc index e4d1b8a..b782e65 100644 --- a/ScoreboardExt/Classes/KFGUI_CheckBox.uc +++ b/ScoreboardExt/Classes/KFGUI_CheckBox.uc @@ -1,5 +1,9 @@ Class KFGUI_CheckBox extends KFGUI_EditControl; +`include(Build.uci) +`include(Logger.uci) + + var() Texture CheckMark,CheckDisabled,CheckIdle,CheckFocus,CheckClicked; var() bool bForceUniform,bChecked; diff --git a/ScoreboardExt/Classes/KFGUI_Clickable.uc b/ScoreboardExt/Classes/KFGUI_Clickable.uc index a974f22..af6b000 100644 --- a/ScoreboardExt/Classes/KFGUI_Clickable.uc +++ b/ScoreboardExt/Classes/KFGUI_Clickable.uc @@ -1,6 +1,10 @@ Class KFGUI_Clickable extends KFGUI_Base abstract; +`include(Build.uci) +`include(Logger.uci) + + var() int IntIndex; // More user variables. var() string ToolTip; diff --git a/ScoreboardExt/Classes/KFGUI_ColorSlider.uc b/ScoreboardExt/Classes/KFGUI_ColorSlider.uc index a739187..ceb7556 100644 --- a/ScoreboardExt/Classes/KFGUI_ColorSlider.uc +++ b/ScoreboardExt/Classes/KFGUI_ColorSlider.uc @@ -1,5 +1,8 @@ class KFGUI_ColorSlider extends KFGUI_MultiComponent; +`include(Build.uci) +`include(Logger.uci) + var KFGUI_Slider RSlider,GSlider,BSlider,ASlider; var KFGUI_TextLable TextLable,RedLabel,GreenLabel,BlueLabel,AlphaLabel,RedValue,GreenValue,BlueValue,AlphaValue; var KFGUI_ComponentList SettingsBox; diff --git a/ScoreboardExt/Classes/KFGUI_ColumnList.uc b/ScoreboardExt/Classes/KFGUI_ColumnList.uc index 08d33c6..a387503 100644 --- a/ScoreboardExt/Classes/KFGUI_ColumnList.uc +++ b/ScoreboardExt/Classes/KFGUI_ColumnList.uc @@ -1,6 +1,9 @@ // Columned list box (only for text lines). Class KFGUI_ColumnList extends KFGUI_List; +`include(Build.uci) +`include(Logger.uci) + struct FColumnItem { var() string Text; diff --git a/ScoreboardExt/Classes/KFGUI_ColumnTop.uc b/ScoreboardExt/Classes/KFGUI_ColumnTop.uc index a5cd190..b54a531 100644 --- a/ScoreboardExt/Classes/KFGUI_ColumnTop.uc +++ b/ScoreboardExt/Classes/KFGUI_ColumnTop.uc @@ -1,6 +1,9 @@ // Do not use this on your own, it is used by ColumnList Class KFGUI_ColumnTop extends KFGUI_Base; +`include(Build.uci) +`include(Logger.uci) + var() float ColumnMinSize; // Minimum pixels width allowed. var KFGUI_ColumnList ListOwner; diff --git a/ScoreboardExt/Classes/KFGUI_ComboBox.uc b/ScoreboardExt/Classes/KFGUI_ComboBox.uc index a7464b7..cc55ab1 100644 --- a/ScoreboardExt/Classes/KFGUI_ComboBox.uc +++ b/ScoreboardExt/Classes/KFGUI_ComboBox.uc @@ -1,5 +1,8 @@ Class KFGUI_ComboBox extends KFGUI_EditControl; +`include(Build.uci) +`include(Logger.uci) + var KFGUI_ComboSelector Selection; var float BorderSize; diff --git a/ScoreboardExt/Classes/KFGUI_ComboSelector.uc b/ScoreboardExt/Classes/KFGUI_ComboSelector.uc index 002db34..1231c4d 100644 --- a/ScoreboardExt/Classes/KFGUI_ComboSelector.uc +++ b/ScoreboardExt/Classes/KFGUI_ComboSelector.uc @@ -1,5 +1,8 @@ Class KFGUI_ComboSelector extends KFGUI_Clickable; +`include(Build.uci) +`include(Logger.uci) + var KFGUI_ComboBox Combo; var int CurrentRow,OldRow; diff --git a/ScoreboardExt/Classes/KFGUI_ComponentList.uc b/ScoreboardExt/Classes/KFGUI_ComponentList.uc index 3509003..e3deb42 100644 --- a/ScoreboardExt/Classes/KFGUI_ComponentList.uc +++ b/ScoreboardExt/Classes/KFGUI_ComponentList.uc @@ -1,6 +1,9 @@ // List box with components as items. Class KFGUI_ComponentList extends KFGUI_List; +`include(Build.uci) +`include(Logger.uci) + var int VisRange[2]; var() int NumColumns; var array ItemComponents; diff --git a/ScoreboardExt/Classes/KFGUI_EditBox.uc b/ScoreboardExt/Classes/KFGUI_EditBox.uc index 40f6ce3..4fad52c 100644 --- a/ScoreboardExt/Classes/KFGUI_EditBox.uc +++ b/ScoreboardExt/Classes/KFGUI_EditBox.uc @@ -1,5 +1,8 @@ Class KFGUI_EditBox extends KFGUI_Clickable; +`include(Build.uci) +`include(Logger.uci) + var enum eTextCase { TXTC_None, diff --git a/ScoreboardExt/Classes/KFGUI_EditControl.uc b/ScoreboardExt/Classes/KFGUI_EditControl.uc index 7267321..5185b7d 100644 --- a/ScoreboardExt/Classes/KFGUI_EditControl.uc +++ b/ScoreboardExt/Classes/KFGUI_EditControl.uc @@ -1,5 +1,8 @@ Class KFGUI_EditControl extends KFGUI_Clickable; +`include(Build.uci) +`include(Logger.uci) + var export editinline KFGUI_TextLable TextLable; var transient float TextHeight,TextScale; var transient Font TextFont; diff --git a/ScoreboardExt/Classes/KFGUI_FloatingWindow.uc b/ScoreboardExt/Classes/KFGUI_FloatingWindow.uc index 7285b00..817989d 100644 --- a/ScoreboardExt/Classes/KFGUI_FloatingWindow.uc +++ b/ScoreboardExt/Classes/KFGUI_FloatingWindow.uc @@ -1,6 +1,9 @@ Class KFGUI_FloatingWindow extends KFGUI_Page abstract; +`include(Build.uci) +`include(Logger.uci) + var() string WindowTitle; // Title of this window. var float DragOffset[2], OpenAnimSpeed; var KFGUI_FloatingWindowHeader HeaderComp; diff --git a/ScoreboardExt/Classes/KFGUI_FloatingWindowHeader.uc b/ScoreboardExt/Classes/KFGUI_FloatingWindowHeader.uc index e2d0c6f..565fc45 100644 --- a/ScoreboardExt/Classes/KFGUI_FloatingWindowHeader.uc +++ b/ScoreboardExt/Classes/KFGUI_FloatingWindowHeader.uc @@ -1,5 +1,8 @@ Class KFGUI_FloatingWindowHeader extends KFGUI_Base; +`include(Build.uci) +`include(Logger.uci) + var bool bDragWindow; function PreDraw() diff --git a/ScoreboardExt/Classes/KFGUI_Frame.uc b/ScoreboardExt/Classes/KFGUI_Frame.uc index c9b35ab..9f83991 100644 --- a/ScoreboardExt/Classes/KFGUI_Frame.uc +++ b/ScoreboardExt/Classes/KFGUI_Frame.uc @@ -1,5 +1,8 @@ Class KFGUI_Frame extends KFGUI_FloatingWindow; - + +`include(Build.uci) +`include(Logger.uci) + var() float EdgeSize[4]; // Pixels wide for edges (left, top, right, bottom). var() float HeaderSize[2]; // Pixels wide for edges (left, top). var() Texture FrameTex; diff --git a/ScoreboardExt/Classes/KFGUI_Image.uc b/ScoreboardExt/Classes/KFGUI_Image.uc index f38b8bf..0666cf5 100644 --- a/ScoreboardExt/Classes/KFGUI_Image.uc +++ b/ScoreboardExt/Classes/KFGUI_Image.uc @@ -1,5 +1,8 @@ Class KFGUI_Image extends KFGUI_Base; +`include(Build.uci) +`include(Logger.uci) + var enum eImageStyle { ISTY_Normal, diff --git a/ScoreboardExt/Classes/KFGUI_List.uc b/ScoreboardExt/Classes/KFGUI_List.uc index 7137ed8..425966d 100644 --- a/ScoreboardExt/Classes/KFGUI_List.uc +++ b/ScoreboardExt/Classes/KFGUI_List.uc @@ -1,6 +1,9 @@ // List box with custom render code for the items. Class KFGUI_List extends KFGUI_MultiComponent; +`include(Build.uci) +`include(Logger.uci) + var() bool bDrawBackground, bHideScrollbar, bUseFocusSound; var() protectedwrite int ListCount; var() int ListItemsPerPage; diff --git a/ScoreboardExt/Classes/KFGUI_ListHorz.uc b/ScoreboardExt/Classes/KFGUI_ListHorz.uc index 0949cab..d81a547 100644 --- a/ScoreboardExt/Classes/KFGUI_ListHorz.uc +++ b/ScoreboardExt/Classes/KFGUI_ListHorz.uc @@ -1,5 +1,8 @@ Class KFGUI_ListHorz extends KFGUI_MultiComponent; +`include(Build.uci) +`include(Logger.uci) + var() bool bDrawBackground, bHideScrollbar, bUseFocusSound; var() protected int ListCount; var() int ListItemsPerPage; diff --git a/ScoreboardExt/Classes/KFGUI_ListItem.uc b/ScoreboardExt/Classes/KFGUI_ListItem.uc index 5b20a26..a329d9b 100644 --- a/ScoreboardExt/Classes/KFGUI_ListItem.uc +++ b/ScoreboardExt/Classes/KFGUI_ListItem.uc @@ -1,6 +1,9 @@ Class KFGUI_ListItem extends Object transient; +`include(Build.uci) +`include(Logger.uci) + var KFGUI_ListItem Next; var array Columns,SortColumns; var int Index,Value; diff --git a/ScoreboardExt/Classes/KFGUI_MultiComponent.uc b/ScoreboardExt/Classes/KFGUI_MultiComponent.uc index 4ed96e7..8b26974 100644 --- a/ScoreboardExt/Classes/KFGUI_MultiComponent.uc +++ b/ScoreboardExt/Classes/KFGUI_MultiComponent.uc @@ -1,5 +1,8 @@ Class KFGUI_MultiComponent extends KFGUI_Base; +`include(Build.uci) +`include(Logger.uci) + var() export editinline array Components; function InitMenu() diff --git a/ScoreboardExt/Classes/KFGUI_Page.uc b/ScoreboardExt/Classes/KFGUI_Page.uc index 1bf6071..9750edd 100644 --- a/ScoreboardExt/Classes/KFGUI_Page.uc +++ b/ScoreboardExt/Classes/KFGUI_Page.uc @@ -1,6 +1,9 @@ Class KFGUI_Page extends KFGUI_MultiComponent abstract; +`include(Build.uci) +`include(Logger.uci) + var() byte FrameOpacity; // Transperancy of the frame. var() bool bPersistant, // Reuse the same menu object throughout the level. bUnique, // If calling OpenMenu multiple times with same menu class, only open one instance of it. diff --git a/ScoreboardExt/Classes/KFGUI_ProgressBar.uc b/ScoreboardExt/Classes/KFGUI_ProgressBar.uc index bf0e5e1..f462d73 100644 --- a/ScoreboardExt/Classes/KFGUI_ProgressBar.uc +++ b/ScoreboardExt/Classes/KFGUI_ProgressBar.uc @@ -1,5 +1,8 @@ class KFGUI_ProgressBar extends KFGUI_Base; +`include(Build.uci) +`include(Logger.uci) + var Texture BarBack; var Texture BarTop; var Color BarColor; diff --git a/ScoreboardExt/Classes/KFGUI_RightClickMenu.uc b/ScoreboardExt/Classes/KFGUI_RightClickMenu.uc index 2aae210..37ec2a7 100644 --- a/ScoreboardExt/Classes/KFGUI_RightClickMenu.uc +++ b/ScoreboardExt/Classes/KFGUI_RightClickMenu.uc @@ -1,5 +1,8 @@ Class KFGUI_RightClickMenu extends KFGUI_Clickable; +`include(Build.uci) +`include(Logger.uci) + struct FRowItem { var string Text,ToolTip; diff --git a/ScoreboardExt/Classes/KFGUI_ScrollBarBase.uc b/ScoreboardExt/Classes/KFGUI_ScrollBarBase.uc index 78488e9..d5a4f32 100644 --- a/ScoreboardExt/Classes/KFGUI_ScrollBarBase.uc +++ b/ScoreboardExt/Classes/KFGUI_ScrollBarBase.uc @@ -1,6 +1,9 @@ Class KFGUI_ScrollBarBase extends KFGUI_Clickable abstract; +`include(Build.uci) +`include(Logger.uci) + var() int MinRange,MaxRange,ScrollStride,PageStep; var() float ButtonScale; // Button width (scaled by default font height). var int CurrentScroll; diff --git a/ScoreboardExt/Classes/KFGUI_ScrollBarH.uc b/ScoreboardExt/Classes/KFGUI_ScrollBarH.uc index eed8e45..532cca7 100644 --- a/ScoreboardExt/Classes/KFGUI_ScrollBarH.uc +++ b/ScoreboardExt/Classes/KFGUI_ScrollBarH.uc @@ -1,5 +1,8 @@ Class KFGUI_ScrollBarH extends KFGUI_ScrollBarBase; +`include(Build.uci) +`include(Logger.uci) + defaultproperties { bVertical=false diff --git a/ScoreboardExt/Classes/KFGUI_ScrollBarV.uc b/ScoreboardExt/Classes/KFGUI_ScrollBarV.uc index 54364ff..81c18e4 100644 --- a/ScoreboardExt/Classes/KFGUI_ScrollBarV.uc +++ b/ScoreboardExt/Classes/KFGUI_ScrollBarV.uc @@ -1,5 +1,8 @@ Class KFGUI_ScrollBarV extends KFGUI_ScrollBarBase; +`include(Build.uci) +`include(Logger.uci) + defaultproperties { bVertical=true diff --git a/ScoreboardExt/Classes/KFGUI_Slider.uc b/ScoreboardExt/Classes/KFGUI_Slider.uc index cd94b32..28c3e18 100644 --- a/ScoreboardExt/Classes/KFGUI_Slider.uc +++ b/ScoreboardExt/Classes/KFGUI_Slider.uc @@ -1,5 +1,8 @@ class KFGUI_Slider extends KFGUI_MultiComponent; +`include(Build.uci) +`include(Logger.uci) + var KFGUI_ScrollBarH ScrollBar; var int MinValue,MaxValue; diff --git a/ScoreboardExt/Classes/KFGUI_SwitchMenuBar.uc b/ScoreboardExt/Classes/KFGUI_SwitchMenuBar.uc index e09421b..593c1c5 100644 --- a/ScoreboardExt/Classes/KFGUI_SwitchMenuBar.uc +++ b/ScoreboardExt/Classes/KFGUI_SwitchMenuBar.uc @@ -1,6 +1,9 @@ // Same as SwitchComponent, but with buttons. Class KFGUI_SwitchMenuBar extends KFGUI_MultiComponent; +`include(Build.uci) +`include(Logger.uci) + var array SubPages; var() byte ButtonPosition; // 0 = top, 1 = bottom, 2 = left, 3 = right var() float BorderWidth,ButtonAxisSize; // Width for buttons. diff --git a/ScoreboardExt/Classes/KFGUI_TextField.uc b/ScoreboardExt/Classes/KFGUI_TextField.uc index 7a43195..db47131 100644 --- a/ScoreboardExt/Classes/KFGUI_TextField.uc +++ b/ScoreboardExt/Classes/KFGUI_TextField.uc @@ -1,5 +1,8 @@ Class KFGUI_TextField extends KFGUI_MultiComponent; +`include(Build.uci) +`include(Logger.uci) + enum ETextFieldStyles { TEXT_FIELD_NONE, diff --git a/ScoreboardExt/Classes/KFGUI_TextLable.uc b/ScoreboardExt/Classes/KFGUI_TextLable.uc index 825dfc1..1078548 100644 --- a/ScoreboardExt/Classes/KFGUI_TextLable.uc +++ b/ScoreboardExt/Classes/KFGUI_TextLable.uc @@ -1,5 +1,8 @@ Class KFGUI_TextLable extends KFGUI_Base; +`include(Build.uci) +`include(Logger.uci) + var() protected string Text; var() color TextColor; var() Canvas.FontRenderInfo TextFontInfo; diff --git a/ScoreboardExt/Classes/KFGUI_TextScroll.uc b/ScoreboardExt/Classes/KFGUI_TextScroll.uc index 9561ee9..7d545ff 100644 --- a/ScoreboardExt/Classes/KFGUI_TextScroll.uc +++ b/ScoreboardExt/Classes/KFGUI_TextScroll.uc @@ -1,5 +1,8 @@ Class KFGUI_TextScroll extends KFGUI_TextField; +`include(Build.uci) +`include(Logger.uci) + var float ScrollSpeed; var transient float CharStartTime; diff --git a/ScoreboardExt/Classes/KFGUI_Tooltip.uc b/ScoreboardExt/Classes/KFGUI_Tooltip.uc index bbc137d..20181d4 100644 --- a/ScoreboardExt/Classes/KFGUI_Tooltip.uc +++ b/ScoreboardExt/Classes/KFGUI_Tooltip.uc @@ -1,5 +1,8 @@ Class KFGUI_Tooltip extends KFGUI_Base; +`include(Build.uci) +`include(Logger.uci) + var() array Lines; var() Canvas.FontRenderInfo TextFontInfo; var byte CurrentAlpha; diff --git a/ScoreboardExt/Classes/KFScoreBoard.uc b/ScoreboardExt/Classes/KFScoreBoard.uc index e405cb3..dc2112e 100644 --- a/ScoreboardExt/Classes/KFScoreBoard.uc +++ b/ScoreboardExt/Classes/KFScoreBoard.uc @@ -1,6 +1,9 @@ class KFScoreBoard extends KFGUI_Page dependson(Types); +`include(Build.uci) +`include(Logger.uci) + var transient float RankXPos, PerkXPos, PlayerXPos, HealthXPos, TimeXPos, KillsXPos, AssistXPos, CashXPos, DeathXPos, PingXPos; var transient float StatusWBox, PlayerWBox, PerkWBox, CashWBox, KillsWBox, AssistWBox, HealthWBox, PingWBox; var transient float NextScoreboardRefresh; diff --git a/ScoreboardExt/Classes/PlayerRankRelations.uc b/ScoreboardExt/Classes/PlayerRankRelations.uc index b52ed88..90358a7 100644 --- a/ScoreboardExt/Classes/PlayerRankRelations.uc +++ b/ScoreboardExt/Classes/PlayerRankRelations.uc @@ -2,4 +2,7 @@ class PlayerRankRelations extends Object dependson(Types) config(ScoreboardExt); +`include(Build.uci) +`include(Logger.uci) + var config array Relation; diff --git a/ScoreboardExt/Classes/ScoreboardExtHUD.uc b/ScoreboardExt/Classes/ScoreboardExtHUD.uc index 9e705a0..448f03a 100644 --- a/ScoreboardExt/Classes/ScoreboardExtHUD.uc +++ b/ScoreboardExt/Classes/ScoreboardExtHUD.uc @@ -1,6 +1,9 @@ class ScoreboardExtHUD extends KFGFxHudWrapper config(ScoreboardExtMut); +`include(Build.uci) +`include(Logger.uci) + const HUDBorderSize = 3; var float ScaledBorderSize; diff --git a/ScoreboardExt/Classes/ScoreboardExtMut.uc b/ScoreboardExt/Classes/ScoreboardExtMut.uc index 5ee618f..464b5df 100644 --- a/ScoreboardExt/Classes/ScoreboardExtMut.uc +++ b/ScoreboardExt/Classes/ScoreboardExtMut.uc @@ -2,10 +2,8 @@ class ScoreboardExtMut extends KFMutator dependson(Types) config(ScoreboardExt); -const SteamIDLen = 17; -const UniqueIDLen = 18; - -const CurrentVersion = 1; +`include(Build.uci) +`include(Logger.uci) var config int ConfigVersion; @@ -25,6 +23,8 @@ var private SCESettings Settings; function PostBeginPlay() { + `callstack(); + Super.PostBeginPlay(); WorldInfo.Game.HUDType = class'ScoreboardExtHUD'; @@ -44,22 +44,35 @@ function PostBeginPlay() function NotifyLogin(Controller C) { + `callstack(); + AddPlayer(C); Super.NotifyLogin(C); } function NotifyLogout(Controller C) { + `callstack(); + RemovePlayer(C); Super.NotifyLogout(C); } +private function bool IsUID(String ID) +{ + `callstack(); + + return (Left(ID, 2) ~= "0x"); +} + private function InitConfig() { local RankInfo ExampleRank; local RankRelation ExamplePlayer; local RankRelation ExampleSteamGroup; + `callstack(); + // Update from config version to current version if needed switch (ConfigVersion) { @@ -106,23 +119,23 @@ private function InitConfig() class'SteamGroupRankRelations'.static.StaticSaveConfig(); case 2147483647: - `log("[ScoreboardExt] Config updated to version"@CurrentVersion); + `info("Config updated to version"@`CurrentVersion); break; - case CurrentVersion: - `log("[ScoreboardExt] Config is up-to-date"); + case `CurrentVersion: + `info("Config is up-to-date"); break; default: - `log("[ScoreboardExt] Warn: The config version is higher than the current version (are you using an old mutator?)"); - `log("[ScoreboardExt] Warn: Config version is"@ConfigVersion@"but current version is"@CurrentVersion); - `log("[ScoreboardExt] Warn: The config version will be changed to "@CurrentVersion); + `warning("The config version is higher than the current version (are you using an old mutator?)"); + `warning("Config version is"@ConfigVersion@"but current version is"@`CurrentVersion); + `warning("The config version will be changed to "@`CurrentVersion); break; } - if (ConfigVersion != CurrentVersion) + if (ConfigVersion != `CurrentVersion) { - ConfigVersion = CurrentVersion; + ConfigVersion = `CurrentVersion; SaveConfig(); } } @@ -132,31 +145,38 @@ private function LoadRelations() local RankRelation Player, SteamGroup; local UIDRankRelation UIDInfo; + `callstack(); + foreach class'PlayerRankRelations'.default.Relation(Player) { UIDInfo.RankID = Player.RankID; - if (Len(Player.ObjectID) == UniqueIDLen && Steamworks.StringToUniqueNetId(Player.ObjectID, UIDInfo.UID)) + if (IsUID(Player.ObjectID) && Steamworks.StringToUniqueNetId(Player.ObjectID, UIDInfo.UID)) { if (UIDRankRelationsPlayers.Find('Uid', UIDInfo.UID) == INDEX_NONE) UIDRankRelationsPlayers.AddItem(UIDInfo); } - else if (Len(Player.ObjectID) == SteamIDLen && Steamworks.Int64ToUniqueNetId(Player.ObjectID, UIDInfo.UID)) + else if (Steamworks.Int64ToUniqueNetId(Player.ObjectID, UIDInfo.UID)) { if (UIDRankRelationsPlayers.Find('Uid', UIDInfo.UID) == INDEX_NONE) UIDRankRelationsPlayers.AddItem(UIDInfo); } - else `Log("[ScoreboardExt] WARN: Can't add player:"@Player.ObjectID); + else `warning("Can't add player:"@Player.ObjectID); } foreach class'SteamGroupRankRelations'.default.Relation(SteamGroup) { UIDInfo.RankID = SteamGroup.RankID; - if (Steamworks.Int64ToUniqueNetId(SteamGroup.ObjectID, UIDInfo.UID)) + if (IsUID(SteamGroup.ObjectID) && Steamworks.StringToUniqueNetId(SteamGroup.ObjectID, UIDInfo.UID)) + { + if (UIDRankRelationsPlayers.Find('Uid', UIDInfo.UID) == INDEX_NONE) + UIDRankRelationsPlayers.AddItem(UIDInfo); + } + else if (Steamworks.Int64ToUniqueNetId(SteamGroup.ObjectID, UIDInfo.UID)) { if (UIDRankRelationsSteamGroups.Find('Uid', UIDInfo.UID) == INDEX_NONE) UIDRankRelationsSteamGroups.AddItem(UIDInfo); } - else `Log("[ScoreboardExt] WARN: Can't add steamgroup:"@SteamGroup.ObjectID); + else `warning("Can't add steamgroup:"@SteamGroup.ObjectID); } } @@ -164,31 +184,34 @@ private function AddPlayer(Controller C) { local KFPlayerController KFPC; local UIDRankRelation Relation; - local SClient RepClient; + local SClient RepClient, RepClientNew; + + `callstack(); KFPC = KFPlayerController(C); if (KFPC == None) return; - RepClient.KFPC = KFPC; - RepClient.RepInfo = Spawn(class'ScoreboardExtRepInfo', KFPC); - RepClient.RepInfo.Mut = Self; - RepClient.RepInfo.CustomRanks = class'CustomRanks'.default.Rank; - RepClient.RepInfo.SteamGroupRelations = UIDRankRelationsSteamGroups; - RepClient.RepInfo.Settings = Settings; - RepClient.RepInfo.RankRelation.UID = KFPC.PlayerReplicationInfo.UniqueId; - RepClient.RepInfo.RankRelation.RankID = UIDRankRelationsPlayers.Find('UID', RepClient.RepInfo.RankRelation.UID); + RepClientNew.KFPC = KFPC; + RepClientNew.RepInfo = Spawn(class'ScoreboardExtRepInfo', KFPC); + RepClientNew.RepInfo.Mut = Self; + RepClientNew.RepInfo.CustomRanks = class'CustomRanks'.default.Rank; + RepClientNew.RepInfo.SteamGroupRelations = UIDRankRelationsSteamGroups; + RepClientNew.RepInfo.Settings = Settings; + RepClientNew.RepInfo.RankRelation.UID = KFPC.PlayerReplicationInfo.UniqueId; + RepClientNew.RepInfo.RankRelation.RankID = UIDRankRelationsPlayers.Find('UID', RepClientNew.RepInfo.RankRelation.UID); - UIDRankRelationsActive.AddItem(RepClient.RepInfo.RankRelation); + UIDRankRelationsActive.AddItem(RepClientNew.RepInfo.RankRelation); - RepClients.AddItem(RepClient); + RepClients.AddItem(RepClientNew); - // хуйня - foreach UIDRankRelationsActive(Relation) - foreach RepClients(RepClient) - RepClient.RepInfo.AddRankRelation(Relation); + foreach UIDRankRelationsActive(Relation) // For this player + RepClientNew.RepInfo.AddRankRelation(Relation); - RepClient.RepInfo.StartFirstTimeReplication(); + RepClientNew.RepInfo.StartFirstTimeReplication(); + + foreach RepClients(RepClient) // For other players + RepClient.RepInfo.AddRankRelation(Relation); } private function RemovePlayer(Controller C) @@ -196,6 +219,8 @@ private function RemovePlayer(Controller C) local KFPlayerController KFPC; local int Index; + `callstack(); + KFPC = KFPlayerController(C); if (KFPC == None) return; @@ -232,6 +257,8 @@ public function UpdatePlayerRank(UIDRankRelation Rel) local SClient RepClient; local int Index; + `callstack(); + Index = UIDRankRelationsActive.Find('UID', Rel.UID); if (Index != INDEX_NONE) @@ -244,6 +271,9 @@ public function UpdatePlayerRank(UIDRankRelation Rel) public function AddPlayerRank(UIDRankRelation Rel) { local SClient RepClient; + + `callstack(); + foreach RepClients(RepClient) RepClient.RepInfo.AddRankRelation(Rel); } diff --git a/ScoreboardExt/Classes/ScoreboardExtRepInfo.uc b/ScoreboardExt/Classes/ScoreboardExtRepInfo.uc index 3585a0a..b7a6b79 100644 --- a/ScoreboardExt/Classes/ScoreboardExtRepInfo.uc +++ b/ScoreboardExt/Classes/ScoreboardExtRepInfo.uc @@ -1,5 +1,8 @@ class ScoreboardExtRepInfo extends ReplicationInfo; +`include(Build.uci) +`include(Logger.uci) + // Server vars var public ScoreboardExtMut Mut; @@ -17,6 +20,8 @@ var private int CustomRanksRepProgress, SteamGroupsRepProgress; simulated event PostBeginPlay() { + `callstack(); + super.PostBeginPlay(); if (bDeleteMe) return; @@ -29,6 +34,8 @@ simulated event PostBeginPlay() private reliable client function ClientInit() { + `callstack(); + if (SC == None) SC = ScoreboardExtHUD(GetALocalPlayerController().myHUD).Scoreboard; @@ -43,17 +50,23 @@ private reliable client function ClientInit() public function StartFirstTimeReplication() { + `callstack(); + SetTimer(0.01f, true, nameof(ReplicateCustomRanks)); SetTimer(0.01f, true, nameof(ReplicateSteamGroupRelations)); } private reliable client function ClientSetSettings(SCESettings Set) { + `callstack(); + SC.Settings = Set; } private function ReplicateCustomRanks() { + `callstack(); + if (CustomRanksRepProgress < CustomRanks.Length) { ClientAddCustomRank(CustomRanks[CustomRanksRepProgress]); @@ -67,11 +80,15 @@ private function ReplicateCustomRanks() private reliable client function ClientAddCustomRank(RankInfo Rank) { + `callstack(); + CustomRanks.AddItem(Rank); } private function ReplicateSteamGroupRelations() { + `callstack(); + if (SteamGroupsRepProgress < SteamGroupRelations.Length) { ClientAddSteamGroupRelation(SteamGroupRelations[SteamGroupsRepProgress]); @@ -87,6 +104,8 @@ private function ReplicateSteamGroupRelations() private reliable client function ClientAddSteamGroupRelation(UIDRankRelation Rel) { + `callstack(); + SteamGroupRelations.AddItem(Rel); } @@ -94,6 +113,8 @@ private reliable client function FindMyRankInSteamGroups() { local UIDRankRelation SteamGroupRel; + `callstack(); + foreach SteamGroupRelations(SteamGroupRel) if (SW.CheckPlayerGroup(SteamGroupRel.UID)) RankRelation.RankID = SteamGroupRel.RankID; @@ -104,32 +125,44 @@ private reliable client function FindMyRankInSteamGroups() private reliable server function ServerApplyRank(int RankID) { + `callstack(); + RankRelation.RankID = RankID; Mut.UpdatePlayerRank(RankRelation); } public function AddRankRelation(UIDRankRelation Rel) { + `callstack(); + ClientAddRankRelation(Rel); } private reliable client function ClientAddRankRelation(UIDRankRelation Rel) { + `callstack(); + SC.RankRelations.AddItem(Rel); } public function RemoveRankRelation(UIDRankRelation Rel) { + `callstack(); + ClientRemoveRankRelation(Rel); } private unreliable client function ClientRemoveRankRelation(UIDRankRelation Rel) { + `callstack(); + SC.RankRelations.RemoveItem(Rel); } public function UpdateRankRelation(UIDRankRelation Rel) { + `callstack(); + ClientUpdateRankRelation(Rel); } @@ -137,6 +170,8 @@ private reliable client function ClientUpdateRankRelation(UIDRankRelation Rel) { local int Index; + `callstack(); + Index = SC.RankRelations.Find('UID', Rel.UID); if (Index != INDEX_NONE) diff --git a/ScoreboardExt/Classes/ScoreboardStyle.uc b/ScoreboardExt/Classes/ScoreboardStyle.uc index 8e1f5f2..d53fe8a 100644 --- a/ScoreboardExt/Classes/ScoreboardStyle.uc +++ b/ScoreboardExt/Classes/ScoreboardStyle.uc @@ -2,6 +2,9 @@ class ScoreboardStyle extends Object dependson(Types) config(ScoreboardExt); +`include(Build.uci) +`include(Logger.uci) + var config ColorRGBA ServerNameBoxColor; var config ColorRGBA ServerNameTextColor; var config ColorRGBA GameInfoBoxColor; @@ -42,9 +45,12 @@ var config ColorRGBA PingTextColorLow; var config ColorRGBA PingTextColorMid; var config ColorRGBA PingTextColorHigh; -public static function SCEStyle defaultSettings() +public static function SCEStyle DefaultSettings() { local SCEStyle Settings; + + `callstack_static("DefaultSettings"); + return Settings; } @@ -52,6 +58,8 @@ public static function SCEStyle Settings() { local SCEStyle Settings; + `callstack_static("Settings"); + Settings.ServerNameBoxColor = default.ServerNameBoxColor; Settings.ServerNameTextColor = default.ServerNameTextColor; Settings.GameInfoBoxColor = default.GameInfoBoxColor; @@ -97,6 +105,8 @@ public static function SCEStyle Settings() public static function WriteSettings(SCEStyle Settings) { + `callstack_static("WriteSettings"); + default.ServerNameBoxColor = Settings.ServerNameBoxColor; default.ServerNameTextColor = Settings.ServerNameTextColor; default.GameInfoBoxColor = Settings.GameInfoBoxColor; diff --git a/ScoreboardExt/Classes/SteamGroupRankRelations.uc b/ScoreboardExt/Classes/SteamGroupRankRelations.uc index aa162fa..88d2e6a 100644 --- a/ScoreboardExt/Classes/SteamGroupRankRelations.uc +++ b/ScoreboardExt/Classes/SteamGroupRankRelations.uc @@ -2,6 +2,9 @@ class SteamGroupRankRelations extends Object dependson(Types) config(ScoreboardExt); +`include(Build.uci) +`include(Logger.uci) + var config array Relation; DefaultProperties diff --git a/ScoreboardExt/Classes/SystemAdminRank.uc b/ScoreboardExt/Classes/SystemAdminRank.uc index e200b94..1d30573 100644 --- a/ScoreboardExt/Classes/SystemAdminRank.uc +++ b/ScoreboardExt/Classes/SystemAdminRank.uc @@ -2,6 +2,9 @@ class SystemAdminRank extends Object dependson(Types) config(ScoreboardExt); +`include(Build.uci) +`include(Logger.uci) + var config string Rank; var config ColorRGBA TextColor; var config Fields ApplyColorToFields; @@ -9,6 +12,9 @@ var config Fields ApplyColorToFields; public static function SCESettingsAdmin DefaultSettings() { local SCESettingsAdmin Settings; + + `callstack_static("DefaultSettings"); + return Settings; } @@ -16,6 +22,8 @@ public static function SCESettingsAdmin Settings() { local SCESettingsAdmin Settings; + `callstack_static("Settings"); + Settings.Rank = default.Rank; Settings.TextColor = default.TextColor; Settings.ApplyColorToFields = default.ApplyColorToFields; @@ -25,6 +33,8 @@ public static function SCESettingsAdmin Settings() public static function WriteSettings(SCESettingsAdmin Settings) { + `callstack_static("WriteSettings"); + default.Rank = Settings.Rank; default.TextColor = Settings.TextColor; default.ApplyColorToFields = Settings.ApplyColorToFields; diff --git a/ScoreboardExt/Classes/SystemPlayerRank.uc b/ScoreboardExt/Classes/SystemPlayerRank.uc index 86e0a98..74d62c9 100644 --- a/ScoreboardExt/Classes/SystemPlayerRank.uc +++ b/ScoreboardExt/Classes/SystemPlayerRank.uc @@ -2,6 +2,9 @@ class SystemPlayerRank extends Object dependson(Types) config(ScoreboardExt); +`include(Build.uci) +`include(Logger.uci) + var config string Rank; var config ColorRGBA TextColor; var config Fields ApplyColorToFields; @@ -9,6 +12,9 @@ var config Fields ApplyColorToFields; public static function SCESettingsPlayer DefaultSettings() { local SCESettingsPlayer Settings; + + `callstack_static("abc"); + return Settings; } @@ -16,6 +22,8 @@ public static function SCESettingsPlayer Settings() { local SCESettingsPlayer Settings; + `callstack_static("abc"); + Settings.Rank = default.Rank; Settings.TextColor = default.TextColor; Settings.ApplyColorToFields = default.ApplyColorToFields; @@ -25,6 +33,8 @@ public static function SCESettingsPlayer Settings() public static function WriteSettings(SCESettingsPlayer Settings) { + `callstack_static("abc"); + default.Rank = Settings.Rank; default.TextColor = Settings.TextColor; default.ApplyColorToFields = Settings.ApplyColorToFields; diff --git a/ScoreboardExt/Classes/Types.uc b/ScoreboardExt/Classes/Types.uc index d496748..c4f2e99 100644 --- a/ScoreboardExt/Classes/Types.uc +++ b/ScoreboardExt/Classes/Types.uc @@ -1,5 +1,8 @@ class Types extends Object; +`include(Build.uci) +`include(Logger.uci) + struct ColorRGBA { var byte R, G, B, A; diff --git a/ScoreboardExt/Logger.uci b/ScoreboardExt/Logger.uci new file mode 100644 index 0000000..acaa3b4 --- /dev/null +++ b/ScoreboardExt/Logger.uci @@ -0,0 +1,9 @@ +`define scelog(text, cond) `log(`text, `cond, 'ScoreboardExt') + +`define info(text) `scelog("[INFO]"@`text, true) +`define warning(text) `scelog("[WARNING]"@`text, true) +`define error(text) `scelog("[ERROR]"@`text, true) + +`define debug(text, cond) `scelog("[DEBUG]"@`text, true) +`define callstack() `scelog("[CALLSTACK]"@`Location@"ROLE="$ROLE, `bEnableCallstack) +`define callstack_static(text) `scelog("[CALLSTACK]"@`text, `bEnableCallstack) \ No newline at end of file