Compare commits
No commits in common. "master" and "v1.0.1" have entirely different histories.
@ -1,33 +0,0 @@
|
||||
root = true
|
||||
|
||||
# Global
|
||||
[*]
|
||||
indent_style = unset
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = unset
|
||||
|
||||
# Unreal Engine 3 / Source
|
||||
[*.uc]
|
||||
indent_style = tab
|
||||
|
||||
[*.{uci,upkg}]
|
||||
|
||||
# Unreal Engine 3 / i18n
|
||||
[*.{chn,cht,cze,dan,deu,dut,esl,esn,fra,frc,hun,int,ita,jpn,kor,pol,por,ptb,rus,tur,ukr}]
|
||||
charset = utf-16le
|
||||
|
||||
# Other
|
||||
[*.md]
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.{txt,cfg,conf}]
|
||||
indent_style = tab
|
115
.github/workflows/mega-linter.yml
vendored
115
.github/workflows/mega-linter.yml
vendored
@ -1,115 +0,0 @@
|
||||
---
|
||||
name: MegaLinter
|
||||
|
||||
permissions: read-all
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
APPLY_FIXES: none
|
||||
APPLY_FIXES_EVENT: pull_request
|
||||
APPLY_FIXES_MODE: commit
|
||||
FILTER_REGEX_EXCLUDE: (mega-linter.yml)
|
||||
DISABLE: SPELL
|
||||
DISABLE_ERRORS_LINTERS: COPYPASTE_JSCPD
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}-${{ github.workflow }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
megalinter:
|
||||
name: MegaLinter
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
|
||||
with:
|
||||
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: MegaLinter
|
||||
uses: oxsecurity/megalinter@7e042c726c68415475b05a65a686c612120a1232
|
||||
id: ml
|
||||
env:
|
||||
VALIDATE_ALL_CODEBASE: true
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Archive production artifacts
|
||||
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392
|
||||
if: success() || failure()
|
||||
with:
|
||||
name: MegaLinter reports
|
||||
path: |
|
||||
megalinter-reports
|
||||
mega-linter.log
|
||||
|
||||
- name: Set APPLY_FIXES_IF var
|
||||
run: |
|
||||
printf 'APPLY_FIXES_IF=%s\n' "${{
|
||||
steps.ml.outputs.has_updated_sources == 1 &&
|
||||
(
|
||||
env.APPLY_FIXES_EVENT == 'all' ||
|
||||
env.APPLY_FIXES_EVENT == github.event_name
|
||||
) &&
|
||||
(
|
||||
github.event_name == 'push' ||
|
||||
github.event.pull_request.head.repo.full_name == github.repository
|
||||
)
|
||||
}}" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: Set APPLY_FIXES_IF_* vars
|
||||
run: |
|
||||
printf 'APPLY_FIXES_IF_PR=%s\n' "${{
|
||||
env.APPLY_FIXES_IF == 'true' &&
|
||||
env.APPLY_FIXES_MODE == 'pull_request'
|
||||
}}" >> "${GITHUB_ENV}"
|
||||
printf 'APPLY_FIXES_IF_COMMIT=%s\n' "${{
|
||||
env.APPLY_FIXES_IF == 'true' &&
|
||||
env.APPLY_FIXES_MODE == 'commit' &&
|
||||
(!contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref))
|
||||
}}" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: Create Pull Request with applied fixes
|
||||
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
|
||||
id: cpr
|
||||
if: env.APPLY_FIXES_IF_PR == 'true'
|
||||
with:
|
||||
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
|
||||
commit-message: "[MegaLinter] Apply linters automatic fixes"
|
||||
title: "[MegaLinter] Apply linters automatic fixes"
|
||||
labels: bot
|
||||
|
||||
- name: Create PR output
|
||||
if: env.APPLY_FIXES_IF_PR == 'true'
|
||||
run: |
|
||||
echo "PR Number - ${{ steps.cpr.outputs.pull-request-number }}"
|
||||
echo "PR URL - ${{ steps.cpr.outputs.pull-request-url }}"
|
||||
|
||||
- name: Prepare commit
|
||||
if: env.APPLY_FIXES_IF_COMMIT == 'true'
|
||||
run: sudo chown -Rc $UID .git/
|
||||
|
||||
- name: Commit and push applied linter fixes
|
||||
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d
|
||||
if: env.APPLY_FIXES_IF_COMMIT == 'true'
|
||||
with:
|
||||
branch: >-
|
||||
${{
|
||||
github.event.pull_request.head.ref ||
|
||||
github.head_ref ||
|
||||
github.ref
|
||||
}}
|
||||
commit_message: "[MegaLinter] Apply linters fixes"
|
||||
commit_user_name: "github-actions"
|
||||
commit_user_email: "github-actions[bot]@users.noreply.github.com"
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*.psd
|
||||
/ignore
|
@ -7,7 +7,6 @@ var public config String NegativeColorHex;
|
||||
var public config bool bChatNotifications;
|
||||
var public config bool bHudNotifications;
|
||||
var public config float DefferedClearHUD;
|
||||
var public config int VoteTime;
|
||||
|
||||
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
|
||||
{
|
||||
@ -18,9 +17,6 @@ public static function InitConfig(int Version, int LatestVersion, E_LogLevel Log
|
||||
case `NO_CONFIG:
|
||||
ApplyDefault(LogLevel);
|
||||
|
||||
case 1:
|
||||
default.VoteTime = class'KFVoteCollector'.default.VoteTime;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
@ -51,12 +47,6 @@ public static function Load(E_LogLevel LogLevel)
|
||||
`Log_Error("DefferedClearHUD" @ "(" $ default.DefferedClearHUD $ ")" @ "must be greater than 0");
|
||||
default.DefferedClearHUD = 0.0f;
|
||||
}
|
||||
|
||||
if (default.VoteTime <= 0 || default.VoteTime > 255)
|
||||
{
|
||||
`Log_Error("VoteTime" @ "(" $ default.VoteTime $ ")" @ "must be in range 1-255");
|
||||
default.VoteTime = class'KFVoteCollector'.default.VoteTime;
|
||||
}
|
||||
}
|
||||
|
||||
protected static function ApplyDefault(E_LogLevel LogLevel)
|
||||
@ -68,7 +58,6 @@ protected static function ApplyDefault(E_LogLevel LogLevel)
|
||||
default.PositiveColorHex = class'KFLocalMessage'.default.EventColor;
|
||||
default.NegativeColorHex = class'KFLocalMessage'.default.InteractionColor;
|
||||
default.DefferedClearHUD = 1.0f;
|
||||
default.VoteTime = class'KFVoteCollector'.default.VoteTime;
|
||||
}
|
||||
|
||||
protected static function bool IsValidHexColor(String HexColor, E_LogLevel LogLevel)
|
||||
|
@ -2,7 +2,7 @@ class CVC extends Info
|
||||
dependson(CVC_LocalMessage)
|
||||
config(CVC);
|
||||
|
||||
const LatestVersion = 2;
|
||||
const LatestVersion = 1;
|
||||
|
||||
const CfgKickProtected = class'KickProtected';
|
||||
const CfgKickVote = class'KickVote';
|
||||
@ -79,8 +79,6 @@ private function PreInit()
|
||||
case `NO_CONFIG:
|
||||
`Log_Info("Config created");
|
||||
|
||||
case 1:
|
||||
|
||||
case MaxInt:
|
||||
`Log_Info("Config updated to version"@LatestVersion);
|
||||
break;
|
||||
@ -183,13 +181,6 @@ public function bool PlayerIsKickProtected(PlayerReplicationInfo PRI)
|
||||
return (KickProtectedPlayers.Find('Uid', PRI.UniqueId.Uid) != INDEX_NONE);
|
||||
}
|
||||
|
||||
public function bool PlayerPerkLoaded(PlayerReplicationInfo PRI)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
return (KFPlayerReplicationInfo(PRI) != None && KFPlayerReplicationInfo(PRI).CurrentPerkClass != None);
|
||||
}
|
||||
|
||||
public function bool PlayerIsStartWaveKickProtected(KFPlayerController KFPC)
|
||||
{
|
||||
`Log_Trace();
|
||||
@ -333,20 +324,14 @@ public function NotifyLogin(Controller C)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (!CreateRepInfo(C))
|
||||
{
|
||||
`Log_Error("Can't create RepInfo for:" @ C);
|
||||
}
|
||||
CreateRepInfo(C);
|
||||
}
|
||||
|
||||
public function NotifyLogout(Controller C)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (!DestroyRepInfo(C))
|
||||
{
|
||||
`Log_Error("Can't destroy RepInfo of:" @ C);
|
||||
}
|
||||
DestroyRepInfo(C);
|
||||
}
|
||||
|
||||
public function bool CreateRepInfo(Controller C)
|
||||
@ -382,8 +367,8 @@ public function bool DestroyRepInfo(Controller C)
|
||||
{
|
||||
if (RepInfo.Owner == C)
|
||||
{
|
||||
RepInfos.RemoveItem(RepInfo);
|
||||
RepInfo.SafeDestroy();
|
||||
RepInfos.RemoveItem(RepInfo);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -391,7 +376,7 @@ public function bool DestroyRepInfo(Controller C)
|
||||
return false;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
DefaultProperties
|
||||
{
|
||||
|
||||
}
|
@ -1 +1,62 @@
|
||||
class CVCMut extends Mut; // backward compatibility
|
||||
class CVCMut extends KFMutator;
|
||||
|
||||
var private CVC CVC;
|
||||
|
||||
public simulated function bool SafeDestroy()
|
||||
{
|
||||
return (bPendingDelete || bDeleteMe || Destroy());
|
||||
}
|
||||
|
||||
public event PreBeginPlay()
|
||||
{
|
||||
Super.PreBeginPlay();
|
||||
|
||||
if (WorldInfo.NetMode == NM_Client) return;
|
||||
|
||||
foreach WorldInfo.DynamicActors(class'CVC', CVC)
|
||||
{
|
||||
`Log_Base("Found 'CVC'");
|
||||
break;
|
||||
}
|
||||
|
||||
if (CVC == None)
|
||||
{
|
||||
`Log_Base("Spawn 'CVC'");
|
||||
CVC = WorldInfo.Spawn(class'CVC');
|
||||
}
|
||||
|
||||
if (CVC == None)
|
||||
{
|
||||
`Log_Base("Can't Spawn 'CVC', Destroy...");
|
||||
SafeDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
public function AddMutator(Mutator Mut)
|
||||
{
|
||||
if (Mut == Self) return;
|
||||
|
||||
if (Mut.Class == Class)
|
||||
Mut.Destroy();
|
||||
else
|
||||
Super.AddMutator(Mut);
|
||||
}
|
||||
|
||||
public function NotifyLogin(Controller C)
|
||||
{
|
||||
Super.NotifyLogin(C);
|
||||
|
||||
CVC.NotifyLogin(C);
|
||||
}
|
||||
|
||||
public function NotifyLogout(Controller C)
|
||||
{
|
||||
Super.NotifyLogout(C);
|
||||
|
||||
CVC.NotifyLogout(C);
|
||||
}
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
|
||||
}
|
@ -10,9 +10,6 @@ var private localized String PlayerIsStartWaveKickProtected;
|
||||
var const String PlayerCantStartKickVoteDefault;
|
||||
var private localized String PlayerCantStartKickVote;
|
||||
|
||||
var const String PlayerPerkIsNotLoadedDefault;
|
||||
var private localized String PlayerPerkIsNotLoaded;
|
||||
|
||||
var const String KickVoteNotEnoughPlayersDefault;
|
||||
var private localized String KickVoteNotEnoughPlayers;
|
||||
|
||||
@ -31,12 +28,23 @@ var private localized String VotedPlayers;
|
||||
var const String DidntVotePlayersDefault;
|
||||
var private localized String DidntVotePlayers;
|
||||
|
||||
// TODO:
|
||||
/*
|
||||
Kick vote hud:
|
||||
start vote + only yes votes:
|
||||
header: <player vote for player>
|
||||
second line: yes votes
|
||||
|
||||
pause and skip:
|
||||
first line: voted players
|
||||
second line: dont voted players
|
||||
*/
|
||||
|
||||
enum E_CVC_LocalMessageType
|
||||
{
|
||||
CVC_PlayerIsKickProtected,
|
||||
CVC_PlayerIsStartWaveKickProtected,
|
||||
CVC_PlayerCantStartKickVote,
|
||||
CVC_PlayerPerkIsNotLoaded,
|
||||
|
||||
CVC_KickVoteNotEnoughPlayers,
|
||||
CVC_KickVoteStarted,
|
||||
@ -92,9 +100,6 @@ public static function String GetLocalizedString(
|
||||
case CVC_PlayerCantStartKickVote:
|
||||
return ReplWaves(default.PlayerCantStartKickVote != "" ? default.PlayerCantStartKickVote : default.PlayerCantStartKickVoteDefault, String1);
|
||||
|
||||
case CVC_PlayerPerkIsNotLoaded:
|
||||
return ReplKickee(default.PlayerPerkIsNotLoaded != "" ? default.PlayerPerkIsNotLoaded : default.PlayerPerkIsNotLoadedDefault, String1);
|
||||
|
||||
case CVC_KickVoteNotEnoughPlayers:
|
||||
return ReplWaves(default.KickVoteNotEnoughPlayers != "" ? default.KickVoteNotEnoughPlayers : default.KickVoteNotEnoughPlayersDefault, String1);
|
||||
|
||||
@ -132,7 +137,7 @@ public static function String GetLocalizedString(
|
||||
return (String1 $ ":" @ class'KFCommon_LocalizedStrings'.default.NoString);
|
||||
|
||||
case CVC_VoteProgressHUD:
|
||||
return (default.DidntVotePlayers != "" ? default.DidntVotePlayers : default.DidntVotePlayersDefault) @ String2 $ (String1 != "" ? ("\n" $ (default.VotedPlayers != "" ? default.VotedPlayers : default.VotedPlayersDefault) @ String1) : "");
|
||||
return (default.VotedPlayers != "" ? default.VotedPlayers : default.VotedPlayersDefault) @ String1 $ (String2 != "" ? ("\n" $ (default.DidntVotePlayers != "" ? default.DidntVotePlayers : default.DidntVotePlayersDefault) @ String2) : "");
|
||||
}
|
||||
|
||||
return "";
|
||||
@ -143,7 +148,6 @@ defaultproperties
|
||||
PlayerIsKickProtectedDefault = "<kickee> is protected from kick"
|
||||
PlayerIsStartWaveKickProtectedDefault = "You can't kick <kickee> right now. He can be kicked when he plays at least <waves> wave(s)"
|
||||
PlayerCantStartKickVoteDefault = "You can't start kick vote now. You can start kick vote when you play at least <waves> wave(s)"
|
||||
PlayerPerkIsNotLoadedDefault = "You can't kick a player who hasn't loaded yet (<kickee>)"
|
||||
KickVoteNotEnoughPlayersDefault = "Not enough players to start vote (only players who have played at least <waves> wave(s) can vote)"
|
||||
KickVoteStartedDefault = "<kicker> has started a vote to kick <kickee>"
|
||||
KickVoteStartedForPlayerDefault = "<kicker> started voting to kick you"
|
||||
|
@ -38,7 +38,6 @@ public reliable client function WriteToChat(String Message, optional String HexC
|
||||
|
||||
if (KFPC.MyGFxManager.PartyWidget != None && KFPC.MyGFxManager.PartyWidget.PartyChatWidget != None)
|
||||
{
|
||||
KFPC.MyGFxManager.PartyWidget.PartyChatWidget.SetVisible(true);
|
||||
KFPC.MyGFxManager.PartyWidget.PartyChatWidget.AddChatMessage(Message, HexColor);
|
||||
}
|
||||
|
||||
|
@ -26,8 +26,6 @@ var private Array<S_KickVote> KickVotes;
|
||||
var public CVC CVC;
|
||||
var public E_LogLevel LogLevel;
|
||||
|
||||
var private KFGameInfo KFGI;
|
||||
|
||||
var private KFPlayerController KFPC_Kicker;
|
||||
var private KFPlayerController KFPC_Kickee;
|
||||
|
||||
@ -37,7 +35,6 @@ var private String KickeeName;
|
||||
var private String YesVotesPlayers, NoVotesPlayers;
|
||||
|
||||
var private bool AllowHudNotification;
|
||||
var private bool AllowSTPNotification; // SkipTrader and Pause
|
||||
|
||||
replication
|
||||
{
|
||||
@ -45,26 +42,15 @@ replication
|
||||
LogLevel;
|
||||
}
|
||||
|
||||
private function KFGameInfo GetKFGI()
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (KFGI != None) return KFGI;
|
||||
|
||||
KFGI = KFGameInfo(WorldInfo.Game);
|
||||
|
||||
return KFGI;
|
||||
}
|
||||
|
||||
public function ServerStartVoteKick(PlayerReplicationInfo PRI_Kickee, PlayerReplicationInfo PRI_Kicker)
|
||||
{
|
||||
local Array<KFPlayerReplicationInfo> KFPRIs;
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
local KFGameInfo KFGI;
|
||||
|
||||
`Log_Trace();
|
||||
|
||||
if (GetKFGI() == None) return;
|
||||
|
||||
KFGI = KFGameInfo(WorldInfo.Game);
|
||||
KFPC_Kicker = KFPlayerController(PRI_Kicker.Owner);
|
||||
KFPC_Kickee = KFPlayerController(PRI_Kickee.Owner);
|
||||
|
||||
@ -93,16 +79,6 @@ public function ServerStartVoteKick(PlayerReplicationInfo PRI_Kickee, PlayerRepl
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CVC.PlayerPerkLoaded(PRI_Kickee))
|
||||
{
|
||||
CVC.WriteToChatLocalized(
|
||||
KFPC_Kicker,
|
||||
CVC_PlayerPerkIsNotLoaded,
|
||||
CfgKickVote.default.WarningColorHex,
|
||||
KickeeName);
|
||||
return;
|
||||
}
|
||||
|
||||
if (CVC.PlayerIsStartWaveKickProtected(KFPC_Kickee))
|
||||
{
|
||||
CVC.WriteToChatLocalized(
|
||||
@ -187,7 +163,7 @@ public function ServerStartVoteKick(PlayerReplicationInfo PRI_Kickee, PlayerRepl
|
||||
GetKFPRIArray(KFPRIs);
|
||||
foreach KFPRIs(KFPRI)
|
||||
{
|
||||
KFPRI.ShowKickVote(PRI_Kickee, CfgKickVote.default.VoteTime, !(KFPRI == PRI_Kicker || KFPRI == PRI_Kickee));
|
||||
KFPRI.ShowKickVote(PRI_Kickee, VoteTime, !(KFPRI == PRI_Kicker || KFPRI == PRI_Kickee));
|
||||
}
|
||||
|
||||
if (CfgKickVote.default.bChatNotifications)
|
||||
@ -221,7 +197,7 @@ public function ServerStartVoteKick(PlayerReplicationInfo PRI_Kickee, PlayerRepl
|
||||
AllowHudNotification = bTraderIsOpen;
|
||||
}
|
||||
|
||||
SetTimer(CfgKickVote.default.VoteTime, false, nameof(ConcludeVoteKick), Self);
|
||||
SetTimer(VoteTime, false, nameof(ConcludeVoteKick), Self);
|
||||
|
||||
RecieveVoteKick(PRI_Kicker, true);
|
||||
}
|
||||
@ -406,7 +382,7 @@ public reliable server function RecieveVoteKick(PlayerReplicationInfo PRI, bool
|
||||
{
|
||||
CVC.BroadcastHUDLocalized(
|
||||
CVC_KickVoteStartedHUD,
|
||||
float(CfgKickVote.default.VoteTime),
|
||||
float(VoteTime),
|
||||
KickerName,
|
||||
KickeeName,
|
||||
YesVotesPlayers);
|
||||
@ -415,7 +391,7 @@ public reliable server function RecieveVoteKick(PlayerReplicationInfo PRI, bool
|
||||
{
|
||||
CVC.BroadcastHUDLocalized(
|
||||
CVC_KickVoteReceivedHUD,
|
||||
float(CfgKickVote.default.VoteTime),
|
||||
float(VoteTime),
|
||||
YesVotesPlayers,
|
||||
NoVotesPlayers);
|
||||
}
|
||||
@ -427,6 +403,7 @@ public reliable server function RecieveVoteKick(PlayerReplicationInfo PRI, bool
|
||||
|
||||
public function bool ShouldConcludeKickVote()
|
||||
{
|
||||
local KFGameInfo KFGI;
|
||||
local int NumPRIs;
|
||||
local int KickVotesNeeded;
|
||||
|
||||
@ -437,13 +414,15 @@ public function bool ShouldConcludeKickVote()
|
||||
return Super.ShouldConcludeKickVote();
|
||||
}
|
||||
|
||||
KFGI = KFGameInfo(WorldInfo.Game);
|
||||
|
||||
NumPRIs = VotingPlayers();
|
||||
|
||||
if (YesVotes + NoVotes >= NumPRIs)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (GetKFGI() != None)
|
||||
else if (KFGI != None)
|
||||
{
|
||||
KickVotesNeeded = FCeil(float(NumPRIs) * KFGI.KickVotePercentage);
|
||||
KickVotesNeeded = Clamp(KickVotesNeeded, 1, NumPRIs);
|
||||
@ -467,6 +446,7 @@ public reliable server function ConcludeVoteKick()
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
local PlayerReplicationInfo PRI;
|
||||
local int NumPRIs;
|
||||
local KFGameInfo KFGI;
|
||||
local KFPlayerController KickedPC;
|
||||
local int KickVotesNeeded;
|
||||
local int PrevKickedPlayers;
|
||||
@ -492,8 +472,10 @@ public reliable server function ConcludeVoteKick()
|
||||
{
|
||||
Super.ConcludeVoteKick();
|
||||
}
|
||||
else if (bIsKickVoteInProgress && GetKFGI() != None)
|
||||
else if (bIsKickVoteInProgress)
|
||||
{
|
||||
KFGI = KFGameInfo(WorldInfo.Game);
|
||||
|
||||
GetKFPRIArray(KFPRIs);
|
||||
|
||||
foreach KFPRIs(KFPRI) KFPRI.HideKickVote();
|
||||
@ -586,116 +568,13 @@ private function String LogVotePlayer(S_KickVote KV)
|
||||
return KV.Name @ "(UniqueID:" @ KV.UniqueID $ (KV.SteamID == "" ? "" : (", SteamID:" @ KV.SteamID $ ", Profile:" @ "https://steamcommunity.com/profiles/" $ KV.SteamID)) $ ")" @ "Perk:" @ Repl(String(KV.Perk), "KFPerk_", "", false) @ "Level:" @ String(KV.Level);
|
||||
}
|
||||
|
||||
public function ServerStartVoteSkipTrader(PlayerReplicationInfo PRI)
|
||||
{
|
||||
local Array<KFPlayerReplicationInfo> KFPRIs;
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
local KFPlayerController KFPC;
|
||||
local byte TraderTimeRemaining;
|
||||
|
||||
KFPC = KFPlayerController(PRI.Owner);
|
||||
|
||||
if (GetKFGI() == None) return;
|
||||
|
||||
if (PRI.bOnlySpectator)
|
||||
{
|
||||
KFPC.ReceiveLocalizedMessage(class'KFLocalMessage', LMT_SkipTraderVoteNoSpectators);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!bTraderIsOpen && !bForceShowSkipTrader)
|
||||
{
|
||||
KFPC.ReceiveLocalizedMessage(class'KFLocalMessage', LMT_SkipTraderIsNotOpen);
|
||||
return;
|
||||
}
|
||||
|
||||
if (bIsKickVoteInProgress || bIsPauseGameVoteInProgress)
|
||||
{
|
||||
KFPC.ReceiveLocalizedMessage(class'KFLocalMessage', LMT_OtherVoteInProgress);
|
||||
return;
|
||||
}
|
||||
|
||||
TraderTimeRemaining = GetTraderTimeRemaining();
|
||||
if(TraderTimeRemaining <= SkipTraderVoteLimit)
|
||||
{
|
||||
KFPC.ReceiveLocalizedMessage(class'KFLocalMessage', LMT_SkipTraderNoEnoughTime);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!bIsSkipTraderVoteInProgress)
|
||||
{
|
||||
PlayersThatHaveVoted.Length = 0;
|
||||
|
||||
CurrentSkipTraderVote.PlayerID = PRI.UniqueId;
|
||||
CurrentSkipTraderVote.PlayerPRI = PRI;
|
||||
CurrentSkipTraderVote.PlayerIPAddress = KFPC.GetPlayerNetworkAddress();
|
||||
|
||||
bIsSkipTraderVoteInProgress = true;
|
||||
|
||||
if (bStopCountDown)
|
||||
{
|
||||
CurrentVoteTime = CfgSkipTraderVote.default.VoteTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentVoteTime = Min(CfgSkipTraderVote.default.VoteTime, TraderTimeRemaining - SkipTraderVoteLimit);
|
||||
}
|
||||
|
||||
GetKFPRIArray(KFPRIs, , false);
|
||||
foreach KFPRIs(KFPRI)
|
||||
{
|
||||
KFPRI.ShowSkipTraderVote(PRI, CurrentVoteTime, !(KFPRI == PRI) && PRI.GetTeamNum() != 255);
|
||||
}
|
||||
|
||||
AllowSTPNotification = KFPRIs.Length > 1;
|
||||
|
||||
KFGI.BroadcastLocalized(KFGI, class'KFLocalMessage', LMT_SkipTraderVoteStarted, CurrentSkipTraderVote.PlayerPRI);
|
||||
SetTimer(CurrentVoteTime, false, nameof(ConcludeVoteSkipTrader), Self);
|
||||
SetTimer(1, true, nameof(UpdateTimer), Self);
|
||||
|
||||
RecieveVoteSkipTrader(PRI, true);
|
||||
|
||||
KFPlayerReplicationInfo(PRI).bAlreadyStartedASkipTraderVote = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
KFPlayerController(PRI.Owner).ReceiveLocalizedMessage(class'KFLocalMessage', LMT_SkipTraderVoteInProgress);
|
||||
}
|
||||
}
|
||||
|
||||
public reliable server function UpdateTimer()
|
||||
{
|
||||
local Array<KFPlayerReplicationInfo> KFPRIs;
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
local int VoteTimeLimit;
|
||||
|
||||
CurrentVoteTime--;
|
||||
|
||||
VoteTimeLimit = GetTraderTimeRemaining() - SkipTraderVoteLimit;
|
||||
if (!bStopCountDown && CurrentVoteTime > VoteTimeLimit)
|
||||
{
|
||||
CurrentVoteTime = VoteTimeLimit;
|
||||
}
|
||||
|
||||
GetKFPRIArray(KFPRIs, , false);
|
||||
foreach KFPRIs(KFPRI)
|
||||
{
|
||||
KFPRI.UpdateSkipTraderTime(CurrentVoteTime);
|
||||
}
|
||||
|
||||
if (CurrentVoteTime <= 0)
|
||||
{
|
||||
ConcludeVoteSkipTrader();
|
||||
}
|
||||
}
|
||||
|
||||
public reliable server function RecieveVoteSkipTrader(PlayerReplicationInfo PRI, bool bSkip)
|
||||
{
|
||||
local bool MustNotify;
|
||||
|
||||
`Log_Trace();
|
||||
|
||||
MustNotify = (PlayersThatHaveVoted.Find(PRI) == INDEX_NONE && AllowSTPNotification);
|
||||
MustNotify = (PlayersThatHaveVoted.Find(PRI) == INDEX_NONE);
|
||||
|
||||
Super.RecieveVoteSkipTrader(PRI, bSkip);
|
||||
|
||||
@ -713,7 +592,7 @@ public reliable server function RecieveVoteSkipTrader(PlayerReplicationInfo PRI,
|
||||
{
|
||||
CVC.BroadcastHUDLocalized(
|
||||
CVC_VoteProgressHUD,
|
||||
float(CfgSkipTraderVote.default.VoteTime),
|
||||
float(VoteTime),
|
||||
VotedPlayers(),
|
||||
DidntVotedPlayers());
|
||||
}
|
||||
@ -735,130 +614,18 @@ public reliable server function ConcludeVoteSkipTrader()
|
||||
{
|
||||
CVC.BroadcastClearMessageHUD(CfgSkipTraderVote.default.DefferedClearHUD);
|
||||
}
|
||||
|
||||
ClearTimer(nameof(ConcludeVoteSkipTrader), Self);
|
||||
ClearTimer(nameof(UpdateTimer), Self);
|
||||
}
|
||||
|
||||
Super.ConcludeVoteSkipTrader();
|
||||
}
|
||||
|
||||
public function ServerStartVotePauseGame(PlayerReplicationInfo PRI)
|
||||
{
|
||||
local Array<KFPlayerReplicationInfo> KFPRIs;
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
local KFPlayerController KFPC;
|
||||
local byte WaveTimeRemaining;
|
||||
|
||||
if (GetKFGI() == None) return;
|
||||
|
||||
KFPC = KFPlayerController(PRI.Owner);
|
||||
|
||||
if (PRI.bOnlySpectator)
|
||||
{
|
||||
KFPC.ReceiveLocalizedMessage(class'KFLocalMessage', bIsEndlessPaused ? LMT_ResumeVoteNoSpectators : LMT_PauseVoteNoSpectators);
|
||||
return;
|
||||
}
|
||||
|
||||
if (bWaveIsActive)
|
||||
{
|
||||
KFPC.ReceiveLocalizedMessage(class'KFLocalMessage', bIsEndlessPaused ? LMT_ResumeVoteWaveActive : LMT_PauseVoteWaveActive);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!bEndlessMode)
|
||||
{
|
||||
KFPC.ReceiveLocalizedMessage(class'KFLocalMessage', LMT_PauseVoteWrongMode);
|
||||
return;
|
||||
}
|
||||
|
||||
if (bIsKickVoteInProgress || bIsSkipTraderVoteInProgress)
|
||||
{
|
||||
KFPC.ReceiveLocalizedMessage(class'KFLocalMessage', LMT_OtherVoteInProgress);
|
||||
return;
|
||||
}
|
||||
|
||||
WaveTimeRemaining = GetTraderTimeRemaining();
|
||||
if (WaveTimeRemaining <= PauseGameVoteLimit)
|
||||
{
|
||||
KFPC.ReceiveLocalizedMessage(class'KFLocalMessage', bIsEndlessPaused ? LMT_ResumeVoteNoEnoughTime : LMT_PauseVoteNoEnoughTime);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!bIsPauseGameVoteInProgress)
|
||||
{
|
||||
PlayersThatHaveVoted.Length = 0;
|
||||
|
||||
CurrentPauseGameVote.PlayerID = PRI.UniqueId;
|
||||
CurrentPauseGameVote.PlayerPRI = PRI;
|
||||
CurrentPauseGameVote.PlayerIPAddress = KFPC.GetPlayerNetworkAddress();
|
||||
|
||||
bIsPauseGameVoteInProgress = true;
|
||||
|
||||
if (bStopCountDown)
|
||||
{
|
||||
CurrentVoteTime = CfgPauseVote.default.VoteTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentVoteTime = Min(CfgPauseVote.default.VoteTime, WaveTimeRemaining - PauseGameVoteLimit);
|
||||
}
|
||||
|
||||
GetKFPRIArray(KFPRIs);
|
||||
foreach KFPRIs(KFPRI)
|
||||
{
|
||||
KFPRI.ShowPauseGameVote(PRI, CurrentVoteTime, !(KFPRI == PRI));
|
||||
}
|
||||
|
||||
AllowSTPNotification = KFPRIs.Length > 1;
|
||||
|
||||
KFGI.BroadcastLocalized(KFGI, class'KFLocalMessage', bIsEndlessPaused ? LMT_ResumeVoteStarted : LMT_PauseVoteStarted, CurrentPauseGameVote.PlayerPRI);
|
||||
SetTimer(CurrentVoteTime, false, nameof(ConcludeVotePauseGame), Self);
|
||||
SetTimer(1, true, nameof(UpdatePauseGameTimer), Self);
|
||||
|
||||
ReceiveVotePauseGame(PRI, true);
|
||||
|
||||
KFPlayerReplicationInfo(PRI).bAlreadyStartedAPauseGameVote = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
KFPlayerController(PRI.Owner).ReceiveLocalizedMessage(class'KFLocalMessage', bIsEndlessPaused ? LMT_ResumeVoteInProgress : LMT_PauseVoteInProgress);
|
||||
}
|
||||
}
|
||||
|
||||
public reliable server function UpdatePauseGameTimer() // TODO:
|
||||
{
|
||||
local Array<KFPlayerReplicationInfo> KFPRIs;
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
local int VoteTimeLimit;
|
||||
|
||||
CurrentVoteTime--;
|
||||
|
||||
VoteTimeLimit = GetTraderTimeRemaining() - PauseGameVoteLimit;
|
||||
if (!bStopCountDown && CurrentVoteTime > VoteTimeLimit)
|
||||
{
|
||||
CurrentVoteTime = VoteTimeLimit;
|
||||
}
|
||||
|
||||
GetKFPRIArray(KFPRIs);
|
||||
foreach KFPRIs(KFPRI)
|
||||
{
|
||||
KFPRI.UpdatePauseGameTime(CurrentVoteTime);
|
||||
}
|
||||
|
||||
if (CurrentVoteTime <= 0)
|
||||
{
|
||||
ConcludeVotePauseGame();
|
||||
}
|
||||
}
|
||||
|
||||
public reliable server function ReceiveVotePauseGame(PlayerReplicationInfo PRI, bool bSkip)
|
||||
{
|
||||
local bool MustNotify;
|
||||
|
||||
`Log_Trace();
|
||||
|
||||
MustNotify = (PlayersThatHaveVoted.Find(PRI) == INDEX_NONE && AllowSTPNotification);
|
||||
MustNotify = (PlayersThatHaveVoted.Find(PRI) == INDEX_NONE);
|
||||
|
||||
Super.ReceiveVotePauseGame(PRI, bSkip);
|
||||
|
||||
@ -876,7 +643,7 @@ public reliable server function ReceiveVotePauseGame(PlayerReplicationInfo PRI,
|
||||
{
|
||||
CVC.BroadcastHUDLocalized(
|
||||
CVC_VoteProgressHUD,
|
||||
float(CfgPauseVote.default.VoteTime),
|
||||
float(VoteTime),
|
||||
VotedPlayers(),
|
||||
DidntVotedPlayers());
|
||||
}
|
||||
@ -898,9 +665,6 @@ public reliable server function ConcludeVotePauseGame()
|
||||
{
|
||||
CVC.BroadcastClearMessageHUD(CfgPauseVote.default.DefferedClearHUD);
|
||||
}
|
||||
|
||||
ClearTimer(nameof(ConcludeVotePauseGame), Self);
|
||||
ClearTimer(nameof(UpdatePauseGameTimer), Self);
|
||||
}
|
||||
|
||||
Super.ConcludeVotePauseGame();
|
||||
@ -908,6 +672,8 @@ public reliable server function ConcludeVotePauseGame()
|
||||
|
||||
private function Array<String> ActiveMapCycle()
|
||||
{
|
||||
local KFGameInfo KFGI;
|
||||
|
||||
`Log_Trace();
|
||||
|
||||
if (WorldInfo.NetMode == NM_Standalone)
|
||||
@ -915,7 +681,8 @@ private function Array<String> ActiveMapCycle()
|
||||
return Maplist;
|
||||
}
|
||||
|
||||
if (GetKFGI() != None)
|
||||
KFGI = KFGameInfo(WorldInfo.Game);
|
||||
if (KFGI != None)
|
||||
{
|
||||
return KFGI.GameMapCycles[KFGI.ActiveMapCycle].Maps;
|
||||
}
|
||||
@ -926,12 +693,14 @@ private function Array<String> GetAviableMaps()
|
||||
local String LowerDefaultNextMap;
|
||||
local Array<String> MapCycle;
|
||||
local Array<String> Maps;
|
||||
local KFGameInfo KFGI;
|
||||
local String Map;
|
||||
local int Index;
|
||||
|
||||
`Log_Trace();
|
||||
|
||||
if (GetKFGI() == None) return Maps;
|
||||
KFGI = KFGameInfo(WorldInfo.Game);
|
||||
if (KFGI == None) return Maps;
|
||||
|
||||
MapCycle = ActiveMapCycle();
|
||||
|
||||
@ -1009,12 +778,16 @@ private function bool IsCustomMap(String MapName)
|
||||
|
||||
private function int DefaultNextMapIndex()
|
||||
{
|
||||
local KFGameInfo KFGI;
|
||||
local Array<String> AviableMaps;
|
||||
local Array<String> MapCycle;
|
||||
local int CurrentMapIndex;
|
||||
|
||||
`Log_Trace();
|
||||
|
||||
KFGI = KFGameInfo(WorldInfo.Game);
|
||||
if (KFGI == None) return INDEX_NONE;
|
||||
|
||||
MapCycle = ActiveMapCycle();
|
||||
AviableMaps = GetAviableMaps();
|
||||
|
||||
@ -1123,5 +896,4 @@ public function int GetNextMap()
|
||||
defaultproperties
|
||||
{
|
||||
AllowHudNotification = true;
|
||||
AllowSTPNotification = true;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ private static function bool IsUID(String ID, E_LogLevel LogLevel)
|
||||
{
|
||||
`Log_TraceStatic();
|
||||
|
||||
return (Left(ID, 2) ~= "0x");
|
||||
return (Locs(Left(ID, 2)) ~= "0x");
|
||||
}
|
||||
|
||||
private static function bool AnyToUID(String ID, out UniqueNetId UID, E_LogLevel LogLevel)
|
||||
|
@ -64,7 +64,7 @@ static function IncMapStat(String Map, int PlayTime, String SortPolicy, E_LogLev
|
||||
StaticSaveConfig();
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
DefaultProperties
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -1,60 +0,0 @@
|
||||
class Mut extends KFMutator;
|
||||
|
||||
var private CVC CVC;
|
||||
|
||||
public simulated function bool SafeDestroy()
|
||||
{
|
||||
return (bPendingDelete || bDeleteMe || Destroy());
|
||||
}
|
||||
|
||||
public event PreBeginPlay()
|
||||
{
|
||||
Super.PreBeginPlay();
|
||||
|
||||
if (WorldInfo.NetMode == NM_Client) return;
|
||||
|
||||
foreach WorldInfo.DynamicActors(class'CVC', CVC)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (CVC == None)
|
||||
{
|
||||
CVC = WorldInfo.Spawn(class'CVC');
|
||||
}
|
||||
|
||||
if (CVC == None)
|
||||
{
|
||||
`Log_Base("FATAL: Can't Spawn 'CVC'");
|
||||
SafeDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
public function AddMutator(Mutator M)
|
||||
{
|
||||
if (M == Self) return;
|
||||
|
||||
if (M.Class == Class)
|
||||
Mut(M).SafeDestroy();
|
||||
else
|
||||
Super.AddMutator(M);
|
||||
}
|
||||
|
||||
public function NotifyLogin(Controller C)
|
||||
{
|
||||
Super.NotifyLogin(C);
|
||||
|
||||
CVC.NotifyLogin(C);
|
||||
}
|
||||
|
||||
public function NotifyLogout(Controller C)
|
||||
{
|
||||
Super.NotifyLogout(C);
|
||||
|
||||
CVC.NotifyLogout(C);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
GroupNames.Add("VoteCollector")
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,48 +1,42 @@
|
||||
[img]https://img.shields.io/static/v1?logo=GitHub&labelColor=gray&color=blue&logoColor=white&label=&message=Open Source[/img] [img]https://img.shields.io/github/license/GenZmeY/KF2-ControlledVoteCollector[/img] [img]https://img.shields.io/steam/downloads/2847465899[/img] [img]https://img.shields.io/steam/favorites/2847465899[/img] [img]https://img.shields.io/steam/update-date/2847465899[/img] [url=https://steamcommunity.com/sharedfiles/filedetails/changelog/2847465899][img]https://img.shields.io/github/v/tag/GenZmeY/KF2-ControlledVoteCollector[/img][/url]
|
||||
[img]https://img.shields.io/static/v1?logo=GitHub&labelColor=gray&color=blue&logoColor=white&label=&message=Open Source[/img] [img]https://img.shields.io/github/license/GenZmeY/KF2-ControlledVoteCollector[/img] [img]https://img.shields.io/steam/subscriptions/2847465899[/img] [img]https://img.shields.io/steam/favorites/2847465899[/img] [img]https://img.shields.io/steam/update-date/2847465899[/img] [url=https://steamcommunity.com/sharedfiles/filedetails/changelog/2847465899][img]https://img.shields.io/github/v/tag/GenZmeY/KF2-ControlledVoteCollector[/img][/url]
|
||||
|
||||
[h1]📋 Description[/h1]
|
||||
[h1]Description[/h1]
|
||||
New vote collector with improvements and features.
|
||||
|
||||
[h1]✨ Features[/h1]
|
||||
[h1]Features[/h1]
|
||||
[list]
|
||||
[*]Map statistics
|
||||
[*]Next map setting
|
||||
[*]Public voting
|
||||
[*]Kick logging
|
||||
[*]Kick voting setup
|
||||
[*]Early kick protection
|
||||
[*]map statistics;
|
||||
[*]default/next map setting;
|
||||
[*]anonymous or public voting;
|
||||
[*]kick logging;
|
||||
[*]kick voting setup;
|
||||
[*]early kick protection.
|
||||
[/list]
|
||||
|
||||
[h1]❌ Whitelisted?[/h1]
|
||||
No. This mod is not whitelisted and will de-rank your server. Any XP earned will not be saved.
|
||||
[i](it would be logical to separate these features into several mutators, but this is a bad idea for technical reasons)[/i]
|
||||
|
||||
But I hope that it will be whitelisted - I submitted whitelist request here:
|
||||
https://forums.tripwireinteractive.com/index.php?threads/whitelisting-mods-and-mutators.120340/post-2353667
|
||||
[h1]Whitelisted?[/h1]
|
||||
No. This mod is not whitelisted and will de-rank your server. Any XP gained will not be saved.
|
||||
|
||||
[h1]🖥️ Usage (server)[/h1]
|
||||
[b]Note:[/b] [i]If this is unclear, first read: [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)][u]Dedicated Server Guide (KF2 wiki)[/u][/url][/i]
|
||||
[h1]Usage (server)[/h1]
|
||||
[b]Note:[/b] [i]If you don't understand what is written here, read the article [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)][u]Dedicated Server (KF2 wiki)[/u][/url] before following these instructions.[/i]
|
||||
[olist]
|
||||
[*]Open [b]PCServer-KFEngine.ini[/b] / [b]LinuxServer-KFEngine.ini[/b].
|
||||
[*]Find [b][IpDrv.TcpNetDriver][/b] section and ensure line exists (add if missing):
|
||||
[code]DownloadManagers=OnlineSubsystemSteamworks.SteamWorkshopDownload[/code]
|
||||
(If there are several [b]DownloadManagers[/b] then the line above should be the first)
|
||||
[*]Open your [b]PCServer-KFEngine.ini[/b] / [b]LinuxServer-KFEngine.ini[/b];
|
||||
[*]Find the [b][IpDrv.TcpNetDriver][/b] section and make sure that there is a line (add if not):
|
||||
[b]DownloadManagers=OnlineSubsystemSteamworks.SteamWorkshopDownload[/b]
|
||||
❗️ If there are several [b]DownloadManagers=[/b] then the line above should be the first ❗️
|
||||
[*]Add the following string to the [b][OnlineSubsystemSteamworks.KFWorkshopSteamworks][/b] section (create one if it doesn't exist):
|
||||
[code]ServerSubscribedWorkshopItems=2847465899[/code]
|
||||
[*]Start server and wait for mutator download.
|
||||
[*]When the download is complete, stop the server.
|
||||
[*]Create a file: [code]<kf2-server>\KFGame\Config\KFCVC.ini[/code]
|
||||
with content:
|
||||
[code][CVC.CVC]
|
||||
Version=0[/code]
|
||||
[*]Add mutator to server start parameters: [code]?Mutator=CVC.Mut[/code] and start the server.
|
||||
[*]Stop the server and configure the mutator (see [b]⚙️ Setup (KFCVC.ini)[/b] below).
|
||||
[*]Start the server.
|
||||
[b]ServerSubscribedWorkshopItems=2847465899[/b]
|
||||
[*]Start the server and wait until the mutator is downloading;
|
||||
[*]Add mutator to server start parameters: [b]?Mutator=CVC.CVCMut[/b] and restart the server.
|
||||
[/olist]
|
||||
|
||||
[h1]⚙️ Setup (KFCVC.ini)[/h1]
|
||||
[h1]Setup (KFCVC.ini)[/h1]
|
||||
Config will be created at the first start.
|
||||
|
||||
[b][CVC.MapStat][/b]
|
||||
[list]
|
||||
[*]Set [b]bEnable=True[/b] to start collecting maps stats. Statistics are stored in the [b]KFMapStats.ini[/b].
|
||||
[*]Set [b]bEnable=True[/b] to start collecting maps stats. The following information is collected: number of full rounds on the map, total time (minutes), average time (minutes). Statistics are stored in the [b]KFMapStats.ini[/b]. To reset the statistics, delete [b]KFMapStats.ini[/b] and restart the server.
|
||||
[*]Set [b]SortPolicy[/b] to sort the list of statistics. Possible values:
|
||||
[list]
|
||||
[*][b]CounterAsc[/b]
|
||||
@ -57,62 +51,61 @@ Version=0[/code]
|
||||
[/list]
|
||||
|
||||
[b][CVC.MapVote][/b]
|
||||
This section sets the next map when no one voted for the map.
|
||||
[list]
|
||||
[*]Set [b]DefaultNextMap[/b] to choose which map will be next if no players voted for the next map. Possible values:
|
||||
[list]
|
||||
[*][b]Any[/b] - Any map from the current map cycle.
|
||||
[*][b]Official[/b] - Official map from the current map cycle.
|
||||
[*][b]Custom[/b] - Custom map from the current map cycle.
|
||||
[*][b]<MapName>[/b] - Specified map. If the specified map is not in the current map cycle, the next map from the cycle will be selected.
|
||||
[*][b]Any[/b] - any map from the current map cycle;
|
||||
[*][b]Official[/b] - official map from the current map cycle;
|
||||
[*][b]Custom[/b] - custom map from the current map cycle;
|
||||
[*][b]<MapName>[/b] - specified map (for example: [b]KF-Nuked[/b]). If the specified map is not in the current map cycle, the next map from the cycle will be selected.
|
||||
[/list]
|
||||
[*]Set [b]bRandomizeNextMap[/b] to [b]True[/b] to randomize the next map (will be selected a random map that matches the [b]DefaultNextMap[/b] parameter).
|
||||
[/list]
|
||||
|
||||
[b][CVC.SkipTraderVote][/b]
|
||||
[list]
|
||||
[*][b]bChatNotifications[/b] - Set to [b]True[/b] to see player votes in chat.
|
||||
[*][b]PositiveColorHex[/b] - Hex color for yes vote in chat.
|
||||
[*][b]NegativeColorHex[/b] - Hex color for no vote in chat.
|
||||
[*][b]bHudNotifications[/b] - Set to [b]True[/b] to see player votes in HUD.
|
||||
[*][b]bChatNotifications[/b] - set to [b]True[/b] to see player votes in chat;
|
||||
[*][b]PositiveColorHex[/b] - hex color for yes vote in chat;
|
||||
[*][b]NegativeColorHex[/b] - hex color for no vote in chat;
|
||||
[*][b]bHudNotifications[/b] - set to [b]True[/b] to see player votes in HUD;
|
||||
[*][b]DefferedClearHUD[/b] - HUD notification will remain on the screen for the specified number of seconds after voting ends.
|
||||
[*][b]VoteTime[/b] - Time in seconds for voting (will be reduced if it exceeds the trader's remaining time).
|
||||
[/list]
|
||||
|
||||
[b][CVC.PauseVote][/b]
|
||||
[list]
|
||||
[*][b]bChatNotifications[/b] - Set to [b]True[/b] to see player votes in chat.
|
||||
[*][b]PositiveColorHex[/b] - Hex color for yes vote in chat.
|
||||
[*][b]NegativeColorHex[/b] - Hex color for no vote in chat.
|
||||
[*][b]bHudNotifications[/b] - Set to [b]True[/b] to see player votes in HUD.
|
||||
[*][b]bChatNotifications[/b] - set to [b]True[/b] to see player votes in chat;
|
||||
[*][b]PositiveColorHex[/b] - hex color for yes vote in chat;
|
||||
[*][b]NegativeColorHex[/b] - hex color for no vote in chat;
|
||||
[*][b]bHudNotifications[/b] - set to [b]True[/b] to see player votes in HUD;
|
||||
[*][b]DefferedClearHUD[/b] - HUD notification will remain on the screen for the specified number of seconds after voting ends.
|
||||
[*][b]VoteTime[/b] - Time in seconds for voting (will be reduced if it exceeds the trader's remaining time).
|
||||
[/list]
|
||||
|
||||
[b][CVC.KickVote][/b]
|
||||
[list]
|
||||
[*][b]bChatNotifications[/b] - Set to [b]True[/b] to see player votes in chat.
|
||||
[*][b]WarningColorHex[/b] - Hex color for chat warnings.
|
||||
[*][b]PositiveColorHex[/b] - Hex color for yes vote in chat.
|
||||
[*][b]NegativeColorHex[/b] - Hex color for no vote in chat.
|
||||
[*][b]bHudNotifications[/b] - Set to [b]True[/b] to see player votes in HUD.
|
||||
[*][b]bHudNotificationsOnlyOnTraderTime[/b] - Set to [b]True[/b] to show HUD notification only during the trader time.
|
||||
[*][b]bChatNotifications[/b] - set to [b]True[/b] to see player votes in chat;
|
||||
[*][b]WarningColorHex[/b] - hex color for chat warnings;
|
||||
[*][b]PositiveColorHex[/b] - hex color for yes vote in chat;
|
||||
[*][b]NegativeColorHex[/b] - hex color for no vote in chat;
|
||||
[*][b]bHudNotifications[/b] - set to [b]True[/b] to see player votes in HUD;
|
||||
[*][b]bHudNotificationsOnlyOnTraderTime[/b] - set to [b]True[/b] to show HUD notification only during the trader time;
|
||||
[*][b]DefferedClearHUD[/b] - HUD notification will remain on the screen for the specified number of seconds after voting ends.
|
||||
[*][b]bLogKickVote[/b] - Set to [b]True[/b] to log information about every kick vote.
|
||||
[*][b]MinVotingPlayersToStartKickVote[/b] - Minimum number of voting players to start kick voting.
|
||||
[*][b]MaxKicks[/b] - Maximum number of kicks per game.
|
||||
[*][b]VoteTime[/b] - Time in seconds for voting.
|
||||
[*][b]bLogKickVote[/b] - set to [b]True[/b] to log information about every kick vote;
|
||||
[*][b]MinVotingPlayersToStartKickVote[/b] - minimum number of voting players to start kick voting;
|
||||
[*][b]MaxKicks[/b] - maximum number of kicks per game.
|
||||
[/list]
|
||||
|
||||
[b][CVC.KickProtected][/b]
|
||||
[list]
|
||||
[*]Use [b]PlayerID[/b] to set the list of players immune to kick (use UniqueID or SteamID).
|
||||
[*]Use [b]PlayerID[/b] to set the list of players immune to kick. You can use UniqueID or SteamID;
|
||||
[*]Set [b]NotifyPlayerAboutKickAttempt[/b] to [b]True[/b] to let players on this list receive notifications of attempts to kick them.
|
||||
[/list]
|
||||
|
||||
[b][CVC.StartWaveKickProtection][/b]
|
||||
In this section, the system for preventing early kicks is configured (especially for lazy ass admins like me who don't want to consider player complaints about this).
|
||||
[list]
|
||||
[*][b]Waves[/b] - The number of waves during which a new player has kick protection and cannot start kick vote.
|
||||
[*][b]MinLevel[/b] - The minimum level that a player needs to have in order to receive protection from a kick after joining the server.
|
||||
[*][b]Waves[/b] - the number of waves during which a new player has kick protection and cannot vote for a kick;
|
||||
[*][b]MinLevel[/b] - the minimum level that a player needs to have in order to receive protection from a kick after joining the server.
|
||||
[/list]
|
||||
|
||||
[b]How start wave kick protection works:[/b]
|
||||
@ -124,18 +117,5 @@ When the player has played the specified number of [b]Waves[/b], he loses the ki
|
||||
|
||||
The [b]MinLevel[/b] parameter specifies an exception to these rules, giving kick protection only to players above or equal the specified level. All players can vote to exclude players with an unsuitable level, regardless of whether they have played enough [b]Waves[/b] or not. This allows to remove low-level players without waiting for them to screw up in the game.
|
||||
|
||||
[h1]🌍 Credits[/h1]
|
||||
[list]
|
||||
[*]The cat on the cover is Meawbin (original character by [url=https://x.com/horrormove]Cotton Valent[/url]).
|
||||
[/list]
|
||||
[b]Translators:[/b]
|
||||
[list]
|
||||
[*][url=https://steamcommunity.com/profiles/76561199126205919]cheungfatzong[/url] - Traditional [CHT] and Simplified [CHN] Chinese.
|
||||
[/list]
|
||||
|
||||
[h1]☑️ Status: Completed[/h1]
|
||||
✔️ The mutator works with the current version of the game (v1150) and I have implemented everything I planned.
|
||||
⛔️ Development has stopped: I no longer have the time or motivation to maintain this mod. No further updates or bug fixes are planned.
|
||||
|
||||
[h1]📜 Sources[/h1]
|
||||
https://github.com/GenZmeY/KF2-ControlledVoteCollector [b](GNU GPLv3)[/b]
|
||||
[h1]Sources[/h1]
|
||||
[url=https://github.com/GenZmeY/KF2-ControlledVoteCollector]https://github.com/GenZmeY/KF2-ControlledVoteCollector[/url] [b](GNU GPLv3)[/b]
|
18
README.md
18
README.md
@ -1,16 +1,16 @@
|
||||
# Controlled Vote Collector
|
||||
|
||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899)
|
||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2848836389)
|
||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899)
|
||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899)
|
||||
[](https://github.com/GenZmeY/KF2-ControlledVoteCollector/actions/workflows/mega-linter.yml)
|
||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899)
|
||||
[](https://github.com/GenZmeY/KF2-ControlledVoteCollector/tags)
|
||||
[](LICENSE)
|
||||
|
||||
## Description
|
||||
# Description
|
||||
New vote collector with improvements and features.
|
||||
|
||||
## Features
|
||||
# Features
|
||||
- map statistics;
|
||||
- default/next map setting;
|
||||
- anonymous or public voting;
|
||||
@ -18,10 +18,10 @@ New vote collector with improvements and features.
|
||||
- kick voting setup;
|
||||
- early kick protection.
|
||||
|
||||
## Usage & Setup
|
||||
# Usage & Setup
|
||||
[See steam workshop page](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899)
|
||||
|
||||
## Build
|
||||
# Build
|
||||
**Note:** If you want to build/test/brew/publish a mutator without git-bash and/or scripts, follow [these instructions](https://tripwireinteractive.atlassian.net/wiki/spaces/KF2SW/pages/26247172/KF2+Code+Modding+How-to) instead of what is described here.
|
||||
1. Install [Killing Floor 2](https://store.steampowered.com/app/232090/Killing_Floor_2/), Killing Floor 2 - SDK and [git for windows](https://git-scm.com/download/win);
|
||||
2. open git-bash and go to any folder where you want to store sources:
|
||||
@ -35,9 +35,9 @@ New vote collector with improvements and features.
|
||||
5. The compiled files will be here:
|
||||
`C:\Users\<USERNAME>\Documents\My Games\KillingFloor2\KFGame\Unpublished\BrewedPC\Script\`
|
||||
|
||||
## Bug reports
|
||||
# Bug reports
|
||||
If you find a bug, go to the [issue page](https://github.com/GenZmeY/KF2-ControlledVoteCollector/issues) and check if there is a description of your bug. If not, create a new issue.
|
||||
Describe what the bug looks like and how reproduce it.
|
||||
|
||||
## License
|
||||
[](LICENSE)
|
||||
# License
|
||||
[GNU GPLv3](LICENSE)
|
||||
|
@ -11,15 +11,6 @@ StripSource="True"
|
||||
PackageBuildOrder="CVC"
|
||||
|
||||
|
||||
### Brew parameters ###
|
||||
|
||||
# Packages you want to brew using @peelz's patched KFEditor.
|
||||
# Useful for cases where regular brew doesn't put *.upk inside the package.
|
||||
# Specify them with a space as a separator,
|
||||
# The order doesn't matter
|
||||
PackagePeelzBrew=""
|
||||
|
||||
|
||||
### Steam Workshop upload parameters ###
|
||||
|
||||
# Mutators that will be uploaded to the workshop
|
||||
|
2
tools
2
tools
@ -1 +1 @@
|
||||
Subproject commit fb458ac61f7e6c6426b8dff366dd5e7499e0d95f
|
||||
Subproject commit 2f173aad7a6f4578574764801136a0d86e830653
|
Loading…
x
Reference in New Issue
Block a user