notifications
This commit is contained in:
parent
19d50bd2ef
commit
30838fe006
@ -14,6 +14,8 @@ var config int DoshLifespan;
|
|||||||
var config array<string> KickProtectedList;
|
var config array<string> KickProtectedList;
|
||||||
var config array<int> PerPlayerMaxMonsters;
|
var config array<int> PerPlayerMaxMonsters;
|
||||||
|
|
||||||
|
var bool bXpNotifications;
|
||||||
|
|
||||||
var array<MskGsRepInfo> RepClients;
|
var array<MskGsRepInfo> RepClients;
|
||||||
var array<Controller> MskGsMemberList;
|
var array<Controller> MskGsMemberList;
|
||||||
|
|
||||||
@ -129,11 +131,31 @@ function Initialize()
|
|||||||
VoteCollector.bRandomizeNextMap = bRandomizeNextMap;
|
VoteCollector.bRandomizeNextMap = bRandomizeNextMap;
|
||||||
VoteCollector.SortPolicy = SortStats;
|
VoteCollector.SortPolicy = SortStats;
|
||||||
|
|
||||||
if (MskGs_Endless(MyKFGI) != None) MskGs_Endless(MyKFGI).Mut = Self;
|
if (MskGs_Endless(MyKFGI) != None)
|
||||||
if (MskGs_Objective(MyKFGI) != None) MskGs_Objective(MyKFGI).Mut = Self;
|
{
|
||||||
if (MskGs_Survival(MyKFGI) != None) MskGs_Survival(MyKFGI).Mut = Self;
|
bXpNotifications = true;
|
||||||
if (MskGs_VersusSurvival(MyKFGI) != None) MskGs_VersusSurvival(MyKFGI).Mut = Self;
|
MskGs_Endless(MyKFGI).Mut = Self;
|
||||||
if (MskGs_WeeklySurvival(MyKFGI) != None) MskGs_WeeklySurvival(MyKFGI).Mut = Self;
|
}
|
||||||
|
else if (MskGs_Objective(MyKFGI) != None)
|
||||||
|
{
|
||||||
|
bXpNotifications = (MyKFGI.GameDifficulty != 3);
|
||||||
|
MskGs_Objective(MyKFGI).Mut = Self;
|
||||||
|
}
|
||||||
|
else if (MskGs_Survival(MyKFGI) != None)
|
||||||
|
{
|
||||||
|
bXpNotifications = (MyKFGI.GameDifficulty != 3);
|
||||||
|
MskGs_Survival(MyKFGI).Mut = Self;
|
||||||
|
}
|
||||||
|
else if (MskGs_VersusSurvival(MyKFGI) != None)
|
||||||
|
{
|
||||||
|
bXpNotifications = false;
|
||||||
|
MskGs_VersusSurvival(MyKFGI).Mut = Self;
|
||||||
|
}
|
||||||
|
else if (MskGs_WeeklySurvival(MyKFGI) != None)
|
||||||
|
{
|
||||||
|
bXpNotifications = true;
|
||||||
|
MskGs_WeeklySurvival(MyKFGI).Mut = Self;
|
||||||
|
}
|
||||||
|
|
||||||
steamworks = class'GameEngine'.static.GetOnlineSubsystem();
|
steamworks = class'GameEngine'.static.GetOnlineSubsystem();
|
||||||
|
|
||||||
@ -230,19 +252,22 @@ function bool PreventDeath(Pawn Killed, Controller Killer, class<DamageType> dam
|
|||||||
function AddMskGsMember(Controller C)
|
function AddMskGsMember(Controller C)
|
||||||
{
|
{
|
||||||
MskGsMemberList.AddItem(C);
|
MskGsMemberList.AddItem(C);
|
||||||
if (MskGsMemberList.Length >= 10)
|
if (bXpNotifications)
|
||||||
{
|
{
|
||||||
if (C.PlayerReplicationInfo != NONE)
|
if (MskGsMemberList.Length >= 10)
|
||||||
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName@" has joined the game! XP bonus: +50% (MAX!)");
|
{
|
||||||
|
if (C.PlayerReplicationInfo != NONE)
|
||||||
|
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName$" gives a boost to this server! XP bonus: +50% (MAX!)");
|
||||||
|
else
|
||||||
|
WorldInfo.Game.Broadcast(C, "XP bonus: +50% (MAX!)");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
WorldInfo.Game.Broadcast(C, "XP bonus: +50% (MAX!)");
|
{
|
||||||
}
|
if (C.PlayerReplicationInfo != NONE)
|
||||||
else
|
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName$" gives a boost to this server! XP bonus: +"$string(MskGsMemberList.Length * 5)$"%");
|
||||||
{
|
else
|
||||||
if (C.PlayerReplicationInfo != NONE)
|
WorldInfo.Game.Broadcast(C, "XP bonus: +"$string(MskGsMemberList.Length * 5)$"%");
|
||||||
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName@" has joined the game! XP bonus: +"$string(MskGsMemberList.Length * 5)$"% of 50%");
|
}
|
||||||
else
|
|
||||||
WorldInfo.Game.Broadcast(C, "XP bonus: +"$string(MskGsMemberList.Length * 5)$"% of 50%");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,19 +296,29 @@ function NotifyLogout(Controller C)
|
|||||||
VoteCollector.NotifyLogout(C);
|
VoteCollector.NotifyLogout(C);
|
||||||
|
|
||||||
MskGsMemberList.RemoveItem(C);
|
MskGsMemberList.RemoveItem(C);
|
||||||
if (MskGsMemberList.Length >= 10)
|
if (bXpNotifications)
|
||||||
{
|
{
|
||||||
if (C.PlayerReplicationInfo != NONE)
|
if (MskGsMemberList.Length >= 10)
|
||||||
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName@" left the game. XP bonus: +50% (MAX!)");
|
{
|
||||||
|
if (C.PlayerReplicationInfo != NONE)
|
||||||
|
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName$" left the game. XP bonus: +50% (MAX!)");
|
||||||
|
else
|
||||||
|
WorldInfo.Game.Broadcast(C, "XP bonus: +50% (MAX!)");
|
||||||
|
}
|
||||||
|
else if (MskGsMemberList.Length > 0)
|
||||||
|
{
|
||||||
|
if (C.PlayerReplicationInfo != NONE)
|
||||||
|
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName$" left the game. XP bonus: +"$string(MskGsMemberList.Length * 5)$"%");
|
||||||
|
else
|
||||||
|
WorldInfo.Game.Broadcast(C, "XP bonus: +"$string(MskGsMemberList.Length * 5)$"%");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
WorldInfo.Game.Broadcast(C, "XP bonus: +50% (MAX!)");
|
{
|
||||||
}
|
if (C.PlayerReplicationInfo != NONE)
|
||||||
else
|
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName$" left the game. No XP bonus now.");
|
||||||
{
|
else
|
||||||
if (C.PlayerReplicationInfo != NONE)
|
WorldInfo.Game.Broadcast(C, "No XP bonus now.");
|
||||||
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName@" left the game. XP bonus: +"$string(MskGsMemberList.Length * 5)$"%");
|
}
|
||||||
else
|
|
||||||
WorldInfo.Game.Broadcast(C, "XP bonus: +"$string(MskGsMemberList.Length * 5)$"%");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = RepClients.Length - 1; i >= 0; i--)
|
for (i = RepClients.Length - 1; i >= 0; i--)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user