Menus overhaul #14

Merged
dkanus merged 30 commits from :somechanges into master 2022-01-23 22:14:51 +03:00
3 changed files with 97 additions and 0 deletions
Showing only changes of commit 51ce9f52fa - Show all commits

View File

@ -1,4 +1,5 @@
class NicePanelSkills extends Settings_Tabs;
// TODO change parent class / background
var automated NiceGUIPerkButton skillButtonA[5], skillButtonB[5];
function ShowPanel(bool bShow){
local int i;

View File

@ -1444,6 +1444,101 @@ exec simulated function Siren(float value)
sirenScreamMod = value;
}
// copy-cat to fix MyTrader accessed none log spam
function ClientLocationalVoiceMessage(PlayerReplicationInfo Sender,
PlayerReplicationInfo Recipient,
name MessageType, byte MessageID,
optional Pawn SenderPawn, optional vector SenderLocation)
{
local VoicePack Voice;
local ShopVolume Shop;
if (Sender == none || Sender.VoiceType == none || Player.Console == none || Level.NetMode == NM_DedicatedServer)
{
return;
}
Voice = Spawn(Sender.VoiceType, self);
if (KFVoicePack(Voice) != none)
{
if (MessageType == 'TRADER')
{
if (Pawn != none && MessageID >= 4)
{
foreach Pawn.TouchingActors(class'ShopVolume', Shop)
{
// fix this
if (Shop.MyTrader != none)
SenderLocation = Shop.MyTrader.Location;
else
SenderLocation = Shop.Location;
// Only play the 30 Seconds remaining messages come across as Locational Speech if we're in the Shop
if (MessageID == 4)
{
return;
}
else if (MessageID == 5)
{
MessageID = 999;
}
break;
}
}
// Only play the 10 Seconds remaining message if we are in the Shop
// and only play the 30 seconds remaning message if we haven't been to the Shop
if (MessageID == 5 || (MessageID == 4 && bHasHeardTraderWelcomeMessage))
{
return;
}
else if (MessageID == 999)
{
MessageID = 5;
}
// Store the fact that we've heard the Trader's Welcome message on the client
if (MessageID == 7)
{
bHasHeardTraderWelcomeMessage = true;
}
// If we're hearing the Shop's Closed Message, reset the Trader's Welcome message flag
else if (MessageID == 6)
{
bHasHeardTraderWelcomeMessage = false;
}
KFVoicePack(Voice).ClientInitializeLocational(Sender, Recipient, MessageType, MessageID, SenderPawn, SenderLocation);
if (MessageID > 6 /*&& bBuyMenuIsOpen*/)
{
// TODO: Show KFVoicePack(Voice).GetClientParsedMessage() in the Buy Menu
}
else if (KFVoicePack(Voice).GetClientParsedMessage() != "")
{
// Radio commands print to Text
TeamMessage(Sender, KFVoicePack(Voice).GetClientParsedMessage(), 'Trader');
}
}
else
{
KFVoicePack(Voice).ClientInitializeLocational(Sender, Recipient, MessageType, MessageID, SenderPawn, SenderLocation);
if (KFVoicePack(Voice).GetClientParsedMessage() != "")
{
TeamMessage(Sender, KFVoicePack(Voice).GetClientParsedMessage(), 'Voice');
}
}
}
else if (Voice != none)
{
Voice.ClientInitialize(Sender, Recipient, MessageType, MessageID);
}
}
defaultproperties
{
nicePlayerInfoVersionNumber=1

View File

@ -312,6 +312,7 @@ static function SpecialHUDInfo(KFPlayerReplicationInfo KFPRI, Canvas C)
foreach C.ViewPort.Actor.DynamicActors(class'KFMonster', KFEnemy)
{
// check with stopwatch
if (KFEnemy.Health > hp && (!KFEnemy.Cloaked() || KFEnemy.bZapped || KFEnemy.bSpotted) && VSizeSquared(KFEnemy.Location - C.ViewPort.Actor.Pawn.Location) < MaxDistanceSquared)
HKF.DrawHealthBar(C, KFEnemy, KFEnemy.Health, KFEnemy.HealthMax , 50.0);
}