This commit is contained in:
GenZmeY 2021-05-16 09:16:12 +03:00
parent a50e1a57ce
commit 938463b4c0
7 changed files with 8 additions and 2276 deletions

View File

@ -1,84 +0,0 @@
class KF1HUD_BossHealthBar extends KFGFxWidget_BossHealthBar;
function TickHud(float DeltaTime)
{
local ScoreboardExtHUD HUD;
HUD = ScoreboardExtHUD(KFPC.MyHUD);
if(KFPC.bHideBossHealthBar != bLastHideValue)
{
bLastHideValue = KFPC.bHideBossHealthBar;
if(KFPC.bHideBossHealthBar && HUD.ScriptedPawn == none)
HUD.bDisplayImportantHealthBar = false;
else if(HUD.BossPawn != none || HUD.ScriptedPawn != none)
HUD.bDisplayImportantHealthBar = true;
}
}
function SetEscortPawn(KFPawn_Scripted NewPawn)
{
local ScoreboardExtHUD HUD;
HUD = ScoreboardExtHUD(KFPC.MyHUD);
if (NewPawn == none)
return;
EscortPawn = NewPawn;
HUD.bDisplayImportantHealthBar = true;
HUD.BossInfoIcon = Texture2D(DynamicLoadObject(NewPawn.GetIconPath(),class'Texture2D'));
HUD.ScriptedPawn = NewPawn;
}
function SetBossPawn(KFInterface_MonsterBoss NewBoss)
{
BossPawn = NewBoss;
if(NewBoss == None || KFPC.bHideBossHealthBar)
return;
ScoreboardExtHUD(KFPC.MyHUD).BossInfoIcon = Texture2D(DynamicLoadObject(NewBoss.GetIconPath(),class'Texture2D'));
ScoreboardExtHUD(KFPC.MyHUD).BossPawn = NewBoss;
}
function UpdateBossShield(float NewShieldPercect)
{
ScoreboardExtHUD(KFPC.MyHUD).BossShieldPct = NewShieldPercect;
}
function UpdateBossBattlePhase(int BattlePhase)
{
ScoreboardExtHUD(KFPC.MyHUD).BossBattlePhaseColor = ScoreboardExtHUD(KFPC.MyHUD).BattlePhaseColors[Max(BattlePhase - 1, 0)];
}
function OnNamePlateHidden()
{
local ScoreboardExtHUD HUD;
HUD = ScoreboardExtHUD(KFPC.MyHUD);
if(KFPC.bHideBossHealthBar && HUD.ScriptedPawn == none)
return;
if(HUD.BossPawn != None)
HUD.bDisplayImportantHealthBar = true;
else HUD.bDisplayImportantHealthBar = false;
}
simulated function Deactivate()
{
local ScoreboardExtHUD HUD;
HUD = ScoreboardExtHUD(KFPC.MyHUD);
HUD.BossInfoIcon = None;
HUD.BossPawn = None;
HUD.BossShieldPct = 0.f;
HUD.BossBattlePhaseColor = HUD.default.BossBattlePhaseColor;
HUD.ScriptedPawn = None;
HUD.bDisplayImportantHealthBar = false;
}
DefaultProperties
{
}

View File

@ -1,13 +0,0 @@
class KF1HUD_ChatBoxWidget extends KFGFxHUD_ChatBoxWidget;
function AddChatMessage(string NewMessage, string HexVal)
{
Super.AddChatMessage(NewMessage, HexVal);
if( InStr(NewMessage, "<"$class'KFCommon_LocalizedStrings'.default.TeamString$">") != INDEX_NONE || InStr(NewMessage, "<"$class'KFCommon_LocalizedStrings'.default.AllString$">") != INDEX_NONE )
LocalPlayer(GetPC().Player).ViewportClient.ViewportConsole.OutputText(NewMessage);
}
defaultproperties
{
}

View File

@ -1,26 +0,0 @@
class KF1HUD_MusicNotification extends KFGFxWidget_MusicNotification
dependson(ScoreboardExtHUD);
function ShowSongInfo(string SongInfoString)
{
local KFGameEngine KFEngine;
local ScoreboardExtHUD HUD;
local PopupMessage Msg;
HUD = ScoreboardExtHUD(GetPC().MyHUD);
KFEngine = KFGameEngine(Class'Engine'.static.GetEngine());
if(KFEngine != none && KFEngine.MusicVolumeMultiplier > 0)
{
Msg.Body = SongInfoString;
Msg.Image = Texture2D'UI_HUD.InGameHUD_SWF_IBC';
Msg.MsgPosition = PP_TOP_CENTER;
HUD.AddPopupMessage(Msg);
}
}
DefaultProperties
{
}

View File

@ -1,14 +0,0 @@
class KF1HUD_PlayerStatus extends KFGFxHUD_PlayerStatus;
function UpdateXP(int XPDelta, int XPPercent, bool bLevelUp, Class<KFPerk> PerkClass)
{
if(!bLevelUp && MyPC.GetPerkLevelFromPerkList(PerkClass) < `MAX_PERK_LEVEL)
ScoreboardExtHUD(MyPC.MyHUD).NotifyXPEarned(XPDelta,PerkClass.default.PerkIcon,MakeColor(255, 255 * (KFPlayerReplicationInfo(MyPC.PlayerReplicationInfo).GetActivePerkLevel()/`MAX_PERK_LEVEL), 0, 255));
Super.UpdateXP(XPDelta, XPPercent, bLevelUp, PerkClass);
}
DefaultProperties
{
}

View File

@ -1,38 +0,0 @@
class KF1HUD_WeaponSelectWidget extends KFGFxHUD_WeaponSelectWidget;
function SetSelectedWeapon(int GroupIndex, int SelectedIndex)
{
local ScoreboardExtHUD HUD;
HUD = ScoreboardExtHUD(GetPC().MyHUD);
if( !HUD.bDisplayInventory )
{
HUD.bDisplayInventory = true;
HUD.InventoryFadeStartTime = GetPC().WorldInfo.TimeSeconds;
}
else HUD.RefreshInventory();
HUD.SelectedInventoryCategory = GroupIndex;
HUD.SelectedInventoryIndex = SelectedIndex;
}
function InitializeObject();
function SetThowButton();
simulated function RefreshWeaponSelect();
simulated function UpdateWeaponGroupOnHUD( byte GroupIndex );
simulated function SetWeaponGroupList(out array<KFWeapon> WeaponList, byte GroupIndex);
simulated function SetWeaponList( GFxObject WeaponList, int GroupIndex );
function Weapon GetSelectedWeapon();
function UpdateIndex();
function Hide();
function SetWeaponCategories();
function SendWeaponIndex( int GroupIndex, int SelectedIndex );
function ShowOnlyHUDGroup( byte GroupIndex );
function ShowAllHUDGroups();
function FadeOut();
function RefreshTimer();
function SetWeaponSwitchStayOpen(bool bStayOpen);
DefaultProperties
{
}

View File

@ -1,225 +0,0 @@
class KF1_HUDWrapper extends KFGFxMoviePlayer_HUD
dependson(ScoreboardExtHUD);
event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget)
{
local bool Ret;
if( WidgetName == 'ObjectiveContainer' )
return false;
Ret = Super.WidgetInitialized(WidgetName, WidgetPath, Widget);
if( WaveInfoWidget != None )
{
WaveInfoWidget.SetVisible(false);
}
if( MusicNotification != None )
{
MusicNotification.SetVisible(false);
}
if( TraderCompassWidget != None )
{
TraderCompassWidget.SetVisible(false);
}
if( KeyboardWeaponSelectWidget != None )
{
KeyboardWeaponSelectWidget.SetVisible(false);
}
return Ret;
}
function TickHud(float DeltaTime)
{
local ASDisplayInfo DI;
Super.TickHud(DeltaTime);
if( PlayerStatusContainer != None )
{
DI = PlayerStatusContainer.GetDisplayInfo();
if( DI.Visible )
{
DI.Visible = false;
PlayerStatusContainer.SetDisplayInfo(DI);
}
}
if( PlayerBackpackContainer != None )
{
DI = PlayerBackpackContainer.GetDisplayInfo();
if( DI.Visible )
{
DI.Visible = false;
PlayerBackpackContainer.SetDisplayInfo(DI);
}
}
if( WaveInfoWidget != None )
{
DI = WaveInfoWidget.GetDisplayInfo();
if( DI.Visible )
{
DI.Visible = false;
WaveInfoWidget.SetDisplayInfo(DI);
}
}
if( TraderCompassWidget != None )
{
DI = TraderCompassWidget.GetDisplayInfo();
if( DI.Visible )
{
DI.Visible = false;
TraderCompassWidget.SetDisplayInfo(DI);
}
}
if( KeyboardWeaponSelectWidget != None )
{
DI = KeyboardWeaponSelectWidget.GetDisplayInfo();
if( DI.Visible )
{
DI.Visible = false;
KeyboardWeaponSelectWidget.SetDisplayInfo(DI);
}
}
}
function DisplayPriorityMessage(string InPrimaryMessageString, string InSecondaryMessageString, int LifeTime, optional KFLocalMessage_Priority.EGameMessageType MessageType)
{
local KFGameReplicationInfo KFGRI;
local int ModifierIndex;
local FPriorityMessage PriorityMsg;
local KFWeeklyOutbreakInformation WeeklyInfo;
KFGRI = KFGameReplicationInfo(class'WorldInfo'.static.GetWorldInfo().GRI);
PriorityMsg.PrimaryText = InPrimaryMessageString;
PriorityMsg.SecondaryText = InSecondaryMessageString;
PriorityMsg.SecondaryAlign = PR_BOTTOM;
PriorityMsg.LifeTime = LifeTime;
switch ( MessageType )
{
case GMT_WaveStartSpecial:
if( KFGRI.IsSpecialWave(ModifierIndex) )
{
PriorityMsg.SecondaryText = Localize("Zeds", SpecialWaveLocKey[ModifierIndex], "KFGame");
PriorityMsg.Icon = Texture2D(DynamicLoadObject(SpecialWaveIconPath[ModifierIndex], class'Texture2D'));
}
break;
case GMT_WaveStartWeekly:
if( KFGRI.IsWeeklyWave(ModifierIndex) )
{
WeeklyInfo = class'KFMission_LocalizedStrings'.static.GetWeeklyOutbreakInfoByIndex(ModifierIndex);
PriorityMsg.SecondaryText = WeeklyInfo.FriendlyName;
PriorityMsg.Icon = Texture2D(DynamicLoadObject(WeeklyInfo.IconPath, class'Texture2D'));
}
break;
case GMT_WaveEnd:
PriorityMsg.Icon = Texture2D'DailyObjective_UI.KF2_Dailies_Icon_ZED';
break;
case GMT_WaveStart:
PriorityMsg.Icon = Texture2D'DailyObjective_UI.KF2_Dailies_Icon_ZED';
PriorityMsg.SecondaryIcon = Texture2D'UI_Widgets.MenuBarWidget_SWF_I11';
PriorityMsg.SecondaryText = GetExpandedWaveInfo();
break;
case GMT_WaveSBoss:
PriorityMsg.Icon = Texture2D'DailyObjective_UI.KF2_Dailies_Icon_ZED';
PriorityMsg.SecondaryText = class'KFGFxHUD_WaveInfo'.default.BossWaveString;
break;
case GMT_MatchWon:
PriorityMsg.Icon = Texture2D'UI_Award_Team.UI_Award_Team-Kills';
break;
case GMT_MatchLost:
PriorityMsg.Icon = Texture2D'UI_Award_ZEDs.UI_Award_ZED_Kills';
break;
case GMT_LastPlayerStanding:
PriorityMsg.LifeTime *= 1.5f;
PriorityMsg.Icon = Texture2D'DailyObjective_UI.KF2_Dailies_Icon_ZED';
break;
}
ScoreboardExtHUD(KFPC.myHUD).ShowPriorityMessage(PriorityMsg);
}
function string GetExpandedWaveInfo()
{
local KFGameReplicationInfo KFGRI;
local int Wave;
KFGRI = KFGameReplicationInfo(KFPC.WorldInfo.GRI);
if( KFPC.WorldInfo.NetMode == NM_StandAlone )
Wave = KFGRI.WaveNum;
else Wave = KFGRI.WaveNum+1;
if (KFGRI.default.bEndlessMode)
return class'KFGFxHUD_WaveInfo'.default.WaveString@string(KFGRI.WaveNum+1);
else
{
if( Wave == KFGRI.GetFinalWaveNum() )
return class'KFGFxHUD_WaveInfo'.default.FinalWaveString;
else return class'KFGFxHUD_WaveInfo'.default.WaveString@Wave$"/"$KFGRI.GetFinalWaveNum();
}
return "";
}
function ShowKillMessage(PlayerReplicationInfo PRI1, PlayerReplicationInfo PRI2, optional bool bDeathMessage=false, optional Object OptionalObject)
{
local bool bHumanDeath;
local string KilledName, KillerName;
local class<KFPawn_Monster> KFPM;
if(KFPC == none)
return;
KFPM = class<KFPawn_Monster>(OptionalObject);
if(bDeathMessage)
{
if(KFPM != none)
KillerName=KFPM.static.GetLocalizedName();
}
else
{
if(KFPM != none)
{
KilledName=KFPM.static.GetLocalizedName();
bHumanDeath=false;
}
else if(PRI1 != none)
KillerName=PRI1.PlayerName;
}
if(PRI2 != none)
{
if(PRI2.GetTeamNum() == class'KFTeamInfo_Human'.default.TeamIndex)
bHumanDeath=true;
else bHumanDeath=false;
KilledName=PRI2.PlayerName;
}
ScoreboardExtHUD(KFPC.myHUD).ShowKillMessage(PRI1, PRI2, bHumanDeath, KilledName, KillerName);
}
DefaultProperties
{
WidgetBindings.Remove((WidgetName="PlayerStatWidgetMC",WidgetClass=class'KFGFxHUD_PlayerStatus'))
WidgetBindings.Add((WidgetName="PlayerStatWidgetMC",WidgetClass=class'KF1HUD_PlayerStatus'))
WidgetBindings.Remove((WidgetName="WeaponSelectContainer",WidgetClass=class'KFGFxHUD_WeaponSelectWidget'))
WidgetBindings.Add((WidgetName="WeaponSelectContainer",WidgetClass=class'KF1HUD_WeaponSelectWidget'))
WidgetBindings.Remove((WidgetName="MusicNotification", WidgetClass=class'KFGFxWidget_MusicNotification'))
WidgetBindings.Add((WidgetName="MusicNotification", WidgetClass=class'KF1HUD_MusicNotification'))
WidgetBindings.Remove((WidgetName="ChatBoxWidget", WidgetClass=class'KFGFxHUD_ChatBoxWidget'))
WidgetBindings.Add((WidgetName="ChatBoxWidget", WidgetClass=class'KF1HUD_ChatBoxWidget'))
}

File diff suppressed because it is too large Load Diff