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

Buildables: fix hint string showing at unavailable table

This commit is contained in:
Jbleezy
2023-05-06 01:55:48 -07:00
parent 25cee499a0
commit 14780401c0
3 changed files with 33 additions and 0 deletions

View File

@ -177,4 +177,35 @@ player_progress_bar_update( start_time, craft_time )
{
wait 0.05;
}
}
update_open_table_status()
{
thread update_open_table_status_actual();
}
update_open_table_status_actual()
{
wait 0.05; // wait for .crafted to be set
b_open_craftables_remaining = 0;
foreach ( uts_craftable in level.a_uts_craftables )
{
if ( is_true( uts_craftable.craftablestub.is_open_table ) && !is_true( uts_craftable.crafted ) && uts_craftable.craftablespawn.craftable_name != "open_table" && uts_craftable.craftablespawn craftable_can_use_shared_piece() )
{
b_open_craftables_remaining++;
}
}
if ( !b_open_craftables_remaining )
{
foreach ( uts_craftable in level.a_uts_craftables )
{
if ( uts_craftable.craftablespawn.craftable_name == "open_table" )
{
thread maps\mp\zombies\_zm_unitrigger::unregister_unitrigger( uts_craftable );
}
}
}
}

View File

@ -63,6 +63,7 @@ main()
replaceFunc(maps\mp\zombies\_zm_craftables::choose_open_craftable, scripts\zm\replaced\_zm_craftables::choose_open_craftable);
replaceFunc(maps\mp\zombies\_zm_craftables::craftable_use_hold_think_internal, scripts\zm\replaced\_zm_craftables::craftable_use_hold_think_internal);
replaceFunc(maps\mp\zombies\_zm_craftables::player_progress_bar_update, scripts\zm\replaced\_zm_craftables::player_progress_bar_update);
replaceFunc(maps\mp\zombies\_zm_craftables::update_open_table_status, scripts\zm\replaced\_zm_craftables::update_open_table_status);
replaceFunc(maps\mp\zombies\_zm_riotshield_prison::doriotshielddeploy, scripts\zm\replaced\_zm_riotshield_prison::doriotshielddeploy);
replaceFunc(maps\mp\zombies\_zm_riotshield_prison::trackriotshield, scripts\zm\replaced\_zm_riotshield_prison::trackriotshield);
replaceFunc(maps\mp\zombies\_zm_weap_riotshield_prison::init, scripts\zm\replaced\_zm_weap_riotshield_prison::init);

View File

@ -77,6 +77,7 @@ main()
replaceFunc(maps\mp\zombies\_zm_craftables::choose_open_craftable, scripts\zm\replaced\_zm_craftables::choose_open_craftable);
replaceFunc(maps\mp\zombies\_zm_craftables::craftable_use_hold_think_internal, scripts\zm\replaced\_zm_craftables::craftable_use_hold_think_internal);
replaceFunc(maps\mp\zombies\_zm_craftables::player_progress_bar_update, scripts\zm\replaced\_zm_craftables::player_progress_bar_update);
replaceFunc(maps\mp\zombies\_zm_craftables::update_open_table_status, scripts\zm\replaced\_zm_craftables::update_open_table_status);
replaceFunc(maps\mp\zombies\_zm_perk_random::trigger_visible_to_player, scripts\zm\replaced\_zm_perk_random::trigger_visible_to_player);
replaceFunc(maps\mp\zombies\_zm_powerup_zombie_blood::zombie_blood_powerup, scripts\zm\replaced\_zm_powerup_zombie_blood::zombie_blood_powerup);
replaceFunc(maps\mp\zombies\_zm_riotshield_tomb::doriotshielddeploy, scripts\zm\replaced\_zm_riotshield_tomb::doriotshielddeploy);