1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-24 06:00:36 -05:00

Tranzit: add Diner location

From JezuzLizard
Remove hatch access
Remove Stamin-Up
Remove Tombstone
Remove Pack-a-Punch
Remove 2nd Mystery Box location
Add general code for adding other locations
This commit is contained in:
Jbleezy
2022-01-09 04:48:30 -08:00
parent 0c8bd003b5
commit c14952b608
6 changed files with 577 additions and 0 deletions

177
scripts/zm/locs/common.gsc Normal file
View File

@ -0,0 +1,177 @@
#include maps/mp/_utility;
#include maps/mp/zombies/_zm_utility;
#include common_scripts/utility;
common_init()
{
level.create_spawner_list_func = ::create_spawner_list;
level.enemy_location_override_func = ::enemy_location_override;
flag_wait( "initial_blackscreen_passed" );
maps/mp/zombies/_zm_game_module::turn_power_on_and_open_doors();
flag_wait( "start_zombie_round_logic" );
wait 1;
level notify( "revive_on" );
wait_network_frame();
level notify( "doubletap_on" );
wait_network_frame();
level notify( "marathon_on" );
wait_network_frame();
level notify( "juggernog_on" );
wait_network_frame();
level notify( "sleight_on" );
wait_network_frame();
level notify( "tombstone_on" );
wait_network_frame();
level notify( "Pack_A_Punch_on" );
}
enemy_location_override( zombie, enemy )
{
location = enemy.origin;
if ( is_true( self.reroute ) )
{
if ( isDefined( self.reroute_origin ) )
{
location = self.reroute_origin;
}
}
return location;
}
create_spawner_list( zkeys )
{
level.zombie_spawn_locations = [];
level.inert_locations = [];
level.enemy_dog_locations = [];
level.zombie_screecher_locations = [];
level.zombie_avogadro_locations = [];
level.quad_locations = [];
level.zombie_leaper_locations = [];
level.zombie_astro_locations = [];
level.zombie_brutus_locations = [];
level.zombie_mechz_locations = [];
level.zombie_napalm_locations = [];
for ( z = 0; z < zkeys.size; z++ )
{
zone = level.zones[ zkeys[ z ] ];
if ( zone.is_enabled && zone.is_active && zone.is_spawning_allowed )
{
i = 0;
while ( i < zone.spawn_locations.size )
{
if ( !is_true( zone.spawn_locations[ i ].checked ) )
{
if ( zone.spawn_locations[ i ].origin == ( 8394, -2545, -205.16 ) )
{
zone.spawn_locations[ i ].is_enabled = false;
}
else if ( zone.spawn_locations[ i ].origin == ( 10705, 7347, -576 ) )
{
zone.spawn_locations[ i ].is_enabled = false;
}
else if ( zone.spawn_locations[ i ].origin == ( 10015, 6931, -571.7 ) )
{
zone.spawn_locations[ i ].origin = ( 10249.4, 7691.71, -569.875 );
}
else if ( zone.spawn_locations[ i ].origin == ( 9339, 6411, -566.9 ) )
{
zone.spawn_locations[ i ].origin = ( 9993.29, 7486.83, -582.875 );
}
else if ( zone.spawn_locations[ i ].origin == ( 9914, 8408, -576 ) )
{
zone.spawn_locations[ i ].origin = ( 9993.29, 7550, -582.875 );
}
else if ( zone.spawn_locations[ i ].origin == ( 9429, 5281, -539.6 ) )
{
zone.spawn_locations[ i ].is_enabled = false;
}
else if ( zone.spawn_locations[ i ].origin == ( 10015, 6931, -571.7 ) )
{
zone.spawn_locations[ i ].is_enabled = false;
}
else if ( zone.spawn_locations[ i ].origin == ( 13019.1, 7382.5, -754 ) )
{
zone.spawn_locations[ i ].is_enabled = false;
}
else if ( zone.spawn_locations[ i ].origin == ( -3825, -6576, -52.7 ) )
{
zone.spawn_locations[ i ].origin = ( -4061.03, -6754.44, -58.0897 );
}
else if ( zone.spawn_locations[ i ].origin == ( -3450, -6559, -51.9 ) )
{
zone.spawn_locations[ i ].origin = ( -4060.93, -6968.64, -65.3446 );
}
else if ( zone.spawn_locations[ i ].origin == ( -4165, -6098, -64 ) )
{
zone.spawn_locations[ i ].origin = ( -4239.78, -6902.81, -57.0494 );
}
else if ( zone.spawn_locations[ i ].origin == ( -5058, -5902, -73.4 ) )
{
zone.spawn_locations[ i ].origin = ( -4846.77, -6906.38, 54.8145 );
}
else if ( zone.spawn_locations[ i ].origin == ( -6462, -7159, -64 ) )
{
zone.spawn_locations[ i ].origin = ( -6201.18, -7107.83, -59.7182 );
}
else if ( zone.spawn_locations[ i ].origin == ( -5130, -6512, -35.4 ) )
{
zone.spawn_locations[ i ].origin = ( -5396.36, -6801.88, -60.0821 );
}
else if ( zone.spawn_locations[ i ].origin == ( -6531, -6613, -54.4 ) )
{
zone.spawn_locations[ i ].origin = ( -6116.62, -6586.81, -50.8905 );
}
else if ( zone.spawn_locations[ i ].origin == ( -5373, -6231, -51.9 ) )
{
zone.spawn_locations[ i ].origin = ( -4827.92, -7137.19, -62.9082 );
}
else if ( zone.spawn_locations[ i ].origin == ( -5752, -6230, -53.4 ) )
{
zone.spawn_locations[ i ].origin = ( -5572.47, -6426, -39.1894 );
}
else if ( zone.spawn_locations[ i ].origin == ( -5540, -6508, -42 ) )
{
zone.spawn_locations[ i ].origin = ( -5789.51, -6935.81, -57.875 );
}
else if ( zone.spawn_locations[ i ].origin == ( -11093 , 393 , 192 ) )
{
zone.spawn_locations[ i ].origin = ( -11431.3, -644.496, 192.125 );
}
else if ( zone.spawn_locations[ i ].origin == ( -10944, -3846, 221.14 ) )
{
zone.spawn_locations[ i ].origin = ( -11351.7, -1988.58, 184.125 );
}
else if ( zone.spawn_locations[ i ].origin == ( -11251, -4397, 200.02 ) )
{
zone.spawn_locations[ i ].origin = ( -11431.3, -644.496, 192.125 );
}
else if ( zone.spawn_locations[ i ].origin == ( -11334 , -5280, 212.7 ) )
{
zone.spawn_locations[ i ].origin = ( -11600.6, -1918.41, 192.125 );
zone.spawn_locations[ i ].script_noteworthy = "riser_location";
}
else if (zone.spawn_locations[ i ].origin == ( -10836, 1195, 209.7 ) )
{
zone.spawn_locations[ i ].origin = ( -11241.2, -1118.76, 184.125 );
}
else if ( zone.spawn_locations[ i ].targetname == "zone_trans_diner_spawners")
{
zone.spawn_locations[ i ].is_enabled = false;
}
else
{
zone.spawn_locations[ i ].is_enabled = true;
}
zone.spawn_locations[ i ].checked = true;
}
if ( !is_true( zone.spawn_locations[ i ].is_enabled ) )
{
i++;
continue;
}
level.zombie_spawn_locations[ level.zombie_spawn_locations.size ] = zone.spawn_locations[ i ];
i++;
}
}
}
}

View File

@ -0,0 +1,70 @@
#include maps/mp/zombies/_zm_game_module;
#include maps/mp/zombies/_zm_utility;
#include common_scripts/utility;
#include maps/mp/_utility;
#include maps/mp/zombies/_zm;
#include scripts/zm/main/_gametype_setup;
#include scripts/zm/locs/common;
struct_init()
{
if ( !is_true( level.ctsm_disable_custom_perk_locations ) )
{
scripts/zm/replaced/utility::register_perk_struct( "specialty_armorvest", "zombie_vending_jugg", ( 0, 176, 0 ), ( -3634, -7464, -58 ) );
scripts/zm/replaced/utility::register_perk_struct( "specialty_quickrevive", "zombie_vending_quickrevive", ( 0, 137, 0 ), ( -5424, -7920, -64 ) );
scripts/zm/replaced/utility::register_perk_struct( "specialty_fastreload", "zombie_vending_sleight", ( 0, 270, 0 ), ( -5470, -7859.5, 0 ) );
scripts/zm/replaced/utility::register_perk_struct( "specialty_rof", "zombie_vending_doubletap2", ( 0, -90, 0 ), ( -4170, -7610, -61 ) );
}
coordinates = array( ( -3991, -7317, -63 ), ( -4231, -7395, -60 ), ( -4127, -6757, -54 ), ( -4465, -7346, -58 ),
( -5770, -6600, -55 ), ( -6135, -6671, -56 ), ( -6182, -7120, -60 ), ( -5882, -7174, -61 ) );
angles = array( ( 0, 161, 0 ), ( 0, 120, 0 ), ( 0, 217, 0 ), ( 0, 173, 0 ), ( 0, -106, 0 ), ( 0, -46, 0 ), ( 0, 51, 0 ), ( 0, 99, 0 ) );
for ( i = 0; i < coordinates.size; i++ )
{
scripts/zm/replaced/utility::register_map_initial_spawnpoint( coordinates[ i ], angles[ i ] );
}
gameObjects = getEntArray( "script_model", "classname" );
foreach ( object in gameObjects )
{
if ( object.script_gameobjectname == "zcleansed zturned" )
{
object.script_gameobjectname = "zstandard zgrief zcleansed zturned";
}
}
}
precache()
{
}
main()
{
treasure_chest_init();
init_wallbuys();
init_barriers();
scripts/zm/locs/common::common_init();
}
treasure_chest_init()
{
chests = getstructarray( "treasure_chest_use", "targetname" );
level.chests = [];
level.chests[0] = chests[3];
maps/mp/zombies/_zm_magicbox::treasure_chest_init( "start_chest" );
}
init_wallbuys()
{
scripts/zm/replaced/utility::wallbuy( ( 0, 0, 0 ), ( -4280, -7486, -5 ), "m14_zm_fx", "m14_zm", "t6_wpn_ar_m14_world", "m14", "weapon_upgrade" );
scripts/zm/replaced/utility::wallbuy( ( 0, 0, 0 ), ( -5085, -7807, -5 ), "rottweil72_zm_fx", "rottweil72_zm", "t6_wpn_shotty_olympia_world", "olympia", "weapon_upgrade" );
scripts/zm/replaced/utility::wallbuy( ( 0, 180, 0 ), ( -3578, -7181, 0 ), "m16_zm_fx", "m16_zm", "t6_wpn_ar_m16a2_world", "m16", "weapon_upgrade" );
scripts/zm/replaced/utility::wallbuy( ( 0, 1, 0 ), ( -5489, -7982.7, 62 ), "mp5k_zm_fx", "mp5k_zm", "t6_wpn_smg_mp5_world", "mp5", "weapon_upgrade" );
}
init_barriers()
{
precacheModel( "zm_collision_transit_diner_survival" );
collision = spawn( "script_model", ( -5000, -6700, 0 ), 1 );
collision setmodel( "zm_collision_transit_diner_survival" );
collision disconnectpaths();
}