mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-10 15:17:57 -05:00
Convert buildable strings to localized strings
This commit is contained in:
@ -2957,8 +2957,6 @@ buildbuildable(buildable, craft = 0, solo_pool = 0, onuse)
|
||||
{
|
||||
scripts\zm\replaced\_zm_buildables_pooled::add_buildable_to_pool(stub, level.script);
|
||||
}
|
||||
|
||||
level.zombie_buildables[stub.equipname].hint = "Hold ^3[{+activate}]^7 to craft " + stub get_equipment_display_name();
|
||||
}
|
||||
|
||||
foreach (piece in stub.buildablezone.pieces)
|
||||
@ -2972,56 +2970,6 @@ buildbuildable(buildable, craft = 0, solo_pool = 0, onuse)
|
||||
}
|
||||
}
|
||||
|
||||
get_equipment_display_name()
|
||||
{
|
||||
if (self.equipname == "turbine")
|
||||
{
|
||||
return "Turbine";
|
||||
}
|
||||
else if (self.equipname == "turret")
|
||||
{
|
||||
return "Turret";
|
||||
}
|
||||
else if (self.equipname == "electric_trap")
|
||||
{
|
||||
return "Electric Trap";
|
||||
}
|
||||
else if (self.equipname == "riotshield_zm" || self.equipname == "alcatraz_shield_zm" || self.equipname == "tomb_shield_zm")
|
||||
{
|
||||
return "Zombie Shield";
|
||||
}
|
||||
else if (self.equipname == "jetgun_zm")
|
||||
{
|
||||
return "Jet Gun";
|
||||
}
|
||||
else if (self.equipname == "slipgun_zm")
|
||||
{
|
||||
return "Sliquifier";
|
||||
}
|
||||
else if (self.equipname == "subwoofer_zm")
|
||||
{
|
||||
return "Subsurface Resonator";
|
||||
}
|
||||
else if (self.equipname == "springpad_zm")
|
||||
{
|
||||
return "Trample Steam";
|
||||
}
|
||||
else if (self.equipname == "headchopper_zm")
|
||||
{
|
||||
return "Head Chopper";
|
||||
}
|
||||
else if (self.equipname == "buried_sq_bt_r_tower")
|
||||
{
|
||||
return "Guillotine";
|
||||
}
|
||||
else if (self.equipname == "buried_sq_bt_m_tower")
|
||||
{
|
||||
return "Noose";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
get_equipment_cost()
|
||||
{
|
||||
if (self.equipname == "turbine")
|
||||
|
@ -73,7 +73,7 @@ pooledbuildabletrigger_update_prompt(player)
|
||||
|
||||
if (can_use && is_true(self.stub.built))
|
||||
{
|
||||
self sethintstring(self.stub.hint_string, " [Cost: " + self.stub.cost + "]");
|
||||
self sethintstring(self.stub.hint_string, self.stub.cost);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -11,7 +11,7 @@ blundergat_upgrade_station()
|
||||
t_upgrade = getent("blundergat_upgrade", "targetname");
|
||||
t_upgrade.equipname = "packasplat";
|
||||
t_upgrade.cost = t_upgrade scripts\zm\_zm_reimagined::get_equipment_cost();
|
||||
t_upgrade sethintstring(&"ZM_PRISON_CONVERT_START", " [Cost: " + t_upgrade.cost + "]");
|
||||
t_upgrade sethintstring(&"ZM_PRISON_CONVERT_START", t_upgrade.cost);
|
||||
t_upgrade usetriggerrequirelookat();
|
||||
waittill_crafted("packasplat");
|
||||
m_converter = t_upgrade.m_upgrade_machine;
|
||||
@ -30,7 +30,7 @@ blundergat_upgrade_station()
|
||||
|
||||
while (true)
|
||||
{
|
||||
t_upgrade thread blundergat_change_hintstring(&"ZM_PRISON_CONVERT_START", " [Cost: " + t_upgrade.cost + "]");
|
||||
t_upgrade thread blundergat_change_hintstring(&"ZM_PRISON_CONVERT_START", t_upgrade.cost);
|
||||
|
||||
t_upgrade waittill("trigger", player);
|
||||
|
||||
|
@ -14,6 +14,122 @@
|
||||
#include maps\mp\zombies\_zm_weap_claymore;
|
||||
#include maps\mp\zombies\_zm_unitrigger;
|
||||
|
||||
init_buildables( buildablesenabledlist )
|
||||
{
|
||||
registerclientfield( "scriptmover", "buildable_glint_fx", 12000, 1, "int" );
|
||||
precacheitem( "chalk_draw_zm" );
|
||||
precacheitem( "no_hands_zm" );
|
||||
level._effect["wallbuy_replace"] = loadfx( "maps/zombie_buried/fx_buried_booze_candy_spawn" );
|
||||
level._effect["wallbuy_drawing"] = loadfx( "maps/zombie/fx_zmb_wall_dyn_chalk_drawing" );
|
||||
level.str_buildables_build = &"ZOMBIE_BUILD_SQ_COMMON";
|
||||
level.str_buildables_building = &"ZOMBIE_BUILDING_SQ_COMMON";
|
||||
level.str_buildables_grab_part = &"ZOMBIE_BUILD_PIECE_GRAB";
|
||||
level.str_buildables_swap_part = &"ZOMBIE_BUILD_PIECE_SWITCH";
|
||||
level.safe_place_for_buildable_piece = ::safe_place_for_buildable_piece;
|
||||
level.buildable_slot_count = max( 1, 2 ) + 1;
|
||||
level.buildable_clientfields = [];
|
||||
level.buildable_clientfields[0] = "buildable";
|
||||
level.buildable_clientfields[1] = "buildable" + "_pu";
|
||||
level.buildable_piece_counts = [];
|
||||
level.buildable_piece_counts[0] = 15;
|
||||
level.buildable_piece_counts[1] = 4;
|
||||
|
||||
if ( -1 )
|
||||
{
|
||||
level.buildable_clientfields[2] = "buildable" + "_sq";
|
||||
level.buildable_piece_counts[2] = 13;
|
||||
}
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "sq_common" ) )
|
||||
add_zombie_buildable( "sq_common", level.str_buildables_build, level.str_buildables_building );
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "buried_sq_tpo_switch" ) )
|
||||
add_zombie_buildable( "buried_sq_tpo_switch", level.str_buildables_build, level.str_buildables_building );
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "buried_sq_ghost_lamp" ) )
|
||||
add_zombie_buildable( "buried_sq_ghost_lamp", level.str_buildables_build, level.str_buildables_building );
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "buried_sq_bt_m_tower" ) )
|
||||
add_zombie_buildable( "buried_sq_bt_m_tower", &"ZM_BURIED_BUILD_MTOWER", level.str_buildables_building );
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "buried_sq_bt_r_tower" ) )
|
||||
add_zombie_buildable( "buried_sq_bt_r_tower", &"ZM_BURIED_BUILD_RTOWER", level.str_buildables_building );
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "buried_sq_oillamp" ) )
|
||||
add_zombie_buildable( "buried_sq_oillamp", level.str_buildables_build, level.str_buildables_building, &"NULL_EMPTY" );
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "turbine" ) )
|
||||
{
|
||||
add_zombie_buildable( "turbine", &"ZOMBIE_BUILD_TURBINE", level.str_buildables_building, &"ZOMBIE_BOUGHT_TURBINE" );
|
||||
add_zombie_buildable_vox_category( "turbine", "trb" );
|
||||
}
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "springpad_zm" ) )
|
||||
{
|
||||
add_zombie_buildable( "springpad_zm", &"ZM_BURIED_BUILD_SPRINGPAD", level.str_buildables_building, &"ZM_BURIED_BOUGHT_SPRINGPAD" );
|
||||
add_zombie_buildable_vox_category( "springpad_zm", "stm" );
|
||||
}
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "subwoofer_zm" ) )
|
||||
{
|
||||
add_zombie_buildable( "subwoofer_zm", &"ZM_BURIED_BUILD_SUBWOOFER", level.str_buildables_building, &"ZM_BURIED_BOUGHT_SUBWOOFER" );
|
||||
add_zombie_buildable_vox_category( "subwoofer_zm", "sw" );
|
||||
}
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "headchopper_zm" ) )
|
||||
{
|
||||
add_zombie_buildable( "headchopper_zm", &"ZM_BURIED_BUILD_HEADCHOPPER", level.str_buildables_building, &"ZM_BURIED_BOUGHT_HEADCHOPPER" );
|
||||
add_zombie_buildable_vox_category( "headchopper_zm", "hc" );
|
||||
}
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "booze" ) )
|
||||
{
|
||||
add_zombie_buildable( "booze", &"ZM_BURIED_LEAVE_BOOZE", level.str_buildables_building, &"NULL_EMPTY" );
|
||||
add_zombie_buildable_piece_vox_category( "booze", "booze" );
|
||||
}
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "candy" ) )
|
||||
{
|
||||
add_zombie_buildable( "candy", &"ZM_BURIED_LEAVE_CANDY", level.str_buildables_building, &"NULL_EMPTY" );
|
||||
add_zombie_buildable_piece_vox_category( "candy", "candy" );
|
||||
}
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "chalk" ) )
|
||||
{
|
||||
add_zombie_buildable( "chalk", &"NULL_EMPTY", level.str_buildables_building, &"NULL_EMPTY" );
|
||||
add_zombie_buildable_piece_vox_category( "chalk", "gunshop_chalk", 300 );
|
||||
}
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "sloth" ) )
|
||||
add_zombie_buildable( "sloth", &"ZM_BURIED_BOOZE_GV", level.str_buildables_building, &"NULL_EMPTY" );
|
||||
|
||||
if ( isinarray( buildablesenabledlist, "keys_zm" ) )
|
||||
{
|
||||
add_zombie_buildable( "keys_zm", &"ZM_BURIED_KEYS_BL", level.str_buildables_building, &"NULL_EMPTY" );
|
||||
add_zombie_buildable_piece_vox_category( "keys_zm", "key" );
|
||||
}
|
||||
|
||||
level thread chalk_host_migration();
|
||||
}
|
||||
|
||||
subwooferbuildable()
|
||||
{
|
||||
stub = maps\mp\zombies\_zm_buildables::buildable_trigger_think( "subwoofer_zm_buildable_trigger", "subwoofer_zm", "equip_subwoofer_zm", &"ZM_BURIED_GRAB_SUBWOOFER", 1, 1 );
|
||||
maps\mp\zombies\_zm_buildables_pooled::add_buildable_to_pool( stub, "buried" );
|
||||
}
|
||||
|
||||
springpadbuildable()
|
||||
{
|
||||
stub = maps\mp\zombies\_zm_buildables::buildable_trigger_think( "springpad_zm_buildable_trigger", "springpad_zm", "equip_springpad_zm", &"ZM_BURIED_GRAB_SPRINGPAD", 1, 1 );
|
||||
maps\mp\zombies\_zm_buildables_pooled::add_buildable_to_pool( stub, "buried" );
|
||||
}
|
||||
|
||||
headchopperbuildable()
|
||||
{
|
||||
stub = maps\mp\zombies\_zm_buildables::buildable_trigger_think( "headchopper_buildable_trigger", "headchopper_zm", "equip_headchopper_zm", &"ZM_BURIED_GRAB_HEADCHOPPER", 1, 1 );
|
||||
maps\mp\zombies\_zm_buildables_pooled::add_buildable_to_pool( stub, "buried" );
|
||||
}
|
||||
|
||||
watch_cell_open_close(door)
|
||||
{
|
||||
level.cell_open = 0;
|
||||
|
@ -287,7 +287,7 @@ setup_quadrotor_purchase(player)
|
||||
level thread quadrotor_watcher(player);
|
||||
player thread maps\mp\zombies\_zm_audio::create_and_play_dialog("general", "build_dd_plc");
|
||||
|
||||
self.stub.hint_string = "Took " + getWeaponDisplayName(self.stub.weaponname);
|
||||
self.stub.hint_string = &"ZM_TOMB_BOUGHT_MAXISDRONE";
|
||||
self sethintstring(self.stub.hint_string);
|
||||
|
||||
return true;
|
||||
|
@ -379,26 +379,26 @@ insert_staff_hint_charger(player, enum)
|
||||
self.playertrigger[num] endon("insert_staff_hint_charger");
|
||||
self.playertrigger[num] endon("death");
|
||||
|
||||
element = "";
|
||||
staff_hint_string = "";
|
||||
|
||||
if (enum == 1)
|
||||
{
|
||||
element = "Fire";
|
||||
staff_hint_string = &"ZM_TOMB_MISSING_FIRE_STAFF";
|
||||
}
|
||||
else if (enum == 2)
|
||||
{
|
||||
element = "Wind";
|
||||
staff_hint_string = &"ZM_TOMB_MISSING_WIND_STAFF";
|
||||
}
|
||||
else if (enum == 3)
|
||||
{
|
||||
element = "Lightning";
|
||||
staff_hint_string = &"ZM_TOMB_MISSING_LIGHTNING_STAFF";
|
||||
}
|
||||
else if (enum == 4)
|
||||
{
|
||||
element = "Ice";
|
||||
staff_hint_string = &"ZM_TOMB_MISSING_ICE_STAFF";
|
||||
}
|
||||
|
||||
self.playertrigger[num] sethintstring(element + " Staff Required");
|
||||
self.playertrigger[num] sethintstring(staff_hint_string);
|
||||
|
||||
wait 3;
|
||||
|
||||
|
@ -5,6 +5,10 @@
|
||||
main()
|
||||
{
|
||||
replaceFunc(maps\mp\zm_buried_sq::navcomputer_waitfor_navcard, scripts\zm\replaced\_zm_sq::navcomputer_waitfor_navcard);
|
||||
replaceFunc(maps\mp\zm_buried_buildables::init_buildables, scripts\zm\replaced\zm_buried_buildables::init_buildables);
|
||||
replaceFunc(maps\mp\zm_buried_buildables::subwooferbuildable, scripts\zm\replaced\zm_buried_buildables::subwooferbuildable);
|
||||
replaceFunc(maps\mp\zm_buried_buildables::springpadbuildable, scripts\zm\replaced\zm_buried_buildables::springpadbuildable);
|
||||
replaceFunc(maps\mp\zm_buried_buildables::headchopperbuildable, scripts\zm\replaced\zm_buried_buildables::headchopperbuildable);
|
||||
replaceFunc(maps\mp\zm_buried_buildables::watch_cell_open_close, scripts\zm\replaced\zm_buried_buildables::watch_cell_open_close);
|
||||
replaceFunc(maps\mp\zm_buried_gamemodes::init, scripts\zm\replaced\zm_buried_gamemodes::init);
|
||||
replaceFunc(maps\mp\zm_buried_gamemodes::buildbuildable, scripts\zm\replaced\zm_buried_gamemodes::buildbuildable);
|
||||
@ -71,7 +75,6 @@ init()
|
||||
sloth_barricades_buyable();
|
||||
add_jug_collision();
|
||||
|
||||
level thread update_buildable_stubs();
|
||||
level thread remove_chalk_draw_points();
|
||||
level thread enable_fountain_transport();
|
||||
level thread disable_ghost_free_perk_on_damage();
|
||||
@ -332,21 +335,6 @@ sloth_barricade_move()
|
||||
}
|
||||
}
|
||||
|
||||
update_buildable_stubs()
|
||||
{
|
||||
flag_wait("initial_blackscreen_passed");
|
||||
|
||||
wait 1;
|
||||
|
||||
foreach (stub in level.buildablepools["buried"].stubs)
|
||||
{
|
||||
if (isDefined(level.zombie_buildables[stub.equipname]))
|
||||
{
|
||||
level.zombie_buildables[stub.equipname].bought = "Took " + stub scripts\zm\_zm_reimagined::get_equipment_display_name();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
remove_chalk_draw_points()
|
||||
{
|
||||
flag_wait("initial_blackscreen_passed");
|
||||
|
@ -528,7 +528,7 @@ craftabletrigger_update_prompt(player)
|
||||
|
||||
if (can_use && is_true(self.stub.crafted) && !is_true(self.stub.is_locked))
|
||||
{
|
||||
self sethintstring(self.stub.hint_string, " [Cost: " + self.stub.cost + "]");
|
||||
self sethintstring(self.stub.hint_string, self.stub.cost);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -510,7 +510,7 @@ craftabletrigger_update_prompt(player)
|
||||
|
||||
if (can_use && is_true(self.stub.crafted) && !isSubStr(self.stub.craftablespawn.craftable_name, "staff"))
|
||||
{
|
||||
self sethintstring(self.stub.hint_string, " [Cost: " + self.stub.cost + "]");
|
||||
self sethintstring(self.stub.hint_string, self.stub.cost);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -575,7 +575,7 @@ craftablestub_update_prompt(player, unitrigger)
|
||||
}
|
||||
else if (flag("quadrotor_cooling_down"))
|
||||
{
|
||||
self.hint_string = "Cooling down";
|
||||
self.hint_string = &"ZM_TOMB_MAXISDRONE_COOLDOWN";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user