Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple spaces in custom damage source ID display names #835

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Northstar.Custom/mod/scripts/vscripts/sh_damage_types.nut
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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 ) )
GeckoEidechse marked this conversation as resolved.
Show resolved Hide resolved
}
#endif
Loading