wip
This commit is contained in:
parent
951be22005
commit
8ebf92f710
@ -6,3 +6,40 @@ class CustomRanks extends Object
|
|||||||
`include(Logger.uci)
|
`include(Logger.uci)
|
||||||
|
|
||||||
var config array<RankInfo> Rank;
|
var config array<RankInfo> Rank;
|
||||||
|
|
||||||
|
public static function InitConfig(int ConfigVersion)
|
||||||
|
{
|
||||||
|
local RankInfo ExampleRank;
|
||||||
|
|
||||||
|
`callstack_static("InitConfig");
|
||||||
|
|
||||||
|
switch (ConfigVersion)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
// Example rank for player(s)
|
||||||
|
ExampleRank.ID = 0;
|
||||||
|
ExampleRank.Rank = "YAS Creator";
|
||||||
|
ExampleRank.TextColor.R = 130;
|
||||||
|
ExampleRank.TextColor.G = 250;
|
||||||
|
ExampleRank.TextColor.B = 235;
|
||||||
|
ExampleRank.OverrideAdminRank = false;
|
||||||
|
default.Rank.AddItem(ExampleRank);
|
||||||
|
|
||||||
|
// Example rank for steam group members
|
||||||
|
ExampleRank.ID = 1;
|
||||||
|
ExampleRank.Rank = "MSK-GS";
|
||||||
|
ExampleRank.TextColor.R = 130;
|
||||||
|
ExampleRank.TextColor.G = 250;
|
||||||
|
ExampleRank.TextColor.B = 130;
|
||||||
|
ExampleRank.OverrideAdminRank = false;
|
||||||
|
default.Rank.AddItem(ExampleRank);
|
||||||
|
|
||||||
|
case 2147483647:
|
||||||
|
StaticSaveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DefaultProperties
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
@ -1,48 +0,0 @@
|
|||||||
class DynamicStateColor extends Object
|
|
||||||
dependson(Types)
|
|
||||||
config(YAS);
|
|
||||||
|
|
||||||
`include(Build.uci)
|
|
||||||
`include(Logger.uci)
|
|
||||||
|
|
||||||
var config bool bEnabled;
|
|
||||||
var config int Low;
|
|
||||||
var config int High;
|
|
||||||
|
|
||||||
public static function YASSettingsState DefaultSettings()
|
|
||||||
{
|
|
||||||
local YASSettingsState Settings;
|
|
||||||
|
|
||||||
`callstack_static("DefaultSettings");
|
|
||||||
|
|
||||||
return Settings;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function YASSettingsState Settings()
|
|
||||||
{
|
|
||||||
local YASSettingsState Settings;
|
|
||||||
|
|
||||||
`callstack_static("Settings");
|
|
||||||
|
|
||||||
Settings.Dynamic = default.bEnabled;
|
|
||||||
Settings.Low = default.Low;
|
|
||||||
Settings.High = default.High;
|
|
||||||
|
|
||||||
return Settings;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function WriteSettings(YASSettingsState Settings)
|
|
||||||
{
|
|
||||||
`callstack_static("WriteSettings");
|
|
||||||
|
|
||||||
default.bEnabled = Settings.Dynamic;
|
|
||||||
default.Low = Settings.Low;
|
|
||||||
default.High = Settings.High;
|
|
||||||
|
|
||||||
StaticSaveConfig();
|
|
||||||
}
|
|
||||||
|
|
||||||
DefaultProperties
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
@ -1146,6 +1146,42 @@ final function DrawRectBox(float X, float Y, float Width, float Height, int Edge
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 250:
|
||||||
|
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||||
|
ECS_BeveledCorner, // TopLeft
|
||||||
|
ECS_BeveledCorner, // TopRight
|
||||||
|
ECS_Corner, // BottomLeft
|
||||||
|
ECS_Corner // BottomRight
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 251:
|
||||||
|
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||||
|
ECS_BeveledCorner, // TopLeft
|
||||||
|
ECS_Corner, // TopRight
|
||||||
|
ECS_BeveledCorner, // BottomLeft
|
||||||
|
ECS_Corner // BottomRight
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 252:
|
||||||
|
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||||
|
ECS_Corner, // TopLeft
|
||||||
|
ECS_Corner, // TopRight
|
||||||
|
ECS_BeveledCorner, // BottomLeft
|
||||||
|
ECS_BeveledCorner // BottomRight
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 253:
|
||||||
|
DrawRectBoxSmart(X, Y, Width, Height, Edge,
|
||||||
|
ECS_Corner, // TopLeft
|
||||||
|
ECS_BeveledCorner, // TopRight
|
||||||
|
ECS_Corner, // BottomLeft
|
||||||
|
ECS_BeveledCorner // BottomRight
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
default: // 0
|
default: // 0
|
||||||
// ______
|
// ______
|
||||||
// / \
|
// / \
|
||||||
|
@ -4,9 +4,10 @@ class KFScoreBoard extends KFGUI_Page
|
|||||||
`include(Build.uci)
|
`include(Build.uci)
|
||||||
`include(Logger.uci)
|
`include(Logger.uci)
|
||||||
|
|
||||||
var transient float RankXPos, LevelXPos, PerkXPos, PlayerXPos, HealthXPos, TimeXPos, KillsXPos, AssistXPos, CashXPos, DeathXPos, PingXPos;
|
var transient float HealthXPos, ArmorXPos, RankXPos, PlayerXPos, LevelXPos, PerkXPos, DoshXPos, KillsXPos, AssistXPos, PingXPos;
|
||||||
var transient float StatusWBox, PlayerWBox, LevelWBox, PerkWBox, CashWBox, KillsWBox, AssistWBox, HealthWBox, PingWBox;
|
var transient float HealthWBox, ArmorWBox, RankWBox, PlayerWBox, LevelWBox, PerkWBox, DoshWBox, KillsWBox, AssistWBox, PingWBox;
|
||||||
var transient float NextScoreboardRefresh;
|
var transient float NextScoreboardRefresh;
|
||||||
|
var transient int NumPlayer;
|
||||||
|
|
||||||
var int PlayerIndex;
|
var int PlayerIndex;
|
||||||
var KFGUI_List PlayersList;
|
var KFGUI_List PlayersList;
|
||||||
@ -22,6 +23,7 @@ var float PingBars;
|
|||||||
|
|
||||||
// Cache
|
// Cache
|
||||||
var array<String> PerkNames;
|
var array<String> PerkNames;
|
||||||
|
var array<String> StateVariants;
|
||||||
|
|
||||||
// Ranks
|
// Ranks
|
||||||
var array<RankInfo> CustomRanks;
|
var array<RankInfo> CustomRanks;
|
||||||
@ -48,6 +50,7 @@ function InitMenu()
|
|||||||
PlayersList = KFGUI_List(FindComponentID('PlayerList'));
|
PlayersList = KFGUI_List(FindComponentID('PlayerList'));
|
||||||
OwnerPC = KFPlayerController(GetPlayer());
|
OwnerPC = KFPlayerController(GetPlayer());
|
||||||
|
|
||||||
|
// TODO: Remove this crunch
|
||||||
if (PerkNames.Length == 0)
|
if (PerkNames.Length == 0)
|
||||||
{
|
{
|
||||||
PerkNames.AddItem(class'KFGFxMenu_Inventory'.default.PerkFilterString);
|
PerkNames.AddItem(class'KFGFxMenu_Inventory'.default.PerkFilterString);
|
||||||
@ -62,6 +65,16 @@ function InitMenu()
|
|||||||
PerkNames.AddItem(class'KFPerk_SWAT'.default.PerkName);
|
PerkNames.AddItem(class'KFPerk_SWAT'.default.PerkName);
|
||||||
PerkNames.AddItem(class'KFPerk_Survivalist'.default.PerkName);
|
PerkNames.AddItem(class'KFPerk_Survivalist'.default.PerkName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StateVariants.Length == 0)
|
||||||
|
{
|
||||||
|
StateVariants.AddItem(State);
|
||||||
|
StateVariants.AddItem(Ready);
|
||||||
|
StateVariants.AddItem(NotReady);
|
||||||
|
StateVariants.AddItem(Unknown);
|
||||||
|
StateVariants.AddItem(Dead);
|
||||||
|
StateVariants.AddItem("ABCDABCD");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static function CheckAvatar(KFPlayerReplicationInfo KFPRI, KFPlayerController PC)
|
static function CheckAvatar(KFPlayerReplicationInfo KFPRI, KFPlayerController PC)
|
||||||
@ -129,9 +142,10 @@ function DrawMenu()
|
|||||||
local PlayerController PC;
|
local PlayerController PC;
|
||||||
local KFPlayerReplicationInfo KFPRI;
|
local KFPlayerReplicationInfo KFPRI;
|
||||||
local PlayerReplicationInfo PRI;
|
local PlayerReplicationInfo PRI;
|
||||||
local float XPos, YPos, YL, XL, FontScalar, XPosCenter, BoxW, BoxX, BoxH, MinBoxW, DoshSize;
|
local float XPos, YPos, YL, XL, FontScalar, XPosCenter, BoxW, BoxX, BoxH, MinBoxW, DoshSize, ScrollBarWidth;
|
||||||
local int i, j, NumSpec, NumPlayer, NumAlivePlayer, Width;
|
local int i, j, NumSpec, NumAlivePlayer, Width;
|
||||||
local float BorderSize;
|
local float BorderSize;
|
||||||
|
local ColorRGBA ColorTmp;
|
||||||
|
|
||||||
PC = GetPlayer();
|
PC = GetPlayer();
|
||||||
if (KFGRI == None)
|
if (KFGRI == None)
|
||||||
@ -271,7 +285,7 @@ function DrawMenu()
|
|||||||
YPos += YL;
|
YPos += YL;
|
||||||
BoxH = YL + BorderSize;
|
BoxH = YL + BorderSize;
|
||||||
SetDrawColor(Canvas, Settings.Style.ListHeaderBoxColor);
|
SetDrawColor(Canvas, Settings.Style.ListHeaderBoxColor);
|
||||||
Owner.CurrentStyle.DrawRectBox( XPos - BorderSize * 2,
|
Owner.CurrentStyle.DrawRectBox( XPos - BorderSize * 2,
|
||||||
YPos,
|
YPos,
|
||||||
Width + BorderSize * 4,
|
Width + BorderSize * 4,
|
||||||
BoxH,
|
BoxH,
|
||||||
@ -281,24 +295,44 @@ function DrawMenu()
|
|||||||
// Calc X offsets
|
// Calc X offsets
|
||||||
MinBoxW = Width * 0.07; // minimum width for column
|
MinBoxW = Width * 0.07; // minimum width for column
|
||||||
|
|
||||||
RankXPos = Owner.HUDOwner.ScaledBorderSize * 8 + Settings.Style.EdgeSize;
|
// Health
|
||||||
PlayerXPos = Width * 0.20;
|
HealthXPos = 0;
|
||||||
|
BoxW = 0;
|
||||||
|
foreach StateVariants(S)
|
||||||
|
{
|
||||||
|
Canvas.TextSize(S, XL, YL, FontScalar, FontScalar);
|
||||||
|
if (XL > BoxW) BoxW = XL;
|
||||||
|
}
|
||||||
|
HealthWBox = (BoxW < MinBoxW ? MinBoxW : BoxW) * 0.5 + BorderSize * 2;
|
||||||
|
|
||||||
|
// Armor
|
||||||
|
ArmorXPos = HealthXPos + HealthWBox;
|
||||||
|
ArmorWBox = HealthWBox;
|
||||||
|
|
||||||
|
RankXPos = ArmorXPos + ArmorWBox + Settings.Style.EdgeSize;
|
||||||
|
|
||||||
|
PlayerXPos = Width * 0.30; // TODO
|
||||||
|
|
||||||
Canvas.TextSize(class'KFGFxHUD_ScoreboardWidget'.default.PingString$" ", XL, YL, FontScalar, FontScalar);
|
Canvas.TextSize(class'KFGFxHUD_ScoreboardWidget'.default.PingString$" ", XL, YL, FontScalar, FontScalar);
|
||||||
PingXPos = Width - (XL < MinBoxW ? MinBoxW : XL);
|
PingWBox = XL < MinBoxW ? MinBoxW : XL;
|
||||||
|
if (NumPlayer <= 16) // TODO: Replace hardcoded 16
|
||||||
Canvas.TextSize(State$" ", XL, YL, FontScalar, FontScalar);
|
ScrollBarWidth = 0;
|
||||||
HealthXPos = PingXPos - (XL < MinBoxW ? MinBoxW : XL);
|
else
|
||||||
|
ScrollBarWidth = BorderSize * 8;
|
||||||
|
PingXPos = Width - PingWBox - ScrollBarWidth;
|
||||||
|
|
||||||
Canvas.TextSize(class'KFGFxHUD_ScoreboardWidget'.default.AssistsString$" ", XL, YL, FontScalar, FontScalar);
|
Canvas.TextSize(class'KFGFxHUD_ScoreboardWidget'.default.AssistsString$" ", XL, YL, FontScalar, FontScalar);
|
||||||
AssistXPos = HealthXPos - (XL < MinBoxW ? MinBoxW : XL);
|
AssistWBox = XL < MinBoxW ? MinBoxW : XL;
|
||||||
|
AssistXPos = PingXPos - AssistWBox;
|
||||||
|
|
||||||
Canvas.TextSize(class'KFGFxHUD_ScoreboardWidget'.default.KillsString$" ", XL, YL, FontScalar, FontScalar);
|
Canvas.TextSize(class'KFGFxHUD_ScoreboardWidget'.default.KillsString$" ", XL, YL, FontScalar, FontScalar);
|
||||||
KillsXPos = AssistXPos - (XL < MinBoxW ? MinBoxW : XL);
|
KillsWBox = XL < MinBoxW ? MinBoxW : XL;
|
||||||
|
KillsXPos = AssistXPos - KillsWBox;
|
||||||
|
|
||||||
Canvas.TextSize(class'KFGFxHUD_ScoreboardWidget'.default.DoshString$" ", XL, YL, FontScalar, FontScalar);
|
Canvas.TextSize(class'KFGFxHUD_ScoreboardWidget'.default.DoshString$" ", XL, YL, FontScalar, FontScalar);
|
||||||
Canvas.TextSize("999999", DoshSize, YL, FontScalar, FontScalar);
|
Canvas.TextSize("999999", DoshSize, YL, FontScalar, FontScalar);
|
||||||
CashXPos = KillsXPos - (XL < DoshSize ? DoshSize : XL);
|
DoshWBox = XL < DoshSize ? DoshSize : XL;
|
||||||
|
DoshXPos = KillsXPos - DoshWBox;
|
||||||
|
|
||||||
BoxW = 0;
|
BoxW = 0;
|
||||||
foreach PerkNames(S)
|
foreach PerkNames(S)
|
||||||
@ -306,20 +340,12 @@ function DrawMenu()
|
|||||||
Canvas.TextSize(S$"A", XL, YL, FontScalar, FontScalar);
|
Canvas.TextSize(S$"A", XL, YL, FontScalar, FontScalar);
|
||||||
if (XL > BoxW) BoxW = XL;
|
if (XL > BoxW) BoxW = XL;
|
||||||
}
|
}
|
||||||
PerkXPos = CashXPos - (BoxW < MinBoxW ? MinBoxW : BoxW);
|
PerkWBox = BoxW < MinBoxW ? MinBoxW : BoxW;
|
||||||
|
PerkXPos = DoshXPos - PerkWBox;
|
||||||
|
|
||||||
Canvas.TextSize("000", XL, YL, FontScalar, FontScalar);
|
Canvas.TextSize("000", XL, YL, FontScalar, FontScalar);
|
||||||
LevelXPos = PerkXPos - XL;
|
LevelWBox = XL;
|
||||||
|
LevelXPos = PerkXPos - LevelWBox;
|
||||||
StatusWBox = PlayerXPos - RankXPos;
|
|
||||||
PlayerWBox = LevelXPos - PlayerXPos;
|
|
||||||
LevelWBox = PerkXPos - LevelXPos;
|
|
||||||
PerkWBox = CashXPos - PerkXPos;
|
|
||||||
CashWBox = KillsXPos - CashXPos;
|
|
||||||
KillsWBox = AssistXPos - KillsXPos;
|
|
||||||
AssistWBox = HealthXPos - AssistXPos;
|
|
||||||
HealthWBox = PingXPos - HealthXPos;
|
|
||||||
PingWBox = Width - PingXPos;
|
|
||||||
|
|
||||||
// Header texts
|
// Header texts
|
||||||
SetDrawColor(Canvas, Settings.Style.ListHeaderTextColor);
|
SetDrawColor(Canvas, Settings.Style.ListHeaderTextColor);
|
||||||
@ -328,10 +354,16 @@ function DrawMenu()
|
|||||||
DrawTextShadowHLeftVCenter(class'KFGFxMenu_Inventory'.default.PerkFilterString, XPos + PerkXPos, YPos, FontScalar);
|
DrawTextShadowHLeftVCenter(class'KFGFxMenu_Inventory'.default.PerkFilterString, XPos + PerkXPos, YPos, FontScalar);
|
||||||
DrawTextShadowHVCenter(class'KFGFxHUD_ScoreboardWidget'.default.KillsString, XPos + KillsXPos, YPos, KillsWBox, FontScalar);
|
DrawTextShadowHVCenter(class'KFGFxHUD_ScoreboardWidget'.default.KillsString, XPos + KillsXPos, YPos, KillsWBox, FontScalar);
|
||||||
DrawTextShadowHVCenter(class'KFGFxHUD_ScoreboardWidget'.default.AssistsString, XPos + AssistXPos, YPos, AssistWBox, FontScalar);
|
DrawTextShadowHVCenter(class'KFGFxHUD_ScoreboardWidget'.default.AssistsString, XPos + AssistXPos, YPos, AssistWBox, FontScalar);
|
||||||
DrawTextShadowHVCenter(class'KFGFxHUD_ScoreboardWidget'.default.DoshString, XPos + CashXPos, YPos, CashWBox, FontScalar);
|
DrawTextShadowHVCenter(class'KFGFxHUD_ScoreboardWidget'.default.DoshString, XPos + DoshXPos, YPos, DoshWBox, FontScalar);
|
||||||
DrawTextShadowHVCenter(State, XPos + HealthXPos, YPos, HealthWBox, FontScalar);
|
|
||||||
DrawTextShadowHVCenter(class'KFGFxHUD_ScoreboardWidget'.default.PingString, XPos + PingXPos, YPos, PingWBox, FontScalar);
|
DrawTextShadowHVCenter(class'KFGFxHUD_ScoreboardWidget'.default.PingString, XPos + PingXPos, YPos, PingWBox, FontScalar);
|
||||||
|
|
||||||
|
ColorTmp = Settings.Style.ListHeaderTextColor;
|
||||||
|
ColorTmp.A = 150;
|
||||||
|
SetDrawColor(Canvas, ColorTmp);
|
||||||
|
|
||||||
|
DrawHealthIcon(XPos + HealthXPos, YPos, HealthWBox, BoxH);
|
||||||
|
DrawArmorIcon(XPos + ArmorXPos, YPos, ArmorWBox, BoxH);
|
||||||
|
|
||||||
PlayersList.XPosition = ((Canvas.ClipX - Width) * 0.5) / InputPos[2];
|
PlayersList.XPosition = ((Canvas.ClipX - Width) * 0.5) / InputPos[2];
|
||||||
PlayersList.YPosition = (YPos + YL + BorderSize * 4) / InputPos[3];
|
PlayersList.YPosition = (YPos + YL + BorderSize * 4) / InputPos[3];
|
||||||
PlayersList.YSize = (1.f - PlayersList.YPosition) - 0.15;
|
PlayersList.YSize = (1.f - PlayersList.YPosition) - 0.15;
|
||||||
@ -339,6 +371,39 @@ function DrawMenu()
|
|||||||
PlayersList.ChangeListSize(KFPRIArray.Length);
|
PlayersList.ChangeListSize(KFPRIArray.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function DrawHealthIcon(float X, float Y, float W, float H)
|
||||||
|
{
|
||||||
|
local float XPos, YPos, Size, Part;
|
||||||
|
|
||||||
|
Size = H * 0.65;
|
||||||
|
Part = Size / 3;
|
||||||
|
|
||||||
|
XPos = X + (W * 0.5 - Part * 0.5);
|
||||||
|
YPos = Y + (H * 0.5 - Size * 0.5);
|
||||||
|
Owner.CurrentStyle.DrawRectBox(XPos, YPos, Part, Part, 4, 100);
|
||||||
|
|
||||||
|
XPos = X + (W * 0.5 - Size * 0.5);
|
||||||
|
YPos = Y + (H * 0.5 - Part * 0.5);
|
||||||
|
Owner.CurrentStyle.DrawRectBox(XPos, YPos, Size, Part, 4, 100);
|
||||||
|
|
||||||
|
XPos = X + (W * 0.5 - Part * 0.5);
|
||||||
|
YPos = Y + (H * 0.5 + Part * 0.5);
|
||||||
|
Owner.CurrentStyle.DrawRectBox(XPos, YPos, Part, Part, 4, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
function DrawArmorIcon(float X, float Y, float W, float H)
|
||||||
|
{
|
||||||
|
local float XPos, YPos, Size;
|
||||||
|
local int Edge;
|
||||||
|
|
||||||
|
Edge = 6;
|
||||||
|
Size = H * 0.65;
|
||||||
|
|
||||||
|
XPos = X + (W * 0.5 - Size * 0.5);
|
||||||
|
YPos = Y + (H * 0.5 - Size * 0.5);
|
||||||
|
Owner.CurrentStyle.DrawRectBox(XPos, YPos, Size, Size, Edge, 252);
|
||||||
|
}
|
||||||
|
|
||||||
function DrawTextShadowHVCenter(string Str, float XPos, float YPos, float BoxWidth, float FontScalar)
|
function DrawTextShadowHVCenter(string Str, float XPos, float YPos, float BoxWidth, float FontScalar)
|
||||||
{
|
{
|
||||||
local float TextWidth;
|
local float TextWidth;
|
||||||
@ -375,6 +440,8 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
|||||||
local float FontScalar, TextYOffset, XL, YL, PerkIconPosX, PerkIconPosY, PerkIconSize, PrestigeIconScale;
|
local float FontScalar, TextYOffset, XL, YL, PerkIconPosX, PerkIconPosY, PerkIconSize, PrestigeIconScale;
|
||||||
local float XPos, BoxWidth, RealPlayerWBox;
|
local float XPos, BoxWidth, RealPlayerWBox;
|
||||||
local KFPlayerReplicationInfo KFPRI;
|
local KFPlayerReplicationInfo KFPRI;
|
||||||
|
local KFPlayerController KFPC;
|
||||||
|
local KFPawn_Human KFPH;
|
||||||
local byte Level, PrestigeLevel;
|
local byte Level, PrestigeLevel;
|
||||||
local bool bIsZED;
|
local bool bIsZED;
|
||||||
local int Ping;
|
local int Ping;
|
||||||
@ -383,6 +450,10 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
|||||||
local bool HasRank;
|
local bool HasRank;
|
||||||
local int PlayerInfoIndex, PlayerRankIndex;
|
local int PlayerInfoIndex, PlayerRankIndex;
|
||||||
local int Shape;
|
local int Shape;
|
||||||
|
local float BorderSize;
|
||||||
|
local int Armor, MaxArmor;
|
||||||
|
|
||||||
|
BorderSize = Owner.HUDOwner.ScaledBorderSize;
|
||||||
|
|
||||||
YOffset *= 1.05;
|
YOffset *= 1.05;
|
||||||
KFPRI = KFPRIArray[Index];
|
KFPRI = KFPRIArray[Index];
|
||||||
@ -420,7 +491,6 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
|||||||
HasRank = true;
|
HasRank = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Now all players belongs to 'Rank'
|
|
||||||
|
|
||||||
if (KFGRI.bVersusGame)
|
if (KFGRI.bVersusGame)
|
||||||
bIsZED = KFTeamInfo_Zeds(KFPRI.Team) != None;
|
bIsZED = KFTeamInfo_Zeds(KFPRI.Team) != None;
|
||||||
@ -430,6 +500,7 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
|||||||
C.Font = Owner.CurrentStyle.PickFont(FontScalar);
|
C.Font = Owner.CurrentStyle.PickFont(FontScalar);
|
||||||
|
|
||||||
Canvas.TextSize("ABC", XL, YL, FontScalar, FontScalar);
|
Canvas.TextSize("ABC", XL, YL, FontScalar, FontScalar);
|
||||||
|
TextYOffset = YOffset + (Height * 0.5f) - (YL * 0.5f);
|
||||||
|
|
||||||
// change rect color by HP
|
// change rect color by HP
|
||||||
if (!KFPRI.bReadyToPlay && KFGRI.bMatchHasBegun)
|
if (!KFPRI.bReadyToPlay && KFGRI.bMatchHasBegun)
|
||||||
@ -458,9 +529,6 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
|||||||
SetDrawColor(C, Settings.Style.LeftStateBoxColorLow);
|
SetDrawColor(C, Settings.Style.LeftStateBoxColorLow);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Settings.State.Dynamic)
|
|
||||||
SetDrawColor(C, Settings.Style.LeftStateBoxColor);
|
|
||||||
|
|
||||||
if (KFPRIArray.Length > 1 && Index == 0)
|
if (KFPRIArray.Length > 1 && Index == 0)
|
||||||
Shape = Settings.Style.ShapeLeftStateBoxTopPlayer;
|
Shape = Settings.Style.ShapeLeftStateBoxTopPlayer;
|
||||||
else if (KFPRIArray.Length > 1 && Index == KFPRIArray.Length - 1)
|
else if (KFPRIArray.Length > 1 && Index == KFPRIArray.Length - 1)
|
||||||
@ -468,17 +536,92 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
|||||||
else
|
else
|
||||||
Shape = Settings.Style.ShapeLeftStateBoxMidPlayer;
|
Shape = Settings.Style.ShapeLeftStateBoxMidPlayer;
|
||||||
|
|
||||||
BoxWidth = Owner.HUDOwner.ScaledBorderSize * 8;
|
// Health
|
||||||
Owner.CurrentStyle.DrawRectBox( XPos,
|
Owner.CurrentStyle.DrawRectBox(XPos,
|
||||||
YOffset,
|
YOffset,
|
||||||
BoxWidth,
|
HealthWBox,
|
||||||
Height,
|
Height,
|
||||||
Settings.Style.EdgeSize,
|
Settings.Style.EdgeSize,
|
||||||
Shape);
|
Shape);
|
||||||
|
|
||||||
XPos += BoxWidth;
|
if (!KFPRI.bReadyToPlay && KFGRI.bMatchHasBegun)
|
||||||
|
{
|
||||||
|
SetDrawColor(C, Settings.Style.StateTextColorLobby);
|
||||||
|
S = class'KFGFxMenu_ServerBrowser'.default.InLobbyString;;
|
||||||
|
}
|
||||||
|
else if (!KFGRI.bMatchHasBegun)
|
||||||
|
{
|
||||||
|
if (KFPRI.bReadyToPlay)
|
||||||
|
{
|
||||||
|
SetDrawColor(C, Settings.Style.StateTextColorReady);
|
||||||
|
S = Ready;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetDrawColor(C, Settings.Style.StateTextColorNotReady);
|
||||||
|
S = NotReady;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (bIsZED && KFTeamInfo_Zeds(GetPlayer().PlayerReplicationInfo.Team) == None)
|
||||||
|
{
|
||||||
|
SetDrawColor(C, Settings.Style.StateTextColor);
|
||||||
|
S = Unknown;
|
||||||
|
}
|
||||||
|
else if (KFPRI.PlayerHealth <= 0 || KFPRI.PlayerHealthPercent <= 0)
|
||||||
|
{
|
||||||
|
if (KFPRI.bOnlySpectator)
|
||||||
|
{
|
||||||
|
SetDrawColor(C, Settings.Style.StateTextColorSpectator);
|
||||||
|
S = class'KFCommon_LocalizedStrings'.default.SpectatorString;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetDrawColor(C, Settings.Style.StateTextColorDead);
|
||||||
|
S = Dead;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (ByteToFloat(KFPRI.PlayerHealthPercent) >= float(Settings.State.High) / 100.0)
|
||||||
|
SetDrawColor(C, Settings.Style.StateTextColorHighHP);
|
||||||
|
else if (ByteToFloat(KFPRI.PlayerHealthPercent) >= float(Settings.State.Low) / 100.0)
|
||||||
|
SetDrawColor(C, Settings.Style.StateTextColorMidHP);
|
||||||
|
else
|
||||||
|
SetDrawColor(C, Settings.Style.StateTextColorLowHP);
|
||||||
|
S = String(KFPRI.PlayerHealth);
|
||||||
|
}
|
||||||
|
|
||||||
TextYOffset = YOffset + (Height * 0.5f) - (YL * 0.5f);
|
if (CurrentRank.ApplyColorToFields.Health)
|
||||||
|
SetDrawColor(C, CurrentRank.TextColor);
|
||||||
|
DrawTextShadowHVCenter(S, HealthXPos, TextYOffset, HealthWBox, FontScalar);
|
||||||
|
|
||||||
|
XPos += HealthWBox;
|
||||||
|
|
||||||
|
// Armor
|
||||||
|
C.SetDrawColor(0, 0, 200, 200);
|
||||||
|
Owner.CurrentStyle.DrawRectBox(XPos,
|
||||||
|
YOffset,
|
||||||
|
ArmorWBox,
|
||||||
|
Height,
|
||||||
|
Settings.Style.EdgeSize,
|
||||||
|
Shape);
|
||||||
|
|
||||||
|
KFPC = KFPlayerController(KFPRI.Owner);
|
||||||
|
if (KFPC != None)
|
||||||
|
{
|
||||||
|
KFPH = KFPawn_Human(KFPC.Pawn);
|
||||||
|
if (KFPH != None)
|
||||||
|
{
|
||||||
|
Armor = int(KFPH.Armor);
|
||||||
|
MaxArmor = int(KFPH.MaxArmor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
C.SetDrawColor(250, 250, 250, 250);
|
||||||
|
S = String(Armor);
|
||||||
|
DrawTextShadowHVCenter(S, ArmorXPos, TextYOffset, HealthWBox, FontScalar);
|
||||||
|
XPos += ArmorWBox;
|
||||||
|
|
||||||
|
// PlayerBox
|
||||||
if (PlayerIndex == Index)
|
if (PlayerIndex == Index)
|
||||||
SetDrawColor(C, Settings.Style.PlayerOwnerBoxColor);
|
SetDrawColor(C, Settings.Style.PlayerOwnerBoxColor);
|
||||||
else
|
else
|
||||||
@ -491,7 +634,7 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
|||||||
else
|
else
|
||||||
Shape = Settings.Style.ShapePlayerBoxMidPlayer;
|
Shape = Settings.Style.ShapePlayerBoxMidPlayer;
|
||||||
|
|
||||||
BoxWidth = CashXPos - BoxWidth - Owner.HUDOwner.ScaledBorderSize * 2;
|
BoxWidth = DoshXPos - (HealthWBox + ArmorWBox) - BorderSize * 2;
|
||||||
Owner.CurrentStyle.DrawRectBox(XPos, YOffset, BoxWidth, Height, Settings.Style.EdgeSize, Shape);
|
Owner.CurrentStyle.DrawRectBox(XPos, YOffset, BoxWidth, Height, Settings.Style.EdgeSize, Shape);
|
||||||
|
|
||||||
XPos += BoxWidth;
|
XPos += BoxWidth;
|
||||||
@ -543,9 +686,9 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
|||||||
PrestigeLevel = KFPRI.GetActivePerkPrestigeLevel();
|
PrestigeLevel = KFPRI.GetActivePerkPrestigeLevel();
|
||||||
Level = KFPRI.GetActivePerkLevel();
|
Level = KFPRI.GetActivePerkLevel();
|
||||||
|
|
||||||
PerkIconPosY = YOffset + (Owner.HUDOwner.ScaledBorderSize * 2);
|
PerkIconPosY = YOffset + (BorderSize * 2);
|
||||||
PerkIconSize = Height-(Owner.HUDOwner.ScaledBorderSize * 4);
|
PerkIconSize = Height-(BorderSize * 4);
|
||||||
PerkIconPosX = LevelXPos - PerkIconSize - (Owner.HUDOwner.ScaledBorderSize*2);
|
PerkIconPosX = LevelXPos - PerkIconSize - (BorderSize*2);
|
||||||
PrestigeIconScale = 0.6625f;
|
PrestigeIconScale = 0.6625f;
|
||||||
|
|
||||||
RealPlayerWBox = PerkIconPosX - PlayerXPos;
|
RealPlayerWBox = PerkIconPosX - PlayerXPos;
|
||||||
@ -567,8 +710,6 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
|||||||
|
|
||||||
if (CurrentRank.ApplyColorToFields.Level)
|
if (CurrentRank.ApplyColorToFields.Level)
|
||||||
SetDrawColor(C, CurrentRank.TextColor);
|
SetDrawColor(C, CurrentRank.TextColor);
|
||||||
else if (!Settings.Level.Dynamic)
|
|
||||||
SetDrawColor(C, Settings.Style.LevelTextColor);
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Level < Settings.Level.Low[KFGRI.GameDifficulty])
|
if (Level < Settings.Level.Low[KFGRI.GameDifficulty])
|
||||||
@ -642,7 +783,7 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
|||||||
SetDrawColor(C, Settings.Style.AssistsTextColor);
|
SetDrawColor(C, Settings.Style.AssistsTextColor);
|
||||||
DrawTextShadowHVCenter(string (KFPRI.Assists), AssistXPos, TextYOffset, AssistWBox, FontScalar);
|
DrawTextShadowHVCenter(string (KFPRI.Assists), AssistXPos, TextYOffset, AssistWBox, FontScalar);
|
||||||
|
|
||||||
// Cash
|
// Dosh
|
||||||
if (bIsZED)
|
if (bIsZED)
|
||||||
{
|
{
|
||||||
SetDrawColor(C, Settings.Style.ZedTextColor);
|
SetDrawColor(C, Settings.Style.ZedTextColor);
|
||||||
@ -656,61 +797,7 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
|||||||
SetDrawColor(C, Settings.Style.DoshTextColor);
|
SetDrawColor(C, Settings.Style.DoshTextColor);
|
||||||
StrValue = String(int(KFPRI.Score)); //StrValue = GetNiceSize(int(KFPRI.Score));
|
StrValue = String(int(KFPRI.Score)); //StrValue = GetNiceSize(int(KFPRI.Score));
|
||||||
}
|
}
|
||||||
DrawTextShadowHVCenter(StrValue, CashXPos, TextYOffset, CashWBox, FontScalar);
|
DrawTextShadowHVCenter(StrValue, DoshXPos, TextYOffset, DoshWBox, FontScalar);
|
||||||
|
|
||||||
// State
|
|
||||||
if (!KFPRI.bReadyToPlay && KFGRI.bMatchHasBegun)
|
|
||||||
{
|
|
||||||
SetDrawColor(C, Settings.Style.StateTextColorLobby);
|
|
||||||
S = class'KFGFxMenu_ServerBrowser'.default.InLobbyString;;
|
|
||||||
}
|
|
||||||
else if (!KFGRI.bMatchHasBegun)
|
|
||||||
{
|
|
||||||
if (KFPRI.bReadyToPlay)
|
|
||||||
{
|
|
||||||
SetDrawColor(C, Settings.Style.StateTextColorReady);
|
|
||||||
S = Ready;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetDrawColor(C, Settings.Style.StateTextColorNotReady);
|
|
||||||
S = NotReady;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (bIsZED && KFTeamInfo_Zeds(GetPlayer().PlayerReplicationInfo.Team) == None)
|
|
||||||
{
|
|
||||||
SetDrawColor(C, Settings.Style.StateTextColor);
|
|
||||||
S = Unknown;
|
|
||||||
}
|
|
||||||
else if (KFPRI.PlayerHealth <= 0 || KFPRI.PlayerHealthPercent <= 0)
|
|
||||||
{
|
|
||||||
if (KFPRI.bOnlySpectator)
|
|
||||||
{
|
|
||||||
SetDrawColor(C, Settings.Style.StateTextColorSpectator);
|
|
||||||
S = class'KFCommon_LocalizedStrings'.default.SpectatorString;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetDrawColor(C, Settings.Style.StateTextColorDead);
|
|
||||||
S = Dead;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (ByteToFloat(KFPRI.PlayerHealthPercent) >= float(Settings.State.High) / 100.0)
|
|
||||||
SetDrawColor(C, Settings.Style.StateTextColorHighHP);
|
|
||||||
else if (ByteToFloat(KFPRI.PlayerHealthPercent) >= float(Settings.State.Low) / 100.0)
|
|
||||||
SetDrawColor(C, Settings.Style.StateTextColorMidHP);
|
|
||||||
else
|
|
||||||
SetDrawColor(C, Settings.Style.StateTextColorLowHP);
|
|
||||||
S = string(KFPRI.PlayerHealth)@"HP";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CurrentRank.ApplyColorToFields.Health)
|
|
||||||
SetDrawColor(C, CurrentRank.TextColor);
|
|
||||||
else if (!Settings.State.Dynamic)
|
|
||||||
SetDrawColor(C, Settings.Style.StateTextColor);
|
|
||||||
DrawTextShadowHVCenter(S, HealthXPos, TextYOffset, HealthWBox, FontScalar);
|
|
||||||
|
|
||||||
// Ping
|
// Ping
|
||||||
if (KFPRI.bBot)
|
if (KFPRI.bBot)
|
||||||
@ -738,7 +825,7 @@ function DrawPlayerEntry(Canvas C, int Index, float YOffset, float Height, float
|
|||||||
DrawTextShadowHVCenter(S, PingXPos, TextYOffset, Settings.Ping.ShowPingBars ? PingWBox/2 : PingWBox, FontScalar);
|
DrawTextShadowHVCenter(S, PingXPos, TextYOffset, Settings.Ping.ShowPingBars ? PingWBox/2 : PingWBox, FontScalar);
|
||||||
C.SetDrawColor(250, 250, 250, 255);
|
C.SetDrawColor(250, 250, 250, 255);
|
||||||
if (Settings.Ping.ShowPingBars)
|
if (Settings.Ping.ShowPingBars)
|
||||||
DrawPingBars(C, YOffset + (Height/2) - ((Height*0.5)/2), Width - (Height*0.5) - (Owner.HUDOwner.ScaledBorderSize*2), Height*0.5, Height*0.5, float(Ping));
|
DrawPingBars(C, YOffset + (Height/2) - ((Height*0.5)/2), Width - (Height*0.5) - (BorderSize*2), Height*0.5, Height*0.5, float(Ping));
|
||||||
}
|
}
|
||||||
|
|
||||||
final function DrawPingBars(Canvas C, float YOffset, float XOffset, float W, float H, float Ping)
|
final function DrawPingBars(Canvas C, float YOffset, float XOffset, float W, float H, float Ping)
|
||||||
|
@ -6,3 +6,27 @@ class PlayerRankRelations extends Object
|
|||||||
`include(Logger.uci)
|
`include(Logger.uci)
|
||||||
|
|
||||||
var config array<RankRelation> Relation;
|
var config array<RankRelation> Relation;
|
||||||
|
|
||||||
|
public static function InitConfig(int ConfigVersion)
|
||||||
|
{
|
||||||
|
local RankRelation ExamplePlayer;
|
||||||
|
|
||||||
|
`callstack_static("InitConfig");
|
||||||
|
|
||||||
|
switch (ConfigVersion)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
// Example player
|
||||||
|
ExamplePlayer.ObjectID = "76561198001617867"; // GenZmeY SteamID64
|
||||||
|
ExamplePlayer.RankID = 0;
|
||||||
|
default.Relation.AddItem(ExamplePlayer);
|
||||||
|
|
||||||
|
case 2147483647:
|
||||||
|
StaticSaveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DefaultProperties
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
@ -5,6 +5,7 @@ class ScoreboardStyle extends Object
|
|||||||
`include(Build.uci)
|
`include(Build.uci)
|
||||||
`include(Logger.uci)
|
`include(Logger.uci)
|
||||||
|
|
||||||
|
// Box shapes
|
||||||
var config int EdgeSize;
|
var config int EdgeSize;
|
||||||
var config int ShapeServerNameBox;
|
var config int ShapeServerNameBox;
|
||||||
var config int ShapeGameInfoBox;
|
var config int ShapeGameInfoBox;
|
||||||
@ -20,46 +21,189 @@ var config int ShapePlayerBoxBottomPlayer;
|
|||||||
var config int ShapeStatsBoxTopPlayer;
|
var config int ShapeStatsBoxTopPlayer;
|
||||||
var config int ShapeStatsBoxMidPlayer;
|
var config int ShapeStatsBoxMidPlayer;
|
||||||
var config int ShapeStatsBoxBottomPlayer;
|
var config int ShapeStatsBoxBottomPlayer;
|
||||||
|
|
||||||
|
// Server box
|
||||||
var config ColorRGBA ServerNameBoxColor;
|
var config ColorRGBA ServerNameBoxColor;
|
||||||
var config ColorRGBA ServerNameTextColor;
|
var config ColorRGBA ServerNameTextColor;
|
||||||
|
|
||||||
|
// Game info box
|
||||||
var config ColorRGBA GameInfoBoxColor;
|
var config ColorRGBA GameInfoBoxColor;
|
||||||
var config ColorRGBA GameInfoTextColor;
|
var config ColorRGBA GameInfoTextColor;
|
||||||
|
|
||||||
|
// Wave info box
|
||||||
var config ColorRGBA WaveBoxColor;
|
var config ColorRGBA WaveBoxColor;
|
||||||
var config ColorRGBA WaveTextColor;
|
var config ColorRGBA WaveTextColor;
|
||||||
|
|
||||||
|
// Player count box
|
||||||
var config ColorRGBA PlayerCountBoxColor;
|
var config ColorRGBA PlayerCountBoxColor;
|
||||||
var config ColorRGBA PlayerCountTextColor;
|
var config ColorRGBA PlayerCountTextColor;
|
||||||
|
|
||||||
|
// Header box
|
||||||
var config ColorRGBA ListHeaderBoxColor;
|
var config ColorRGBA ListHeaderBoxColor;
|
||||||
var config ColorRGBA ListHeaderTextColor;
|
var config ColorRGBA ListHeaderTextColor;
|
||||||
var config ColorRGBA LeftStateBoxColor;
|
|
||||||
var config ColorRGBA LeftStateBoxColorDead;
|
// State box
|
||||||
var config ColorRGBA LeftStateBoxColorLow;
|
var config ColorRGBA StateBoxColorLobby;
|
||||||
var config ColorRGBA LeftStateBoxColorMid;
|
var config ColorRGBA StateBoxColorReady;
|
||||||
var config ColorRGBA LeftStateBoxColorHigh;
|
var config ColorRGBA StateBoxColorNotReady;
|
||||||
|
var config ColorRGBA StateBoxColorSpectator;
|
||||||
|
var config ColorRGBA StateBoxColorDead;
|
||||||
|
var config ColorRGBA StateBoxColorHPLow;
|
||||||
|
var config ColorRGBA StateBoxColorHPMid;
|
||||||
|
var config ColorRGBA StateBoxColorHPHigh;
|
||||||
|
var config ColorRGBA StateBoxColorArmorLow;
|
||||||
|
var config ColorRGBA StateBoxColorArmorMid;
|
||||||
|
var config ColorRGBA StateBoxColorArmorHigh;
|
||||||
|
|
||||||
|
// Player box
|
||||||
var config ColorRGBA PlayerOwnerBoxColor;
|
var config ColorRGBA PlayerOwnerBoxColor;
|
||||||
var config ColorRGBA PlayerBoxColor;
|
var config ColorRGBA PlayerBoxColor;
|
||||||
|
|
||||||
|
// Stats box
|
||||||
|
var config ColorRGBA StatsOwnerBoxColor;
|
||||||
var config ColorRGBA StatsBoxColor;
|
var config ColorRGBA StatsBoxColor;
|
||||||
var config ColorRGBA RankTextColor;
|
|
||||||
var config ColorRGBA ZedTextColor;
|
// State text
|
||||||
var config ColorRGBA PerkTextColor;
|
|
||||||
var config ColorRGBA LevelTextColor;
|
|
||||||
var config ColorRGBA PlayerNameTextColor;
|
|
||||||
var config ColorRGBA KillsTextColor;
|
|
||||||
var config ColorRGBA AssistsTextColor;
|
|
||||||
var config ColorRGBA DoshTextColor;
|
|
||||||
var config ColorRGBA StateTextColorLobby;
|
var config ColorRGBA StateTextColorLobby;
|
||||||
var config ColorRGBA StateTextColorReady;
|
var config ColorRGBA StateTextColorReady;
|
||||||
var config ColorRGBA StateTextColorNotReady;
|
var config ColorRGBA StateTextColorNotReady;
|
||||||
var config ColorRGBA StateTextColor;
|
|
||||||
var config ColorRGBA StateTextColorSpectator;
|
var config ColorRGBA StateTextColorSpectator;
|
||||||
var config ColorRGBA StateTextColorDead;
|
var config ColorRGBA StateTextColorDead;
|
||||||
var config ColorRGBA StateTextColorLowHP;
|
var config ColorRGBA StateTextColorHPLow;
|
||||||
var config ColorRGBA StateTextColorMidHP;
|
var config ColorRGBA StateTextColorHPMid;
|
||||||
var config ColorRGBA StateTextColorHighHP;
|
var config ColorRGBA StateTextColorHPHigh;
|
||||||
var config ColorRGBA PingTextColor;
|
var config ColorRGBA StateTextColorArmorLow;
|
||||||
|
var config ColorRGBA StateTextColorArmorMid;
|
||||||
|
var config ColorRGBA StateTextColorArmorHigh;
|
||||||
|
|
||||||
|
// Rank text
|
||||||
|
var config ColorRGBA RankTextColor;
|
||||||
|
|
||||||
|
// Player text
|
||||||
|
var config ColorRGBA PlayerNameTextColor;
|
||||||
|
|
||||||
|
// Level text
|
||||||
|
var config ColorRGBA LevelTextColorLow;
|
||||||
|
var config ColorRGBA LevelTextColorMid;
|
||||||
|
var config ColorRGBA LevelTextColorHigh;
|
||||||
|
|
||||||
|
// Perk text
|
||||||
|
var config ColorRGBA ZedTextColor;
|
||||||
|
var config ColorRGBA PerkNoneTextColor;
|
||||||
|
var config ColorRGBA PerkBerserkerTextColor;
|
||||||
|
var config ColorRGBA PerkCommandoTextColor;
|
||||||
|
var config ColorRGBA PerkSupportTextColor;
|
||||||
|
var config ColorRGBA PerkFieldMedicTextColor;
|
||||||
|
var config ColorRGBA PerkDemolitionistTextColor;
|
||||||
|
var config ColorRGBA PerkFirebugTextColor;
|
||||||
|
var config ColorRGBA PerkGunslingerTextColor;
|
||||||
|
var config ColorRGBA PerkSharpshooterTextColor;
|
||||||
|
var config ColorRGBA PerkSwatTextColor;
|
||||||
|
var config ColorRGBA PerkSurvivalistTextColor;
|
||||||
|
|
||||||
|
// Dosh text
|
||||||
|
var config ColorRGBA DoshTextColorLow;
|
||||||
|
var config ColorRGBA DoshTextColorMid;
|
||||||
|
var config ColorRGBA DoshTextColorHigh;
|
||||||
|
|
||||||
|
// Kills text
|
||||||
|
var config ColorRGBA KillsTextColorLow;
|
||||||
|
var config ColorRGBA KillsTextColorMid;
|
||||||
|
var config ColorRGBA KillsTextColorHigh;
|
||||||
|
|
||||||
|
// Assists text
|
||||||
|
var config ColorRGBA AssistsTextColorLow;
|
||||||
|
var config ColorRGBA AssistsTextColorMid;
|
||||||
|
var config ColorRGBA AssistsTextColorHigh;
|
||||||
|
|
||||||
|
// Ping text
|
||||||
var config ColorRGBA PingTextColorLow;
|
var config ColorRGBA PingTextColorLow;
|
||||||
var config ColorRGBA PingTextColorMid;
|
var config ColorRGBA PingTextColorMid;
|
||||||
var config ColorRGBA PingTextColorHigh;
|
var config ColorRGBA PingTextColorHigh;
|
||||||
|
|
||||||
|
// Other settings
|
||||||
|
var config bool bShowPingBars;
|
||||||
|
var config bool bHealthBoxSmoothColorChange;
|
||||||
|
var config bool bArmorBoxSmoothColorChange;
|
||||||
|
var config bool bHealthTextSmoothColorChange;
|
||||||
|
var config bool bArmorTextSmoothColorChange;
|
||||||
|
var config bool bLevelTextSmoothColorChange;
|
||||||
|
var config bool bDoshTextSmoothColorChange;
|
||||||
|
var config bool bKillsTextSmoothColorChange;
|
||||||
|
var config bool bAssistsTextSmoothColorChange;
|
||||||
|
var config bool bPingTextSmoothColorChange;
|
||||||
|
|
||||||
|
public static function InitConfig(int ConfigVersion)
|
||||||
|
{
|
||||||
|
local YASStyle DefaultStyle;
|
||||||
|
|
||||||
|
`callstack_static("InitConfig");
|
||||||
|
|
||||||
|
switch (ConfigVersion)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
WriteSettings(DefaultSettings());
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
default.AssistsTextColorHigh = DefaultStyle.AssistsTextColorHigh;
|
||||||
|
default.AssistsTextColorLow = DefaultStyle.AssistsTextColorLow;
|
||||||
|
default.AssistsTextColorMid = DefaultStyle.AssistsTextColorMid;
|
||||||
|
default.bArmorBoxSmoothColorChange = DefaultStyle.bArmorBoxSmoothColorChange;
|
||||||
|
default.bArmorTextSmoothColorChange = DefaultStyle.bArmorTextSmoothColorChange;
|
||||||
|
default.bAssistsTextSmoothColorChange = DefaultStyle.bAssistsTextSmoothColorChange;
|
||||||
|
default.bDoshTextSmoothColorChange = DefaultStyle.bDoshTextSmoothColorChange;
|
||||||
|
default.bHealthBoxSmoothColorChange = DefaultStyle.bHealthBoxSmoothColorChange;
|
||||||
|
default.bHealthTextSmoothColorChange = DefaultStyle.bHealthTextSmoothColorChange;
|
||||||
|
default.bKillsTextSmoothColorChange = DefaultStyle.bKillsTextSmoothColorChange;
|
||||||
|
default.bLevelTextSmoothColorChange = DefaultStyle.bLevelTextSmoothColorChange;
|
||||||
|
default.bPingTextSmoothColorChange = DefaultStyle.bPingTextSmoothColorChange;
|
||||||
|
default.bShowPingBars = DefaultStyle.bShowPingBars;
|
||||||
|
default.DoshTextColorHigh = DefaultStyle.DoshTextColorHigh;
|
||||||
|
default.DoshTextColorLow = DefaultStyle.DoshTextColorLow;
|
||||||
|
default.DoshTextColorMid = DefaultStyle.DoshTextColorMid;
|
||||||
|
default.KillsTextColorHigh = DefaultStyle.KillsTextColorHigh;
|
||||||
|
default.KillsTextColorLow = DefaultStyle.KillsTextColorLow;
|
||||||
|
default.KillsTextColorMid = DefaultStyle.KillsTextColorMid;
|
||||||
|
default.LevelTextColorHigh = DefaultStyle.LevelTextColorHigh;
|
||||||
|
default.LevelTextColorLow = DefaultStyle.LevelTextColorLow;
|
||||||
|
default.LevelTextColorMid = DefaultStyle.LevelTextColorMid;
|
||||||
|
default.PerkBerserkerTextColor = DefaultStyle.PerkBerserkerTextColor;
|
||||||
|
default.PerkCommandoTextColor = DefaultStyle.PerkCommandoTextColor;
|
||||||
|
default.PerkDemolitionistTextColor = DefaultStyle.PerkDemolitionistTextColor;
|
||||||
|
default.PerkFieldMedicTextColor = DefaultStyle.PerkFieldMedicTextColor;
|
||||||
|
default.PerkFirebugTextColor = DefaultStyle.PerkFirebugTextColor;
|
||||||
|
default.PerkGunslingerTextColor = DefaultStyle.PerkGunslingerTextColor;
|
||||||
|
default.PerkNoneTextColor = DefaultStyle.PerkNoneTextColor;
|
||||||
|
default.PerkSharpshooterTextColor = DefaultStyle.PerkSharpshooterTextColor;
|
||||||
|
default.PerkSupportTextColor = DefaultStyle.PerkSupportTextColor;
|
||||||
|
default.PerkSurvivalistTextColor = DefaultStyle.PerkSurvivalistTextColor;
|
||||||
|
default.PerkSwatTextColor = DefaultStyle.PerkSwatTextColor;
|
||||||
|
default.StateBoxColorArmorHigh = DefaultStyle.StateBoxColorArmorHigh;
|
||||||
|
default.StateBoxColorArmorLow = DefaultStyle.StateBoxColorArmorLow;
|
||||||
|
default.StateBoxColorArmorMid = DefaultStyle.StateBoxColorArmorMid;
|
||||||
|
default.StateBoxColorDead = DefaultStyle.StateBoxColorDead;
|
||||||
|
default.StateBoxColorHPHigh = DefaultStyle.StateBoxColorHPHigh;
|
||||||
|
default.StateBoxColorHPLow = DefaultStyle.StateBoxColorHPLow;
|
||||||
|
default.StateBoxColorHPMid = DefaultStyle.StateBoxColorHPMid;
|
||||||
|
default.StateBoxColorLobby = DefaultStyle.StateBoxColorLobby;
|
||||||
|
default.StateBoxColorNotReady = DefaultStyle.StateBoxColorNotReady;
|
||||||
|
default.StateBoxColorReady = DefaultStyle.StateBoxColorReady;
|
||||||
|
default.StateBoxColorSpectator = DefaultStyle.StateBoxColorSpectator;
|
||||||
|
default.StateTextColorArmorHigh = DefaultStyle.StateTextColorArmorHigh;
|
||||||
|
default.StateTextColorArmorLow = DefaultStyle.StateTextColorArmorLow;
|
||||||
|
default.StateTextColorArmorMid = DefaultStyle.StateTextColorArmorMid;
|
||||||
|
default.StateTextColorHPHigh = DefaultStyle.StateTextColorHPHigh;
|
||||||
|
default.StateTextColorHPLow = DefaultStyle.StateTextColorHPLow;
|
||||||
|
default.StateTextColorHPMid = DefaultStyle.StateTextColorHPMid;
|
||||||
|
default.StatsOwnerBoxColor = DefaultStyle.StatsOwnerBoxColor;
|
||||||
|
|
||||||
|
WriteSettings(Settings());
|
||||||
|
|
||||||
|
case 2147483647:
|
||||||
|
StaticSaveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static function YASStyle DefaultSettings()
|
public static function YASStyle DefaultSettings()
|
||||||
{
|
{
|
||||||
local YASStyle Settings;
|
local YASStyle Settings;
|
||||||
@ -75,60 +219,133 @@ public static function YASStyle Settings()
|
|||||||
|
|
||||||
`callstack_static("Settings");
|
`callstack_static("Settings");
|
||||||
|
|
||||||
Settings.EdgeSize = default.EdgeSize;
|
// Box shapes
|
||||||
Settings.ShapeServerNameBox = default.ShapeServerNameBox;
|
Settings.EdgeSize = default.EdgeSize;
|
||||||
Settings.ShapeGameInfoBox = default.ShapeGameInfoBox;
|
Settings.ShapeServerNameBox = default.ShapeServerNameBox;
|
||||||
Settings.ShapeWaveInfoBox = default.ShapeWaveInfoBox;
|
Settings.ShapeGameInfoBox = default.ShapeGameInfoBox;
|
||||||
Settings.ShapePlayersCountBox = default.ShapePlayersCountBox;
|
Settings.ShapeWaveInfoBox = default.ShapeWaveInfoBox;
|
||||||
Settings.ShapeHeaderBox = default.ShapeHeaderBox;
|
Settings.ShapePlayersCountBox = default.ShapePlayersCountBox;
|
||||||
Settings.ShapeLeftStateBoxTopPlayer = default.ShapeLeftStateBoxTopPlayer;
|
Settings.ShapeHeaderBox = default.ShapeHeaderBox;
|
||||||
Settings.ShapeLeftStateBoxMidPlayer = default.ShapeLeftStateBoxMidPlayer;
|
Settings.ShapeLeftStateBoxTopPlayer = default.ShapeLeftStateBoxTopPlayer;
|
||||||
|
Settings.ShapeLeftStateBoxMidPlayer = default.ShapeLeftStateBoxMidPlayer;
|
||||||
Settings.ShapeLeftStateBoxBottomPlayer = default.ShapeLeftStateBoxBottomPlayer;
|
Settings.ShapeLeftStateBoxBottomPlayer = default.ShapeLeftStateBoxBottomPlayer;
|
||||||
Settings.ShapePlayerBoxTopPlayer = default.ShapePlayerBoxTopPlayer;
|
Settings.ShapePlayerBoxTopPlayer = default.ShapePlayerBoxTopPlayer;
|
||||||
Settings.ShapePlayerBoxMidPlayer = default.ShapePlayerBoxMidPlayer;
|
Settings.ShapePlayerBoxMidPlayer = default.ShapePlayerBoxMidPlayer;
|
||||||
Settings.ShapePlayerBoxBottomPlayer = default.ShapePlayerBoxBottomPlayer;
|
Settings.ShapePlayerBoxBottomPlayer = default.ShapePlayerBoxBottomPlayer;
|
||||||
Settings.ShapeStatsBoxTopPlayer = default.ShapeStatsBoxTopPlayer;
|
Settings.ShapeStatsBoxTopPlayer = default.ShapeStatsBoxTopPlayer;
|
||||||
Settings.ShapeStatsBoxMidPlayer = default.ShapeStatsBoxMidPlayer;
|
Settings.ShapeStatsBoxMidPlayer = default.ShapeStatsBoxMidPlayer;
|
||||||
Settings.ShapeStatsBoxBottomPlayer = default.ShapeStatsBoxBottomPlayer;
|
Settings.ShapeStatsBoxBottomPlayer = default.ShapeStatsBoxBottomPlayer;
|
||||||
Settings.ServerNameBoxColor = default.ServerNameBoxColor;
|
|
||||||
Settings.ServerNameTextColor = default.ServerNameTextColor;
|
// Server box
|
||||||
Settings.GameInfoBoxColor = default.GameInfoBoxColor;
|
Settings.ServerNameBoxColor = default.ServerNameBoxColor;
|
||||||
Settings.GameInfoTextColor = default.GameInfoTextColor;
|
Settings.ServerNameTextColor = default.ServerNameTextColor;
|
||||||
Settings.WaveBoxColor = default.WaveBoxColor;
|
|
||||||
Settings.WaveTextColor = default.WaveTextColor;
|
// Game info box
|
||||||
Settings.PlayerCountBoxColor = default.PlayerCountBoxColor;
|
Settings.GameInfoBoxColor = default.GameInfoBoxColor;
|
||||||
Settings.PlayerCountTextColor = default.PlayerCountTextColor;
|
Settings.GameInfoTextColor = default.GameInfoTextColor;
|
||||||
Settings.ListHeaderBoxColor = default.ListHeaderBoxColor;
|
|
||||||
Settings.ListHeaderTextColor = default.ListHeaderTextColor;
|
// Wave info box
|
||||||
Settings.LeftStateBoxColor = default.LeftStateBoxColor;
|
Settings.WaveBoxColor = default.WaveBoxColor;
|
||||||
Settings.LeftStateBoxColorDead = default.LeftStateBoxColorDead;
|
Settings.WaveTextColor = default.WaveTextColor;
|
||||||
Settings.LeftStateBoxColorLow = default.LeftStateBoxColorLow;
|
|
||||||
Settings.LeftStateBoxColorMid = default.LeftStateBoxColorMid;
|
// Player count box
|
||||||
Settings.LeftStateBoxColorHigh = default.LeftStateBoxColorHigh;
|
Settings.PlayerCountBoxColor = default.PlayerCountBoxColor;
|
||||||
Settings.PlayerOwnerBoxColor = default.PlayerOwnerBoxColor;
|
Settings.PlayerCountTextColor = default.PlayerCountTextColor;
|
||||||
Settings.PlayerBoxColor = default.PlayerBoxColor;
|
|
||||||
Settings.StatsBoxColor = default.StatsBoxColor;
|
// Header box
|
||||||
Settings.RankTextColor = default.RankTextColor;
|
Settings.ListHeaderBoxColor = default.ListHeaderBoxColor;
|
||||||
Settings.ZedTextColor = default.ZedTextColor;
|
Settings.ListHeaderTextColor = default.ListHeaderTextColor;
|
||||||
Settings.PerkTextColor = default.PerkTextColor;
|
|
||||||
Settings.LevelTextColor = default.LevelTextColor;
|
// State box
|
||||||
Settings.PlayerNameTextColor = default.PlayerNameTextColor;
|
Settings.StateBoxColorLobby = default.StateBoxColorLobby;
|
||||||
Settings.KillsTextColor = default.KillsTextColor;
|
Settings.StateBoxColorReady = default.StateBoxColorReady;
|
||||||
Settings.AssistsTextColor = default.AssistsTextColor;
|
Settings.StateBoxColorNotReady = default.StateBoxColorNotReady;
|
||||||
Settings.DoshTextColor = default.DoshTextColor;
|
Settings.StateBoxColorSpectator = default.StateBoxColorSpectator;
|
||||||
Settings.StateTextColorLobby = default.StateTextColorLobby;
|
Settings.StateBoxColorDead = default.StateBoxColorDead;
|
||||||
Settings.StateTextColorReady = default.StateTextColorReady;
|
Settings.StateBoxColorHPLow = default.StateBoxColorHPLow;
|
||||||
Settings.StateTextColorNotReady = default.StateTextColorNotReady;
|
Settings.StateBoxColorHPMid = default.StateBoxColorHPMid;
|
||||||
Settings.StateTextColor = default.StateTextColor;
|
Settings.StateBoxColorHPHigh = default.StateBoxColorHPHigh;
|
||||||
Settings.StateTextColorSpectator = default.StateTextColorSpectator;
|
Settings.StateBoxColorArmorLow = default.StateBoxColorArmorLow;
|
||||||
Settings.StateTextColorDead = default.StateTextColorDead;
|
Settings.StateBoxColorArmorMid = default.StateBoxColorArmorMid;
|
||||||
Settings.StateTextColorLowHP = default.StateTextColorLowHP;
|
Settings.StateBoxColorArmorHigh = default.StateBoxColorArmorHigh;
|
||||||
Settings.StateTextColorMidHP = default.StateTextColorMidHP;
|
|
||||||
Settings.StateTextColorHighHP = default.StateTextColorHighHP;
|
// Player box
|
||||||
Settings.PingTextColor = default.PingTextColor;
|
Settings.PlayerOwnerBoxColor = default.PlayerOwnerBoxColor;
|
||||||
Settings.PingTextColorLow = default.PingTextColorLow;
|
Settings.PlayerBoxColor = default.PlayerBoxColor;
|
||||||
Settings.PingTextColorMid = default.PingTextColorMid;
|
|
||||||
Settings.PingTextColorHigh = default.PingTextColorHigh;
|
// Stats box
|
||||||
|
Settings.StatsOwnerBoxColor = default.StatsOwnerBoxColor;
|
||||||
|
Settings.StatsBoxColor = default.StatsBoxColor;
|
||||||
|
|
||||||
|
// State text
|
||||||
|
Settings.StateTextColorLobby = default.StateTextColorLobby;
|
||||||
|
Settings.StateTextColorReady = default.StateTextColorReady;
|
||||||
|
Settings.StateTextColorNotReady = default.StateTextColorNotReady;
|
||||||
|
Settings.StateTextColorSpectator = default.StateTextColorSpectator;
|
||||||
|
Settings.StateTextColorDead = default.StateTextColorDead;
|
||||||
|
Settings.StateTextColorHPLow = default.StateTextColorHPLow;
|
||||||
|
Settings.StateTextColorHPMid = default.StateTextColorHPMid;
|
||||||
|
Settings.StateTextColorHPHigh = default.StateTextColorHPHigh;
|
||||||
|
Settings.StateTextColorArmorLow = default.StateTextColorArmorLow;
|
||||||
|
Settings.StateTextColorArmorMid = default.StateTextColorArmorMid;
|
||||||
|
Settings.StateTextColorArmorHigh = default.StateTextColorArmorHigh;
|
||||||
|
|
||||||
|
// Rank text
|
||||||
|
Settings.RankTextColor = default.RankTextColor;
|
||||||
|
|
||||||
|
// Player text
|
||||||
|
Settings.PlayerNameTextColor = default.PlayerNameTextColor;
|
||||||
|
|
||||||
|
// Level text
|
||||||
|
Settings.LevelTextColorLow = default.LevelTextColorLow;
|
||||||
|
Settings.LevelTextColorMid = default.LevelTextColorMid;
|
||||||
|
Settings.LevelTextColorHigh = default.LevelTextColorHigh;
|
||||||
|
|
||||||
|
// Perk text
|
||||||
|
Settings.ZedTextColor = default.ZedTextColor;
|
||||||
|
Settings.PerkNoneTextColor = default.PerkNoneTextColor;
|
||||||
|
Settings.PerkBerserkerTextColor = default.PerkBerserkerTextColor;
|
||||||
|
Settings.PerkCommandoTextColor = default.PerkCommandoTextColor;
|
||||||
|
Settings.PerkSupportTextColor = default.PerkSupportTextColor;
|
||||||
|
Settings.PerkFieldMedicTextColor = default.PerkFieldMedicTextColor;
|
||||||
|
Settings.PerkDemolitionistTextColor = default.PerkDemolitionistTextColor;
|
||||||
|
Settings.PerkFirebugTextColor = default.PerkFirebugTextColor;
|
||||||
|
Settings.PerkGunslingerTextColor = default.PerkGunslingerTextColor;
|
||||||
|
Settings.PerkSharpshooterTextColor = default.PerkSharpshooterTextColor;
|
||||||
|
Settings.PerkSwatTextColor = default.PerkSwatTextColor;
|
||||||
|
Settings.PerkSurvivalistTextColor = default.PerkSurvivalistTextColor;
|
||||||
|
|
||||||
|
// Dosh text
|
||||||
|
Settings.DoshTextColorLow = default.DoshTextColorLow;
|
||||||
|
Settings.DoshTextColorMid = default.DoshTextColorMid;
|
||||||
|
Settings.DoshTextColorHigh = default.DoshTextColorHigh;
|
||||||
|
|
||||||
|
// Kills text
|
||||||
|
Settings.KillsTextColorLow = default.KillsTextColorLow;
|
||||||
|
Settings.KillsTextColorMid = default.KillsTextColorMid;
|
||||||
|
Settings.KillsTextColorHigh = default.KillsTextColorHigh;
|
||||||
|
|
||||||
|
// Assists text
|
||||||
|
Settings.AssistsTextColorLow = default.AssistsTextColorLow;
|
||||||
|
Settings.AssistsTextColorMid = default.AssistsTextColorMid;
|
||||||
|
Settings.AssistsTextColorHigh = default.AssistsTextColorHigh;
|
||||||
|
|
||||||
|
// Ping text
|
||||||
|
Settings.PingTextColorLow = default.PingTextColorLow;
|
||||||
|
Settings.PingTextColorMid = default.PingTextColorMid;
|
||||||
|
Settings.PingTextColorHigh = default.PingTextColorHigh;
|
||||||
|
|
||||||
|
// Other settings
|
||||||
|
Settings.bShowPingBars = default.bShowPingBars;
|
||||||
|
Settings.bHealthBoxSmoothColorChange = default.bHealthBoxSmoothColorChange;
|
||||||
|
Settings.bArmorBoxSmoothColorChange = default.bArmorBoxSmoothColorChange;
|
||||||
|
Settings.bHealthTextSmoothColorChange = default.bHealthTextSmoothColorChange;
|
||||||
|
Settings.bArmorTextSmoothColorChange = default.bArmorTextSmoothColorChange;
|
||||||
|
Settings.bLevelTextSmoothColorChange = default.bLevelTextSmoothColorChange;
|
||||||
|
Settings.bDoshTextSmoothColorChange = default.bDoshTextSmoothColorChange;
|
||||||
|
Settings.bKillsTextSmoothColorChange = default.bKillsTextSmoothColorChange;
|
||||||
|
Settings.bAssistsTextSmoothColorChange = default.bAssistsTextSmoothColorChange;
|
||||||
|
Settings.bPingTextSmoothColorChange = default.bPingTextSmoothColorChange;
|
||||||
|
|
||||||
return Settings;
|
return Settings;
|
||||||
}
|
}
|
||||||
@ -137,62 +354,133 @@ public static function WriteSettings(YASStyle Settings)
|
|||||||
{
|
{
|
||||||
`callstack_static("WriteSettings");
|
`callstack_static("WriteSettings");
|
||||||
|
|
||||||
default.EdgeSize = Settings.EdgeSize;
|
// Box shapes
|
||||||
default.ShapeServerNameBox = Settings.ShapeServerNameBox;
|
default.EdgeSize = Settings.EdgeSize;
|
||||||
default.ShapeGameInfoBox = Settings.ShapeGameInfoBox;
|
default.ShapeServerNameBox = Settings.ShapeServerNameBox;
|
||||||
default.ShapeWaveInfoBox = Settings.ShapeWaveInfoBox;
|
default.ShapeGameInfoBox = Settings.ShapeGameInfoBox;
|
||||||
default.ShapePlayersCountBox = Settings.ShapePlayersCountBox;
|
default.ShapeWaveInfoBox = Settings.ShapeWaveInfoBox;
|
||||||
default.ShapeHeaderBox = Settings.ShapeHeaderBox;
|
default.ShapePlayersCountBox = Settings.ShapePlayersCountBox;
|
||||||
default.ShapeLeftStateBoxTopPlayer = Settings.ShapeLeftStateBoxTopPlayer;
|
default.ShapeHeaderBox = Settings.ShapeHeaderBox;
|
||||||
default.ShapeLeftStateBoxMidPlayer = Settings.ShapeLeftStateBoxMidPlayer;
|
default.ShapeLeftStateBoxTopPlayer = Settings.ShapeLeftStateBoxTopPlayer;
|
||||||
default.ShapeLeftStateBoxBottomPlayer = Settings.ShapeLeftStateBoxBottomPlayer;
|
default.ShapeLeftStateBoxMidPlayer = Settings.ShapeLeftStateBoxMidPlayer;
|
||||||
default.ShapePlayerBoxTopPlayer = Settings.ShapePlayerBoxTopPlayer;
|
default.ShapeLeftStateBoxBottomPlayer = Settings.ShapeLeftStateBoxBottomPlayer;
|
||||||
default.ShapePlayerBoxMidPlayer = Settings.ShapePlayerBoxMidPlayer;
|
default.ShapePlayerBoxTopPlayer = Settings.ShapePlayerBoxTopPlayer;
|
||||||
default.ShapePlayerBoxBottomPlayer = Settings.ShapePlayerBoxBottomPlayer;
|
default.ShapePlayerBoxMidPlayer = Settings.ShapePlayerBoxMidPlayer;
|
||||||
default.ShapeStatsBoxTopPlayer = Settings.ShapeStatsBoxTopPlayer;
|
default.ShapePlayerBoxBottomPlayer = Settings.ShapePlayerBoxBottomPlayer;
|
||||||
default.ShapeStatsBoxMidPlayer = Settings.ShapeStatsBoxMidPlayer;
|
default.ShapeStatsBoxTopPlayer = Settings.ShapeStatsBoxTopPlayer;
|
||||||
default.ShapeStatsBoxBottomPlayer = Settings.ShapeStatsBoxBottomPlayer;
|
default.ShapeStatsBoxMidPlayer = Settings.ShapeStatsBoxMidPlayer;
|
||||||
default.ServerNameBoxColor = Settings.ServerNameBoxColor;
|
default.ShapeStatsBoxBottomPlayer = Settings.ShapeStatsBoxBottomPlayer;
|
||||||
default.ServerNameTextColor = Settings.ServerNameTextColor;
|
|
||||||
default.GameInfoBoxColor = Settings.GameInfoBoxColor;
|
|
||||||
default.GameInfoTextColor = Settings.GameInfoTextColor;
|
|
||||||
default.WaveBoxColor = Settings.WaveBoxColor;
|
|
||||||
default.WaveTextColor = Settings.WaveTextColor;
|
|
||||||
default.PlayerCountBoxColor = Settings.PlayerCountBoxColor;
|
|
||||||
default.PlayerCountTextColor = Settings.PlayerCountTextColor;
|
|
||||||
default.ListHeaderBoxColor = Settings.ListHeaderBoxColor;
|
|
||||||
default.ListHeaderTextColor = Settings.ListHeaderTextColor;
|
|
||||||
default.LeftStateBoxColor = Settings.LeftStateBoxColor;
|
|
||||||
default.LeftStateBoxColorDead = Settings.LeftStateBoxColorDead;
|
|
||||||
default.LeftStateBoxColorLow = Settings.LeftStateBoxColorLow;
|
|
||||||
default.LeftStateBoxColorMid = Settings.LeftStateBoxColorMid;
|
|
||||||
default.LeftStateBoxColorHigh = Settings.LeftStateBoxColorHigh;
|
|
||||||
default.PlayerOwnerBoxColor = Settings.PlayerOwnerBoxColor;
|
|
||||||
default.PlayerBoxColor = Settings.PlayerBoxColor;
|
|
||||||
default.StatsBoxColor = Settings.StatsBoxColor;
|
|
||||||
default.RankTextColor = Settings.RankTextColor;
|
|
||||||
default.ZedTextColor = Settings.ZedTextColor;
|
|
||||||
default.PerkTextColor = Settings.PerkTextColor;
|
|
||||||
default.LevelTextColor = Settings.LevelTextColor;
|
|
||||||
default.PlayerNameTextColor = Settings.PlayerNameTextColor;
|
|
||||||
default.KillsTextColor = Settings.KillsTextColor;
|
|
||||||
default.AssistsTextColor = Settings.AssistsTextColor;
|
|
||||||
default.DoshTextColor = Settings.DoshTextColor;
|
|
||||||
default.StateTextColorLobby = Settings.StateTextColorLobby;
|
|
||||||
default.StateTextColorReady = Settings.StateTextColorReady;
|
|
||||||
default.StateTextColorNotReady = Settings.StateTextColorNotReady;
|
|
||||||
default.StateTextColor = Settings.StateTextColor;
|
|
||||||
default.StateTextColorSpectator = Settings.StateTextColorSpectator;
|
|
||||||
default.StateTextColorDead = Settings.StateTextColorDead;
|
|
||||||
default.StateTextColorLowHP = Settings.StateTextColorLowHP;
|
|
||||||
default.StateTextColorMidHP = Settings.StateTextColorMidHP;
|
|
||||||
default.StateTextColorHighHP = Settings.StateTextColorHighHP;
|
|
||||||
default.PingTextColor = Settings.PingTextColor;
|
|
||||||
default.PingTextColorLow = Settings.PingTextColorLow;
|
|
||||||
default.PingTextColorMid = Settings.PingTextColorMid;
|
|
||||||
default.PingTextColorHigh = Settings.PingTextColorHigh;
|
|
||||||
|
|
||||||
StaticSaveConfig();
|
// Server box
|
||||||
|
default.ServerNameBoxColor = Settings.ServerNameBoxColor;
|
||||||
|
default.ServerNameTextColor = Settings.ServerNameTextColor;
|
||||||
|
|
||||||
|
// Game info box
|
||||||
|
default.GameInfoBoxColor = Settings.GameInfoBoxColor;
|
||||||
|
default.GameInfoTextColor = Settings.GameInfoTextColor;
|
||||||
|
|
||||||
|
// Wave info box
|
||||||
|
default.WaveBoxColor = Settings.WaveBoxColor;
|
||||||
|
default.WaveTextColor = Settings.WaveTextColor;
|
||||||
|
|
||||||
|
// Player count box
|
||||||
|
default.PlayerCountBoxColor = Settings.PlayerCountBoxColor;
|
||||||
|
default.PlayerCountTextColor = Settings.PlayerCountTextColor;
|
||||||
|
|
||||||
|
// Header box
|
||||||
|
default.ListHeaderBoxColor = Settings.ListHeaderBoxColor;
|
||||||
|
default.ListHeaderTextColor = Settings.ListHeaderTextColor;
|
||||||
|
|
||||||
|
// State box
|
||||||
|
default.StateBoxColorLobby = Settings.StateBoxColorLobby;
|
||||||
|
default.StateBoxColorReady = Settings.StateBoxColorReady;
|
||||||
|
default.StateBoxColorNotReady = Settings.StateBoxColorNotReady;
|
||||||
|
default.StateBoxColorSpectator = Settings.StateBoxColorSpectator;
|
||||||
|
default.StateBoxColorDead = Settings.StateBoxColorDead;
|
||||||
|
default.StateBoxColorHPLow = Settings.StateBoxColorHPLow;
|
||||||
|
default.StateBoxColorHPMid = Settings.StateBoxColorHPMid;
|
||||||
|
default.StateBoxColorHPHigh = Settings.StateBoxColorHPHigh;
|
||||||
|
default.StateBoxColorArmorLow = Settings.StateBoxColorArmorLow;
|
||||||
|
default.StateBoxColorArmorMid = Settings.StateBoxColorArmorMid;
|
||||||
|
default.StateBoxColorArmorHigh = Settings.StateBoxColorArmorHigh;
|
||||||
|
|
||||||
|
// Player box
|
||||||
|
default.PlayerOwnerBoxColor = Settings.PlayerOwnerBoxColor;
|
||||||
|
default.PlayerBoxColor = Settings.PlayerBoxColor;
|
||||||
|
|
||||||
|
// Stats box
|
||||||
|
default.StatsOwnerBoxColor = Settings.StatsOwnerBoxColor;
|
||||||
|
default.StatsBoxColor = Settings.StatsBoxColor;
|
||||||
|
|
||||||
|
// State text
|
||||||
|
default.StateTextColorLobby = Settings.StateTextColorLobby;
|
||||||
|
default.StateTextColorReady = Settings.StateTextColorReady;
|
||||||
|
default.StateTextColorNotReady = Settings.StateTextColorNotReady;
|
||||||
|
default.StateTextColorSpectator = Settings.StateTextColorSpectator;
|
||||||
|
default.StateTextColorDead = Settings.StateTextColorDead;
|
||||||
|
default.StateTextColorHPLow = Settings.StateTextColorHPLow;
|
||||||
|
default.StateTextColorHPMid = Settings.StateTextColorHPMid;
|
||||||
|
default.StateTextColorHPHigh = Settings.StateTextColorHPHigh;
|
||||||
|
default.StateTextColorArmorLow = Settings.StateTextColorArmorLow;
|
||||||
|
default.StateTextColorArmorMid = Settings.StateTextColorArmorMid;
|
||||||
|
default.StateTextColorArmorHigh = Settings.StateTextColorArmorHigh;
|
||||||
|
|
||||||
|
// Rank text
|
||||||
|
default.RankTextColor = Settings.RankTextColor;
|
||||||
|
|
||||||
|
// Player text
|
||||||
|
default.PlayerNameTextColor = Settings.PlayerNameTextColor;
|
||||||
|
|
||||||
|
// Level text
|
||||||
|
default.LevelTextColorLow = Settings.LevelTextColorLow;
|
||||||
|
default.LevelTextColorMid = Settings.LevelTextColorMid;
|
||||||
|
default.LevelTextColorHigh = Settings.LevelTextColorHigh;
|
||||||
|
|
||||||
|
// Perk text
|
||||||
|
default.ZedTextColor = Settings.ZedTextColor;
|
||||||
|
default.PerkNoneTextColor = Settings.PerkNoneTextColor;
|
||||||
|
default.PerkBerserkerTextColor = Settings.PerkBerserkerTextColor;
|
||||||
|
default.PerkCommandoTextColor = Settings.PerkCommandoTextColor;
|
||||||
|
default.PerkSupportTextColor = Settings.PerkSupportTextColor;
|
||||||
|
default.PerkFieldMedicTextColor = Settings.PerkFieldMedicTextColor;
|
||||||
|
default.PerkDemolitionistTextColor = Settings.PerkDemolitionistTextColor;
|
||||||
|
default.PerkFirebugTextColor = Settings.PerkFirebugTextColor;
|
||||||
|
default.PerkGunslingerTextColor = Settings.PerkGunslingerTextColor;
|
||||||
|
default.PerkSharpshooterTextColor = Settings.PerkSharpshooterTextColor;
|
||||||
|
default.PerkSwatTextColor = Settings.PerkSwatTextColor;
|
||||||
|
default.PerkSurvivalistTextColor = Settings.PerkSurvivalistTextColor;
|
||||||
|
|
||||||
|
// Dosh text
|
||||||
|
default.DoshTextColorLow = Settings.DoshTextColorLow;
|
||||||
|
default.DoshTextColorMid = Settings.DoshTextColorMid;
|
||||||
|
default.DoshTextColorHigh = Settings.DoshTextColorHigh;
|
||||||
|
|
||||||
|
// Kills text
|
||||||
|
default.KillsTextColorLow = Settings.KillsTextColorLow;
|
||||||
|
default.KillsTextColorMid = Settings.KillsTextColorMid;
|
||||||
|
default.KillsTextColorHigh = Settings.KillsTextColorHigh;
|
||||||
|
|
||||||
|
// Assists text
|
||||||
|
default.AssistsTextColorLow = Settings.AssistsTextColorLow;
|
||||||
|
default.AssistsTextColorMid = Settings.AssistsTextColorMid;
|
||||||
|
default.AssistsTextColorHigh = Settings.AssistsTextColorHigh;
|
||||||
|
|
||||||
|
// Ping text
|
||||||
|
default.PingTextColorLow = Settings.PingTextColorLow;
|
||||||
|
default.PingTextColorMid = Settings.PingTextColorMid;
|
||||||
|
default.PingTextColorHigh = Settings.PingTextColorHigh;
|
||||||
|
|
||||||
|
// Other settings
|
||||||
|
default.bShowPingBars = Settings.bShowPingBars;
|
||||||
|
default.bHealthBoxSmoothColorChange = Settings.bHealthBoxSmoothColorChange;
|
||||||
|
default.bArmorBoxSmoothColorChange = Settings.bArmorBoxSmoothColorChange;
|
||||||
|
default.bHealthTextSmoothColorChange = Settings.bHealthTextSmoothColorChange;
|
||||||
|
default.bArmorTextSmoothColorChange = Settings.bArmorTextSmoothColorChange;
|
||||||
|
default.bLevelTextSmoothColorChange = Settings.bLevelTextSmoothColorChange;
|
||||||
|
default.bDoshTextSmoothColorChange = Settings.bDoshTextSmoothColorChange;
|
||||||
|
default.bKillsTextSmoothColorChange = Settings.bKillsTextSmoothColorChange;
|
||||||
|
default.bAssistsTextSmoothColorChange = Settings.bAssistsTextSmoothColorChange;
|
||||||
|
default.bPingTextSmoothColorChange = Settings.bPingTextSmoothColorChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultProperties
|
defaultProperties
|
||||||
|
58
YAS/Classes/SettingsArmor.uc
Normal file
58
YAS/Classes/SettingsArmor.uc
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
class SettingsArmor extends Object
|
||||||
|
dependson(Types)
|
||||||
|
config(YAS);
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
|
var config int Low;
|
||||||
|
var config int High;
|
||||||
|
|
||||||
|
public static function InitConfig(int ConfigVersion)
|
||||||
|
{
|
||||||
|
`callstack_static("InitConfig");
|
||||||
|
|
||||||
|
switch (ConfigVersion)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
WriteSettings(DefaultSettings());
|
||||||
|
|
||||||
|
case 2147483647:
|
||||||
|
StaticSaveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function YASSettingsArmor DefaultSettings()
|
||||||
|
{
|
||||||
|
local YASSettingsArmor Settings;
|
||||||
|
|
||||||
|
`callstack_static("DefaultSettings");
|
||||||
|
|
||||||
|
return Settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function YASSettingsArmor Settings()
|
||||||
|
{
|
||||||
|
local YASSettingsArmor Settings;
|
||||||
|
|
||||||
|
`callstack_static("Settings");
|
||||||
|
|
||||||
|
Settings.Low = default.Low;
|
||||||
|
Settings.High = default.High;
|
||||||
|
|
||||||
|
return Settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function WriteSettings(YASSettingsArmor Settings)
|
||||||
|
{
|
||||||
|
`callstack_static("WriteSettings");
|
||||||
|
|
||||||
|
default.Low = Settings.Low;
|
||||||
|
default.High = Settings.High;
|
||||||
|
}
|
||||||
|
|
||||||
|
DefaultProperties
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
58
YAS/Classes/SettingsHealth.uc
Normal file
58
YAS/Classes/SettingsHealth.uc
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
class SettingsHealth extends Object
|
||||||
|
dependson(Types)
|
||||||
|
config(YAS);
|
||||||
|
|
||||||
|
`include(Build.uci)
|
||||||
|
`include(Logger.uci)
|
||||||
|
|
||||||
|
var config int Low;
|
||||||
|
var config int High;
|
||||||
|
|
||||||
|
public static function InitConfig(int ConfigVersion)
|
||||||
|
{
|
||||||
|
`callstack_static("InitConfig");
|
||||||
|
|
||||||
|
switch (ConfigVersion)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
WriteSettings(DefaultSettings());
|
||||||
|
|
||||||
|
case 2147483647:
|
||||||
|
StaticSaveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function YASSettingsHealth DefaultSettings()
|
||||||
|
{
|
||||||
|
local YASSettingsHealth Settings;
|
||||||
|
|
||||||
|
`callstack_static("DefaultSettings");
|
||||||
|
|
||||||
|
return Settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function YASSettingsHealth Settings()
|
||||||
|
{
|
||||||
|
local YASSettingsHealth Settings;
|
||||||
|
|
||||||
|
`callstack_static("Settings");
|
||||||
|
|
||||||
|
Settings.Low = default.Low;
|
||||||
|
Settings.High = default.High;
|
||||||
|
|
||||||
|
return Settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function WriteSettings(YASSettingsHealth Settings)
|
||||||
|
{
|
||||||
|
`callstack_static("WriteSettings");
|
||||||
|
|
||||||
|
default.Low = Settings.Low;
|
||||||
|
default.High = Settings.High;
|
||||||
|
}
|
||||||
|
|
||||||
|
DefaultProperties
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
@ -1,11 +1,10 @@
|
|||||||
class DynamicLevelColor extends Object
|
class SettingsLevel extends Object
|
||||||
dependson(Types)
|
dependson(Types)
|
||||||
config(YAS);
|
config(YAS);
|
||||||
|
|
||||||
`include(Build.uci)
|
`include(Build.uci)
|
||||||
`include(Logger.uci)
|
`include(Logger.uci)
|
||||||
|
|
||||||
var config bool bEnabled;
|
|
||||||
var config int Normal_Low;
|
var config int Normal_Low;
|
||||||
var config int Normal_High;
|
var config int Normal_High;
|
||||||
var config int Hard_Low;
|
var config int Hard_Low;
|
||||||
@ -15,6 +14,21 @@ var config int Suicide_High;
|
|||||||
var config int HellOnEarth_Low;
|
var config int HellOnEarth_Low;
|
||||||
var config int HellOnEarth_High;
|
var config int HellOnEarth_High;
|
||||||
|
|
||||||
|
public static function InitConfig(int ConfigVersion)
|
||||||
|
{
|
||||||
|
`callstack_static("InitConfig");
|
||||||
|
|
||||||
|
switch (ConfigVersion)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
WriteSettings(DefaultSettings());
|
||||||
|
|
||||||
|
case 2147483647:
|
||||||
|
StaticSaveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static function YASSettingsLevel DefaultSettings()
|
public static function YASSettingsLevel DefaultSettings()
|
||||||
{
|
{
|
||||||
local YASSettingsLevel Settings;
|
local YASSettingsLevel Settings;
|
||||||
@ -30,14 +44,13 @@ public static function YASSettingsLevel Settings()
|
|||||||
|
|
||||||
`callstack_static("Settings");
|
`callstack_static("Settings");
|
||||||
|
|
||||||
Settings.Dynamic = default.bEnabled;
|
Settings.Low [0] = default.Normal_Low;
|
||||||
Settings.Low[0] = default.Normal_Low;
|
|
||||||
Settings.High[0] = default.Normal_High;
|
Settings.High[0] = default.Normal_High;
|
||||||
Settings.Low[1] = default.Hard_Low;
|
Settings.Low [1] = default.Hard_Low;
|
||||||
Settings.High[1] = default.Hard_High;
|
Settings.High[1] = default.Hard_High;
|
||||||
Settings.Low[2] = default.Suicide_Low;
|
Settings.Low [2] = default.Suicide_Low;
|
||||||
Settings.High[2] = default.Suicide_High;
|
Settings.High[2] = default.Suicide_High;
|
||||||
Settings.Low[3] = default.HellOnEarth_Low;
|
Settings.Low [3] = default.HellOnEarth_Low;
|
||||||
Settings.High[3] = default.HellOnEarth_High;
|
Settings.High[3] = default.HellOnEarth_High;
|
||||||
|
|
||||||
return Settings;
|
return Settings;
|
||||||
@ -47,17 +60,14 @@ public static function WriteSettings(YASSettingsLevel Settings)
|
|||||||
{
|
{
|
||||||
`callstack_static("WriteSettings");
|
`callstack_static("WriteSettings");
|
||||||
|
|
||||||
default.bEnabled = Settings.Dynamic;
|
default.Normal_Low = Settings.Low [0];
|
||||||
default.Normal_Low = Settings.Low[0];
|
default.Normal_High = Settings.High[0];
|
||||||
default.Normal_High = Settings.High[0];
|
default.Hard_Low = Settings.Low [1];
|
||||||
default.Hard_Low = Settings.Low[1];
|
default.Hard_High = Settings.High[1];
|
||||||
default.Hard_High = Settings.High[1];
|
default.Suicide_Low = Settings.Low [2];
|
||||||
default.Suicide_Low = Settings.Low[2];
|
default.Suicide_High = Settings.High[2];
|
||||||
default.Suicide_High = Settings.High[2];
|
default.HellOnEarth_Low = Settings.Low [3];
|
||||||
default.HellOnEarth_Low = Settings.Low[3];
|
|
||||||
default.HellOnEarth_High = Settings.High[3];
|
default.HellOnEarth_High = Settings.High[3];
|
||||||
|
|
||||||
StaticSaveConfig();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultProperties
|
DefaultProperties
|
@ -1,14 +1,27 @@
|
|||||||
class DynamicPingColor extends Object
|
class SettingsPing extends Object
|
||||||
dependson(Types)
|
dependson(Types)
|
||||||
config(YAS);
|
config(YAS);
|
||||||
|
|
||||||
`include(Build.uci)
|
`include(Build.uci)
|
||||||
`include(Logger.uci)
|
`include(Logger.uci)
|
||||||
|
|
||||||
var config bool bEnabled;
|
|
||||||
var config int Low;
|
var config int Low;
|
||||||
var config int High;
|
var config int High;
|
||||||
var config bool bShowPingBars;
|
|
||||||
|
public static function InitConfig(int ConfigVersion)
|
||||||
|
{
|
||||||
|
`callstack_static("InitConfig");
|
||||||
|
|
||||||
|
switch (ConfigVersion)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
WriteSettings(DefaultSettings());
|
||||||
|
|
||||||
|
case 2147483647:
|
||||||
|
StaticSaveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static function YASSettingsPing DefaultSettings()
|
public static function YASSettingsPing DefaultSettings()
|
||||||
{
|
{
|
||||||
@ -25,10 +38,8 @@ public static function YASSettingsPing Settings()
|
|||||||
|
|
||||||
`callstack_static("Settings");
|
`callstack_static("Settings");
|
||||||
|
|
||||||
Settings.Dynamic = default.bEnabled;
|
Settings.Low = default.Low;
|
||||||
Settings.Low = default.Low;
|
|
||||||
Settings.High = default.High;
|
Settings.High = default.High;
|
||||||
Settings.ShowPingBars = default.bShowPingBars;
|
|
||||||
|
|
||||||
return Settings;
|
return Settings;
|
||||||
}
|
}
|
||||||
@ -37,12 +48,8 @@ public static function WriteSettings(YASSettingsPing Settings)
|
|||||||
{
|
{
|
||||||
`callstack_static("WriteSettings");
|
`callstack_static("WriteSettings");
|
||||||
|
|
||||||
default.bEnabled = Settings.Dynamic;
|
default.Low = Settings.Low;
|
||||||
default.Low = Settings.Low;
|
|
||||||
default.High = Settings.High;
|
default.High = Settings.High;
|
||||||
default.bShowPingBars = Settings.ShowPingBars;
|
|
||||||
|
|
||||||
StaticSaveConfig();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultProperties
|
DefaultProperties
|
@ -7,6 +7,25 @@ class SteamGroupRankRelations extends Object
|
|||||||
|
|
||||||
var config array<RankRelation> Relation;
|
var config array<RankRelation> Relation;
|
||||||
|
|
||||||
|
public static function InitConfig(int ConfigVersion)
|
||||||
|
{
|
||||||
|
local RankRelation ExampleSteamGroup;
|
||||||
|
|
||||||
|
`callstack_static("InitConfig");
|
||||||
|
|
||||||
|
switch (ConfigVersion)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
// Example steam group
|
||||||
|
ExampleSteamGroup.ObjectID = "103582791465384046"; // MSK-GS SteamID64
|
||||||
|
ExampleSteamGroup.RankID = 1;
|
||||||
|
default.Relation.AddItem(ExampleSteamGroup);
|
||||||
|
|
||||||
|
case 2147483647:
|
||||||
|
StaticSaveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DefaultProperties
|
DefaultProperties
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -9,6 +9,21 @@ var config string Rank;
|
|||||||
var config ColorRGBA TextColor;
|
var config ColorRGBA TextColor;
|
||||||
var config Fields ApplyColorToFields;
|
var config Fields ApplyColorToFields;
|
||||||
|
|
||||||
|
public static function InitConfig(int ConfigVersion)
|
||||||
|
{
|
||||||
|
`callstack_static("InitConfig");
|
||||||
|
|
||||||
|
switch (ConfigVersion)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
WriteSettings(DefaultSettings());
|
||||||
|
|
||||||
|
case 2147483647:
|
||||||
|
StaticSaveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static function YASSettingsAdmin DefaultSettings()
|
public static function YASSettingsAdmin DefaultSettings()
|
||||||
{
|
{
|
||||||
local YASSettingsAdmin Settings;
|
local YASSettingsAdmin Settings;
|
||||||
@ -38,8 +53,6 @@ public static function WriteSettings(YASSettingsAdmin Settings)
|
|||||||
default.Rank = Settings.Rank;
|
default.Rank = Settings.Rank;
|
||||||
default.TextColor = Settings.TextColor;
|
default.TextColor = Settings.TextColor;
|
||||||
default.ApplyColorToFields = Settings.ApplyColorToFields;
|
default.ApplyColorToFields = Settings.ApplyColorToFields;
|
||||||
|
|
||||||
StaticSaveConfig();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultProperties
|
DefaultProperties
|
||||||
|
@ -9,6 +9,21 @@ var config string Rank;
|
|||||||
var config ColorRGBA TextColor;
|
var config ColorRGBA TextColor;
|
||||||
var config Fields ApplyColorToFields;
|
var config Fields ApplyColorToFields;
|
||||||
|
|
||||||
|
public static function InitConfig(int ConfigVersion)
|
||||||
|
{
|
||||||
|
`callstack_static("InitConfig");
|
||||||
|
|
||||||
|
switch (ConfigVersion)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
WriteSettings(DefaultSettings());
|
||||||
|
|
||||||
|
case 2147483647:
|
||||||
|
StaticSaveConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static function YASSettingsPlayer DefaultSettings()
|
public static function YASSettingsPlayer DefaultSettings()
|
||||||
{
|
{
|
||||||
local YASSettingsPlayer Settings;
|
local YASSettingsPlayer Settings;
|
||||||
@ -38,8 +53,6 @@ public static function WriteSettings(YASSettingsPlayer Settings)
|
|||||||
default.Rank = Settings.Rank;
|
default.Rank = Settings.Rank;
|
||||||
default.TextColor = Settings.TextColor;
|
default.TextColor = Settings.TextColor;
|
||||||
default.ApplyColorToFields = Settings.ApplyColorToFields;
|
default.ApplyColorToFields = Settings.ApplyColorToFields;
|
||||||
|
|
||||||
StaticSaveConfig();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultProperties
|
DefaultProperties
|
||||||
|
@ -101,40 +101,45 @@ struct YASSettingsPlayer
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct YASSettingsState
|
struct YASSettingsHealth
|
||||||
{
|
{
|
||||||
var bool Dynamic;
|
|
||||||
var int Low;
|
var int Low;
|
||||||
var int High;
|
var int High;
|
||||||
|
|
||||||
StructDefaultProperties
|
StructDefaultProperties
|
||||||
{
|
{
|
||||||
Dynamic = True
|
Low = 40
|
||||||
Low = 40
|
High = 80
|
||||||
High = 80
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct YASSettingsArmor
|
||||||
|
{
|
||||||
|
var int Low;
|
||||||
|
var int High;
|
||||||
|
|
||||||
|
StructDefaultProperties
|
||||||
|
{
|
||||||
|
Low = 40
|
||||||
|
High = 80
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct YASSettingsPing
|
struct YASSettingsPing
|
||||||
{
|
{
|
||||||
var bool Dynamic;
|
|
||||||
var int Low;
|
var int Low;
|
||||||
var int High;
|
var int High;
|
||||||
var bool ShowPingBars;
|
|
||||||
|
|
||||||
StructDefaultProperties
|
StructDefaultProperties
|
||||||
{
|
{
|
||||||
Dynamic = True
|
Low = 60
|
||||||
Low = 60
|
High = 120
|
||||||
High = 120
|
|
||||||
ShowPingBars = True
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct YASSettingsLevel
|
struct YASSettingsLevel
|
||||||
{
|
{
|
||||||
var bool Dynamic;
|
var int Low [4];
|
||||||
var int Low[4];
|
|
||||||
var int High[4];
|
var int High[4];
|
||||||
|
|
||||||
StructDefaultProperties
|
StructDefaultProperties
|
||||||
@ -153,6 +158,7 @@ struct YASSettingsLevel
|
|||||||
|
|
||||||
struct YASStyle
|
struct YASStyle
|
||||||
{
|
{
|
||||||
|
// Box shapes
|
||||||
var int EdgeSize;
|
var int EdgeSize;
|
||||||
var int ShapeServerNameBox;
|
var int ShapeServerNameBox;
|
||||||
var int ShapeGameInfoBox;
|
var int ShapeGameInfoBox;
|
||||||
@ -169,63 +175,122 @@ struct YASStyle
|
|||||||
var int ShapeStatsBoxMidPlayer;
|
var int ShapeStatsBoxMidPlayer;
|
||||||
var int ShapeStatsBoxBottomPlayer;
|
var int ShapeStatsBoxBottomPlayer;
|
||||||
|
|
||||||
|
// Server box
|
||||||
var ColorRGBA ServerNameBoxColor;
|
var ColorRGBA ServerNameBoxColor;
|
||||||
var ColorRGBA ServerNameTextColor;
|
var ColorRGBA ServerNameTextColor;
|
||||||
|
|
||||||
|
// Game info box
|
||||||
var ColorRGBA GameInfoBoxColor;
|
var ColorRGBA GameInfoBoxColor;
|
||||||
var ColorRGBA GameInfoTextColor;
|
var ColorRGBA GameInfoTextColor;
|
||||||
|
|
||||||
|
// Wave info box
|
||||||
var ColorRGBA WaveBoxColor;
|
var ColorRGBA WaveBoxColor;
|
||||||
var ColorRGBA WaveTextColor;
|
var ColorRGBA WaveTextColor;
|
||||||
|
|
||||||
|
// Player count box
|
||||||
var ColorRGBA PlayerCountBoxColor;
|
var ColorRGBA PlayerCountBoxColor;
|
||||||
var ColorRGBA PlayerCountTextColor;
|
var ColorRGBA PlayerCountTextColor;
|
||||||
|
|
||||||
|
// Header box
|
||||||
var ColorRGBA ListHeaderBoxColor;
|
var ColorRGBA ListHeaderBoxColor;
|
||||||
var ColorRGBA ListHeaderTextColor;
|
var ColorRGBA ListHeaderTextColor;
|
||||||
|
|
||||||
var ColorRGBA LeftStateBoxColor;
|
// State box
|
||||||
var ColorRGBA LeftStateBoxColorDead;
|
var ColorRGBA StateBoxColorLobby;
|
||||||
var ColorRGBA LeftStateBoxColorLow;
|
var ColorRGBA StateBoxColorReady;
|
||||||
var ColorRGBA LeftStateBoxColorMid;
|
var ColorRGBA StateBoxColorNotReady;
|
||||||
var ColorRGBA LeftStateBoxColorHigh;
|
var ColorRGBA StateBoxColorSpectator;
|
||||||
|
var ColorRGBA StateBoxColorDead;
|
||||||
|
var ColorRGBA StateBoxColorHPLow;
|
||||||
|
var ColorRGBA StateBoxColorHPMid;
|
||||||
|
var ColorRGBA StateBoxColorHPHigh;
|
||||||
|
var ColorRGBA StateBoxColorArmorLow;
|
||||||
|
var ColorRGBA StateBoxColorArmorMid;
|
||||||
|
var ColorRGBA StateBoxColorArmorHigh;
|
||||||
|
|
||||||
|
// Player box
|
||||||
var ColorRGBA PlayerOwnerBoxColor;
|
var ColorRGBA PlayerOwnerBoxColor;
|
||||||
var ColorRGBA PlayerBoxColor;
|
var ColorRGBA PlayerBoxColor;
|
||||||
|
|
||||||
|
// Stats box
|
||||||
|
var ColorRGBA StatsOwnerBoxColor;
|
||||||
var ColorRGBA StatsBoxColor;
|
var ColorRGBA StatsBoxColor;
|
||||||
|
|
||||||
var ColorRGBA RankTextColor;
|
// State text
|
||||||
var ColorRGBA ZedTextColor;
|
|
||||||
var ColorRGBA PerkTextColor;
|
|
||||||
var ColorRGBA LevelTextColor;
|
|
||||||
var ColorRGBA PlayerNameTextColor;
|
|
||||||
var ColorRGBA KillsTextColor;
|
|
||||||
var ColorRGBA AssistsTextColor;
|
|
||||||
var ColorRGBA DoshTextColor;
|
|
||||||
var ColorRGBA StateTextColor;
|
|
||||||
var ColorRGBA PingTextColor;
|
|
||||||
|
|
||||||
var ColorRGBA LevelTextColorLow;
|
|
||||||
var ColorRGBA LevelTextColorMid;
|
|
||||||
var ColorRGBA LevelTextColorHigh;
|
|
||||||
|
|
||||||
var ColorRGBA StateTextColorLobby;
|
var ColorRGBA StateTextColorLobby;
|
||||||
var ColorRGBA StateTextColorReady;
|
var ColorRGBA StateTextColorReady;
|
||||||
var ColorRGBA StateTextColorNotReady;
|
var ColorRGBA StateTextColorNotReady;
|
||||||
var ColorRGBA StateTextColorSpectator;
|
var ColorRGBA StateTextColorSpectator;
|
||||||
var ColorRGBA StateTextColorDead;
|
var ColorRGBA StateTextColorDead;
|
||||||
var ColorRGBA StateTextColorLowHP;
|
var ColorRGBA StateTextColorHPLow;
|
||||||
var ColorRGBA StateTextColorMidHP;
|
var ColorRGBA StateTextColorHPMid;
|
||||||
var ColorRGBA StateTextColorHighHP;
|
var ColorRGBA StateTextColorHPHigh;
|
||||||
|
var ColorRGBA StateTextColorArmorLow;
|
||||||
|
var ColorRGBA StateTextColorArmorMid;
|
||||||
|
var ColorRGBA StateTextColorArmorHigh;
|
||||||
|
|
||||||
|
// Rank text
|
||||||
|
var ColorRGBA RankTextColor;
|
||||||
|
|
||||||
|
// Player text
|
||||||
|
var ColorRGBA PlayerNameTextColor;
|
||||||
|
|
||||||
|
// Level text
|
||||||
|
var ColorRGBA LevelTextColorLow;
|
||||||
|
var ColorRGBA LevelTextColorMid;
|
||||||
|
var ColorRGBA LevelTextColorHigh;
|
||||||
|
|
||||||
|
// Perk text
|
||||||
|
var ColorRGBA ZedTextColor;
|
||||||
|
var ColorRGBA PerkNoneTextColor;
|
||||||
|
var ColorRGBA PerkBerserkerTextColor;
|
||||||
|
var ColorRGBA PerkCommandoTextColor;
|
||||||
|
var ColorRGBA PerkSupportTextColor;
|
||||||
|
var ColorRGBA PerkFieldMedicTextColor;
|
||||||
|
var ColorRGBA PerkDemolitionistTextColor;
|
||||||
|
var ColorRGBA PerkFirebugTextColor;
|
||||||
|
var ColorRGBA PerkGunslingerTextColor;
|
||||||
|
var ColorRGBA PerkSharpshooterTextColor;
|
||||||
|
var ColorRGBA PerkSwatTextColor;
|
||||||
|
var ColorRGBA PerkSurvivalistTextColor;
|
||||||
|
|
||||||
|
// Dosh text
|
||||||
|
var ColorRGBA DoshTextColorLow;
|
||||||
|
var ColorRGBA DoshTextColorMid;
|
||||||
|
var ColorRGBA DoshTextColorHigh;
|
||||||
|
|
||||||
|
// Kills text
|
||||||
|
var ColorRGBA KillsTextColorLow;
|
||||||
|
var ColorRGBA KillsTextColorMid;
|
||||||
|
var ColorRGBA KillsTextColorHigh;
|
||||||
|
|
||||||
|
// Assists text
|
||||||
|
var ColorRGBA AssistsTextColorLow;
|
||||||
|
var ColorRGBA AssistsTextColorMid;
|
||||||
|
var ColorRGBA AssistsTextColorHigh;
|
||||||
|
|
||||||
|
// Ping text
|
||||||
var ColorRGBA PingTextColorLow;
|
var ColorRGBA PingTextColorLow;
|
||||||
var ColorRGBA PingTextColorMid;
|
var ColorRGBA PingTextColorMid;
|
||||||
var ColorRGBA PingTextColorHigh;
|
var ColorRGBA PingTextColorHigh;
|
||||||
|
|
||||||
|
// Other settings
|
||||||
|
var bool bShowPingBars;
|
||||||
|
var bool bHealthBoxSmoothColorChange;
|
||||||
|
var bool bArmorBoxSmoothColorChange;
|
||||||
|
var bool bHealthTextSmoothColorChange;
|
||||||
|
var bool bArmorTextSmoothColorChange;
|
||||||
|
var bool bLevelTextSmoothColorChange;
|
||||||
|
var bool bDoshTextSmoothColorChange;
|
||||||
|
var bool bKillsTextSmoothColorChange;
|
||||||
|
var bool bAssistsTextSmoothColorChange;
|
||||||
|
var bool bPingTextSmoothColorChange;
|
||||||
|
|
||||||
StructDefaultProperties
|
StructDefaultProperties
|
||||||
{
|
{
|
||||||
EdgeSize = 8
|
EdgeSize = 8
|
||||||
|
|
||||||
|
// Box shapes
|
||||||
ShapeServerNameBox = 150
|
ShapeServerNameBox = 150
|
||||||
ShapeGameInfoBox = 151
|
ShapeGameInfoBox = 151
|
||||||
ShapeWaveInfoBox = 0
|
ShapeWaveInfoBox = 0
|
||||||
@ -241,68 +306,128 @@ struct YASStyle
|
|||||||
ShapeStatsBoxMidPlayer = 153
|
ShapeStatsBoxMidPlayer = 153
|
||||||
ShapeStatsBoxBottomPlayer = 153
|
ShapeStatsBoxBottomPlayer = 153
|
||||||
|
|
||||||
ServerNameBoxColor = (R=75, G=0, B=0, A=200)
|
// Server box
|
||||||
ServerNameTextColor = (R=250, G=250, B=250, A=255)
|
ServerNameBoxColor = (R=75, G=0, B=0, A=200)
|
||||||
|
ServerNameTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
|
||||||
GameInfoBoxColor = (R=30, G=30, B=30, A=200)
|
// Game info box
|
||||||
GameInfoTextColor = (R=250, G=250, B=250, A=255)
|
GameInfoBoxColor = (R=30, G=30, B=30, A=200)
|
||||||
|
GameInfoTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
|
||||||
WaveBoxColor = (R=10, G=10, B=10, A=200)
|
// Wave info box
|
||||||
WaveTextColor = (R=250, G=250, B=250, A=255)
|
WaveBoxColor = (R=10, G=10, B=10, A=200)
|
||||||
|
WaveTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
|
||||||
PlayerCountBoxColor = (R=75, G=0, B=0, A=200)
|
// Player count box
|
||||||
PlayerCountTextColor = (R=250, G=250, B=250, A=255)
|
PlayerCountBoxColor = (R=75, G=0, B=0, A=200)
|
||||||
|
PlayerCountTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
|
||||||
ListHeaderBoxColor = (R=10, G=10, B=10, A=200)
|
// Header box
|
||||||
ListHeaderTextColor = (R=250, G=250, B=250, A=255)
|
ListHeaderBoxColor = (R=10, G=10, B=10, A=200)
|
||||||
|
ListHeaderTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
|
||||||
LeftStateBoxColor = (R=150, G=150, B=150, A=150)
|
// State box
|
||||||
LeftStateBoxColorDead = (R=200, G=0, B=0, A=150)
|
StateBoxColorLobby = (R=150, G=150, B=150, A=150)
|
||||||
LeftStateBoxColorLow = (R=200, G=50, B=50, A=150)
|
StateBoxColorReady = (R=150, G=150, B=150, A=150)
|
||||||
LeftStateBoxColorMid = (R=200, G=200, B=0, A=150)
|
StateBoxColorNotReady = (R=150, G=150, B=150, A=150)
|
||||||
LeftStateBoxColorHigh = (R=0, G=200, B=0, A=150)
|
StateBoxColorSpectator = (R=150, G=150, B=150, A=150)
|
||||||
|
StateBoxColorDead = (R=200, G=0, B=0, A=150)
|
||||||
|
StateBoxColorHPLow = (R=200, G=50, B=50, A=150)
|
||||||
|
StateBoxColorHPMid = (R=200, G=200, B=0, A=150)
|
||||||
|
StateBoxColorHPHigh = (R=0, G=200, B=0, A=150)
|
||||||
|
StateBoxColorArmorLow = (R=0, G=0, B=150, A=150)
|
||||||
|
StateBoxColorArmorMid = (R=0, G=0, B=150, A=150)
|
||||||
|
StateBoxColorArmorHigh = (R=0, G=0, B=150, A=150)
|
||||||
|
|
||||||
PlayerOwnerBoxColor = (R=100, G=10, B=10, A=150)
|
// Player box
|
||||||
PlayerBoxColor = (R=30, G=30, B=30, A=150)
|
PlayerOwnerBoxColor = (R=100, G=10, B=10, A=150)
|
||||||
StatsBoxColor = (R=10, G=10, B=10, A=150)
|
PlayerBoxColor = (R=30, G=30, B=30, A=150)
|
||||||
|
|
||||||
RankTextColor = (R=250, G=250, B=250, A=255)
|
// Stats box
|
||||||
ZedTextColor = (R=255, G=0, B=0, A=255)
|
StatsOwnerBoxColor = (R=10, G=10, B=10, A=150)
|
||||||
PerkTextColor = (R=250, G=250, B=250, A=255)
|
StatsBoxColor = (R=10, G=10, B=10, A=150)
|
||||||
LevelTextColor = (R=250, G=250, B=250, A=255)
|
|
||||||
PlayerNameTextColor = (R=250, G=250, B=250, A=255)
|
|
||||||
KillsTextColor = (R=250, G=250, B=250, A=255)
|
|
||||||
AssistsTextColor = (R=250, G=250, B=250, A=255)
|
|
||||||
DoshTextColor = (R=250, G=250, B=100, A=255)
|
|
||||||
StateTextColor = (R=150, G=150, B=150, A=150)
|
|
||||||
PingTextColor = (R=250, G=250, B=250, A=255)
|
|
||||||
|
|
||||||
LevelTextColorLow = (R=250, G=100, B=100, A=255)
|
// State text
|
||||||
LevelTextColorMid = (R=250, G=250, B=0, A=255)
|
StateTextColorLobby = (R=150, G=150, B=150, A=150)
|
||||||
LevelTextColorHigh = (R=0, G=250, B=0, A=255)
|
StateTextColorReady = (R=150, G=150, B=150, A=150)
|
||||||
|
StateTextColorNotReady = (R=150, G=150, B=150, A=150)
|
||||||
|
StateTextColorSpectator = (R=150, G=150, B=150, A=150)
|
||||||
|
StateTextColorDead = (R=250, G=0, B=0, A=255)
|
||||||
|
StateTextColorLowHP = (R=250, G=250, B=250, A=255)
|
||||||
|
StateTextColorMidHP = (R=250, G=250, B=250, A=255)
|
||||||
|
StateTextColorHighHP = (R=250, G=250, B=250, A=255)
|
||||||
|
StateTextColorArmorLow = (R=250, G=250, B=250, A=255)
|
||||||
|
StateTextColorArmorMid = (R=250, G=250, B=250, A=255)
|
||||||
|
StateTextColorArmorHigh = (R=250, G=250, B=250, A=255)
|
||||||
|
|
||||||
StateTextColorLobby = (R=150, G=150, B=150, A=150)
|
// Rank text
|
||||||
StateTextColorReady = (R=150, G=150, B=150, A=150)
|
RankTextColor = (R=250, G=250, B=250, A=255)
|
||||||
StateTextColorNotReady = (R=150, G=150, B=150, A=150)
|
|
||||||
StateTextColorSpectator = (R=150, G=150, B=150, A=150)
|
|
||||||
StateTextColorDead = (R=250, G=0, B=0, A=255)
|
|
||||||
StateTextColorLowHP = (R=250, G=100, B=100, A=255)
|
|
||||||
StateTextColorMidHP = (R=250, G=250, B=0, A=255)
|
|
||||||
StateTextColorHighHP = (R=0, G=250, B=0, A=255)
|
|
||||||
|
|
||||||
PingTextColorLow = (R=0, G=250, B=0, A=255)
|
// Player text
|
||||||
PingTextColorMid = (R=250, G=250, B=0, A=255)
|
PlayerNameTextColor = (R=250, G=250, B=250, A=255)
|
||||||
PingTextColorHigh = (R=250, G=0, B=0, A=255)
|
|
||||||
|
// Level text
|
||||||
|
LevelTextColorLow = (R=250, G=100, B=100, A=255)
|
||||||
|
LevelTextColorMid = (R=250, G=250, B=0, A=255)
|
||||||
|
LevelTextColorHigh = (R=0, G=250, B=0, A=255)
|
||||||
|
|
||||||
|
// Perk text
|
||||||
|
ZedTextColor = (R=255, G=0, B=0, A=255)
|
||||||
|
PerkNoneTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
PerkBerserkerTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
PerkCommandoTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
PerkSupportTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
PerkFieldMedicTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
PerkDemolitionistTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
PerkFirebugTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
PerkGunslingerTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
PerkSharpshooterTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
PerkSwatTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
PerkSurvivalistTextColor = (R=250, G=250, B=250, A=255)
|
||||||
|
|
||||||
|
// Dosh text
|
||||||
|
DoshTextColorLow = (R=250, G=250, B=100, A=255)
|
||||||
|
DoshTextColorMid = (R=250, G=250, B=100, A=255)
|
||||||
|
DoshTextColorHigh = (R=250, G=250, B=100, A=255)
|
||||||
|
|
||||||
|
// Kills text
|
||||||
|
KillsTextColorLow = (R=250, G=250, B=250, A=255)
|
||||||
|
KillsTextColorMid = (R=250, G=250, B=250, A=255)
|
||||||
|
KillsTextColorHigh = (R=250, G=250, B=250, A=255)
|
||||||
|
|
||||||
|
// Assists text
|
||||||
|
AssistsTextColorLow = (R=250, G=250, B=250, A=255)
|
||||||
|
AssistsTextColorMid = (R=250, G=250, B=250, A=255)
|
||||||
|
AssistsTextColorHigh = (R=250, G=250, B=250, A=255)
|
||||||
|
|
||||||
|
// Ping text
|
||||||
|
PingTextColorNone = (R=250, G=250, B=250, A=255)
|
||||||
|
PingTextColorLow = (R=0, G=250, B=0, A=255)
|
||||||
|
PingTextColorMid = (R=250, G=250, B=0, A=255)
|
||||||
|
PingTextColorHigh = (R=250, G=0, B=0, A=255)
|
||||||
|
|
||||||
|
// Other settings
|
||||||
|
bShowPingBars = true
|
||||||
|
bHealthBoxSmoothColorChange = true
|
||||||
|
bArmorBoxSmoothColorChange = true
|
||||||
|
bHealthTextSmoothColorChange = false
|
||||||
|
bArmorTextSmoothColorChange = false
|
||||||
|
bLevelTextSmoothColorChange = false
|
||||||
|
bDoshTextSmoothColorChange = false
|
||||||
|
bKillsTextSmoothColorChange = false
|
||||||
|
bAssistsTextSmoothColorChange = false
|
||||||
|
bPingTextSmoothColorChange = false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct YASSettings
|
struct YASSettings
|
||||||
{
|
{
|
||||||
var YASStyle Style;
|
var YASStyle Style;
|
||||||
var YASSettingsAdmin Admin;
|
var YASSettingsAdmin Admin;
|
||||||
var YASSettingsPlayer Player;
|
var YASSettingsPlayer Player;
|
||||||
var YASSettingsState State;
|
var YASSettingsPing Ping;
|
||||||
var YASSettingsPing Ping;
|
var YASSettingsLevel Level;
|
||||||
var YASSettingsLevel Level;
|
var YASSettingsHealth Health;
|
||||||
|
var YASSettingsArmor Armor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ class YASMut extends KFMutator
|
|||||||
`include(Build.uci)
|
`include(Build.uci)
|
||||||
`include(Logger.uci)
|
`include(Logger.uci)
|
||||||
|
|
||||||
const CurrentVersion = 1;
|
const CurrentVersion = 2;
|
||||||
|
|
||||||
var config int ConfigVersion;
|
var config int ConfigVersion;
|
||||||
|
|
||||||
@ -39,9 +39,10 @@ function PostBeginPlay()
|
|||||||
Settings.Style = class'ScoreboardStyle'.static.Settings();
|
Settings.Style = class'ScoreboardStyle'.static.Settings();
|
||||||
Settings.Admin = class'SystemAdminRank'.static.Settings();
|
Settings.Admin = class'SystemAdminRank'.static.Settings();
|
||||||
Settings.Player = class'SystemPlayerRank'.static.Settings();
|
Settings.Player = class'SystemPlayerRank'.static.Settings();
|
||||||
Settings.State = class'DynamicStateColor'.static.Settings();
|
Settings.Health = class'SettingsHealth'.static.Settings();
|
||||||
Settings.Ping = class'DynamicPingColor'.static.Settings();
|
Settings.Armor = class'SettingsArmor'.static.Settings();
|
||||||
Settings.Level = class'DynamicLevelColor'.static.Settings();
|
Settings.Ping = class'SettingsPing'.static.Settings();
|
||||||
|
Settings.Level = class'SettingsLevel'.static.Settings();
|
||||||
}
|
}
|
||||||
|
|
||||||
function NotifyLogin(Controller C)
|
function NotifyLogin(Controller C)
|
||||||
@ -69,57 +70,25 @@ private function bool IsUID(String ID)
|
|||||||
|
|
||||||
private function InitConfig()
|
private function InitConfig()
|
||||||
{
|
{
|
||||||
local RankInfo ExampleRank;
|
|
||||||
local RankRelation ExamplePlayer;
|
|
||||||
local RankRelation ExampleSteamGroup;
|
|
||||||
|
|
||||||
`callstack();
|
`callstack();
|
||||||
|
|
||||||
// Update from config version to current version if needed
|
if (ConfigVersion == 0) SaveConfig(); // because I want the main settings to be at the beginning of the config :)
|
||||||
|
|
||||||
|
class'ScoreboardStyle'.static.InitConfig(ConfigVersion);
|
||||||
|
class'SystemAdminRank'.static.InitConfig(ConfigVersion);
|
||||||
|
class'SystemPlayerRank'.static.InitConfig(ConfigVersion);
|
||||||
|
class'SettingsHealth'.static.InitConfig(ConfigVersion);
|
||||||
|
class'SettingsArmor'.static.InitConfig(ConfigVersion);
|
||||||
|
class'SettingsPing'.static.InitConfig(ConfigVersion);
|
||||||
|
class'SettingsLevel'.static.InitConfig(ConfigVersion);
|
||||||
|
class'CustomRanks'.static.InitConfig(ConfigVersion);
|
||||||
|
class'PlayerRankRelations'.static.InitConfig(ConfigVersion);
|
||||||
|
class'SteamGroupRankRelations'.static.InitConfig(ConfigVersion);
|
||||||
|
|
||||||
switch (ConfigVersion)
|
switch (ConfigVersion)
|
||||||
{
|
{
|
||||||
case 0: // which means there is no config right now
|
case 0:
|
||||||
SaveConfig(); // because I want the main settings to be at the beginning of the config :)
|
case 1:
|
||||||
|
|
||||||
class'SystemAdminRank'.static.WriteSettings(class'SystemAdminRank'.static.DefaultSettings());
|
|
||||||
class'SystemPlayerRank'.static.WriteSettings(class'SystemPlayerRank'.static.DefaultSettings());
|
|
||||||
class'ScoreboardStyle'.static.WriteSettings(class'ScoreboardStyle'.static.DefaultSettings());
|
|
||||||
class'DynamicStateColor'.static.WriteSettings(class'DynamicStateColor'.static.DefaultSettings());
|
|
||||||
class'DynamicPingColor'.static.WriteSettings(class'DynamicPingColor'.static.DefaultSettings());
|
|
||||||
class'DynamicLevelColor'.static.WriteSettings(class'DynamicLevelColor'.static.DefaultSettings());
|
|
||||||
|
|
||||||
// Example rank for player(s)
|
|
||||||
ExampleRank.ID = 0;
|
|
||||||
ExampleRank.Rank = "YAS Creator";
|
|
||||||
ExampleRank.TextColor.R = 130;
|
|
||||||
ExampleRank.TextColor.G = 250;
|
|
||||||
ExampleRank.TextColor.B = 235;
|
|
||||||
ExampleRank.OverrideAdminRank = true;
|
|
||||||
class'CustomRanks'.default.Rank.AddItem(ExampleRank);
|
|
||||||
|
|
||||||
// Example player
|
|
||||||
ExamplePlayer.ObjectID = "76561198001617867"; // GenZmeY SteamID64
|
|
||||||
ExamplePlayer.RankID = ExampleRank.ID;
|
|
||||||
class'PlayerRankRelations'.default.Relation.AddItem(ExamplePlayer);
|
|
||||||
|
|
||||||
// Example rank for steam group members
|
|
||||||
ExampleRank.ID = 1;
|
|
||||||
ExampleRank.Rank = "MSK-GS";
|
|
||||||
ExampleRank.TextColor.R = 130;
|
|
||||||
ExampleRank.TextColor.G = 250;
|
|
||||||
ExampleRank.TextColor.B = 130;
|
|
||||||
ExampleRank.OverrideAdminRank = false;
|
|
||||||
class'CustomRanks'.default.Rank.AddItem(ExampleRank);
|
|
||||||
|
|
||||||
// Example steam group
|
|
||||||
ExampleSteamGroup.ObjectID = "103582791465384046"; // MSK-GS SteamID64
|
|
||||||
ExampleSteamGroup.RankID = ExampleRank.ID;
|
|
||||||
class'SteamGroupRankRelations'.default.Relation.AddItem(ExampleSteamGroup);
|
|
||||||
|
|
||||||
class'CustomRanks'.static.StaticSaveConfig();
|
|
||||||
class'PlayerRankRelations'.static.StaticSaveConfig();
|
|
||||||
class'SteamGroupRankRelations'.static.StaticSaveConfig();
|
|
||||||
|
|
||||||
case 2147483647:
|
case 2147483647:
|
||||||
`info("Config updated to version"@CurrentVersion);
|
`info("Config updated to version"@CurrentVersion);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user