aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_english.txt14
-rw-r--r--Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_softball.txt14
-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
4 files changed, 48 insertions, 17 deletions
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
index 07e37186a..a74177ec7 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
@@ -127,16 +127,18 @@ Press Yes if you agree to this. This choice can be changed in the mods menu at a
"PL_sns_desc" "Free For All. Use Pulse Blades and Executions to Reset Enemy Score"
"PL_sns_abbr" "SNS"
"GAMEMODE_SNS" "Sticks and Stones"
- "SCOREBOARD_BANKRUPTS" "Bankrupts"
+ "SCOREBOARD_BANKRUPTS" "Bankrupt Kills"
"SNS_LEADER_BANKRUPT" "Score Leader Bankrupt!"
"SNS_LEADER_BANKRUPT_SUB" "%s1 Was Reset By %s2"
"SNS_BANKRUPT" "Bankrupt!"
"SNS_BANKRUPT_SUB" "Your Score Was Reset By %s1"
- "wme_kill_value" "Wingman Elite Kill Value"
- "offhand_kill_value" "Offhand Kill Value"
- "reset_kill_value" "Pulse/Execution Kill Value"
- "melee_kill_value" "Melee Kill Value"
- "reset_pulse_blade_cooldown_on_pulse_blade_kill" "Kill Cooldown Resets"
+ "sns_wme_kill_value" "Wingman Elite Kill Value"
+ "sns_softball_kill_value" "Softball Kill Value"
+ "sns_offhand_kill_value" "Offhand Kill Value"
+ "sns_reset_kill_value" "Pulse/Execution Kill Value"
+ "sns_melee_kill_value" "Melee Kill Value"
+ "sns_reset_pulse_blade_cooldown_on_pulse_blade_kill" "Kill Cooldown Resets"
+ "sns_softball_enabled" "Softball Enabled"
"PL_inf" "Infection"
"PL_inf_lobby" "Infection Lobby"
diff --git a/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_softball.txt b/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_softball.txt
new file mode 100644
index 000000000..5da9357f0
--- /dev/null
+++ b/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_softball.txt
@@ -0,0 +1,14 @@
+WeaponData
+{
+ Mods
+ {
+ sns
+ {
+ explosion_damage "50"
+ damage_near_value "50"
+ damage_far_value "50"
+ ammo_clip_size "1"
+ projectile_launch_speed "7500"
+ }
+ }
+}
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_sns.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_sns.gnut
index 98bb06b90..7ac728de5 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 e0f26b94e..df3368673 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 )