Skip to content

Commit

Permalink
MOTD: plane craft changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jbleezy committed Dec 9, 2021
1 parent 5799f6d commit 8bfbf80
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -198,6 +198,8 @@
* Tower Trap kills on any round in 1 shot
* Upgraded Tower Trap kills on any round in 1-2 shots
* Upgraded Tower Trap stays upgraded until the end of the round
* Plane parts are shared in coop
* Plane parts must be all acquired to craft
* Plane fuel automatically picked up

### Buried
Expand Down
38 changes: 36 additions & 2 deletions scripts/zm/main/_zm_reimagined.gsc
Expand Up @@ -18,6 +18,9 @@ init()
set_lethal_grenade_init();
disable_solo_revive();

prison_plane_set_need_all_pieces();
prison_plane_set_pieces_shared();

level thread post_all_players_spawned();
}

Expand Down Expand Up @@ -179,7 +182,7 @@ post_all_players_spawned()

level thread highrise_solo_revive_fix();

level thread prison_auto_refuel_plane();
level thread prison_plane_auto_refuel();

level thread buried_enable_fountain_transport();
level thread buried_disable_ghost_free_perk_on_damage();
Expand Down Expand Up @@ -5046,7 +5049,38 @@ town_move_staminup_machine()
maps/mp/zombies/_zm_power::add_powered_item( maps/mp/zombies/_zm_power::perk_power_on, ::perk_power_off, maps/mp/zombies/_zm_power::perk_range, maps/mp/zombies/_zm_power::cost_low_if_local, 0, powered_on, use_trigger );
}

prison_auto_refuel_plane()
prison_plane_set_need_all_pieces()
{
if(!(is_classic() && level.scr_zm_map_start_location == "prison"))
{
return;
}

level.zombie_craftablestubs["plane"].need_all_pieces = 1;
level.zombie_craftablestubs["refuelable_plane"].need_all_pieces = 1;
}

prison_plane_set_pieces_shared()
{
if(!(is_classic() && level.scr_zm_map_start_location == "prison"))
{
return;
}

foreach(stub in level.zombie_include_craftables)
{
if(stub.name == "plane" || stub.name == "refuelable_plane")
{
foreach(piece in stub.a_piecestubs)
{
piece.is_shared = 1;
piece.client_field_state = undefined;
}
}
}
}

prison_plane_auto_refuel()
{
if(!(is_classic() && level.scr_zm_map_start_location == "prison"))
{
Expand Down

0 comments on commit 8bfbf80

Please sign in to comment.