1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-10 15:17:57 -05:00

Pad empty lines around blocks

This commit is contained in:
Jbleezy
2023-12-16 16:12:15 -08:00
parent 7d83382fd3
commit 51a53928e7
82 changed files with 1013 additions and 0 deletions

View File

@ -19,6 +19,7 @@ struct_class_init()
level.struct_class_names[ "script_noteworthy" ] = [];
level.struct_class_names[ "script_linkname" ] = [];
level.struct_class_names[ "script_unitrigger_type" ] = [];
foreach ( s_struct in level.struct )
{
if ( isDefined( s_struct.targetname ) )
@ -27,43 +28,53 @@ struct_class_init()
{
level.struct_class_names[ "targetname" ][ s_struct.targetname ] = [];
}
size = level.struct_class_names[ "targetname" ][ s_struct.targetname ].size;
level.struct_class_names[ "targetname" ][ s_struct.targetname ][ size ] = s_struct;
}
if ( isDefined( s_struct.target ) )
{
if ( !isDefined( level.struct_class_names[ "target" ][ s_struct.target ] ) )
{
level.struct_class_names[ "target" ][ s_struct.target ] = [];
}
size = level.struct_class_names[ "target" ][ s_struct.target ].size;
level.struct_class_names[ "target" ][ s_struct.target ][ size ] = s_struct;
}
if ( isDefined( s_struct.script_noteworthy ) )
{
if ( !isDefined( level.struct_class_names[ "script_noteworthy" ][ s_struct.script_noteworthy ] ) )
{
level.struct_class_names[ "script_noteworthy" ][ s_struct.script_noteworthy ] = [];
}
size = level.struct_class_names[ "script_noteworthy" ][ s_struct.script_noteworthy ].size;
level.struct_class_names[ "script_noteworthy" ][ s_struct.script_noteworthy ][ size ] = s_struct;
}
if ( isDefined( s_struct.script_linkname ) )
{
level.struct_class_names[ "script_linkname" ][ s_struct.script_linkname ][ 0 ] = s_struct;
}
if ( isDefined( s_struct.script_unitrigger_type ) )
{
if ( !isDefined( level.struct_class_names[ "script_unitrigger_type" ][ s_struct.script_unitrigger_type ] ) )
{
level.struct_class_names[ "script_unitrigger_type" ][ s_struct.script_unitrigger_type ] = [];
}
size = level.struct_class_names[ "script_unitrigger_type" ][ s_struct.script_unitrigger_type ].size;
level.struct_class_names[ "script_unitrigger_type" ][ s_struct.script_unitrigger_type ][ size ] = s_struct;
}
}
gametype = getDvar( "g_gametype" );
location = getDvar( "ui_zm_mapstartlocation" );
if ( array_validate( level.add_struct_gamemode_location_funcs ) )
{
if ( array_validate( level.add_struct_gamemode_location_funcs[ gametype ] ) )
@ -87,37 +98,45 @@ add_struct( s_struct )
{
level.struct_class_names[ "targetname" ][ s_struct.targetname ] = [];
}
size = level.struct_class_names[ "targetname" ][ s_struct.targetname ].size;
level.struct_class_names[ "targetname" ][ s_struct.targetname ][ size ] = s_struct;
}
if ( isDefined( s_struct.script_noteworthy ) )
{
if ( !isDefined( level.struct_class_names[ "script_noteworthy" ][ s_struct.script_noteworthy ] ) )
{
level.struct_class_names[ "script_noteworthy" ][ s_struct.script_noteworthy ] = [];
}
size = level.struct_class_names[ "script_noteworthy" ][ s_struct.script_noteworthy ].size;
level.struct_class_names[ "script_noteworthy" ][ s_struct.script_noteworthy ][ size ] = s_struct;
}
if ( isDefined( s_struct.target ) )
{
if ( !isDefined( level.struct_class_names[ "target" ][ s_struct.target ] ) )
{
level.struct_class_names[ "target" ][ s_struct.target ] = [];
}
size = level.struct_class_names[ "target" ][ s_struct.target ].size;
level.struct_class_names[ "target" ][ s_struct.target ][ size ] = s_struct;
}
if ( isDefined( s_struct.script_linkname ) )
{
level.struct_class_names[ "script_linkname" ][ s_struct.script_linkname ][ 0 ] = s_struct;
}
if ( isDefined( s_struct.script_unitrigger_type ) )
{
if ( !isDefined( level.struct_class_names[ "script_unitrigger_type" ][ s_struct.script_unitrigger_type ] ) )
{
level.struct_class_names[ "script_unitrigger_type" ][ s_struct.script_unitrigger_type ] = [];
}
size = level.struct_class_names[ "script_unitrigger_type" ][ s_struct.script_unitrigger_type ].size;
level.struct_class_names[ "script_unitrigger_type" ][ s_struct.script_unitrigger_type ][ size ] = s_struct;
}
@ -185,6 +204,7 @@ wallbuy( weapon_name, target, targetname, origin, angles, play_chalk_fx = 1 )
unitrigger_stub.angles = angles;
model_name = undefined;
if ( weapon_name == "sticky_grenade_zm" )
{
model_name = "semtex_bag";
@ -217,6 +237,7 @@ wallbuy( weapon_name, target, targetname, origin, angles, play_chalk_fx = 1 )
if ( unitrigger_stub.targetname == "weapon_upgrade" )
{
unitrigger_stub.cost = get_weapon_cost( weapon_name );
if ( !is_true( level.monolingustic_prompt_format ) )
{
unitrigger_stub.hint_string = get_weapon_hint( weapon_name );
@ -225,10 +246,12 @@ wallbuy( weapon_name, target, targetname, origin, angles, play_chalk_fx = 1 )
else
{
unitrigger_stub.hint_parm1 = get_weapon_display_name( weapon_name );
if ( !isDefined( unitrigger_stub.hint_parm1 ) || unitrigger_stub.hint_parm1 == "" || unitrigger_stub.hint_parm1 == "none" )
{
unitrigger_stub.hint_parm1 = "missing weapon name " + weapon_name;
}
unitrigger_stub.hint_parm2 = unitrigger_stub.cost;
unitrigger_stub.hint_string = &"ZOMBIE_WEAPONCOSTONLY";
}
@ -244,6 +267,7 @@ wallbuy( weapon_name, target, targetname, origin, angles, play_chalk_fx = 1 )
if ( is_melee_weapon( weapon_name ) )
{
melee_weapon = undefined;
foreach(melee_weapon in level._melee_weapons)
{
if(melee_weapon.weapon_name == weapon_name)
@ -330,6 +354,7 @@ playchalkfx( effect, origin, angles )
wallbuy_grenade_model_fix()
{
model = getent(self.target, "targetname");
if(!isDefined(model))
{
return;
@ -347,13 +372,16 @@ barrier( model, origin, angles, not_solid )
level.survival_barriers = [];
level.survival_barriers_index = 0;
}
level.survival_barriers[ level.survival_barriers_index ] = spawn( "script_model", origin );
level.survival_barriers[ level.survival_barriers_index ] setModel( model );
level.survival_barriers[ level.survival_barriers_index ] rotateTo( angles, 0.1 );
if ( is_true( not_solid ) )
{
level.survival_barriers[ level.survival_barriers_index ] notSolid();
}
level.survival_barriers_index++;
}
@ -363,13 +391,16 @@ add_struct_location_gamemode_func( gametype, location, func )
{
level.add_struct_gamemode_location_funcs = [];
}
if ( !isDefined( level.add_struct_gamemode_location_funcs[ gametype ] ) )
{
level.add_struct_gamemode_location_funcs[ gametype ] = [];
}
if ( !isDefined( level.add_struct_gamemode_location_funcs[ gametype ][ location ] ) )
{
level.add_struct_gamemode_location_funcs[ gametype ][ location ] = [];
}
level.add_struct_gamemode_location_funcs[ gametype ][ location ][ level.add_struct_gamemode_location_funcs[ gametype ][ location ].size ] = func;
}