fix warnings

This commit is contained in:
GenZmeY 2021-06-07 04:42:49 +03:00
parent 0430b5db54
commit 2732facdb8
6 changed files with 61 additions and 48 deletions

View File

@ -22,11 +22,11 @@ var array<PlayerGroupEntry> PlayerGroups;
var array<UIDInfoEntry> PlayerInfos; var array<UIDInfoEntry> PlayerInfos;
var string SystemAdminRank; var string SystemAdminRank;
var TextColor SystemAdminColor; var ColorRGB SystemAdminColor;
var Fields SystemAdminApplyColorToFields; var Fields SystemAdminApplyColorToFields;
var string SystemPlayerRank; var string SystemPlayerRank;
var TextColor SystemPlayerColor; var ColorRGB SystemPlayerColor;
var Fields SystemPlayerApplyColorToFields; var Fields SystemPlayerApplyColorToFields;
function InitMenu() function InitMenu()
@ -349,7 +349,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
if (!HasGroup || (HasGroup && !Group.OverrideAdminRank)) if (!HasGroup || (HasGroup && !Group.OverrideAdminRank))
{ {
Group.Rank = SystemAdminRank; Group.Rank = SystemAdminRank;
Group.Color = SystemAdminColor; Group.TextColor = SystemAdminColor;
Group.ApplyColorToFields = SystemAdminApplyColorToFields; Group.ApplyColorToFields = SystemAdminApplyColorToFields;
HasGroup = true; HasGroup = true;
} }
@ -359,7 +359,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
if (!HasGroup) if (!HasGroup)
{ {
Group.Rank = SystemPlayerRank; Group.Rank = SystemPlayerRank;
Group.Color = SystemPlayerColor; Group.TextColor = SystemPlayerColor;
Group.ApplyColorToFields = SystemPlayerApplyColorToFields; Group.ApplyColorToFields = SystemPlayerApplyColorToFields;
HasGroup = true; HasGroup = true;
} }
@ -437,7 +437,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
// Rank // Rank
if (Group.ApplyColorToFields.Rank) if (Group.ApplyColorToFields.Rank)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
S = Group.Rank; S = Group.Rank;
DrawTextShadowHLeftVCenter(S, RankXPos, TextYOffset, FontScalar); DrawTextShadowHLeftVCenter(S, RankXPos, TextYOffset, FontScalar);
C.SetDrawColor(250,250,250,255); C.SetDrawColor(250,250,250,255);
@ -447,7 +447,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
{ {
C.SetDrawColor(255,0,0,255); C.SetDrawColor(255,0,0,255);
if (Group.ApplyColorToFields.Perk) if (Group.ApplyColorToFields.Perk)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
C.SetPos (PerkXPos, YOffset - ((Height-5) * 0.5f)); C.SetPos (PerkXPos, YOffset - ((Height-5) * 0.5f));
C.DrawRect (Height-5, Height-5, Texture2D'UI_Widgets.MenuBarWidget_SWF_IF'); C.DrawRect (Height-5, Height-5, Texture2D'UI_Widgets.MenuBarWidget_SWF_IF');
@ -483,7 +483,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
C.SetDrawColor(250,250,250,255); C.SetDrawColor(250,250,250,255);
if (Group.ApplyColorToFields.Perk) if (Group.ApplyColorToFields.Perk)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
S = Level@KFPRI.CurrentPerkClass.default.PerkName; S = Level@KFPRI.CurrentPerkClass.default.PerkName;
DrawTextShadowHLeftVCenter(S, PerkXPos, TextYOffset, FontScalar); DrawTextShadowHLeftVCenter(S, PerkXPos, TextYOffset, FontScalar);
} }
@ -491,7 +491,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
{ {
C.SetDrawColor(250,250,250,255); C.SetDrawColor(250,250,250,255);
if (Group.ApplyColorToFields.Perk) if (Group.ApplyColorToFields.Perk)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
S = "No Perk"; S = "No Perk";
DrawTextShadowHLeftVCenter(S, PerkXPos, TextYOffset, FontScalar); DrawTextShadowHLeftVCenter(S, PerkXPos, TextYOffset, FontScalar);
} }
@ -515,7 +515,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
// Player // Player
if (Group.ApplyColorToFields.Player) if (Group.ApplyColorToFields.Player)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
if( Len(KFPRI.PlayerName) > 25 ) if( Len(KFPRI.PlayerName) > 25 )
S = Left(KFPRI.PlayerName, 25); S = Left(KFPRI.PlayerName, 25);
else S = KFPRI.PlayerName; else S = KFPRI.PlayerName;
@ -525,13 +525,13 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
// Kill // Kill
if (Group.ApplyColorToFields.Kills) if (Group.ApplyColorToFields.Kills)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
DrawTextShadowHVCenter(string (KFPRI.Kills), KillsXPos, TextYOffset, KillsWBox, FontScalar); DrawTextShadowHVCenter(string (KFPRI.Kills), KillsXPos, TextYOffset, KillsWBox, FontScalar);
C.SetDrawColor(250,250,250,255); C.SetDrawColor(250,250,250,255);
// Assist // Assist
if (Group.ApplyColorToFields.Assists) if (Group.ApplyColorToFields.Assists)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
DrawTextShadowHVCenter(string (KFPRI.Assists), AssistXPos, TextYOffset, AssistWBox, FontScalar); DrawTextShadowHVCenter(string (KFPRI.Assists), AssistXPos, TextYOffset, AssistWBox, FontScalar);
C.SetDrawColor(250,250,250,255); C.SetDrawColor(250,250,250,255);
@ -547,7 +547,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
StrValue = GetNiceSize(int(KFPRI.Score)); StrValue = GetNiceSize(int(KFPRI.Score));
} }
if (Group.ApplyColorToFields.Dosh) if (Group.ApplyColorToFields.Dosh)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
DrawTextShadowHVCenter(StrValue, CashXPos, TextYOffset, CashWBox, FontScalar); DrawTextShadowHVCenter(StrValue, CashXPos, TextYOffset, CashWBox, FontScalar);
C.SetDrawColor(250,250,250,255); C.SetDrawColor(250,250,250,255);
@ -586,7 +586,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
} }
if (Group.ApplyColorToFields.Health) if (Group.ApplyColorToFields.Health)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
DrawTextShadowHVCenter(S, HealthXPos, TextYOffset, HealthWBox, FontScalar); DrawTextShadowHVCenter(S, HealthXPos, TextYOffset, HealthWBox, FontScalar);
C.SetDrawColor(250,250,250,255); C.SetDrawColor(250,250,250,255);
@ -609,7 +609,7 @@ function DrawPlayerEntry( Canvas C, int Index, float YOffset, float Height, floa
C.TextSize(MaxPing, XL, YL, FontScalar, FontScalar); C.TextSize(MaxPing, XL, YL, FontScalar, FontScalar);
if (Group.ApplyColorToFields.Ping) if (Group.ApplyColorToFields.Ping)
C.SetDrawColor(Group.Color.R,Group.Color.G,Group.Color.B,255); C.SetDrawColor(Group.TextColor.R,Group.TextColor.G,Group.TextColor.B,255);
DrawTextShadowHVCenter(S, PingXPos, TextYOffset, PingWBox/2, FontScalar); DrawTextShadowHVCenter(S, PingXPos, TextYOffset, PingWBox/2, FontScalar);
C.SetDrawColor(250,250,250,255); C.SetDrawColor(250,250,250,255);

View File

@ -52,43 +52,43 @@ private function InitConfig()
SaveConfig(); // because I want the main settings to be at the beginning of the config :) SaveConfig(); // because I want the main settings to be at the beginning of the config :)
// Default admin rank // Default admin rank
class'SystemAdminGroup'.default.Rank = "Admin"; class'SystemAdminGroup'.default.Rank = "Admin";
class'SystemAdminGroup'.default.Color.R = 250; class'SystemAdminGroup'.default.TextColor.R = 250;
class'SystemAdminGroup'.default.Color.G = 0; class'SystemAdminGroup'.default.TextColor.G = 0;
class'SystemAdminGroup'.default.Color.B = 0; class'SystemAdminGroup'.default.TextColor.B = 0;
// Default player rank // Default player rank
class'SystemPlayerGroup'.default.Rank = "Player"; class'SystemPlayerGroup'.default.Rank = "Player";
class'SystemPlayerGroup'.default.Color.R = 250; class'SystemPlayerGroup'.default.TextColor.R = 250;
class'SystemPlayerGroup'.default.Color.G = 250; class'SystemPlayerGroup'.default.TextColor.G = 250;
class'SystemPlayerGroup'.default.Color.B = 250; class'SystemPlayerGroup'.default.TextColor.B = 250;
// Example rank for player(s) // Example rank for player(s)
ExampleGroup.ID = 0; ExampleGroup.ID = 0;
ExampleGroup.Rank = "SCE Creator"; ExampleGroup.Rank = "SCE Creator";
ExampleGroup.Color.R = 130; ExampleGroup.TextColor.R = 130;
ExampleGroup.Color.G = 250; ExampleGroup.TextColor.G = 250;
ExampleGroup.Color.B = 235; ExampleGroup.TextColor.B = 235;
ExampleGroup.OverrideAdminRank = true; ExampleGroup.OverrideAdminRank = true;
class'PlayerGroups'.default.PlayerGroup.AddItem(ExampleGroup); class'PlayerGroups'.default.PlayerGroup.AddItem(ExampleGroup);
// Example player // Example player
ExamplePlayer.PlayerID = "76561198001617867"; // GenZmeY SteamID64 ExamplePlayer.PlayerID = "76561198001617867"; // GenZmeY SteamID64
ExamplePlayer.GroupID = ExampleGroup.ID; ExamplePlayer.GroupID = ExampleGroup.ID;
class'PlayerInfos'.default.PlayerInfo.AddItem(ExamplePlayer); class'PlayerInfos'.default.PlayerInfo.AddItem(ExamplePlayer);
// Example rank for steam group members // Example rank for steam group members
ExampleGroup.ID = 1; ExampleGroup.ID = 1;
ExampleGroup.Rank = "[MSK-GS]"; ExampleGroup.Rank = "[MSK-GS]";
ExampleGroup.Color.R = 130; ExampleGroup.TextColor.R = 130;
ExampleGroup.Color.G = 250; ExampleGroup.TextColor.G = 250;
ExampleGroup.Color.B = 130; ExampleGroup.TextColor.B = 130;
ExampleGroup.OverrideAdminRank = false; ExampleGroup.OverrideAdminRank = false;
class'PlayerGroups'.default.PlayerGroup.AddItem(ExampleGroup); class'PlayerGroups'.default.PlayerGroup.AddItem(ExampleGroup);
// Example steam group // Example steam group
ExampleSteamGroup.SteamGroupID = "103582791465384046"; // MSK-GS SteamID64 ExampleSteamGroup.SteamGroupID = "103582791465384046"; // MSK-GS SteamID64
ExampleSteamGroup.GroupID = ExampleGroup.ID; ExampleSteamGroup.GroupID = ExampleGroup.ID;
class'SteamGroups'.default.SteamGroup.AddItem(ExampleSteamGroup); class'SteamGroups'.default.SteamGroup.AddItem(ExampleSteamGroup);
class'SystemAdminGroup'.static.StaticSaveConfig(); class'SystemAdminGroup'.static.StaticSaveConfig();
@ -156,10 +156,10 @@ function AddPlayerInfo(Controller C)
RepClient.RepInfo.PlayerInfos = UIDInfos; RepClient.RepInfo.PlayerInfos = UIDInfos;
RepClient.RepInfo.PlayerGroups = class'PlayerGroups'.default.PlayerGroup; RepClient.RepInfo.PlayerGroups = class'PlayerGroups'.default.PlayerGroup;
RepClient.RepInfo.SystemAdminRank = class'SystemAdminGroup'.default.Rank; RepClient.RepInfo.SystemAdminRank = class'SystemAdminGroup'.default.Rank;
RepClient.RepInfo.SystemAdminColor = class'SystemAdminGroup'.default.Color; RepClient.RepInfo.SystemAdminColor = class'SystemAdminGroup'.default.TextColor;
RepClient.RepInfo.SystemAdminApplyColorToFields = class'SystemAdminGroup'.default.ApplyColorToFields; RepClient.RepInfo.SystemAdminApplyColorToFields = class'SystemAdminGroup'.default.ApplyColorToFields;
RepClient.RepInfo.SystemPlayerRank = class'SystemPlayerGroup'.default.Rank; RepClient.RepInfo.SystemPlayerRank = class'SystemPlayerGroup'.default.Rank;
RepClient.RepInfo.SystemPlayerColor = class'SystemPlayerGroup'.default.Color; RepClient.RepInfo.SystemPlayerColor = class'SystemPlayerGroup'.default.TextColor;
RepClient.RepInfo.SystemPlayerApplyColorToFields = class'SystemPlayerGroup'.default.ApplyColorToFields; RepClient.RepInfo.SystemPlayerApplyColorToFields = class'SystemPlayerGroup'.default.ApplyColorToFields;
RepClient.RepInfo.ClientStartReplication(); RepClient.RepInfo.ClientStartReplication();

View File

@ -4,11 +4,11 @@ var public array<UIDInfoEntry> PlayerInfos;
var public array<PlayerGroupEntry> PlayerGroups; var public array<PlayerGroupEntry> PlayerGroups;
var public string SystemAdminRank; var public string SystemAdminRank;
var public TextColor SystemAdminColor; var public ColorRGB SystemAdminColor;
var public Fields SystemAdminApplyColorToFields; var public Fields SystemAdminApplyColorToFields;
var public string SystemPlayerRank; var public string SystemPlayerRank;
var public TextColor SystemPlayerColor; var public ColorRGB SystemPlayerColor;
var public Fields SystemPlayerApplyColorToFields; var public Fields SystemPlayerApplyColorToFields;
var private bool SystemFinished, GroupsFinished, InfosFinished; var private bool SystemFinished, GroupsFinished, InfosFinished;
@ -96,10 +96,10 @@ private reliable client final function InfosReplicationFinished()
private reliable client final function ClientInitSystem( private reliable client final function ClientInitSystem(
string _SystemAdminRank, string _SystemAdminRank,
TextColor _SystemAdminColor, ColorRGB _SystemAdminColor,
Fields _SystemAdminApplyColorToFields, Fields _SystemAdminApplyColorToFields,
string _SystemPlayerRank, string _SystemPlayerRank,
TextColor _SystemPlayerColor, ColorRGB _SystemPlayerColor,
Fields _SystemPlayerApplyColorToFields) Fields _SystemPlayerApplyColorToFields)
{ {
SystemAdminRank = _SystemAdminRank; SystemAdminRank = _SystemAdminRank;

View File

@ -3,5 +3,5 @@ class SystemAdminGroup extends Object
config(ScoreboardExt); config(ScoreboardExt);
var config string Rank; var config string Rank;
var config TextColor Color; var config ColorRGB TextColor;
var config Fields ApplyColorToFields; var config Fields ApplyColorToFields;

View File

@ -3,5 +3,5 @@ class SystemPlayerGroup extends Object
config(ScoreboardExt); config(ScoreboardExt);
var config string Rank; var config string Rank;
var config TextColor Color; var config ColorRGB TextColor;
var config Fields ApplyColorToFields; var config Fields ApplyColorToFields;

View File

@ -1,6 +1,6 @@
class Types extends Object; class Types extends Object;
struct TextColor struct ColorRGB
{ {
var byte R, G, B; var byte R, G, B;
@ -12,6 +12,19 @@ struct TextColor
} }
}; };
struct ColorRGBA
{
var byte R, G, B, A;
StructDefaultProperties
{
R=250
G=250
B=250
A=255
}
};
struct Fields struct Fields
{ {
var bool Rank; var bool Rank;
@ -40,7 +53,7 @@ struct PlayerGroupEntry
{ {
var int ID; var int ID;
var string Rank; var string Rank;
var TextColor Color; var ColorRGB TextColor;
var bool OverrideAdminRank; var bool OverrideAdminRank;
var Fields ApplyColorToFields; var Fields ApplyColorToFields;
}; };