1
0

Compare commits

...

32 Commits

Author SHA1 Message Date
bf2950fac3
update description.txt 2025-04-10 23:26:48 +03:00
522b609ebc
Update description.txt 2024-04-26 23:31:48 +03:00
8223dec827
add CHN and CHT localizations
translator: cheungfatzong
https://steamcommunity.com/profiles/76561199126205919
2024-04-26 22:20:05 +03:00
e680270722
Merge pull request from GenZmeY/short-name
add short alias for mutator
2024-03-08 16:45:49 +03:00
1f6de98e2f
add short alias for mutator 2023-12-31 23:13:28 +03:00
469c8bbd96
update ci/cd 2023-12-31 20:49:54 +03:00
48e1b9ff1d
update megalinter ci/cd 2023-10-21 14:12:10 +03:00
464ba0f492
Merge pull request from GenZmeY/one-player
fixes for solo play
2023-06-29 02:11:19 +03:00
afadeba04c dont show notifications if there is one player on server 2023-06-29 02:09:01 +03:00
1c1b7f6e90 Merge branch 'master' into one-player 2023-06-29 01:40:44 +03:00
690aa2ba6f fix the ability to kick players who are not loaded 2023-06-29 01:39:54 +03:00
158c6b8a2e
Merge pull request from GenZmeY/group-names
add mutator group
2023-06-29 01:16:16 +03:00
e354b714ca add mutator group 2023-06-03 16:53:08 +03:00
6fb5902567 update .editorconfig 2023-05-14 12:18:14 +03:00
8a26a40e90 force show up chat box 2023-05-14 02:34:29 +03:00
edb2334ac8
Merge pull request from GenZmeY/MegaLinter
Mega linter
2023-05-13 02:04:52 +03:00
c37b64c3be update GPL badge 2023-05-13 02:00:55 +03:00
9635fb5007 add MegaLinter badge 2023-05-13 01:58:23 +03:00
e595daf7ca update ci/cd 2023-05-13 01:55:12 +03:00
9b47405939 Merge branch 'master' into MegaLinter 2023-05-13 01:49:29 +03:00
345e765a0e fix EOLs and remove trailing whitespaces 2023-05-13 01:48:44 +03:00
c724de802b Update README.md 2023-05-13 01:42:09 +03:00
da1f19cf9d add MegaLinter 2023-05-13 01:17:07 +03:00
777b2389c1 add .editorconfig 2023-05-13 01:16:24 +03:00
66d7dce3d0 update build tools 2023-05-13 01:14:20 +03:00
b66f2e9fef update description 2022-10-01 21:49:37 +03:00
af861b9888 update build tools 2022-09-13 05:00:53 +03:00
5f4617e25f update build tools 2022-09-02 16:21:40 +03:00
5dd4279dd4 fix player repinfo destroy 2022-09-02 15:23:34 +03:00
31db3849be update build tools 2022-09-02 15:17:59 +03:00
cdacf03d40 swap didn't voted and voted players on HUD. 2022-08-30 07:15:12 +03:00
8dfe63771b skiptrader/pause vote CD compatibility 2022-08-17 15:24:46 +03:00
31 changed files with 2674 additions and 2288 deletions

33
.editorconfig Normal file

@ -0,0 +1,33 @@
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 Normal file

@ -0,0 +1,115 @@
---
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 Normal file

@ -0,0 +1,2 @@
*.psd
/ignore

@ -183,6 +183,13 @@ public function bool PlayerIsKickProtected(PlayerReplicationInfo PRI)
return (KickProtectedPlayers.Find('Uid', PRI.UniqueId.Uid) != INDEX_NONE); 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) public function bool PlayerIsStartWaveKickProtected(KFPlayerController KFPC)
{ {
`Log_Trace(); `Log_Trace();
@ -326,14 +333,20 @@ public function NotifyLogin(Controller C)
{ {
`Log_Trace(); `Log_Trace();
CreateRepInfo(C); if (!CreateRepInfo(C))
{
`Log_Error("Can't create RepInfo for:" @ C);
}
} }
public function NotifyLogout(Controller C) public function NotifyLogout(Controller C)
{ {
`Log_Trace(); `Log_Trace();
DestroyRepInfo(C); if (!DestroyRepInfo(C))
{
`Log_Error("Can't destroy RepInfo of:" @ C);
}
} }
public function bool CreateRepInfo(Controller C) public function bool CreateRepInfo(Controller C)
@ -369,8 +382,8 @@ public function bool DestroyRepInfo(Controller C)
{ {
if (RepInfo.Owner == C) if (RepInfo.Owner == C)
{ {
RepInfo.SafeDestroy();
RepInfos.RemoveItem(RepInfo); RepInfos.RemoveItem(RepInfo);
RepInfo.SafeDestroy();
return true; return true;
} }
} }
@ -378,7 +391,7 @@ public function bool DestroyRepInfo(Controller C)
return false; return false;
} }
DefaultProperties defaultproperties
{ {
} }

@ -1,60 +1 @@
class CVCMut extends KFMutator; class CVCMut extends Mut; // backward compatibility
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 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,6 +10,9 @@ var private localized String PlayerIsStartWaveKickProtected;
var const String PlayerCantStartKickVoteDefault; var const String PlayerCantStartKickVoteDefault;
var private localized String PlayerCantStartKickVote; var private localized String PlayerCantStartKickVote;
var const String PlayerPerkIsNotLoadedDefault;
var private localized String PlayerPerkIsNotLoaded;
var const String KickVoteNotEnoughPlayersDefault; var const String KickVoteNotEnoughPlayersDefault;
var private localized String KickVoteNotEnoughPlayers; var private localized String KickVoteNotEnoughPlayers;
@ -28,23 +31,12 @@ var private localized String VotedPlayers;
var const String DidntVotePlayersDefault; var const String DidntVotePlayersDefault;
var private localized String DidntVotePlayers; 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 enum E_CVC_LocalMessageType
{ {
CVC_PlayerIsKickProtected, CVC_PlayerIsKickProtected,
CVC_PlayerIsStartWaveKickProtected, CVC_PlayerIsStartWaveKickProtected,
CVC_PlayerCantStartKickVote, CVC_PlayerCantStartKickVote,
CVC_PlayerPerkIsNotLoaded,
CVC_KickVoteNotEnoughPlayers, CVC_KickVoteNotEnoughPlayers,
CVC_KickVoteStarted, CVC_KickVoteStarted,
@ -100,6 +92,9 @@ public static function String GetLocalizedString(
case CVC_PlayerCantStartKickVote: case CVC_PlayerCantStartKickVote:
return ReplWaves(default.PlayerCantStartKickVote != "" ? default.PlayerCantStartKickVote : default.PlayerCantStartKickVoteDefault, String1); return ReplWaves(default.PlayerCantStartKickVote != "" ? default.PlayerCantStartKickVote : default.PlayerCantStartKickVoteDefault, String1);
case CVC_PlayerPerkIsNotLoaded:
return ReplKickee(default.PlayerPerkIsNotLoaded != "" ? default.PlayerPerkIsNotLoaded : default.PlayerPerkIsNotLoadedDefault, String1);
case CVC_KickVoteNotEnoughPlayers: case CVC_KickVoteNotEnoughPlayers:
return ReplWaves(default.KickVoteNotEnoughPlayers != "" ? default.KickVoteNotEnoughPlayers : default.KickVoteNotEnoughPlayersDefault, String1); return ReplWaves(default.KickVoteNotEnoughPlayers != "" ? default.KickVoteNotEnoughPlayers : default.KickVoteNotEnoughPlayersDefault, String1);
@ -137,7 +132,7 @@ public static function String GetLocalizedString(
return (String1 $ ":" @ class'KFCommon_LocalizedStrings'.default.NoString); return (String1 $ ":" @ class'KFCommon_LocalizedStrings'.default.NoString);
case CVC_VoteProgressHUD: case CVC_VoteProgressHUD:
return (default.VotedPlayers != "" ? default.VotedPlayers : default.VotedPlayersDefault) @ String1 $ (String2 != "" ? ("\n" $ (default.DidntVotePlayers != "" ? default.DidntVotePlayers : default.DidntVotePlayersDefault) @ String2) : ""); return (default.DidntVotePlayers != "" ? default.DidntVotePlayers : default.DidntVotePlayersDefault) @ String2 $ (String1 != "" ? ("\n" $ (default.VotedPlayers != "" ? default.VotedPlayers : default.VotedPlayersDefault) @ String1) : "");
} }
return ""; return "";
@ -148,6 +143,7 @@ defaultproperties
PlayerIsKickProtectedDefault = "<kickee> is protected from kick" 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)" 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)" 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)" 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>" KickVoteStartedDefault = "<kicker> has started a vote to kick <kickee>"
KickVoteStartedForPlayerDefault = "<kicker> started voting to kick you" KickVoteStartedForPlayerDefault = "<kicker> started voting to kick you"

@ -38,6 +38,7 @@ public reliable client function WriteToChat(String Message, optional String HexC
if (KFPC.MyGFxManager.PartyWidget != None && KFPC.MyGFxManager.PartyWidget.PartyChatWidget != None) if (KFPC.MyGFxManager.PartyWidget != None && KFPC.MyGFxManager.PartyWidget.PartyChatWidget != None)
{ {
KFPC.MyGFxManager.PartyWidget.PartyChatWidget.SetVisible(true);
KFPC.MyGFxManager.PartyWidget.PartyChatWidget.AddChatMessage(Message, HexColor); KFPC.MyGFxManager.PartyWidget.PartyChatWidget.AddChatMessage(Message, HexColor);
} }

@ -26,6 +26,8 @@ var private Array<S_KickVote> KickVotes;
var public CVC CVC; var public CVC CVC;
var public E_LogLevel LogLevel; var public E_LogLevel LogLevel;
var private KFGameInfo KFGI;
var private KFPlayerController KFPC_Kicker; var private KFPlayerController KFPC_Kicker;
var private KFPlayerController KFPC_Kickee; var private KFPlayerController KFPC_Kickee;
@ -35,6 +37,7 @@ var private String KickeeName;
var private String YesVotesPlayers, NoVotesPlayers; var private String YesVotesPlayers, NoVotesPlayers;
var private bool AllowHudNotification; var private bool AllowHudNotification;
var private bool AllowSTPNotification; // SkipTrader and Pause
replication replication
{ {
@ -42,15 +45,26 @@ replication
LogLevel; 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) public function ServerStartVoteKick(PlayerReplicationInfo PRI_Kickee, PlayerReplicationInfo PRI_Kicker)
{ {
local Array<KFPlayerReplicationInfo> KFPRIs; local Array<KFPlayerReplicationInfo> KFPRIs;
local KFPlayerReplicationInfo KFPRI; local KFPlayerReplicationInfo KFPRI;
local KFGameInfo KFGI;
`Log_Trace(); `Log_Trace();
KFGI = KFGameInfo(WorldInfo.Game); if (GetKFGI() == None) return;
KFPC_Kicker = KFPlayerController(PRI_Kicker.Owner); KFPC_Kicker = KFPlayerController(PRI_Kicker.Owner);
KFPC_Kickee = KFPlayerController(PRI_Kickee.Owner); KFPC_Kickee = KFPlayerController(PRI_Kickee.Owner);
@ -79,6 +93,16 @@ public function ServerStartVoteKick(PlayerReplicationInfo PRI_Kickee, PlayerRepl
return; return;
} }
if (!CVC.PlayerPerkLoaded(PRI_Kickee))
{
CVC.WriteToChatLocalized(
KFPC_Kicker,
CVC_PlayerPerkIsNotLoaded,
CfgKickVote.default.WarningColorHex,
KickeeName);
return;
}
if (CVC.PlayerIsStartWaveKickProtected(KFPC_Kickee)) if (CVC.PlayerIsStartWaveKickProtected(KFPC_Kickee))
{ {
CVC.WriteToChatLocalized( CVC.WriteToChatLocalized(
@ -403,7 +427,6 @@ public reliable server function RecieveVoteKick(PlayerReplicationInfo PRI, bool
public function bool ShouldConcludeKickVote() public function bool ShouldConcludeKickVote()
{ {
local KFGameInfo KFGI;
local int NumPRIs; local int NumPRIs;
local int KickVotesNeeded; local int KickVotesNeeded;
@ -414,15 +437,13 @@ public function bool ShouldConcludeKickVote()
return Super.ShouldConcludeKickVote(); return Super.ShouldConcludeKickVote();
} }
KFGI = KFGameInfo(WorldInfo.Game);
NumPRIs = VotingPlayers(); NumPRIs = VotingPlayers();
if (YesVotes + NoVotes >= NumPRIs) if (YesVotes + NoVotes >= NumPRIs)
{ {
return true; return true;
} }
else if (KFGI != None) else if (GetKFGI() != None)
{ {
KickVotesNeeded = FCeil(float(NumPRIs) * KFGI.KickVotePercentage); KickVotesNeeded = FCeil(float(NumPRIs) * KFGI.KickVotePercentage);
KickVotesNeeded = Clamp(KickVotesNeeded, 1, NumPRIs); KickVotesNeeded = Clamp(KickVotesNeeded, 1, NumPRIs);
@ -446,7 +467,6 @@ public reliable server function ConcludeVoteKick()
local KFPlayerReplicationInfo KFPRI; local KFPlayerReplicationInfo KFPRI;
local PlayerReplicationInfo PRI; local PlayerReplicationInfo PRI;
local int NumPRIs; local int NumPRIs;
local KFGameInfo KFGI;
local KFPlayerController KickedPC; local KFPlayerController KickedPC;
local int KickVotesNeeded; local int KickVotesNeeded;
local int PrevKickedPlayers; local int PrevKickedPlayers;
@ -472,10 +492,8 @@ public reliable server function ConcludeVoteKick()
{ {
Super.ConcludeVoteKick(); Super.ConcludeVoteKick();
} }
else if (bIsKickVoteInProgress) else if (bIsKickVoteInProgress && GetKFGI() != None)
{ {
KFGI = KFGameInfo(WorldInfo.Game);
GetKFPRIArray(KFPRIs); GetKFPRIArray(KFPRIs);
foreach KFPRIs(KFPRI) KFPRI.HideKickVote(); foreach KFPRIs(KFPRI) KFPRI.HideKickVote();
@ -570,13 +588,105 @@ private function String LogVotePlayer(S_KickVote KV)
public function ServerStartVoteSkipTrader(PlayerReplicationInfo PRI) public function ServerStartVoteSkipTrader(PlayerReplicationInfo PRI)
{ {
`Log_Trace(); local Array<KFPlayerReplicationInfo> KFPRIs;
local KFPlayerReplicationInfo KFPRI;
local KFPlayerController KFPC;
local byte TraderTimeRemaining;
VoteTime = CfgSkipTraderVote.default.VoteTime; KFPC = KFPlayerController(PRI.Owner);
Super.ServerStartVoteSkipTrader(PRI); if (GetKFGI() == None) return;
VoteTime = default.VoteTime; 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) public reliable server function RecieveVoteSkipTrader(PlayerReplicationInfo PRI, bool bSkip)
@ -585,7 +695,7 @@ public reliable server function RecieveVoteSkipTrader(PlayerReplicationInfo PRI,
`Log_Trace(); `Log_Trace();
MustNotify = (PlayersThatHaveVoted.Find(PRI) == INDEX_NONE); MustNotify = (PlayersThatHaveVoted.Find(PRI) == INDEX_NONE && AllowSTPNotification);
Super.RecieveVoteSkipTrader(PRI, bSkip); Super.RecieveVoteSkipTrader(PRI, bSkip);
@ -625,6 +735,9 @@ public reliable server function ConcludeVoteSkipTrader()
{ {
CVC.BroadcastClearMessageHUD(CfgSkipTraderVote.default.DefferedClearHUD); CVC.BroadcastClearMessageHUD(CfgSkipTraderVote.default.DefferedClearHUD);
} }
ClearTimer(nameof(ConcludeVoteSkipTrader), Self);
ClearTimer(nameof(UpdateTimer), Self);
} }
Super.ConcludeVoteSkipTrader(); Super.ConcludeVoteSkipTrader();
@ -632,13 +745,111 @@ public reliable server function ConcludeVoteSkipTrader()
public function ServerStartVotePauseGame(PlayerReplicationInfo PRI) public function ServerStartVotePauseGame(PlayerReplicationInfo PRI)
{ {
`Log_Trace(); local Array<KFPlayerReplicationInfo> KFPRIs;
local KFPlayerReplicationInfo KFPRI;
local KFPlayerController KFPC;
local byte WaveTimeRemaining;
VoteTime = CfgPauseVote.default.VoteTime; if (GetKFGI() == None) return;
Super.ServerStartVotePauseGame(PRI); KFPC = KFPlayerController(PRI.Owner);
VoteTime = default.VoteTime; 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) public reliable server function ReceiveVotePauseGame(PlayerReplicationInfo PRI, bool bSkip)
@ -647,7 +858,7 @@ public reliable server function ReceiveVotePauseGame(PlayerReplicationInfo PRI,
`Log_Trace(); `Log_Trace();
MustNotify = (PlayersThatHaveVoted.Find(PRI) == INDEX_NONE); MustNotify = (PlayersThatHaveVoted.Find(PRI) == INDEX_NONE && AllowSTPNotification);
Super.ReceiveVotePauseGame(PRI, bSkip); Super.ReceiveVotePauseGame(PRI, bSkip);
@ -687,6 +898,9 @@ public reliable server function ConcludeVotePauseGame()
{ {
CVC.BroadcastClearMessageHUD(CfgPauseVote.default.DefferedClearHUD); CVC.BroadcastClearMessageHUD(CfgPauseVote.default.DefferedClearHUD);
} }
ClearTimer(nameof(ConcludeVotePauseGame), Self);
ClearTimer(nameof(UpdatePauseGameTimer), Self);
} }
Super.ConcludeVotePauseGame(); Super.ConcludeVotePauseGame();
@ -694,8 +908,6 @@ public reliable server function ConcludeVotePauseGame()
private function Array<String> ActiveMapCycle() private function Array<String> ActiveMapCycle()
{ {
local KFGameInfo KFGI;
`Log_Trace(); `Log_Trace();
if (WorldInfo.NetMode == NM_Standalone) if (WorldInfo.NetMode == NM_Standalone)
@ -703,8 +915,7 @@ private function Array<String> ActiveMapCycle()
return Maplist; return Maplist;
} }
KFGI = KFGameInfo(WorldInfo.Game); if (GetKFGI() != None)
if (KFGI != None)
{ {
return KFGI.GameMapCycles[KFGI.ActiveMapCycle].Maps; return KFGI.GameMapCycles[KFGI.ActiveMapCycle].Maps;
} }
@ -715,14 +926,12 @@ private function Array<String> GetAviableMaps()
local String LowerDefaultNextMap; local String LowerDefaultNextMap;
local Array<String> MapCycle; local Array<String> MapCycle;
local Array<String> Maps; local Array<String> Maps;
local KFGameInfo KFGI;
local String Map; local String Map;
local int Index; local int Index;
`Log_Trace(); `Log_Trace();
KFGI = KFGameInfo(WorldInfo.Game); if (GetKFGI() == None) return Maps;
if (KFGI == None) return Maps;
MapCycle = ActiveMapCycle(); MapCycle = ActiveMapCycle();
@ -800,16 +1009,12 @@ private function bool IsCustomMap(String MapName)
private function int DefaultNextMapIndex() private function int DefaultNextMapIndex()
{ {
local KFGameInfo KFGI;
local Array<String> AviableMaps; local Array<String> AviableMaps;
local Array<String> MapCycle; local Array<String> MapCycle;
local int CurrentMapIndex; local int CurrentMapIndex;
`Log_Trace(); `Log_Trace();
KFGI = KFGameInfo(WorldInfo.Game);
if (KFGI == None) return INDEX_NONE;
MapCycle = ActiveMapCycle(); MapCycle = ActiveMapCycle();
AviableMaps = GetAviableMaps(); AviableMaps = GetAviableMaps();
@ -918,4 +1123,5 @@ public function int GetNextMap()
defaultproperties defaultproperties
{ {
AllowHudNotification = true; AllowHudNotification = true;
AllowSTPNotification = true;
} }

@ -60,7 +60,7 @@ private static function bool IsUID(String ID, E_LogLevel LogLevel)
{ {
`Log_TraceStatic(); `Log_TraceStatic();
return (Locs(Left(ID, 2)) ~= "0x"); return (Left(ID, 2) ~= "0x");
} }
private static function bool AnyToUID(String ID, out UniqueNetId UID, E_LogLevel LogLevel) 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(); StaticSaveConfig();
} }
DefaultProperties defaultproperties
{ {
} }

60
CVC/Classes/Mut.uc Normal file

@ -0,0 +1,60 @@
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")
}

BIN
Localization/CHN/CVC.chn Normal file

Binary file not shown.

BIN
Localization/CHT/CVC.cht Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1,42 +1,48 @@
[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/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/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]
[h1]Description[/h1] [h1]📋 Description[/h1]
New vote collector with improvements and features. New vote collector with improvements and features.
[h1]Features[/h1] [h1]Features[/h1]
[list] [list]
[*]map statistics; [*]Map statistics
[*]default/next map setting; [*]Next map setting
[*]anonymous or public voting; [*]Public voting
[*]kick logging; [*]Kick logging
[*]kick voting setup; [*]Kick voting setup
[*]early kick protection. [*]Early kick protection
[/list] [/list]
[i](it would be logical to separate these features into several mutators, but this is a bad idea for technical reasons)[/i] [h1]❌ Whitelisted?[/h1]
No. This mod is not whitelisted and will de-rank your server. Any XP earned will not be saved.
[h1]Whitelisted?[/h1] But I hope that it will be whitelisted - I submitted whitelist request here:
No. This mod is not whitelisted and will de-rank your server. Any XP gained will not be saved. https://forums.tripwireinteractive.com/index.php?threads/whitelisting-mods-and-mutators.120340/post-2353667
[h1]Usage (server)[/h1] [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] [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]
[olist] [olist]
[*]Open your [b]PCServer-KFEngine.ini[/b] / [b]LinuxServer-KFEngine.ini[/b]; [*]Open [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): [*]Find [b][IpDrv.TcpNetDriver][/b] section and ensure line exists (add if missing):
[b]DownloadManagers=OnlineSubsystemSteamworks.SteamWorkshopDownload[/b] [code]DownloadManagers=OnlineSubsystemSteamworks.SteamWorkshopDownload[/code]
❗️ If there are several [b]DownloadManagers=[/b] then the line above should be the first ❗️ (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): [*]Add the following string to the [b][OnlineSubsystemSteamworks.KFWorkshopSteamworks][/b] section (create one if it doesn't exist):
[b]ServerSubscribedWorkshopItems=2847465899[/b] [code]ServerSubscribedWorkshopItems=2847465899[/code]
[*]Start the server and wait until the mutator is downloading; [*]Start server and wait for mutator download.
[*]Add mutator to server start parameters: [b]?Mutator=CVC.CVCMut[/b] and restart the server. [*]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.
[/olist] [/olist]
[h1]Setup (KFCVC.ini)[/h1] [h1]⚙️ Setup (KFCVC.ini)[/h1]
Config will be created at the first start[b]*[/b].
[b][CVC.MapStat][/b] [b][CVC.MapStat][/b]
[list] [list]
[*]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]bEnable=True[/b] to start collecting maps stats. Statistics are stored in the [b]KFMapStats.ini[/b].
[*]Set [b]SortPolicy[/b] to sort the list of statistics. Possible values: [*]Set [b]SortPolicy[/b] to sort the list of statistics. Possible values:
[list] [list]
[*][b]CounterAsc[/b] [*][b]CounterAsc[/b]
@ -51,64 +57,62 @@ Config will be created at the first start[b]*[/b].
[/list] [/list]
[b][CVC.MapVote][/b] [b][CVC.MapVote][/b]
This section sets the next map when no one voted for the map.
[list] [list]
[*]Set [b]DefaultNextMap[/b] to choose which map will be next if no players voted for the next map. Possible values: [*]Set [b]DefaultNextMap[/b] to choose which map will be next if no players voted for the next map. Possible values:
[list] [list]
[*][b]Any[/b] - any map from the current map cycle; [*][b]Any[/b] - Any map from the current map cycle.
[*][b]Official[/b] - official 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]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. [*][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.
[/list] [/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). [*]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] [/list]
[b][CVC.SkipTraderVote][/b] [b][CVC.SkipTraderVote][/b]
[list] [list]
[*][b]bChatNotifications[/b] - set to [b]True[/b] to see player votes in chat; [*][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]PositiveColorHex[/b] - Hex color for yes vote in chat.
[*][b]NegativeColorHex[/b] - hex color for no 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]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]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 automatically reduced if it exceeds the trader's remaining time). [*][b]VoteTime[/b] - Time in seconds for voting (will be reduced if it exceeds the trader's remaining time).
[/list] [/list]
[b][CVC.PauseVote][/b] [b][CVC.PauseVote][/b]
[list] [list]
[*][b]bChatNotifications[/b] - set to [b]True[/b] to see player votes in chat; [*][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]PositiveColorHex[/b] - Hex color for yes vote in chat.
[*][b]NegativeColorHex[/b] - hex color for no 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]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]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 automatically reduced if it exceeds the trader's remaining time). [*][b]VoteTime[/b] - Time in seconds for voting (will be reduced if it exceeds the trader's remaining time).
[/list] [/list]
[b][CVC.KickVote][/b] [b][CVC.KickVote][/b]
[list] [list]
[*][b]bChatNotifications[/b] - set to [b]True[/b] to see player votes in chat; [*][b]bChatNotifications[/b] - Set to [b]True[/b] to see player votes in chat.
[*][b]WarningColorHex[/b] - hex color for chat warnings; [*][b]WarningColorHex[/b] - Hex color for chat warnings.
[*][b]PositiveColorHex[/b] - hex color for yes vote in chat; [*][b]PositiveColorHex[/b] - Hex color for yes vote in chat.
[*][b]NegativeColorHex[/b] - hex color for no 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]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]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]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]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]MinVotingPlayersToStartKickVote[/b] - Minimum number of voting players to start kick voting.
[*][b]MaxKicks[/b] - maximum number of kicks per game; [*][b]MaxKicks[/b] - Maximum number of kicks per game.
[*][b]VoteTime[/b] - time in seconds for voting. [*][b]VoteTime[/b] - Time in seconds for voting.
[/list] [/list]
[b][CVC.KickProtected][/b] [b][CVC.KickProtected][/b]
[list] [list]
[*]Use [b]PlayerID[/b] to set the list of players immune to kick. You can use UniqueID or SteamID; [*]Use [b]PlayerID[/b] to set the list of players immune to kick (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. [*]Set [b]NotifyPlayerAboutKickAttempt[/b] to [b]True[/b] to let players on this list receive notifications of attempts to kick them.
[/list] [/list]
[b][CVC.StartWaveKickProtection][/b] [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] [list]
[*][b]Waves[/b] - the number of waves during which a new player has kick protection and cannot start kick vote; [*][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]MinLevel[/b] - The minimum level that a player needs to have in order to receive protection from a kick after joining the server.
[/list] [/list]
[b]How start wave kick protection works:[/b] [b]How start wave kick protection works:[/b]
@ -120,13 +124,18 @@ 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. 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]Troubleshooting[/h1] [h1]🌍 Credits[/h1]
[b](*)[/b] If your config is not created for some reason, create it manually with the following content: [list]
[b][CVC.CVC] [*]The cat on the cover is Meawbin (original character by [url=https://x.com/horrormove]Cotton Valent[/url]).
Version=0 [/list]
[/b] [b]Translators:[/b]
[list]
[*][url=https://steamcommunity.com/profiles/76561199126205919]cheungfatzong[/url] - Traditional [CHT] and Simplified [CHN] Chinese.
[/list]
Then start the server and check the file again - config content should be generated. [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] [h1]📜 Sources[/h1]
[url=https://github.com/GenZmeY/KF2-ControlledVoteCollector]https://github.com/GenZmeY/KF2-ControlledVoteCollector[/url] [b](GNU GPLv3)[/b] https://github.com/GenZmeY/KF2-ControlledVoteCollector [b](GNU GPLv3)[/b]

@ -1,15 +1,16 @@
# Controlled Vote Collector # Controlled Vote Collector
[![Steam Workshop](https://img.shields.io/static/v1?message=workshop&logo=steam&labelColor=gray&color=blue&logoColor=white&label=steam%20)](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899) [![Steam Workshop](https://img.shields.io/static/v1?message=workshop&logo=steam&labelColor=gray&color=blue&logoColor=white&label=steam%20)](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899)
[![Steam Downloads](https://img.shields.io/steam/downloads/2847465899)](https://steamcommunity.com/sharedfiles/filedetails/?id=2848836389)
[![Steam Favorites](https://img.shields.io/steam/favorites/2847465899)](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899) [![Steam Favorites](https://img.shields.io/steam/favorites/2847465899)](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899)
[![Steam Update Date](https://img.shields.io/steam/update-date/2847465899)](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899) [![MegaLinter](https://github.com/GenZmeY/KF2-ControlledVoteCollector/actions/workflows/mega-linter.yml/badge.svg?branch=master)](https://github.com/GenZmeY/KF2-ControlledVoteCollector/actions/workflows/mega-linter.yml)
[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/GenZmeY/KF2-ControlledVoteCollector)](https://github.com/GenZmeY/KF2-ControlledVoteCollector/tags) [![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/GenZmeY/KF2-ControlledVoteCollector)](https://github.com/GenZmeY/KF2-ControlledVoteCollector/tags)
[![GitHub](https://img.shields.io/github/license/GenZmeY/KF2-ControlledVoteCollector)](LICENSE) [![GitHub](https://img.shields.io/github/license/GenZmeY/KF2-ControlledVoteCollector)](LICENSE)
# Description ## Description
New vote collector with improvements and features. New vote collector with improvements and features.
# Features ## Features
- map statistics; - map statistics;
- default/next map setting; - default/next map setting;
- anonymous or public voting; - anonymous or public voting;
@ -17,10 +18,10 @@ New vote collector with improvements and features.
- kick voting setup; - kick voting setup;
- early kick protection. - early kick protection.
# Usage & Setup ## Usage & Setup
[See steam workshop page](https://steamcommunity.com/sharedfiles/filedetails/?id=2847465899) [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. **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); 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: 2. open git-bash and go to any folder where you want to store sources:
@ -34,9 +35,9 @@ New vote collector with improvements and features.
5. The compiled files will be here: 5. The compiled files will be here:
`C:\Users\<USERNAME>\Documents\My Games\KillingFloor2\KFGame\Unpublished\BrewedPC\Script\` `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. 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. Describe what the bug looks like and how reproduce it.
# License ## License
[GNU GPLv3](LICENSE) [![license](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](LICENSE)

@ -11,6 +11,15 @@ StripSource="True"
PackageBuildOrder="CVC" 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 ### ### Steam Workshop upload parameters ###
# Mutators that will be uploaded to the workshop # Mutators that will be uploaded to the workshop

2
tools

@ -1 +1 @@
Subproject commit 2f173aad7a6f4578574764801136a0d86e830653 Subproject commit fb458ac61f7e6c6426b8dff366dd5e7499e0d95f