diff --git a/2_deploy.ps1 b/2_deploy.ps1 index e35cc374..fa269484 100644 --- a/2_deploy.ps1 +++ b/2_deploy.ps1 @@ -1,5 +1,5 @@ $sourcemodDir = "D:\sourcemod\addons\sourcemod" -$spcompPath = "$sourcemodDir\scripting\spcomp.exe" +$spcompPath = "$sourcemodDir\scripting\spcomp64.exe" $pluginsPath = "$sourcemodDir\plugins" $defaultArguments = "-i 'D:\Github\robogithub\include' -i 'D:\sourcemod-custom-includes' -O2 -v2" diff --git a/3_deploy.ps1 b/3_deploy.ps1 new file mode 100644 index 00000000..533cc877 --- /dev/null +++ b/3_deploy.ps1 @@ -0,0 +1,62 @@ +$sourcemodDir = "D:\sourcemod\addons\sourcemod" +$spcompPath = "$sourcemodDir\scripting\spcomp64.exe" +$pluginsPath = "$sourcemodDir\plugins" +$defaultArguments = "-i 'D:\Github\robogithub\include' -i 'D:\sourcemod-custom-includes' -O2 -v2" + +# Specify the root folder explicitly +$rootFolder = $PSScriptRoot +$spFiles = Get-ChildItem -Path $rootFolder -Filter "*.sp" -File + +foreach ($spFile in $spFiles) { + # Your filtering conditions go here... + if ($spFile.Name -like "*joke*" -or + $spFile.Name -like "*test*" -or + $spFile.Name -like "*dont_compile*" -or + $spFile.Name -like "*don_compile*" -or + $spFile.Name -eq "changeteam.sp" -or + $spFile.Name -eq "enablemvm.sp") { + continue + } + + $outputPath = "" + + if ($spFile.Name -like "berobot_*.sp") { + $outputPath = Join-Path -Path $rootFolder -ChildPath "compiled\mm_handlers\$($spFile.BaseName).smx" + } elseif ($spFile.Name -like "ability_*.sp") { + $folderPath = Join-Path -Path $rootFolder -ChildPath "compiled\mm_robots\robot_abilities" + $outputPath = Join-Path -Path $folderPath -ChildPath $spFile.Name + } elseif ($spFile.Name -like "free_*.sp" -or $spFile.Name -like "paid_*.sp" -or $spFile.Name -like "boss_*.sp") { + $folderPath = Join-Path -Path $rootFolder -ChildPath "compiled\mm_robots" + $outputPath = Join-Path -Path $folderPath -ChildPath $spFile.Name + } elseif ($spFile.Name -like "mm_*.sp") { + $folderPath = Join-Path -Path $rootFolder -ChildPath "compiled\mm_attributes" + $outputPath = Join-Path -Path $folderPath -ChildPath $spFile.Name + } else { + # If the file does not match any specific condition, skip it + continue + } + + # Create the necessary folders if they don't exist + if (-not (Test-Path -Path $folderPath)) { + New-Item -ItemType Directory -Path $folderPath -Force + } + + $arguments = "$($spFile.FullName) -o=$outputPath $defaultArguments" + $command = "$spcompPath $arguments" + + Write-Host $command + Invoke-Expression $command + if ($LASTEXITCODE -ne 0) { + Write-Host "Compilation failed for $($spFile.FullName)" + exit + } + Write-Host "" + + # Check if the output file exists before attempting to copy + if (Test-Path -Path $outputPath) { + # Copy the compiled file to the plugins directory + Copy-Item -Path $outputPath -Destination $pluginsPath + } else { + Write-Host "Output file $($outputPath) does not exist. Skipping copying to plugins directory." + } +} diff --git a/boss_saxtron_h4l3.sp b/boss_saxtron_h4l3.sp index a8b770ce..491162ae 100644 --- a/boss_saxtron_h4l3.sp +++ b/boss_saxtron_h4l3.sp @@ -116,7 +116,7 @@ public OnPluginStart() restrictions.TeamCoins = new RobotCoinRestrictionDefinition(); restrictions.TeamCoins.Overall = 1; restrictions.RobotCoins = new RobotCoinRestrictionDefinition(); - restrictions.RobotCoins.PerRobot = 3.0; + restrictions.RobotCoins.PerRobot = 30.0; AddRobot(robot, MakeGiantSoldier, PLUGIN_VERSION, restrictions, 2); diff --git a/cfg/robots/paid_spy_warper.cfg b/cfg/robots/paid_spy_warper.cfg index 3371d3fa..f7242634 100644 --- a/cfg/robots/paid_spy_warper.cfg +++ b/cfg/robots/paid_spy_warper.cfg @@ -16,6 +16,7 @@ "death" "mvm/sentrybuster/mvm_sentrybuster_explode.wav" "loop" "mvm/giant_heavy/giant_heavy_loop.wav" "spawn" "#mvm/giant_heavy/giant_heavy_entrance.wav" + "footstep" "1" } "scale" "1.65" "player_conditions"//You can use https://sm.alliedmods.net/new-api/tf2/TFCond to see what cond is which diff --git a/mm_attributes_canteen.sp b/mm_attributes_canteen.sp index 9d4a44ae..edd69ae6 100644 --- a/mm_attributes_canteen.sp +++ b/mm_attributes_canteen.sp @@ -4,6 +4,7 @@ #include #include #include +#include #include #pragma semicolon 1 #pragma newdecls required diff --git a/paid_sentry_buster_mvm.sp b/paid_sentry_buster_mvm.sp index 504569f0..2fac5791 100644 --- a/paid_sentry_buster_mvm.sp +++ b/paid_sentry_buster_mvm.sp @@ -14,7 +14,7 @@ #define ROBOT_SUBCLASS "Sentry Buster" #define ROBOT_DESCRIPTION "Touch sentries to blow up" #define ROBOT_TIPS "Hit enemies, touch sentries, or taunt to activate the explosion" -#define ROBOT_COST 1.0 +#define ROBOT_COST 10.0 #define ROBOT_ON_DEATH "You can hide behind buildings to not get blown up by the explotion\nThe explosion is faster than regular mvm\nTouching the buster with a sentry will cause it to blow up" #define GBUSTER "models/bots/demo/bot_sentry_buster.mdl" #define SPAWN "#mvm/sentrybuster/mvm_sentrybuster_intro.wav"