update localization
- more text supports localization; - move hardcode to english localization file; - update the Russian localization file.
This commit is contained in:
parent
fc02d0d0b3
commit
1d7c441b4c
Binary file not shown.
Binary file not shown.
@ -1,5 +1,7 @@
|
|||||||
class ExtPerksContainer_Selection extends KFGFxPerksContainer_Selection;
|
class ExtPerksContainer_Selection extends KFGFxPerksContainer_Selection;
|
||||||
|
|
||||||
|
var localized string PerkChangeWarning;
|
||||||
|
|
||||||
function UpdatePerkSelection(byte SelectedPerkIndex)
|
function UpdatePerkSelection(byte SelectedPerkIndex)
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
@ -41,7 +43,7 @@ function UpdatePendingPerkInfo(byte SelectedPerkIndex)
|
|||||||
if (KFPC != none)
|
if (KFPC != none)
|
||||||
{
|
{
|
||||||
PerkClass = KFPC.ActivePerkManager.UserPerks[SelectedPerkIndex];
|
PerkClass = KFPC.ActivePerkManager.UserPerks[SelectedPerkIndex];
|
||||||
SetPendingPerkChanges(PerkClass.PerkName, PerkClass.GetPerkIconPath(PerkClass.CurrentLevel), "Perk changes will be applied when you die."); // TODO: Localization
|
SetPendingPerkChanges(PerkClass.PerkName, PerkClass.GetPerkIconPath(PerkClass.CurrentLevel), PerkChangeWarning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,18 @@
|
|||||||
Class ExtPlayerController extends KFPlayerController;
|
Class ExtPlayerController extends KFPlayerController;
|
||||||
|
|
||||||
|
var localized string GotItemText;
|
||||||
|
var localized string KilledHimselfWith;
|
||||||
|
var localized string WasBurnedToDeath;
|
||||||
|
var localized string WasBlownIntoPeaces;
|
||||||
|
var localized string HadSuddenHeartAttack;
|
||||||
|
var localized string WasKilledBy;
|
||||||
|
var localized string WasIncineratedBy;
|
||||||
|
var localized string WasBlownUpBy;
|
||||||
|
var localized string ConnectionError;
|
||||||
|
var localized string Disconnecting;
|
||||||
|
var localized string NowViewingFrom;
|
||||||
|
var localized string ViewingFromOwnCamera;
|
||||||
|
|
||||||
struct FAdminCmdType
|
struct FAdminCmdType
|
||||||
{
|
{
|
||||||
var string Cmd,Info;
|
var string Cmd,Info;
|
||||||
@ -280,7 +293,7 @@ reliable server function ServerItemDropGet(string Item)
|
|||||||
if (DropCount>5 || Len(Item)>100)
|
if (DropCount>5 || Len(Item)>100)
|
||||||
return;
|
return;
|
||||||
++DropCount;
|
++DropCount;
|
||||||
WorldInfo.Game.Broadcast(Self,PlayerReplicationInfo.GetHumanReadableName()$" got item: "$Item); // TODO: Localization
|
WorldInfo.Game.Broadcast(Self,PlayerReplicationInfo.GetHumanReadableName()@GotItemText@Item);
|
||||||
}
|
}
|
||||||
|
|
||||||
reliable client function ReceiveLevelUp(Ext_PerkBase Perk, int NewLevel)
|
reliable client function ReceiveLevelUp(Ext_PerkBase Perk, int NewLevel)
|
||||||
@ -497,13 +510,13 @@ simulated final function string ParseSuicideMsg(string Victim, class<DamageType>
|
|||||||
if (Left(S,15)~="KFDT_Ballistic_")
|
if (Left(S,15)~="KFDT_Ballistic_")
|
||||||
{
|
{
|
||||||
S = Mid(S,15); // Weapon name.
|
S = Mid(S,15); // Weapon name.
|
||||||
return Victim$Chr(6)$"M killed himself with "$S; // TODO: Localization
|
return Victim$Chr(6)$"M"@KilledHimselfWith@S;
|
||||||
}
|
}
|
||||||
else if (class<KFDT_Fire>(DamType)!=None)
|
else if (class<KFDT_Fire>(DamType)!=None)
|
||||||
return Victim$Chr(6)$"M was burned to death";
|
return Victim$Chr(6)$"M"@WasBurnedToDeath;
|
||||||
else if (class<KFDT_Explosive>(DamType)!=None)
|
else if (class<KFDT_Explosive>(DamType)!=None)
|
||||||
return Victim$Chr(6)$"M was blown into pieces";
|
return Victim$Chr(6)$"M"@WasBlownIntoPeaces;
|
||||||
return Victim$Chr(6)$"M had a sudden heart attack";
|
return Victim$Chr(6)$"M"@HadSuddenHeartAttack;
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated final function string ParseKillMsg(string Victim, string Killer, bool bFF, class<DamageType> DamType)
|
simulated final function string ParseKillMsg(string Victim, string Killer, bool bFF, class<DamageType> DamType)
|
||||||
@ -515,13 +528,13 @@ simulated final function string ParseKillMsg(string Victim, string Killer, bool
|
|||||||
if (Left(S,15)~="KFDT_Ballistic_")
|
if (Left(S,15)~="KFDT_Ballistic_")
|
||||||
{
|
{
|
||||||
S = Mid(S,15); // Weapon name.
|
S = Mid(S,15); // Weapon name.
|
||||||
return Chr(6)$"O"$Victim$Chr(6)$"M was killed by "$Chr(6)$T$Killer$Chr(6)$"M's "$S; // TODO: Localization
|
return Chr(6)$"O"$Victim$Chr(6)$"M"@WasKilledBy@Chr(6)$T$Killer$Chr(6)$"M's "$S;
|
||||||
}
|
}
|
||||||
else if (class<KFDT_Fire>(DamType)!=None)
|
else if (class<KFDT_Fire>(DamType)!=None)
|
||||||
return Chr(6)$"O"$Victim$Chr(6)$"M was incinerated by "$Chr(6)$T$Killer;
|
return Chr(6)$"O"$Victim$Chr(6)$"M"@WasIncineratedBy@Chr(6)$T$Killer;
|
||||||
else if (class<KFDT_Explosive>(DamType)!=None)
|
else if (class<KFDT_Explosive>(DamType)!=None)
|
||||||
return Chr(6)$"O"$Victim$Chr(6)$"M was blown up by "$Chr(6)$T$Killer;
|
return Chr(6)$"O"$Victim$Chr(6)$"M"@WasBlownUpBy@Chr(6)$T$Killer;
|
||||||
return Chr(6)$"O"$Victim$Chr(6)$"M was killed by "$Chr(6)$T$Killer;
|
return Chr(6)$"O"$Victim$Chr(6)$"M"@WasKilledBy@Chr(6)$T$Killer;
|
||||||
}
|
}
|
||||||
|
|
||||||
reliable server function ServerCamera(name NewMode)
|
reliable server function ServerCamera(name NewMode)
|
||||||
@ -607,7 +620,7 @@ simulated reliable client event bool ShowConnectionProgressPopup(EProgressMessag
|
|||||||
case PMT_ConnectionFailure :
|
case PMT_ConnectionFailure :
|
||||||
case PMT_PeerConnectionFailure :
|
case PMT_PeerConnectionFailure :
|
||||||
KFExtendedHUD(myHUD).NotifyLevelChange();
|
KFExtendedHUD(myHUD).NotifyLevelChange();
|
||||||
KFExtendedHUD(myHUD).ShowProgressMsg("Connection Error: "$ProgressTitle$"|"$ProgressDescription$"|Disconnecting...",true); // TODO: Localization
|
KFExtendedHUD(myHUD).ShowProgressMsg(ConnectionError@ProgressTitle$"|"$ProgressDescription$"|"$Disconnecting,true);
|
||||||
return true;
|
return true;
|
||||||
case PMT_DownloadProgress :
|
case PMT_DownloadProgress :
|
||||||
KFExtendedHUD(myHUD).NotifyLevelChange();
|
KFExtendedHUD(myHUD).NotifyLevelChange();
|
||||||
@ -719,7 +732,7 @@ function ViewAPlayer(int dir)
|
|||||||
if (PRI!=None)
|
if (PRI!=None)
|
||||||
{
|
{
|
||||||
SetViewTarget(PRI);
|
SetViewTarget(PRI);
|
||||||
ClientMessage("Now viewing from "$PRI.GetHumanReadableName()); // TODO: Localization
|
ClientMessage(NowViewingFrom@PRI.GetHumanReadableName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -745,7 +758,7 @@ reliable server function ServerViewPlayerID(int ID)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
SetViewTarget(PRI);
|
SetViewTarget(PRI);
|
||||||
ClientMessage("Now viewing from "$PRI.GetHumanReadableName()); // TODO: Localization
|
ClientMessage(NowViewingFrom@PRI.GetHumanReadableName());
|
||||||
if (CurrentSpectateMode==SMODE_Roaming)
|
if (CurrentSpectateMode==SMODE_Roaming)
|
||||||
SpectatePlayer(SMODE_PawnFreeCam);
|
SpectatePlayer(SMODE_PawnFreeCam);
|
||||||
}
|
}
|
||||||
@ -755,7 +768,7 @@ reliable server function SpectateRoaming()
|
|||||||
local Pawn P;
|
local Pawn P;
|
||||||
|
|
||||||
P = Pawn(ViewTarget);
|
P = Pawn(ViewTarget);
|
||||||
ClientMessage("Viewing from own camera."); // TODO: Localization
|
ClientMessage(ViewingFromOwnCamera);
|
||||||
Super.SpectateRoaming();
|
Super.SpectateRoaming();
|
||||||
if (P!=None)
|
if (P!=None)
|
||||||
{
|
{
|
||||||
|
@ -1527,7 +1527,6 @@ defaultproperties
|
|||||||
WebConfigs.Add((PropType=0,PropName="PrestigeXPReduce",UIName="Prestige XP Reduce",UIDesc="Percent amount of XP cost is reduced for each prestige (1.0 = 1/2, or 50 % of XP)"))
|
WebConfigs.Add((PropType=0,PropName="PrestigeXPReduce",UIName="Prestige XP Reduce",UIDesc="Percent amount of XP cost is reduced for each prestige (1.0 = 1/2, or 50 % of XP)"))
|
||||||
// WebConfigs.Add((PropType=0,PropName="MinimalDataLevel",UIName="Minimal Real Level",UIDesc="Minimal level for new players or who loads from saves"))
|
// WebConfigs.Add((PropType=0,PropName="MinimalDataLevel",UIName="Minimal Real Level",UIDesc="Minimal level for new players or who loads from saves"))
|
||||||
|
|
||||||
// TODO: localize
|
|
||||||
DefPerkStats(0)=(MaxValue=50,CostPerValue=1,StatType="Speed",Progress=0.4)
|
DefPerkStats(0)=(MaxValue=50,CostPerValue=1,StatType="Speed",Progress=0.4)
|
||||||
DefPerkStats(1)=(MaxValue=1000,CostPerValue=1,StatType="Damage",Progress=0.5)
|
DefPerkStats(1)=(MaxValue=1000,CostPerValue=1,StatType="Damage",Progress=0.5)
|
||||||
DefPerkStats(2)=(MaxValue=90,CostPerValue=1,StatType="Recoil",Progress=1)
|
DefPerkStats(2)=(MaxValue=90,CostPerValue=1,StatType="Recoil",Progress=1)
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
// Trait group info.
|
// Trait group info.
|
||||||
Class Ext_TGroupBase extends Object
|
Class Ext_TGroupBase extends Object;
|
||||||
abstract;
|
|
||||||
|
|
||||||
var() localized string GroupInfo;
|
var() localized string GroupInfo;
|
||||||
var() bool bLimitToOne; // Limit to only one trait for this group.
|
var() bool bLimitToOne; // Limit to only one trait for this group.
|
||||||
|
var localized string TraitGroupText;
|
||||||
|
var localized string MaxText;
|
||||||
|
|
||||||
static function string GetUIInfo(Ext_PerkBase Perk)
|
function string GetUIInfo(Ext_PerkBase Perk)
|
||||||
{
|
{
|
||||||
return (Default.bLimitToOne ? Default.GroupInfo$" (MAX 1)" : Default.GroupInfo);
|
return (Default.bLimitToOne ? Default.GroupInfo$" ("$MaxText$" 1)" : Default.GroupInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function string GetUIDesc()
|
function string GetUIDesc()
|
||||||
{
|
{
|
||||||
return Default.GroupInfo$" trait group"; // TODO: Localization
|
return Default.GroupInfo@TraitGroupText;
|
||||||
}
|
}
|
||||||
|
|
||||||
// See if group is already using up limitation.
|
// See if group is already using up limitation.
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
class Ext_TGroupRegen extends Ext_TGroupBase;
|
class Ext_TGroupRegen extends Ext_TGroupBase;
|
||||||
|
|
||||||
static function string GetUIInfo(Ext_PerkBase Perk)
|
var localized string GroupDescription;
|
||||||
|
|
||||||
|
function string GetUIInfo(Ext_PerkBase Perk)
|
||||||
{
|
{
|
||||||
return Default.GroupInfo$" (MAX "$GetMaxLimit(Perk)$")";
|
return Default.GroupInfo@"("$MaxText@GetMaxLimit(Perk)$")";
|
||||||
}
|
}
|
||||||
|
|
||||||
static function string GetUIDesc()
|
function string GetUIDesc()
|
||||||
{
|
{
|
||||||
return Super.GetUIDesc()$"|To buy additional regen abilities:|-Prestige level 1 + Perk level 100 = MAX 2 traits|-Prestige level 5 + Perk level 150 = MAX 3 traits"; // TODO: Localization
|
return Super.GetUIDesc()$"|"$GroupDescription;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function bool GroupLimited(Ext_PerkBase Perk, class<Ext_TraitBase> Trait)
|
static function bool GroupLimited(Ext_PerkBase Perk, class<Ext_TraitBase> Trait)
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
Class Ext_TraitAirborneAgent extends Ext_TraitBase;
|
Class Ext_TraitAirborneAgent extends Ext_TraitBase;
|
||||||
|
|
||||||
static function string GetPerkDescription()
|
var localized string GroupDescription;
|
||||||
|
|
||||||
|
function string GetPerkDescription()
|
||||||
{
|
{
|
||||||
local string S;
|
local string S;
|
||||||
|
|
||||||
S = Super.GetPerkDescription();
|
S = Super.GetPerkDescription();
|
||||||
S $= "|Trait requires prestige level: #{FF4000}1"; // TODO: Localization
|
S $= "|"$GroupDescription;
|
||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,10 @@ Class Ext_TraitBase extends Object
|
|||||||
config(ServerExt)
|
config(ServerExt)
|
||||||
DependsOn(ExtWebAdmin_UI);
|
DependsOn(ExtWebAdmin_UI);
|
||||||
|
|
||||||
|
var localized string MaxLevelText;
|
||||||
|
var localized string LevelCostText;
|
||||||
|
var localized string MinPerkLevelText;
|
||||||
|
|
||||||
var array<FWebAdminConfigInfo> WebConfigs;
|
var array<FWebAdminConfigInfo> WebConfigs;
|
||||||
|
|
||||||
var() class<Ext_TGroupBase> TraitGroup; // With groups you can prevent player from buying multiple traits of same group.
|
var() class<Ext_TGroupBase> TraitGroup; // With groups you can prevent player from buying multiple traits of same group.
|
||||||
@ -46,7 +50,7 @@ static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return UI description player will see before bying this trait.
|
// Return UI description player will see before bying this trait.
|
||||||
static function string GetPerkDescription()
|
function string GetPerkDescription()
|
||||||
{
|
{
|
||||||
local string S;
|
local string S;
|
||||||
local byte i;
|
local byte i;
|
||||||
@ -57,9 +61,9 @@ static function string GetPerkDescription()
|
|||||||
S = string(GetTraitCost(i));
|
S = string(GetTraitCost(i));
|
||||||
else S $= ", "$GetTraitCost(i);
|
else S $= ", "$GetTraitCost(i);
|
||||||
}
|
}
|
||||||
S = "Max level: #{9FF781}"$Default.NumLevels$"#{DEF}|Level costs: #{F3F781}"$S$"#{DEF}"; // TODO: Localization
|
S = MaxLevelText@"#{9FF781}"$Default.NumLevels$"#{DEF}|"$LevelCostText@"#{F3F781}"$S$"#{DEF}";
|
||||||
if (Default.MinLevel>0)
|
if (Default.MinLevel>0)
|
||||||
S = "Min perk level: #{FF4000}"$Default.MinLevel$"#{DEF}|"$S; // TODO: Localization
|
S = MinPerkLevelText@"#{FF4000}"$Default.MinLevel$"#{DEF}|"$S;
|
||||||
return Default.Description$"||"$S;
|
return Default.Description$"||"$S;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
Class Ext_TraitBoomWeld extends Ext_TraitBase
|
Class Ext_TraitBoomWeld extends Ext_TraitBase;
|
||||||
abstract;
|
|
||||||
|
|
||||||
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
Class Ext_TraitDemoNuke extends Ext_TraitBase;
|
Class Ext_TraitDemoNuke extends Ext_TraitBase;
|
||||||
|
|
||||||
static function string GetPerkDescription()
|
var localized string GroupDescription;
|
||||||
|
|
||||||
|
function string GetPerkDescription()
|
||||||
{
|
{
|
||||||
local string S;
|
local string S;
|
||||||
|
|
||||||
S = Super.GetPerkDescription();
|
S = Super.GetPerkDescription();
|
||||||
S $= "|Trait requires prestige level: #{FF4000}3"; // TODO: Localization
|
S $= "|"$GroupDescription;
|
||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
Class Ext_TraitDemoProfessional extends Ext_TraitBase;
|
Class Ext_TraitDemoProfessional extends Ext_TraitBase;
|
||||||
|
|
||||||
static function string GetPerkDescription()
|
var localized string GroupDescription;
|
||||||
|
|
||||||
|
function string GetPerkDescription()
|
||||||
{
|
{
|
||||||
local string S;
|
local string S;
|
||||||
|
|
||||||
S = Super.GetPerkDescription();
|
S = Super.GetPerkDescription();
|
||||||
S $= "|Trait requires prestige level: #{FF4000}1"; // TODO: Localization
|
S $= "|"$GroupDescription;
|
||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
Class Ext_TraitMachineGunner extends Ext_TraitBase;
|
Class Ext_TraitMachineGunner extends Ext_TraitBase;
|
||||||
|
|
||||||
static function string GetPerkDescription()
|
var localized string GroupDescription;
|
||||||
|
|
||||||
|
function string GetPerkDescription()
|
||||||
{
|
{
|
||||||
local string S;
|
local string S;
|
||||||
|
|
||||||
S = Super.GetPerkDescription();
|
S = Super.GetPerkDescription();
|
||||||
S $= "|Trait requires prestige level: #{FF4000}2"; // TODO: Localization
|
S $= "|"$GroupDescription;
|
||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
Class Ext_TraitPenetrator extends Ext_TraitBase;
|
Class Ext_TraitPenetrator extends Ext_TraitBase;
|
||||||
|
|
||||||
static function string GetPerkDescription()
|
var localized string GroupDescription;
|
||||||
|
|
||||||
|
function string GetPerkDescription()
|
||||||
{
|
{
|
||||||
local string S;
|
local string S;
|
||||||
|
|
||||||
S = Super.GetPerkDescription();
|
S = Super.GetPerkDescription();
|
||||||
S $= "|Trait requires prestige level: #{FF4000}2"; // TODO: Localization
|
S $= "|"$GroupDescription;
|
||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
Class Ext_TraitTactician extends Ext_TraitBase;
|
Class Ext_TraitTactician extends Ext_TraitBase;
|
||||||
|
|
||||||
static function string GetPerkDescription()
|
var localized string GroupDescription;
|
||||||
|
|
||||||
|
function string GetPerkDescription()
|
||||||
{
|
{
|
||||||
local string S;
|
local string S;
|
||||||
|
|
||||||
S = Super.GetPerkDescription();
|
S = Super.GetPerkDescription();
|
||||||
S $= "|Trait requires prestige level: #{FF4000}1"; // TODO: Localization
|
S $= "|"$GroupDescription;
|
||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
Class Ext_TraitWeapons extends Ext_TraitBase
|
Class Ext_TraitWeapons extends Ext_TraitBase;
|
||||||
abstract;
|
|
||||||
|
var localized string GroupDescription;
|
||||||
|
|
||||||
struct FLevelFX
|
struct FLevelFX
|
||||||
{
|
{
|
||||||
@ -22,9 +23,9 @@ static final function bool HasMaxCarry(Ext_PerkBase Perk)
|
|||||||
return (i==-1 || Perk.PerkTraits[i].CurrentLevel>=3);
|
return (i==-1 || Perk.PerkTraits[i].CurrentLevel>=3);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function string GetPerkDescription()
|
function string GetPerkDescription()
|
||||||
{
|
{
|
||||||
return Super.GetPerkDescription()$"|- Level 4 requires perk level 50 and level 3 carry capacity trait!"; // TODO: Localization
|
return Super.GetPerkDescription()$"|"$GroupDescription;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
Class Ext_TraitZEDBase extends Ext_TraitBase
|
Class Ext_TraitZEDBase extends Ext_TraitBase;
|
||||||
abstract;
|
|
||||||
|
|
||||||
var class<Ext_TraitZEDBase> BaseTrait;
|
var class<Ext_TraitZEDBase> BaseTrait;
|
||||||
var bool bIsSummoner;
|
var bool bIsSummoner;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
Class Ext_TraitZED_Damage extends Ext_TraitZEDBase
|
Class Ext_TraitZED_Damage extends Ext_TraitZEDBase;
|
||||||
abstract;
|
|
||||||
|
|
||||||
var array<float> DamList;
|
var array<float> DamList;
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
Class Ext_TraitZED_Health extends Ext_TraitZEDBase
|
Class Ext_TraitZED_Health extends Ext_TraitZEDBase;
|
||||||
abstract;
|
|
||||||
|
|
||||||
var array<float> HPList;
|
var array<float> HPList;
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
Class Ext_TraitZED_Summon extends Ext_TraitZEDBase
|
Class Ext_TraitZED_Summon extends Ext_TraitZEDBase;
|
||||||
abstract;
|
|
||||||
|
var localized string GroupDescription;
|
||||||
|
|
||||||
struct FZEDTypes
|
struct FZEDTypes
|
||||||
{
|
{
|
||||||
@ -10,13 +11,13 @@ var config array<string> ZedTypes;
|
|||||||
var config float ZedRespawnTime;
|
var config float ZedRespawnTime;
|
||||||
var config int FinalLevelPrestige;
|
var config int FinalLevelPrestige;
|
||||||
|
|
||||||
static function string GetPerkDescription()
|
function string GetPerkDescription()
|
||||||
{
|
{
|
||||||
local string S;
|
local string S;
|
||||||
|
|
||||||
S = Super.GetPerkDescription();
|
S = Super.GetPerkDescription();
|
||||||
if (Default.FinalLevelPrestige>0)
|
if (Default.FinalLevelPrestige>0)
|
||||||
S $= "|Level 6 requires prestige level: #{FF4000}"$Default.FinalLevelPrestige; // TODO: Localization
|
S $= "|"$GroupDescription@"#{FF4000}"$Default.FinalLevelPrestige;
|
||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
Class Ext_TraitZED_SummonExt extends Ext_TraitZEDBase
|
Class Ext_TraitZED_SummonExt extends Ext_TraitZEDBase;
|
||||||
abstract;
|
|
||||||
|
|
||||||
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
Class Ext_TraitZedative extends Ext_TraitBase;
|
Class Ext_TraitZedative extends Ext_TraitBase;
|
||||||
|
|
||||||
static function string GetPerkDescription()
|
var localized string GroupDescription;
|
||||||
|
|
||||||
|
function string GetPerkDescription()
|
||||||
{
|
{
|
||||||
local string S;
|
local string S;
|
||||||
|
|
||||||
S = Super.GetPerkDescription();
|
S = Super.GetPerkDescription();
|
||||||
S $= "|Trait requires prestige level: #{FF4000}2"; // TODO: Localization
|
S $= "|"$GroupDescription;
|
||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,23 @@
|
|||||||
//class KFExtendedHUD extends KFHUDBase;
|
//class KFExtendedHUD extends KFHUDBase;
|
||||||
class KFExtendedHUD extends KFGFxHudWrapper;
|
class KFExtendedHUD extends KFGFxHudWrapper;
|
||||||
|
|
||||||
|
var localized string PleaseWaitForDownload;
|
||||||
|
var localized string PressEscToCancel;
|
||||||
|
var localized string AreYouSureToCancel;
|
||||||
|
var localized string PressEscToConfirm;
|
||||||
|
var localized string YouRespawnIn;
|
||||||
|
var localized string ITR_CommonText;
|
||||||
|
var localized string ITR_UncommonText;
|
||||||
|
var localized string ITR_RareText;
|
||||||
|
var localized string ITR_LegendaryText;
|
||||||
|
var localized string ITR_ExceedinglyRareText;
|
||||||
|
var localized string ITR_MythicalText;
|
||||||
|
var localized string ITR_DefaultText;
|
||||||
|
var localized string NewItemText;
|
||||||
|
var localized string SomeoneText;
|
||||||
|
var localized string KillText;
|
||||||
|
var localized string KillsText;
|
||||||
|
|
||||||
var array<Ext_T_MonsterPRI> MyCurrentPet;
|
var array<Ext_T_MonsterPRI> MyCurrentPet;
|
||||||
|
|
||||||
struct FDeathMessageType
|
struct FDeathMessageType
|
||||||
@ -296,7 +313,7 @@ event PostRender()
|
|||||||
bShowProgress = false;
|
bShowProgress = false;
|
||||||
if (PlayerOwner.Player==None)
|
if (PlayerOwner.Player==None)
|
||||||
{
|
{
|
||||||
ShowProgressMsg("Downloading contents for next map, please wait...|Press [Escape] key to cancel connection!"); // TODO: Localization
|
ShowProgressMsg(PleaseWaitForDownload$"|"$PressEscToCancel);
|
||||||
RenderProgress();
|
RenderProgress();
|
||||||
}
|
}
|
||||||
else if (bProgressDC)
|
else if (bProgressDC)
|
||||||
@ -312,7 +329,7 @@ simulated function CancelConnection()
|
|||||||
{
|
{
|
||||||
if (!bConfirmDisconnect)
|
if (!bConfirmDisconnect)
|
||||||
{
|
{
|
||||||
ShowProgressMsg("Are you sure you want to cancel connection?|Press [Escape] again to confirm..."); // TODO: Localization
|
ShowProgressMsg(AreYouSureToCancel$"|"$PressEscToConfirm);
|
||||||
bConfirmDisconnect = true;
|
bConfirmDisconnect = true;
|
||||||
}
|
}
|
||||||
else class'Engine'.Static.GetEngine().GameViewport.ConsoleCommand("Disconnect");
|
else class'Engine'.Static.GetEngine().GameViewport.ConsoleCommand("Disconnect");
|
||||||
@ -324,7 +341,7 @@ final function DrawRespawnCounter()
|
|||||||
local string S;
|
local string S;
|
||||||
|
|
||||||
Canvas.Font = GUIStyle.PickFont(GUIStyle.DefaultFontSize+1,Sc);
|
Canvas.Font = GUIStyle.PickFont(GUIStyle.DefaultFontSize+1,Sc);
|
||||||
S = "You are about to respawn in "$class'UI_Scoreboard'.Static.FormatTimeSM(EPRI.RespawnCounter);
|
S = YouRespawnIn@class'UI_Scoreboard'.Static.FormatTimeSM(EPRI.RespawnCounter);
|
||||||
Canvas.SetDrawColor(250,150,150,255);
|
Canvas.SetDrawColor(250,150,150,255);
|
||||||
Canvas.TextSize(S,XL,YL,Sc,Sc);
|
Canvas.TextSize(S,XL,YL,Sc,Sc);
|
||||||
Canvas.SetPos((Canvas.ClipX-XL)*0.5,Canvas.ClipY*0.075);
|
Canvas.SetPos((Canvas.ClipX-XL)*0.5,Canvas.ClipY*0.075);
|
||||||
@ -366,8 +383,8 @@ final function RenderKillMsg()
|
|||||||
if (KillMessages[i].bDamage)
|
if (KillMessages[i].bDamage)
|
||||||
S = "-"$KillMessages[i].Counter$" HP "$KillMessages[i].Name;
|
S = "-"$KillMessages[i].Counter$" HP "$KillMessages[i].Name;
|
||||||
else if (KillMessages[i].bLocal)
|
else if (KillMessages[i].bLocal)
|
||||||
S = "+"$KillMessages[i].Counter@KillMessages[i].Name$(KillMessages[i].Counter>1 ? " kills" : " kill");
|
S = "+"$KillMessages[i].Counter@KillMessages[i].Name@(KillMessages[i].Counter>1 ? KillsText : KillText);
|
||||||
else S = (KillMessages[i].OwnerPRI!=None ? KillMessages[i].OwnerPRI.GetHumanReadableName() : "Someone")$" +"$KillMessages[i].Counter@KillMessages[i].Name$(KillMessages[i].Counter>1 ? " kills" : " kill");
|
else S = (KillMessages[i].OwnerPRI!=None ? KillMessages[i].OwnerPRI.GetHumanReadableName() : SomeoneText)@"+"$KillMessages[i].Counter@KillMessages[i].Name@(KillMessages[i].Counter>1 ? KillsText : KillText);
|
||||||
Canvas.SetPos(X,Y);
|
Canvas.SetPos(X,Y);
|
||||||
Canvas.DrawColor = KillMessages[i].MsgColor;
|
Canvas.DrawColor = KillMessages[i].MsgColor;
|
||||||
T = (1.f - (T/6.f)) * 255.f;
|
T = (1.f - (T/6.f)) * 255.f;
|
||||||
@ -1123,7 +1140,7 @@ simulated function SearchInventoryForNewItem()
|
|||||||
{
|
{
|
||||||
NewItems.Insert(0,1);
|
NewItems.Insert(0,1);
|
||||||
NewItems[0].Icon = Texture2D(DynamicLoadObject(OnlineSub.ItemPropertiesList[j].IconURL,Class'Texture2D'));
|
NewItems[0].Icon = Texture2D(DynamicLoadObject(OnlineSub.ItemPropertiesList[j].IconURL,Class'Texture2D'));
|
||||||
NewItems[0].Item = OnlineSub.ItemPropertiesList[j].Name$" ["$RarityStr(OnlineSub.ItemPropertiesList[j].Rarity)$"]";
|
NewItems[0].Item = OnlineSub.ItemPropertiesList[j].Name@"["$RarityStr(OnlineSub.ItemPropertiesList[j].Rarity)$"]";
|
||||||
NewItems[0].MsgTime = WorldInfo.TimeSeconds;
|
NewItems[0].MsgTime = WorldInfo.TimeSeconds;
|
||||||
ExtPlayerController(Owner).ServerItemDropGet(NewItems[0].Item);
|
ExtPlayerController(Owner).ServerItemDropGet(NewItems[0].Item);
|
||||||
}
|
}
|
||||||
@ -1136,13 +1153,13 @@ simulated final function string RarityStr(byte R)
|
|||||||
{
|
{
|
||||||
switch (R)
|
switch (R)
|
||||||
{
|
{
|
||||||
case ITR_Common: return "Common";
|
case ITR_Common: return ITR_CommonText;
|
||||||
case ITR_Uncommon: return "Uncommon +";
|
case ITR_Uncommon: return ITR_UncommonText;
|
||||||
case ITR_Rare: return "Rare ++";
|
case ITR_Rare: return ITR_RareText;
|
||||||
case ITR_Legendary: return "Legendary +++";
|
case ITR_Legendary: return ITR_LegendaryText;
|
||||||
case ITR_ExceedinglyRare: return "Exceedingly Rare ++++";
|
case ITR_ExceedinglyRare: return ITR_ExceedinglyRareText;
|
||||||
case ITR_Mythical: return "Mythical !!!!";
|
case ITR_Mythical: return ITR_MythicalText;
|
||||||
default: return "Unknown -";
|
default: return ITR_DefaultText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1184,7 +1201,7 @@ simulated final function DrawItemsList()
|
|||||||
else */XS = XPos-XS;
|
else */XS = XPos-XS;
|
||||||
|
|
||||||
Canvas.SetPos(XS,YPos);
|
Canvas.SetPos(XS,YPos);
|
||||||
Canvas.DrawText("New Item:",,FontScale,FontScale);
|
Canvas.DrawText(NewItemText,,FontScale,FontScale);
|
||||||
Canvas.SetPos(XS,YPos+(YSize*0.5));
|
Canvas.SetPos(XS,YPos+(YSize*0.5));
|
||||||
Canvas.DrawText(NewItems[i].Item,,FontScale,FontScale);
|
Canvas.DrawText(NewItems[i].Item,,FontScale,FontScale);
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Class MS_HUD extends HUD;
|
Class MS_HUD extends HUD;
|
||||||
|
|
||||||
|
var localized string PressEscToCancel;
|
||||||
|
var localized string AdjustSensetive;
|
||||||
|
|
||||||
var bool bShowProgress,bProgressDC;
|
var bool bShowProgress,bProgressDC;
|
||||||
var array<string> ProgressLines;
|
var array<string> ProgressLines;
|
||||||
var MX_MiniGameBase ActiveGame;
|
var MX_MiniGameBase ActiveGame;
|
||||||
@ -37,7 +40,7 @@ final function ShowProgressMsg(string S, optional bool bDis)
|
|||||||
ParseStringIntoArray(S,ProgressLines,"|",false);
|
ParseStringIntoArray(S,ProgressLines,"|",false);
|
||||||
bProgressDC = bDis;
|
bProgressDC = bDis;
|
||||||
if (!bDis)
|
if (!bDis)
|
||||||
ProgressLines.AddItem("Press [Esc] to cancel connection"); // TODO: Localization
|
ProgressLines.AddItem(PressEscToCancel);
|
||||||
}
|
}
|
||||||
|
|
||||||
final function RenderProgress()
|
final function RenderProgress()
|
||||||
@ -60,7 +63,7 @@ final function RenderProgress()
|
|||||||
Y+=YL;
|
Y+=YL;
|
||||||
}
|
}
|
||||||
Canvas.SetPos(Canvas.ClipX*0.2,Canvas.ClipY*0.91);
|
Canvas.SetPos(Canvas.ClipX*0.2,Canvas.ClipY*0.91);
|
||||||
Canvas.DrawText("Use Mouse scroll to adjust sensitivity: "$(ActiveGame.Sensitivity*100.f)$"%",,Sc,Sc); // TODO: Localization
|
Canvas.DrawText(AdjustSensetive@(ActiveGame.Sensitivity*100.f)$"%",,Sc,Sc);
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultproperties
|
defaultproperties
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
Class MS_PC extends KFPlayerController;
|
Class MS_PC extends KFPlayerController;
|
||||||
|
|
||||||
|
var localized string ConnectingTo;
|
||||||
|
var localized string ConnectionAborted;
|
||||||
|
var localized string UserAbortedConnection;
|
||||||
|
var localized string ConnectionError;
|
||||||
|
var localized string Disconnecting;
|
||||||
|
|
||||||
var MS_PendingData TravelData;
|
var MS_PendingData TravelData;
|
||||||
var byte ConnectionCounter;
|
var byte ConnectionCounter;
|
||||||
var bool bConnectionFailed;
|
var bool bConnectionFailed;
|
||||||
@ -18,7 +24,7 @@ event PlayerTick(float DeltaTime)
|
|||||||
{
|
{
|
||||||
if (TravelData.PendingURL!="")
|
if (TravelData.PendingURL!="")
|
||||||
{
|
{
|
||||||
MS_HUD(myHUD).ShowProgressMsg("Connecting to "$TravelData.PendingURL); // TODO: Localization
|
MS_HUD(myHUD).ShowProgressMsg(ConnectingTo@TravelData.PendingURL);
|
||||||
ConsoleCommand("Open "$TravelData.PendingURL);
|
ConsoleCommand("Open "$TravelData.PendingURL);
|
||||||
}
|
}
|
||||||
if (TravelData.PendingSong!=None)
|
if (TravelData.PendingSong!=None)
|
||||||
@ -64,7 +70,7 @@ final function AbortConnection()
|
|||||||
HandleNetworkError(false);
|
HandleNetworkError(false);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShowConnectionProgressPopup(PMT_ConnectionFailure,"Connection aborted","User aborted connection...",true); // TODO: Localization
|
ShowConnectionProgressPopup(PMT_ConnectionFailure,ConnectionAborted,UserAbortedConnection,true);
|
||||||
ConsoleCommand("Cancel");
|
ConsoleCommand("Cancel");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -80,7 +86,7 @@ reliable client event bool ShowConnectionProgressPopup(EProgressMessageType Prog
|
|||||||
case PMT_ConnectionFailure:
|
case PMT_ConnectionFailure:
|
||||||
case PMT_PeerConnectionFailure:
|
case PMT_PeerConnectionFailure:
|
||||||
bConnectionFailed = true;
|
bConnectionFailed = true;
|
||||||
MS_HUD(myHUD).ShowProgressMsg("Connection Error: "$ProgressTitle$"|"$ProgressDescription$"|Disconnecting...",true); // TODO: Localization
|
MS_HUD(myHUD).ShowProgressMsg(ConnectionError@ProgressTitle$"|"$ProgressDescription$"|"$Disconnecting,true);
|
||||||
SetTimer(4,false,'HandleNetworkError');
|
SetTimer(4,false,'HandleNetworkError');
|
||||||
return true;
|
return true;
|
||||||
case PMT_DownloadProgress:
|
case PMT_DownloadProgress:
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
Class MX_PongGame extends MX_MiniGameBase;
|
Class MX_PongGame extends MX_MiniGameBase;
|
||||||
|
|
||||||
|
var localized string PressToStartText;
|
||||||
|
var localized string ScoreText;
|
||||||
|
var localized string PlaysText;
|
||||||
|
|
||||||
var int Score,NumPlays;
|
var int Score,NumPlays;
|
||||||
|
|
||||||
var vector PlayerPad,EnemyPad,BallPos,BallVel,BallTrajectory;
|
var vector PlayerPad,EnemyPad,BallPos,BallVel,BallTrajectory;
|
||||||
@ -84,21 +88,21 @@ function Render(float XPos, float YPos, float XSize, float YSize)
|
|||||||
|
|
||||||
// Score
|
// Score
|
||||||
H = WorldInfo.RealTimeSeconds * 0.6;
|
H = WorldInfo.RealTimeSeconds * 0.6;
|
||||||
Canvas.Font = Canvas.GetDefaultCanvasFont();
|
Canvas.Font = Font(DynamicLoadObject("UI_Canvas_Fonts.Font_Main",class'Font'));
|
||||||
W = FMin(YSize/200.f,3.f);
|
W = FMin(YSize/200.f,3.f);
|
||||||
if (!bGameStarted)
|
if (!bGameStarted)
|
||||||
{
|
{
|
||||||
Canvas.SetDrawColor(128,64,64,Abs(Sin(H))*96.f+128);
|
Canvas.SetDrawColor(128,64,64,Abs(Sin(H))*96.f+128);
|
||||||
Canvas.SetPos(XPos+XSize*0.4,YPos+YSize*0.2);
|
Canvas.SetPos(XPos+XSize*0.4,YPos+YSize*0.2);
|
||||||
Canvas.DrawText("Press Fire to start pong",,W,W); // TODO: Localization
|
Canvas.DrawText(PressToStartText,,W,W);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Canvas.SetDrawColor(255,255,128,Abs(Sin(H))*96.f);
|
Canvas.SetDrawColor(255,255,128,Abs(Sin(H))*96.f);
|
||||||
Canvas.SetPos(XPos+XSize*0.2,YPos+YSize*0.22);
|
Canvas.SetPos(XPos+XSize*0.2,YPos+YSize*0.22);
|
||||||
Canvas.DrawText("Score: "$string(Score),,W,W); // TODO: Localization
|
Canvas.DrawText(ScoreText@string(Score),,W,W);
|
||||||
Canvas.SetPos(XPos+XSize*0.2,YPos+YSize*0.68);
|
Canvas.SetPos(XPos+XSize*0.2,YPos+YSize*0.68);
|
||||||
Canvas.DrawText("Plays: "$string(NumPlays),,W,W); // TODO: Localization
|
Canvas.DrawText(PlaysText@string(NumPlays),,W,W);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Borders
|
// Borders
|
||||||
|
@ -114,7 +114,7 @@ function Timer()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
OldPerkPoints = PendingPerk.CurrentSP;
|
OldPerkPoints = PendingPerk.CurrentSP;
|
||||||
PerkLabel.SetText(Level$PendingPerk.GetLevelString()@PendingPerk.PerkName$" ("$Points$" "$PendingPerk.CurrentSP$")");
|
PerkLabel.SetText(Level$PendingPerk.GetLevelString()@PendingPerk.PerkName@"("$Points@PendingPerk.CurrentSP$")");
|
||||||
for (i=0; i<StatsList.ItemComponents.Length; ++i) // Just make sure perk stays the same.
|
for (i=0; i<StatsList.ItemComponents.Length; ++i) // Just make sure perk stays the same.
|
||||||
{
|
{
|
||||||
StatBuyers[i].SetActivePerk(PendingPerk);
|
StatBuyers[i].SetActivePerk(PendingPerk);
|
||||||
@ -139,7 +139,7 @@ function Timer()
|
|||||||
B_Prestige.SetDisabled(!PendingPerk.CanPrestige());
|
B_Prestige.SetDisabled(!PendingPerk.CanPrestige());
|
||||||
|
|
||||||
OldPerkPoints = PendingPerk.CurrentSP;
|
OldPerkPoints = PendingPerk.CurrentSP;
|
||||||
PerkLabel.SetText(Level$PendingPerk.GetLevelString()@PendingPerk.PerkName$" ("$Points$" "$PendingPerk.CurrentSP$")");
|
PerkLabel.SetText(Level$PendingPerk.GetLevelString()@PendingPerk.PerkName@"("$Points@PendingPerk.CurrentSP$")");
|
||||||
for (i=0; i<StatsList.ItemComponents.Length; ++i) // Just make sure perk stays the same.
|
for (i=0; i<StatsList.ItemComponents.Length; ++i) // Just make sure perk stays the same.
|
||||||
StatBuyers[i].CheckBuyLimit();
|
StatBuyers[i].CheckBuyLimit();
|
||||||
|
|
||||||
@ -153,6 +153,7 @@ final function UpdateTraits()
|
|||||||
{
|
{
|
||||||
local array< class<Ext_TGroupBase> > CatList;
|
local array< class<Ext_TGroupBase> > CatList;
|
||||||
local class<Ext_TGroupBase> N;
|
local class<Ext_TGroupBase> N;
|
||||||
|
local Ext_TGroupBase N_obj;
|
||||||
local int i,j;
|
local int i,j;
|
||||||
local class<Ext_TraitBase> TC;
|
local class<Ext_TraitBase> TC;
|
||||||
local string S;
|
local string S;
|
||||||
@ -176,8 +177,9 @@ final function UpdateTraits()
|
|||||||
N = CatList[j];
|
N = CatList[j];
|
||||||
if (j>0)
|
if (j>0)
|
||||||
{
|
{
|
||||||
TraitsList.AddLine("--"$N.Static.GetUIInfo(PendingPerk),-1);
|
N_obj = new N;
|
||||||
TraitsList.ToolTip.AddItem(N.Static.GetUIDesc());
|
TraitsList.AddLine("--"$N_obj.GetUIInfo(PendingPerk),-1);
|
||||||
|
TraitsList.ToolTip.AddItem(N_obj.GetUIDesc());
|
||||||
}
|
}
|
||||||
for (i=0; i<PendingPerk.PerkTraits.Length; ++i)
|
for (i=0; i<PendingPerk.PerkTraits.Length; ++i)
|
||||||
{
|
{
|
||||||
@ -236,7 +238,7 @@ function DrawPerkInfo(Canvas C, int Index, float YOffset, float Height, float Wi
|
|||||||
C.DrawText(P.PerkName,,Sc,Sc);
|
C.DrawText(P.PerkName,,Sc,Sc);
|
||||||
|
|
||||||
C.SetPos(6+Height,YOffset+Height*0.5);
|
C.SetPos(6+Height,YOffset+Height*0.5);
|
||||||
C.DrawText("Lv "$P.GetLevelString()$" ("$P.CurrentEXP$"/"$P.NextLevelEXP$" XP)",,Sc,Sc);
|
C.DrawText("Lv "$P.GetLevelString()$" ("$P.CurrentEXP$"/"$P.NextLevelEXP$" XP)",,Sc,Sc); // TODO: Localization
|
||||||
}
|
}
|
||||||
|
|
||||||
function SwitchedPerk(int Index, bool bRight, int MouseX, int MouseY)
|
function SwitchedPerk(int Index, bool bRight, int MouseX, int MouseY)
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
Class UIP_PerkSelectionLobby extends UIP_PerkSelection;
|
Class UIP_PerkSelectionLobby extends UIP_PerkSelection;
|
||||||
|
|
||||||
|
var localized string LevelText;
|
||||||
|
var localized string PointsText;
|
||||||
|
var localized string NoPerkSelectedText;
|
||||||
|
|
||||||
function Timer()
|
function Timer()
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
@ -50,7 +54,7 @@ function Timer()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
OldPerkPoints = PendingPerk.CurrentSP;
|
OldPerkPoints = PendingPerk.CurrentSP;
|
||||||
PerkLabel.SetText("Lv"$PendingPerk.GetLevelString()@PendingPerk.PerkName$" (Points: "$PendingPerk.CurrentSP$")");
|
PerkLabel.SetText(LevelText$PendingPerk.GetLevelString()@PendingPerk.PerkName@"("$PointsText@PendingPerk.CurrentSP$")");
|
||||||
for (i=0; i<StatsList.ItemComponents.Length; ++i) // Just make sure perk stays the same.
|
for (i=0; i<StatsList.ItemComponents.Length; ++i) // Just make sure perk stays the same.
|
||||||
{
|
{
|
||||||
StatBuyers[i].SetActivePerk(PendingPerk);
|
StatBuyers[i].SetActivePerk(PendingPerk);
|
||||||
@ -63,13 +67,13 @@ function Timer()
|
|||||||
for (i=0; i<StatsList.ItemComponents.Length; ++i)
|
for (i=0; i<StatsList.ItemComponents.Length; ++i)
|
||||||
StatBuyers[i].CloseMenu();
|
StatBuyers[i].CloseMenu();
|
||||||
StatsList.ItemComponents.Length = 0;
|
StatsList.ItemComponents.Length = 0;
|
||||||
PerkLabel.SetText("<No perk selected>"); // TODO: Localization
|
PerkLabel.SetText(NoPerkSelectedText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (PendingPerk!=None && OldPerkPoints!=PendingPerk.CurrentSP)
|
else if (PendingPerk!=None && OldPerkPoints!=PendingPerk.CurrentSP)
|
||||||
{
|
{
|
||||||
OldPerkPoints = PendingPerk.CurrentSP;
|
OldPerkPoints = PendingPerk.CurrentSP;
|
||||||
PerkLabel.SetText("Lv"$PendingPerk.GetLevelString()@PendingPerk.PerkName$" (Points: "$PendingPerk.CurrentSP$")");
|
PerkLabel.SetText(LevelText$PendingPerk.GetLevelString()@PendingPerk.PerkName@"("$PointsText@PendingPerk.CurrentSP$")");
|
||||||
for (i=0; i<StatsList.ItemComponents.Length; ++i) // Just make sure perk stays the same.
|
for (i=0; i<StatsList.ItemComponents.Length; ++i) // Just make sure perk stays the same.
|
||||||
StatBuyers[i].CheckBuyLimit();
|
StatBuyers[i].CheckBuyLimit();
|
||||||
|
|
||||||
|
@ -4,7 +4,8 @@ var KFGUI_TextField TraitInfo;
|
|||||||
var KFGUI_Button YesButton;
|
var KFGUI_Button YesButton;
|
||||||
var KFGUI_Button NoButton;
|
var KFGUI_Button NoButton;
|
||||||
|
|
||||||
var class<Ext_TraitBase> MyTrait;
|
var class<Ext_TraitBase> MyTraitClass;
|
||||||
|
var Ext_TraitBase MyTrait;
|
||||||
var int TraitIndex;
|
var int TraitIndex;
|
||||||
var Ext_PerkBase MyPerk;
|
var Ext_PerkBase MyPerk;
|
||||||
var int OldPoints,OldLevel;
|
var int OldPoints,OldLevel;
|
||||||
@ -33,14 +34,16 @@ function CloseMenu()
|
|||||||
Super.CloseMenu();
|
Super.CloseMenu();
|
||||||
MyPerk = None;
|
MyPerk = None;
|
||||||
MyTrait = None;
|
MyTrait = None;
|
||||||
|
MyTraitClass = None;
|
||||||
SetTimer(0,false);
|
SetTimer(0,false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ShowTraitInfo(int Index, Ext_PerkBase Perk)
|
function ShowTraitInfo(int Index, Ext_PerkBase Perk)
|
||||||
{
|
{
|
||||||
MyTrait = Perk.PerkTraits[Index].TraitType;
|
MyTraitClass = Perk.PerkTraits[Index].TraitType;
|
||||||
WindowTitle = MyTrait.Default.TraitName;
|
MyTrait = new MyTraitClass;
|
||||||
TraitInfo.SetText(MyTrait.Static.GetPerkDescription());
|
WindowTitle = MyTraitClass.Default.TraitName;
|
||||||
|
TraitInfo.SetText(MyTrait.GetPerkDescription());
|
||||||
|
|
||||||
OldPoints = -1;
|
OldPoints = -1;
|
||||||
OldLevel = -1;
|
OldLevel = -1;
|
||||||
@ -58,15 +61,15 @@ function Timer()
|
|||||||
{
|
{
|
||||||
OldPoints = MyPerk.CurrentSP;
|
OldPoints = MyPerk.CurrentSP;
|
||||||
OldLevel = MyPerk.PerkTraits[TraitIndex].CurrentLevel;
|
OldLevel = MyPerk.PerkTraits[TraitIndex].CurrentLevel;
|
||||||
if (OldLevel>=MyTrait.Default.NumLevels)
|
if (OldLevel>=MyTraitClass.Default.NumLevels)
|
||||||
{
|
{
|
||||||
YesButton.ButtonText = ButtonBuyDisabledText;
|
YesButton.ButtonText = ButtonBuyDisabledText;
|
||||||
YesButton.SetDisabled(true);
|
YesButton.SetDisabled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Cost = MyTrait.Static.GetTraitCost(OldLevel);
|
Cost = MyTraitClass.Static.GetTraitCost(OldLevel);
|
||||||
YesButton.ButtonText = ButtonBuyText$" ("$Cost$")";
|
YesButton.ButtonText = ButtonBuyText$" ("$Cost$")";
|
||||||
if (Cost>OldPoints || !MyTrait.Static.MeetsRequirements(OldLevel,MyPerk))
|
if (Cost>OldPoints || !MyTraitClass.Static.MeetsRequirements(OldLevel,MyPerk))
|
||||||
YesButton.SetDisabled(true);
|
YesButton.SetDisabled(true);
|
||||||
else YesButton.SetDisabled(false);
|
else YesButton.SetDisabled(false);
|
||||||
}
|
}
|
||||||
@ -77,7 +80,7 @@ function ButtonClicked(KFGUI_Button Sender)
|
|||||||
switch (Sender.ID)
|
switch (Sender.ID)
|
||||||
{
|
{
|
||||||
case 'Yes':
|
case 'Yes':
|
||||||
ExtPlayerController(GetPlayer()).BoughtTrait(MyPerk.Class,MyTrait);
|
ExtPlayerController(GetPlayer()).BoughtTrait(MyPerk.Class,MyTraitClass);
|
||||||
break;
|
break;
|
||||||
case 'No':
|
case 'No':
|
||||||
DoClose();
|
DoClose();
|
||||||
|
Loading…
Reference in New Issue
Block a user