Merge pull request #1 from GenZmeY/MegaLinter
Mega linter, editorconfig, format fixes
This commit is contained in:
commit
9cf94dfba5
35
.editorconfig
Normal file
35
.editorconfig
Normal file
@ -0,0 +1,35 @@
|
||||
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 = true
|
||||
|
||||
# Unreal Engine 3 / Source
|
||||
[*.{uc,uci}]
|
||||
indent_style = tab
|
||||
|
||||
[*.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]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{txt,cfg}]
|
||||
insert_final_newline = unset
|
||||
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[.gitignore]
|
||||
insert_final_newline = unset
|
72
.github/workflows/mega-linter.yml
vendored
Normal file
72
.github/workflows/mega-linter.yml
vendored
Normal 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
|
14
README.md
14
README.md
@ -3,22 +3,22 @@
|
||||
[![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=2521826524)
|
||||
[![Steam Downloads](https://img.shields.io/steam/downloads/2521826524)](https://steamcommunity.com/sharedfiles/filedetails/?id=2521826524)
|
||||
[![Steam Favorites](https://img.shields.io/steam/favorites/2521826524)](https://steamcommunity.com/sharedfiles/filedetails/?id=2521826524)
|
||||
[![Steam Update Date](https://img.shields.io/steam/update-date/2521826524)](https://steamcommunity.com/sharedfiles/filedetails/?id=2521826524)
|
||||
[![MegaLinter](https://github.com/GenZmeY/KF2-YetAnotherScoreboard/actions/workflows/mega-linter.yml/badge.svg)](https://github.com/GenZmeY/KF2-YetAnotherScoreboard/actions/workflows/mega-linter.yml)
|
||||
[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/GenZmeY/KF2-YetAnotherScoreboard)](https://github.com/GenZmeY/KF2-YetAnotherScoreboard/tags)
|
||||
[![GitHub](https://img.shields.io/github/license/GenZmeY/KF2-YetAnotherScoreboard)](LICENSE)
|
||||
|
||||
# Description
|
||||
## Description
|
||||
Yet another scoreboard...
|
||||
Based on the scoreboard from [ClassicHUD](https://steamcommunity.com/sharedfiles/filedetails/?id=1963099942) and heavily modified.
|
||||
|
||||
# Usage
|
||||
## Usage
|
||||
[See steam workshop page](https://steamcommunity.com/sharedfiles/filedetails/?id=2521826524)
|
||||
|
||||
***
|
||||
|
||||
**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.
|
||||
|
||||
# Build
|
||||
## Build
|
||||
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:
|
||||
`cd <ANY_FOLDER_YOU_WANT>`
|
||||
@ -31,14 +31,14 @@ Based on the scoreboard from [ClassicHUD](https://steamcommunity.com/sharedfiles
|
||||
5. The compiled files will be here:
|
||||
`C:\Users\<USERNAME>\Documents\My Games\KillingFloor2\KFGame\Unpublished\BrewedPC\Script\`
|
||||
|
||||
# Testing
|
||||
## Testing
|
||||
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 `test.cfg` (edit this file if you want to test mutator with different parameters).
|
||||
|
||||
# Bug reports
|
||||
## Bug reports
|
||||
If you find a bug, go to the [issue page](https://github.com/GenZmeY/KF2-YetAnotherScoreboard/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.
|
||||
Attach screenshots if you think it might help.
|
||||
@ -47,6 +47,6 @@ If it's a crash issue, be sure to include the `Launch.log` files. You can find t
|
||||
`C:\Users\<USERNAME>\Documents\My Games\KillingFloor2\KFGame\Logs\`
|
||||
Please note that these files are overwritten every time you start the game/server. Therefore, you must take these files immediately after the game crashes in order not to lose information.
|
||||
|
||||
# License
|
||||
## License
|
||||
* [GNU GPLv3](LICENSE) - **YetAnotherScoreboard**
|
||||
* [GNU LGPLv3](https://github.com/GenZmeY/KF2-BoxPainterLib/blob/master/LICENSE) - **BoxPainterLib**
|
||||
|
@ -422,4 +422,5 @@ function RenderButton(KFGUI_Button B)
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -59,4 +59,5 @@ function PreClientTravel(string PendingURL, ETravelType TravelType, bool bIsSeam
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -77,4 +77,5 @@ function DrawMenu()
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -86,4 +86,5 @@ function EmptyList()
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -13,6 +13,7 @@ function InitMenu()
|
||||
Components[i].InitMenu();
|
||||
}
|
||||
}
|
||||
|
||||
function ShowMenu()
|
||||
{
|
||||
local int i;
|
||||
@ -20,6 +21,7 @@ function ShowMenu()
|
||||
for (i=0; i < Components.Length; ++i)
|
||||
Components[i].ShowMenu();
|
||||
}
|
||||
|
||||
function PreDraw()
|
||||
{
|
||||
local int i;
|
||||
@ -41,6 +43,7 @@ function PreDraw()
|
||||
Components[i].PreDraw();
|
||||
}
|
||||
}
|
||||
|
||||
function InventoryChanged(optional KFWeapon Wep, optional bool bRemove)
|
||||
{
|
||||
local int i;
|
||||
@ -48,6 +51,7 @@ function InventoryChanged(optional KFWeapon Wep, optional bool bRemove)
|
||||
for (i=0; i < Components.Length; ++i)
|
||||
Components[i].InventoryChanged(Wep, bRemove);
|
||||
}
|
||||
|
||||
function MenuTick(float DeltaTime)
|
||||
{
|
||||
local int i;
|
||||
@ -72,6 +76,7 @@ function CloseMenu()
|
||||
for (i=0; i < Components.Length; ++i)
|
||||
Components[i].CloseMenu();
|
||||
}
|
||||
|
||||
function bool CaptureMouse()
|
||||
{
|
||||
local int i;
|
||||
@ -87,6 +92,7 @@ function bool CaptureMouse()
|
||||
MouseArea = None;
|
||||
return Super.CaptureMouse(); // check with frame itself.
|
||||
}
|
||||
|
||||
function bool ReceievedControllerInput(int ControllerId, name Key, EInputEvent Event)
|
||||
{
|
||||
local int i;
|
||||
@ -101,6 +107,7 @@ function bool ReceievedControllerInput(int ControllerId, name Key, EInputEvent E
|
||||
|
||||
return Super.ReceievedControllerInput(ControllerId, Key, Event);
|
||||
}
|
||||
|
||||
function KFGUI_Base FindComponentID(name InID)
|
||||
{
|
||||
local int i;
|
||||
@ -115,6 +122,7 @@ function KFGUI_Base FindComponentID(name InID)
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
||||
function FindAllComponentID(name InID, out array < KFGUI_Base> Res)
|
||||
{
|
||||
local int i;
|
||||
@ -124,6 +132,7 @@ function FindAllComponentID(name InID, out array < KFGUI_Base> Res)
|
||||
for (i=0; i < Components.Length; ++i)
|
||||
Components[i].FindAllComponentID(InID, Res);
|
||||
}
|
||||
|
||||
function RemoveComponent(KFGUI_Base B)
|
||||
{
|
||||
local int i;
|
||||
@ -138,6 +147,7 @@ function RemoveComponent(KFGUI_Base B)
|
||||
for (i=0; i < Components.Length; ++i)
|
||||
Components[i].RemoveComponent(B);
|
||||
}
|
||||
|
||||
function NotifyLevelChange()
|
||||
{
|
||||
local int i;
|
||||
|
Loading…
x
Reference in New Issue
Block a user