mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-11 15:48:05 -05:00
Buried: Noose and Guillotine parts automatically picked up
This commit is contained in:
@ -556,6 +556,7 @@
|
||||
|
||||
### Buried
|
||||
* Power automatically on
|
||||
* Noose and Guillotine parts automatically picked up
|
||||
* Removed Turbine, keys, booze, and candy
|
||||
* Arthur barricades are buyable debris
|
||||
* Arthur can be purchased to feed him candy and make him run around and kill zombies for 30 seconds
|
||||
|
@ -2577,6 +2577,8 @@ buildbuildables()
|
||||
buildbuildable( "springpad_zm" );
|
||||
buildbuildable( "headchopper_zm" );
|
||||
buildbuildable( "sq_common", 1 );
|
||||
buildbuildable( "buried_sq_bt_m_tower", 0, 1, ::onuseplantobject_mtower );
|
||||
buildbuildable( "buried_sq_bt_r_tower", 0, 1, ::onuseplantobject_rtower );
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -2593,14 +2595,9 @@ buildbuildables()
|
||||
}
|
||||
}
|
||||
|
||||
buildbuildable( buildable, craft )
|
||||
buildbuildable( buildable, craft = 0, solo_pool = 0, onuse )
|
||||
{
|
||||
if (!isDefined(craft))
|
||||
{
|
||||
craft = 0;
|
||||
}
|
||||
|
||||
player = get_players()[ 0 ];
|
||||
player = get_players()[0];
|
||||
foreach (stub in level.buildable_stubs)
|
||||
{
|
||||
if ( !isDefined( buildable ) || stub.equipname == buildable )
|
||||
@ -2610,6 +2607,11 @@ buildbuildable( buildable, craft )
|
||||
stub.cost = stub get_equipment_cost();
|
||||
stub.trigger_func = scripts\zm\replaced\_zm_buildables_pooled::pooled_buildable_place_think;
|
||||
|
||||
if (isDefined(onuse))
|
||||
{
|
||||
stub.buildablestruct.onuseplantobject = onuse;
|
||||
}
|
||||
|
||||
if (craft)
|
||||
{
|
||||
stub maps\mp\zombies\_zm_buildables::buildablestub_finish_build( player );
|
||||
@ -2619,7 +2621,15 @@ buildbuildable( buildable, craft )
|
||||
}
|
||||
else
|
||||
{
|
||||
if (level.script != "zm_buried")
|
||||
if (level.script == "zm_buried")
|
||||
{
|
||||
if (solo_pool)
|
||||
{
|
||||
stub.solo_pool = 1;
|
||||
scripts\zm\replaced\_zm_buildables_pooled::add_buildable_to_pool(stub, stub.equipname);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
scripts\zm\replaced\_zm_buildables_pooled::add_buildable_to_pool(stub, level.script);
|
||||
}
|
||||
@ -2682,6 +2692,14 @@ get_equipment_display_name()
|
||||
{
|
||||
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 "";
|
||||
}
|
||||
@ -2789,6 +2807,56 @@ buildable_get_last_piece()
|
||||
}
|
||||
}
|
||||
|
||||
onuseplantobject_mtower( player )
|
||||
{
|
||||
level setclientfield( "sq_gl_b_vt", 1 );
|
||||
level setclientfield( "sq_gl_b_bb", 1 );
|
||||
level setclientfield( "sq_gl_b_a", 1 );
|
||||
level setclientfield( "sq_gl_b_ws", 1 );
|
||||
level notify( "mtower_object_planted" );
|
||||
|
||||
self maps\mp\zombies\_zm_buildables::buildablestub_finish_build( player );
|
||||
player playsound( "zmb_buildable_complete" );
|
||||
|
||||
level thread unregister_tower_unitriggers();
|
||||
}
|
||||
|
||||
onuseplantobject_rtower( player )
|
||||
{
|
||||
m_tower = getent( "sq_guillotine", "targetname" );
|
||||
m_tower sq_tower_spawn_attachment( "p6_zm_bu_sq_crystal", "j_crystal_01" );
|
||||
m_tower sq_tower_spawn_attachment( "p6_zm_bu_sq_satellite_dish", "j_satellite" );
|
||||
m_tower sq_tower_spawn_attachment( "p6_zm_bu_sq_antenna", "j_antenna" );
|
||||
m_tower sq_tower_spawn_attachment( "p6_zm_bu_sq_wire_spool", "j_spool" );
|
||||
level notify( "rtower_object_planted" );
|
||||
|
||||
self maps\mp\zombies\_zm_buildables::buildablestub_finish_build( player );
|
||||
player playsound( "zmb_buildable_complete" );
|
||||
|
||||
level thread unregister_tower_unitriggers();
|
||||
}
|
||||
|
||||
sq_tower_spawn_attachment( str_model, str_tag )
|
||||
{
|
||||
m_part = spawn( "script_model", self gettagorigin( str_tag ) );
|
||||
m_part.angles = self gettagangles( str_tag );
|
||||
m_part setmodel( str_model );
|
||||
}
|
||||
|
||||
unregister_tower_unitriggers()
|
||||
{
|
||||
foreach (stub in level.buildable_stubs)
|
||||
{
|
||||
if (isDefined(stub.equipname))
|
||||
{
|
||||
if (stub.equipname == "buried_sq_bt_m_tower" || stub.equipname == "buried_sq_bt_r_tower")
|
||||
{
|
||||
maps\mp\zombies\_zm_unitrigger::unregister_unitrigger( stub );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MOTD\Origins style buildables
|
||||
buildcraftables()
|
||||
{
|
||||
|
@ -125,43 +125,57 @@ pooledbuildablestub_update_prompt( player, trigger )
|
||||
|
||||
self.cursor_hint = "HINT_NOICON";
|
||||
self.cursor_hint_weapon = undefined;
|
||||
piece = undefined;
|
||||
|
||||
if ( !( isdefined( self.built ) && self.built ) )
|
||||
{
|
||||
if (level.buildables_available.size > 1)
|
||||
if (is_true(self.solo_pool))
|
||||
{
|
||||
if (!is_true(self.open_buildable_checking_input))
|
||||
foreach (stub in level.buildable_stubs)
|
||||
{
|
||||
self thread choose_open_buildable(player);
|
||||
if (stub.buildablezone.buildable_name == self.equipname)
|
||||
{
|
||||
piece = stub.buildablezone.pieces[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self notify( "kill_choose_open_buildable" );
|
||||
self.open_buildable_checking_input = 0;
|
||||
|
||||
if ( isdefined( self.openbuildablehudelem ) )
|
||||
{
|
||||
self.openbuildablehudelem destroy();
|
||||
self.openbuildablehudelem = undefined;
|
||||
}
|
||||
|
||||
self.buildables_available_index = 0;
|
||||
self.equipname = level.buildables_available[self.buildables_available_index];
|
||||
}
|
||||
|
||||
if (self.buildables_available_index >= level.buildables_available.size)
|
||||
{
|
||||
self.buildables_available_index = 0;
|
||||
}
|
||||
|
||||
piece = undefined;
|
||||
foreach (stub in level.buildable_stubs)
|
||||
{
|
||||
if (stub.buildablezone.buildable_name == level.buildables_available[self.buildables_available_index])
|
||||
if (level.buildables_available.size > 1)
|
||||
{
|
||||
piece = stub.buildablezone.pieces[0];
|
||||
break;
|
||||
if (!is_true(self.open_buildable_checking_input))
|
||||
{
|
||||
self thread choose_open_buildable(player);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self notify( "kill_choose_open_buildable" );
|
||||
self.open_buildable_checking_input = 0;
|
||||
|
||||
if ( isdefined( self.openbuildablehudelem ) )
|
||||
{
|
||||
self.openbuildablehudelem destroy();
|
||||
self.openbuildablehudelem = undefined;
|
||||
}
|
||||
|
||||
self.buildables_available_index = 0;
|
||||
self.equipname = level.buildables_available[self.buildables_available_index];
|
||||
}
|
||||
|
||||
if (self.buildables_available_index >= level.buildables_available.size)
|
||||
{
|
||||
self.buildables_available_index = 0;
|
||||
}
|
||||
|
||||
foreach (stub in level.buildable_stubs)
|
||||
{
|
||||
if (stub.buildablezone.buildable_name == level.buildables_available[self.buildables_available_index])
|
||||
{
|
||||
piece = stub.buildablezone.pieces[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
50
scripts/zm/replaced/zm_buried_sq_bt.gsc
Normal file
50
scripts/zm/replaced/zm_buried_sq_bt.gsc
Normal file
@ -0,0 +1,50 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\zombies\_zm_utility;
|
||||
#include maps\mp\zombies\_zm_sidequests;
|
||||
#include maps\mp\zm_buried_sq;
|
||||
#include maps\mp\zm_buried_sq_bt;
|
||||
|
||||
stage_vo_watch_gallows()
|
||||
{
|
||||
level endon( "sq_bt_over" );
|
||||
level endon( "end_game_reward_starts_maxis" );
|
||||
level endon( "end_game_reward_starts_richtofen" );
|
||||
s_struct = getstruct( "sq_gallows", "targetname" );
|
||||
trigger = spawn( "trigger_radius", s_struct.origin, 0, 128, 72 );
|
||||
|
||||
trigger waittill( "trigger" );
|
||||
|
||||
trigger delete();
|
||||
m_maxis_vo_spot = spawn( "script_model", s_struct.origin );
|
||||
m_maxis_vo_spot setmodel( "tag_origin" );
|
||||
|
||||
if ( flag( "sq_intro_vo_done" ) )
|
||||
maxissay( "vox_maxi_sidequest_gallows_0", m_maxis_vo_spot );
|
||||
|
||||
level waittill( "mtower_object_planted" );
|
||||
|
||||
if ( flag( "sq_intro_vo_done" ) )
|
||||
maxissay( "vox_maxi_sidequest_parts_3", m_maxis_vo_spot, 1 );
|
||||
|
||||
m_maxis_vo_spot delete();
|
||||
}
|
||||
|
||||
stage_vo_watch_guillotine()
|
||||
{
|
||||
level endon( "sq_bt_over" );
|
||||
level endon( "end_game_reward_starts_maxis" );
|
||||
level endon( "end_game_reward_starts_richtofen" );
|
||||
s_struct = getstruct( "sq_guillotine", "targetname" );
|
||||
trigger = spawn( "trigger_radius", s_struct.origin, 0, 128, 72 );
|
||||
|
||||
trigger waittill( "trigger" );
|
||||
|
||||
trigger delete();
|
||||
richtofensay( "vox_zmba_sidequest_gallows_0", 9 );
|
||||
richtofensay( "vox_zmba_sidequest_gallows_1", 12 );
|
||||
|
||||
level waittill( "rtower_object_planted" );
|
||||
|
||||
richtofensay( "vox_zmba_sidequest_parts_3", 11 );
|
||||
}
|
@ -6,6 +6,7 @@
|
||||
#include scripts\zm\replaced\zm_buried_gamemodes;
|
||||
#include scripts\zm\replaced\zm_buried_ffotd;
|
||||
#include scripts\zm\replaced\zm_buried_fountain;
|
||||
#include scripts\zm\replaced\zm_buried_sq_bt;
|
||||
#include scripts\zm\replaced\_zm_ai_sloth;
|
||||
#include scripts\zm\replaced\_zm_buildables_pooled;
|
||||
#include scripts\zm\replaced\_zm_equip_subwoofer;
|
||||
@ -26,6 +27,8 @@ main()
|
||||
replaceFunc(maps\mp\zm_buried_gamemodes::buildbuildable, scripts\zm\replaced\zm_buried_gamemodes::buildbuildable);
|
||||
replaceFunc(maps\mp\zm_buried_ffotd::spawned_life_triggers, scripts\zm\replaced\zm_buried_ffotd::spawned_life_triggers);
|
||||
replaceFunc(maps\mp\zm_buried_fountain::transport_player_to_start_zone, scripts\zm\replaced\zm_buried_fountain::transport_player_to_start_zone);
|
||||
replaceFunc(maps\mp\zm_buried_sq_bt::stage_vo_watch_gallows, scripts\zm\replaced\zm_buried_sq_bt::stage_vo_watch_gallows);
|
||||
replaceFunc(maps\mp\zm_buried_sq_bt::stage_vo_watch_guillotine, scripts\zm\replaced\zm_buried_sq_bt::stage_vo_watch_guillotine);
|
||||
replaceFunc(maps\mp\zombies\_zm_ai_sloth::sloth_init_start_funcs, scripts\zm\replaced\_zm_ai_sloth::sloth_init_start_funcs);
|
||||
replaceFunc(maps\mp\zombies\_zm_ai_sloth::sloth_init_update_funcs, scripts\zm\replaced\_zm_ai_sloth::sloth_init_update_funcs);
|
||||
replaceFunc(maps\mp\zombies\_zm_ai_sloth::sloth_check_ragdolls, scripts\zm\replaced\_zm_ai_sloth::sloth_check_ragdolls);
|
||||
|
Reference in New Issue
Block a user