Skip to content

Commit

Permalink
Release: 1.0.0-beta.1 (#1) [skip ci]
Browse files Browse the repository at this point in the history
* Init README

* Add redm-plugins.ini

* add funding

* use %VERSION% macro

* Add CI
  • Loading branch information
SergeyShorokhov committed Apr 24, 2023
1 parent fb91a10 commit 494da9a
Show file tree
Hide file tree
Showing 17 changed files with 3,186 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
custom: [ 'https://www.paypal.me/wopox1337', 'https://yoomoney.ru/to/410011388660403']

File renamed without changes.
66 changes: 66 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<p align="center">
<a href="https://github.com/wopox1337/ReDeathmatch">
<img
width="500px"
alt="Gun logo"
src="https://user-images.githubusercontent.com/18553678/233882657-0ee4d8ea-2492-4af7-8db5-32430689c131.png"
>
</a>
</p>

<p align="center">
AMXModX plugins to provide Deathmatch gameplay in <a href="https://store.steampowered.com/app/10/CounterStrike/">Counter-Strike 1.6</a> optimized to work with <a href="https://github.com/s1lentq/ReGameDLL_CS">ReGameDLL_CS</a>.
</p>

<p align="center">
<a href="https://github.com/wopox1337/ReDeathmatch/releases/latest">
<img
src="https://img.shields.io/github/downloads/wopox1337/ReDeathmatch/total?label=Download%40latest&style=flat-square&logo=github&logoColor=white"
alt="Build status"
>
</a>
<a href="https://github.com/wopox1337/ReDeathmatch/actions">
<img
src="https://img.shields.io/github/workflow/status/wopox1337/ReDeathmatch/CI/master?style=flat-square&logo=github&logoColor=white"
alt="Build status"
>
</a>
<a href="https://github.com/wopox1337/ReDeathmatch/releases">
<img
src="https://img.shields.io/github/v/release/wopox1337/ReDeathmatch?include_prereleases&style=flat-square&logo=github&logoColor=white"
alt="Release"
>
</a>
<a href="https://www.amxmodx.org/downloads-new.php">
<img
src="https://img.shields.io/badge/AMXModX-%3E%3D1.9.0-blue?style=flat-square"
alt="AMXModX dependency"
>
</a>
</p>

## About
- TODO

## Features
- TODO

## Requirements
- HLDS installed;
- [ReGameDLL](https://github.com/s1lentq/ReGameDLL_CS) installed;
- Installed AMXModX ([`v1.9`](https://www.amxmodx.org/downloads-new.php) or [`v1.10`](https://www.amxmodx.org/downloads-new.php?branch=master));
- Installed [ReAPI](https://github.com/s1lentq/reapi) module;

## Installation
- [Download the latest](https://github.com/wopox1337/ReDeathmatch/releases/latest) stable version from the release section.
- Extract the `cstrike` folder to the root folder of the HLDS server;
- Make sure that all plugins are running and in the correct order, using the `amxx list` command.

## Updating
- Put new plugins and lang-files (`plugins/*.amxx` & `data/lang/*.txt`) into `amxmodx/` folder on the HLDS server;
- Restart the server (command `restart` or change the map);
- Make sure that the versions of the plugins are up to date with the command `amxx list`.

## Downloads
- [Release builds](https://github.com/wopox1337/ReDeathmatch/releases)
- [Dev builds](https://github.com/wopox1337/ReDeathmatch/actions/workflows/build.yml)
145 changes: 145 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
name: CI

on:
push:
branches: [master]
paths-ignore:
- "**.md"

pull_request:
types: [opened, reopened, synchronize]
release:
types: [published]

jobs:
build:
name: "Build"
runs-on: ubuntu-20.04
outputs:
COMMIT_SHA: ${{ steps.declare_sha.outputs.COMMIT_SHA }}
SEMVER: ${{ steps.declare_sha.outputs.SEMVER }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Parse SemVer string (release)
id: semver_parser
if: |
github.event_name == 'release' &&
github.event.action == 'published' &&
startsWith(github.ref, 'refs/tags/')
uses: booxmedialtd/[email protected]
with:
input_string: ${{ github.ref }}
version_extractor_regex: 'refs\/tags\/(.*)$'

- name: Declare SHA & package name
id: declare_sha
shell: bash
run: |
SHA=$(git rev-parse --short HEAD)
echo "COMMIT_SHA=$SHA" >> $GITHUB_OUTPUT
echo "SEMVER=${{ steps.semver_parser.outputs.fullversion }}" >> $GITHUB_OUTPUT
- name: Setup latest ReAPI includes
env:
REPO: "s1lentq/reapi"
run: |
mkdir -p dep/reapi
cd dep/reapi
curl \
--silent \
https://api.github.com/repos/$REPO/releases/latest | \
grep "browser_download_url" | \
grep -Eo 'https://[^\"]*' | \
xargs wget
7z x *.zip
echo "REAPI_INCLUDE_PATH=$(pwd)/addons/amxmodx/scripting/include" >> $GITHUB_ENV
- name: Update versions for plugins (release)
working-directory: cstrike/addons/amxmodx/scripting/include/
if: |
github.event_name == 'release' &&
github.event.action == 'published' &&
startsWith(github.ref, 'refs/tags/')
env:
PLUGIN_VERSION: "${{ steps.declare_sha.outputs.SEMVER }}"
run: sed -i "s|%VERSION%|$PLUGIN_VERSION|g" redm.inc

- name: Update versions for plugins (only for artifacts builds)
working-directory: cstrike/addons/amxmodx/scripting/include/
env:
PLUGIN_VERSION: "${{ steps.declare_sha.outputs.COMMIT_SHA }}"
run: sed -i "s|%VERSION%|$PLUGIN_VERSION|g" redm.inc

- name: Setup AMXXPawn Compiler
uses: wopox1337/setup-amxxpawn@v1
with:
version: "1.10.5428"

- name: Compile plugins
working-directory: cstrike/addons/amxmodx/scripting/
env:
REAPI_INCLUDE: ${{ env.REAPI_INCLUDE_PATH }}
run: |
compile() {
sourcefile=$1
amxxfile="$(echo $sourcefile | sed -e 's/\.sma$/.amxx/')"
output_path="../plugins/$amxxfile"
mkdir -p $(dirname $output_path)
echo -n "Compiling $sourcefile ... "
amxxpc $sourcefile -o"$output_path" \
-i"include" \
-i"$REAPI_INCLUDE"
}
export -f compile
find * -type f -name "*.sma" -exec bash -c 'compile "$0"' {} \;
- name: Move files
run: |
mkdir publish
mv cstrike/ publish/
- name: Deploy artifact
uses: actions/[email protected]
with:
name: ReDeathatch-${{ steps.declare_sha.outputs.COMMIT_SHA }}-dev
path: publish/*

publish:
name: "Publish release"
runs-on: ubuntu-20.04
needs: [build]
if: |
github.event_name == 'release' &&
github.event.action == 'published' &&
startsWith(github.ref, 'refs/tags/')
steps:
- name: Download artifact
uses: actions/[email protected]
with:
name: ReDeathatch-${{ needs.build.outputs.COMMIT_SHA }}-dev

- name: Packaging binaries
id: packaging
run: 7z a -mm=Deflate -mfb=258 -mpass=15 -r ReDeathatch-${{ needs.build.outputs.SEMVER }}.zip cstrike/

- name: Publish artifacts
uses: softprops/action-gh-release@v1
id: publish-job
if: |
startsWith(github.ref, 'refs/tags/') &&
steps.packaging.outcome == 'success'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
*.zip
5 changes: 5 additions & 0 deletions cstrike/addons/amxmodx/configs/plugins-redm.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
; Main plugin
ReDeathmatch.amxx debug

; Addons
redm_spawns.amxx debug
137 changes: 137 additions & 0 deletions cstrike/addons/amxmodx/configs/redm/gamemode_deathmatch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
{
"equip": {
"primary": [
"weapon_m4a1",
"weapon_ak47",
"weapon_famas",
"weapon_galil",
"weapon_awp",
"weapon_mp5navy",
"weapon_p90",
"weapon_aug",
"weapon_sg552",
"weapon_scout",
"weapon_ump45",
"weapon_sg550",
"weapon_m249",
"weapon_g3sg1",
"weapon_m3",
"weapon_xm1014",
"weapon_tmp",
"weapon_mac10"
],
"secondary": [
"weapon_usp",
"weapon_glock18",
"weapon_deagle",
"weapon_p228",
"weapon_elite",
"weapon_fiveseven"
]
},
"cvars": {
"developer": "0",
"mp_round_restart_delay": "7.0",
"bot_stop": "0",
"bot_quota": "18",
"mp_roundtime": "2.25",
"mp_freeforall": "1",
"bot_chatter": "off",
"bot_deathmatch": "1",
"bot_defer_to_human": "0",
"bot_difficulty": "3",
"bot_join_after_player": "0",
"bot_quota_mode": "fill",
"motdfile": "",
"mp_auto_join_team": "1",
"mp_autokick": "0",
"mp_autokick_timeout": "0",
"mp_autoteambalance": "0",
"mp_buytime": "0",
"mp_buy_anywhere": "1",
"mp_ct_default_grenades": "",
"mp_t_default_weapons_primary": "ak47",
"mp_ct_default_weapons_primary": "m4a1",
"mp_t_default_weapons_secondary": "glock18",
"mp_ct_default_weapons_secondary": "usp",
"mp_forcerespawn": "0.5",
"mp_free_armor": "2",
"mp_freezetime": "0",
"mp_friendlyfire": "0",
"mp_give_player_c4": "0",
"mp_infinite_ammo": "2",
"mp_item_staytime": "0",
"mp_limitteams": "0",
"mp_startmoney": "0",
"mp_playerid": "0",
"mp_radio_maxinround": "0",
"mp_refill_bpammo_weapons": "2",
"mp_round_infinite": "bcdefg",
"mp_scoreboard_showhealth": "0",
"mp_scoreboard_showmoney": "0",
"mp_show_radioicon": "0",
"mp_t_default_grenades": "",
"mp_timelimit": "0",
"mp_weapons_allow_map_placed": "0",
"mp_damage_headshot_only": "0"
},
"modes": {
"Pistols - HS ONLY": {
"equip": {
"secondary": [
"weapon_usp",
"weapon_glock18",
"weapon_deagle",
"weapon_p228",
"weapon_elite",
"weapon_fiveseven"
]
},
"cvars": {
"mp_damage_headshot_only": "1",
"mp_t_default_weapons_primary": "",
"mp_ct_default_weapons_primary": "",
"mp_free_armor": "0"
}
},
"Second round weapons": {
"equip": {
"primary": [
"weapon_scout",
"weapon_famas",
"weapon_galil",
"weapon_mp5navy",
"weapon_p90",
"weapon_ump45",
"weapon_m3",
"weapon_xm1014",
"weapon_tmp",
"weapon_mac10"
],
"secondary": [
"weapon_usp",
"weapon_glock18",
"weapon_deagle",
"weapon_p228",
"weapon_elite",
"weapon_fiveseven"
]
},
"cvars": {
"mp_t_default_weapons_primary": "scout",
"mp_ct_default_weapons_primary": "scout",
"mp_t_default_weapons_secondary": "deagle",
"mp_ct_default_weapons_secondary": "deagle",
"mp_free_armor": "1"
}
},
"All weapons - HS ONLY": {
"cvars": {
"mp_damage_headshot_only": "1"
}
},
"All weapons": {

}
}
}
25 changes: 25 additions & 0 deletions cstrike/addons/amxmodx/data/lang/redm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[en]
Currently = currently
Already = already

RandomWeapons = Random weapon
Enabled = enabled
Disabled = disabled
PrimaryEquip = Primary equip
SecondaryEquip = Secondary equip
ToClosePressG = \wTo close the menu - press `\yG\w`
CurrentMode = Current mode
GunsHelp = Say ^3guns ^1to open equip menu.

[ru]
Currently = сейчас
Already = уже

RandomWeapons = Случайные оружия
Enabled = включено
Disabled = отключено
PrimaryEquip = Основное оружие
SecondaryEquip = Дополнительное оружие
ToClosePressG = \wЧтобы закрыть меню - нажмите `\yG\w`
CurrentMode = Текущий режим
GunsHelp = Напишите ^3guns ^1чтобы открыть меню экипировки.
Loading

0 comments on commit 494da9a

Please sign in to comment.