1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-18 11:08:26 -05:00

Maxis Drone: buildable table model changes

Maxis Drone: fix new script_model spawning everytime buildable table trigger is touched
This commit is contained in:
Jbleezy
2023-03-30 02:24:08 -07:00
parent 707e513b6a
commit a6f763f307
3 changed files with 62 additions and 5 deletions

View File

@ -13,6 +13,44 @@
#include maps\mp\zombies\_zm_equipment;
#include maps\mp\zm_tomb_craftables;
init_craftables()
{
precachemodel( "p6_zm_tm_quadrotor_stand" );
flag_init( "quadrotor_cooling_down" );
level.craftable_piece_count = 4;
flag_init( "any_crystal_picked_up" );
flag_init( "staff_air_zm_enabled" );
flag_init( "staff_fire_zm_enabled" );
flag_init( "staff_lightning_zm_enabled" );
flag_init( "staff_water_zm_enabled" );
register_clientfields();
add_zombie_craftable( "equip_dieseldrone_zm", &"ZM_TOMB_CRQ", &"ZM_TOMB_CRQ", &"ZM_TOMB_TQ", ::onfullycrafted_quadrotor, 1 );
add_zombie_craftable_vox_category( "equip_dieseldrone_zm", "build_dd" );
make_zombie_craftable_open( "equip_dieseldrone_zm", "veh_t6_dlc_zm_quadrotor", ( 0, 0, 0 ), ( 0, -4, 10 ) );
add_zombie_craftable( "tomb_shield_zm", &"ZM_TOMB_CRRI", undefined, &"ZOMBIE_BOUGHT_RIOT", undefined, 1 );
add_zombie_craftable_vox_category( "tomb_shield_zm", "build_zs" );
make_zombie_craftable_open( "tomb_shield_zm", "t6_wpn_zmb_shield_dlc4_dmg0_world", vectorscale( ( 0, -1, 0 ), 90.0 ), ( 0, 0, level.riotshield_placement_zoffset ) );
add_zombie_craftable( "elemental_staff_fire", &"ZM_TOMB_CRF", &"ZM_TOMB_INS", &"ZM_TOMB_BOF", ::staff_fire_fullycrafted, 1 );
add_zombie_craftable_vox_category( "elemental_staff_fire", "fire_staff" );
add_zombie_craftable( "elemental_staff_air", &"ZM_TOMB_CRA", &"ZM_TOMB_INS", &"ZM_TOMB_BOA", ::staff_air_fullycrafted, 1 );
add_zombie_craftable_vox_category( "elemental_staff_air", "air_staff" );
add_zombie_craftable( "elemental_staff_lightning", &"ZM_TOMB_CRL", &"ZM_TOMB_INS", &"ZM_TOMB_BOL", ::staff_lightning_fullycrafted, 1 );
add_zombie_craftable_vox_category( "elemental_staff_lightning", "light_staff" );
add_zombie_craftable( "elemental_staff_water", &"ZM_TOMB_CRW", &"ZM_TOMB_INS", &"ZM_TOMB_BOW", ::staff_water_fullycrafted, 1 );
add_zombie_craftable_vox_category( "elemental_staff_water", "ice_staff" );
add_zombie_craftable( "gramophone", &"ZM_TOMB_CRAFT_GRAMOPHONE", &"ZM_TOMB_CRAFT_GRAMOPHONE", &"ZM_TOMB_BOUGHT_GRAMOPHONE", undefined, 0 );
add_zombie_craftable_vox_category( "gramophone", "gramophone" );
level.zombie_craftable_persistent_weapon = ::tomb_check_crafted_weapon_persistence;
level.custom_craftable_validation = ::tomb_custom_craftable_validation;
level.zombie_custom_equipment_setup = ::setup_quadrotor_purchase;
level thread hide_staff_model();
level.quadrotor_status = spawnstruct();
level.quadrotor_status.crafted = 0;
level.quadrotor_status.picked_up = 0;
level.num_staffpieces_picked_up = [];
level.n_staffs_crafted = 0;
}
include_craftables()
{
level thread run_craftables_devgui();
@ -151,6 +189,26 @@ include_craftables()
level thread craftable_add_glow_fx();
}
onfullycrafted_quadrotor( player )
{
if (is_true(level.quadrotor_status.crafted))
{
return 1;
}
level.quadrotor_status.crafted = 1;
pickup_trig = level.quadrotor_status.pickup_trig;
level.quadrotor_status.str_zone = maps\mp\zombies\_zm_zonemgr::get_zone_from_position( pickup_trig.origin, 1 );
level.quadrotor_status.pickup_indicator = spawn( "script_model", pickup_trig.model.origin + vectorscale( ( 0, 0, -1 ), 10.0 ) );
level.quadrotor_status.pickup_indicator.angles = pickup_trig.model.angles;
level.quadrotor_status.pickup_indicator setmodel( "p6_zm_tm_quadrotor_stand" );
pickup_trig.model.origin += (0, 0, 6.5);
pickup_trig.model.angles += (0, -90, 0);
level notify( "quest_progressed", player, 1 );
return 1;
}
quadrotor_control_thread()
{
self endon( "bled_out" );

View File

@ -36,8 +36,8 @@ main()
replaceFunc(maps\mp\zm_tomb_ee_main_step_2::remove_plinth, scripts\zm\replaced\zm_tomb_ee_main_step_2::remove_plinth);
replaceFunc(maps\mp\zm_tomb_ee_main_step_3::fire_link_cooldown, scripts\zm\replaced\zm_tomb_ee_main_step_3::fire_link_cooldown);
replaceFunc(maps\mp\zm_tomb_challenges::challenges_init, scripts\zm\replaced\zm_tomb_challenges::challenges_init);
replaceFunc(maps\mp\zm_tomb_craftables::init_craftables, scripts\zm\replaced\zm_tomb_craftables::init_craftables);
replaceFunc(maps\mp\zm_tomb_craftables::include_craftables, scripts\zm\replaced\zm_tomb_craftables::include_craftables);
replaceFunc(maps\mp\zm_tomb_craftables::quadrotor_control_thread, scripts\zm\replaced\zm_tomb_craftables::quadrotor_control_thread);
replaceFunc(maps\mp\zm_tomb_dig::init_shovel, scripts\zm\replaced\zm_tomb_dig::init_shovel);
replaceFunc(maps\mp\zm_tomb_dig::increment_player_perk_purchase_limit, scripts\zm\replaced\zm_tomb_dig::increment_player_perk_purchase_limit);
replaceFunc(maps\mp\zm_tomb_tank::players_on_tank_update, scripts\zm\replaced\zm_tomb_tank::players_on_tank_update);
@ -59,9 +59,6 @@ init()
level.zombie_init_done = ::zombie_init_done;
level.special_weapon_magicbox_check = ::tomb_special_weapon_magicbox_check;
level.custom_magic_box_timer_til_despawn = ::custom_magic_box_timer_til_despawn;
level.zombie_craftable_persistent_weapon = scripts\zm\replaced\zm_tomb_craftables::tomb_check_crafted_weapon_persistence;
level.custom_craftable_validation = scripts\zm\replaced\zm_tomb_craftables::tomb_custom_craftable_validation;
level.zombie_custom_equipment_setup = scripts\zm\replaced\zm_tomb_craftables::setup_quadrotor_purchase;
change_stargate_teleport_return_player_angles();