aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts
diff options
context:
space:
mode:
authorDinorush <62536724+Dinorush@users.noreply.github.com>2024-08-14 09:19:02 -0400
committerGitHub <noreply@github.com>2024-08-14 15:19:02 +0200
commit7aa3958ccd8e32970736654dfae0c7a87f0798bb (patch)
treeba1caf790610e567c135b34260285666d9d53011 /Northstar.Custom/mod/scripts
parent75bbc189f9d595e5811f8e501c423c6d39b1390b (diff)
downloadNorthstarMods-7aa3958ccd8e32970736654dfae0c7a87f0798bb.tar.gz
NorthstarMods-7aa3958ccd8e32970736654dfae0c7a87f0798bb.zip
Support multiple spaces in custom damage source ID display names (#835)
Replace all spaces
Diffstat (limited to 'Northstar.Custom/mod/scripts')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/sh_damage_types.nut4
1 files changed, 2 insertions, 2 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/sh_damage_types.nut b/Northstar.Custom/mod/scripts/vscripts/sh_damage_types.nut
index 4987ee01..bae0116e 100644
--- a/Northstar.Custom/mod/scripts/vscripts/sh_damage_types.nut
+++ b/Northstar.Custom/mod/scripts/vscripts/sh_damage_types.nut
@@ -727,7 +727,7 @@ bool function RegisterWeaponDamageSourceInternal( int id, string newVal, string
damageSourceID[ newVal ] <- id
file.damageSourceIDToString[ id ] <- newVal
file.damageSourceIDToName[ id ] <- stringVal
- file.customDamageSourceIDList.extend( [ id.tostring(), newVal, StringReplace( stringVal, " ", MESSAGE_SPACE_PADDING ) ] )
+ file.customDamageSourceIDList.extend( [ id.tostring(), newVal, StringReplace( stringVal, " ", MESSAGE_SPACE_PADDING, true ) ] )
return true
}
@@ -773,6 +773,6 @@ void function ReceiveNewDamageSourceIDs( array<string> args )
{
// IDs are inserted to the custom list in triplets, so we can trust these indices exist and the loop will end properly
for ( int i = 0; i < args.len(); i += 3 )
- RegisterWeaponDamageSourceInternal( args[ i ].tointeger(), args[ i + 1 ], StringReplace( args[ i + 2 ], MESSAGE_SPACE_PADDING, " " ) )
+ RegisterWeaponDamageSourceInternal( args[ i ].tointeger(), args[ i + 1 ], StringReplace( args[ i + 2 ], MESSAGE_SPACE_PADDING, " ", true ) )
}
#endif