250 lines
5.4 KiB
Lua
250 lines
5.4 KiB
Lua
local f0_local0 = module
|
|
local f0_local1, f0_local2 = ...
|
|
f0_local0( f0_local1, package.seeall )
|
|
CoD.PrintModuleLoad( _NAME )
|
|
f0_local0 = {
|
|
"one",
|
|
"two",
|
|
"three",
|
|
"four"
|
|
}
|
|
f0_local1 = 500
|
|
f0_local2 = 1000
|
|
local f0_local3 = {
|
|
101,
|
|
127,
|
|
139,
|
|
149,
|
|
167,
|
|
191,
|
|
241
|
|
}
|
|
local f0_local4 = 20
|
|
local f0_local5 = function ( f1_arg0, f1_arg1 )
|
|
if f1_arg0.current_state ~= "default" then
|
|
f1_arg0:animateToState( "default", 0 )
|
|
f1_arg0.current_state = "default"
|
|
end
|
|
end
|
|
|
|
local f0_local6 = function ( f2_arg0 )
|
|
return f2_arg0[math.random( 1, #f2_arg0 )]
|
|
end
|
|
|
|
local f0_local7 = function ( f3_arg0, f3_arg1 )
|
|
local f3_local0 = {}
|
|
local f3_local1 = math.random( 0, 2 )
|
|
for f3_local2 = 0, f3_local1, 1 do
|
|
local f3_local5 = f3_local2
|
|
local f3_local6 = table.insert
|
|
local f3_local7 = f3_local0
|
|
local f3_local8 = {}
|
|
local f3_local9 = f0_local6( f0_local0 )
|
|
local f3_local10 = f0_local6( f0_local3 )
|
|
f3_local6( f3_local7, f3_local9 )
|
|
end
|
|
local f3_local2 = table.insert
|
|
local f3_local3 = f3_local0
|
|
local f3_local4 = {}
|
|
local f3_local5 = f0_local6( f0_local0 )
|
|
local f3_local6 = math.random( f0_local1, f0_local2 )
|
|
f3_local2( f3_local3, f3_local5 )
|
|
f3_local1 = math.random( 2, 4 )
|
|
for f3_local2 = 0, f3_local1, 1 do
|
|
f3_local5 = f3_local2
|
|
f3_local6 = table.insert
|
|
local f3_local7 = f3_local0
|
|
local f3_local8 = {}
|
|
local f3_local9 = f0_local6( f0_local0 )
|
|
local f3_local10 = f0_local6( f0_local3 )
|
|
f3_local6( f3_local7, f3_local9 )
|
|
end
|
|
f3_local3 = MBh.AnimateSequence( f3_local0 )
|
|
f3_local3( f3_arg0 )
|
|
end
|
|
|
|
function GetStaticSequence( f4_arg0 )
|
|
local f4_local0 = {}
|
|
for f4_local1 = 0, f4_arg0, 1 do
|
|
local f4_local4 = f4_local1
|
|
local f4_local5 = table.insert
|
|
local f4_local6 = f4_local0
|
|
local f4_local7 = {}
|
|
local f4_local8 = f0_local6( f0_local0 )
|
|
local f4_local9 = f0_local6( kVeryShortFlickerTimes )
|
|
f4_local5( f4_local6, f4_local8 )
|
|
end
|
|
return f4_local0
|
|
end
|
|
|
|
local f0_local8 = function ( f5_arg0, f5_arg1 )
|
|
local f5_local0 = MBh.AnimateSequence( GetStaticSequence( math.random( 3, 6 ) ) )
|
|
f5_local0( f5_arg0 )
|
|
end
|
|
|
|
local f0_local9 = function ()
|
|
return {
|
|
type = "UIElement",
|
|
id = "jammerEffectArtifact",
|
|
states = {
|
|
default = {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
alpha = f0_local4
|
|
}
|
|
},
|
|
children = {
|
|
{
|
|
type = "UIImage",
|
|
id = "jammerArtifactId",
|
|
states = {
|
|
default = {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
material = RegisterMaterial( "digidam_artifacts_1" ),
|
|
alpha = 0
|
|
},
|
|
active = {
|
|
alpha = 1
|
|
},
|
|
one = {
|
|
material = RegisterMaterial( "digidam_artifacts_1" ),
|
|
alpha = 1
|
|
},
|
|
two = {
|
|
material = RegisterMaterial( "digidam_artifacts_2" ),
|
|
alpha = 1
|
|
},
|
|
three = {
|
|
material = RegisterMaterial( "digidam_artifacts_3" ),
|
|
alpha = 1
|
|
},
|
|
four = {
|
|
material = RegisterMaterial( "digidam_artifacts_6" ),
|
|
alpha = 1
|
|
}
|
|
},
|
|
handlers = {
|
|
hud_static_on = f0_local7,
|
|
hud_static_off = MBh.AnimateToState( "default" ),
|
|
hud_off = MBh.AnimateToState( "default" )
|
|
}
|
|
}
|
|
}
|
|
}
|
|
end
|
|
|
|
local f0_local10 = function ()
|
|
return {
|
|
type = "UIElement",
|
|
id = "jammerEffectStatic",
|
|
states = {
|
|
default = {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
alpha = f0_local4
|
|
}
|
|
},
|
|
children = {
|
|
{
|
|
type = "UIImage",
|
|
id = "jammerStaticId",
|
|
states = {
|
|
default = {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
material = RegisterMaterial( "white" ),
|
|
alpha = 0
|
|
},
|
|
base = {
|
|
material = RegisterMaterial( "digidam_static_1" ),
|
|
alpha = 0
|
|
},
|
|
one = {
|
|
material = RegisterMaterial( "digidam_static_1" ),
|
|
alpha = 1
|
|
},
|
|
two = {
|
|
material = RegisterMaterial( "digidam_static_2" ),
|
|
alpha = 1
|
|
},
|
|
three = {
|
|
material = RegisterMaterial( "digidam_static_3" ),
|
|
alpha = 1
|
|
},
|
|
four = {
|
|
material = RegisterMaterial( "digidam_static_4" ),
|
|
alpha = 1
|
|
}
|
|
},
|
|
handlers = {
|
|
hud_static_on = f0_local8,
|
|
hud_static_off = MBh.AnimateToState( "default" ),
|
|
hud_off = MBh.AnimateToState( "default" )
|
|
}
|
|
}
|
|
}
|
|
}
|
|
end
|
|
|
|
local f0_local11 = function ()
|
|
return {
|
|
type = "UIElement",
|
|
id = "jammerEffectNoSignal",
|
|
states = {
|
|
default = {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
alpha = 0
|
|
},
|
|
active = {
|
|
alpha = f0_local4
|
|
}
|
|
},
|
|
handlers = {
|
|
hud_nosignal_on = MBh.AnimateToState( "active", 0.5 ),
|
|
hud_nosignal_off = MBh.AnimateToState( "default", 0.25 ),
|
|
hud_off = MBh.AnimateToState( "default" ),
|
|
hud_on = function ( f9_arg0, f9_arg1 )
|
|
if Game.GetOmnvar( "ui_hud_static" ) == 3 then
|
|
f9_arg0:processEvent( {
|
|
name = "hud_nosignal_on"
|
|
} )
|
|
end
|
|
end
|
|
|
|
},
|
|
children = {
|
|
{
|
|
type = "UIImage",
|
|
id = "noSignalBgId",
|
|
states = {
|
|
default = {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
material = RegisterMaterial( "digidam_nosignal_1" ),
|
|
alpha = 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
end
|
|
|
|
LUI.MenuBuilder.registerDef( "jammerEffectArtifactDef", f0_local9 )
|
|
LUI.MenuBuilder.registerDef( "jammerEffectStaticDef", f0_local10 )
|
|
LUI.MenuBuilder.registerDef( "jammerEffectNoSignalDef", f0_local11 )
|
|
LockTable( _M )
|