-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #223 from MrDave1999/dev
9.0.0 Release
- Loading branch information
Showing
542 changed files
with
19,800 additions
and
10,401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
**/bin | ||
**/obj | ||
**/dependencies | ||
filterscripts/*.amx | ||
ctf-gamemode-windows/ | ||
dotnet/runtime/ | ||
runtime/ | ||
.vscode/ | ||
plugins/ | ||
.git/ | ||
*.exe | ||
*.dll | ||
*.so | ||
logs/ | ||
scripts/ | ||
screenshots/ | ||
tests/ | ||
announce.exe | ||
samp-server.exe | ||
samp-npc.exe | ||
announce | ||
samp03svr | ||
samp-npc | ||
server.cfg | ||
server_log.txt | ||
server_log.txt | ||
*.zip | ||
*.rar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,56 @@ | ||
# | ||
# SA-MP Server Info | ||
# | ||
HOST_NAME=.:: Capture The Flag ::. |Team DeathMatch| | ||
LANGUAGE_NAME=Spanish | ||
GAME_MODE_TEXT=TDM/CTF | ||
MAP_NAME= | ||
WEB_URL=https://www.sa-mp.com/ | ||
ServerInfo__HostName=[CTF] Capture The Flag | Team Deathmatch | [TDM] | ||
ServerInfo__LanguageText=English | ||
ServerInfo__GameModeText=CTF/Team Deathmatch [v9.0] | ||
ServerInfo__MapName=RC_Battlefield | ||
ServerInfo__WebUrl=https://github.com/MrDave1999/Capture-The-Flag | ||
ServerInfo__IntroAudioUrl=https://od.lk/s/Nl8yMDg4MTc0NDBf/intro-cs.mp3 | ||
# Expressed in seconds. | ||
ServerInfo__FlagAutoReturnTime=120 | ||
|
||
ServerOwner__Name=MrDave | ||
# Specify the secret key to give me admin. | ||
ServerOwner__SecretKey= | ||
|
||
# Expressed in minutes. | ||
CommandCooldowns__Health=3 | ||
CommandCooldowns__Armour=3 | ||
CommandCooldowns__Coins=3 | ||
|
||
TopPlayers__RequiredTotalKills=150 | ||
TopPlayers__RequiredMaxKillingSpree=10 | ||
|
||
MariaDB__Server=mariadb | ||
MariaDB__Port=3306 | ||
MariaDB__Database=gamemode | ||
MariaDB__UserName=root | ||
MariaDB__Password=123456789 | ||
|
||
SQLite__DataSource=scripts/sqlite/gamemode.db | ||
|
||
HIDDEN_COMMAND=/1234 # Command used to become admin | ||
FLAG_RETURN_TIME=200 # Flag auto-return time | ||
DatabaseProvider=InMemory | ||
CodePageEncoding=cp1252 | ||
|
||
# | ||
# Connection String | ||
# Alpha team sounds | ||
# | ||
DB_HOST=mysql | ||
DB_PORT=3306 | ||
DB_DATABASE=gamemode | ||
DB_USERNAME=root | ||
DB_PASSWORD=1234 | ||
CONNECTION_STRING=server=${DB_HOST};port=${DB_PORT};username=${DB_USERNAME};password=${DB_PASSWORD};database=${DB_DATABASE}; | ||
RedFlagDroppedUrl=https://od.lk/s/Nl8yMDg4MTc0MzNf/red_flag_dropped.mp3 | ||
RedFlagReturnedUrl=https://od.lk/s/Nl8yMDg4MTc0MzRf/red_flag_returned.mp3 | ||
RedFlagTakenUrl=https://od.lk/s/Nl8yMDg4MTc0MzVf/red_flag_taken.mp3 | ||
RedTeamScoresUrl=https://od.lk/s/Nl8yMDg4MTc0MzZf/red_team_scores.mp3 | ||
|
||
# | ||
# Map Info | ||
# Beta team sounds | ||
# | ||
MAX_TIME_ROUND=1200 # Time must be in seconds | ||
MAX_TIME_LOADING=10 # Time must be in seconds | ||
MAX_SPAWNS=10 | ||
# Default values | ||
INTERIOR=0 | ||
WEATHER=10 | ||
WORLD_TIME=12 | ||
BlueFlagDroppedUrl=https://od.lk/s/Nl8yMDg4MTc0Mjlf/blue_flag_dropped.mp3 | ||
BlueFlagReturnedUrl=https://od.lk/s/Nl8yMDg4MTc0MzBf/blue_flag_returned.mp3 | ||
BlueFlagTakenUrl=https://od.lk/s/Nl8yMDg4MTc0MzFf/blue_flag_taken.mp3 | ||
BlueTeamScoresUrl=https://od.lk/s/Nl8yMDg4MTc0MzJf/blue_team_scores.mp3 | ||
|
||
# | ||
# Primary keys used by docker-compose | ||
# | ||
MAX_PLAYERS=30 # Number of players that can enter the SA-MP Server | ||
LAG_COMP_MODE=1 # Lag Compensation | ||
PORT=7777 # The port to be published by the container | ||
TZ=America/Guayaquil # Time Zone | ||
MaxPlayers=30 # Number of players that can enter the SA-MP Server | ||
LagCompMode=1 # Lag Compensation | ||
Port=7777 # The port to be published by the container | ||
TZ=America/Bogota # Time Zone | ||
MemoryLimit=1g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Upload artifacts | ||
|
||
on: | ||
release: | ||
types: [published] | ||
env: | ||
DOTNET_VERSION: '8.x' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
- name: Download SA-MP Server | ||
run: wget https://github.com/MrDave1999/samp-server/releases/download/sampserver.v1/samp03.zip | ||
- name: Unzip SA-MP Server | ||
run: unzip samp03.zip -d ctf-gamemode-windows | ||
- name: Move contents of samp03 to root directory | ||
run: | | ||
mv ctf-gamemode-windows/samp03/** ctf-gamemode-windows | ||
rmdir ctf-gamemode-windows/samp03 | ||
- name: Add plugins to server.cfg file | ||
run: | | ||
echo "" >> ctf-gamemode-windows/server.cfg | ||
echo "plugins SampSharp streamer" >> ctf-gamemode-windows/server.cfg | ||
- name: Build game mode | ||
run: dotnet publish src/Host -c Release -o bin --framework=net8.0 | ||
- name: Copy artifacts | ||
run: | | ||
mkdir ctf-gamemode-windows/plugins ctf-gamemode-windows/filterscripts | ||
cp -r bin ctf-gamemode-windows | ||
cp plugins/*.dll ctf-gamemode-windows/plugins | ||
cp filterscripts/*.amx ctf-gamemode-windows/filterscripts | ||
cp -r scripts ctf-gamemode-windows | ||
- name: Create .env file | ||
run: cp .env.example .env | ||
- name: Copy .env file | ||
run: cp .env ctf-gamemode-windows | ||
- name: Create compressed file | ||
run: zip -r ctf-gamemode-windows.zip ctf-gamemode-windows | ||
- name: Upload artifacts to release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: ctf-gamemode-windows.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: CTF CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
pull_request: | ||
branches: | ||
- dev | ||
env: | ||
DOTNET_VERSION: '8.x' | ||
|
||
jobs: | ||
unit_testing: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
- name: Execute unit tests | ||
run: dotnet test ./tests/Application.Tests/CTF.Application.Tests.csproj -c Release | ||
|
||
integration_testing: | ||
runs-on: ubuntu-latest | ||
services: | ||
mariadb: | ||
image: mariadb | ||
ports: | ||
- 3306:3306 | ||
env: | ||
MARIADB_DATABASE: gamemode | ||
MARIADB_ROOT_PASSWORD: 123456789 | ||
options: >- | ||
--name mariadb | ||
--health-cmd="mariadb-admin ping -h localhost" | ||
--health-interval=10s | ||
--health-timeout=5s | ||
--health-retries=3 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
- name: Check MariaDB version | ||
run: docker exec mariadb mariadb --version | ||
- name: Check SQLite version | ||
run: sqlite3 --version | ||
- name: Import databases | ||
run: | | ||
docker exec -i mariadb mariadb -uroot -p123456789 gamemode < ./scripts/mariadb/gamemode.sql | ||
sqlite3 gamemode.db < ./scripts/sqlite/gamemode.sql | ||
- name: Create .env.test file | ||
run: cp ./tests/Persistence.Tests/.env.test.example ./tests/Persistence.Tests/.env.test | ||
- name: Execute integration tests | ||
run: dotnet test ./tests/Persistence.Tests/Persistence.Tests.csproj -c Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: CTF Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy using ssh | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
key: ${{ secrets.PRIVATE_KEY }} | ||
port: 22 | ||
script: | | ||
cd Capture-The-Flag | ||
git pull origin main | ||
git status | ||
sudo docker compose up --build -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
// Use IntelliSense to find out which attributes exist for C# debugging | ||
// Use hover for the description of the existing attributes | ||
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md | ||
"name": ".NET Core Launch (console)", | ||
"type": "coreclr", | ||
"request": "launch", | ||
"preLaunchTask": "build", | ||
// If you have changed target frameworks, make sure to update the program path. | ||
"program": "${workspaceFolder}/samp-server.exe", | ||
"args": [], | ||
"cwd": "${workspaceFolder}", | ||
"stopAtEntry": false, | ||
}, | ||
{ | ||
"name": ".NET Core Attach", | ||
"type": "coreclr", | ||
"request": "attach" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.