Skip to content

Commit

Permalink
gsc auto compile + readme changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mjkzy committed Jun 17, 2022
1 parent 1a22856 commit a42ab21
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 14 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Compile Mod
on:
push:
branches: [ main ]
jobs:
create_release:
name: Create GitHub Release
runs-on: windows-2019
steps:
- uses: actions/checkout@v2

- name: Compile Mod
shell: cmd
# Arguments:
# release.zip = File Name to have under your GitHub Release.
run: cd tools && call compile.bat hitmarkers.zip

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "Release"
files: |
tools/hitmarkers.zip
21 changes: 7 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
# BO2 ZM Hitmarkers
# T6ZM ZM Hitmarkers
a simple gsc to add hitmarkers in zombies.

# How to install
- To use only this mod, compile _**_scoreboard_source.gsc**_ as _**_scoreboard.gsc**_ and place it in the directory _**maps/mp/gametypes_zm/**_
## compiling yourself
1. download [gsc-tool](https://github.com/xensik/gsc-tool/releases)
2. compile with command `./gsc-tool.exe comp t6 hitmarkers.gsc`

To add this to your own script, copy all the scripts inside _**_scoreboard_source.gsc_**_ except for the _**init**_ function.
Then, paste the scripts into your own _**.gsc**_ file, then add _**thread init_player_hitmarkers();**_ into your _**init**_ function.

## Red Hitmarkers (optional)
To enable Red Hitmarkers on zombie death, simply put this in your dedicated config:
```
set redHitmarkers 1
```

By **mikzy** & **Cahz**.
Extra help by **JezuzLizard** and **INSANEMODE**.
## credits
thanks to old contributions from **Cahz**, **JezuzLizard**, and **INSANEMODE**.
File renamed without changes.
Binary file added tools/7za.dll
Binary file not shown.
Binary file added tools/7za.exe
Binary file not shown.
28 changes: 28 additions & 0 deletions tools/compile.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@echo off
setlocal enableDelayedExpansion
setlocal enableExtensions

:: Clear out any gsc, zip, and tmp/ files from previous runs.
del *.gsc /s /f /q > nul 2>&1
del *.zip /s /f /q > nul 2>&1
del /f /s /q tmp > nul
rd /s /q tmp > nul


mkdir tmp
:: Set variables.
set "crt_dir=%~dp0"
for %%I in ("%crt_dir%\..") do set "root=%%~fI"
set "SEARCHPATH=%root%\src"
set FileName=%1

:: Copy everything from ./src into %cd%
robocopy %SEARCHPATH% %cd%\tmp\ /s /e > nul

gsc-tool.exe comp t6 %cd%\tmp\ > nul

echo - Compiled GSC.

:: ZIP all the gsc together
start /wait 7za a %FileName% .\tmp\* > nul
echo - ZIPd GSC.
Binary file added tools/gsc-tool.exe
Binary file not shown.

0 comments on commit a42ab21

Please sign in to comment.