Merge pull request #3 from GenZmeY/MegaLinter

add Mega Linter
This commit is contained in:
GenZmeY 2023-05-14 09:41:36 +03:00 committed by GitHub
commit a747c3eaf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 1720 additions and 1621 deletions

33
.editorconfig Normal file
View 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

72
.github/workflows/mega-linter.yml vendored Normal file
View File

@ -0,0 +1,72 @@
---
name: MegaLinter
permissions: read-all
on:
push:
pull_request:
branches: [master]
env:
APPLY_FIXES: none
APPLY_FIXES_EVENT: pull_request
APPLY_FIXES_MODE: commit
DISABLE: SPELL
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
name: MegaLinter
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
- name: MegaLinter
id: ml
uses: oxsecurity/megalinter@v6
env:
VALIDATE_ALL_CODEBASE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive production artifacts
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: MegaLinter reports
path: |
megalinter-reports
mega-linter.log
- name: Create Pull Request with applied fixes
id: cpr
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
uses: peter-evans/create-pull-request@v5
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: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
- name: Prepare commit
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
run: sudo chown -Rc $UID .git/
- name: Commit and push applied linter fixes
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
commit_message: "[MegaLinter] Apply linters fixes"
commit_user_name: megalinter-bot
commit_user_email: nicolas.vuillamy@ox.security

View File

@ -1,28 +1,29 @@
# ZedSpawner # ZedSpawner
[![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=2811290931) [![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=2811290931)
[![Steam Downloads](https://img.shields.io/steam/downloads/2811290931)](https://steamcommunity.com/sharedfiles/filedetails/?id=2811290931)
[![Steam Favorites](https://img.shields.io/steam/favorites/2811290931)](https://steamcommunity.com/sharedfiles/filedetails/?id=2811290931) [![Steam Favorites](https://img.shields.io/steam/favorites/2811290931)](https://steamcommunity.com/sharedfiles/filedetails/?id=2811290931)
[![Steam Update Date](https://img.shields.io/steam/update-date/2811290931)](https://steamcommunity.com/sharedfiles/filedetails/?id=2811290931) [![MegaLinter](https://github.com/GenZmeY/KF2-ZedSpawner/actions/workflows/mega-linter.yml/badge.svg?branch=master)](https://github.com/GenZmeY/KF2-ZedSpawner/actions/workflows/mega-linter.yml)
[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/GenZmeY/KF2-ZedSpawner)](https://github.com/GenZmeY/KF2-ZedSpawner/tags) [![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/GenZmeY/KF2-ZedSpawner)](https://github.com/GenZmeY/KF2-ZedSpawner/tags)
[![GitHub](https://img.shields.io/github/license/GenZmeY/KF2-ZedSpawner)](LICENSE) [![GitHub](https://img.shields.io/github/license/GenZmeY/KF2-ZedSpawner)](LICENSE)
# Description ## Description
Spawner for zeds. Started as a modification of the [this version](https://steamcommunity.com/sharedfiles/filedetails/?id=2488241348), but now there is almost nothing left of the previous mutator, lol Spawner for zeds. Started as a modification of the [this version](https://steamcommunity.com/sharedfiles/filedetails/?id=2488241348), but now there is almost nothing left of the previous mutator, lol
# Features ## Features
- spawn without increasing zed counter; - spawn without increasing zed counter;
- spawn depends on the number of players; - spawn depends on the number of players;
- cyclic spawn (useful for endless mode); - cyclic spawn (useful for endless mode);
- separate spawn for special waves and boss waves; - separate spawn for special waves and boss waves;
- spawn after a certain percentage of killed zeds. - spawn after a certain percentage of killed zeds.
# Usage & Setup ## Usage & Setup
[See steam workshop page](https://steamcommunity.com/sharedfiles/filedetails/?id=2811290931) [See steam workshop page](https://steamcommunity.com/sharedfiles/filedetails/?id=2811290931)
# Spawn calculator ## Spawn calculator
[Spawn Calculator](https://docs.google.com/spreadsheets/d/1q67WJ36jhj6Y0lPNO5tS2bU79Wphu4Xmi62me6DAwtM/edit?usp=sharing) [Spawn Calculator](https://docs.google.com/spreadsheets/d/1q67WJ36jhj6Y0lPNO5tS2bU79Wphu4Xmi62me6DAwtM/edit?usp=sharing)
# 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:
@ -36,17 +37,10 @@ Spawner for zeds. Started as a modification of the [this version](https://steamc
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\`
# Testing ## Bug reports
Open git-bash in the source folder and run command:
`./tools/builder -t`
(or `./tools/builder -ct` if you haven't compiled the mutator yet)
A local single-user test will be launched with parameters from `builder.cfg` (edit this file if you want to test mutator with different parameters).
# Bug reports
If you find a bug, go to the [issue page](https://github.com/GenZmeY/KF2-ZedSpawner/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-ZedSpawner/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.
Attaching your KFZedSpawner.ini and Launch.log can also be helpful. Attaching your KFZedSpawner.ini and Launch.log can also be helpful.
# License ## License
[GNU GPLv3](LICENSE) [![license](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](LICENSE)