aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts/vscripts/gamemodes
diff options
context:
space:
mode:
authorCoopyy <pat.pvp.unturned@gmail.com>2022-01-25 07:22:38 -0600
committerGitHub <noreply@github.com>2022-01-25 10:22:38 -0300
commit25737209c5980e932b4cc934be2f10161793e32a (patch)
treef3bf0f5a56f51627db04a7c34b4c3b134bf22e9a /Northstar.Custom/mod/scripts/vscripts/gamemodes
parent686b3f80cd2644c56e4025080b5be8b1e8fe5d7a (diff)
downloadNorthstarMods-25737209c5980e932b4cc934be2f10161793e32a.tar.gz
NorthstarMods-25737209c5980e932b4cc934be2f10161793e32a.zip
adds prefix to Sticks & Stones playlist vars (#144)
* added gamer weapon to sticks & stones * playlist var prefixes
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts/gamemodes')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_sns.gnut23
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut14
2 files changed, 26 insertions, 11 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_sns.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_sns.gnut
index 98bb06b9..7ac728de 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_sns.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_sns.gnut
@@ -5,8 +5,10 @@ struct {
string offhand_weapon = "mp_weapon_thermite_grenade" // offhand weapon
bool reset_pulse_blade_cooldown_on_pulse_blade_kill
+ bool softball_enabled
int wme_kill_value
+ int softball_kill_value
int offhand_kill_value
int reset_kill_value
int melee_kill_value
@@ -27,11 +29,13 @@ void function SNS_Init()
AddCallback_OnPlayerRespawned( OnPlayerRespawned )
AddCallback_GameStateEnter( eGameState.WinnerDetermined, OnWinnerDetermined )
- file.reset_pulse_blade_cooldown_on_pulse_blade_kill = GetCurrentPlaylistVarInt( "reset_pulse_blade_cooldown_on_pulse_blade_kill", 1 ) == 1
- file.wme_kill_value = GetCurrentPlaylistVarInt( "wme_kill_value", 10 )
- file.offhand_kill_value = GetCurrentPlaylistVarInt( "offhand_kill_value", 10 )
- file.reset_kill_value = GetCurrentPlaylistVarInt( "reset_kill_value", 5 )
- file.melee_kill_value = GetCurrentPlaylistVarInt( "melee_kill_value", 5 )
+ file.reset_pulse_blade_cooldown_on_pulse_blade_kill = GetCurrentPlaylistVarInt( "sns_reset_pulse_blade_cooldown_on_pulse_blade_kill", 1 ) == 1
+ file.softball_enabled = GetCurrentPlaylistVarInt( "sns_softball_enabled", 0 ) == 1
+ file.wme_kill_value = GetCurrentPlaylistVarInt( "sns_wme_kill_value", 10 )
+ file.softball_kill_value = GetCurrentPlaylistVarInt( "sns_softball_kill_value", 10 )
+ file.offhand_kill_value = GetCurrentPlaylistVarInt( "sns_offhand_kill_value", 10 )
+ file.reset_kill_value = GetCurrentPlaylistVarInt( "sns_reset_kill_value", 5 )
+ file.melee_kill_value = GetCurrentPlaylistVarInt( "sns_melee_kill_value", 5 )
}
void function OnPlayerKilled( entity victim, entity attacker, var damageInfo )
@@ -73,6 +77,11 @@ void function OnPlayerKilled( entity victim, entity attacker, var damageInfo )
AddTeamScore( attacker.GetTeam(), file.wme_kill_value )
attacker.AddToPlayerGameStat( PGS_ASSAULT_SCORE, file.wme_kill_value )
}
+ else if ( DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.mp_weapon_softball )
+ {
+ AddTeamScore( attacker.GetTeam(), file.softball_kill_value )
+ attacker.AddToPlayerGameStat( PGS_ASSAULT_SCORE, file.softball_kill_value )
+ }
else
{
AddTeamScore( attacker.GetTeam(), file.offhand_kill_value )
@@ -110,6 +119,10 @@ void function OnPlayerRespawned( entity player )
array<string> mods = ["sns", "pas_fast_ads", "tactical_cdr_on_kill", "pas_run_and_gun", "pas_fast_swap"]
player.GiveWeapon( "mp_weapon_wingman_n", mods)
+ if (file.softball_enabled) {
+ mods.append("jump_kit") // the funny
+ player.GiveWeapon( "mp_weapon_softball", mods)
+ }
player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE )
player.GiveOffhandWeapon( file.offhand_weapon, OFFHAND_RIGHT )
player.GiveOffhandWeapon( "mp_weapon_grenade_sonar", OFFHAND_LEFT )
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut
index e0f26b94..df336867 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut
@@ -23,12 +23,14 @@ void function CreateGamemodeSNS()
GameMode_SetColor( GAMEMODE_SNS, [147, 204, 57, 255] )
AddPrivateMatchMode( GAMEMODE_SNS ) // add to private lobby modes
-
- AddPrivateMatchModeSettingArbitrary( "#PL_sns", "wme_kill_value", "10" )
- AddPrivateMatchModeSettingArbitrary( "#PL_sns", "offhand_kill_value", "10" )
- AddPrivateMatchModeSettingArbitrary( "#PL_sns", "reset_kill_value", "5" )
- AddPrivateMatchModeSettingArbitrary( "#PL_sns", "melee_kill_value", "5" )
- AddPrivateMatchModeSettingEnum( "#PL_sns", "reset_pulse_blade_cooldown_on_pulse_blade_kill", [ "Disabled", "Enabled" ], "1" )
+ AddPrivateMatchModeSettingEnum( "#PL_sns", "sns_reset_pulse_blade_cooldown_on_pulse_blade_kill", [ "Disabled", "Enabled" ], "1" )
+ AddPrivateMatchModeSettingEnum( "#PL_sns", "sns_softball_enabled", [ "False", "True" ], "0" )
+ AddPrivateMatchModeSettingArbitrary( "#PL_sns", "sns_softball_kill_value", "10" )
+ AddPrivateMatchModeSettingArbitrary( "#PL_sns", "sns_wme_kill_value", "10" )
+ AddPrivateMatchModeSettingArbitrary( "#PL_sns", "sns_offhand_kill_value", "10" )
+ AddPrivateMatchModeSettingArbitrary( "#PL_sns", "sns_reset_kill_value", "5" )
+ AddPrivateMatchModeSettingArbitrary( "#PL_sns", "sns_melee_kill_value", "5" )
+
GameMode_SetDefaultScoreLimits( GAMEMODE_SNS, 300, 0 )