‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_shoutcaster.csc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\system_shared;
4 
5 #namespace shoutcaster;
6 
7 #define SHOUTCASTER_SETTING_TEAM_IDENTITY "shoutcaster_team_identity"
8 #define SHOUTCASTER_SETTING_ALLIES_COLOR_ID "shoutcaster_fe_team1_color"
9 #define SHOUTCASTER_SETTING_AXIS_COLOR_ID "shoutcaster_fe_team2_color"
10 #define SHOUTCASTER_SETTING_FLIP_SCORE_PANEL "shoutcaster_flip_scorepanel"
11 
12 function ‪is_shoutcaster(localClientNum)
13 {
14  return IsShoutcaster(localClientNum);
15 }
16 
17 function ‪is_shoutcaster_using_team_identity(localClientNum)
18 {
19  return (‪is_shoutcaster(localClientNum) && GetShoutcasterSetting(localClientNum, ‪SHOUTCASTER_SETTING_TEAM_IDENTITY ));
20 }
21 
22 function ‪get_team_color_id( localClientNum, team )
23 {
24  if ( team == "allies" )
25  {
26  return GetShoutcasterSetting(localClientNum, ‪SHOUTCASTER_SETTING_ALLIES_COLOR_ID );
27  }
28 
29  return GetShoutcasterSetting(localClientNum, ‪SHOUTCASTER_SETTING_AXIS_COLOR_ID );
30 }
31 
32 function ‪get_team_color_fx( localClientNum, team, script_bundle )
33 {
34  color = ‪get_team_color_id( localClientNum, team );
35  return script_bundle.objects[color].fx_colorid;
36 }
37 
38 function ‪get_color_fx( localClientNum, script_bundle )
39 {
40  effects = [];
41  effects["allies"] = ‪get_team_color_fx( localClientNum, "allies", script_bundle );
42  effects["axis"] = ‪get_team_color_fx( localClientNum, "axis", script_bundle );
43  return effects;
44 }
45 
46 function ‪is_friendly( localClientNum )
47 {
48  localplayer = getlocalplayer( localClientNum );
49 
50  scorepanel_flipped = GetShoutcasterSetting(localClientNum, ‪SHOUTCASTER_SETTING_FLIP_SCORE_PANEL );
51 
52  if ( !scorepanel_flipped )
53  friendly = ( self.team == "allies" );
54  else
55  friendly = ( self.team == "axis" );
56 
57  return friendly;
58 }
‪get_team_color_fx
‪function get_team_color_fx(localClientNum, team, script_bundle)
Definition: _shoutcaster.csc:32
‪SHOUTCASTER_SETTING_FLIP_SCORE_PANEL
‪#define SHOUTCASTER_SETTING_FLIP_SCORE_PANEL
Definition: _shoutcaster.csc:10
‪SHOUTCASTER_SETTING_ALLIES_COLOR_ID
‪#define SHOUTCASTER_SETTING_ALLIES_COLOR_ID
Definition: _shoutcaster.csc:8
‪get_color_fx
‪function get_color_fx(localClientNum, script_bundle)
Definition: _shoutcaster.csc:38
‪SHOUTCASTER_SETTING_TEAM_IDENTITY
‪#define SHOUTCASTER_SETTING_TEAM_IDENTITY
Definition: _shoutcaster.csc:7
‪SHOUTCASTER_SETTING_AXIS_COLOR_ID
‪#define SHOUTCASTER_SETTING_AXIS_COLOR_ID
Definition: _shoutcaster.csc:9
‪is_shoutcaster_using_team_identity
‪function is_shoutcaster_using_team_identity(localClientNum)
Definition: _shoutcaster.csc:17
‪is_friendly
‪function is_friendly(localClientNum)
Definition: _shoutcaster.csc:46
‪get_team_color_id
‪function get_team_color_id(localClientNum, team)
Definition: _shoutcaster.csc:22
‪is_shoutcaster
‪function is_shoutcaster(localClientNum)
Definition: _shoutcaster.csc:12