mirror of
https://github.com/tilgep/stripper.git
synced 2025-12-06 18:08:24 +00:00
Merge 3b7f563bd2 into 42f3ed9b31
This commit is contained in:
commit
28f7176c2a
6
.github/dependabot.yml
vendored
Normal file
6
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
89
.github/workflows/ci.yml
vendored
Normal file
89
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
name: CI
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: "Build"
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-24.04]
|
||||
include:
|
||||
- os: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build sourcemod plugin
|
||||
uses: maxime1907/action-sourceknight@v1
|
||||
with:
|
||||
cmd: build
|
||||
|
||||
- name: Create package
|
||||
run: |
|
||||
mkdir -p /tmp/package
|
||||
cp -R .sourceknight/package/* /tmp/package
|
||||
cp -R addons/sourcemod/configs /tmp/package/common/addons/sourcemod/
|
||||
|
||||
- name: Upload build archive for test runners
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ runner.os }}
|
||||
path: /tmp/package
|
||||
|
||||
tag:
|
||||
name: Tag
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
|
||||
|
||||
- uses: dev-drprasad/delete-tag-and-release@v0.2.1
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
|
||||
with:
|
||||
delete_release: true
|
||||
tag_name: latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: rickstaa/action-create-tag@v1
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
|
||||
with:
|
||||
tag: "latest"
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
release:
|
||||
name: Release
|
||||
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
|
||||
needs: [build, tag]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
- name: Versioning
|
||||
run: |
|
||||
version="latest"
|
||||
if [[ "${{ github.ref_type }}" == 'tag' ]]; then
|
||||
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`;
|
||||
fi
|
||||
echo "RELEASE_VERSION=$version" >> $GITHUB_ENV
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
ls -Rall
|
||||
if [ -d "./Linux/" ]; then
|
||||
cd ./Linux/
|
||||
tar -czf ../${{ github.event.repository.name }}-${{ env.RELEASE_VERSION }}.tar.gz -T <(\ls -1)
|
||||
cd -
|
||||
fi
|
||||
|
||||
- name: Release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: '*.tar.gz'
|
||||
tag: ${{ env.RELEASE_VERSION }}
|
||||
file_glob: true
|
||||
overwrite: true
|
||||
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
build/
|
||||
release/
|
||||
|
||||
.DS_Store
|
||||
.vscode
|
||||
|
||||
*.smx
|
||||
plugins/
|
||||
.sourceknight
|
||||
.venv
|
||||
86
addons/sourcemod/configs/stripper/global_filters.cfg
Normal file
86
addons/sourcemod/configs/stripper/global_filters.cfg
Normal file
@ -0,0 +1,86 @@
|
||||
;; Changes ammo to 8000 on every map-spawned weapon
|
||||
;modify:
|
||||
;{
|
||||
; match:
|
||||
; {
|
||||
; "classname" "/weapon_.*/"
|
||||
; }
|
||||
; replace:
|
||||
; {
|
||||
; "ammo" "8000"
|
||||
; }
|
||||
;}
|
||||
|
||||
;; Remove game_end
|
||||
;filter:
|
||||
;{
|
||||
; "classname" "game_end"
|
||||
;}
|
||||
|
||||
;;Cool Music Entities
|
||||
;add:
|
||||
;{
|
||||
; "origin" "0 0 0"
|
||||
; "targetname" "GlobalAmbientGenericStripper"
|
||||
; "spawnflags" "49"
|
||||
; "radius" "1250"
|
||||
; "pitchstart" "100"
|
||||
; "pitch" "100"
|
||||
; "message" "music/hl1_song10.mp3"
|
||||
; "health" "10"
|
||||
; "classname" "ambient_generic"
|
||||
;}
|
||||
|
||||
;add:
|
||||
;{
|
||||
; "origin" "0 0 0"
|
||||
; "targetname" "GlobalAmbientGenericStripper2"
|
||||
; "spawnflags" "49"
|
||||
; "radius" "1250"
|
||||
; "pitchstart" "100"
|
||||
; "pitch" "100"
|
||||
; "message" "music/hl2_song23_suitsong3.mp3"
|
||||
; "health" "10"
|
||||
; "classname" "ambient_generic"
|
||||
;}
|
||||
|
||||
;add:
|
||||
;{
|
||||
; "origin" "0 0 0"
|
||||
; "targetname" "GlobalAmbientGenericStripper2"
|
||||
; "spawnflags" "49"
|
||||
; "radius" "1250"
|
||||
; "pitchstart" "100"
|
||||
; "pitch" "100"
|
||||
; "message" "music/hl2_song23_suitsong3.mp3"
|
||||
; "health" "10"
|
||||
; "classname" "ambient_generic"
|
||||
;}
|
||||
|
||||
;add:
|
||||
;{
|
||||
; "origin" "0 0 0"
|
||||
; "targetname" "GlobalLogicTimerStripper"
|
||||
; "RefireTime" "0.1"
|
||||
; "spawnflags" "0"
|
||||
; "StartDisabled" "1"
|
||||
; "UseRandomTime" "0"
|
||||
; "classname" "logic_timer"
|
||||
;}
|
||||
|
||||
;add:
|
||||
;{
|
||||
; "origin" "0 0 0"
|
||||
; "targetname" "GlobalGameTextStripper"
|
||||
; "x" "-1"
|
||||
; "y" ".20"
|
||||
; "channel" "4"
|
||||
; "message" "Default Message"
|
||||
; "color" "0 255 255"
|
||||
; "color2" "0 240 240"
|
||||
; "fadein" ".1"
|
||||
; "fadeout" ".1"
|
||||
; "holdtime" "3"
|
||||
; "spawnflags" "1"
|
||||
; "classname" "game_text"
|
||||
;}
|
||||
35
addons/sourcemod/configs/stripper/maps/example_map.cfg
Normal file
35
addons/sourcemod/configs/stripper/maps/example_map.cfg
Normal file
@ -0,0 +1,35 @@
|
||||
;;EXAMPLE - remove all physics props
|
||||
;remove:
|
||||
;{
|
||||
; "classname" "/prop_physics.*/"
|
||||
;}
|
||||
|
||||
;;EXAMPLE - add the hostage to the map
|
||||
;add:
|
||||
;{
|
||||
; "origin" "1376 3168 -112"
|
||||
; "HostageType" "0"
|
||||
; "classname" "hostage_entity"
|
||||
}
|
||||
|
||||
;;EXAMPLE - replace all garbage cans with a hostage
|
||||
;modify:
|
||||
;{
|
||||
; match:
|
||||
; {
|
||||
; "model" "models/props_junk/garbage_metalcan002a.mdl"
|
||||
; "classname" "prop_physics_multiplayer"
|
||||
; }
|
||||
; replace:
|
||||
; {
|
||||
; "classname" "hostage_entity"
|
||||
; }
|
||||
; delete:
|
||||
; {
|
||||
; "model" "models/props_junk/garbage_metalcan002a.mdl"
|
||||
; }
|
||||
; insert:
|
||||
; {
|
||||
; "scale" "0.99"
|
||||
; }
|
||||
;}
|
||||
File diff suppressed because it is too large
Load Diff
39
addons/sourcemod/scripting/include/Stripper.inc
Normal file
39
addons/sourcemod/scripting/include/Stripper.inc
Normal file
@ -0,0 +1,39 @@
|
||||
#if defined _stripper_included
|
||||
#endinput
|
||||
#endif
|
||||
#define _stripper_included
|
||||
|
||||
/*********************************************************
|
||||
* Log a message into logs/stripper/maps/<mapname>.log
|
||||
*
|
||||
* @param format Message to log
|
||||
* @noreturn
|
||||
*********************************************************/
|
||||
native void Stripper_LogError(const char[] format, any ...);
|
||||
|
||||
/**
|
||||
* Called right after stripper loged a error.
|
||||
*
|
||||
* @param sBuffer Buffer to store the log message in.
|
||||
* @param maxlen Size of the log buffer.
|
||||
* @noreturn
|
||||
*/
|
||||
forward void Stripper_OnErrorLogged(char[] sBuffer, int maxlen);
|
||||
|
||||
public SharedPlugin __pl_stripper =
|
||||
{
|
||||
name = "Stripper",
|
||||
file = "Stripper.smx",
|
||||
#if defined REQUIRE_PLUGIN
|
||||
required = 1
|
||||
#else
|
||||
required = 0
|
||||
#endif
|
||||
};
|
||||
|
||||
#if !defined REQUIRE_PLUGIN
|
||||
public void __pl_stripper_SetNTVOptional()
|
||||
{
|
||||
MarkNativeAsOptional("Stripper_Log");
|
||||
}
|
||||
#endif
|
||||
15
sourceknight.yaml
Normal file
15
sourceknight.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
project:
|
||||
sourceknight: 0.2
|
||||
name: Stripper
|
||||
dependencies:
|
||||
- name: sourcemod
|
||||
type: tar
|
||||
version: 1.11.0-git6934
|
||||
location: https://sm.alliedmods.net/smdrop/1.11/sourcemod-1.11.0-git6934-linux.tar.gz
|
||||
unpack:
|
||||
- source: /addons
|
||||
dest: /addons
|
||||
root: /
|
||||
output: /addons/sourcemod/plugins
|
||||
targets:
|
||||
- Stripper
|
||||
Loading…
Reference in New Issue
Block a user