From 7cc2a6242714f16c1fcd8af2de5b0cfcee6c1a2c Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Fri, 10 Mar 2023 20:06:50 -0800 Subject: [PATCH] Survival & Grief on Tranzit maps: power doors are buyable doors --- README.md | 1 + .../zm/zm_transit/zm_transit_reimagined.gsc | 46 ++++++++++++++++++- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1894ceab..542347fc 100644 --- a/README.md +++ b/README.md @@ -390,6 +390,7 @@ * Power switch automatically crafted * Pack-a-Punch automatically crafted * Navcard table automatically crafted +* Survival & Grief: power doors are buyable doors * Grief: added Ballistic Knife, Ray Gun, and Ray Gun Mark 2 to the Mystery Box * Fixed a zombie riser spawn point at Outside Power Station being too high above ground * Fixed a zombie pathing exploit at Town in Bookstore diff --git a/scripts/zm/zm_transit/zm_transit_reimagined.gsc b/scripts/zm/zm_transit/zm_transit_reimagined.gsc index ac0dd1f0..43f1f8a6 100644 --- a/scripts/zm/zm_transit/zm_transit_reimagined.gsc +++ b/scripts/zm/zm_transit/zm_transit_reimagined.gsc @@ -41,7 +41,8 @@ main() replaceFunc(maps\mp\zombies\_zm_banking::bank_withdraw_unitrigger, scripts\zm\replaced\_zm_banking::bank_withdraw_unitrigger); replaceFunc(maps\mp\zombies\_zm_weapon_locker::triggerweaponslockerisvalidweaponpromptupdate, scripts\zm\replaced\_zm_weapon_locker::triggerweaponslockerisvalidweaponpromptupdate); - include_weapons_grief(); + grief_include_weapons(); + electric_door_changes(); } init() @@ -59,7 +60,7 @@ init() level thread power_station_vision_change(); } -include_weapons_grief() +grief_include_weapons() { if ( getDvar( "g_gametype" ) != "zgrief" ) { @@ -113,6 +114,47 @@ screecher_prespawn_decrease_health() self.player_score = 12; } +electric_door_changes() +{ + if( is_classic() && level.scr_zm_map_start_location == "transit" ) + { + return; + } + + zombie_doors = getentarray( "zombie_door", "targetname" ); + for ( i = 0; i < zombie_doors.size; i++ ) + { + if ( isDefined( zombie_doors[i].script_noteworthy ) && (zombie_doors[i].script_noteworthy == "local_electric_door" || zombie_doors[i].script_noteworthy == "electric_door") ) + { + zombie_doors[i].script_noteworthy = "default"; + zombie_doors[i].zombie_cost = 750; + + // link Bus Depot and Farm electric doors together + new_target = undefined; + if (zombie_doors[i].target == "pf1766_auto2353") + { + new_target = "pf1766_auto2352"; + + } + else if (zombie_doors[i].target == "pf1766_auto2358") + { + new_target = "pf1766_auto2357"; + } + + if (isDefined(new_target)) + { + targets = getentarray( zombie_doors[i].target, "targetname" ); + zombie_doors[i].target = new_target; + + foreach (target in targets) + { + target.targetname = zombie_doors[i].target; + } + } + } + } +} + power_local_electric_doors_globally() { if( !(is_classic() && level.scr_zm_map_start_location == "transit") )