aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts/vscripts/gamemodes
diff options
context:
space:
mode:
authorConnie Price <contact@connieprice.co.uk>2022-01-20 19:43:23 +0000
committerBarichello <artur@barichello.me>2022-01-20 17:30:02 -0300
commit60d3c12955ff03ba594f16c863258994a995c39d (patch)
tree14779b43f41d80730007da40f6d6eb081a57f3b1 /Northstar.Custom/mod/scripts/vscripts/gamemodes
parentf63ca08e4d820192b9a753d1badbe48e9671aae7 (diff)
downloadNorthstarMods-60d3c12955ff03ba594f16c863258994a995c39d.tar.gz
NorthstarMods-60d3c12955ff03ba594f16c863258994a995c39d.zip
Moved Join to a global JoinStringArray so that anyone can use it.
- Added `sh_utility_all.gnut` so that we can add global utility functions to all three squirrel VMs ( UI, Client & Server ) - Also removed a rogue leftover constant.
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts/gamemodes')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut19
1 files changed, 1 insertions, 18 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut
index 64f57f95..2ed69819 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut
@@ -3,8 +3,6 @@ global function GetGunGameWeapons
global const string GAMEMODE_GG = "gg"
-global const string default_weapons = "mp_weapon_car|pas_run_and_gun|-1$mp_weapon_alternator_smg|pas_run_and_gun|-1$mp_weapon_hemlok_smg||-1$mp_weapon_hemlok||-1$mp_weapon_vinson|hcog|-1$mp_weapon_rspn101||-1$mp_weapon_esaw||-1$mp_weapon_lstar|pas_run_and_gun|-1$mp_weapon_shotgun||-1$mp_weapon_mastiff||-1$mp_weapon_softball||-1$mp_weapon_epg|jump_kit|-1$mp_weapon_shotgun_pistol|pas_run_and_gun|-1$mp_weapon_wingman_n|pas_run_and_gun,ricochet|-1$mp_weapon_doubletake||-1$mp_weapon_sniper|pas_fast_ads,ricochet|-1$mp_weapon_autopistol|pas_run_and_gun,temp_sight|-1$mp_weapon_semipistol|pas_run_and_gun|-1$mp_weapon_wingman|pas_run_and_gun|-1$mp_weapon_defender||-1$mp_weapon_grenade_sonar|pas_power_cell,amped_tacticals|1"
-
global struct GunGameWeapon
{
string weapon
@@ -142,25 +140,10 @@ array<GunGameWeapon> function GetGunGameWeapons()
return file.weapons
}
-string function Join( array<string> strings, string separator )
-{
- string output;
-
- foreach( int i, string stringoStarr in strings )
- {
- if (i == 0)
- output = stringoStarr
- else
- output = output + separator + stringoStarr
- }
-
- return output;
-}
-
string function GGWeaponToString( GunGameWeapon ggWeapon )
{
// We do it in this order because split works weirdly and won't return empty strings for gaps :c
- return ggWeapon.offhandSlot + "|" + ggWeapon.weapon + "|" + Join( ggWeapon.mods, "," )
+ return ggWeapon.offhandSlot + "|" + ggWeapon.weapon + "|" + JoinStringArray( ggWeapon.mods, "," )
}
GunGameWeapon function StringToGGWeapon( string ggWeaponString )