1559 lines
34 KiB
Lua
1559 lines
34 KiB
Lua
local f0_local0 = false
|
|
local f0_local1 = false
|
|
Memory = {
|
|
InGame = {
|
|
lowFreeBytes = 307200
|
|
},
|
|
Frontend = {
|
|
lowFreeBytes = 1048576
|
|
},
|
|
CheckLow = function ()
|
|
local f1_local0 = Engine.GetBytesFree()
|
|
local f1_local1 = Memory.InGame.lowFreeBytes
|
|
if Engine.InFrontend() then
|
|
f1_local1 = Memory.Frontend.lowFreeBytes
|
|
end
|
|
if f1_local0 < f1_local1 then
|
|
DebugPrint( "LUI: Low on memory, running GC now. BytesFree = " .. Engine.GetBytesFree() )
|
|
collectgarbage( "collect" )
|
|
end
|
|
end
|
|
}
|
|
MaxLocalClients = 2
|
|
ScreenResolution = {
|
|
HD = {
|
|
width = Engine.GetDisplayWidth() / Engine.GetDisplayHeight() * 720,
|
|
height = 720,
|
|
name = "HD"
|
|
}
|
|
}
|
|
currentScreenResolution = "HD"
|
|
Teams = {
|
|
free = 0,
|
|
axis = 1,
|
|
allies = 2,
|
|
spectator = 3
|
|
}
|
|
otherTeamLookup = {
|
|
2,
|
|
1
|
|
}
|
|
spectatorFakeTeam = 2
|
|
font_smallFont = "fonts/smallFont"
|
|
font_normalFont = "fonts/normalFont"
|
|
font_bigFont = "fonts/bigFont"
|
|
font_extraBigFont = "fonts/extraBigFont"
|
|
font_boldFont = "fonts/boldFont"
|
|
font_consoleFont = "fonts/consoleFont"
|
|
font_objectiveFont = "fonts/objectiveFont"
|
|
font_hudIW6SmallFont = "fonts/hudSmallFont"
|
|
font_hudIW6NormalFont = "fonts/hudNormalFont"
|
|
font_hudIW6BigFont = "fonts/hudBigFont"
|
|
font_hudEuroSmallFont = "fonts/smallFont"
|
|
font_hudEuroNormalFont = "fonts/normalFont"
|
|
font_hudEuroBigFont = "fonts/bigFont"
|
|
font_hudDigitalFont20 = "fonts/hudDigitalFont20"
|
|
font_hudDigitalFont25 = "fonts/hudDigitalFont25"
|
|
font_hudDigitalFont30 = "fonts/hudDigitalFont30"
|
|
font_hudDigitalFont40 = "fonts/hudDigitalFont40"
|
|
odayaka = 0
|
|
if Engine.GetCurrentLanguage() == 10 then
|
|
odayaka = 0
|
|
end
|
|
CoD = {
|
|
TextSettings = {
|
|
TinyFont = {
|
|
Font = RegisterFont( font_smallFont ),
|
|
Height = 15 + odayaka
|
|
},
|
|
SmallFont = {
|
|
Font = RegisterFont( font_normalFont ),
|
|
Height = 21 + odayaka
|
|
},
|
|
NormalFont = {
|
|
Font = RegisterFont( font_normalFont ),
|
|
Height = 21 + odayaka
|
|
},
|
|
BigFont = {
|
|
Font = RegisterFont( font_bigFont ),
|
|
Height = 28 + odayaka,
|
|
MaxHeight = 50
|
|
},
|
|
ExtraBigFont = {
|
|
Font = RegisterFont( font_extraBigFont ),
|
|
Height = 28 + odayaka
|
|
},
|
|
BoldFont = {
|
|
Font = RegisterFont( font_boldFont ),
|
|
Height = 21 + odayaka
|
|
},
|
|
HudIW6TinyFont = {
|
|
Font = RegisterFont( font_hudIW6SmallFont ),
|
|
Height = 15
|
|
},
|
|
HudIW6SmallFont = {
|
|
Font = RegisterFont( font_hudIW6SmallFont ),
|
|
Height = 20
|
|
},
|
|
HudIW6NormalFont = {
|
|
Font = RegisterFont( font_hudIW6NormalFont ),
|
|
Height = 25
|
|
},
|
|
HudIW6BigFont = {
|
|
Font = RegisterFont( font_hudIW6BigFont ),
|
|
Height = 30
|
|
},
|
|
HudIW6ExtraBigFont = {
|
|
Font = RegisterFont( font_hudIW6BigFont ),
|
|
Height = 40
|
|
},
|
|
HudEuroConRegTinyFont = {
|
|
Font = RegisterFont( font_hudEuroSmallFont ),
|
|
Height = 15
|
|
},
|
|
HudEuroMedTinyFont = {
|
|
Font = RegisterFont( font_hudEuroNormalFont ),
|
|
Height = 15
|
|
},
|
|
HudEuroConRegSmallFont = {
|
|
Font = RegisterFont( font_hudEuroSmallFont ),
|
|
Height = 20
|
|
},
|
|
HudEuroMedSmallFont = {
|
|
Font = RegisterFont( font_hudEuroNormalFont ),
|
|
Height = 20
|
|
},
|
|
HudEuroNormalFont = {
|
|
Font = RegisterFont( font_hudEuroNormalFont ),
|
|
Height = 25
|
|
},
|
|
HudEuroBigFont = {
|
|
Font = RegisterFont( font_hudEuroBigFont ),
|
|
Height = 30
|
|
},
|
|
HudEuroExtraBigFont = {
|
|
Font = RegisterFont( font_hudEuroBigFont ),
|
|
Height = 40
|
|
},
|
|
HudDigitalSmallFont = {
|
|
Font = RegisterFont( font_hudDigitalFont20 ),
|
|
Height = 20
|
|
},
|
|
HudDigitalNormalFont = {
|
|
Font = RegisterFont( font_hudDigitalFont25 ),
|
|
Height = 26
|
|
},
|
|
HudDigitalBigFont = {
|
|
Font = RegisterFont( font_hudDigitalFont30 ),
|
|
Height = 30
|
|
},
|
|
HudDigitalExtraBigFont = {
|
|
Font = RegisterFont( font_hudDigitalFont40 ),
|
|
Height = 40
|
|
}
|
|
},
|
|
TextStyle = {
|
|
None = 0,
|
|
Shadowed = 3,
|
|
ShadowedMore = 6,
|
|
Outlined = 7,
|
|
OutlinedMore = 8,
|
|
ForceUpperCase = 9,
|
|
ForceLowerCase = 10,
|
|
Monospace = 128,
|
|
MonospaceShadow = 132
|
|
},
|
|
MaxSafeguardPlayers = 4,
|
|
PlayMode = {
|
|
None = 0,
|
|
SP = 1,
|
|
Core = 2,
|
|
Aliens = 3,
|
|
SquadVsSquad = 4,
|
|
Count = 5
|
|
},
|
|
Ownerdraw = {
|
|
CGSpectatorControls = 61,
|
|
CGChangeZoomHint = 70,
|
|
CGHoldBreathHint = 71,
|
|
CGCursorHint = 72,
|
|
CGToggleThermalHint = 76,
|
|
CGToggleHybridHint = 77,
|
|
CGMantleHint = 80,
|
|
CGDeadQuote = 97,
|
|
CGMissionObjectiveHeader = 99,
|
|
CGMissionObjectiveList = 100,
|
|
CGMissionObjectiveBackdrop = 101,
|
|
CGSaving = 111,
|
|
CGLowHealthOverlay = 112,
|
|
CGInvalidCmdHint = 113,
|
|
CGVehicleReticle = 200,
|
|
CGHudTargetsVehicle = 201,
|
|
UIRecordLevel = 365,
|
|
UIIOTD = 387
|
|
},
|
|
OwnerdrawAlignment = {
|
|
None = 0,
|
|
TextCenter = 2,
|
|
TextTopLeft = 1
|
|
}
|
|
}
|
|
if Engine.InFrontend() then
|
|
if not Engine.IsXbox360() then
|
|
CoD.Music = {
|
|
MainSPMusic = "music_mainmenu",
|
|
MainMPMusic = "music_mainmenu_mp",
|
|
MainSquadMusic = "music_mainmenu_squad",
|
|
MainExtinctMusic = "music_mainmenu_extinct",
|
|
MainExtinctMusic_DLC1 = "music_mainmenu_extinct_dlc1",
|
|
MainExtinctMusic_DLC2 = "music_mainmenu_extinct_dlc2",
|
|
MainExtinctMusic_DLC3 = "music_mainmenu_extinct_dlc3",
|
|
MainExtinctMusic_DLC4 = "music_mainmenu_extinct_dlc4",
|
|
MainExtinctIntelMusic = "music_mainmenu_extinct_intel",
|
|
MainRorkeMusic = "music_mainmenu_rorke_files"
|
|
}
|
|
else
|
|
CoD.Music = {
|
|
MainSPMusic = "music_mainmenu",
|
|
MainMPMusic = "music_mainmenu_mp",
|
|
MainSquadMusic = "music_mainmenu_squad",
|
|
MainExtinctMusic = "music_mainmenu_extinct",
|
|
MainExtinctMusic_DLC1 = "music_mainmenu_extinct_xenon",
|
|
MainExtinctMusic_DLC2 = "music_mainmenu_extinct_xenon",
|
|
MainExtinctMusic_DLC3 = "music_mainmenu_extinct_xenon",
|
|
MainExtinctMusic_DLC4 = "music_mainmenu_extinct_xenon",
|
|
MainExtinctIntelMusic = "music_mainmenu_extinct_intel",
|
|
MainRorkeMusic = "music_mainmenu_rorke_files"
|
|
}
|
|
end
|
|
end
|
|
CoD.SFX = {
|
|
OtherAdjust = "ui_other_adjust",
|
|
MouseOver = "ui_hilite",
|
|
MouseClick = "ui_select_confirm",
|
|
SelectBack = "ui_select_back",
|
|
AdjustSafeArea = "ui_screen_adjust",
|
|
DenyAdjustSafeArea = "ui_screen_edge_deny",
|
|
MPLobbyPlayerJoin = "ui_mp_player_join_lobby",
|
|
MPLobbyPlayerExit = "ui_mp_player_leave_lobby",
|
|
ChangeScreen = "ui_screen_change",
|
|
AdjustSlider = "ui_slide_adjust",
|
|
CharacterSlide = "ui_character_slide",
|
|
SPMinimap = "ui_sp_minimap",
|
|
SubMenuMouseOver = "ui_hilite_submenu",
|
|
CacSelectAbility = "ui_mp_ability_select",
|
|
CacDeselectAbility = "ui_mp_ability_deselect",
|
|
CacSelectStrikePackage = "ui_mp_package_select",
|
|
CacDeselectStrikePackage = "ui_mp_package_deselect",
|
|
CacSpendPoints = "ui_points_spent",
|
|
DenySelect = "ui_select_deny",
|
|
UIKinectCommandGood = "ui_kinect_command_good",
|
|
UIKinectCommandBad = "ui_kinect_command_bad",
|
|
CacSetAILoadout = "ui_mp_ability_select",
|
|
RestrictClass = "ui_select_confirm",
|
|
XPTick = "mp_experience_tick"
|
|
}
|
|
CoD.KeyboardInputTypes = {
|
|
Normal = 0,
|
|
Email = 1,
|
|
Password = 2
|
|
}
|
|
if Engine.InFrontend() then
|
|
CoD.AntiCheat = {
|
|
Ban = {
|
|
FEATURE_BAN_LIVE_MP = 1,
|
|
FEATURE_BAN_LIVE_EXTINCTION = 2,
|
|
FEATURE_BAN_LEADERBOARD_WRITE_MP = 3,
|
|
FEATURE_BAN_LEADERBOARD_WRITE_EXTINCTION = 4,
|
|
FEATURE_BAN_MP_SPLITSCREEN = 5,
|
|
FEATURE_BAN_CLAN_TAGS = 6,
|
|
FEATURE_BAN_VOICE_CHAT = 7,
|
|
FEATURE_BAN_PRESTIGE = 8,
|
|
FEATURE_BAN_BOT_GAMES = 9,
|
|
FEATURE_BAN_SEARCH_DEDICATED_SERVER = 10,
|
|
FEATURE_BAN_ALLOCATE_DEDICATED_SERVER = 11,
|
|
FEATURE_BAN_HOSTING = 12,
|
|
FEATURE_BAN_PRESTIGE_EXTRAS = 13
|
|
}
|
|
}
|
|
end
|
|
CoD.PlayOnlineFailure = {
|
|
OPFR_XBOXLIVE_MPNOTALLOWED = 8
|
|
}
|
|
CoD.RequiredDLCError = {
|
|
COMPATIBILITY_ERROR_NONE = 0,
|
|
COMPATIBILITY_ERROR_DISK_FULL = 1,
|
|
COMPATIBILITY_ERROR_CORRUPTED = 2,
|
|
COMPATIBILITY_ERROR_CANCELED = 3,
|
|
COMPATIBILITY_ERROR_UNKNOWN = 4
|
|
}
|
|
CoD.CompassType = {
|
|
Partial = 0,
|
|
Full = 1
|
|
}
|
|
GenericMenuDims = {
|
|
menu_left = 0,
|
|
menu_right_narrow = 390,
|
|
menu_right = 490,
|
|
menu_right_med = 525,
|
|
menu_right_more = 565,
|
|
menu_right_wide = 640,
|
|
menu_top = 115,
|
|
menu_top_low = 215,
|
|
menu_top_scroll = 95,
|
|
menu_bottom = 600,
|
|
menu_bottom_scroll = 542,
|
|
menu_bottom_tall = 700
|
|
}
|
|
GenericTitleBarDims = {
|
|
TitleBarHeight = 32,
|
|
TitleBarLCapWidth = 32,
|
|
TitleBarRCapWidth = 4
|
|
}
|
|
GenericFooterDims = {
|
|
Height = 36,
|
|
BuildNumberHeight = 35,
|
|
TopMargin_WithBackground = -80,
|
|
TopMargin_WithoutBackground = -48
|
|
}
|
|
DialogPopupDims = {
|
|
Width = 400,
|
|
Height = 85
|
|
}
|
|
DialogWidgetDims = {
|
|
Width = 30,
|
|
Height = 30
|
|
}
|
|
GenericButtonDims = {
|
|
button_height = 27,
|
|
button_width = 500,
|
|
pad_button_width = 35
|
|
}
|
|
OptionsListDims = {
|
|
menu_top = 100,
|
|
menu_bottom = 609,
|
|
menu_left = 0,
|
|
menu_right = 600
|
|
}
|
|
local f0_local2 = {
|
|
[0] = "LANGUAGE_ENGLISH"
|
|
}
|
|
local f0_local3 = "LANGUAGE_FRENCH"
|
|
local f0_local4 = "LANGUAGE_GERMAN"
|
|
local f0_local5 = "LANGUAGE_ITALIAN"
|
|
local f0_local6 = "LANGUAGE_SPANISH"
|
|
local f0_local7 = "LANGUAGE_BRITISH"
|
|
local f0_local8 = "LANGUAGE_RUSSIAN"
|
|
local f0_local9 = "LANGUAGE_POLISH"
|
|
local f0_local10 = "LANGUAGE_KOREAN"
|
|
local f0_local11 = "LANGUAGE_TAIWANESE"
|
|
local f0_local12 = "LANGUAGE_JAPANESE"
|
|
local f0_local13 = "LANGUAGE_CHINESE"
|
|
local f0_local14 = "LANGUAGE_THAI"
|
|
local f0_local15 = "LANGUAGE_CZECH"
|
|
local f0_local16 = "LANGUAGE_SPANISHNA"
|
|
local f0_local17 = "LANGUAGE_PORTUGUESE"
|
|
local f0_local18 = "MAX_LANGUAGES"
|
|
f0_local2[1] = f0_local3
|
|
f0_local2[2] = f0_local4
|
|
f0_local2[3] = f0_local5
|
|
f0_local2[4] = f0_local6
|
|
f0_local2[5] = f0_local7
|
|
f0_local2[6] = f0_local8
|
|
f0_local2[7] = f0_local9
|
|
f0_local2[8] = f0_local10
|
|
f0_local2[9] = f0_local11
|
|
f0_local2[10] = f0_local12
|
|
f0_local2[11] = f0_local13
|
|
f0_local2[12] = f0_local14
|
|
f0_local2[13] = f0_local15
|
|
f0_local2[14] = f0_local16
|
|
f0_local2[15] = f0_local17
|
|
f0_local2[16] = f0_local18
|
|
Languages = f0_local2
|
|
ButtonMap = {
|
|
button_action = {
|
|
string = "@LUA_MENU_PAD_PRIMARY_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_PRIMARY_BUTTON",
|
|
raw_button = "primary"
|
|
},
|
|
button_secondary = {
|
|
string = "@LUA_MENU_PAD_SECONDARY_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_SECONDARY_BUTTON",
|
|
raw_button = "secondary"
|
|
},
|
|
button_alt1 = {
|
|
string = "@LUA_MENU_PAD_ALT1_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_ALT1_BUTTON",
|
|
raw_button = "alt1"
|
|
},
|
|
button_alt2 = {
|
|
string = "@LUA_MENU_PAD_ALT2_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_ALT2_BUTTON",
|
|
raw_button = "alt2"
|
|
},
|
|
button_right_trigger = {
|
|
string = "@LUA_MENU_PAD_RIGHT_TRIGGER_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_RIGHT_TRIGGER_BUTTON",
|
|
raw_button = "right_trigger"
|
|
},
|
|
button_left_trigger = {
|
|
string = "@LUA_MENU_PAD_LEFT_TRIGGER_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_LEFT_TRIGGER_BUTTON",
|
|
raw_button = "left_trigger"
|
|
},
|
|
button_shoulderr = {
|
|
string = "@LUA_MENU_PAD_RIGHT_SHOULDER_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_RIGHT_SHOULDER_BUTTON",
|
|
raw_button = "shoulderr"
|
|
},
|
|
button_shoulderl = {
|
|
string = "@LUA_MENU_PAD_LEFT_SHOULDER_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_LEFT_SHOULDER_BUTTON",
|
|
raw_button = "shoulderl"
|
|
},
|
|
button_select = {
|
|
string = "@LUA_MENU_PAD_BACK_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_BACK_BUTTON",
|
|
raw_button = "select"
|
|
},
|
|
button_start = {
|
|
string = "@LUA_MENU_PAD_START_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_START_BUTTON",
|
|
raw_button = "start"
|
|
},
|
|
button_dpad_up = {
|
|
string = "@LUA_MENU_PAD_DPAD_UP_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_DPAD_UP_BUTTON",
|
|
raw_button = "dpad_up"
|
|
},
|
|
button_dpad_down = {
|
|
string = "@LUA_MENU_PAD_DPAD_DOWN_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_DPAD_DOWN_BUTTON",
|
|
raw_button = "dpad_down"
|
|
},
|
|
button_dpad_left = {
|
|
string = "@LUA_MENU_MP_PAD_DPAD_LEFT_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_DPAD_LEFT_BUTTON",
|
|
raw_button = "dpad_left"
|
|
},
|
|
button_dpad_right = {
|
|
string = "@LUA_MENU_MP_PAD_DPAD_RIGHT_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_DPAD_RIGHT_BUTTON",
|
|
raw_button = "dpad_right"
|
|
},
|
|
button_l3 = {
|
|
string = "@LUA_MENU_PAD_L3_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_L3_BUTTON",
|
|
raw_button = "l3"
|
|
},
|
|
button_page_up = {
|
|
string = "@PLATFORM_PAGE_UP",
|
|
keyboard_string = "@PLATFORM_KB_PAGE_UP_BUTTON",
|
|
raw_button = "page_up"
|
|
},
|
|
button_page_down = {
|
|
string = "@PLATFORM_PAGE_DOWN",
|
|
keyboard_string = "@PLATFORM_KB_PAGE_DOWN_BUTTON",
|
|
raw_button = "page_down"
|
|
},
|
|
button_home = {
|
|
string = "@PLATFORM_KB_HOME_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_HOME_BUTTON",
|
|
raw_button = "home"
|
|
},
|
|
button_ins = {
|
|
string = "@PLATFORM_KB_INS_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_INS_BUTTON",
|
|
raw_button = "ins"
|
|
},
|
|
button_del = {
|
|
string = "@PLATFORM_KB_DEL_BUTTON",
|
|
keyboard_string = "@PLATFORM_KB_DEL_BUTTON",
|
|
raw_button = "del"
|
|
}
|
|
}
|
|
ButtonQualifiers = {
|
|
Gamepad = "gamepad",
|
|
DPad = "dpad",
|
|
Keyboard = "keyboard",
|
|
Mousewheel = "mousewheel"
|
|
}
|
|
Colors = {
|
|
white = {
|
|
r = 1,
|
|
g = 1,
|
|
b = 1
|
|
},
|
|
black = {
|
|
r = 0,
|
|
g = 0,
|
|
b = 0
|
|
},
|
|
new_icon_green = {
|
|
r = 0.38,
|
|
g = 0.65,
|
|
b = 0.31
|
|
},
|
|
even_stripe = {
|
|
r = 0,
|
|
g = 0,
|
|
b = 0,
|
|
a = 0
|
|
},
|
|
frontend_hilite = {
|
|
r = 0.9,
|
|
g = 0.78,
|
|
b = 0.1
|
|
},
|
|
alien_frontend_hilite = {
|
|
r = 1,
|
|
g = 0.24,
|
|
b = 0.04
|
|
},
|
|
window_title_text_color = {
|
|
r = 0.8,
|
|
g = 0.8,
|
|
b = 0.8
|
|
},
|
|
window_border_color = {
|
|
r = 0.4,
|
|
g = 0.4,
|
|
b = 0.4
|
|
},
|
|
orange = {
|
|
r = 0.9,
|
|
g = 0.6,
|
|
b = 0
|
|
},
|
|
cyan = {
|
|
r = 0.35,
|
|
g = 0.7,
|
|
b = 0.9
|
|
},
|
|
blue = {
|
|
r = 0,
|
|
g = 0.45,
|
|
b = 0.7
|
|
},
|
|
seafoam_blue = {
|
|
r = 0.45,
|
|
g = 0.8,
|
|
b = 0.78
|
|
},
|
|
very_dark_cyan = {
|
|
r = 0.07,
|
|
g = 0.1,
|
|
b = 0.11
|
|
},
|
|
yellow = {
|
|
r = 0.9,
|
|
g = 0.78,
|
|
b = 0.1
|
|
},
|
|
red = {
|
|
r = 1,
|
|
g = 0,
|
|
b = 0
|
|
},
|
|
grey_14 = {
|
|
r = 0.14,
|
|
g = 0.14,
|
|
b = 0.14
|
|
},
|
|
grey_2 = {
|
|
r = 0.2,
|
|
g = 0.2,
|
|
b = 0.2
|
|
},
|
|
grey_22 = {
|
|
r = 0.22,
|
|
g = 0.22,
|
|
b = 0.22
|
|
},
|
|
grey_3 = {
|
|
r = 0.3,
|
|
g = 0.3,
|
|
b = 0.3
|
|
},
|
|
grey_4 = {
|
|
r = 0.4,
|
|
g = 0.4,
|
|
b = 0.4
|
|
},
|
|
grey_5 = {
|
|
r = 0.5,
|
|
g = 0.5,
|
|
b = 0.5
|
|
},
|
|
md_grey = {
|
|
r = 0.75,
|
|
g = 0.75,
|
|
b = 0.75
|
|
},
|
|
light_grey = {
|
|
r = 0.85,
|
|
g = 0.85,
|
|
b = 0.85
|
|
},
|
|
cac_label_text = {
|
|
r = 0.5,
|
|
g = 0.5,
|
|
b = 0.5
|
|
},
|
|
cac_ability_text = {
|
|
r = 0.8,
|
|
g = 0.8,
|
|
b = 0.8
|
|
},
|
|
cac_focus_text = {
|
|
r = 0,
|
|
g = 0,
|
|
b = 0
|
|
},
|
|
cac_button = {
|
|
r = 0.2,
|
|
g = 0.2,
|
|
b = 0.2
|
|
},
|
|
cac_border = {
|
|
r = 0.5,
|
|
g = 0.5,
|
|
b = 0.5
|
|
},
|
|
cac_weapon_meter_main = {
|
|
r = 0.8,
|
|
g = 0.8,
|
|
b = 0.8
|
|
},
|
|
cac_weapon_meter_better = {
|
|
r = 0.36,
|
|
g = 0.66,
|
|
b = 0.2
|
|
},
|
|
cac_weapon_meter_better_dark = {
|
|
r = 0.22,
|
|
g = 0.42,
|
|
b = 0.12
|
|
},
|
|
cac_weapon_meter_worse = {
|
|
r = 0.88,
|
|
g = 0.26,
|
|
b = 0.26
|
|
},
|
|
cac_weapon_meter_worse_dark = {
|
|
r = 0.55,
|
|
g = 0.16,
|
|
b = 0.16
|
|
},
|
|
build_number = {
|
|
r = 0.75,
|
|
g = 0.75,
|
|
b = 0.75
|
|
},
|
|
cac_sub_popup_text = {
|
|
r = 0.55,
|
|
g = 0.55,
|
|
b = 0.55
|
|
},
|
|
cac_ability = {
|
|
bg = {
|
|
r = 0.85,
|
|
g = 0.85,
|
|
b = 0.85
|
|
},
|
|
ability_speed = {
|
|
r = 0.76,
|
|
g = 0.25,
|
|
b = 0.13
|
|
},
|
|
ability_handling = {
|
|
r = 0.4,
|
|
g = 0.49,
|
|
b = 0.52
|
|
},
|
|
ability_stealth = {
|
|
r = 0.38,
|
|
g = 0.28,
|
|
b = 0.52
|
|
},
|
|
ability_awareness = {
|
|
r = 0.76,
|
|
g = 0.53,
|
|
b = 0.16
|
|
},
|
|
ability_resistance = {
|
|
r = 0.47,
|
|
g = 0.58,
|
|
b = 0.3
|
|
},
|
|
ability_equipment = {
|
|
r = 0.12,
|
|
g = 0.31,
|
|
b = 0.62
|
|
},
|
|
ability_elite = {
|
|
r = 0.5,
|
|
g = 0.5,
|
|
b = 0.5
|
|
}
|
|
},
|
|
cac_specialist_bonus = {
|
|
r = 0.35,
|
|
g = 0.7,
|
|
b = 0.9
|
|
},
|
|
cac_attach_shade = {
|
|
r = 0.1,
|
|
g = 0.1,
|
|
b = 0.1
|
|
},
|
|
cac_performance_header = {
|
|
r = 0.7,
|
|
g = 0.7,
|
|
b = 0.7
|
|
},
|
|
primary_text_color = {
|
|
r = 0.6,
|
|
g = 0.6,
|
|
b = 0.6
|
|
},
|
|
secondary_text_color = {
|
|
r = 0.35,
|
|
g = 0.35,
|
|
b = 0.35
|
|
},
|
|
generic_menu_bg_color = {
|
|
r = 0.13,
|
|
g = 0.13,
|
|
b = 0.13
|
|
},
|
|
generic_menu_frame_color = {
|
|
r = 0.5,
|
|
g = 0.5,
|
|
b = 0.5
|
|
},
|
|
generic_button_text_default_color = {
|
|
r = 0.65,
|
|
g = 0.65,
|
|
b = 0.65,
|
|
a = 1
|
|
},
|
|
generic_button_text_focus_color = {
|
|
r = 0,
|
|
g = 0,
|
|
b = 0,
|
|
a = 1
|
|
},
|
|
generic_button_content_focus_color = {
|
|
r = 1,
|
|
g = 1,
|
|
b = 1,
|
|
a = 1
|
|
},
|
|
generic_button_text_disabled_color = {
|
|
r = 0.5,
|
|
g = 0.5,
|
|
b = 0.5,
|
|
a = 0.5
|
|
},
|
|
generic_button_text_over_disabled_color = {
|
|
r = 1,
|
|
g = 1,
|
|
b = 1,
|
|
a = 1
|
|
},
|
|
generic_button_text_over_disabled_pulse_color = {
|
|
r = 1,
|
|
g = 1,
|
|
b = 1,
|
|
a = 0.65
|
|
},
|
|
generic_button_border_color = {
|
|
r = 0.22,
|
|
g = 0.22,
|
|
b = 0.22,
|
|
a = 1
|
|
},
|
|
alien_tech_tree_bright_grey = {
|
|
r = 0.8,
|
|
g = 0.8,
|
|
b = 0.8,
|
|
a = 1
|
|
},
|
|
alien_scoreboard_dull_grey = {
|
|
r = 0.54,
|
|
g = 0.54,
|
|
b = 0.54,
|
|
a = 1
|
|
},
|
|
alien_scoreboard_bright_grey = {
|
|
r = 0.76,
|
|
g = 0.76,
|
|
b = 0.76,
|
|
a = 1
|
|
},
|
|
alien_chaos_hilite = {
|
|
r = 0.96,
|
|
g = 0.56,
|
|
b = 0.34,
|
|
a = 1
|
|
},
|
|
alien_chaos_freeze = {
|
|
r = 0.43,
|
|
g = 0.81,
|
|
b = 0.96,
|
|
a = 1
|
|
}
|
|
}
|
|
Swatches = {
|
|
GenericMenu = {
|
|
Background = Colors.very_dark_cyan,
|
|
Border = Colors.window_border_color,
|
|
BackgroundAlpha = 0.4,
|
|
BorderAlpha = 0.4
|
|
},
|
|
Overlay = {
|
|
Color = Colors.very_dark_cyan,
|
|
Alpha = 0.4,
|
|
AlphaMedium = 0.7,
|
|
AlphaMore = 0.85
|
|
}
|
|
}
|
|
BrightnessGuideConstants = {
|
|
not_visible = {
|
|
item_id = "bg_not_visible",
|
|
color_default = 0.02
|
|
},
|
|
barely_visible = {
|
|
item_id = "bg_barely_visible",
|
|
color_default = 0.07
|
|
},
|
|
easily_visible = {
|
|
item_id = "bg_easily_visible",
|
|
color_default = 0.19
|
|
}
|
|
}
|
|
GenericButtonSettings = {
|
|
Variants = {
|
|
Plain = "Plain",
|
|
Info = "Info",
|
|
Select = "Select",
|
|
Slider = "Slider",
|
|
Checkbox = "Checkbox",
|
|
Input = "Input"
|
|
},
|
|
Common = {
|
|
force_enable_action_button = false,
|
|
force_disable_action_button = false,
|
|
y_offset = -3,
|
|
disable_height_guard = false,
|
|
disable_padlock = false,
|
|
use_locking = true,
|
|
text_align_without_content = LUI.Alignment.Right,
|
|
text_align_with_content = LUI.Alignment.Right,
|
|
text_padding_without_content = 60,
|
|
text_padding_with_content = 275,
|
|
label_align = LUI.Alignment.Center,
|
|
over_disabled_animation_duration = 300,
|
|
text_default_color = Colors.generic_button_text_default_color,
|
|
text_focus_color = Colors.generic_button_text_focus_color,
|
|
text_lock_color = Colors.generic_button_text_focus_color,
|
|
text_disabled_color = Colors.generic_button_text_disabled_color,
|
|
text_over_disabled_color = Colors.generic_button_text_over_disabled_color,
|
|
text_over_disabled_pulse_color = Colors.generic_button_text_over_disabled_pulse_color,
|
|
content_background_margin_top = 0,
|
|
content_background_margin_bottom = 0,
|
|
content_margin = 12,
|
|
content_width = 250,
|
|
content_arrows_margin = 18,
|
|
content_slider_height = 12,
|
|
content_slider_width = 143,
|
|
checkbox_margin = 35,
|
|
content_default_color = Colors.generic_button_text_default_color,
|
|
content_focus_color = Colors.generic_button_content_focus_color,
|
|
content_focus_color_without_bg = Colors.generic_button_text_focus_color,
|
|
content_lock_color = Colors.generic_button_content_focus_color,
|
|
newIconSize = 35,
|
|
newIconIndent = 90,
|
|
field_edited_func = function ()
|
|
|
|
end,
|
|
max_length = 20,
|
|
password_field = false,
|
|
filter_profanity = false,
|
|
keyboard_type = CoD.KeyboardInputTypes.Normal,
|
|
text_alignment = LUI.Alignment.Left,
|
|
field_name = "Placeholder Label"
|
|
},
|
|
Styles = {
|
|
GradientButton = {
|
|
y_offset = -2,
|
|
height = 40.67,
|
|
lt_cap_width = 170.67,
|
|
rt_cap_width = 85.33,
|
|
content_margin = 26,
|
|
content_width = 236,
|
|
content_background_margin_top = 7,
|
|
content_background_margin_bottom = 12,
|
|
action_button_margin = 23,
|
|
slide_in_min_duration = 60,
|
|
slide_in_duration_step = 25,
|
|
focus_animation_distance = 40,
|
|
focus_animation_duration = 100,
|
|
focus_glow_animation_duration = 1200,
|
|
focus_alien_glow_animation_duration = 1800,
|
|
focus_action_button_glow_max_alpha = 0.35,
|
|
focus_alien_action_button_glow_max_alpha = 0.5,
|
|
focus_glow_max_alpha = 0.35
|
|
},
|
|
FlatButton = {
|
|
SubStyles = {
|
|
Default = {},
|
|
SubMenu = {
|
|
y_offset = 0,
|
|
border_padding = 0,
|
|
border_height = 1,
|
|
submenu_substyle = true,
|
|
anim_interval = 750,
|
|
anim_1_alpha = 0.8,
|
|
anim_2_alpha = 0.5
|
|
}
|
|
},
|
|
height = 43,
|
|
submenu_substyle = false,
|
|
y_offset = -2,
|
|
text_align_without_content = LUI.Alignment.Left,
|
|
text_padding_with_content = 275,
|
|
text_padding_without_content = 10,
|
|
content_background_margin_top = 5,
|
|
content_background_margin_bottom = 10,
|
|
prompt_width = 36,
|
|
action_button_margin = 1,
|
|
disable_border = false,
|
|
border_color = Colors.generic_button_border_color,
|
|
border_padding = 4,
|
|
border_height = 1,
|
|
background_padding = 0
|
|
},
|
|
GlassButton = {
|
|
SubStyles = {
|
|
Default = {
|
|
y_offset = 2,
|
|
height = 26.67,
|
|
ghost_width = 8,
|
|
ghost_height = 10,
|
|
rt_cap_width = 85.33,
|
|
action_button_margin = 11,
|
|
border_padding = 7
|
|
},
|
|
Popup = {
|
|
y_offset = 2,
|
|
height = 26.67,
|
|
ghost_width = 8,
|
|
ghost_height = 10,
|
|
rt_cap_width = 85.33,
|
|
action_button_margin = 11,
|
|
popup_substyle = true,
|
|
force_disable_action_button = true,
|
|
anim_interval = 750,
|
|
anim_1_alpha = 0.8,
|
|
anim_2_alpha = 0.5,
|
|
text_over_disabled_color = Colors.generic_button_text_focus_color,
|
|
text_over_disabled_pulse_color = Colors.generic_button_text_focus_color,
|
|
border_padding = 7
|
|
},
|
|
YesNoPopup = {
|
|
y_offset = 2,
|
|
height = 26.67,
|
|
ghost_width = 8,
|
|
ghost_height = 10,
|
|
rt_cap_width = 85.33,
|
|
action_button_margin = 11,
|
|
popup_substyle = true,
|
|
force_disable_action_button = true,
|
|
anim_interval = 750,
|
|
anim_1_alpha = 0.8,
|
|
anim_2_alpha = 0.5,
|
|
text_over_disabled_color = Colors.generic_button_text_focus_color,
|
|
text_over_disabled_pulse_color = Colors.generic_button_text_focus_color,
|
|
border_padding = 35
|
|
},
|
|
SubMenu = {
|
|
y_offset = 2,
|
|
height = 26.67,
|
|
ghost_width = 8,
|
|
ghost_height = 10,
|
|
rt_cap_width = 85.33,
|
|
action_button_margin = 11,
|
|
submenu_substyle = true,
|
|
force_disable_action_button = true,
|
|
anim_interval = 750,
|
|
anim_1_alpha = 0.8,
|
|
anim_2_alpha = 0.5,
|
|
text_over_disabled_color = Colors.generic_button_text_focus_color,
|
|
text_over_disabled_pulse_color = Colors.generic_button_text_focus_color,
|
|
border_padding = 7
|
|
}
|
|
},
|
|
popup_substyle = false,
|
|
submenu_substyle = false,
|
|
text_align_without_content = LUI.Alignment.Center,
|
|
text_padding_without_content = 12,
|
|
content_background_margin_top = 5,
|
|
content_background_margin_bottom = 2,
|
|
lt_cap_width = 10.67,
|
|
padlock_width = 16,
|
|
padlock_height = 16,
|
|
padlock_margin = 17,
|
|
border_color = Colors.generic_button_border_color,
|
|
disable_border = false,
|
|
border_height = 1,
|
|
lock_padding = 7,
|
|
text_default_color = Colors.primary_text_color,
|
|
text_disabled_color = Colors.secondary_text_color,
|
|
newIconSize = 24,
|
|
newIconIndent = 4
|
|
}
|
|
}
|
|
}
|
|
FocusType = {
|
|
MenuFlow = 0,
|
|
MouseOver = 1,
|
|
ListSelection = 2,
|
|
Gamepad = 3
|
|
}
|
|
DvarTypeTable = {
|
|
DvarBool = 0,
|
|
DvarFloat = 1,
|
|
DvarInt = 5,
|
|
DvarEnum = 6,
|
|
DvarString = 7
|
|
}
|
|
SliderBounds = {
|
|
Brightness = {
|
|
Min = -0.4,
|
|
Max = 0.2,
|
|
Step = -0.01
|
|
},
|
|
PCBrightness = {
|
|
Min = -0.4,
|
|
Max = 0.2,
|
|
Step = -0.01
|
|
},
|
|
HorzMargin = {
|
|
Min = 0.9,
|
|
Max = 1,
|
|
Step = 0
|
|
},
|
|
MouseSensitivity = {
|
|
Min = 1,
|
|
Max = 30,
|
|
Step = 1
|
|
},
|
|
VertMargin = {
|
|
Min = 0.9,
|
|
Max = 1,
|
|
Step = 0
|
|
},
|
|
Volume = {
|
|
Min = 0,
|
|
Max = 0.8,
|
|
Step = 0.02,
|
|
PCStep = 0.02
|
|
},
|
|
VoiceRecord = {
|
|
Min = 0,
|
|
Max = 65535,
|
|
Step = 655
|
|
},
|
|
VoiceThreshold = {
|
|
Min = 0,
|
|
Max = 65535,
|
|
Step = 655
|
|
},
|
|
FOV = {
|
|
Min = 65,
|
|
Max = 80,
|
|
Step = 1
|
|
}
|
|
}
|
|
MousePitchTable = {
|
|
PitchFloat = 0.02
|
|
}
|
|
PCOptionsMenuDimensions = {
|
|
Padding = 4,
|
|
Spacing = 2
|
|
}
|
|
ActiveMenus = {
|
|
None = 0,
|
|
Main = 1,
|
|
InGame = 2,
|
|
PreGame = 3,
|
|
PostGame = 4
|
|
}
|
|
CoD.SetMaterial = function ( f3_arg0, f3_arg1, f3_arg2, f3_arg3 )
|
|
if f3_arg2 == nil then
|
|
f3_arg2 = 1
|
|
end
|
|
if f3_arg3 == nil then
|
|
f3_arg3 = 0
|
|
end
|
|
f3_arg0:registerAnimationState( "changeMaterial", {
|
|
material = f3_arg1,
|
|
alpha = f3_arg2
|
|
} )
|
|
f3_arg0:animateToState( "changeMaterial", f3_arg3 )
|
|
end
|
|
|
|
CoD.UsingController = function ()
|
|
local f4_local0 = Engine.IsConsoleGame()
|
|
if not f4_local0 then
|
|
if Engine.IsConsoleGame() or Engine.IsGamepadEnabled() ~= 1 then
|
|
f4_local0 = false
|
|
else
|
|
f4_local0 = true
|
|
end
|
|
end
|
|
return f4_local0
|
|
end
|
|
|
|
CoD.MuteStrategies = {
|
|
MuteStrategyUnmute = 0,
|
|
MuteStrategyMuteAll = 1,
|
|
MuteStrategyMuteAllButParty = 2,
|
|
MuteStrategyMuteAllButFriends = 3
|
|
}
|
|
CoD.WeaponListPrimary = {
|
|
iw6_cbjms = 1,
|
|
iw6_k7 = 1,
|
|
iw6_kriss = 1,
|
|
iw6_microtar = 1,
|
|
iw6_pdw = 1,
|
|
iw6_pdwauto = 1,
|
|
iw6_pp19 = 1,
|
|
iw6_vepr = 1,
|
|
iw6_ak12 = 1,
|
|
iw6_arx160 = 1,
|
|
iw6_bren = 1,
|
|
iw6_fads = 1,
|
|
iw6_honeybadger = 1,
|
|
iw6_msbs = 1,
|
|
iw6_r5rgp = 1,
|
|
iw6_sc2010 = 1,
|
|
iw6_gm6 = 1,
|
|
iw6_l115a3 = 1,
|
|
iw6_usr = 1,
|
|
iw6_vks = 1,
|
|
iw6_g28 = 1,
|
|
iw6_imbel = 1,
|
|
iw6_mk14 = 1,
|
|
iw6_svu = 1,
|
|
iw6_fp6 = 1,
|
|
iw6_maul = 1,
|
|
iw6_mts255 = 1,
|
|
iw6_uts15 = 1,
|
|
iw6_ameli = 1,
|
|
iw6_kac = 1,
|
|
iw6_lsat = 1,
|
|
iw6_m27 = 1,
|
|
iw6_minigun = 1,
|
|
iw6_dlcweap01 = 1,
|
|
iw6_dlcweap02 = 1,
|
|
iw6_dlcweap03 = 1,
|
|
iw6_maaws = 1,
|
|
iw6_minigunjugg = 1,
|
|
iw6_gm6helisnipe = 1,
|
|
iw6_mariachimagnum = 1,
|
|
venomxgun = 1
|
|
}
|
|
CoD.WeaponListSecondary = {
|
|
iw6_m9a1 = 1,
|
|
iw6_magnum = 1,
|
|
iw6_mp443 = 1,
|
|
iw6_p226 = 1,
|
|
iw6_mk32 = 1,
|
|
iw6_panzerfaust3 = 1,
|
|
iw6_rgm = 1,
|
|
iw6_magnumjugg = 1,
|
|
iw6_p226jugg = 1,
|
|
iw6_magnumhorde = 1,
|
|
iw6_mk32horde = 1
|
|
}
|
|
CoD.remoteKillstreakWeaponTable = {
|
|
killstreak_ac130_mp = true,
|
|
ac130_105mm_mp = true,
|
|
ac130_40mm_mp = true,
|
|
ac130_25mm_mp = true,
|
|
killstreak_remote_tank_laptop_mp = true,
|
|
killstreak_remote_tank_remote_mp = true,
|
|
killstreak_helicopter_minigun_mp = true,
|
|
killstreak_predator_missile_mp = true,
|
|
heli_remote_mp = true,
|
|
killstreak_remote_turret_remote_mp = true,
|
|
killstreak_remote_turret_laptop_mp = true,
|
|
mortar_remote_mp = true,
|
|
mortar_remote_zoom_mp = true,
|
|
uav_remote_mp = true,
|
|
killstreak_precision_airstrike_mp = true,
|
|
killstreak_heli_pilot_mp = true,
|
|
killstreak_odin_support_mp = true,
|
|
killstreak_odin_assault_mp = true,
|
|
killstreak_level_event_laptop_mp = true,
|
|
killstreak_vanguard_mp = true
|
|
}
|
|
CoD.UsingKillstreakRemote = function ()
|
|
return CoD.remoteKillstreakWeaponTable[Game.GetPlayerWeaponName()]
|
|
end
|
|
|
|
CoD.UsingOdinOrLoki = function ()
|
|
local f6_local0 = Game.GetPlayerWeaponName()
|
|
local f6_local1 = false
|
|
if f6_local0 == "killstreak_odin_support_mp" or f6_local0 == "killstreak_odin_assault_mp" then
|
|
f6_local1 = true
|
|
end
|
|
return f6_local1
|
|
end
|
|
|
|
CoD.IsFireTeamMode = function ()
|
|
return Lobby.GetBotsConnectType() == 2
|
|
end
|
|
|
|
CoD.ColorizeState = function ( f8_arg0, f8_arg1 )
|
|
if not f8_arg1 then
|
|
f8_arg1 = {}
|
|
end
|
|
if not f8_arg0 then
|
|
DebugPrint( "Warning: Calling CoD.ColorizeState without specifying a color" )
|
|
return f8_arg1
|
|
end
|
|
f8_arg1.red = f8_arg0.r
|
|
f8_arg1.green = f8_arg0.g
|
|
f8_arg1.blue = f8_arg0.b
|
|
local f8_local0 = f8_arg0.a
|
|
if not f8_local0 then
|
|
f8_local0 = f8_arg1.alpha or 1
|
|
end
|
|
f8_arg1.alpha = f8_local0
|
|
return f8_arg1
|
|
end
|
|
|
|
CoD.PrintModuleLoad = function ( f9_arg0 )
|
|
|
|
end
|
|
|
|
CoD.StatsGroup = {
|
|
Ranked = 0,
|
|
Private = 1,
|
|
Coop = 2,
|
|
Common = 3
|
|
}
|
|
CoD.GetStatsGroupForGameMode = function ()
|
|
return Engine.GetStatsGroupForGameMode()
|
|
end
|
|
|
|
CoD.GetStatsGroupForSquadLocation = function ( f11_arg0 )
|
|
local f11_local0 = CoD.GetStatsGroupForGameMode()
|
|
if f11_arg0 == "squadMembers" then
|
|
f11_local0 = CoD.StatsGroup.Ranked
|
|
elseif f11_arg0 == "privateMatchSquadMembers" then
|
|
f11_local0 = CoD.StatsGroup.Private
|
|
end
|
|
return f11_local0
|
|
end
|
|
|
|
if f0_local0 then
|
|
f0_local2 = profile.beginuserevent
|
|
f0_local3 = profile.enduserevent
|
|
profile.beginuserevent = function ( f12_arg0 )
|
|
if type( f12_arg0 ) ~= "number" then
|
|
f12_arg0 = profile.lookupusereventid( f12_arg0 ) or profile.createuserevent( f12_arg0, "duration" )
|
|
end
|
|
f0_local2( f12_arg0 )
|
|
return f12_arg0
|
|
end
|
|
|
|
profile.enduserevent = function ( f13_arg0 )
|
|
if type( f13_arg0 ) ~= "number" then
|
|
f13_arg0 = profile.lookupusereventid( f13_arg0 )
|
|
end
|
|
f0_local3( f13_arg0 )
|
|
end
|
|
|
|
else
|
|
profile.beginuserevent = function ()
|
|
|
|
end
|
|
|
|
profile.enduserevent = function ()
|
|
|
|
end
|
|
|
|
profile.createuserevent = function ()
|
|
|
|
end
|
|
|
|
profile.lookupusereventid = function ()
|
|
|
|
end
|
|
|
|
end
|
|
if f0_local1 then
|
|
function run_gc( f18_arg0 )
|
|
local f18_local0
|
|
if f18_arg0 then
|
|
f18_local0 = " (" .. f18_arg0 .. ")"
|
|
if not f18_local0 then
|
|
|
|
else
|
|
local f18_local1 = collectgarbage( "count" )
|
|
collectgarbage( "collect" )
|
|
local f18_local2 = collectgarbage( "count" )
|
|
DebugPrint( "LUI - Ran GC cycle, cleared " .. f18_local1 - f18_local2 .. "kb. " .. f18_local2 .. "kb remaining." .. f18_local0 )
|
|
end
|
|
end
|
|
f18_local0 = ""
|
|
end
|
|
|
|
else
|
|
function run_gc()
|
|
collectgarbage( "collect" )
|
|
end
|
|
|
|
end
|
|
function hashset( f20_arg0 )
|
|
local f20_local0 = {}
|
|
for f20_local4, f20_local5 in pairs( f20_arg0 ) do
|
|
f20_local0[f20_local5] = true
|
|
end
|
|
return f20_local0
|
|
end
|
|
|
|
function bit( f21_arg0 )
|
|
return 2 ^ (f21_arg0 - 1)
|
|
end
|
|
|
|
function hasbit( f22_arg0, f22_arg1 )
|
|
return f22_arg1 <= f22_arg0 % (f22_arg1 + f22_arg1)
|
|
end
|
|
|
|
function setbit( f23_arg0, f23_arg1 )
|
|
if hasbit( f23_arg0, f23_arg1 ) then
|
|
local f23_local0 = f23_arg0
|
|
end
|
|
return f23_local0 or f23_arg0 + f23_arg1
|
|
end
|
|
|
|
function clearbit( f24_arg0, f24_arg1 )
|
|
return hasbit( f24_arg0, f24_arg1 ) and f24_arg0 - f24_arg1 or f24_arg0
|
|
end
|
|
|
|
function IsCurrentSticksLayoutSouthpaw()
|
|
return Engine.GetProfileData( "gpadSticksConfig" ) == "thumbstick_southpaw"
|
|
end
|
|
|
|
function IsCurrentSticksLayoutLegacy()
|
|
return Engine.GetProfileData( "gpadSticksConfig" ) == "thumbstick_legacy"
|
|
end
|
|
|
|
function IsCurrentSticksLayoutLegacySouthpaw()
|
|
return Engine.GetProfileData( "gpadSticksConfig" ) == "thumbstick_legacysouthpaw"
|
|
end
|
|
|
|
CoD.CreateState = function ( f28_arg0, f28_arg1, f28_arg2, f28_arg3, f28_arg4 )
|
|
return {
|
|
left = f28_arg0,
|
|
top = f28_arg1,
|
|
right = f28_arg2,
|
|
bottom = f28_arg3,
|
|
leftAnchor = f28_arg4.leftAnchor,
|
|
topAnchor = f28_arg4.topAnchor,
|
|
rightAnchor = f28_arg4.rightAnchor,
|
|
bottomAnchor = f28_arg4.bottomAnchor
|
|
}
|
|
end
|
|
|
|
CoD.GradientMap = function ( f29_arg0, f29_arg1 )
|
|
assert( f29_arg0 and #f29_arg0 >= 2 )
|
|
local f29_local0 = assert
|
|
local f29_local1
|
|
if f29_arg0[1].threshold ~= 0 or f29_arg0[#f29_arg0].threshold ~= 1 then
|
|
f29_local1 = false
|
|
else
|
|
f29_local1 = true
|
|
end
|
|
f29_local0( f29_local1 )
|
|
if f29_arg1 <= 0 then
|
|
return f29_arg0[1].color
|
|
elseif f29_arg1 >= 1 then
|
|
return f29_arg0[#f29_arg0].color
|
|
end
|
|
f29_local0 = f29_arg0[1]
|
|
f29_local1 = f29_arg0[1]
|
|
for f29_local6, f29_local7 in ipairs( f29_arg0 ) do
|
|
if f29_arg1 < f29_local7.threshold then
|
|
local f29_local5 = (f29_arg1 - f29_local0.threshold) / (f29_local7.threshold - f29_local0.threshold)
|
|
return {
|
|
r = f29_local5 * f29_local7.color.r + (1 - f29_local5) * f29_local0.color.r,
|
|
g = f29_local5 * f29_local7.color.g + (1 - f29_local5) * f29_local0.color.g,
|
|
b = f29_local5 * f29_local7.color.b + (1 - f29_local5) * f29_local0.color.b
|
|
}
|
|
end
|
|
f29_local0 = f29_local7
|
|
end
|
|
return f29_arg0[#f29_arg0].color
|
|
end
|
|
|
|
CoD.AnchorTypes = {
|
|
All = {
|
|
leftAnchor = true,
|
|
topAnchor = true,
|
|
rightAnchor = true,
|
|
bottomAnchor = true
|
|
},
|
|
None = {
|
|
leftAnchor = false,
|
|
topAnchor = false,
|
|
rightAnchor = false,
|
|
bottomAnchor = false
|
|
},
|
|
Top = {
|
|
leftAnchor = false,
|
|
topAnchor = true,
|
|
rightAnchor = false,
|
|
bottomAnchor = false
|
|
},
|
|
TopLeft = {
|
|
leftAnchor = true,
|
|
topAnchor = true,
|
|
rightAnchor = false,
|
|
bottomAnchor = false
|
|
},
|
|
TopRight = {
|
|
leftAnchor = false,
|
|
topAnchor = true,
|
|
rightAnchor = true,
|
|
bottomAnchor = false
|
|
},
|
|
TopLeftRight = {
|
|
leftAnchor = true,
|
|
topAnchor = true,
|
|
rightAnchor = true,
|
|
bottomAnchor = false
|
|
},
|
|
Bottom = {
|
|
leftAnchor = false,
|
|
topAnchor = false,
|
|
rightAnchor = false,
|
|
bottomAnchor = true
|
|
},
|
|
BottomLeft = {
|
|
leftAnchor = true,
|
|
topAnchor = false,
|
|
rightAnchor = false,
|
|
bottomAnchor = true
|
|
},
|
|
BottomRight = {
|
|
leftAnchor = false,
|
|
topAnchor = false,
|
|
rightAnchor = true,
|
|
bottomAnchor = true
|
|
},
|
|
BottomLeftRight = {
|
|
leftAnchor = true,
|
|
topAnchor = false,
|
|
rightAnchor = true,
|
|
bottomAnchor = true
|
|
},
|
|
TopBottomLeft = {
|
|
leftAnchor = true,
|
|
topAnchor = true,
|
|
rightAnchor = false,
|
|
bottomAnchor = true
|
|
},
|
|
TopBottomRight = {
|
|
leftAnchor = false,
|
|
topAnchor = true,
|
|
rightAnchor = true,
|
|
bottomAnchor = true
|
|
},
|
|
Left = {
|
|
leftAnchor = true,
|
|
topAnchor = false,
|
|
rightAnchor = false,
|
|
bottomAnchor = false
|
|
},
|
|
Right = {
|
|
leftAnchor = false,
|
|
topAnchor = false,
|
|
rightAnchor = true,
|
|
bottomAnchor = false
|
|
},
|
|
LeftRight = {
|
|
leftAnchor = true,
|
|
topAnchor = false,
|
|
rightAnchor = true,
|
|
bottomAnchor = false
|
|
}
|
|
}
|
|
CoD.FormatInfectedTime = function ( f30_arg0, f30_arg1 )
|
|
local f30_local0 = Engine.Localize( "@LUA_MENU_S_FOR_SECONDS" )
|
|
local f30_local1 = Engine.Localize( "@LUA_MENU_M_FOR_MINUTES" )
|
|
local f30_local2 = math.floor( f30_arg0 / 60 )
|
|
local f30_local3 = ""
|
|
if not f30_arg1 then
|
|
if f30_local2 < 1 then
|
|
f30_local3 = f30_arg0 .. f30_local0
|
|
else
|
|
f30_local3 = f30_local2 .. f30_local1
|
|
if f30_local2 >= 16 then
|
|
f30_local3 = max_text
|
|
end
|
|
end
|
|
else
|
|
f30_arg0 = f30_arg0 - f30_local2 * 60
|
|
if f30_arg0 >= 10 then
|
|
f30_local3 = f30_local2 .. ":" .. f30_arg0
|
|
else
|
|
f30_local3 = f30_local2 .. ":0" .. f30_arg0
|
|
end
|
|
end
|
|
return f30_local3
|
|
end
|
|
|
|
if Engine.UsingSplitscreenUpscaling() then
|
|
GenericMenuDims.menu_top = GenericMenuDims.menu_top - 10
|
|
GenericMenuDims.menu_bottom = GenericMenuDims.menu_top + GenericButtonSettings.Styles.GradientButton.height * 6
|
|
end
|
|
CoD.IsUsingAspectRatio = function ( f31_arg0 )
|
|
return math.abs( f31_arg0 - Engine.GetAspectRatio() ) < 0.01
|
|
end
|
|
|
|
CoD.CoDAnywhere = {
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_LAST_PLAYED = 0,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_TIME_PLAYED = 1,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER1 = 2,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER2 = 3,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER3 = 4,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER4 = 5,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER5 = 6,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER6 = 7,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER7 = 8,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER8 = 9,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER9 = 10,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER10 = 11,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER_RANK1 = 12,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER_RANK2 = 13,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER_RANK3 = 14,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER_RANK4 = 15,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER_RANK5 = 16,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER_RANK6 = 17,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER_RANK7 = 18,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER_RANK8 = 19,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER_RANK9 = 20,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_SQUAD_MEMBER_RANK10 = 21,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_TOKENS_EARNED = 22,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_TOKENS_AVAILABLE = 23,
|
|
COD_ANYWHERE_PLATFORM_TEXT_TYPE_PLATFORM_NAME = 24
|
|
}
|