From 9a96d0bff56f1969c68bb52a2f33296095bdc67d Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Tue, 31 Aug 2021 23:14:58 +0100 Subject: move to new mod format --- .../vscripts/conversation/_battle_chatter.gnut | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut (limited to 'Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut b/Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut new file mode 100644 index 000000000..961816c7c --- /dev/null +++ b/Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut @@ -0,0 +1,25 @@ +global function BattleChatter_Init +global function PlayBattleChatterLine +global function TryPlayWeaponBattleChatterLine + +void function BattleChatter_Init() +{ + //ShBattleChatter_Init() +} + +void function PlayBattleChatterLine( entity player, string conversationType ) +{ + foreach( entity otherPlayer in GetPlayerArray() ) + if ( ShouldPlayBattleChatter( conversationType, otherPlayer, player ) && player != otherPlayer ) + Remote_CallFunction_NonReplay( otherPlayer, "ServerCallback_PlayBattleChatter", GetConversationIndex( conversationType ), player.GetEncodedEHandle() ) +} + +void function TryPlayWeaponBattleChatterLine( entity player, entity weapon ) +{ + var chatterEvent = weapon.GetWeaponInfoFileKeyField( "battle_chatter_event" ) + if ( chatterEvent == null ) + return + + expect string( chatterEvent ) + PlayBattleChatterLine( player, chatterEvent ) +} \ No newline at end of file -- cgit v1.2.3