Compare commits
No commits in common. "master" and "v1.1.0" 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
|
|
114
.github/workflows/mega-linter.yml
vendored
114
.github/workflows/mega-linter.yml
vendored
@ -1,114 +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
|
|
||||||
|
|
||||||
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"
|
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
*.psd
|
testing.ini
|
||||||
/ignore
|
3rd-party-bin
|
||||||
|
@ -1,31 +1,20 @@
|
|||||||
[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-TAWOD[/img] [img]https://img.shields.io/steam/favorites/2379769040[/img] [img]https://img.shields.io/steam/update-date/2379769040[/img] [url=https://steamcommunity.com/sharedfiles/filedetails/changelog/2379769040][img]https://img.shields.io/github/v/tag/GenZmeY/KF2-TAWOD[/img][/url]
|
[img]https://raw.githubusercontent.com/GenZmeY/KF2-TAWOD/master/PublicationContent/mutbanner.png[/img]
|
||||||
|
|
||||||
[h1]📋 Description:[/h1]
|
[h1]Description:[/h1]
|
||||||
A small server-side mutator that changes the default behavior by forcing players to drop all their weapons on death (instead of just the current weapon).
|
[i]A small mutator that forces players to throw all their weapons on death (not just the current weapon as in the game by default). [/i]
|
||||||
|
|
||||||
[h1]❌ Whitelisted?[/h1]
|
[h1]The mutator is not whitelisted![/h1]
|
||||||
No. This mod is not whitelisted and will de-rank your server. Any XP earned will not be saved.
|
You will not gain experience for playing with this mutator.
|
||||||
|
|
||||||
But I hope that it will be whitelisted - I submitted whitelist request here:
|
[h1]Usage (server):[/h1]
|
||||||
https://forums.tripwireinteractive.com/index.php?threads/whitelisting-mods-and-mutators.120340/post-2353664
|
[b]Note:[/b] 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.
|
||||||
|
|
||||||
[h1]🖥️ Usage (server)[/h1]
|
1. Open your PCServer-KFEngine.ini / LinuxServer-KFEngine.ini;
|
||||||
[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]
|
2. Add the following string to the [OnlineSubsystemSteamworks.KFWorkshopSteamworks] section:
|
||||||
[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)
|
|
||||||
[*]Add the following string to the [b][OnlineSubsystemSteamworks.KFWorkshopSteamworks][/b] section (create one if it doesn't exist):
|
|
||||||
[code]ServerSubscribedWorkshopItems=2379769040[/code]
|
[code]ServerSubscribedWorkshopItems=2379769040[/code]
|
||||||
[*]Start server and wait for mutator download.
|
3. Start the server and wait while the mutator is downloading;
|
||||||
[*]When the download is complete, stop the server.
|
4. Add the following line to the startup parameters and restart the server:
|
||||||
[*]Add mutator to server start parameters: [code]?Mutator=TAWOD.Mut[/code] and start the server.
|
[code]?Mutator=TAWOD.TAWODMut[/code]
|
||||||
[/olist]
|
|
||||||
|
|
||||||
[h1]☑️ Status: Completed[/h1]
|
[h1]Sources:[/h1]
|
||||||
✔️ The mutator works with the current version of the game (v1150) and I have implemented everything I planned.
|
[url=https://github.com/GenZmeY/KF2-TAWOD]https://github.com/GenZmeY/KF2-TAWOD[/url] (GNU GPLv3)
|
||||||
⛔️ 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-TAWOD [b](GNU GPLv3)[/b]
|
|
||||||
|
26
README.md
26
README.md
@ -1,17 +1,14 @@
|
|||||||
# Throw All Weapons On Death
|
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2379769040)
|
||||||
|
|
||||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2379769040)
|
|
||||||
|
|
||||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2379769040)
|
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2379769040)
|
||||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2379769040)
|
|
||||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2379769040)
|
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2379769040)
|
||||||
[](https://github.com/GenZmeY/KF2-TAWOD/actions/workflows/mega-linter.yml)
|
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2379769040)
|
||||||
[](https://github.com/GenZmeY/KF2-TAWOD/tags)
|
[](https://github.com/GenZmeY/KF2-TAWOD/tags)
|
||||||
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
|
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
|
||||||
|
|
||||||
**A small server-side mutator that forces players to throw all their weapons on death (not just the current weapon as in the game by default).**
|
A small mutator that forces players to throw all their weapons on death (not just the current weapon as in the game by default).
|
||||||
|
|
||||||
## 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:
|
||||||
@ -25,12 +22,17 @@
|
|||||||
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\`
|
||||||
|
|
||||||
## Usage
|
# Usage (Server)
|
||||||
[See steam workshop page](https://steamcommunity.com/sharedfiles/filedetails/?id=2379769040)
|
1. Open your PCServer-KFEngine.ini / LinuxServer-KFEngine.ini;
|
||||||
|
2. Add the following string to the [OnlineSubsystemSteamworks.KFWorkshopSteamworks] section (create one if it doesn't exist):
|
||||||
|
`ServerSubscribedWorkshopItems=2379769040`
|
||||||
|
3. Start the server and wait while the mutator is downloading;
|
||||||
|
4. Add the following line to the startup parameters and restart the server:
|
||||||
|
`?Mutator=TAWOD.TAWODMut`
|
||||||
|
|
||||||
## Bug reports
|
# Bug reports
|
||||||
If you find a bug, create new issue here: [Issues](https://github.com/GenZmeY/KF2-TAWOD/issues)
|
If you find a bug, create new issue here: [Issues](https://github.com/GenZmeY/KF2-TAWOD/issues)
|
||||||
Describe what the bug looks like and how to reproduce it.
|
Describe what the bug looks like and how to reproduce it.
|
||||||
|
|
||||||
## License
|
# License
|
||||||
[](LICENSE)
|
[GNU GPLv3](LICENSE).
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
class Mut extends KFMutator;
|
|
||||||
|
|
||||||
public simulated function bool SafeDestroy()
|
|
||||||
{
|
|
||||||
return (bPendingDelete || bDeleteMe || Destroy());
|
|
||||||
}
|
|
||||||
|
|
||||||
public event PreBeginPlay()
|
|
||||||
{
|
|
||||||
Super.PreBeginPlay();
|
|
||||||
`log("Loaded.", true, 'TAWOD');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function AddMutator(Mutator M)
|
|
||||||
{
|
|
||||||
if (M == Self) return;
|
|
||||||
|
|
||||||
if (M.Class == Class)
|
|
||||||
Mut(M).SafeDestroy();
|
|
||||||
else
|
|
||||||
Super.AddMutator(M);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function bool PreventDeath(Pawn Killed, Controller Killer, class<DamageType> damageType, vector HitLocation)
|
|
||||||
{
|
|
||||||
local KFWeapon TempWeapon;
|
|
||||||
local KFPawn_Human KFP;
|
|
||||||
|
|
||||||
KFP = KFPawn_Human(Killed);
|
|
||||||
|
|
||||||
if (Role >= ROLE_Authority && KFP != None && KFP.InvManager != None)
|
|
||||||
foreach KFP.InvManager.InventoryActors(class'KFWeapon', TempWeapon)
|
|
||||||
if (TempWeapon != None && TempWeapon.bDropOnDeath && TempWeapon.CanThrow())
|
|
||||||
KFP.TossInventory(TempWeapon);
|
|
||||||
|
|
||||||
return Super.PreventDeath(Killed, Killer, damageType, HitLocation);
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultproperties
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
[Flags]
|
[Flags]
|
||||||
AllowDownload=False
|
AllowDownload=True
|
||||||
ClientOptional=False
|
ClientOptional=False
|
||||||
ServerSideOnly=True
|
ServerSideOnly=False
|
||||||
|
@ -1 +1,37 @@
|
|||||||
class TAWODMut extends Mut; // backward compatibility
|
class TAWODMut extends KFMutator;
|
||||||
|
|
||||||
|
public event PreBeginPlay()
|
||||||
|
{
|
||||||
|
Super.PreBeginPlay();
|
||||||
|
`log("Loaded.", true, 'TAWOD');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function AddMutator(Mutator Mut)
|
||||||
|
{
|
||||||
|
if (Mut == Self) return;
|
||||||
|
|
||||||
|
if (Mut.Class == Class)
|
||||||
|
Mut.Destroy();
|
||||||
|
else
|
||||||
|
Super.AddMutator(Mut);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function bool PreventDeath(Pawn Killed, Controller Killer, class<DamageType> damageType, vector HitLocation)
|
||||||
|
{
|
||||||
|
local KFWeapon TempWeapon;
|
||||||
|
local KFPawn_Human KFP;
|
||||||
|
|
||||||
|
KFP = KFPawn_Human(Killed);
|
||||||
|
|
||||||
|
if (Role >= ROLE_Authority && KFP != None && KFP.InvManager != None)
|
||||||
|
foreach KFP.InvManager.InventoryActors(class'KFWeapon', TempWeapon)
|
||||||
|
if (TempWeapon != None && TempWeapon.bDropOnDeath && TempWeapon.CanThrow())
|
||||||
|
KFP.TossInventory(TempWeapon);
|
||||||
|
|
||||||
|
return Super.PreventDeath(Killed, Killer, damageType, HitLocation);
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultproperties
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -11,15 +11,6 @@ StripSource="True"
|
|||||||
PackageBuildOrder="TAWOD"
|
PackageBuildOrder="TAWOD"
|
||||||
|
|
||||||
|
|
||||||
### 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
2
tools
@ -1 +1 @@
|
|||||||
Subproject commit fb458ac61f7e6c6426b8dff366dd5e7499e0d95f
|
Subproject commit 02222cf4536ac3b4dc9341c17549f77bd8efd4a4
|
Loading…
x
Reference in New Issue
Block a user