Initial commit
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
. filter=lfs diff=lfs merge=lfs -text
|
||||
localappdata/xlabs/data/cef/release/libcef.dll filter=lfs diff=lfs merge=lfs -text
|
16
README.md
@ -27,9 +27,19 @@ If you don't have `git` installed on your machine, follow these steps:
|
||||
git clone https://github.com/YourUsername/GameClientRepo.git
|
||||
```
|
||||
### Setting Up
|
||||
|
||||
1.
|
||||
```
|
||||
1. Move the `xlabs` folder to your local app data directory.
|
||||
|
||||
> **Note**: Ensure the game client points to the correct local app data directory for proper functionality.
|
||||
|
||||
[![patreon](https://img.shields.io/badge/patreon-support-blue.svg?logo=patreon)](https://www.patreon.com/xlabsproject)
|
||||
[![discord](https://img.shields.io/endpoint?url=https://momo5502.com/iw4x/members-badge.php)](https://discord.gg/sKeVmR3)
|
||||
|
||||
<p align="center">
|
||||
<img src="assets/github/banner-s1x.png?raw=true" />
|
||||
</p>
|
||||
|
||||
<br/>
|
||||
|
||||
<p align="center">
|
||||
<img alig src="assets/github/banner-iw6x.png?raw=true"/>
|
||||
</p>
|
BIN
assets/github/banner-iw6x.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/github/banner-iw6x.psd
Normal file
BIN
assets/github/banner-s1x.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/github/banner-s1x.psd
Normal file
BIN
bin/iw4x/iw4sp.exe
Normal file
BIN
bin/iw4x/iw4x.exe
Normal file
BIN
bin/iw6x/iw6mp64_ship.exe
Normal file
BIN
bin/iw6x/iw6sp64_ship.exe
Normal file
BIN
bin/s1x/s1_mp64_ship.exe
Normal file
BIN
bin/s1x/s1_sp64_ship.exe
Normal file
BIN
iw4x/iw4x-sp.exe
Normal file
BIN
iw4x/iw4x.dll
Normal file
BIN
iw4x/r4344/iw4x.dll
Normal file
228
iw6x/data/dw/entitlement_config_tu14.info
Normal file
@ -0,0 +1,228 @@
|
||||
version 7
|
||||
|
||||
// Entitlement ID Ranges
|
||||
// 0 - 299 ???
|
||||
// 300 - 399 Clan Entitlements
|
||||
// 400 - 599 ???
|
||||
// 600 - 699 Clan War Entitlements
|
||||
// 700 - 799 Generic Elite Entitlements
|
||||
|
||||
// Number of keys to read from the key archive
|
||||
keys_to_read 16
|
||||
|
||||
// unlocks in game - type, key index, bit, name, payload...
|
||||
unlock 0 0 600 //clan wars demon_skull_p
|
||||
unlock 0 1 601 //clan wars dead_ninja_p
|
||||
unlock 0 2 602 //clan wars mummy_p
|
||||
unlock 0 3 603 //clan wars skull_bow_p
|
||||
unlock 0 4 604 //clan wars cyclops_skull_p
|
||||
unlock 0 5 605 //clan wars dead_gnome_p
|
||||
unlock 0 6 606 //clan wars gold_grill_p
|
||||
unlock 0 7 607 //clan wars pirate_skull_p
|
||||
unlock 0 8 608 //clan wars gargoyle_p
|
||||
unlock 0 9 609 //clan wars vulture_p
|
||||
unlock 0 10 610 //clan wars warrior_mask_p
|
||||
unlock 0 11 611 //clan wars yeti_p
|
||||
unlock 0 12 612 //clan wars dead_owl_p
|
||||
unlock 0 13 613 //clan wars money_bags_p
|
||||
unlock 0 14 614 //clan wars injured_octopus_p
|
||||
unlock 0 15 615 //clan wars hotdog_p
|
||||
unlock 0 16 616 //clan wars crab_p
|
||||
unlock 0 17 617 //clan wars angry_robot_p
|
||||
unlock 0 18 618 //clan wars triangle_dot_ret
|
||||
unlock 0 19 619 //clan wars gold_chain_emb
|
||||
unlock 0 20 620 //clan wars wing_emb
|
||||
unlock 0 21 621 //clan wars brass_knuck_emb
|
||||
unlock 0 22 622 //clan wars ninja_emb
|
||||
unlock 0 25 623 //clan wars reaper head
|
||||
unlock 0 26 624 //clan wars merc head
|
||||
unlock 0 27 625 //clan wars body
|
||||
unlock 0 28 460 //clan wars diamond division reticle
|
||||
unlock 0 29 401 //clan wars diamond division camo
|
||||
unlock 0 30 627 //clan wars diamond division assassin head
|
||||
unlock 0 31 626 //clan wars diamond division savage head
|
||||
unlock 0 32 628 //clan wars diamond division body
|
||||
|
||||
unlock 3 0 700 //Download the mobile app
|
||||
unlock 3 1 701 //Founder Skull
|
||||
|
||||
unlock 3 4 500 //NEVERSOFT
|
||||
unlock 3 3 501 //IW
|
||||
unlock 3 5 502 //RAVEN
|
||||
unlock 3 7 503 //HIGH_MOON
|
||||
unlock 3 6 504 //BEACHHEAD
|
||||
|
||||
unlock 13 0 209 //monster beast patch
|
||||
unlock 13 2 210 //monster beast playercard
|
||||
unlock 13 1 211 //monster viper patch
|
||||
unlock 13 3 212 //monster viper playercard
|
||||
|
||||
unlock 13 4 216 //riley / classic ghost head
|
||||
|
||||
unlock 13 30 217 //watcher patch
|
||||
unlock 13 31 213 //federation patch
|
||||
unlock 13 32 215 //into the deep patch
|
||||
unlock 13 33 214 //no man's land patch
|
||||
|
||||
//Platform Unlocks
|
||||
platform 200 255161 //team leader head
|
||||
platform 201 255161 //team leader playercard
|
||||
platform 202 255161 //team leader patch
|
||||
platform 403 255161 //team leader camo
|
||||
platform 451 255161 //team leader reticle
|
||||
|
||||
platform 200 255160 //team leader head
|
||||
platform 201 255160 //team leader playercard
|
||||
platform 202 255160 //team leader patch
|
||||
platform 403 255160 //team leader camo
|
||||
platform 451 255160 //team leader reticle
|
||||
|
||||
platform 206 255162 //insignia playercard
|
||||
platform 205 255162 //insignia patch
|
||||
|
||||
platform 216 255165 //classic ghost character
|
||||
|
||||
platform 213 255167 //federation patch
|
||||
platform 214 255168 //no mans land patch
|
||||
platform 215 255169 //into the deep patch
|
||||
|
||||
platform 207 255163 //digital hardened patch
|
||||
platform 208 255163 //digital hardened playercard
|
||||
|
||||
platform 217 255166 //Steam Patch - The Watcher
|
||||
|
||||
platform 222 268100 //festive playercard
|
||||
platform 221 268100 //festive patch
|
||||
platform 410 268100 //festive camo
|
||||
platform 453 268100 //festive reticle
|
||||
|
||||
platform 550 268101 //wolf
|
||||
|
||||
platform 551 277670 //extra slots
|
||||
|
||||
platform 552 277671 // hero character - elias
|
||||
platform 553 277672 // hero character - hesh
|
||||
platform 554 277673 // hero character - merrick
|
||||
platform 555 277674 // hero character - keegan
|
||||
platform 556 277675 // hero character - price
|
||||
|
||||
platform 557 281343 // Hazmat character
|
||||
platform 558 281340 // Makarov Legend Pack
|
||||
platform 559 281342 // Rorke Character
|
||||
platform 560 281341 // Zakhaev Character
|
||||
|
||||
platform 561 286632 // Soap Legend Pack
|
||||
platform 562 286633 // Extinction Squad
|
||||
platform 563 286634 // TF141
|
||||
|
||||
platform 490 277676 // Personalization pack 1 - Ducky
|
||||
platform 491 277677 // Personalization pack 2 - Blood
|
||||
platform 492 277678 // Personalization pack 3 - Inferno
|
||||
platform 493 277679 // Personalization pack 4 - Kittens
|
||||
|
||||
platform 494 281344 // Personalization pack 5
|
||||
platform 495 281345 // Personalization pack 6
|
||||
platform 496 281346 // Personalization pack 7
|
||||
platform 497 281347 // Personalization pack 8
|
||||
platform 498 286630 // Personalization pack 9
|
||||
platform 499 286631 // Personalization pack 10
|
||||
|
||||
platform 510 295430 // Personalization pack 11
|
||||
platform 511 295431 // Personalization pack 12
|
||||
platform 512 295432 // Personalization pack 13
|
||||
platform 513 295433 // Personalization pack 14
|
||||
platform 515 295434 // Personalization pack 15
|
||||
platform 516 295435 // Personalization pack 16
|
||||
|
||||
platform 517 295439 // Personalization pack 17
|
||||
platform 518 295440 // Personalization pack 18
|
||||
platform 519 301111 // Personalization pack 19
|
||||
platform 520 301112 // Personalization pack 20
|
||||
platform 521 301113 // Personalization pack 21
|
||||
platform 522 301114 // Personalization pack 22
|
||||
platform 523 301110 // Personalization pack Flags
|
||||
|
||||
platform 564 295436 // Spectrum Character
|
||||
platform 565 295437 // Astronaut Character
|
||||
platform 566 295438 // Resistance Squad
|
||||
|
||||
platform 567 309870 // Bluntforce Character
|
||||
platform 568 309871 // Inferno Character
|
||||
platform 569 309872 // Bling Character
|
||||
|
||||
platform 480 259250 //dlc gun 1
|
||||
platform 480 301116 //dlc gun 1
|
||||
platform 481 259250 //dlc gun 1
|
||||
platform 481 301116 //dlc gun 1
|
||||
|
||||
platform 482 259251 //Ripper from Devastation
|
||||
platform 482 255161 //Ripper from Season Pass
|
||||
platform 482 301115 //Ripper from mDLC
|
||||
|
||||
//Clan Entitlements - ID 300 - 399 - type, bit, entitlement id
|
||||
clan 0 300
|
||||
clan 0 301
|
||||
clan 1 302
|
||||
clan 2 303
|
||||
clan 3 304
|
||||
clan 3 305
|
||||
clan 3 306
|
||||
clan 4 307
|
||||
clan 4 308
|
||||
clan 4 309
|
||||
clan 5 310
|
||||
clan 5 311
|
||||
clan 6 312
|
||||
clan 7 313
|
||||
clan 8 314
|
||||
clan 8 315
|
||||
clan 8 316
|
||||
clan 9 317
|
||||
clan 10 318
|
||||
clan 10 319
|
||||
clan 10 320
|
||||
clan 10 321
|
||||
clan 10 322
|
||||
clan 11 323
|
||||
clan 12 324
|
||||
clan 13 325
|
||||
clan 13 326
|
||||
clan 13 327
|
||||
clan 13 328
|
||||
clan 13 329
|
||||
clan 14 330
|
||||
clan 15 331
|
||||
clan 15 332
|
||||
clan 15 333
|
||||
clan 16 334
|
||||
clan 16 335
|
||||
clan 16 336
|
||||
clan 16 337
|
||||
clan 16 338
|
||||
clan 17 339
|
||||
clan 18 340
|
||||
clan 19 341
|
||||
clan 19 342
|
||||
clan 19 343
|
||||
clan 19 344
|
||||
clan 20 345
|
||||
clan 20 346
|
||||
clan 21 347
|
||||
clan 21 348
|
||||
clan 21 349
|
||||
clan 22 350
|
||||
clan 23 351
|
||||
clan 24 352
|
||||
clan 25 353
|
||||
clan 26 354
|
||||
clan 26 355
|
||||
clan 26 356
|
||||
clan 26 357
|
||||
clan 27 358
|
||||
|
||||
//Clan Level Challenges - type, required level, challenge id
|
||||
clanlevelchallenge 23 ch_cam_clan_02 // Kiss of Death Camo
|
||||
|
||||
//Clan War Challenges - type, key index, bit offset, challenge id
|
||||
entitlementchallenge 0 18 ch_ret_clan // clan wars reticle - Triad
|
||||
entitlementchallenge 0 24 ch_cam_clan_01 // clan wars camo - Body Count
|
2
iw6x/data/dw/mm.cfg
Normal file
@ -0,0 +1,2 @@
|
||||
VERSION 5
|
||||
XX 0 D100 0 P50 0 G5 4 F 6 H 8 P75 16 P100 16 S 24 P120 32 P150 40 P-1 10 M192 20 M48
|
162
iw6x/data/dw/newsfeed.txt
Normal file
@ -0,0 +1,162 @@
|
||||
article 1
|
||||
header "FLAGS OF THE WORLD PACK"
|
||||
body "Show your national pride with individual patches, playercards, and backgrounds for England, France, Germany, Italy, Spain, Mexico, USA, Brazil, Australia, Japan, UK, Russia, Netherlands, Portugal, Colombia, Argentina, Canada, Ireland, and Sweden.
|
||||
|
||||
Plus, go international in any firefight with a unique reticle and flags of the world weapon camo.
|
||||
|
||||
Available now.
|
||||
|
||||
Visit the in-game store to find out more."
|
||||
type item
|
||||
image ui_mp/ingamestore/img_store_pers_pack_flags.jpg
|
||||
imagewidth 320
|
||||
imageheight 160
|
||||
data mdlc_pack40
|
||||
localJPEGImage
|
||||
|
||||
article 2
|
||||
header "CALL OF DUTY APP"
|
||||
body "The Call of Duty App is everything you need to keep track of your Ghosts experience on the go.
|
||||
|
||||
Get unique info on Clan Wars: A brand new game mode that connects directly to Call of Duty®: Ghosts multiplayer, where clans compete against each other for additional XP and in-game content.
|
||||
|
||||
Communicate via the Rally Up and Clan Chat features, to keep in touch with your friends and Clan members."
|
||||
type news
|
||||
image img_sf_generic_news2
|
||||
imagewidth 320
|
||||
imageheight 320
|
||||
|
||||
article 3
|
||||
header "PLAY HOW YOU WANT WITH EXTRA LOADOUT SLOTS"
|
||||
body "You can increase the number of loadout slots from 6 to 10, so you can take even more options into battle. Never get caught with the wrong gear and give yourself great flexibility by creating different loadouts for different situations.
|
||||
|
||||
Top Tip - Set up different characters for different game modes, that way you can select the right man for the job.
|
||||
|
||||
Another Top Tip - With all the extra loadouts, set up variations of your favorite loadout so you’re always ready for the unexpected.
|
||||
|
||||
Visit the in-game store to find out more."
|
||||
type item
|
||||
image ui_mp/ingamestore/img_store_extra_slots.jpg
|
||||
imagewidth 320
|
||||
imageheight 160
|
||||
data mdlc_pack2
|
||||
localJPEGImage
|
||||
|
||||
article 4
|
||||
header "DROP ZONE IS BACK!"
|
||||
body "We are bringing this fan favorite mode from Call of Duty: Modern Warfare 3 to Call of Duty: Ghosts Multiplayer.
|
||||
|
||||
Fight to take control of the Drop Zone marked with a red smoke grenade, a location where Care Packages are regularly delivered by air drops.
|
||||
|
||||
This mode gives you multiple chances to change the game with awesome killstreaks like the Gryphon, Juggernaut, or the earth shattering Loki.
|
||||
|
||||
Control the Drop Zone, collect killstreaks, and wreak havoc on the opposing team!"
|
||||
type news
|
||||
image img_squadmode_03
|
||||
imagewidth 320
|
||||
imageheight 176
|
||||
|
||||
article 5
|
||||
header "THE REAL ORIGINS OF EXTINCTION"
|
||||
body "Find out the origins of the Extinction story by collecting hidden intel items in Episode 1: Nightfall.
|
||||
|
||||
Find out the real story of Dr. Cross, Archer and discover more secrets from Project Nightfall.
|
||||
|
||||
Episode 1: Nightfall is part of DLC 1: Onslaught, available now.
|
||||
|
||||
Visit the in-game store to find out more."
|
||||
type item
|
||||
image bg_large_073
|
||||
imagewidth 320
|
||||
imageheight 320
|
||||
data dlc3
|
||||
|
||||
article 6
|
||||
header "NEW CUSTOMIZATION CONTENT"
|
||||
body "New content is being released all the time. Personalize your look and your loadout with customization items.
|
||||
|
||||
- Special Characters: Customize your look head-to-toe in Multiplayer, Squads and Extinction.
|
||||
|
||||
- Personalization Packs: Uniquely themed weapon camo, reticle, patch, playercard and background.
|
||||
|
||||
- Legend Packs: A Special Character and themed Personalization Pack for a legendary figure in Call of Duty lore.
|
||||
|
||||
Visit the in-game store to find out more."
|
||||
type item
|
||||
image ui_mp/ingamestore/img_store_pers_pack_07.jpg
|
||||
imagewidth 320
|
||||
imageheight 160
|
||||
data mdlc_pack17
|
||||
localJPEGImage
|
||||
|
||||
article 7
|
||||
header "NEW TO EXTINCTION - THE ARMORY"
|
||||
body "Spend Teeth in the Armory to purchase upgrades for classes and equipment.
|
||||
|
||||
Earn Teeth by completing Extinction missions. Bonus Teeth are awarded for completing with a relic, completing in Hardcore mode, or helping other players complete a mission for the first time.
|
||||
|
||||
You can also earn teeth by killing aliens in both Extinction and Chaos Mode.
|
||||
|
||||
Upgrades include the Weapon Specialist's Infinite Ammo Ability and the Medic's Energy Field, instantly heal and revive anyone within its perimeter!"
|
||||
type news
|
||||
image img_sf_extinction_armory
|
||||
imagewidth 320
|
||||
imageheight 320
|
||||
|
||||
article 8
|
||||
header "CAN YOU SURVIVE THE CHAOS?"
|
||||
body "Extinction's Chaos Mode is an all-new, adrenaline pumping game type that pits 1-4 players against a never ending alien onslaught.
|
||||
|
||||
Keep the combo meter filled by damaging aliens, collecting weaponry or upgrades, and making use of your abilities. Combos provide players with an ever-expanding set of perks such as Fast Health Regen, Gas Mask, and Stopping Power.
|
||||
|
||||
Special bonus drops provide new ability upgrades including the Tank Class Skill and the Venom-X that further your arsenal and overall score potential.
|
||||
|
||||
The aliens are ready, are you?"
|
||||
type news
|
||||
image img_sf_extinction_chaos
|
||||
imagewidth 320
|
||||
imageheight 320
|
||||
|
||||
article 9
|
||||
header "WHAT'S GOING ON WITH YOUR CLAN?"
|
||||
body "Check out what your Clan is up to in-game via Clan Details inside the Barracks. See what's going on with other players' Clans by checking out View Clan when you select them in the lobby.
|
||||
|
||||
Get even more details on your Clan via the Call of Duty App, available now on the App Store, Google Play and Windows Store.
|
||||
|
||||
Not in a Clan? Create one now via the Barracks and invite your friends straight from the game."
|
||||
type news
|
||||
image img_squadmode_02
|
||||
imagewidth 320
|
||||
imageheight 176
|
||||
|
||||
article 10
|
||||
header "DRILL INSTRUCTOR VOICE PACK"
|
||||
body "Multiplayer returns to boot camp with the all-new Drill Instructor Voice Pack voiced by the one and only R. Lee Ermey, aka The Gunny.
|
||||
|
||||
Swap out your in-game alerts with ones that will get you back into top combat shape.
|
||||
|
||||
Now, drop down and give me twenty!
|
||||
|
||||
Available now.
|
||||
|
||||
Visit the in-game store to find out more."
|
||||
type item
|
||||
image ui_mp/ingamestore/img_store_drill_sergeant.jpg
|
||||
imagewidth 320
|
||||
imageheight 160
|
||||
data dlc10
|
||||
localJPEGImage
|
||||
|
||||
article 11
|
||||
header "TRY REINFORCE"
|
||||
body "Reinforce is a new game mode where you annihilate the enemy team or capture points to win a match.
|
||||
|
||||
You only respawn if a teammate captures a point, so be careful out there!
|
||||
|
||||
This new game mode is now live in our Multiplayer playlist.
|
||||
|
||||
Enjoy!"
|
||||
type news
|
||||
image bg_large_045
|
||||
imagewidth 320
|
||||
imageheight 320
|
BIN
iw6x/data/dw/playlists_tu14.aggr
Normal file
2
iw6x/data/dw/social_tu14.cfg
Normal file
@ -0,0 +1,2 @@
|
||||
VERSION 5
|
||||
XX 0 D100 0 P50 0 G5 4 F 6 H 8 P75 16 P100 16 S 24 P120 32 P150 40 P-1 10 M192 20 M48
|
3302
iw6x/data/maps/mp/gametypes/_damage.gsc
Normal file
727
iw6x/data/maps/mp/gametypes/_menus.gsc
Normal file
@ -0,0 +1,727 @@
|
||||
// IW6 GSC SOURCE
|
||||
// Dumped by https://github.com/xensik/gsc-tool
|
||||
|
||||
init()
|
||||
{
|
||||
if ( !isdefined( game["gamestarted"] ) )
|
||||
{
|
||||
game["menu_team"] = "team_marinesopfor";
|
||||
|
||||
if ( level.multiteambased )
|
||||
game["menu_team"] = "team_mt_options";
|
||||
|
||||
if ( maps\mp\_utility::bot_is_fireteam_mode() )
|
||||
{
|
||||
level.fireteam_menu = "class_commander_" + level.gametype;
|
||||
game["menu_class"] = level.fireteam_menu;
|
||||
game["menu_class_allies"] = level.fireteam_menu;
|
||||
game["menu_class_axis"] = level.fireteam_menu;
|
||||
}
|
||||
else
|
||||
{
|
||||
game["menu_class"] = "class";
|
||||
game["menu_class_allies"] = "class_marines";
|
||||
game["menu_class_axis"] = "class_opfor";
|
||||
}
|
||||
|
||||
game["menu_changeclass_allies"] = "changeclass_marines";
|
||||
game["menu_changeclass_axis"] = "changeclass_opfor";
|
||||
|
||||
if ( level.multiteambased )
|
||||
{
|
||||
for ( var_0 = 0; var_0 < level.teamnamelist.size; var_0++ )
|
||||
{
|
||||
var_1 = "menu_class_" + level.teamnamelist[var_0];
|
||||
var_2 = "menu_changeclass_" + level.teamnamelist[var_0];
|
||||
game[var_1] = game["menu_class_allies"];
|
||||
game[var_2] = "changeclass_marines";
|
||||
}
|
||||
}
|
||||
|
||||
game["menu_changeclass"] = "changeclass";
|
||||
|
||||
if ( level.console )
|
||||
{
|
||||
game["menu_controls"] = "ingame_controls";
|
||||
|
||||
if ( level.splitscreen )
|
||||
{
|
||||
if ( level.multiteambased )
|
||||
{
|
||||
for ( var_0 = 0; var_0 < level.teamnamelist.size; var_0++ )
|
||||
{
|
||||
var_1 = "menu_class_" + level.teamnamelist[var_0];
|
||||
var_2 = "menu_changeclass_" + level.teamnamelist[var_0];
|
||||
game[var_1] += "_splitscreen";
|
||||
game[var_2] += "_splitscreen";
|
||||
}
|
||||
}
|
||||
|
||||
game["menu_team"] += "_splitscreen";
|
||||
game["menu_class_allies"] += "_splitscreen";
|
||||
game["menu_class_axis"] += "_splitscreen";
|
||||
game["menu_changeclass_allies"] += "_splitscreen";
|
||||
game["menu_changeclass_axis"] += "_splitscreen";
|
||||
game["menu_controls"] += "_splitscreen";
|
||||
game["menu_changeclass_defaults_splitscreen"] = "changeclass_splitscreen_defaults";
|
||||
game["menu_changeclass_custom_splitscreen"] = "changeclass_splitscreen_custom";
|
||||
precachemenu( game["menu_changeclass_defaults_splitscreen"] );
|
||||
precachemenu( game["menu_changeclass_custom_splitscreen"] );
|
||||
}
|
||||
|
||||
precachemenu( game["menu_controls"] );
|
||||
}
|
||||
|
||||
precachemenu( game["menu_team"] );
|
||||
precachemenu( game["menu_class_allies"] );
|
||||
precachemenu( game["menu_class_axis"] );
|
||||
precachemenu( game["menu_changeclass"] );
|
||||
precachemenu( game["menu_changeclass_allies"] );
|
||||
precachemenu( game["menu_changeclass_axis"] );
|
||||
precachemenu( game["menu_class"] );
|
||||
precachestring( &"MP_HOST_ENDED_GAME" );
|
||||
precachestring( &"MP_HOST_ENDGAME_RESPONSE" );
|
||||
}
|
||||
|
||||
level thread onplayerconnect();
|
||||
}
|
||||
|
||||
onplayerconnect()
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
level waittill( "connected", var_0 );
|
||||
var_0 thread watchforclasschange();
|
||||
var_0 thread watchforteamchange();
|
||||
var_0 thread watchforleavegame();
|
||||
var_0 thread connectedmenus();
|
||||
}
|
||||
}
|
||||
|
||||
connectedmenus()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
getclasschoice( var_0 )
|
||||
{
|
||||
if ( var_0 > 10 )
|
||||
{
|
||||
if ( var_0 > 10 && var_0 < 17 )
|
||||
{
|
||||
var_0 -= 10;
|
||||
var_0 = "axis_recipe" + var_0;
|
||||
}
|
||||
else if ( var_0 > 16 && var_0 < 23 )
|
||||
{
|
||||
var_0 -= 16;
|
||||
var_0 = "allies_recipe" + var_0;
|
||||
}
|
||||
}
|
||||
else
|
||||
var_0 = "custom" + var_0;
|
||||
|
||||
return var_0;
|
||||
}
|
||||
|
||||
watchforclasschange()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
level endon( "game_ended" );
|
||||
|
||||
for (;;)
|
||||
{
|
||||
self waittill( "luinotifyserver", var_0, var_1 );
|
||||
|
||||
if ( var_0 != "class_select" )
|
||||
continue;
|
||||
|
||||
if ( getdvarint( "systemlink" ) && getdvarint( "xblive_competitionmatch" ) && self ismlgspectator() )
|
||||
{
|
||||
self setclientomnvar( "ui_options_menu", 0 );
|
||||
continue;
|
||||
}
|
||||
|
||||
var_2 = isai( self ) || issubstr( self.name, "tcBot" );
|
||||
|
||||
if ( !var_2 )
|
||||
{
|
||||
if ( !isai( self ) && "" + var_1 != "callback" )
|
||||
self setclientomnvar( "ui_loadout_selected", var_1 );
|
||||
}
|
||||
|
||||
if ( isdefined( self.waitingtoselectclass ) && self.waitingtoselectclass )
|
||||
continue;
|
||||
|
||||
if ( !maps\mp\_utility::allowclasschoice() || maps\mp\_utility::showfakeloadout() )
|
||||
continue;
|
||||
|
||||
if ( "" + var_1 != "callback" )
|
||||
{
|
||||
if ( isdefined( self.pers["isBot"] ) && self.pers["isBot"] )
|
||||
{
|
||||
self.pers["class"] = var_1;
|
||||
self.class = var_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_3 = var_1 + 1;
|
||||
var_3 = getclasschoice( var_3 );
|
||||
|
||||
if ( !isdefined( self.pers["class"] ) || var_3 == self.pers["class"] )
|
||||
continue;
|
||||
|
||||
self.pers["class"] = var_3;
|
||||
self.class = var_3;
|
||||
|
||||
if ( level.ingraceperiod && !self.hasdonecombat )
|
||||
{
|
||||
maps\mp\gametypes\_class::setclass( self.pers["class"] );
|
||||
self.tag_stowed_back = undefined;
|
||||
self._id_7E62 = undefined;
|
||||
maps\mp\gametypes\_class::giveloadout( self.pers["team"], self.pers["class"] );
|
||||
}
|
||||
else if ( isalive( self ) )
|
||||
self iprintlnbold( game["strings"]["change_class"] );
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
menuclass( "callback" );
|
||||
}
|
||||
}
|
||||
|
||||
watchforleavegame()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
level endon( "game_ended" );
|
||||
|
||||
for (;;)
|
||||
{
|
||||
self waittill( "luinotifyserver", var_0, var_1 );
|
||||
|
||||
if ( var_0 != "end_game" )
|
||||
continue;
|
||||
|
||||
if ( maps\mp\_utility::is_aliens() )
|
||||
{
|
||||
[[ level.forceendgame_alien ]]();
|
||||
continue;
|
||||
}
|
||||
|
||||
level thread maps\mp\gametypes\_gamelogic::forceend( var_1 );
|
||||
}
|
||||
}
|
||||
|
||||
watchforteamchange()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
level endon( "game_ended" );
|
||||
|
||||
for (;;)
|
||||
{
|
||||
self waittill( "luinotifyserver", var_0, var_1 );
|
||||
|
||||
if ( var_0 != "team_select" )
|
||||
continue;
|
||||
|
||||
if ( maps\mp\_utility::matchmakinggame() && !getdvarint( "force_ranking" ) )
|
||||
continue;
|
||||
|
||||
if ( var_1 != 3 )
|
||||
thread showloadoutmenu();
|
||||
|
||||
if ( var_1 == 3 )
|
||||
{
|
||||
self setclientomnvar( "ui_spectator_selected", 1 );
|
||||
self setclientomnvar( "ui_loadout_selected", -1 );
|
||||
self.spectating_actively = 1;
|
||||
|
||||
if ( getdvarint( "systemlink" ) && getdvarint( "xblive_competitionmatch" ) )
|
||||
{
|
||||
self setmlgspectator( 1 );
|
||||
self.pers["mlgSpectator"] = 1;
|
||||
thread maps\mp\gametypes\_spectating::setmlgcamvisibility( 1 );
|
||||
thread maps\mp\gametypes\_spectating::setspectatepermissions();
|
||||
self setclientomnvar( "ui_options_menu", 2 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self setclientomnvar( "ui_spectator_selected", -1 );
|
||||
self.spectating_actively = 0;
|
||||
|
||||
if ( getdvarint( "systemlink" ) && getdvarint( "xblive_competitionmatch" ) )
|
||||
{
|
||||
self setmlgspectator( 0 );
|
||||
self.pers["mlgSpectator"] = 0;
|
||||
thread maps\mp\gametypes\_spectating::setmlgcamvisibility( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
self setclientomnvar( "ui_team_selected", var_1 );
|
||||
|
||||
if ( var_1 == 0 )
|
||||
var_1 = "axis";
|
||||
else if ( var_1 == 1 )
|
||||
var_1 = "allies";
|
||||
else if ( var_1 == 2 )
|
||||
var_1 = "random";
|
||||
else
|
||||
var_1 = "spectator";
|
||||
|
||||
if ( isdefined( self.pers["team"] ) && var_1 == self.pers["team"] )
|
||||
{
|
||||
self notify( "selected_same_team" );
|
||||
continue;
|
||||
}
|
||||
|
||||
self setclientomnvar( "ui_loadout_selected", -1 );
|
||||
|
||||
if ( var_1 == "axis" )
|
||||
{
|
||||
thread setteam( "axis" );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( var_1 == "allies" )
|
||||
{
|
||||
thread setteam( "allies" );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( var_1 == "random" )
|
||||
{
|
||||
thread autoassign();
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( var_1 == "spectator" )
|
||||
thread setspectator();
|
||||
}
|
||||
}
|
||||
|
||||
showloadoutmenu()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
level endon( "game_ended" );
|
||||
common_scripts\utility::waittill_any( "joined_team", "selected_same_team" );
|
||||
self setclientomnvar( "ui_options_menu", 2 );
|
||||
}
|
||||
|
||||
autoassign()
|
||||
{
|
||||
if ( maps\mp\_utility::is_aliens() || level.gametype == "infect" )
|
||||
thread setteam( "allies" );
|
||||
else if ( ( getdvarint( "squad_match" ) == 1 || getdvarint( "squad_vs_squad" ) == 1 || getdvarint( "squad_use_hosts_squad" ) == 1 ) && isdefined( self.bot_team ) )
|
||||
thread setteam( self.bot_team );
|
||||
else if ( !isdefined( self.team ) )
|
||||
{
|
||||
if ( self ismlgspectator() )
|
||||
thread setspectator();
|
||||
else if ( level.teamcount["axis"] < level.teamcount["allies"] )
|
||||
thread setteam( "axis" );
|
||||
else if ( level.teamcount["allies"] < level.teamcount["axis"] )
|
||||
thread setteam( "allies" );
|
||||
else if ( getteamscore( "allies" ) > getteamscore( "axis" ) )
|
||||
thread setteam( "axis" );
|
||||
else
|
||||
thread setteam( "allies" );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( self ismlgspectator() )
|
||||
{
|
||||
thread setspectator();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( level.teamcount["axis"] < level.teamcount["allies"] && self.team != "axis" )
|
||||
{
|
||||
thread setteam( "axis" );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( level.teamcount["allies"] < level.teamcount["axis"] && self.team != "allies" )
|
||||
{
|
||||
thread setteam( "allies" );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( level.teamcount["allies"] == level.teamcount["axis"] )
|
||||
{
|
||||
if ( getteamscore( "allies" ) > getteamscore( "axis" ) && self.team != "axis" )
|
||||
thread setteam( "axis" );
|
||||
else if ( self.team != "allies" )
|
||||
thread setteam( "allies" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setteam( var_0 )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
|
||||
if ( !isai( self ) && level.teambased && !maps\mp\gametypes\_teams::getjointeampermissions( var_0 ) )
|
||||
return;
|
||||
|
||||
if ( level.ingraceperiod && !self.hasdonecombat )
|
||||
self.hasspawned = 0;
|
||||
|
||||
if ( self.sessionstate == "playing" )
|
||||
{
|
||||
self.switching_teams = 1;
|
||||
self.joining_team = var_0;
|
||||
self.leaving_team = self.pers["team"];
|
||||
}
|
||||
|
||||
addtoteam( var_0 );
|
||||
|
||||
if ( self.sessionstate == "playing" )
|
||||
self suicide();
|
||||
|
||||
waitforclassselect();
|
||||
endrespawnnotify();
|
||||
|
||||
if ( self.sessionstate == "spectator" )
|
||||
{
|
||||
if ( game["state"] == "postgame" )
|
||||
return;
|
||||
|
||||
if ( game["state"] == "playing" && !maps\mp\_utility::isinkillcam() )
|
||||
{
|
||||
if ( isdefined( self.waitingtospawnamortize ) && self.waitingtospawnamortize )
|
||||
return;
|
||||
|
||||
thread maps\mp\gametypes\_playerlogic::spawnclient();
|
||||
}
|
||||
|
||||
thread maps\mp\gametypes\_spectating::setspectatepermissions();
|
||||
}
|
||||
|
||||
self notify( "okToSpawn" );
|
||||
}
|
||||
|
||||
setspectator()
|
||||
{
|
||||
if ( isdefined( self.pers["team"] ) && self.pers["team"] == "spectator" )
|
||||
return;
|
||||
|
||||
if ( isalive( self ) )
|
||||
{
|
||||
self.switching_teams = 1;
|
||||
self.joining_team = "spectator";
|
||||
self.leaving_team = self.pers["team"];
|
||||
self suicide();
|
||||
}
|
||||
|
||||
self notify( "becameSpectator" );
|
||||
addtoteam( "spectator" );
|
||||
self.pers["class"] = undefined;
|
||||
self.class = undefined;
|
||||
thread maps\mp\gametypes\_playerlogic::spawnspectator();
|
||||
}
|
||||
|
||||
waitforclassselect()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
level endon( "game_ended" );
|
||||
self.waitingtoselectclass = 1;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if ( level.gametype == "infect" )
|
||||
{
|
||||
bypassclasschoice();
|
||||
break;
|
||||
}
|
||||
|
||||
if ( maps\mp\_utility::allowclasschoice() || maps\mp\_utility::showfakeloadout() && !isai( self ) )
|
||||
self waittill( "luinotifyserver", var_0, var_1 );
|
||||
else
|
||||
{
|
||||
bypassclasschoice();
|
||||
break;
|
||||
}
|
||||
|
||||
if ( var_0 != "class_select" )
|
||||
continue;
|
||||
|
||||
if ( self.team == "spectator" )
|
||||
continue;
|
||||
|
||||
if ( "" + var_1 != "callback" )
|
||||
{
|
||||
if ( isdefined( self.pers["isBot"] ) && self.pers["isBot"] )
|
||||
{
|
||||
self.pers["class"] = var_1;
|
||||
self.class = var_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_1 += 1;
|
||||
self.pers["class"] = getclasschoice( var_1 );
|
||||
self.class = getclasschoice( var_1 );
|
||||
}
|
||||
|
||||
self.waitingtoselectclass = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.waitingtoselectclass = 0;
|
||||
menuclass( "callback" );
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
beginclasschoice( var_0 )
|
||||
{
|
||||
var_1 = self.pers["team"];
|
||||
|
||||
if ( maps\mp\_utility::allowclasschoice() || maps\mp\_utility::showfakeloadout() && !isai( self ) )
|
||||
{
|
||||
self setclientomnvar( "ui_options_menu", 2 );
|
||||
|
||||
if ( !self ismlgspectator() )
|
||||
waitforclassselect();
|
||||
|
||||
endrespawnnotify();
|
||||
|
||||
if ( self.sessionstate == "spectator" )
|
||||
{
|
||||
if ( game["state"] == "postgame" )
|
||||
return;
|
||||
|
||||
if ( game["state"] == "playing" && !maps\mp\_utility::isinkillcam() )
|
||||
{
|
||||
if ( isdefined( self.waitingtospawnamortize ) && self.waitingtospawnamortize )
|
||||
return;
|
||||
|
||||
thread maps\mp\gametypes\_playerlogic::spawnclient();
|
||||
}
|
||||
|
||||
thread maps\mp\gametypes\_spectating::setspectatepermissions();
|
||||
}
|
||||
|
||||
self.connecttime = gettime();
|
||||
self notify( "okToSpawn" );
|
||||
}
|
||||
else
|
||||
thread bypassclasschoice();
|
||||
|
||||
if ( !isalive( self ) )
|
||||
thread maps\mp\gametypes\_playerlogic::predictabouttospawnplayerovertime( 0.1 );
|
||||
}
|
||||
|
||||
bypassclasschoice()
|
||||
{
|
||||
self.selectedclass = 1;
|
||||
self.waitingtoselectclass = 0;
|
||||
|
||||
if ( isdefined( level.bypassclasschoicefunc ) )
|
||||
{
|
||||
var_0 = self [[ level.bypassclasschoicefunc ]]();
|
||||
self.class = var_0;
|
||||
}
|
||||
else
|
||||
self.class = "class0";
|
||||
}
|
||||
|
||||
beginteamchoice()
|
||||
{
|
||||
self setclientomnvar( "ui_options_menu", 1 );
|
||||
}
|
||||
|
||||
showmainmenuforteam()
|
||||
{
|
||||
var_0 = self.pers["team"];
|
||||
self openpopupmenu( game["menu_class_" + var_0] );
|
||||
}
|
||||
|
||||
menuspectator()
|
||||
{
|
||||
if ( isdefined( self.pers["team"] ) && self.pers["team"] == "spectator" )
|
||||
return;
|
||||
|
||||
if ( isalive( self ) )
|
||||
{
|
||||
self.switching_teams = 1;
|
||||
self.joining_team = "spectator";
|
||||
self.leaving_team = self.pers["team"];
|
||||
self suicide();
|
||||
}
|
||||
|
||||
addtoteam( "spectator" );
|
||||
self.pers["class"] = undefined;
|
||||
self.class = undefined;
|
||||
thread maps\mp\gametypes\_playerlogic::spawnspectator();
|
||||
}
|
||||
|
||||
menuclass( var_0 )
|
||||
{
|
||||
if ( var_0 == "demolitions_mp,0" && self getrankedplayerdata( "featureNew", "demolitions" ) )
|
||||
self setrankedplayerdata( "featureNew", "demolitions", 0 );
|
||||
|
||||
if ( var_0 == "sniper_mp,0" && self getrankedplayerdata( "featureNew", "sniper" ) )
|
||||
self setrankedplayerdata( "featureNew", "sniper", 0 );
|
||||
|
||||
var_1 = self.pers["team"];
|
||||
var_2 = maps\mp\gametypes\_class::getclasschoice( var_0 );
|
||||
var_3 = maps\mp\gametypes\_class::getweaponchoice( var_0 );
|
||||
|
||||
if ( var_2 == "restricted" )
|
||||
{
|
||||
beginclasschoice();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( isdefined( self.pers["class"] ) && self.pers["class"] == var_2 && ( isdefined( self.pers["primary"] ) && self.pers["primary"] == var_3 ) )
|
||||
return;
|
||||
|
||||
if ( self.sessionstate == "playing" )
|
||||
{
|
||||
if ( isdefined( self.pers["lastClass"] ) && isdefined( self.pers["class"] ) )
|
||||
{
|
||||
self.pers["lastClass"] = self.pers["class"];
|
||||
self.lastclass = self.pers["lastClass"];
|
||||
}
|
||||
|
||||
self.pers["class"] = var_2;
|
||||
self.class = var_2;
|
||||
self.pers["primary"] = var_3;
|
||||
|
||||
if ( game["state"] == "postgame" )
|
||||
return;
|
||||
|
||||
if ( level.ingraceperiod && !self.hasdonecombat )
|
||||
{
|
||||
maps\mp\gametypes\_class::setclass( self.pers["class"] );
|
||||
self.tag_stowed_back = undefined;
|
||||
self._id_7E62 = undefined;
|
||||
maps\mp\gametypes\_class::giveloadout( self.pers["team"], self.pers["class"] );
|
||||
}
|
||||
else
|
||||
self iprintlnbold( game["strings"]["change_class"] );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( isdefined( self.pers["lastClass"] ) && isdefined( self.pers["class"] ) )
|
||||
{
|
||||
self.pers["lastClass"] = self.pers["class"];
|
||||
self.lastclass = self.pers["lastClass"];
|
||||
}
|
||||
|
||||
self.pers["class"] = var_2;
|
||||
self.class = var_2;
|
||||
self.pers["primary"] = var_3;
|
||||
|
||||
if ( game["state"] == "postgame" )
|
||||
return;
|
||||
|
||||
if ( game["state"] == "playing" && !maps\mp\_utility::isinkillcam() )
|
||||
thread maps\mp\gametypes\_playerlogic::spawnclient();
|
||||
}
|
||||
|
||||
thread maps\mp\gametypes\_spectating::setspectatepermissions();
|
||||
}
|
||||
|
||||
update_wargame_after_migration()
|
||||
{
|
||||
foreach ( var_1 in level.players )
|
||||
{
|
||||
if ( !isai( var_1 ) && var_1 ishost() )
|
||||
level.wargame_client = var_1;
|
||||
}
|
||||
}
|
||||
|
||||
addtoteam( var_0, var_1, var_2 )
|
||||
{
|
||||
if ( isdefined( self.team ) )
|
||||
{
|
||||
maps\mp\gametypes\_playerlogic::removefromteamcount();
|
||||
|
||||
if ( isdefined( var_2 ) && var_2 )
|
||||
maps\mp\gametypes\_playerlogic::decrementalivecount( self.team );
|
||||
}
|
||||
|
||||
self.pers["team"] = var_0;
|
||||
self.team = var_0;
|
||||
|
||||
if ( getdvar( "squad_vs_squad" ) == "1" )
|
||||
{
|
||||
if ( !isai( self ) )
|
||||
{
|
||||
if ( var_0 == "allies" )
|
||||
{
|
||||
if ( !isdefined( level.squad_vs_squad_allies_client ) )
|
||||
level.squad_vs_squad_allies_client = self;
|
||||
}
|
||||
else if ( var_0 == "axis" )
|
||||
{
|
||||
if ( !isdefined( level.squad_vs_squad_axis_client ) )
|
||||
level.squad_vs_squad_axis_client = self;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( getdvar( "squad_match" ) == "1" )
|
||||
{
|
||||
if ( !isai( self ) && self ishost() )
|
||||
{
|
||||
if ( !isdefined( level.squad_match_client ) )
|
||||
level.squad_match_client = self;
|
||||
}
|
||||
}
|
||||
|
||||
if ( getdvar( "squad_use_hosts_squad" ) == "1" )
|
||||
{
|
||||
if ( !isai( self ) && self ishost() )
|
||||
{
|
||||
if ( !isdefined( level.wargame_client ) )
|
||||
level.wargame_client = self;
|
||||
}
|
||||
}
|
||||
|
||||
// session team is readonly in ranked matches if "teambased" is set on the playlist
|
||||
if ( level.teambased )
|
||||
self.sessionteam = var_0;
|
||||
else if ( var_0 == "spectator" )
|
||||
self.sessionteam = "spectator";
|
||||
else
|
||||
self.sessionteam = "none";
|
||||
|
||||
if ( game["state"] != "postgame" )
|
||||
{
|
||||
maps\mp\gametypes\_playerlogic::addtoteamcount();
|
||||
|
||||
if ( isdefined( var_2 ) && var_2 )
|
||||
maps\mp\gametypes\_playerlogic::incrementalivecount( self.team );
|
||||
}
|
||||
|
||||
maps\mp\_utility::updateobjectivetext();
|
||||
|
||||
if ( isdefined( var_1 ) && var_1 )
|
||||
waittillframeend;
|
||||
|
||||
maps\mp\_utility::updatemainmenu();
|
||||
|
||||
if ( var_0 == "spectator" )
|
||||
{
|
||||
self notify( "joined_spectators" );
|
||||
level notify( "joined_team", self );
|
||||
}
|
||||
else
|
||||
{
|
||||
self notify( "joined_team" );
|
||||
level notify( "joined_team", self );
|
||||
}
|
||||
}
|
||||
|
||||
endrespawnnotify()
|
||||
{
|
||||
self.waitingtospawn = 0;
|
||||
self notify( "end_respawn" );
|
||||
}
|
1902
iw6x/data/maps/mp/gametypes/_playerlogic.gsc
Normal file
23
iw6x/data/scripts/_team_balance.gsc
Normal file
@ -0,0 +1,23 @@
|
||||
init()
|
||||
{
|
||||
// define onteamselection callback function used in balanceteams()
|
||||
level.onteamselection = ::set_team;
|
||||
}
|
||||
|
||||
set_team(team)
|
||||
{
|
||||
if (team != self.pers["team"])
|
||||
{
|
||||
self.switching_teams = true;
|
||||
self.joining_team = team;
|
||||
self.leaving_team = self.pers["team"];
|
||||
}
|
||||
|
||||
if (self.sessionstate == "playing")
|
||||
{
|
||||
self suicide();
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_menus::addtoteam(team);
|
||||
maps\mp\gametypes\_menus::endrespawnnotify();
|
||||
}
|
BIN
iw6x/data/sound/patch-3-music.flac
Normal file
497
iw6x/data/ui_scripts/main_menu/__init__.lua
Normal file
@ -0,0 +1,497 @@
|
||||
if (game:issingleplayer() or not Engine.InFrontend()) then
|
||||
return
|
||||
end
|
||||
|
||||
package.loaded["LUI.mp_menus.MPMainMenu"].main_menu_options_feeder = function( f17_arg0 )
|
||||
local f17_local0 = Engine.IsAliensMode()
|
||||
local f17_local1 = SvS.IsSvS()
|
||||
local f17_local2 = false
|
||||
if Engine.GetDvarInt( "allow_online_squads" ) == 1 or not Engine.IsConsoleGame() then
|
||||
f17_local2 = true
|
||||
end
|
||||
local f17_local3 = Engine.DoWeNeedCompatibilityPacks()
|
||||
if f17_local1 then
|
||||
local f17_local4 = f17_local2
|
||||
end
|
||||
local f17_local5 = f17_local4 or not f17_local1
|
||||
local f17_local6 = {}
|
||||
if Engine.AllowOnline() and f17_local5 then
|
||||
local f17_local7, f17_local8 = nil
|
||||
if f17_local1 then
|
||||
f17_local8 = Engine.Localize( "@PLATFORM_PLAY_ONLINE_SQUADS_CAPS" )
|
||||
f17_local7 = Engine.Localize( "@LUA_MENU_SQUADS_INTRO" )
|
||||
elseif f17_local0 then
|
||||
f17_local8 = Engine.Localize( "@PLATFORM_PLAY_ONLINE_CAPS" )
|
||||
f17_local7 = Engine.Localize( "@LUA_MENU_PLAY_EXTINCTION_ONLINE_DESC" )
|
||||
else
|
||||
f17_local8 = Engine.Localize( "@PLATFORM_PLAY_ONLINE_CAPS" )
|
||||
f17_local7 = Engine.Localize( "@PLATFORM_PLAY_ONLINE_DESC" )
|
||||
end
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPMain_0",
|
||||
disabled = f17_local3,
|
||||
disabledFunc = Engine.DoWeNeedCompatibilityPacks,
|
||||
properties = {
|
||||
button_text = f17_local8,
|
||||
button_action_func = LUI.mp_menus.MPMainMenu.xboxLiveButtonAction,
|
||||
desc_text = f17_local7,
|
||||
button_over_func = function ( f18_arg0, f18_arg1 )
|
||||
PersistentBackground.SetToDefault()
|
||||
end
|
||||
}
|
||||
}
|
||||
end
|
||||
if Engine.IsConsoleGame() then
|
||||
local f17_local7 = "@LUA_MENU_SPLITSCREEN_CAPS"
|
||||
if f17_local0 then
|
||||
f17_local7 = "@LUA_MENU_LOCAL_CAPS"
|
||||
elseif f17_local1 then
|
||||
f17_local7 = "@LUA_MENU_LOCAL_CAPS"
|
||||
end
|
||||
local f17_local8 = #f17_local6 + 1
|
||||
local f17_local9 = {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPMain_1",
|
||||
disabled = f17_local3,
|
||||
disabledFunc = Engine.DoWeNeedCompatibilityPacks
|
||||
}
|
||||
local f17_local10 = {
|
||||
button_text = Engine.Localize( f17_local7 ),
|
||||
button_action_func = splitScreenButtonAction
|
||||
}
|
||||
local f17_local11
|
||||
if f17_local1 then
|
||||
f17_local11 = Engine.Localize( "@LUA_MENU_SQUAD_LOCAL_PLAY_DESC" )
|
||||
if not f17_local11 then
|
||||
|
||||
else
|
||||
f17_local10.desc_text = f17_local11
|
||||
f17_local10.button_over_func = function ( f19_arg0, f19_arg1 )
|
||||
PersistentBackground.SetToDefault()
|
||||
end
|
||||
|
||||
f17_local9.properties = f17_local10
|
||||
f17_local6[f17_local8] = f17_local9
|
||||
if not f17_local1 then
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPMain_2",
|
||||
disabled = f17_local3,
|
||||
disabledFunc = Engine.DoWeNeedCompatibilityPacks,
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@PLATFORM_SYSTEM_LINK_CAPS" ),
|
||||
button_action_func = LUI.mp_menus.MPMainMenu.systemLinkButtonAction,
|
||||
desc_text = Engine.Localize( "@PLATFORM_SYSTEM_LINK_DESC" ),
|
||||
button_over_func = function ( f20_arg0, f20_arg1 )
|
||||
PersistentBackground.SetToDefault()
|
||||
end
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
f17_local11 = Engine.Localize( "@LUA_MENU_SPLITSCREEN_DESC" )
|
||||
end
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPMain_6",
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_OPTIONS_CAPS" ),
|
||||
button_action_func = LUI.mp_menus.MPMainMenu.optionsButtonAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_OPTIONS_DESC" ),
|
||||
button_over_func = function ( f22_arg0, f22_arg1 )
|
||||
PersistentBackground.SetToDefault()
|
||||
end
|
||||
}
|
||||
}
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "generic_separator",
|
||||
id = "main_menu_spacer_id"
|
||||
}
|
||||
if not Engine.IsCoreMode() then
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPMain_7",
|
||||
properties = {
|
||||
text = Engine.Localize( "@LUA_MENU_MULTIPLAYER_CAPS" ),
|
||||
button_action_func = function ( f23_arg0, f23_arg1 )
|
||||
Engine.StopMusic( 200 )
|
||||
Engine.SwitchToCoreMode()
|
||||
Engine.PlayMusic( CoD.Music.MainMPMusic )
|
||||
Engine.SetActiveMenu( ActiveMenus.None )
|
||||
Engine.SetActiveMenu( ActiveMenus.Main )
|
||||
end,
|
||||
button_over_func = function ( f24_arg0, f24_arg1 )
|
||||
PersistentBackground.Set( PersistentBackground.Variants.MPBackground )
|
||||
end,
|
||||
desc_text = Engine.Localize( "@PLATFORM_PLAY_ONLINE_DESC" )
|
||||
}
|
||||
}
|
||||
end
|
||||
if not SvS.IsSvS() then
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPMain_8",
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_SQUAD_MODE_CAP" ),
|
||||
button_action_func = function ( f25_arg0, f25_arg1 )
|
||||
Engine.StopMusic( 200 )
|
||||
Engine.SwitchToSquadVsSquadMode()
|
||||
Engine.PlayMusic( CoD.Music.MainSquadMusic )
|
||||
Engine.SetActiveMenu( ActiveMenus.None )
|
||||
Engine.SetActiveMenu( ActiveMenus.Main )
|
||||
end,
|
||||
button_over_func = function ( f26_arg0, f26_arg1 )
|
||||
PersistentBackground.Set( PersistentBackground.Variants.SvSBackground )
|
||||
end,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_SVS_MAIN_MENU_DESC" )
|
||||
}
|
||||
}
|
||||
end
|
||||
if not Engine.IsAliensMode() and Engine.UnlockedAliens() then
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPMain_9",
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_ALIENS_CAPS" ),
|
||||
button_action_func = function ( f27_arg0, f27_arg1 )
|
||||
Engine.StopMusic( 200 )
|
||||
Engine.SwitchToAliensMode()
|
||||
Engine.PlayMusic( CoD.Music.MainExtinctMusic )
|
||||
Engine.SetActiveMenu( ActiveMenus.None )
|
||||
Engine.SetActiveMenu( ActiveMenus.Main )
|
||||
end,
|
||||
button_over_func = function ( f28_arg0, f28_arg1 )
|
||||
PersistentBackground.Set( PersistentBackground.Variants.AliensBackground )
|
||||
end,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_ALIENS_MAIN_MENU_DESC" ),
|
||||
additional_handlers = {
|
||||
menu_create = AddExtinctionGlowBackground
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "button_desc_text",
|
||||
id = "mp_menu_button_description_id",
|
||||
properties = {
|
||||
lines = SvS.IsSvS() and 8 or nil
|
||||
}
|
||||
}
|
||||
return f17_local6
|
||||
end
|
||||
|
||||
package.loaded["LUI.mp_menus.MPXboxLiveMenu"].XboxLiveOptionsFeeder = function( f29_arg0 )
|
||||
local f29_local0 = Engine.IsAliensMode()
|
||||
local f29_local1 = SvS.IsSvS()
|
||||
local f29_local2 = SvS.IsSvS()
|
||||
if f29_local2 then
|
||||
f29_local2 = SvS.GetCurrentSquadModeInfo()
|
||||
end
|
||||
local f29_local3 = {}
|
||||
local f29_local4 = nil
|
||||
if f29_local0 then
|
||||
f29_local4 = Engine.Localize( "@LUA_MENU_STORE_CAPS" ) -- Orginally @LUA_MENU_PUBLIC_MATCH_CAPS but we need to use @LUA_MENU_STORE_CAPS
|
||||
elseif f29_local1 then
|
||||
f29_local4 = Engine.Localize( "@PLATFORM_FIND_GAME_CAPS" )
|
||||
else
|
||||
f29_local4 = Engine.Localize( "@LUA_MENU_STORE_CAPS" ) -- Orginally @PLATFORM_FIND_GAME_CAPS but we need to use @LUA_MENU_STORE_CAPS
|
||||
end
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "find_match_button_id",
|
||||
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
|
||||
properties = {
|
||||
button_text = f29_local4,
|
||||
button_action_func = FindMatchAction,
|
||||
desc_text = SvS.IsSvS() and Engine.Localize( "@LUA_MENU_SQUADS_FIND_MATCH_DESC" ) or Engine.Localize( "@LUA_MENU_STORE_DESC" ), -- Orginally @PLATFORM_DESC_FIND_GAME but we need to use @LUA_MENU_STORE_DESC
|
||||
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
|
||||
additional_handlers = {
|
||||
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
|
||||
}
|
||||
}
|
||||
}
|
||||
if f29_local0 then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "solo_match_button_id",
|
||||
disabled = LUI.mp_menus.MPXboxLiveMenu.shouldDisableSoloMatch(),
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_SOLO_MATCH_CAPS" ),
|
||||
button_action_func = LUI.mp_menus.MPXboxLiveMenu.SoloMatchAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_SOLO_MATCH_DESC" ),
|
||||
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.shouldDisableSoloMatch,
|
||||
additional_handlers = {
|
||||
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
|
||||
}
|
||||
}
|
||||
}
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "private_match_button_id",
|
||||
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_CUSTOM_MATCH_CAPS" ),
|
||||
button_action_func = LUI.mp_menus.MPXboxLiveMenu.PrivateMatchAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_DESC_PRIVATE_MATCH" ),
|
||||
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
|
||||
additional_handlers = {
|
||||
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
if not f29_local0 then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "create_squad_button_id",
|
||||
disabled = false,
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_CREATE_A_CLASS_CAPS" ),
|
||||
button_action_func = LUI.mp_menus.MPXboxLiveMenu.CreateSquadAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_DESC_CREATE_A_CLASS" ),
|
||||
additional_handlers = {
|
||||
refresh_new_icons = function ( f30_arg0, f30_arg1 )
|
||||
if Cac.AnyUnseenMDLCItems( Engine.GetFirstActiveController(), NewIconsTable.CACItemTypes ) then
|
||||
f30_arg0:processEvent( {
|
||||
name = "show_new_icon"
|
||||
} )
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
f29_local3[#f29_local3 + 1] = LUI.mp_menus.AliensLoadout.GetAliensLoadoutButton()
|
||||
end
|
||||
local f29_local5 = {
|
||||
type = "UIGenericButton",
|
||||
id = "leaderboards_button_id",
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_LEADERBOARDS_CAPS" ),
|
||||
desc_text = Engine.Localize( "@LUA_MENU_DESC_LEADERBOARDS" ),
|
||||
button_action_func = function ( f31_arg0, f31_arg1 )
|
||||
if Engine.IsUserAGuest( f31_arg1.controller ) then
|
||||
LUI.FlowManager.RequestPopupMenu( f31_arg0, "popup_no_guest", true, f31_arg1.controller )
|
||||
else
|
||||
LUI.FlowManager.RequestAddMenu( f31_arg0, "leaderboards", true, f31_arg1.controller )
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
if f29_local1 and f29_local2.HasLeaderboard then
|
||||
f29_local3[#f29_local3 + 1] = f29_local5
|
||||
end
|
||||
if f29_local1 and f29_local2 and f29_local2.HasReports then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "squad_reports_button_id",
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_SQUAD_REPORTS" ),
|
||||
desc_text = Engine.Localize( "@LUA_MENU_SQUAD_REPORTS_DESC" ),
|
||||
button_action_func = function ( f32_arg0, f32_arg1 )
|
||||
LUI.FlowManager.RequestAddMenu( f32_arg0, "squad_reports_menu", false, f32_arg1.controller, false, {
|
||||
controller = f32_arg1.controller
|
||||
} )
|
||||
end
|
||||
}
|
||||
}
|
||||
end
|
||||
if not f29_local0 and not f29_local1 then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "operations_button_id",
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_OPERATIONS_TITLE" ),
|
||||
button_action_func = LUI.mp_menus.MPBarracks.BarrackOperationsAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_DESC_CHALLENGES" )
|
||||
}
|
||||
}
|
||||
end
|
||||
if not f29_local0 then
|
||||
if not f29_local1 then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "barracks_button_id",
|
||||
disabled = false,
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_BARRACKS_CAPS" ),
|
||||
button_action_func = BarracksAction,
|
||||
desc_text = Clan.IsEnabled() and Engine.Localize( "@LUA_MENU_DESC_BARRACKS" ) or Engine.Localize( "@LUA_MENU_DESC_BARRACKS_PRIVATE" )
|
||||
}
|
||||
}
|
||||
end
|
||||
if not f29_local1 or f29_local2 ~= SvS.SquadModes.SquadVsSquad then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "generic_separator"
|
||||
}
|
||||
end
|
||||
if not f29_local1 then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "private_match_button_id",
|
||||
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_PRIVATE_MATCH_CAPS" ),
|
||||
button_action_func = LUI.mp_menus.MPXboxLiveMenu.PrivateMatchAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_DESC_PRIVATE_MATCH" ),
|
||||
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
|
||||
additional_handlers = {
|
||||
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
if f29_local1 then
|
||||
if f29_local2 == SvS.SquadModes.SquadAssault then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "squad_match_button_id",
|
||||
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
|
||||
properties = {
|
||||
button_text = Engine.Localize( "LUA_MENU_CHALLENGE_FRIEND_CAPS" ),
|
||||
button_action_func = function ( f35_arg0, f35_arg1 )
|
||||
if IsFirstTimeFlowRequired( f35_arg1.controller ) then
|
||||
LUI.FlowManager.RequestAddMenu( f35_arg0, "cac_member_select_main", true, f35_arg1.controller, false, {
|
||||
next_screen = "cac_edit_main",
|
||||
squad_location = "squadMembers",
|
||||
class_location = "loadouts",
|
||||
findMatch = true
|
||||
} )
|
||||
elseif CheckHasRequiredDLC( f35_arg0 ) then
|
||||
LUI.FlowManager.RequestPopupMenu( f35_arg0, "popup_friends", true, f35_arg1.controller, false, {
|
||||
challengeMode = true
|
||||
} )
|
||||
end
|
||||
end,
|
||||
desc_text = Engine.Localize( "LUA_MENU_CHALLENGE_FRIEND_DESC" ),
|
||||
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
|
||||
additional_handlers = {
|
||||
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
if f29_local2 and not f29_local2.RequiresMatchmaking then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "play_now_button_id",
|
||||
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
|
||||
properties = {
|
||||
button_text = Engine.Localize( "LUA_MENU_PLAY_NOW_CAPS" ),
|
||||
button_action_func = function ( f36_arg0, f36_arg1 )
|
||||
f36_arg1.squadsPlayNow = true
|
||||
FindMatchAction( f36_arg0, f36_arg1 )
|
||||
end,
|
||||
desc_text = Engine.Localize( "LUA_MENU_PLAY_NOW_DESC" ),
|
||||
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
|
||||
additional_handlers = {
|
||||
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
local f29_local6 = #f29_local3 + 1
|
||||
local f29_local7 = {
|
||||
type = "button_desc_text",
|
||||
id = "prelobby_description_id"
|
||||
}
|
||||
local f29_local8 = {}
|
||||
local f29_local9
|
||||
if not (not SvS.IsSvS() or f29_local2 ~= SvS.SquadModes.SquadAssault) or Engine.IsAliensMode() or Engine.IsCoreMode() then
|
||||
f29_local9 = 1
|
||||
if not f29_local9 then
|
||||
|
||||
else
|
||||
f29_local8.lines = f29_local9
|
||||
f29_local7.properties = f29_local8
|
||||
f29_local3[f29_local6] = f29_local7
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UITimer",
|
||||
id = "bnt_lock_tmr",
|
||||
properties = {
|
||||
event = "check_buttons",
|
||||
interval = 500,
|
||||
disposable = false,
|
||||
broadcastToRoot = true
|
||||
}
|
||||
}
|
||||
return f29_local3
|
||||
end
|
||||
end
|
||||
f29_local9 = nil
|
||||
end
|
||||
|
||||
function FindMatchAction( f5_arg0, f5_arg1 )
|
||||
if Lobby.EnteringLobby() == true then
|
||||
LUI.FlowManager.RequestPopupMenu( f5_arg0, "popup_throttling", true, f5_arg1.controller, false, {
|
||||
eventData = f5_arg1
|
||||
} )
|
||||
else
|
||||
FindMatchAfterThrottleEvent( f5_arg0, f5_arg1 )
|
||||
end
|
||||
end
|
||||
|
||||
function FindMatchAfterThrottleEvent( f4_arg0, f4_arg1 )
|
||||
local f4_local0 = false
|
||||
local f4_local1 = -1
|
||||
for f4_local2 = 0, Engine.GetMaxControllerCount() - 1, 1 do
|
||||
if Engine.HasActiveLocalClient( f4_local2 ) and IsFirstTimeFlowRequired( f4_local2 ) then
|
||||
f4_local0 = true
|
||||
if f4_local1 < 0 then
|
||||
f4_local1 = f4_local2
|
||||
end
|
||||
end
|
||||
end
|
||||
if f4_local0 then
|
||||
LUI.FlowManager.RequestAddMenu( f4_arg0, "cac_member_select_main", true, f4_local1, false, {
|
||||
next_screen = "cac_edit_main",
|
||||
squad_location = "squadMembers",
|
||||
class_location = "loadouts",
|
||||
findMatch = true
|
||||
} )
|
||||
elseif not LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons() then
|
||||
Engine.Exec( "xblive_privatematch 0" )
|
||||
if Engine.IsAliensMode() then
|
||||
LUI.mp_menus.Aliens.AliensRunConfig( f4_arg1.controller )
|
||||
end
|
||||
if LUI.mp_menus.MPXboxLiveMenu.CheckHasRequiredDLC( f4_arg0 ) then
|
||||
if LUI.mp_menus.MPXboxLiveMenu.DisplayLowRepWarning( f4_arg0, f4_arg1 ) then
|
||||
return
|
||||
elseif SvS.IsSvS() then
|
||||
local f4_local3 = SvS.GetCurrentSquadModeInfo()
|
||||
local f4_local4, f4_local5 = SvS.GetPlaylistFromSquadMode( f4_local3 )
|
||||
local f4_local6 = false
|
||||
if f4_arg1.squadsPlayNow then
|
||||
f4_local6 = true
|
||||
end
|
||||
if not f4_arg1.squadsPlayNow and f4_local3.DynamicMatchmaking then
|
||||
Playlist.DoAction( f4_local4, f4_local5, true, f4_local6 )
|
||||
else
|
||||
Playlist.DoAction( f4_local4, f4_local5, false, f4_local6 )
|
||||
end
|
||||
if Engine.GetDvarBool( "squad_match" ) then
|
||||
Squad.StartMatch( f4_arg1.controller, true )
|
||||
Engine.SetDvarBool( "squad_find_match", true )
|
||||
end
|
||||
LUI.FlowManager.RequestAddMenu( f4_arg0, "menu_xboxlive_lobby", false, f4_arg1.controller, false )
|
||||
else
|
||||
LUI.FlowManager.RequestPopupMenu( f4_arg0, "menu_systemlink_join" ) -- open server list instead of playlist_main
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function BarracksAction( f9_arg0, f9_arg1 )
|
||||
LUI.FlowManager.RequestAddMenu( f9_arg0, "menu_stats", true, f9_arg1.controller ) -- custom stats menu
|
||||
end
|
||||
|
||||
-- Remove social button
|
||||
LUI.MenuBuilder.m_definitions["online_friends_widget"] = function()
|
||||
return {
|
||||
type = "UIElement"
|
||||
}
|
||||
end
|
436
iw6x/data/ui_scripts/server_filter/__init__.lua
Normal file
@ -0,0 +1,436 @@
|
||||
if (game:issingleplayer() or not Engine.InFrontend()) then
|
||||
return
|
||||
end
|
||||
|
||||
local Lobby = luiglobals.Lobby
|
||||
|
||||
game:addlocalizedstring("LUA_MENU_SERVER_FILTER_POPUP_INSTR", "Change how the servers are filtered")
|
||||
|
||||
function FiltersPopupClose(f1_arg0, f1_arg1)
|
||||
local f1_local0 = LUI.FlowManager.GetMenuScopedDataFromElement(f1_arg0)
|
||||
local f1_local1 = LUI.FlowManager.GetMenuScopedDataByMenuName("mp_leaderboard_main")
|
||||
local f1_local2 = f1_local1.leaderboardType
|
||||
if f1_local2 and f1_local2 ~= "" then
|
||||
Leaderboards.OpenLeaderboard(f1_arg0, f1_local2, f1_local0.filterKey, f1_local1.filterDurationKey, f1_local1.isHardcore)
|
||||
end
|
||||
end
|
||||
|
||||
function mp_server_filters_popup()
|
||||
return {
|
||||
type = "UIElement",
|
||||
id = "mp_leaderboard_filters_popup_container_id",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
left = 0,
|
||||
right = 0
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "UIImage",
|
||||
id = "darken_bg",
|
||||
states = {
|
||||
default = CoD.ColorizeState(Swatches.Overlay.Color, {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
left = 0,
|
||||
right = 0,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
material = RegisterMaterial("white"),
|
||||
alpha = Swatches.Overlay.AlphaMore
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIElement",
|
||||
id = "mp_server_filters_popup_id",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = false,
|
||||
bottomAnchor = false,
|
||||
leftAnchor = false,
|
||||
rightAnchor = false,
|
||||
top = -1 * Leaderboards.Layout.FilterHeight * 0.6,
|
||||
width = Leaderboards.Layout.FilterWidth,
|
||||
height = 170
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "generic_drop_shadow",
|
||||
properties = {
|
||||
offset_shadow = 0
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "generic_menu_titlebar",
|
||||
id = "server_filters_popup_title_bar_id",
|
||||
properties = {
|
||||
title_bar_text = Engine.Localize("@LUA_MENU_FILTER_CAPS"),
|
||||
fill_alpha = 1
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "generic_menu_background",
|
||||
id = "server_filters_popup_background",
|
||||
properties = {
|
||||
fill_alpha = 1
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "mp_server_filters_popup_page"
|
||||
},
|
||||
{
|
||||
type = "UIBindButton",
|
||||
id = "filters_popup_back_button",
|
||||
handlers = {
|
||||
button_secondary = MBh.DoMultiple({
|
||||
MBh.LeaveMenu(),
|
||||
FiltersPopupClose,
|
||||
ForceRefreshServers
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
function ForceRefreshServers(f4_arg0, f4_arg1)
|
||||
local f4_local0 = LUI.FlowManager.GetMenuScopedDataByMenuName("menu_systemlink_join")
|
||||
f4_local0.serverCount = 0
|
||||
if f4_local0.serverList then
|
||||
local f4_local1 = Lobby.RefreshServerList
|
||||
local f4_local2 = f4_arg1.controller
|
||||
if not f4_local2 then
|
||||
f4_local2 = Engine.GetFirstActiveController()
|
||||
end
|
||||
f4_local1(f4_local2)
|
||||
f4_local0.serverList:processEvent({
|
||||
name = "lose_focus",
|
||||
immediate = true
|
||||
})
|
||||
f4_local0.serverList:clearSavedState()
|
||||
f4_local0.serverList:processEvent({
|
||||
name = "menu_refresh",
|
||||
dispatchChildren = true
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
function OpenFiltersMenu(f36_arg0, f36_arg1)
|
||||
LUI.FlowManager.RequestPopupMenu(f36_arg0, "mp_server_filters_popup", true, f36_arg1.controller, false, {})
|
||||
end
|
||||
|
||||
LUI.MenuBuilder.registerDef("mp_server_filters_popup", mp_server_filters_popup)
|
||||
|
||||
GameTypeRefCol = 0
|
||||
GameTypeNameCol = 1
|
||||
GameTypeDescCol = 2
|
||||
GameTypeImageCol = 3
|
||||
|
||||
function GetGametypes()
|
||||
if Engine.IsCoreMode() then
|
||||
return { "any", "dm", "war", "sd", "dom", "conf", "sr", "infect", "blitz", "grind", "cranked", "sotf", "sotf_ffa",
|
||||
"horde", "gun", "grnd", "siege" }
|
||||
end
|
||||
return { "aliens" }
|
||||
end
|
||||
|
||||
function GetLocalizedStringFromGametype(gametype)
|
||||
if gametype == "any" then
|
||||
return string.upper(Engine.Localize("LUA_MENU_LB_FILTER_GROUP_ALL"))
|
||||
end
|
||||
local gametype_name = Engine.TableLookup("mp/gameTypesTable.csv", GameTypeRefCol, gametype, GameTypeNameCol)
|
||||
if gametype_name ~= "" then
|
||||
local token = "@"
|
||||
local caps_token = "_CAPS"
|
||||
localized = Engine.Localize(token .. gametype_name .. caps_token)
|
||||
return localized
|
||||
end
|
||||
return "UNKNOWN"
|
||||
end
|
||||
|
||||
function GetMapnameFromID(id)
|
||||
if id == "any" then
|
||||
return string.upper(Engine.Localize("LUA_MENU_LB_FILTER_GROUP_ALL"))
|
||||
end
|
||||
|
||||
if id == "mp_descent_new" then
|
||||
return Engine.Localize("@LUA_MENU_MAPNAME_DESCENT_CAPS")
|
||||
elseif id == "mp_favela_iw6" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_FAVELA_IW6"))
|
||||
elseif id == "mp_conflict" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_CONFLICT"))
|
||||
elseif id == "mp_mine" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_MINE"))
|
||||
elseif id == "mp_shipment_ns" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_SHIPMENT_NS"))
|
||||
elseif id == "mp_zerosub" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_ZEROSUB"))
|
||||
elseif id == "mp_ca_red_river" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_CA_RED_RIVER"))
|
||||
elseif id == "mp_ca_rumble" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_CA_RUMBLE"))
|
||||
end
|
||||
|
||||
if id == "mp_alien_town" then
|
||||
return string.upper(Engine.Localize("@MPUI_ALIEN_TOWN"))
|
||||
elseif id == "mp_alien_armory" then
|
||||
return string.upper(Engine.Localize("@MPUI_ALIEN_ARMORY"))
|
||||
elseif id == "mp_alien_beacon" then
|
||||
return string.upper(Engine.Localize("@MPUI_ALIEN_BEACON"))
|
||||
elseif id == "mp_alien_dlc3" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_ALIEN_DLC3"))
|
||||
elseif id == "mp_alien_last" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_ALIEN_LAST"))
|
||||
end
|
||||
|
||||
return Engine.Localize("@LUA_MENU_MAPNAME_" .. id:sub(4) .. "_CAPS")
|
||||
end
|
||||
|
||||
function GetMaps()
|
||||
if Engine.IsCoreMode() then
|
||||
return {
|
||||
"any",
|
||||
"mp_prisonbreak",
|
||||
"mp_dart",
|
||||
"mp_lonestar",
|
||||
"mp_frag",
|
||||
"mp_snow",
|
||||
"mp_fahrenheit",
|
||||
"mp_hashima",
|
||||
"mp_warhawk",
|
||||
"mp_sovereign",
|
||||
"mp_zebra",
|
||||
"mp_skeleton",
|
||||
"mp_chasm",
|
||||
"mp_flooded",
|
||||
"mp_strikezone",
|
||||
"mp_descent_new",
|
||||
"mp_ca_red_river",
|
||||
"mp_ca_rumble",
|
||||
"mp_swamp",
|
||||
"mp_boneyard_ns",
|
||||
"mp_dome_ns",
|
||||
"mp_battery3",
|
||||
"mp_ca_impact",
|
||||
"mp_ca_behemoth",
|
||||
"mp_dig",
|
||||
"mp_zulu",
|
||||
"mp_pirate",
|
||||
"mp_favela_iw6",
|
||||
"mp_zerosub",
|
||||
"mp_conflict",
|
||||
"mp_mine",
|
||||
"mp_shipment_ns",
|
||||
}
|
||||
elseif Engine.IsAliensMode() then
|
||||
return {
|
||||
"any",
|
||||
"mp_alien_town",
|
||||
"mp_alien_armory",
|
||||
"mp_alien_beacon",
|
||||
"mp_alien_dlc3",
|
||||
"mp_alien_last"
|
||||
}
|
||||
end
|
||||
|
||||
return { "any" }
|
||||
end
|
||||
|
||||
function ServerFiltersPopupItems(f7_arg0)
|
||||
|
||||
local rules = {}
|
||||
if Engine.IsCoreMode() then
|
||||
local gametype = {
|
||||
type = "UIGenericButton",
|
||||
id = "server_filters_gametype",
|
||||
properties = {
|
||||
style = GenericButtonSettings.Styles.GlassButton,
|
||||
substyle = GenericButtonSettings.Styles.GlassButton.SubStyles.SubMenu,
|
||||
variant = GenericButtonSettings.Variants.Select,
|
||||
content_width = 258,
|
||||
side = "left",
|
||||
button_text = Engine.Localize("@LUA_MENU_MODE_CAPS"),
|
||||
button_display_func = function(f8_arg0, f8_arg1)
|
||||
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f8_arg0)
|
||||
if focusedElement.filterGametypeKey == nil then
|
||||
focusedElement.filterGametypeKey = Engine.GetDvarString("ui_mapvote_entrya_gametype")
|
||||
end
|
||||
Engine.SetDvarString("ui_mapvote_entrya_gametype", focusedElement.filterGametypeKey)
|
||||
return Engine.Localize(GetLocalizedStringFromGametype(focusedElement.filterGametypeKey))
|
||||
end,
|
||||
button_left_func = function(f9_arg0, f9_arg1)
|
||||
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f9_arg0)
|
||||
local keys = GetGametypes()
|
||||
local defaultKeysI = 1
|
||||
for i = 1, #keys, 1 do
|
||||
if keys[i] == focusedElement.filterGametypeKey then
|
||||
defaultKeysI = i
|
||||
break
|
||||
end
|
||||
end
|
||||
defaultKeysI = defaultKeysI - 1
|
||||
if defaultKeysI < 1 then
|
||||
focusedElement.filterGametypeKey = keys[#keys]
|
||||
else
|
||||
focusedElement.filterGametypeKey = keys[defaultKeysI]
|
||||
end
|
||||
end,
|
||||
button_right_func = function(f10_arg0, f10_arg1)
|
||||
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f10_arg0)
|
||||
local keys = GetGametypes()
|
||||
local defaultKeysI = 1
|
||||
for i = 1, #keys, 1 do
|
||||
if keys[i] == focusedElement.filterGametypeKey then
|
||||
defaultKeysI = i
|
||||
break
|
||||
end
|
||||
end
|
||||
defaultKeysI = defaultKeysI + 1
|
||||
if #keys < defaultKeysI then
|
||||
focusedElement.filterGametypeKey = keys[1]
|
||||
else
|
||||
focusedElement.filterGametypeKey = keys[defaultKeysI]
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
table.insert(rules, gametype)
|
||||
end
|
||||
|
||||
local maps = {
|
||||
type = "UIGenericButton",
|
||||
id = "server_filters_map",
|
||||
properties = {
|
||||
style = GenericButtonSettings.Styles.GlassButton,
|
||||
substyle = GenericButtonSettings.Styles.GlassButton.SubStyles.SubMenu,
|
||||
variant = GenericButtonSettings.Variants.Select,
|
||||
content_width = 258,
|
||||
side = "left",
|
||||
button_text = Engine.Localize("@LUA_MENU_MAPS_CAPS"),
|
||||
button_display_func = function(f8_arg0, f8_arg1)
|
||||
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f8_arg0)
|
||||
if focusedElement.filterMapnameKey == nil then
|
||||
focusedElement.filterMapnameKey = Engine.GetDvarString("ui_mapvote_entrya_mapname")
|
||||
end
|
||||
Engine.SetDvarString("ui_mapvote_entrya_mapname", focusedElement.filterMapnameKey)
|
||||
return GetMapnameFromID(focusedElement.filterMapnameKey)
|
||||
end,
|
||||
button_left_func = function(f9_arg0, f9_arg1)
|
||||
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f9_arg0)
|
||||
local keys = GetMaps()
|
||||
local defaultKeysI = 1
|
||||
for i = 1, #keys, 1 do
|
||||
if keys[i] == focusedElement.filterMapnameKey then
|
||||
defaultKeysI = i
|
||||
break
|
||||
end
|
||||
end
|
||||
defaultKeysI = defaultKeysI - 1
|
||||
if defaultKeysI < 1 then
|
||||
focusedElement.filterMapnameKey = keys[#keys]
|
||||
else
|
||||
focusedElement.filterMapnameKey = keys[defaultKeysI]
|
||||
end
|
||||
end,
|
||||
button_right_func = function(f10_arg0, f10_arg1)
|
||||
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f10_arg0)
|
||||
local keys = GetMaps()
|
||||
local defaultKeysI = 1
|
||||
for i = 1, #keys, 1 do
|
||||
if keys[i] == focusedElement.filterMapnameKey then
|
||||
defaultKeysI = i
|
||||
break
|
||||
end
|
||||
end
|
||||
defaultKeysI = defaultKeysI + 1
|
||||
if #keys < defaultKeysI then
|
||||
focusedElement.filterMapnameKey = keys[1]
|
||||
else
|
||||
focusedElement.filterMapnameKey = keys[defaultKeysI]
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
table.insert(rules, maps)
|
||||
|
||||
return rules
|
||||
end
|
||||
|
||||
function mp_server_filters_popup_page()
|
||||
return {
|
||||
type = "UIElement",
|
||||
id = "mp_server_filters_popup_page_id",
|
||||
properties = {},
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = AAR.Layout.TitleBarHeight + 1,
|
||||
bottom = -1,
|
||||
left = 1,
|
||||
right = -1,
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "UIText",
|
||||
id = "leaderboard_filters_instruction",
|
||||
properties = {
|
||||
text = Engine.Localize("@LUA_MENU_SERVER_FILTER_POPUP_INSTR")
|
||||
},
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = false,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 10,
|
||||
bottom = 10 + CoD.TextSettings.NormalFont.Height,
|
||||
left = 75,
|
||||
right = -75,
|
||||
alignment = LUI.Alignment.Center,
|
||||
font = CoD.TextSettings.NormalFont.Font,
|
||||
red = Colors.white.r,
|
||||
green = Colors.white.g,
|
||||
blue = Colors.white.b
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIVerticalList",
|
||||
id = "server_filters_popup_vlist",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = false,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = -75,
|
||||
bottom = 0,
|
||||
left = 2,
|
||||
right = -2,
|
||||
spacing = 5
|
||||
}
|
||||
},
|
||||
childrenFeeder = ServerFiltersPopupItems
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
LUI.MenuBuilder.registerDef("mp_server_filters_popup_page", mp_server_filters_popup_page)
|
636
iw6x/data/ui_scripts/server_list/__init__.lua
Normal file
@ -0,0 +1,636 @@
|
||||
if (game:issingleplayer() or not Engine.InFrontend()) then
|
||||
return
|
||||
end
|
||||
|
||||
local Lobby = luiglobals.Lobby
|
||||
local SystemLinkJoinMenu = LUI.mp_menus.SystemLinkJoinMenu
|
||||
|
||||
local controller = nil
|
||||
local server = nil
|
||||
|
||||
COLUMN_0 = 0
|
||||
COLUMN_1 = 460
|
||||
COLUMN_2 = 660
|
||||
COLUMN_3 = 800
|
||||
COLUMN_4 = 985
|
||||
COLUMN_5 = 500
|
||||
|
||||
SystemLinkJoinMenu.UpdateGameList = function(f3_arg0, f3_arg1)
|
||||
local f3_local0 = f3_arg1.controller
|
||||
if not f3_local0 then
|
||||
f3_local0 = Engine.GetFirstActiveController()
|
||||
end
|
||||
local f3_local1 = LUI.FlowManager.GetMenuScopedDataFromElement(f3_arg0)
|
||||
Lobby.UpdateServerDisplayList(f3_local0)
|
||||
local f3_local2 = Lobby.GetServerCount(f3_local0)
|
||||
if f3_local2 ~= f3_local1.serverCount then
|
||||
f3_local1.serverCount = f3_local2
|
||||
f3_arg0:processEvent({
|
||||
name = "menu_refresh",
|
||||
immediate = true
|
||||
})
|
||||
f3_arg0:processEvent({
|
||||
name = "gain_focus",
|
||||
immediate = true
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
SystemLinkJoinMenu.RefreshServers = function(f4_arg0, f4_arg1)
|
||||
local f4_local0 = LUI.FlowManager.GetMenuScopedDataFromElement(f4_arg0)
|
||||
f4_local0.serverCount = 0
|
||||
if f4_local0.serverList then
|
||||
local f4_local1 = Lobby.RefreshServerList
|
||||
local f4_local2 = f4_arg1.controller
|
||||
if not f4_local2 then
|
||||
f4_local2 = Engine.GetFirstActiveController()
|
||||
end
|
||||
f4_local1(f4_local2)
|
||||
f4_local0.serverList:processEvent({
|
||||
name = "lose_focus",
|
||||
immediate = true
|
||||
})
|
||||
f4_local0.serverList:clearSavedState()
|
||||
f4_local0.serverList:processEvent({
|
||||
name = "menu_refresh",
|
||||
dispatchChildren = true
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
function CreateColumnImage(id, shader, leftAnchor, rightAnchor, left, alpha)
|
||||
return {
|
||||
type = "UIImage",
|
||||
id = id,
|
||||
states = {
|
||||
default = {
|
||||
font = CoD.TextSettings.NormalFont.Font,
|
||||
alignment = LUI.Alignment.right,
|
||||
height = 20,
|
||||
width = 20,
|
||||
left = left,
|
||||
red = Colors.cac_label_text.r,
|
||||
green = Colors.cac_label_text.g,
|
||||
blue = Colors.cac_label_text.b,
|
||||
alpha = alpha,
|
||||
material = RegisterMaterial(shader)
|
||||
},
|
||||
},
|
||||
handlers = {
|
||||
button_over = MBh.AnimateToState("over"),
|
||||
button_up = MBh.AnimateToState("default"),
|
||||
button_disable = MBh.AnimateToState("disabled")
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
SystemLinkJoinMenu.CreateHeaderDef = function()
|
||||
local header = {
|
||||
type = "UIElement",
|
||||
id = "header_row_id",
|
||||
states = {
|
||||
default = CoD.ColorizeState(Swatches.Overlay.Color, {
|
||||
topAnchor = true,
|
||||
bottomAnchor = false,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 2,
|
||||
left = 2,
|
||||
right = -2,
|
||||
height = GenericTitleBarDims.TitleBarHeight,
|
||||
material = RegisterMaterial("white"),
|
||||
alpha = Swatches.Overlay.AlphaMore
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
local columns = {}
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateRowBackground(SystemLinkJoinMenu.Colors.generic_menu_bg_color))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnShade("column_shade_rect_id", false, COLUMN_1, COLUMN_2))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnShade("column_shade_rect_2_id", true, COLUMN_3, -1))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("host_header", Engine.Localize("@MENU_HOST_NAME"), true, false, COLUMN_0, COLUMN_1))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("map_header", Engine.Localize("@MENU_MAP"), true, false, COLUMN_1, COLUMN_2))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("players_header", Engine.Localize("@MENU_NUMPLAYERS"), true, false, COLUMN_2, COLUMN_3))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("type_header", Engine.Localize("@MENU_TYPE1"), true, true, COLUMN_3, COLUMN_4))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("ping_header", Engine.Localize("@MENU_PING"), true, true, COLUMN_4, COLUMN_5))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnImage("protected_header", "icon_lock", true, true, COLUMN_5, 1))
|
||||
header.children = columns
|
||||
return header
|
||||
end
|
||||
|
||||
SystemLinkJoinMenu.CreateRowDef = function(f6_arg0, f6_arg1, f6_arg2, f6_arg3)
|
||||
local option = {
|
||||
type = "UIButton",
|
||||
id = "row_" .. f6_arg1,
|
||||
disabled = f6_arg2,
|
||||
focusable = not f6_arg2,
|
||||
properties = {
|
||||
button_height = GenericButtonDims.button_height
|
||||
},
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = false,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 0,
|
||||
bottom = MBh.Property("button_height"),
|
||||
left = 0,
|
||||
right = 0
|
||||
}
|
||||
},
|
||||
handlers = {
|
||||
button_action = MBh.EmitEventToRoot({
|
||||
name = "select_game",
|
||||
idx = f6_arg1
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
local columns = {}
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateRowBackground(f6_arg3))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnShade("column_shade_rect_id", false, COLUMN_1, COLUMN_2))
|
||||
local shade = SystemLinkJoinMenu.CreateColumnShade("column_shade_rect_2_id", true, COLUMN_3, -1)
|
||||
table.insert(columns, shade)
|
||||
local hostname = SystemLinkJoinMenu.CreateColumnText("host_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Host), true, false, COLUMN_0, COLUMN_1)
|
||||
table.insert(columns, hostname)
|
||||
local mapname = SystemLinkJoinMenu.CreateColumnText("map_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Map), true, false, COLUMN_1, COLUMN_2)
|
||||
table.insert(columns, mapname)
|
||||
local players = SystemLinkJoinMenu.CreateColumnText("players_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Clients), true, false, COLUMN_2, COLUMN_3)
|
||||
table.insert(columns, players)
|
||||
local gametype = SystemLinkJoinMenu.CreateColumnText("type_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Game), true, true, COLUMN_3, COLUMN_4)
|
||||
table.insert(columns, gametype)
|
||||
local ping = SystemLinkJoinMenu.CreateColumnText("ping_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Ping), true, true, COLUMN_4, COLUMN_5)
|
||||
table.insert(columns, ping)
|
||||
local is_private = SystemLinkJoinMenu.CreateColumnImage("protected_header", "icon_lock", true, true, COLUMN_5, Lobby.GetServerData(f6_arg0, f6_arg1, 5) == "1" and 1 or 0)
|
||||
table.insert(columns, is_private)
|
||||
option.children = columns
|
||||
return option
|
||||
end
|
||||
|
||||
SystemLinkJoinMenu.OnCreate = function(f1_arg0, f1_arg1)
|
||||
local f1_local0 = LUI.FlowManager.GetMenuScopedDataFromElement(f1_arg0)
|
||||
f1_local0.serverCount = 0
|
||||
f1_arg0:processEvent(LUI.ButtonHelperText.CommonEvents.addBackButton)
|
||||
f1_arg0:processEvent({
|
||||
name = "add_button_helper_text",
|
||||
button_ref = "button_action",
|
||||
helper_text = Engine.Localize("@MENU_JOIN_GAME1"),
|
||||
side = "left",
|
||||
clickable = true
|
||||
})
|
||||
f1_arg0:processEvent({
|
||||
name = "add_button_helper_text",
|
||||
button_ref = "button_alt1",
|
||||
helper_text = Engine.Localize("@MENU_SB_TOOLTIP_BTN_REFRESH"),
|
||||
side = "left",
|
||||
clickable = true
|
||||
})
|
||||
f1_arg0:processEvent({
|
||||
name = "add_button_helper_text",
|
||||
button_ref = "button_alt2",
|
||||
helper_text = Engine.Localize("@LUA_MENU_FILTER"),
|
||||
side = "right",
|
||||
clickable = true
|
||||
})
|
||||
local f1_local1 = Lobby.BuildServerList
|
||||
local f1_local2 = f1_arg1.controller
|
||||
if not f1_local2 then
|
||||
f1_local2 = Engine.GetFirstActiveController()
|
||||
end
|
||||
f1_local1(f1_local2)
|
||||
end
|
||||
|
||||
function ServerListBackground()
|
||||
if Engine.IsAliensMode() then
|
||||
return {
|
||||
image = "frontend_aliens_art",
|
||||
fill_color = {
|
||||
r = 1,
|
||||
g = 1,
|
||||
b = 1
|
||||
},
|
||||
fill_alpha = 1
|
||||
}
|
||||
end
|
||||
|
||||
if Engine.IsCoreMode() then
|
||||
return {
|
||||
image = "white",
|
||||
fill_color = {
|
||||
r = 0.07,
|
||||
g = 0.1,
|
||||
b = 0.11
|
||||
},
|
||||
fill_alpha = 1
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
function JoinGame(f2_arg0, f2_arg1)
|
||||
server = f2_arg1
|
||||
controller = server.controller
|
||||
if not f2_local1 then
|
||||
controller = Engine.GetFirstActiveController()
|
||||
end
|
||||
|
||||
local is_private = Lobby.GetServerData(controller, server.idx, 5)
|
||||
if is_private == "1" then
|
||||
LUI.FlowManager.RequestPopupMenu(server, "server_password_field", false, controller, false)
|
||||
else
|
||||
Lobby.JoinServer(controller, server.idx)
|
||||
end
|
||||
end
|
||||
|
||||
SystemLinkJoinMenu.menu_systemlink_join = function()
|
||||
if Engine.IsCoreMode() then
|
||||
Engine.SetDvarString("ui_customModeName", "mp")
|
||||
elseif Engine.IsAliensMode() then
|
||||
Engine.SetDvarString("ui_customModeName", "aliens")
|
||||
end
|
||||
|
||||
if Engine.GetDvarString("ui_mapvote_entrya_gametype") == nil
|
||||
or Engine.GetDvarString("ui_mapvote_entrya_gametype") then
|
||||
Engine.SetDvarString("ui_mapvote_entrya_gametype", "any")
|
||||
end
|
||||
|
||||
if Engine.GetDvarString("ui_mapvote_entrya_mapname") == nil
|
||||
or Engine.GetDvarString("ui_mapvote_entrya_mapname") == ""
|
||||
or (string.match(Engine.GetDvarString("ui_mapvote_entrya_mapname"), "alien") == nil and Engine.IsAliensMode())
|
||||
or (string.match(Engine.GetDvarString("ui_mapvote_entrya_mapname"), "alien") == "alien" and Engine.IsCoreMode()) then
|
||||
Engine.SetDvarString("ui_mapvote_entrya_mapname", "any")
|
||||
end
|
||||
|
||||
return {
|
||||
type = "UIElement",
|
||||
id = "menu_systemlink_join_root",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
left = 0,
|
||||
right = 0
|
||||
}
|
||||
},
|
||||
handlers = {
|
||||
menu_create = SystemLinkJoinMenu.OnCreate,
|
||||
select_game = JoinGame
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "UIImage",
|
||||
states = {
|
||||
default = CoD.ColorizeState(Swatches.Overlay.Color, {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
left = 0,
|
||||
right = 0,
|
||||
material = RegisterMaterial("white"),
|
||||
alpha = Swatches.Overlay.AlphaMore,
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIElement",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = false,
|
||||
bottomAnchor = false,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
left = 200,
|
||||
right = -200,
|
||||
height = 550
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "generic_drop_shadow",
|
||||
properties = {
|
||||
offset_shadow = 0
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "generic_menu_titlebar",
|
||||
id = "menu_systemlink_join_title_id",
|
||||
properties = {
|
||||
fill_alpha = 1,
|
||||
font = CoD.TextSettings.BoldFont,
|
||||
title_bar_text = Engine.Localize("@PLATFORM_SYSTEM_LINK_TITLE"),
|
||||
title_bar_text_indent = GenericTitleBarDims.TitleBarLCapWidth,
|
||||
title_bar_alignment = LUI.Alignment.Left
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "generic_menu_background",
|
||||
id = "menu_systemlink_join_bg_id",
|
||||
properties = {
|
||||
fill_alpha = Swatches.Overlay.AlphaMore,
|
||||
},
|
||||
children = {
|
||||
SystemLinkJoinMenu.CreateHeaderDef(),
|
||||
{
|
||||
type = "UIVerticalList",
|
||||
id = "menu_systemlink_join_game_list_id",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = GenericTitleBarDims.TitleBarHeight + 4,
|
||||
bottom = 600,
|
||||
left = 2,
|
||||
right = -2
|
||||
}
|
||||
},
|
||||
childrenFeeder = SystemLinkJoinMenu.LinkGamesFeeder,
|
||||
handlers = {
|
||||
update_game_list = SystemLinkJoinMenu.UpdateGameList,
|
||||
menu_create = function(f12_arg0, f12_arg1)
|
||||
local f12_local0 = LUI.FlowManager.GetMenuScopedDataFromElement(f12_arg0)
|
||||
f12_local0.serverList = f12_arg0
|
||||
SystemLinkJoinMenu.RefreshServers(f12_arg0, f12_arg1)
|
||||
end
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "button_helper_text_main",
|
||||
id = "online_vault_helper_text_id",
|
||||
properties = {
|
||||
left_inset = 10,
|
||||
right_inset = -10,
|
||||
top_margin = GenericFooterDims.TopMargin_WithoutBackground,
|
||||
height = 42,
|
||||
spacing = 12,
|
||||
background_alpha = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UITimer",
|
||||
id = "menu_systemlink_join_update_timer",
|
||||
properties = {
|
||||
event = "update_game_list",
|
||||
interval = 250,
|
||||
disposable = false,
|
||||
broadcastToRoot = true
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIBindButton",
|
||||
id = "menu_systemlink_join_bind_button_id",
|
||||
handlers = {
|
||||
button_secondary = MBh.LeaveMenu(),
|
||||
button_alt1 = SystemLinkJoinMenu.RefreshServers,
|
||||
button_alt2 = OpenFiltersMenu
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
LUI.MenuBuilder.m_definitions["menu_systemlink_join"] = function()
|
||||
local menu = SystemLinkJoinMenu.menu_systemlink_join()
|
||||
|
||||
local rows = menu.children[2].children[3].children
|
||||
local header = rows[1]
|
||||
|
||||
|
||||
-- Increase server list width
|
||||
menu.children[2].states.default.left = 100
|
||||
menu.children[2].states.default.right = -100
|
||||
|
||||
menu.children[3].properties.interval = 10 -- 250
|
||||
|
||||
return menu
|
||||
end
|
||||
|
||||
ServerPaswordListFeeder = function()
|
||||
return {
|
||||
{
|
||||
type = "UIVerticalList",
|
||||
id = "password_field_items",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
leftAnchor = true,
|
||||
bottomAnchor = false,
|
||||
rightAnchor = true,
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "UIGenericButton",
|
||||
id = "password_button_id",
|
||||
properties = {
|
||||
variant = GenericButtonSettings.Variants.Plain,
|
||||
button_text = Engine.Localize("PATCH_MENU_CHANGE_PASSWORD_CAPS"),
|
||||
button_display_func = function()
|
||||
local f31_local0 = Engine.GetDvarString("password")
|
||||
if f31_local0 then
|
||||
f31_local0 = Engine.GetDvarString("password") ~= ""
|
||||
end
|
||||
local f31_local1
|
||||
if f31_local0 then
|
||||
f31_local1 = Engine.Localize("PATCH_MENU_PASSWORD_SET")
|
||||
if not f31_local1 then
|
||||
|
||||
else
|
||||
return f31_local1
|
||||
end
|
||||
end
|
||||
f31_local1 = Engine.Localize("MENU_NONE")
|
||||
end,
|
||||
button_action_func = function(f32_arg0, f32_arg1)
|
||||
Engine.ExecNow("setfromdvar ui_password password")
|
||||
Engine.OpenScreenKeyboard(f32_arg1.controller, Engine.Localize("MENU_PASSWORD"), Engine.GetDvarString("ui_password") or "", Lobby.PasswordLength, false, false, CoD.KeyboardInputTypes.Password)
|
||||
end
|
||||
},
|
||||
handlers = {
|
||||
text_input_complete = function(f33_arg0, f33_arg1)
|
||||
if f33_arg1.text then
|
||||
Engine.SetDvarString("password", f33_arg1.text)
|
||||
f33_arg0:processEvent({
|
||||
name = "content_refresh"
|
||||
})
|
||||
end
|
||||
end
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIGenericButton",
|
||||
id = "connect_button_id",
|
||||
properties = {
|
||||
variant = GenericButtonSettings.Variants.Plain,
|
||||
button_text = Engine.Localize("MENU_JOIN_GAME"), button_action_func = function()
|
||||
Lobby.JoinServer(controller, server.idx)
|
||||
end
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
password_field = function(f50_arg0, f50_arg1)
|
||||
return {
|
||||
type = "UIElement",
|
||||
id = "server_popup_container_id",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
left = 0,
|
||||
right = 0
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "UIImage",
|
||||
id = "darken_bg",
|
||||
states = {
|
||||
default = CoD.ColorizeState(Swatches.Overlay.Color, {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
left = 0,
|
||||
right = 0,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
material = RegisterMaterial("white"),
|
||||
alpha = Swatches.Overlay.AlphaMore
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIElement",
|
||||
id = "mp_server_filters_popup_id",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = false,
|
||||
bottomAnchor = false,
|
||||
leftAnchor = false,
|
||||
rightAnchor = false,
|
||||
top = -1 * Leaderboards.Layout.FilterHeight * 0.6,
|
||||
width = Leaderboards.Layout.FilterWidth,
|
||||
height = 145
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "generic_drop_shadow",
|
||||
properties = {
|
||||
offset_shadow = 0
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "generic_menu_titlebar",
|
||||
id = "server_filters_popup_title_bar_id",
|
||||
properties = {
|
||||
title_bar_text = Engine.Localize("@LUA_MENU_LOBBY_JOINING"),
|
||||
fill_alpha = 1
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "generic_menu_background",
|
||||
id = "server_filters_popup_background",
|
||||
properties = {
|
||||
fill_alpha = 1
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIElement",
|
||||
id = "mp_server_password_popup_page_id",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = AAR.Layout.TitleBarHeight + 1,
|
||||
bottom = -1,
|
||||
left = 1,
|
||||
right = -1,
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "generic_border",
|
||||
properties = {
|
||||
thickness = 2,
|
||||
border_red = Colors.generic_menu_frame_color.r,
|
||||
border_green = Colors.generic_menu_frame_color.g,
|
||||
border_blue = Colors.generic_menu_frame_color.b
|
||||
},
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
left = 0,
|
||||
right = 0,
|
||||
alpha = 0.6
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIVerticalList",
|
||||
id = "server_filters_popup_vlist",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = false,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = -90,
|
||||
bottom = 0,
|
||||
left = 0,
|
||||
right = 0,
|
||||
spacing = 5
|
||||
}
|
||||
},
|
||||
childrenFeeder = ServerPaswordListFeeder
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIBindButton",
|
||||
id = "filters_popup_back_button",
|
||||
handlers = {
|
||||
button_secondary = MBh.DoMultiple({
|
||||
MBh.LeaveMenu(),
|
||||
FiltersPopupClose,
|
||||
ForceRefreshServers
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
LUI.MenuBuilder.registerDef("server_password_field", password_field)
|
167
iw6x/data/ui_scripts/stats/__init__.lua
Normal file
@ -0,0 +1,167 @@
|
||||
if (game:issingleplayer() or not Engine.InFrontend()) then
|
||||
return
|
||||
end
|
||||
|
||||
game:addlocalizedstring("LUA_MENU_UNLOCKALL", "UNLOCK ALL")
|
||||
game:addlocalizedstring("LUA_MENU_UNLOCKALL_DESC",
|
||||
"Whether all items should be unlocked.")
|
||||
|
||||
function UnlockAllAction( f1_arg0, f1_arg1 )
|
||||
Engine.Exec("unlockstats")
|
||||
end
|
||||
|
||||
function StatsButtonHelper( f2_arg0, f2_arg1 )
|
||||
f2_arg0:processEvent( LUI.ButtonHelperText.CommonEvents.addBackButton )
|
||||
end
|
||||
|
||||
function BarrackPrestigeResetStatsAction( f3_arg0, f3_arg1 )
|
||||
LUI.FlowManager.RequestAddMenu( f3_arg0, "prestige_reset", true, f3_arg1.controller )
|
||||
end
|
||||
|
||||
function menu_stats()
|
||||
return {
|
||||
type = "UIElement",
|
||||
id = "menu_stats_root",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
left = 0,
|
||||
right = 0
|
||||
}
|
||||
},
|
||||
handlers = {
|
||||
menu_create = StatsButtonHelper,
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "generic_menu_title",
|
||||
id = "stats_title_text_id",
|
||||
properties = {
|
||||
menu_title = Engine.Localize( "@LUA_MENU_BARRACKS_CAPS" )
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIVerticalList",
|
||||
id = "stats_options_vlist_id",
|
||||
states = {
|
||||
default = {
|
||||
alignment = LUI.Alignment.Top,
|
||||
leftAnchor = true,
|
||||
rightAnchor = false,
|
||||
topAnchor = true,
|
||||
bottomAnchor = false,
|
||||
left = GenericMenuDims.menu_left,
|
||||
right = GenericMenuDims.menu_right,
|
||||
top = GenericMenuDims.menu_top,
|
||||
bottom = GenericMenuDims.menu_bottom
|
||||
}
|
||||
},
|
||||
childrenFeeder = StatsOptionsFeeder
|
||||
},
|
||||
{
|
||||
type = "button_helper_text_main",
|
||||
id = "stats_button_helper_text_id"
|
||||
},
|
||||
{
|
||||
type = "UIBindButton",
|
||||
id = "stats_bind_buttons_id",
|
||||
handlers = {
|
||||
button_secondary = MBh.LeaveMenu()
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
function StatsOptionsFeeder( f8_arg0 )
|
||||
local f8_local4 = {}
|
||||
local f8_local0 = Engine.IsAliensMode()
|
||||
local f8_local2 = Engine.InLobby()
|
||||
local f8_local3 = f8_arg0.exclusiveController
|
||||
f8_local4[#f8_local4 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "unlockall_items_button_id",
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_UNLOCKALL" ),
|
||||
button_action_func = UnlockAllAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_UNLOCKALL_DESC" )
|
||||
}
|
||||
}
|
||||
if not f8_local2 then
|
||||
local f8_local5 = #f8_local4 + 1
|
||||
local f8_local6 = {
|
||||
type = "UIGenericButton",
|
||||
id = "reset_stats_button_id"
|
||||
}
|
||||
local f8_local7
|
||||
if Cac.GetPrestigeLevel( f8_local3, Cac.GetSquadLoc() ) == 10 then
|
||||
f8_local7 = Engine.IsUserAGuest( f8_local3 )
|
||||
else
|
||||
f8_local7 = true
|
||||
end
|
||||
f8_local6.disabled = f8_local7
|
||||
f8_local6.properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_MP_RESET_STATS_CAPS" ),
|
||||
button_action_func = BarrackPrestigeResetStatsAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_MP_RESET_STATS_DESC" )
|
||||
}
|
||||
f8_local6.handlers = {
|
||||
element_refresh = function ( f12_arg0, f12_arg1 )
|
||||
local f12_local0
|
||||
if Cac.GetPrestigeLevel( f8_local3, Cac.GetSquadLoc() ) == 10 then
|
||||
f12_local0 = Engine.IsUserAGuest( f8_local3 )
|
||||
else
|
||||
f12_local0 = true
|
||||
end
|
||||
local f12_local1 = f12_arg0
|
||||
local f12_local2 = f12_arg0.processEvent
|
||||
local f12_local3 = {}
|
||||
local f12_local4
|
||||
if f12_local0 then
|
||||
f12_local4 = "disable"
|
||||
if not f12_local4 then
|
||||
|
||||
else
|
||||
f12_local3.name = f12_local4
|
||||
f12_local2( f12_local1, f12_local3 )
|
||||
end
|
||||
end
|
||||
f12_local4 = "enable"
|
||||
end
|
||||
}
|
||||
f8_local4[f8_local5] = f8_local6
|
||||
end
|
||||
f8_local4[#f8_local4 + 1] = {
|
||||
type = "button_desc_text",
|
||||
id = "stats_button_description_id"
|
||||
}
|
||||
return f8_local4
|
||||
end
|
||||
|
||||
function stats_options_vlist()
|
||||
return {
|
||||
type = "UIVerticalList",
|
||||
focusable = true,
|
||||
states = {
|
||||
default = {
|
||||
alignment = LUI.Alignment.Top,
|
||||
leftAnchor = true,
|
||||
rightAnchor = false,
|
||||
topAnchor = true,
|
||||
bottomAnchor = false,
|
||||
left = GenericMenuDims.menu_left,
|
||||
right = GenericMenuDims.menu_right,
|
||||
top = GenericMenuDims.menu_top,
|
||||
bottom = GenericMenuDims.menu_bottom
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
LUI.MenuBuilder.registerDef( "menu_stats", menu_stats )
|
||||
LUI.MenuBuilder.registerDef( "stats_options_vlist", stats_options_vlist )
|
101
iw6x/data/ui_scripts/team_select/__init__.lua
Normal file
@ -0,0 +1,101 @@
|
||||
if (game:issingleplayer()) then
|
||||
return
|
||||
end
|
||||
|
||||
if (package.loaded["LUI.mp_hud.OptionsMenu"] == nil) then
|
||||
return
|
||||
end
|
||||
|
||||
package.loaded["LUI.mp_hud.OptionsMenu"].options_def = function()
|
||||
local f14_local0 = GameX.GetGameMode()
|
||||
local f14_local1 = Engine.TableLookup( GameTypesTable.File, GameTypesTable.Cols.Ref, f14_local0, GameTypesTable.Cols.ClassChoice ) == "1"
|
||||
|
||||
if not f14_local1 then
|
||||
f14_local1 = GameX.UsesFakeLoadout()
|
||||
end
|
||||
|
||||
local f14_local2 = LUI.mp_hud.OptionsMenu.checkTeamChoice( f14_local0 )
|
||||
local f14_local3 = GameX.IsRankedMatch()
|
||||
local f14_local4 = Engine.GetDvarBool( "splitscreen_ingame" )
|
||||
local f14_local5 = Game.GetOmnvar( "ui_team_selected" )
|
||||
local f14_local6 = Game.GetOmnvar( "ui_loadout_selected" )
|
||||
local f14_local7 = LUI.mp_hud.OptionsMenu.chooseClassCheck( f14_local3, f14_local5, f14_local2 )
|
||||
local self = LUI.UIVerticalList.new()
|
||||
self.id = "pause_selections_Id"
|
||||
|
||||
self:registerAnimationState("default", {
|
||||
topAnchor = true,
|
||||
leftAnchor = true,
|
||||
bottomAnchor = false,
|
||||
rightAnchor = false,
|
||||
top = GenericMenuDims.menu_top,
|
||||
left = GenericMenuDims.menu_left,
|
||||
bottom = GenericMenuDims.menu_bottom,
|
||||
right = GenericMenuDims.menu_right,
|
||||
alignment = LUI.Alignment.Top
|
||||
})
|
||||
|
||||
self:animateToState( "default", 0 )
|
||||
self:makeFocusable()
|
||||
|
||||
if f14_local0 ~= "aliens" and false == CoD.IsFireTeamMode() and GameX.IsSpectatingNotOnTeam() == false and f14_local1 == true and f14_local7 == true and not MLG.IsMLGSpectator() then
|
||||
LUI.MenuBuilder.BuildAddChild(self, {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPPause_0",
|
||||
properties = {
|
||||
childNum = 1,
|
||||
button_text = Engine.Localize( "@LUA_MENU_CHOOSE_CLASS_CAPS" ),
|
||||
button_action_func = LUI.mp_hud.OptionsMenu.chooseClassButtonAction
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
if f14_local0 ~= "aliens" and false == CoD.IsFireTeamMode() and f14_local2 == true and not MLG.IsMLGSpectator() then
|
||||
LUI.MenuBuilder.BuildAddChild(self, {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPPause_1",
|
||||
properties = {
|
||||
childNum = 2,
|
||||
button_text = Engine.Localize( "@LUA_MENU_CHANGE_TEAM_CAPS" ),
|
||||
button_action_func = LUI.mp_hud.OptionsMenu.changeTeamButtonAction
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
LUI.MenuBuilder.BuildAddChild(self, {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPPause_2",
|
||||
disabledFunc = LUI.mp_hud.OptionsMenu.optionsLockedUpdate,
|
||||
properties = {
|
||||
childNum = 3,
|
||||
button_text = Engine.Localize( "@LUA_MENU_OPTIONS_CAPS" ),
|
||||
button_action_func = LUI.mp_hud.OptionsMenu.optionsButtonAction
|
||||
},
|
||||
handlers = {
|
||||
refresh_options_button = LUI.mp_hud.OptionsMenu.refreshOptionDisable
|
||||
}
|
||||
})
|
||||
|
||||
if GameX.IsOnlineMatch() and (not Engine.IsAliensMode() or not Game.GetOmnvar( "ui_alien_is_solo" )) and not MLG.IsMLGSpectator() then
|
||||
LUI.MenuBuilder.BuildAddChild(self, {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPPause_3",
|
||||
properties = {
|
||||
childNum = 4,
|
||||
button_text = Engine.Localize( "@LUA_MENU_MUTE_PLAYERS_CAPS" ),
|
||||
button_action_func = LUI.mp_hud.OptionsMenu.mutePlayersButtonAction
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
LUI.MenuBuilder.BuildAddChild(self, {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPPause_5",
|
||||
properties = {
|
||||
childNum = 6,
|
||||
button_text = Engine.Localize( "@LUA_MENU_END_GAME_CAPS" ),
|
||||
button_action_func = LUI.mp_hud.OptionsMenu.endGameButtonAction
|
||||
}
|
||||
})
|
||||
return self
|
||||
end
|
BIN
iw6x/iw6x.exe
Normal file
BIN
launcher/IWX Launcher.exe
Normal file
BIN
localappdata/xlabs/data/cef/release/chrome_100_percent.pak
Normal file
BIN
localappdata/xlabs/data/cef/release/chrome_200_percent.pak
Normal file
BIN
localappdata/xlabs/data/cef/release/chrome_elf.dll
Normal file
BIN
localappdata/xlabs/data/cef/release/d3dcompiler_47.dll
Normal file
BIN
localappdata/xlabs/data/cef/release/icudtl.dat
Normal file
BIN
localappdata/xlabs/data/cef/release/libEGL.dll
Normal file
BIN
localappdata/xlabs/data/cef/release/libGLESv2.dll
Normal file
BIN
localappdata/xlabs/data/cef/release/libcef.dll
(Stored with Git LFS)
Normal file
BIN
localappdata/xlabs/data/cef/release/locales/en-US.pak
Normal file
BIN
localappdata/xlabs/data/cef/release/resources.pak
Normal file
BIN
localappdata/xlabs/data/cef/release/snapshot_blob.bin
Normal file
BIN
localappdata/xlabs/data/cef/release/v8_context_snapshot.bin
Normal file
BIN
localappdata/xlabs/data/cef/release/vk_swiftshader.dll
Normal file
BIN
localappdata/xlabs/data/cef/release/vulkan-1.dll
Normal file
BIN
localappdata/xlabs/data/iw4x/iw4x-sp.exe
Normal file
BIN
localappdata/xlabs/data/iw4x/iw4x.dll
Normal file
@ -0,0 +1,228 @@
|
||||
version 7
|
||||
|
||||
// Entitlement ID Ranges
|
||||
// 0 - 299 ???
|
||||
// 300 - 399 Clan Entitlements
|
||||
// 400 - 599 ???
|
||||
// 600 - 699 Clan War Entitlements
|
||||
// 700 - 799 Generic Elite Entitlements
|
||||
|
||||
// Number of keys to read from the key archive
|
||||
keys_to_read 16
|
||||
|
||||
// unlocks in game - type, key index, bit, name, payload...
|
||||
unlock 0 0 600 //clan wars demon_skull_p
|
||||
unlock 0 1 601 //clan wars dead_ninja_p
|
||||
unlock 0 2 602 //clan wars mummy_p
|
||||
unlock 0 3 603 //clan wars skull_bow_p
|
||||
unlock 0 4 604 //clan wars cyclops_skull_p
|
||||
unlock 0 5 605 //clan wars dead_gnome_p
|
||||
unlock 0 6 606 //clan wars gold_grill_p
|
||||
unlock 0 7 607 //clan wars pirate_skull_p
|
||||
unlock 0 8 608 //clan wars gargoyle_p
|
||||
unlock 0 9 609 //clan wars vulture_p
|
||||
unlock 0 10 610 //clan wars warrior_mask_p
|
||||
unlock 0 11 611 //clan wars yeti_p
|
||||
unlock 0 12 612 //clan wars dead_owl_p
|
||||
unlock 0 13 613 //clan wars money_bags_p
|
||||
unlock 0 14 614 //clan wars injured_octopus_p
|
||||
unlock 0 15 615 //clan wars hotdog_p
|
||||
unlock 0 16 616 //clan wars crab_p
|
||||
unlock 0 17 617 //clan wars angry_robot_p
|
||||
unlock 0 18 618 //clan wars triangle_dot_ret
|
||||
unlock 0 19 619 //clan wars gold_chain_emb
|
||||
unlock 0 20 620 //clan wars wing_emb
|
||||
unlock 0 21 621 //clan wars brass_knuck_emb
|
||||
unlock 0 22 622 //clan wars ninja_emb
|
||||
unlock 0 25 623 //clan wars reaper head
|
||||
unlock 0 26 624 //clan wars merc head
|
||||
unlock 0 27 625 //clan wars body
|
||||
unlock 0 28 460 //clan wars diamond division reticle
|
||||
unlock 0 29 401 //clan wars diamond division camo
|
||||
unlock 0 30 627 //clan wars diamond division assassin head
|
||||
unlock 0 31 626 //clan wars diamond division savage head
|
||||
unlock 0 32 628 //clan wars diamond division body
|
||||
|
||||
unlock 3 0 700 //Download the mobile app
|
||||
unlock 3 1 701 //Founder Skull
|
||||
|
||||
unlock 3 4 500 //NEVERSOFT
|
||||
unlock 3 3 501 //IW
|
||||
unlock 3 5 502 //RAVEN
|
||||
unlock 3 7 503 //HIGH_MOON
|
||||
unlock 3 6 504 //BEACHHEAD
|
||||
|
||||
unlock 13 0 209 //monster beast patch
|
||||
unlock 13 2 210 //monster beast playercard
|
||||
unlock 13 1 211 //monster viper patch
|
||||
unlock 13 3 212 //monster viper playercard
|
||||
|
||||
unlock 13 4 216 //riley / classic ghost head
|
||||
|
||||
unlock 13 30 217 //watcher patch
|
||||
unlock 13 31 213 //federation patch
|
||||
unlock 13 32 215 //into the deep patch
|
||||
unlock 13 33 214 //no man's land patch
|
||||
|
||||
//Platform Unlocks
|
||||
platform 200 255161 //team leader head
|
||||
platform 201 255161 //team leader playercard
|
||||
platform 202 255161 //team leader patch
|
||||
platform 403 255161 //team leader camo
|
||||
platform 451 255161 //team leader reticle
|
||||
|
||||
platform 200 255160 //team leader head
|
||||
platform 201 255160 //team leader playercard
|
||||
platform 202 255160 //team leader patch
|
||||
platform 403 255160 //team leader camo
|
||||
platform 451 255160 //team leader reticle
|
||||
|
||||
platform 206 255162 //insignia playercard
|
||||
platform 205 255162 //insignia patch
|
||||
|
||||
platform 216 255165 //classic ghost character
|
||||
|
||||
platform 213 255167 //federation patch
|
||||
platform 214 255168 //no mans land patch
|
||||
platform 215 255169 //into the deep patch
|
||||
|
||||
platform 207 255163 //digital hardened patch
|
||||
platform 208 255163 //digital hardened playercard
|
||||
|
||||
platform 217 255166 //Steam Patch - The Watcher
|
||||
|
||||
platform 222 268100 //festive playercard
|
||||
platform 221 268100 //festive patch
|
||||
platform 410 268100 //festive camo
|
||||
platform 453 268100 //festive reticle
|
||||
|
||||
platform 550 268101 //wolf
|
||||
|
||||
platform 551 277670 //extra slots
|
||||
|
||||
platform 552 277671 // hero character - elias
|
||||
platform 553 277672 // hero character - hesh
|
||||
platform 554 277673 // hero character - merrick
|
||||
platform 555 277674 // hero character - keegan
|
||||
platform 556 277675 // hero character - price
|
||||
|
||||
platform 557 281343 // Hazmat character
|
||||
platform 558 281340 // Makarov Legend Pack
|
||||
platform 559 281342 // Rorke Character
|
||||
platform 560 281341 // Zakhaev Character
|
||||
|
||||
platform 561 286632 // Soap Legend Pack
|
||||
platform 562 286633 // Extinction Squad
|
||||
platform 563 286634 // TF141
|
||||
|
||||
platform 490 277676 // Personalization pack 1 - Ducky
|
||||
platform 491 277677 // Personalization pack 2 - Blood
|
||||
platform 492 277678 // Personalization pack 3 - Inferno
|
||||
platform 493 277679 // Personalization pack 4 - Kittens
|
||||
|
||||
platform 494 281344 // Personalization pack 5
|
||||
platform 495 281345 // Personalization pack 6
|
||||
platform 496 281346 // Personalization pack 7
|
||||
platform 497 281347 // Personalization pack 8
|
||||
platform 498 286630 // Personalization pack 9
|
||||
platform 499 286631 // Personalization pack 10
|
||||
|
||||
platform 510 295430 // Personalization pack 11
|
||||
platform 511 295431 // Personalization pack 12
|
||||
platform 512 295432 // Personalization pack 13
|
||||
platform 513 295433 // Personalization pack 14
|
||||
platform 515 295434 // Personalization pack 15
|
||||
platform 516 295435 // Personalization pack 16
|
||||
|
||||
platform 517 295439 // Personalization pack 17
|
||||
platform 518 295440 // Personalization pack 18
|
||||
platform 519 301111 // Personalization pack 19
|
||||
platform 520 301112 // Personalization pack 20
|
||||
platform 521 301113 // Personalization pack 21
|
||||
platform 522 301114 // Personalization pack 22
|
||||
platform 523 301110 // Personalization pack Flags
|
||||
|
||||
platform 564 295436 // Spectrum Character
|
||||
platform 565 295437 // Astronaut Character
|
||||
platform 566 295438 // Resistance Squad
|
||||
|
||||
platform 567 309870 // Bluntforce Character
|
||||
platform 568 309871 // Inferno Character
|
||||
platform 569 309872 // Bling Character
|
||||
|
||||
platform 480 259250 //dlc gun 1
|
||||
platform 480 301116 //dlc gun 1
|
||||
platform 481 259250 //dlc gun 1
|
||||
platform 481 301116 //dlc gun 1
|
||||
|
||||
platform 482 259251 //Ripper from Devastation
|
||||
platform 482 255161 //Ripper from Season Pass
|
||||
platform 482 301115 //Ripper from mDLC
|
||||
|
||||
//Clan Entitlements - ID 300 - 399 - type, bit, entitlement id
|
||||
clan 0 300
|
||||
clan 0 301
|
||||
clan 1 302
|
||||
clan 2 303
|
||||
clan 3 304
|
||||
clan 3 305
|
||||
clan 3 306
|
||||
clan 4 307
|
||||
clan 4 308
|
||||
clan 4 309
|
||||
clan 5 310
|
||||
clan 5 311
|
||||
clan 6 312
|
||||
clan 7 313
|
||||
clan 8 314
|
||||
clan 8 315
|
||||
clan 8 316
|
||||
clan 9 317
|
||||
clan 10 318
|
||||
clan 10 319
|
||||
clan 10 320
|
||||
clan 10 321
|
||||
clan 10 322
|
||||
clan 11 323
|
||||
clan 12 324
|
||||
clan 13 325
|
||||
clan 13 326
|
||||
clan 13 327
|
||||
clan 13 328
|
||||
clan 13 329
|
||||
clan 14 330
|
||||
clan 15 331
|
||||
clan 15 332
|
||||
clan 15 333
|
||||
clan 16 334
|
||||
clan 16 335
|
||||
clan 16 336
|
||||
clan 16 337
|
||||
clan 16 338
|
||||
clan 17 339
|
||||
clan 18 340
|
||||
clan 19 341
|
||||
clan 19 342
|
||||
clan 19 343
|
||||
clan 19 344
|
||||
clan 20 345
|
||||
clan 20 346
|
||||
clan 21 347
|
||||
clan 21 348
|
||||
clan 21 349
|
||||
clan 22 350
|
||||
clan 23 351
|
||||
clan 24 352
|
||||
clan 25 353
|
||||
clan 26 354
|
||||
clan 26 355
|
||||
clan 26 356
|
||||
clan 26 357
|
||||
clan 27 358
|
||||
|
||||
//Clan Level Challenges - type, required level, challenge id
|
||||
clanlevelchallenge 23 ch_cam_clan_02 // Kiss of Death Camo
|
||||
|
||||
//Clan War Challenges - type, key index, bit offset, challenge id
|
||||
entitlementchallenge 0 18 ch_ret_clan // clan wars reticle - Triad
|
||||
entitlementchallenge 0 24 ch_cam_clan_01 // clan wars camo - Body Count
|
2
localappdata/xlabs/data/iw6x/data/dw/mm.cfg
Normal file
@ -0,0 +1,2 @@
|
||||
VERSION 5
|
||||
XX 0 D100 0 P50 0 G5 4 F 6 H 8 P75 16 P100 16 S 24 P120 32 P150 40 P-1 10 M192 20 M48
|
162
localappdata/xlabs/data/iw6x/data/dw/newsfeed.txt
Normal file
@ -0,0 +1,162 @@
|
||||
article 1
|
||||
header "FLAGS OF THE WORLD PACK"
|
||||
body "Show your national pride with individual patches, playercards, and backgrounds for England, France, Germany, Italy, Spain, Mexico, USA, Brazil, Australia, Japan, UK, Russia, Netherlands, Portugal, Colombia, Argentina, Canada, Ireland, and Sweden.
|
||||
|
||||
Plus, go international in any firefight with a unique reticle and flags of the world weapon camo.
|
||||
|
||||
Available now.
|
||||
|
||||
Visit the in-game store to find out more."
|
||||
type item
|
||||
image ui_mp/ingamestore/img_store_pers_pack_flags.jpg
|
||||
imagewidth 320
|
||||
imageheight 160
|
||||
data mdlc_pack40
|
||||
localJPEGImage
|
||||
|
||||
article 2
|
||||
header "CALL OF DUTY APP"
|
||||
body "The Call of Duty App is everything you need to keep track of your Ghosts experience on the go.
|
||||
|
||||
Get unique info on Clan Wars: A brand new game mode that connects directly to Call of Duty®: Ghosts multiplayer, where clans compete against each other for additional XP and in-game content.
|
||||
|
||||
Communicate via the Rally Up and Clan Chat features, to keep in touch with your friends and Clan members."
|
||||
type news
|
||||
image img_sf_generic_news2
|
||||
imagewidth 320
|
||||
imageheight 320
|
||||
|
||||
article 3
|
||||
header "PLAY HOW YOU WANT WITH EXTRA LOADOUT SLOTS"
|
||||
body "You can increase the number of loadout slots from 6 to 10, so you can take even more options into battle. Never get caught with the wrong gear and give yourself great flexibility by creating different loadouts for different situations.
|
||||
|
||||
Top Tip - Set up different characters for different game modes, that way you can select the right man for the job.
|
||||
|
||||
Another Top Tip - With all the extra loadouts, set up variations of your favorite loadout so you’re always ready for the unexpected.
|
||||
|
||||
Visit the in-game store to find out more."
|
||||
type item
|
||||
image ui_mp/ingamestore/img_store_extra_slots.jpg
|
||||
imagewidth 320
|
||||
imageheight 160
|
||||
data mdlc_pack2
|
||||
localJPEGImage
|
||||
|
||||
article 4
|
||||
header "DROP ZONE IS BACK!"
|
||||
body "We are bringing this fan favorite mode from Call of Duty: Modern Warfare 3 to Call of Duty: Ghosts Multiplayer.
|
||||
|
||||
Fight to take control of the Drop Zone marked with a red smoke grenade, a location where Care Packages are regularly delivered by air drops.
|
||||
|
||||
This mode gives you multiple chances to change the game with awesome killstreaks like the Gryphon, Juggernaut, or the earth shattering Loki.
|
||||
|
||||
Control the Drop Zone, collect killstreaks, and wreak havoc on the opposing team!"
|
||||
type news
|
||||
image img_squadmode_03
|
||||
imagewidth 320
|
||||
imageheight 176
|
||||
|
||||
article 5
|
||||
header "THE REAL ORIGINS OF EXTINCTION"
|
||||
body "Find out the origins of the Extinction story by collecting hidden intel items in Episode 1: Nightfall.
|
||||
|
||||
Find out the real story of Dr. Cross, Archer and discover more secrets from Project Nightfall.
|
||||
|
||||
Episode 1: Nightfall is part of DLC 1: Onslaught, available now.
|
||||
|
||||
Visit the in-game store to find out more."
|
||||
type item
|
||||
image bg_large_073
|
||||
imagewidth 320
|
||||
imageheight 320
|
||||
data dlc3
|
||||
|
||||
article 6
|
||||
header "NEW CUSTOMIZATION CONTENT"
|
||||
body "New content is being released all the time. Personalize your look and your loadout with customization items.
|
||||
|
||||
- Special Characters: Customize your look head-to-toe in Multiplayer, Squads and Extinction.
|
||||
|
||||
- Personalization Packs: Uniquely themed weapon camo, reticle, patch, playercard and background.
|
||||
|
||||
- Legend Packs: A Special Character and themed Personalization Pack for a legendary figure in Call of Duty lore.
|
||||
|
||||
Visit the in-game store to find out more."
|
||||
type item
|
||||
image ui_mp/ingamestore/img_store_pers_pack_07.jpg
|
||||
imagewidth 320
|
||||
imageheight 160
|
||||
data mdlc_pack17
|
||||
localJPEGImage
|
||||
|
||||
article 7
|
||||
header "NEW TO EXTINCTION - THE ARMORY"
|
||||
body "Spend Teeth in the Armory to purchase upgrades for classes and equipment.
|
||||
|
||||
Earn Teeth by completing Extinction missions. Bonus Teeth are awarded for completing with a relic, completing in Hardcore mode, or helping other players complete a mission for the first time.
|
||||
|
||||
You can also earn teeth by killing aliens in both Extinction and Chaos Mode.
|
||||
|
||||
Upgrades include the Weapon Specialist's Infinite Ammo Ability and the Medic's Energy Field, instantly heal and revive anyone within its perimeter!"
|
||||
type news
|
||||
image img_sf_extinction_armory
|
||||
imagewidth 320
|
||||
imageheight 320
|
||||
|
||||
article 8
|
||||
header "CAN YOU SURVIVE THE CHAOS?"
|
||||
body "Extinction's Chaos Mode is an all-new, adrenaline pumping game type that pits 1-4 players against a never ending alien onslaught.
|
||||
|
||||
Keep the combo meter filled by damaging aliens, collecting weaponry or upgrades, and making use of your abilities. Combos provide players with an ever-expanding set of perks such as Fast Health Regen, Gas Mask, and Stopping Power.
|
||||
|
||||
Special bonus drops provide new ability upgrades including the Tank Class Skill and the Venom-X that further your arsenal and overall score potential.
|
||||
|
||||
The aliens are ready, are you?"
|
||||
type news
|
||||
image img_sf_extinction_chaos
|
||||
imagewidth 320
|
||||
imageheight 320
|
||||
|
||||
article 9
|
||||
header "WHAT'S GOING ON WITH YOUR CLAN?"
|
||||
body "Check out what your Clan is up to in-game via Clan Details inside the Barracks. See what's going on with other players' Clans by checking out View Clan when you select them in the lobby.
|
||||
|
||||
Get even more details on your Clan via the Call of Duty App, available now on the App Store, Google Play and Windows Store.
|
||||
|
||||
Not in a Clan? Create one now via the Barracks and invite your friends straight from the game."
|
||||
type news
|
||||
image img_squadmode_02
|
||||
imagewidth 320
|
||||
imageheight 176
|
||||
|
||||
article 10
|
||||
header "DRILL INSTRUCTOR VOICE PACK"
|
||||
body "Multiplayer returns to boot camp with the all-new Drill Instructor Voice Pack voiced by the one and only R. Lee Ermey, aka The Gunny.
|
||||
|
||||
Swap out your in-game alerts with ones that will get you back into top combat shape.
|
||||
|
||||
Now, drop down and give me twenty!
|
||||
|
||||
Available now.
|
||||
|
||||
Visit the in-game store to find out more."
|
||||
type item
|
||||
image ui_mp/ingamestore/img_store_drill_sergeant.jpg
|
||||
imagewidth 320
|
||||
imageheight 160
|
||||
data dlc10
|
||||
localJPEGImage
|
||||
|
||||
article 11
|
||||
header "TRY REINFORCE"
|
||||
body "Reinforce is a new game mode where you annihilate the enemy team or capture points to win a match.
|
||||
|
||||
You only respawn if a teammate captures a point, so be careful out there!
|
||||
|
||||
This new game mode is now live in our Multiplayer playlist.
|
||||
|
||||
Enjoy!"
|
||||
type news
|
||||
image bg_large_045
|
||||
imagewidth 320
|
||||
imageheight 320
|
BIN
localappdata/xlabs/data/iw6x/data/dw/playlists_tu14.aggr
Normal file
2
localappdata/xlabs/data/iw6x/data/dw/social_tu14.cfg
Normal file
@ -0,0 +1,2 @@
|
||||
VERSION 5
|
||||
XX 0 D100 0 P50 0 G5 4 F 6 H 8 P75 16 P100 16 S 24 P120 32 P150 40 P-1 10 M192 20 M48
|
3302
localappdata/xlabs/data/iw6x/data/maps/mp/gametypes/_damage.gsc
Normal file
727
localappdata/xlabs/data/iw6x/data/maps/mp/gametypes/_menus.gsc
Normal file
@ -0,0 +1,727 @@
|
||||
// IW6 GSC SOURCE
|
||||
// Dumped by https://github.com/xensik/gsc-tool
|
||||
|
||||
init()
|
||||
{
|
||||
if ( !isdefined( game["gamestarted"] ) )
|
||||
{
|
||||
game["menu_team"] = "team_marinesopfor";
|
||||
|
||||
if ( level.multiteambased )
|
||||
game["menu_team"] = "team_mt_options";
|
||||
|
||||
if ( maps\mp\_utility::bot_is_fireteam_mode() )
|
||||
{
|
||||
level.fireteam_menu = "class_commander_" + level.gametype;
|
||||
game["menu_class"] = level.fireteam_menu;
|
||||
game["menu_class_allies"] = level.fireteam_menu;
|
||||
game["menu_class_axis"] = level.fireteam_menu;
|
||||
}
|
||||
else
|
||||
{
|
||||
game["menu_class"] = "class";
|
||||
game["menu_class_allies"] = "class_marines";
|
||||
game["menu_class_axis"] = "class_opfor";
|
||||
}
|
||||
|
||||
game["menu_changeclass_allies"] = "changeclass_marines";
|
||||
game["menu_changeclass_axis"] = "changeclass_opfor";
|
||||
|
||||
if ( level.multiteambased )
|
||||
{
|
||||
for ( var_0 = 0; var_0 < level.teamnamelist.size; var_0++ )
|
||||
{
|
||||
var_1 = "menu_class_" + level.teamnamelist[var_0];
|
||||
var_2 = "menu_changeclass_" + level.teamnamelist[var_0];
|
||||
game[var_1] = game["menu_class_allies"];
|
||||
game[var_2] = "changeclass_marines";
|
||||
}
|
||||
}
|
||||
|
||||
game["menu_changeclass"] = "changeclass";
|
||||
|
||||
if ( level.console )
|
||||
{
|
||||
game["menu_controls"] = "ingame_controls";
|
||||
|
||||
if ( level.splitscreen )
|
||||
{
|
||||
if ( level.multiteambased )
|
||||
{
|
||||
for ( var_0 = 0; var_0 < level.teamnamelist.size; var_0++ )
|
||||
{
|
||||
var_1 = "menu_class_" + level.teamnamelist[var_0];
|
||||
var_2 = "menu_changeclass_" + level.teamnamelist[var_0];
|
||||
game[var_1] += "_splitscreen";
|
||||
game[var_2] += "_splitscreen";
|
||||
}
|
||||
}
|
||||
|
||||
game["menu_team"] += "_splitscreen";
|
||||
game["menu_class_allies"] += "_splitscreen";
|
||||
game["menu_class_axis"] += "_splitscreen";
|
||||
game["menu_changeclass_allies"] += "_splitscreen";
|
||||
game["menu_changeclass_axis"] += "_splitscreen";
|
||||
game["menu_controls"] += "_splitscreen";
|
||||
game["menu_changeclass_defaults_splitscreen"] = "changeclass_splitscreen_defaults";
|
||||
game["menu_changeclass_custom_splitscreen"] = "changeclass_splitscreen_custom";
|
||||
precachemenu( game["menu_changeclass_defaults_splitscreen"] );
|
||||
precachemenu( game["menu_changeclass_custom_splitscreen"] );
|
||||
}
|
||||
|
||||
precachemenu( game["menu_controls"] );
|
||||
}
|
||||
|
||||
precachemenu( game["menu_team"] );
|
||||
precachemenu( game["menu_class_allies"] );
|
||||
precachemenu( game["menu_class_axis"] );
|
||||
precachemenu( game["menu_changeclass"] );
|
||||
precachemenu( game["menu_changeclass_allies"] );
|
||||
precachemenu( game["menu_changeclass_axis"] );
|
||||
precachemenu( game["menu_class"] );
|
||||
precachestring( &"MP_HOST_ENDED_GAME" );
|
||||
precachestring( &"MP_HOST_ENDGAME_RESPONSE" );
|
||||
}
|
||||
|
||||
level thread onplayerconnect();
|
||||
}
|
||||
|
||||
onplayerconnect()
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
level waittill( "connected", var_0 );
|
||||
var_0 thread watchforclasschange();
|
||||
var_0 thread watchforteamchange();
|
||||
var_0 thread watchforleavegame();
|
||||
var_0 thread connectedmenus();
|
||||
}
|
||||
}
|
||||
|
||||
connectedmenus()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
getclasschoice( var_0 )
|
||||
{
|
||||
if ( var_0 > 10 )
|
||||
{
|
||||
if ( var_0 > 10 && var_0 < 17 )
|
||||
{
|
||||
var_0 -= 10;
|
||||
var_0 = "axis_recipe" + var_0;
|
||||
}
|
||||
else if ( var_0 > 16 && var_0 < 23 )
|
||||
{
|
||||
var_0 -= 16;
|
||||
var_0 = "allies_recipe" + var_0;
|
||||
}
|
||||
}
|
||||
else
|
||||
var_0 = "custom" + var_0;
|
||||
|
||||
return var_0;
|
||||
}
|
||||
|
||||
watchforclasschange()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
level endon( "game_ended" );
|
||||
|
||||
for (;;)
|
||||
{
|
||||
self waittill( "luinotifyserver", var_0, var_1 );
|
||||
|
||||
if ( var_0 != "class_select" )
|
||||
continue;
|
||||
|
||||
if ( getdvarint( "systemlink" ) && getdvarint( "xblive_competitionmatch" ) && self ismlgspectator() )
|
||||
{
|
||||
self setclientomnvar( "ui_options_menu", 0 );
|
||||
continue;
|
||||
}
|
||||
|
||||
var_2 = isai( self ) || issubstr( self.name, "tcBot" );
|
||||
|
||||
if ( !var_2 )
|
||||
{
|
||||
if ( !isai( self ) && "" + var_1 != "callback" )
|
||||
self setclientomnvar( "ui_loadout_selected", var_1 );
|
||||
}
|
||||
|
||||
if ( isdefined( self.waitingtoselectclass ) && self.waitingtoselectclass )
|
||||
continue;
|
||||
|
||||
if ( !maps\mp\_utility::allowclasschoice() || maps\mp\_utility::showfakeloadout() )
|
||||
continue;
|
||||
|
||||
if ( "" + var_1 != "callback" )
|
||||
{
|
||||
if ( isdefined( self.pers["isBot"] ) && self.pers["isBot"] )
|
||||
{
|
||||
self.pers["class"] = var_1;
|
||||
self.class = var_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_3 = var_1 + 1;
|
||||
var_3 = getclasschoice( var_3 );
|
||||
|
||||
if ( !isdefined( self.pers["class"] ) || var_3 == self.pers["class"] )
|
||||
continue;
|
||||
|
||||
self.pers["class"] = var_3;
|
||||
self.class = var_3;
|
||||
|
||||
if ( level.ingraceperiod && !self.hasdonecombat )
|
||||
{
|
||||
maps\mp\gametypes\_class::setclass( self.pers["class"] );
|
||||
self.tag_stowed_back = undefined;
|
||||
self._id_7E62 = undefined;
|
||||
maps\mp\gametypes\_class::giveloadout( self.pers["team"], self.pers["class"] );
|
||||
}
|
||||
else if ( isalive( self ) )
|
||||
self iprintlnbold( game["strings"]["change_class"] );
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
menuclass( "callback" );
|
||||
}
|
||||
}
|
||||
|
||||
watchforleavegame()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
level endon( "game_ended" );
|
||||
|
||||
for (;;)
|
||||
{
|
||||
self waittill( "luinotifyserver", var_0, var_1 );
|
||||
|
||||
if ( var_0 != "end_game" )
|
||||
continue;
|
||||
|
||||
if ( maps\mp\_utility::is_aliens() )
|
||||
{
|
||||
[[ level.forceendgame_alien ]]();
|
||||
continue;
|
||||
}
|
||||
|
||||
level thread maps\mp\gametypes\_gamelogic::forceend( var_1 );
|
||||
}
|
||||
}
|
||||
|
||||
watchforteamchange()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
level endon( "game_ended" );
|
||||
|
||||
for (;;)
|
||||
{
|
||||
self waittill( "luinotifyserver", var_0, var_1 );
|
||||
|
||||
if ( var_0 != "team_select" )
|
||||
continue;
|
||||
|
||||
if ( maps\mp\_utility::matchmakinggame() && !getdvarint( "force_ranking" ) )
|
||||
continue;
|
||||
|
||||
if ( var_1 != 3 )
|
||||
thread showloadoutmenu();
|
||||
|
||||
if ( var_1 == 3 )
|
||||
{
|
||||
self setclientomnvar( "ui_spectator_selected", 1 );
|
||||
self setclientomnvar( "ui_loadout_selected", -1 );
|
||||
self.spectating_actively = 1;
|
||||
|
||||
if ( getdvarint( "systemlink" ) && getdvarint( "xblive_competitionmatch" ) )
|
||||
{
|
||||
self setmlgspectator( 1 );
|
||||
self.pers["mlgSpectator"] = 1;
|
||||
thread maps\mp\gametypes\_spectating::setmlgcamvisibility( 1 );
|
||||
thread maps\mp\gametypes\_spectating::setspectatepermissions();
|
||||
self setclientomnvar( "ui_options_menu", 2 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self setclientomnvar( "ui_spectator_selected", -1 );
|
||||
self.spectating_actively = 0;
|
||||
|
||||
if ( getdvarint( "systemlink" ) && getdvarint( "xblive_competitionmatch" ) )
|
||||
{
|
||||
self setmlgspectator( 0 );
|
||||
self.pers["mlgSpectator"] = 0;
|
||||
thread maps\mp\gametypes\_spectating::setmlgcamvisibility( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
self setclientomnvar( "ui_team_selected", var_1 );
|
||||
|
||||
if ( var_1 == 0 )
|
||||
var_1 = "axis";
|
||||
else if ( var_1 == 1 )
|
||||
var_1 = "allies";
|
||||
else if ( var_1 == 2 )
|
||||
var_1 = "random";
|
||||
else
|
||||
var_1 = "spectator";
|
||||
|
||||
if ( isdefined( self.pers["team"] ) && var_1 == self.pers["team"] )
|
||||
{
|
||||
self notify( "selected_same_team" );
|
||||
continue;
|
||||
}
|
||||
|
||||
self setclientomnvar( "ui_loadout_selected", -1 );
|
||||
|
||||
if ( var_1 == "axis" )
|
||||
{
|
||||
thread setteam( "axis" );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( var_1 == "allies" )
|
||||
{
|
||||
thread setteam( "allies" );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( var_1 == "random" )
|
||||
{
|
||||
thread autoassign();
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( var_1 == "spectator" )
|
||||
thread setspectator();
|
||||
}
|
||||
}
|
||||
|
||||
showloadoutmenu()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
level endon( "game_ended" );
|
||||
common_scripts\utility::waittill_any( "joined_team", "selected_same_team" );
|
||||
self setclientomnvar( "ui_options_menu", 2 );
|
||||
}
|
||||
|
||||
autoassign()
|
||||
{
|
||||
if ( maps\mp\_utility::is_aliens() || level.gametype == "infect" )
|
||||
thread setteam( "allies" );
|
||||
else if ( ( getdvarint( "squad_match" ) == 1 || getdvarint( "squad_vs_squad" ) == 1 || getdvarint( "squad_use_hosts_squad" ) == 1 ) && isdefined( self.bot_team ) )
|
||||
thread setteam( self.bot_team );
|
||||
else if ( !isdefined( self.team ) )
|
||||
{
|
||||
if ( self ismlgspectator() )
|
||||
thread setspectator();
|
||||
else if ( level.teamcount["axis"] < level.teamcount["allies"] )
|
||||
thread setteam( "axis" );
|
||||
else if ( level.teamcount["allies"] < level.teamcount["axis"] )
|
||||
thread setteam( "allies" );
|
||||
else if ( getteamscore( "allies" ) > getteamscore( "axis" ) )
|
||||
thread setteam( "axis" );
|
||||
else
|
||||
thread setteam( "allies" );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( self ismlgspectator() )
|
||||
{
|
||||
thread setspectator();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( level.teamcount["axis"] < level.teamcount["allies"] && self.team != "axis" )
|
||||
{
|
||||
thread setteam( "axis" );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( level.teamcount["allies"] < level.teamcount["axis"] && self.team != "allies" )
|
||||
{
|
||||
thread setteam( "allies" );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( level.teamcount["allies"] == level.teamcount["axis"] )
|
||||
{
|
||||
if ( getteamscore( "allies" ) > getteamscore( "axis" ) && self.team != "axis" )
|
||||
thread setteam( "axis" );
|
||||
else if ( self.team != "allies" )
|
||||
thread setteam( "allies" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setteam( var_0 )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
|
||||
if ( !isai( self ) && level.teambased && !maps\mp\gametypes\_teams::getjointeampermissions( var_0 ) )
|
||||
return;
|
||||
|
||||
if ( level.ingraceperiod && !self.hasdonecombat )
|
||||
self.hasspawned = 0;
|
||||
|
||||
if ( self.sessionstate == "playing" )
|
||||
{
|
||||
self.switching_teams = 1;
|
||||
self.joining_team = var_0;
|
||||
self.leaving_team = self.pers["team"];
|
||||
}
|
||||
|
||||
addtoteam( var_0 );
|
||||
|
||||
if ( self.sessionstate == "playing" )
|
||||
self suicide();
|
||||
|
||||
waitforclassselect();
|
||||
endrespawnnotify();
|
||||
|
||||
if ( self.sessionstate == "spectator" )
|
||||
{
|
||||
if ( game["state"] == "postgame" )
|
||||
return;
|
||||
|
||||
if ( game["state"] == "playing" && !maps\mp\_utility::isinkillcam() )
|
||||
{
|
||||
if ( isdefined( self.waitingtospawnamortize ) && self.waitingtospawnamortize )
|
||||
return;
|
||||
|
||||
thread maps\mp\gametypes\_playerlogic::spawnclient();
|
||||
}
|
||||
|
||||
thread maps\mp\gametypes\_spectating::setspectatepermissions();
|
||||
}
|
||||
|
||||
self notify( "okToSpawn" );
|
||||
}
|
||||
|
||||
setspectator()
|
||||
{
|
||||
if ( isdefined( self.pers["team"] ) && self.pers["team"] == "spectator" )
|
||||
return;
|
||||
|
||||
if ( isalive( self ) )
|
||||
{
|
||||
self.switching_teams = 1;
|
||||
self.joining_team = "spectator";
|
||||
self.leaving_team = self.pers["team"];
|
||||
self suicide();
|
||||
}
|
||||
|
||||
self notify( "becameSpectator" );
|
||||
addtoteam( "spectator" );
|
||||
self.pers["class"] = undefined;
|
||||
self.class = undefined;
|
||||
thread maps\mp\gametypes\_playerlogic::spawnspectator();
|
||||
}
|
||||
|
||||
waitforclassselect()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
level endon( "game_ended" );
|
||||
self.waitingtoselectclass = 1;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if ( level.gametype == "infect" )
|
||||
{
|
||||
bypassclasschoice();
|
||||
break;
|
||||
}
|
||||
|
||||
if ( maps\mp\_utility::allowclasschoice() || maps\mp\_utility::showfakeloadout() && !isai( self ) )
|
||||
self waittill( "luinotifyserver", var_0, var_1 );
|
||||
else
|
||||
{
|
||||
bypassclasschoice();
|
||||
break;
|
||||
}
|
||||
|
||||
if ( var_0 != "class_select" )
|
||||
continue;
|
||||
|
||||
if ( self.team == "spectator" )
|
||||
continue;
|
||||
|
||||
if ( "" + var_1 != "callback" )
|
||||
{
|
||||
if ( isdefined( self.pers["isBot"] ) && self.pers["isBot"] )
|
||||
{
|
||||
self.pers["class"] = var_1;
|
||||
self.class = var_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_1 += 1;
|
||||
self.pers["class"] = getclasschoice( var_1 );
|
||||
self.class = getclasschoice( var_1 );
|
||||
}
|
||||
|
||||
self.waitingtoselectclass = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.waitingtoselectclass = 0;
|
||||
menuclass( "callback" );
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
beginclasschoice( var_0 )
|
||||
{
|
||||
var_1 = self.pers["team"];
|
||||
|
||||
if ( maps\mp\_utility::allowclasschoice() || maps\mp\_utility::showfakeloadout() && !isai( self ) )
|
||||
{
|
||||
self setclientomnvar( "ui_options_menu", 2 );
|
||||
|
||||
if ( !self ismlgspectator() )
|
||||
waitforclassselect();
|
||||
|
||||
endrespawnnotify();
|
||||
|
||||
if ( self.sessionstate == "spectator" )
|
||||
{
|
||||
if ( game["state"] == "postgame" )
|
||||
return;
|
||||
|
||||
if ( game["state"] == "playing" && !maps\mp\_utility::isinkillcam() )
|
||||
{
|
||||
if ( isdefined( self.waitingtospawnamortize ) && self.waitingtospawnamortize )
|
||||
return;
|
||||
|
||||
thread maps\mp\gametypes\_playerlogic::spawnclient();
|
||||
}
|
||||
|
||||
thread maps\mp\gametypes\_spectating::setspectatepermissions();
|
||||
}
|
||||
|
||||
self.connecttime = gettime();
|
||||
self notify( "okToSpawn" );
|
||||
}
|
||||
else
|
||||
thread bypassclasschoice();
|
||||
|
||||
if ( !isalive( self ) )
|
||||
thread maps\mp\gametypes\_playerlogic::predictabouttospawnplayerovertime( 0.1 );
|
||||
}
|
||||
|
||||
bypassclasschoice()
|
||||
{
|
||||
self.selectedclass = 1;
|
||||
self.waitingtoselectclass = 0;
|
||||
|
||||
if ( isdefined( level.bypassclasschoicefunc ) )
|
||||
{
|
||||
var_0 = self [[ level.bypassclasschoicefunc ]]();
|
||||
self.class = var_0;
|
||||
}
|
||||
else
|
||||
self.class = "class0";
|
||||
}
|
||||
|
||||
beginteamchoice()
|
||||
{
|
||||
self setclientomnvar( "ui_options_menu", 1 );
|
||||
}
|
||||
|
||||
showmainmenuforteam()
|
||||
{
|
||||
var_0 = self.pers["team"];
|
||||
self openpopupmenu( game["menu_class_" + var_0] );
|
||||
}
|
||||
|
||||
menuspectator()
|
||||
{
|
||||
if ( isdefined( self.pers["team"] ) && self.pers["team"] == "spectator" )
|
||||
return;
|
||||
|
||||
if ( isalive( self ) )
|
||||
{
|
||||
self.switching_teams = 1;
|
||||
self.joining_team = "spectator";
|
||||
self.leaving_team = self.pers["team"];
|
||||
self suicide();
|
||||
}
|
||||
|
||||
addtoteam( "spectator" );
|
||||
self.pers["class"] = undefined;
|
||||
self.class = undefined;
|
||||
thread maps\mp\gametypes\_playerlogic::spawnspectator();
|
||||
}
|
||||
|
||||
menuclass( var_0 )
|
||||
{
|
||||
if ( var_0 == "demolitions_mp,0" && self getrankedplayerdata( "featureNew", "demolitions" ) )
|
||||
self setrankedplayerdata( "featureNew", "demolitions", 0 );
|
||||
|
||||
if ( var_0 == "sniper_mp,0" && self getrankedplayerdata( "featureNew", "sniper" ) )
|
||||
self setrankedplayerdata( "featureNew", "sniper", 0 );
|
||||
|
||||
var_1 = self.pers["team"];
|
||||
var_2 = maps\mp\gametypes\_class::getclasschoice( var_0 );
|
||||
var_3 = maps\mp\gametypes\_class::getweaponchoice( var_0 );
|
||||
|
||||
if ( var_2 == "restricted" )
|
||||
{
|
||||
beginclasschoice();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( isdefined( self.pers["class"] ) && self.pers["class"] == var_2 && ( isdefined( self.pers["primary"] ) && self.pers["primary"] == var_3 ) )
|
||||
return;
|
||||
|
||||
if ( self.sessionstate == "playing" )
|
||||
{
|
||||
if ( isdefined( self.pers["lastClass"] ) && isdefined( self.pers["class"] ) )
|
||||
{
|
||||
self.pers["lastClass"] = self.pers["class"];
|
||||
self.lastclass = self.pers["lastClass"];
|
||||
}
|
||||
|
||||
self.pers["class"] = var_2;
|
||||
self.class = var_2;
|
||||
self.pers["primary"] = var_3;
|
||||
|
||||
if ( game["state"] == "postgame" )
|
||||
return;
|
||||
|
||||
if ( level.ingraceperiod && !self.hasdonecombat )
|
||||
{
|
||||
maps\mp\gametypes\_class::setclass( self.pers["class"] );
|
||||
self.tag_stowed_back = undefined;
|
||||
self._id_7E62 = undefined;
|
||||
maps\mp\gametypes\_class::giveloadout( self.pers["team"], self.pers["class"] );
|
||||
}
|
||||
else
|
||||
self iprintlnbold( game["strings"]["change_class"] );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( isdefined( self.pers["lastClass"] ) && isdefined( self.pers["class"] ) )
|
||||
{
|
||||
self.pers["lastClass"] = self.pers["class"];
|
||||
self.lastclass = self.pers["lastClass"];
|
||||
}
|
||||
|
||||
self.pers["class"] = var_2;
|
||||
self.class = var_2;
|
||||
self.pers["primary"] = var_3;
|
||||
|
||||
if ( game["state"] == "postgame" )
|
||||
return;
|
||||
|
||||
if ( game["state"] == "playing" && !maps\mp\_utility::isinkillcam() )
|
||||
thread maps\mp\gametypes\_playerlogic::spawnclient();
|
||||
}
|
||||
|
||||
thread maps\mp\gametypes\_spectating::setspectatepermissions();
|
||||
}
|
||||
|
||||
update_wargame_after_migration()
|
||||
{
|
||||
foreach ( var_1 in level.players )
|
||||
{
|
||||
if ( !isai( var_1 ) && var_1 ishost() )
|
||||
level.wargame_client = var_1;
|
||||
}
|
||||
}
|
||||
|
||||
addtoteam( var_0, var_1, var_2 )
|
||||
{
|
||||
if ( isdefined( self.team ) )
|
||||
{
|
||||
maps\mp\gametypes\_playerlogic::removefromteamcount();
|
||||
|
||||
if ( isdefined( var_2 ) && var_2 )
|
||||
maps\mp\gametypes\_playerlogic::decrementalivecount( self.team );
|
||||
}
|
||||
|
||||
self.pers["team"] = var_0;
|
||||
self.team = var_0;
|
||||
|
||||
if ( getdvar( "squad_vs_squad" ) == "1" )
|
||||
{
|
||||
if ( !isai( self ) )
|
||||
{
|
||||
if ( var_0 == "allies" )
|
||||
{
|
||||
if ( !isdefined( level.squad_vs_squad_allies_client ) )
|
||||
level.squad_vs_squad_allies_client = self;
|
||||
}
|
||||
else if ( var_0 == "axis" )
|
||||
{
|
||||
if ( !isdefined( level.squad_vs_squad_axis_client ) )
|
||||
level.squad_vs_squad_axis_client = self;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( getdvar( "squad_match" ) == "1" )
|
||||
{
|
||||
if ( !isai( self ) && self ishost() )
|
||||
{
|
||||
if ( !isdefined( level.squad_match_client ) )
|
||||
level.squad_match_client = self;
|
||||
}
|
||||
}
|
||||
|
||||
if ( getdvar( "squad_use_hosts_squad" ) == "1" )
|
||||
{
|
||||
if ( !isai( self ) && self ishost() )
|
||||
{
|
||||
if ( !isdefined( level.wargame_client ) )
|
||||
level.wargame_client = self;
|
||||
}
|
||||
}
|
||||
|
||||
// session team is readonly in ranked matches if "teambased" is set on the playlist
|
||||
if ( level.teambased )
|
||||
self.sessionteam = var_0;
|
||||
else if ( var_0 == "spectator" )
|
||||
self.sessionteam = "spectator";
|
||||
else
|
||||
self.sessionteam = "none";
|
||||
|
||||
if ( game["state"] != "postgame" )
|
||||
{
|
||||
maps\mp\gametypes\_playerlogic::addtoteamcount();
|
||||
|
||||
if ( isdefined( var_2 ) && var_2 )
|
||||
maps\mp\gametypes\_playerlogic::incrementalivecount( self.team );
|
||||
}
|
||||
|
||||
maps\mp\_utility::updateobjectivetext();
|
||||
|
||||
if ( isdefined( var_1 ) && var_1 )
|
||||
waittillframeend;
|
||||
|
||||
maps\mp\_utility::updatemainmenu();
|
||||
|
||||
if ( var_0 == "spectator" )
|
||||
{
|
||||
self notify( "joined_spectators" );
|
||||
level notify( "joined_team", self );
|
||||
}
|
||||
else
|
||||
{
|
||||
self notify( "joined_team" );
|
||||
level notify( "joined_team", self );
|
||||
}
|
||||
}
|
||||
|
||||
endrespawnnotify()
|
||||
{
|
||||
self.waitingtospawn = 0;
|
||||
self notify( "end_respawn" );
|
||||
}
|
1902
localappdata/xlabs/data/iw6x/data/maps/mp/gametypes/_playerlogic.gsc
Normal file
23
localappdata/xlabs/data/iw6x/data/scripts/_team_balance.gsc
Normal file
@ -0,0 +1,23 @@
|
||||
init()
|
||||
{
|
||||
// define onteamselection callback function used in balanceteams()
|
||||
level.onteamselection = ::set_team;
|
||||
}
|
||||
|
||||
set_team(team)
|
||||
{
|
||||
if (team != self.pers["team"])
|
||||
{
|
||||
self.switching_teams = true;
|
||||
self.joining_team = team;
|
||||
self.leaving_team = self.pers["team"];
|
||||
}
|
||||
|
||||
if (self.sessionstate == "playing")
|
||||
{
|
||||
self suicide();
|
||||
}
|
||||
|
||||
maps\mp\gametypes\_menus::addtoteam(team);
|
||||
maps\mp\gametypes\_menus::endrespawnnotify();
|
||||
}
|
BIN
localappdata/xlabs/data/iw6x/data/sound/patch-3-music.flac
Normal file
@ -0,0 +1,497 @@
|
||||
if (game:issingleplayer() or not Engine.InFrontend()) then
|
||||
return
|
||||
end
|
||||
|
||||
package.loaded["LUI.mp_menus.MPMainMenu"].main_menu_options_feeder = function( f17_arg0 )
|
||||
local f17_local0 = Engine.IsAliensMode()
|
||||
local f17_local1 = SvS.IsSvS()
|
||||
local f17_local2 = false
|
||||
if Engine.GetDvarInt( "allow_online_squads" ) == 1 or not Engine.IsConsoleGame() then
|
||||
f17_local2 = true
|
||||
end
|
||||
local f17_local3 = Engine.DoWeNeedCompatibilityPacks()
|
||||
if f17_local1 then
|
||||
local f17_local4 = f17_local2
|
||||
end
|
||||
local f17_local5 = f17_local4 or not f17_local1
|
||||
local f17_local6 = {}
|
||||
if Engine.AllowOnline() and f17_local5 then
|
||||
local f17_local7, f17_local8 = nil
|
||||
if f17_local1 then
|
||||
f17_local8 = Engine.Localize( "@PLATFORM_PLAY_ONLINE_SQUADS_CAPS" )
|
||||
f17_local7 = Engine.Localize( "@LUA_MENU_SQUADS_INTRO" )
|
||||
elseif f17_local0 then
|
||||
f17_local8 = Engine.Localize( "@PLATFORM_PLAY_ONLINE_CAPS" )
|
||||
f17_local7 = Engine.Localize( "@LUA_MENU_PLAY_EXTINCTION_ONLINE_DESC" )
|
||||
else
|
||||
f17_local8 = Engine.Localize( "@PLATFORM_PLAY_ONLINE_CAPS" )
|
||||
f17_local7 = Engine.Localize( "@PLATFORM_PLAY_ONLINE_DESC" )
|
||||
end
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPMain_0",
|
||||
disabled = f17_local3,
|
||||
disabledFunc = Engine.DoWeNeedCompatibilityPacks,
|
||||
properties = {
|
||||
button_text = f17_local8,
|
||||
button_action_func = LUI.mp_menus.MPMainMenu.xboxLiveButtonAction,
|
||||
desc_text = f17_local7,
|
||||
button_over_func = function ( f18_arg0, f18_arg1 )
|
||||
PersistentBackground.SetToDefault()
|
||||
end
|
||||
}
|
||||
}
|
||||
end
|
||||
if Engine.IsConsoleGame() then
|
||||
local f17_local7 = "@LUA_MENU_SPLITSCREEN_CAPS"
|
||||
if f17_local0 then
|
||||
f17_local7 = "@LUA_MENU_LOCAL_CAPS"
|
||||
elseif f17_local1 then
|
||||
f17_local7 = "@LUA_MENU_LOCAL_CAPS"
|
||||
end
|
||||
local f17_local8 = #f17_local6 + 1
|
||||
local f17_local9 = {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPMain_1",
|
||||
disabled = f17_local3,
|
||||
disabledFunc = Engine.DoWeNeedCompatibilityPacks
|
||||
}
|
||||
local f17_local10 = {
|
||||
button_text = Engine.Localize( f17_local7 ),
|
||||
button_action_func = splitScreenButtonAction
|
||||
}
|
||||
local f17_local11
|
||||
if f17_local1 then
|
||||
f17_local11 = Engine.Localize( "@LUA_MENU_SQUAD_LOCAL_PLAY_DESC" )
|
||||
if not f17_local11 then
|
||||
|
||||
else
|
||||
f17_local10.desc_text = f17_local11
|
||||
f17_local10.button_over_func = function ( f19_arg0, f19_arg1 )
|
||||
PersistentBackground.SetToDefault()
|
||||
end
|
||||
|
||||
f17_local9.properties = f17_local10
|
||||
f17_local6[f17_local8] = f17_local9
|
||||
if not f17_local1 then
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPMain_2",
|
||||
disabled = f17_local3,
|
||||
disabledFunc = Engine.DoWeNeedCompatibilityPacks,
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@PLATFORM_SYSTEM_LINK_CAPS" ),
|
||||
button_action_func = LUI.mp_menus.MPMainMenu.systemLinkButtonAction,
|
||||
desc_text = Engine.Localize( "@PLATFORM_SYSTEM_LINK_DESC" ),
|
||||
button_over_func = function ( f20_arg0, f20_arg1 )
|
||||
PersistentBackground.SetToDefault()
|
||||
end
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
f17_local11 = Engine.Localize( "@LUA_MENU_SPLITSCREEN_DESC" )
|
||||
end
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPMain_6",
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_OPTIONS_CAPS" ),
|
||||
button_action_func = LUI.mp_menus.MPMainMenu.optionsButtonAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_OPTIONS_DESC" ),
|
||||
button_over_func = function ( f22_arg0, f22_arg1 )
|
||||
PersistentBackground.SetToDefault()
|
||||
end
|
||||
}
|
||||
}
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "generic_separator",
|
||||
id = "main_menu_spacer_id"
|
||||
}
|
||||
if not Engine.IsCoreMode() then
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPMain_7",
|
||||
properties = {
|
||||
text = Engine.Localize( "@LUA_MENU_MULTIPLAYER_CAPS" ),
|
||||
button_action_func = function ( f23_arg0, f23_arg1 )
|
||||
Engine.StopMusic( 200 )
|
||||
Engine.SwitchToCoreMode()
|
||||
Engine.PlayMusic( CoD.Music.MainMPMusic )
|
||||
Engine.SetActiveMenu( ActiveMenus.None )
|
||||
Engine.SetActiveMenu( ActiveMenus.Main )
|
||||
end,
|
||||
button_over_func = function ( f24_arg0, f24_arg1 )
|
||||
PersistentBackground.Set( PersistentBackground.Variants.MPBackground )
|
||||
end,
|
||||
desc_text = Engine.Localize( "@PLATFORM_PLAY_ONLINE_DESC" )
|
||||
}
|
||||
}
|
||||
end
|
||||
if not SvS.IsSvS() then
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPMain_8",
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_SQUAD_MODE_CAP" ),
|
||||
button_action_func = function ( f25_arg0, f25_arg1 )
|
||||
Engine.StopMusic( 200 )
|
||||
Engine.SwitchToSquadVsSquadMode()
|
||||
Engine.PlayMusic( CoD.Music.MainSquadMusic )
|
||||
Engine.SetActiveMenu( ActiveMenus.None )
|
||||
Engine.SetActiveMenu( ActiveMenus.Main )
|
||||
end,
|
||||
button_over_func = function ( f26_arg0, f26_arg1 )
|
||||
PersistentBackground.Set( PersistentBackground.Variants.SvSBackground )
|
||||
end,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_SVS_MAIN_MENU_DESC" )
|
||||
}
|
||||
}
|
||||
end
|
||||
if not Engine.IsAliensMode() and Engine.UnlockedAliens() then
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPMain_9",
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_ALIENS_CAPS" ),
|
||||
button_action_func = function ( f27_arg0, f27_arg1 )
|
||||
Engine.StopMusic( 200 )
|
||||
Engine.SwitchToAliensMode()
|
||||
Engine.PlayMusic( CoD.Music.MainExtinctMusic )
|
||||
Engine.SetActiveMenu( ActiveMenus.None )
|
||||
Engine.SetActiveMenu( ActiveMenus.Main )
|
||||
end,
|
||||
button_over_func = function ( f28_arg0, f28_arg1 )
|
||||
PersistentBackground.Set( PersistentBackground.Variants.AliensBackground )
|
||||
end,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_ALIENS_MAIN_MENU_DESC" ),
|
||||
additional_handlers = {
|
||||
menu_create = AddExtinctionGlowBackground
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
f17_local6[#f17_local6 + 1] = {
|
||||
type = "button_desc_text",
|
||||
id = "mp_menu_button_description_id",
|
||||
properties = {
|
||||
lines = SvS.IsSvS() and 8 or nil
|
||||
}
|
||||
}
|
||||
return f17_local6
|
||||
end
|
||||
|
||||
package.loaded["LUI.mp_menus.MPXboxLiveMenu"].XboxLiveOptionsFeeder = function( f29_arg0 )
|
||||
local f29_local0 = Engine.IsAliensMode()
|
||||
local f29_local1 = SvS.IsSvS()
|
||||
local f29_local2 = SvS.IsSvS()
|
||||
if f29_local2 then
|
||||
f29_local2 = SvS.GetCurrentSquadModeInfo()
|
||||
end
|
||||
local f29_local3 = {}
|
||||
local f29_local4 = nil
|
||||
if f29_local0 then
|
||||
f29_local4 = Engine.Localize( "@LUA_MENU_STORE_CAPS" ) -- Orginally @LUA_MENU_PUBLIC_MATCH_CAPS but we need to use @LUA_MENU_STORE_CAPS
|
||||
elseif f29_local1 then
|
||||
f29_local4 = Engine.Localize( "@PLATFORM_FIND_GAME_CAPS" )
|
||||
else
|
||||
f29_local4 = Engine.Localize( "@LUA_MENU_STORE_CAPS" ) -- Orginally @PLATFORM_FIND_GAME_CAPS but we need to use @LUA_MENU_STORE_CAPS
|
||||
end
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "find_match_button_id",
|
||||
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
|
||||
properties = {
|
||||
button_text = f29_local4,
|
||||
button_action_func = FindMatchAction,
|
||||
desc_text = SvS.IsSvS() and Engine.Localize( "@LUA_MENU_SQUADS_FIND_MATCH_DESC" ) or Engine.Localize( "@LUA_MENU_STORE_DESC" ), -- Orginally @PLATFORM_DESC_FIND_GAME but we need to use @LUA_MENU_STORE_DESC
|
||||
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
|
||||
additional_handlers = {
|
||||
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
|
||||
}
|
||||
}
|
||||
}
|
||||
if f29_local0 then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "solo_match_button_id",
|
||||
disabled = LUI.mp_menus.MPXboxLiveMenu.shouldDisableSoloMatch(),
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_SOLO_MATCH_CAPS" ),
|
||||
button_action_func = LUI.mp_menus.MPXboxLiveMenu.SoloMatchAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_SOLO_MATCH_DESC" ),
|
||||
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.shouldDisableSoloMatch,
|
||||
additional_handlers = {
|
||||
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
|
||||
}
|
||||
}
|
||||
}
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "private_match_button_id",
|
||||
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_CUSTOM_MATCH_CAPS" ),
|
||||
button_action_func = LUI.mp_menus.MPXboxLiveMenu.PrivateMatchAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_DESC_PRIVATE_MATCH" ),
|
||||
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
|
||||
additional_handlers = {
|
||||
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
if not f29_local0 then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "create_squad_button_id",
|
||||
disabled = false,
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_CREATE_A_CLASS_CAPS" ),
|
||||
button_action_func = LUI.mp_menus.MPXboxLiveMenu.CreateSquadAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_DESC_CREATE_A_CLASS" ),
|
||||
additional_handlers = {
|
||||
refresh_new_icons = function ( f30_arg0, f30_arg1 )
|
||||
if Cac.AnyUnseenMDLCItems( Engine.GetFirstActiveController(), NewIconsTable.CACItemTypes ) then
|
||||
f30_arg0:processEvent( {
|
||||
name = "show_new_icon"
|
||||
} )
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
f29_local3[#f29_local3 + 1] = LUI.mp_menus.AliensLoadout.GetAliensLoadoutButton()
|
||||
end
|
||||
local f29_local5 = {
|
||||
type = "UIGenericButton",
|
||||
id = "leaderboards_button_id",
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_LEADERBOARDS_CAPS" ),
|
||||
desc_text = Engine.Localize( "@LUA_MENU_DESC_LEADERBOARDS" ),
|
||||
button_action_func = function ( f31_arg0, f31_arg1 )
|
||||
if Engine.IsUserAGuest( f31_arg1.controller ) then
|
||||
LUI.FlowManager.RequestPopupMenu( f31_arg0, "popup_no_guest", true, f31_arg1.controller )
|
||||
else
|
||||
LUI.FlowManager.RequestAddMenu( f31_arg0, "leaderboards", true, f31_arg1.controller )
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
if f29_local1 and f29_local2.HasLeaderboard then
|
||||
f29_local3[#f29_local3 + 1] = f29_local5
|
||||
end
|
||||
if f29_local1 and f29_local2 and f29_local2.HasReports then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "squad_reports_button_id",
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_SQUAD_REPORTS" ),
|
||||
desc_text = Engine.Localize( "@LUA_MENU_SQUAD_REPORTS_DESC" ),
|
||||
button_action_func = function ( f32_arg0, f32_arg1 )
|
||||
LUI.FlowManager.RequestAddMenu( f32_arg0, "squad_reports_menu", false, f32_arg1.controller, false, {
|
||||
controller = f32_arg1.controller
|
||||
} )
|
||||
end
|
||||
}
|
||||
}
|
||||
end
|
||||
if not f29_local0 and not f29_local1 then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "operations_button_id",
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_OPERATIONS_TITLE" ),
|
||||
button_action_func = LUI.mp_menus.MPBarracks.BarrackOperationsAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_DESC_CHALLENGES" )
|
||||
}
|
||||
}
|
||||
end
|
||||
if not f29_local0 then
|
||||
if not f29_local1 then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "barracks_button_id",
|
||||
disabled = false,
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_BARRACKS_CAPS" ),
|
||||
button_action_func = BarracksAction,
|
||||
desc_text = Clan.IsEnabled() and Engine.Localize( "@LUA_MENU_DESC_BARRACKS" ) or Engine.Localize( "@LUA_MENU_DESC_BARRACKS_PRIVATE" )
|
||||
}
|
||||
}
|
||||
end
|
||||
if not f29_local1 or f29_local2 ~= SvS.SquadModes.SquadVsSquad then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "generic_separator"
|
||||
}
|
||||
end
|
||||
if not f29_local1 then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "private_match_button_id",
|
||||
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_PRIVATE_MATCH_CAPS" ),
|
||||
button_action_func = LUI.mp_menus.MPXboxLiveMenu.PrivateMatchAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_DESC_PRIVATE_MATCH" ),
|
||||
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
|
||||
additional_handlers = {
|
||||
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
if f29_local1 then
|
||||
if f29_local2 == SvS.SquadModes.SquadAssault then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "squad_match_button_id",
|
||||
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
|
||||
properties = {
|
||||
button_text = Engine.Localize( "LUA_MENU_CHALLENGE_FRIEND_CAPS" ),
|
||||
button_action_func = function ( f35_arg0, f35_arg1 )
|
||||
if IsFirstTimeFlowRequired( f35_arg1.controller ) then
|
||||
LUI.FlowManager.RequestAddMenu( f35_arg0, "cac_member_select_main", true, f35_arg1.controller, false, {
|
||||
next_screen = "cac_edit_main",
|
||||
squad_location = "squadMembers",
|
||||
class_location = "loadouts",
|
||||
findMatch = true
|
||||
} )
|
||||
elseif CheckHasRequiredDLC( f35_arg0 ) then
|
||||
LUI.FlowManager.RequestPopupMenu( f35_arg0, "popup_friends", true, f35_arg1.controller, false, {
|
||||
challengeMode = true
|
||||
} )
|
||||
end
|
||||
end,
|
||||
desc_text = Engine.Localize( "LUA_MENU_CHALLENGE_FRIEND_DESC" ),
|
||||
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
|
||||
additional_handlers = {
|
||||
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
if f29_local2 and not f29_local2.RequiresMatchmaking then
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "play_now_button_id",
|
||||
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
|
||||
properties = {
|
||||
button_text = Engine.Localize( "LUA_MENU_PLAY_NOW_CAPS" ),
|
||||
button_action_func = function ( f36_arg0, f36_arg1 )
|
||||
f36_arg1.squadsPlayNow = true
|
||||
FindMatchAction( f36_arg0, f36_arg1 )
|
||||
end,
|
||||
desc_text = Engine.Localize( "LUA_MENU_PLAY_NOW_DESC" ),
|
||||
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
|
||||
additional_handlers = {
|
||||
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
local f29_local6 = #f29_local3 + 1
|
||||
local f29_local7 = {
|
||||
type = "button_desc_text",
|
||||
id = "prelobby_description_id"
|
||||
}
|
||||
local f29_local8 = {}
|
||||
local f29_local9
|
||||
if not (not SvS.IsSvS() or f29_local2 ~= SvS.SquadModes.SquadAssault) or Engine.IsAliensMode() or Engine.IsCoreMode() then
|
||||
f29_local9 = 1
|
||||
if not f29_local9 then
|
||||
|
||||
else
|
||||
f29_local8.lines = f29_local9
|
||||
f29_local7.properties = f29_local8
|
||||
f29_local3[f29_local6] = f29_local7
|
||||
f29_local3[#f29_local3 + 1] = {
|
||||
type = "UITimer",
|
||||
id = "bnt_lock_tmr",
|
||||
properties = {
|
||||
event = "check_buttons",
|
||||
interval = 500,
|
||||
disposable = false,
|
||||
broadcastToRoot = true
|
||||
}
|
||||
}
|
||||
return f29_local3
|
||||
end
|
||||
end
|
||||
f29_local9 = nil
|
||||
end
|
||||
|
||||
function FindMatchAction( f5_arg0, f5_arg1 )
|
||||
if Lobby.EnteringLobby() == true then
|
||||
LUI.FlowManager.RequestPopupMenu( f5_arg0, "popup_throttling", true, f5_arg1.controller, false, {
|
||||
eventData = f5_arg1
|
||||
} )
|
||||
else
|
||||
FindMatchAfterThrottleEvent( f5_arg0, f5_arg1 )
|
||||
end
|
||||
end
|
||||
|
||||
function FindMatchAfterThrottleEvent( f4_arg0, f4_arg1 )
|
||||
local f4_local0 = false
|
||||
local f4_local1 = -1
|
||||
for f4_local2 = 0, Engine.GetMaxControllerCount() - 1, 1 do
|
||||
if Engine.HasActiveLocalClient( f4_local2 ) and IsFirstTimeFlowRequired( f4_local2 ) then
|
||||
f4_local0 = true
|
||||
if f4_local1 < 0 then
|
||||
f4_local1 = f4_local2
|
||||
end
|
||||
end
|
||||
end
|
||||
if f4_local0 then
|
||||
LUI.FlowManager.RequestAddMenu( f4_arg0, "cac_member_select_main", true, f4_local1, false, {
|
||||
next_screen = "cac_edit_main",
|
||||
squad_location = "squadMembers",
|
||||
class_location = "loadouts",
|
||||
findMatch = true
|
||||
} )
|
||||
elseif not LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons() then
|
||||
Engine.Exec( "xblive_privatematch 0" )
|
||||
if Engine.IsAliensMode() then
|
||||
LUI.mp_menus.Aliens.AliensRunConfig( f4_arg1.controller )
|
||||
end
|
||||
if LUI.mp_menus.MPXboxLiveMenu.CheckHasRequiredDLC( f4_arg0 ) then
|
||||
if LUI.mp_menus.MPXboxLiveMenu.DisplayLowRepWarning( f4_arg0, f4_arg1 ) then
|
||||
return
|
||||
elseif SvS.IsSvS() then
|
||||
local f4_local3 = SvS.GetCurrentSquadModeInfo()
|
||||
local f4_local4, f4_local5 = SvS.GetPlaylistFromSquadMode( f4_local3 )
|
||||
local f4_local6 = false
|
||||
if f4_arg1.squadsPlayNow then
|
||||
f4_local6 = true
|
||||
end
|
||||
if not f4_arg1.squadsPlayNow and f4_local3.DynamicMatchmaking then
|
||||
Playlist.DoAction( f4_local4, f4_local5, true, f4_local6 )
|
||||
else
|
||||
Playlist.DoAction( f4_local4, f4_local5, false, f4_local6 )
|
||||
end
|
||||
if Engine.GetDvarBool( "squad_match" ) then
|
||||
Squad.StartMatch( f4_arg1.controller, true )
|
||||
Engine.SetDvarBool( "squad_find_match", true )
|
||||
end
|
||||
LUI.FlowManager.RequestAddMenu( f4_arg0, "menu_xboxlive_lobby", false, f4_arg1.controller, false )
|
||||
else
|
||||
LUI.FlowManager.RequestPopupMenu( f4_arg0, "menu_systemlink_join" ) -- open server list instead of playlist_main
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function BarracksAction( f9_arg0, f9_arg1 )
|
||||
LUI.FlowManager.RequestAddMenu( f9_arg0, "menu_stats", true, f9_arg1.controller ) -- custom stats menu
|
||||
end
|
||||
|
||||
-- Remove social button
|
||||
LUI.MenuBuilder.m_definitions["online_friends_widget"] = function()
|
||||
return {
|
||||
type = "UIElement"
|
||||
}
|
||||
end
|
@ -0,0 +1,436 @@
|
||||
if (game:issingleplayer() or not Engine.InFrontend()) then
|
||||
return
|
||||
end
|
||||
|
||||
local Lobby = luiglobals.Lobby
|
||||
|
||||
game:addlocalizedstring("LUA_MENU_SERVER_FILTER_POPUP_INSTR", "Change how the servers are filtered")
|
||||
|
||||
function FiltersPopupClose(f1_arg0, f1_arg1)
|
||||
local f1_local0 = LUI.FlowManager.GetMenuScopedDataFromElement(f1_arg0)
|
||||
local f1_local1 = LUI.FlowManager.GetMenuScopedDataByMenuName("mp_leaderboard_main")
|
||||
local f1_local2 = f1_local1.leaderboardType
|
||||
if f1_local2 and f1_local2 ~= "" then
|
||||
Leaderboards.OpenLeaderboard(f1_arg0, f1_local2, f1_local0.filterKey, f1_local1.filterDurationKey, f1_local1.isHardcore)
|
||||
end
|
||||
end
|
||||
|
||||
function mp_server_filters_popup()
|
||||
return {
|
||||
type = "UIElement",
|
||||
id = "mp_leaderboard_filters_popup_container_id",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
left = 0,
|
||||
right = 0
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "UIImage",
|
||||
id = "darken_bg",
|
||||
states = {
|
||||
default = CoD.ColorizeState(Swatches.Overlay.Color, {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
left = 0,
|
||||
right = 0,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
material = RegisterMaterial("white"),
|
||||
alpha = Swatches.Overlay.AlphaMore
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIElement",
|
||||
id = "mp_server_filters_popup_id",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = false,
|
||||
bottomAnchor = false,
|
||||
leftAnchor = false,
|
||||
rightAnchor = false,
|
||||
top = -1 * Leaderboards.Layout.FilterHeight * 0.6,
|
||||
width = Leaderboards.Layout.FilterWidth,
|
||||
height = 170
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "generic_drop_shadow",
|
||||
properties = {
|
||||
offset_shadow = 0
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "generic_menu_titlebar",
|
||||
id = "server_filters_popup_title_bar_id",
|
||||
properties = {
|
||||
title_bar_text = Engine.Localize("@LUA_MENU_FILTER_CAPS"),
|
||||
fill_alpha = 1
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "generic_menu_background",
|
||||
id = "server_filters_popup_background",
|
||||
properties = {
|
||||
fill_alpha = 1
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "mp_server_filters_popup_page"
|
||||
},
|
||||
{
|
||||
type = "UIBindButton",
|
||||
id = "filters_popup_back_button",
|
||||
handlers = {
|
||||
button_secondary = MBh.DoMultiple({
|
||||
MBh.LeaveMenu(),
|
||||
FiltersPopupClose,
|
||||
ForceRefreshServers
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
function ForceRefreshServers(f4_arg0, f4_arg1)
|
||||
local f4_local0 = LUI.FlowManager.GetMenuScopedDataByMenuName("menu_systemlink_join")
|
||||
f4_local0.serverCount = 0
|
||||
if f4_local0.serverList then
|
||||
local f4_local1 = Lobby.RefreshServerList
|
||||
local f4_local2 = f4_arg1.controller
|
||||
if not f4_local2 then
|
||||
f4_local2 = Engine.GetFirstActiveController()
|
||||
end
|
||||
f4_local1(f4_local2)
|
||||
f4_local0.serverList:processEvent({
|
||||
name = "lose_focus",
|
||||
immediate = true
|
||||
})
|
||||
f4_local0.serverList:clearSavedState()
|
||||
f4_local0.serverList:processEvent({
|
||||
name = "menu_refresh",
|
||||
dispatchChildren = true
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
function OpenFiltersMenu(f36_arg0, f36_arg1)
|
||||
LUI.FlowManager.RequestPopupMenu(f36_arg0, "mp_server_filters_popup", true, f36_arg1.controller, false, {})
|
||||
end
|
||||
|
||||
LUI.MenuBuilder.registerDef("mp_server_filters_popup", mp_server_filters_popup)
|
||||
|
||||
GameTypeRefCol = 0
|
||||
GameTypeNameCol = 1
|
||||
GameTypeDescCol = 2
|
||||
GameTypeImageCol = 3
|
||||
|
||||
function GetGametypes()
|
||||
if Engine.IsCoreMode() then
|
||||
return { "any", "dm", "war", "sd", "dom", "conf", "sr", "infect", "blitz", "grind", "cranked", "sotf", "sotf_ffa",
|
||||
"horde", "gun", "grnd", "siege" }
|
||||
end
|
||||
return { "aliens" }
|
||||
end
|
||||
|
||||
function GetLocalizedStringFromGametype(gametype)
|
||||
if gametype == "any" then
|
||||
return string.upper(Engine.Localize("LUA_MENU_LB_FILTER_GROUP_ALL"))
|
||||
end
|
||||
local gametype_name = Engine.TableLookup("mp/gameTypesTable.csv", GameTypeRefCol, gametype, GameTypeNameCol)
|
||||
if gametype_name ~= "" then
|
||||
local token = "@"
|
||||
local caps_token = "_CAPS"
|
||||
localized = Engine.Localize(token .. gametype_name .. caps_token)
|
||||
return localized
|
||||
end
|
||||
return "UNKNOWN"
|
||||
end
|
||||
|
||||
function GetMapnameFromID(id)
|
||||
if id == "any" then
|
||||
return string.upper(Engine.Localize("LUA_MENU_LB_FILTER_GROUP_ALL"))
|
||||
end
|
||||
|
||||
if id == "mp_descent_new" then
|
||||
return Engine.Localize("@LUA_MENU_MAPNAME_DESCENT_CAPS")
|
||||
elseif id == "mp_favela_iw6" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_FAVELA_IW6"))
|
||||
elseif id == "mp_conflict" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_CONFLICT"))
|
||||
elseif id == "mp_mine" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_MINE"))
|
||||
elseif id == "mp_shipment_ns" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_SHIPMENT_NS"))
|
||||
elseif id == "mp_zerosub" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_ZEROSUB"))
|
||||
elseif id == "mp_ca_red_river" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_CA_RED_RIVER"))
|
||||
elseif id == "mp_ca_rumble" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_CA_RUMBLE"))
|
||||
end
|
||||
|
||||
if id == "mp_alien_town" then
|
||||
return string.upper(Engine.Localize("@MPUI_ALIEN_TOWN"))
|
||||
elseif id == "mp_alien_armory" then
|
||||
return string.upper(Engine.Localize("@MPUI_ALIEN_ARMORY"))
|
||||
elseif id == "mp_alien_beacon" then
|
||||
return string.upper(Engine.Localize("@MPUI_ALIEN_BEACON"))
|
||||
elseif id == "mp_alien_dlc3" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_ALIEN_DLC3"))
|
||||
elseif id == "mp_alien_last" then
|
||||
return string.upper(Engine.Localize("@PRESENCE_MP_ALIEN_LAST"))
|
||||
end
|
||||
|
||||
return Engine.Localize("@LUA_MENU_MAPNAME_" .. id:sub(4) .. "_CAPS")
|
||||
end
|
||||
|
||||
function GetMaps()
|
||||
if Engine.IsCoreMode() then
|
||||
return {
|
||||
"any",
|
||||
"mp_prisonbreak",
|
||||
"mp_dart",
|
||||
"mp_lonestar",
|
||||
"mp_frag",
|
||||
"mp_snow",
|
||||
"mp_fahrenheit",
|
||||
"mp_hashima",
|
||||
"mp_warhawk",
|
||||
"mp_sovereign",
|
||||
"mp_zebra",
|
||||
"mp_skeleton",
|
||||
"mp_chasm",
|
||||
"mp_flooded",
|
||||
"mp_strikezone",
|
||||
"mp_descent_new",
|
||||
"mp_ca_red_river",
|
||||
"mp_ca_rumble",
|
||||
"mp_swamp",
|
||||
"mp_boneyard_ns",
|
||||
"mp_dome_ns",
|
||||
"mp_battery3",
|
||||
"mp_ca_impact",
|
||||
"mp_ca_behemoth",
|
||||
"mp_dig",
|
||||
"mp_zulu",
|
||||
"mp_pirate",
|
||||
"mp_favela_iw6",
|
||||
"mp_zerosub",
|
||||
"mp_conflict",
|
||||
"mp_mine",
|
||||
"mp_shipment_ns",
|
||||
}
|
||||
elseif Engine.IsAliensMode() then
|
||||
return {
|
||||
"any",
|
||||
"mp_alien_town",
|
||||
"mp_alien_armory",
|
||||
"mp_alien_beacon",
|
||||
"mp_alien_dlc3",
|
||||
"mp_alien_last"
|
||||
}
|
||||
end
|
||||
|
||||
return { "any" }
|
||||
end
|
||||
|
||||
function ServerFiltersPopupItems(f7_arg0)
|
||||
|
||||
local rules = {}
|
||||
if Engine.IsCoreMode() then
|
||||
local gametype = {
|
||||
type = "UIGenericButton",
|
||||
id = "server_filters_gametype",
|
||||
properties = {
|
||||
style = GenericButtonSettings.Styles.GlassButton,
|
||||
substyle = GenericButtonSettings.Styles.GlassButton.SubStyles.SubMenu,
|
||||
variant = GenericButtonSettings.Variants.Select,
|
||||
content_width = 258,
|
||||
side = "left",
|
||||
button_text = Engine.Localize("@LUA_MENU_MODE_CAPS"),
|
||||
button_display_func = function(f8_arg0, f8_arg1)
|
||||
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f8_arg0)
|
||||
if focusedElement.filterGametypeKey == nil then
|
||||
focusedElement.filterGametypeKey = Engine.GetDvarString("ui_mapvote_entrya_gametype")
|
||||
end
|
||||
Engine.SetDvarString("ui_mapvote_entrya_gametype", focusedElement.filterGametypeKey)
|
||||
return Engine.Localize(GetLocalizedStringFromGametype(focusedElement.filterGametypeKey))
|
||||
end,
|
||||
button_left_func = function(f9_arg0, f9_arg1)
|
||||
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f9_arg0)
|
||||
local keys = GetGametypes()
|
||||
local defaultKeysI = 1
|
||||
for i = 1, #keys, 1 do
|
||||
if keys[i] == focusedElement.filterGametypeKey then
|
||||
defaultKeysI = i
|
||||
break
|
||||
end
|
||||
end
|
||||
defaultKeysI = defaultKeysI - 1
|
||||
if defaultKeysI < 1 then
|
||||
focusedElement.filterGametypeKey = keys[#keys]
|
||||
else
|
||||
focusedElement.filterGametypeKey = keys[defaultKeysI]
|
||||
end
|
||||
end,
|
||||
button_right_func = function(f10_arg0, f10_arg1)
|
||||
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f10_arg0)
|
||||
local keys = GetGametypes()
|
||||
local defaultKeysI = 1
|
||||
for i = 1, #keys, 1 do
|
||||
if keys[i] == focusedElement.filterGametypeKey then
|
||||
defaultKeysI = i
|
||||
break
|
||||
end
|
||||
end
|
||||
defaultKeysI = defaultKeysI + 1
|
||||
if #keys < defaultKeysI then
|
||||
focusedElement.filterGametypeKey = keys[1]
|
||||
else
|
||||
focusedElement.filterGametypeKey = keys[defaultKeysI]
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
table.insert(rules, gametype)
|
||||
end
|
||||
|
||||
local maps = {
|
||||
type = "UIGenericButton",
|
||||
id = "server_filters_map",
|
||||
properties = {
|
||||
style = GenericButtonSettings.Styles.GlassButton,
|
||||
substyle = GenericButtonSettings.Styles.GlassButton.SubStyles.SubMenu,
|
||||
variant = GenericButtonSettings.Variants.Select,
|
||||
content_width = 258,
|
||||
side = "left",
|
||||
button_text = Engine.Localize("@LUA_MENU_MAPS_CAPS"),
|
||||
button_display_func = function(f8_arg0, f8_arg1)
|
||||
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f8_arg0)
|
||||
if focusedElement.filterMapnameKey == nil then
|
||||
focusedElement.filterMapnameKey = Engine.GetDvarString("ui_mapvote_entrya_mapname")
|
||||
end
|
||||
Engine.SetDvarString("ui_mapvote_entrya_mapname", focusedElement.filterMapnameKey)
|
||||
return GetMapnameFromID(focusedElement.filterMapnameKey)
|
||||
end,
|
||||
button_left_func = function(f9_arg0, f9_arg1)
|
||||
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f9_arg0)
|
||||
local keys = GetMaps()
|
||||
local defaultKeysI = 1
|
||||
for i = 1, #keys, 1 do
|
||||
if keys[i] == focusedElement.filterMapnameKey then
|
||||
defaultKeysI = i
|
||||
break
|
||||
end
|
||||
end
|
||||
defaultKeysI = defaultKeysI - 1
|
||||
if defaultKeysI < 1 then
|
||||
focusedElement.filterMapnameKey = keys[#keys]
|
||||
else
|
||||
focusedElement.filterMapnameKey = keys[defaultKeysI]
|
||||
end
|
||||
end,
|
||||
button_right_func = function(f10_arg0, f10_arg1)
|
||||
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f10_arg0)
|
||||
local keys = GetMaps()
|
||||
local defaultKeysI = 1
|
||||
for i = 1, #keys, 1 do
|
||||
if keys[i] == focusedElement.filterMapnameKey then
|
||||
defaultKeysI = i
|
||||
break
|
||||
end
|
||||
end
|
||||
defaultKeysI = defaultKeysI + 1
|
||||
if #keys < defaultKeysI then
|
||||
focusedElement.filterMapnameKey = keys[1]
|
||||
else
|
||||
focusedElement.filterMapnameKey = keys[defaultKeysI]
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
table.insert(rules, maps)
|
||||
|
||||
return rules
|
||||
end
|
||||
|
||||
function mp_server_filters_popup_page()
|
||||
return {
|
||||
type = "UIElement",
|
||||
id = "mp_server_filters_popup_page_id",
|
||||
properties = {},
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = AAR.Layout.TitleBarHeight + 1,
|
||||
bottom = -1,
|
||||
left = 1,
|
||||
right = -1,
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "UIText",
|
||||
id = "leaderboard_filters_instruction",
|
||||
properties = {
|
||||
text = Engine.Localize("@LUA_MENU_SERVER_FILTER_POPUP_INSTR")
|
||||
},
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = false,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 10,
|
||||
bottom = 10 + CoD.TextSettings.NormalFont.Height,
|
||||
left = 75,
|
||||
right = -75,
|
||||
alignment = LUI.Alignment.Center,
|
||||
font = CoD.TextSettings.NormalFont.Font,
|
||||
red = Colors.white.r,
|
||||
green = Colors.white.g,
|
||||
blue = Colors.white.b
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIVerticalList",
|
||||
id = "server_filters_popup_vlist",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = false,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = -75,
|
||||
bottom = 0,
|
||||
left = 2,
|
||||
right = -2,
|
||||
spacing = 5
|
||||
}
|
||||
},
|
||||
childrenFeeder = ServerFiltersPopupItems
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
LUI.MenuBuilder.registerDef("mp_server_filters_popup_page", mp_server_filters_popup_page)
|
@ -0,0 +1,636 @@
|
||||
if (game:issingleplayer() or not Engine.InFrontend()) then
|
||||
return
|
||||
end
|
||||
|
||||
local Lobby = luiglobals.Lobby
|
||||
local SystemLinkJoinMenu = LUI.mp_menus.SystemLinkJoinMenu
|
||||
|
||||
local controller = nil
|
||||
local server = nil
|
||||
|
||||
COLUMN_0 = 0
|
||||
COLUMN_1 = 460
|
||||
COLUMN_2 = 660
|
||||
COLUMN_3 = 800
|
||||
COLUMN_4 = 985
|
||||
COLUMN_5 = 500
|
||||
|
||||
SystemLinkJoinMenu.UpdateGameList = function(f3_arg0, f3_arg1)
|
||||
local f3_local0 = f3_arg1.controller
|
||||
if not f3_local0 then
|
||||
f3_local0 = Engine.GetFirstActiveController()
|
||||
end
|
||||
local f3_local1 = LUI.FlowManager.GetMenuScopedDataFromElement(f3_arg0)
|
||||
Lobby.UpdateServerDisplayList(f3_local0)
|
||||
local f3_local2 = Lobby.GetServerCount(f3_local0)
|
||||
if f3_local2 ~= f3_local1.serverCount then
|
||||
f3_local1.serverCount = f3_local2
|
||||
f3_arg0:processEvent({
|
||||
name = "menu_refresh",
|
||||
immediate = true
|
||||
})
|
||||
f3_arg0:processEvent({
|
||||
name = "gain_focus",
|
||||
immediate = true
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
SystemLinkJoinMenu.RefreshServers = function(f4_arg0, f4_arg1)
|
||||
local f4_local0 = LUI.FlowManager.GetMenuScopedDataFromElement(f4_arg0)
|
||||
f4_local0.serverCount = 0
|
||||
if f4_local0.serverList then
|
||||
local f4_local1 = Lobby.RefreshServerList
|
||||
local f4_local2 = f4_arg1.controller
|
||||
if not f4_local2 then
|
||||
f4_local2 = Engine.GetFirstActiveController()
|
||||
end
|
||||
f4_local1(f4_local2)
|
||||
f4_local0.serverList:processEvent({
|
||||
name = "lose_focus",
|
||||
immediate = true
|
||||
})
|
||||
f4_local0.serverList:clearSavedState()
|
||||
f4_local0.serverList:processEvent({
|
||||
name = "menu_refresh",
|
||||
dispatchChildren = true
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
function CreateColumnImage(id, shader, leftAnchor, rightAnchor, left, alpha)
|
||||
return {
|
||||
type = "UIImage",
|
||||
id = id,
|
||||
states = {
|
||||
default = {
|
||||
font = CoD.TextSettings.NormalFont.Font,
|
||||
alignment = LUI.Alignment.right,
|
||||
height = 20,
|
||||
width = 20,
|
||||
left = left,
|
||||
red = Colors.cac_label_text.r,
|
||||
green = Colors.cac_label_text.g,
|
||||
blue = Colors.cac_label_text.b,
|
||||
alpha = alpha,
|
||||
material = RegisterMaterial(shader)
|
||||
},
|
||||
},
|
||||
handlers = {
|
||||
button_over = MBh.AnimateToState("over"),
|
||||
button_up = MBh.AnimateToState("default"),
|
||||
button_disable = MBh.AnimateToState("disabled")
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
SystemLinkJoinMenu.CreateHeaderDef = function()
|
||||
local header = {
|
||||
type = "UIElement",
|
||||
id = "header_row_id",
|
||||
states = {
|
||||
default = CoD.ColorizeState(Swatches.Overlay.Color, {
|
||||
topAnchor = true,
|
||||
bottomAnchor = false,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 2,
|
||||
left = 2,
|
||||
right = -2,
|
||||
height = GenericTitleBarDims.TitleBarHeight,
|
||||
material = RegisterMaterial("white"),
|
||||
alpha = Swatches.Overlay.AlphaMore
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
local columns = {}
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateRowBackground(SystemLinkJoinMenu.Colors.generic_menu_bg_color))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnShade("column_shade_rect_id", false, COLUMN_1, COLUMN_2))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnShade("column_shade_rect_2_id", true, COLUMN_3, -1))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("host_header", Engine.Localize("@MENU_HOST_NAME"), true, false, COLUMN_0, COLUMN_1))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("map_header", Engine.Localize("@MENU_MAP"), true, false, COLUMN_1, COLUMN_2))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("players_header", Engine.Localize("@MENU_NUMPLAYERS"), true, false, COLUMN_2, COLUMN_3))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("type_header", Engine.Localize("@MENU_TYPE1"), true, true, COLUMN_3, COLUMN_4))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("ping_header", Engine.Localize("@MENU_PING"), true, true, COLUMN_4, COLUMN_5))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnImage("protected_header", "icon_lock", true, true, COLUMN_5, 1))
|
||||
header.children = columns
|
||||
return header
|
||||
end
|
||||
|
||||
SystemLinkJoinMenu.CreateRowDef = function(f6_arg0, f6_arg1, f6_arg2, f6_arg3)
|
||||
local option = {
|
||||
type = "UIButton",
|
||||
id = "row_" .. f6_arg1,
|
||||
disabled = f6_arg2,
|
||||
focusable = not f6_arg2,
|
||||
properties = {
|
||||
button_height = GenericButtonDims.button_height
|
||||
},
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = false,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 0,
|
||||
bottom = MBh.Property("button_height"),
|
||||
left = 0,
|
||||
right = 0
|
||||
}
|
||||
},
|
||||
handlers = {
|
||||
button_action = MBh.EmitEventToRoot({
|
||||
name = "select_game",
|
||||
idx = f6_arg1
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
local columns = {}
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateRowBackground(f6_arg3))
|
||||
table.insert(columns, SystemLinkJoinMenu.CreateColumnShade("column_shade_rect_id", false, COLUMN_1, COLUMN_2))
|
||||
local shade = SystemLinkJoinMenu.CreateColumnShade("column_shade_rect_2_id", true, COLUMN_3, -1)
|
||||
table.insert(columns, shade)
|
||||
local hostname = SystemLinkJoinMenu.CreateColumnText("host_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Host), true, false, COLUMN_0, COLUMN_1)
|
||||
table.insert(columns, hostname)
|
||||
local mapname = SystemLinkJoinMenu.CreateColumnText("map_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Map), true, false, COLUMN_1, COLUMN_2)
|
||||
table.insert(columns, mapname)
|
||||
local players = SystemLinkJoinMenu.CreateColumnText("players_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Clients), true, false, COLUMN_2, COLUMN_3)
|
||||
table.insert(columns, players)
|
||||
local gametype = SystemLinkJoinMenu.CreateColumnText("type_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Game), true, true, COLUMN_3, COLUMN_4)
|
||||
table.insert(columns, gametype)
|
||||
local ping = SystemLinkJoinMenu.CreateColumnText("ping_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Ping), true, true, COLUMN_4, COLUMN_5)
|
||||
table.insert(columns, ping)
|
||||
local is_private = SystemLinkJoinMenu.CreateColumnImage("protected_header", "icon_lock", true, true, COLUMN_5, Lobby.GetServerData(f6_arg0, f6_arg1, 5) == "1" and 1 or 0)
|
||||
table.insert(columns, is_private)
|
||||
option.children = columns
|
||||
return option
|
||||
end
|
||||
|
||||
SystemLinkJoinMenu.OnCreate = function(f1_arg0, f1_arg1)
|
||||
local f1_local0 = LUI.FlowManager.GetMenuScopedDataFromElement(f1_arg0)
|
||||
f1_local0.serverCount = 0
|
||||
f1_arg0:processEvent(LUI.ButtonHelperText.CommonEvents.addBackButton)
|
||||
f1_arg0:processEvent({
|
||||
name = "add_button_helper_text",
|
||||
button_ref = "button_action",
|
||||
helper_text = Engine.Localize("@MENU_JOIN_GAME1"),
|
||||
side = "left",
|
||||
clickable = true
|
||||
})
|
||||
f1_arg0:processEvent({
|
||||
name = "add_button_helper_text",
|
||||
button_ref = "button_alt1",
|
||||
helper_text = Engine.Localize("@MENU_SB_TOOLTIP_BTN_REFRESH"),
|
||||
side = "left",
|
||||
clickable = true
|
||||
})
|
||||
f1_arg0:processEvent({
|
||||
name = "add_button_helper_text",
|
||||
button_ref = "button_alt2",
|
||||
helper_text = Engine.Localize("@LUA_MENU_FILTER"),
|
||||
side = "right",
|
||||
clickable = true
|
||||
})
|
||||
local f1_local1 = Lobby.BuildServerList
|
||||
local f1_local2 = f1_arg1.controller
|
||||
if not f1_local2 then
|
||||
f1_local2 = Engine.GetFirstActiveController()
|
||||
end
|
||||
f1_local1(f1_local2)
|
||||
end
|
||||
|
||||
function ServerListBackground()
|
||||
if Engine.IsAliensMode() then
|
||||
return {
|
||||
image = "frontend_aliens_art",
|
||||
fill_color = {
|
||||
r = 1,
|
||||
g = 1,
|
||||
b = 1
|
||||
},
|
||||
fill_alpha = 1
|
||||
}
|
||||
end
|
||||
|
||||
if Engine.IsCoreMode() then
|
||||
return {
|
||||
image = "white",
|
||||
fill_color = {
|
||||
r = 0.07,
|
||||
g = 0.1,
|
||||
b = 0.11
|
||||
},
|
||||
fill_alpha = 1
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
function JoinGame(f2_arg0, f2_arg1)
|
||||
server = f2_arg1
|
||||
controller = server.controller
|
||||
if not f2_local1 then
|
||||
controller = Engine.GetFirstActiveController()
|
||||
end
|
||||
|
||||
local is_private = Lobby.GetServerData(controller, server.idx, 5)
|
||||
if is_private == "1" then
|
||||
LUI.FlowManager.RequestPopupMenu(server, "server_password_field", false, controller, false)
|
||||
else
|
||||
Lobby.JoinServer(controller, server.idx)
|
||||
end
|
||||
end
|
||||
|
||||
SystemLinkJoinMenu.menu_systemlink_join = function()
|
||||
if Engine.IsCoreMode() then
|
||||
Engine.SetDvarString("ui_customModeName", "mp")
|
||||
elseif Engine.IsAliensMode() then
|
||||
Engine.SetDvarString("ui_customModeName", "aliens")
|
||||
end
|
||||
|
||||
if Engine.GetDvarString("ui_mapvote_entrya_gametype") == nil
|
||||
or Engine.GetDvarString("ui_mapvote_entrya_gametype") then
|
||||
Engine.SetDvarString("ui_mapvote_entrya_gametype", "any")
|
||||
end
|
||||
|
||||
if Engine.GetDvarString("ui_mapvote_entrya_mapname") == nil
|
||||
or Engine.GetDvarString("ui_mapvote_entrya_mapname") == ""
|
||||
or (string.match(Engine.GetDvarString("ui_mapvote_entrya_mapname"), "alien") == nil and Engine.IsAliensMode())
|
||||
or (string.match(Engine.GetDvarString("ui_mapvote_entrya_mapname"), "alien") == "alien" and Engine.IsCoreMode()) then
|
||||
Engine.SetDvarString("ui_mapvote_entrya_mapname", "any")
|
||||
end
|
||||
|
||||
return {
|
||||
type = "UIElement",
|
||||
id = "menu_systemlink_join_root",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
left = 0,
|
||||
right = 0
|
||||
}
|
||||
},
|
||||
handlers = {
|
||||
menu_create = SystemLinkJoinMenu.OnCreate,
|
||||
select_game = JoinGame
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "UIImage",
|
||||
states = {
|
||||
default = CoD.ColorizeState(Swatches.Overlay.Color, {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
left = 0,
|
||||
right = 0,
|
||||
material = RegisterMaterial("white"),
|
||||
alpha = Swatches.Overlay.AlphaMore,
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIElement",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = false,
|
||||
bottomAnchor = false,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
left = 200,
|
||||
right = -200,
|
||||
height = 550
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "generic_drop_shadow",
|
||||
properties = {
|
||||
offset_shadow = 0
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "generic_menu_titlebar",
|
||||
id = "menu_systemlink_join_title_id",
|
||||
properties = {
|
||||
fill_alpha = 1,
|
||||
font = CoD.TextSettings.BoldFont,
|
||||
title_bar_text = Engine.Localize("@PLATFORM_SYSTEM_LINK_TITLE"),
|
||||
title_bar_text_indent = GenericTitleBarDims.TitleBarLCapWidth,
|
||||
title_bar_alignment = LUI.Alignment.Left
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "generic_menu_background",
|
||||
id = "menu_systemlink_join_bg_id",
|
||||
properties = {
|
||||
fill_alpha = Swatches.Overlay.AlphaMore,
|
||||
},
|
||||
children = {
|
||||
SystemLinkJoinMenu.CreateHeaderDef(),
|
||||
{
|
||||
type = "UIVerticalList",
|
||||
id = "menu_systemlink_join_game_list_id",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = GenericTitleBarDims.TitleBarHeight + 4,
|
||||
bottom = 600,
|
||||
left = 2,
|
||||
right = -2
|
||||
}
|
||||
},
|
||||
childrenFeeder = SystemLinkJoinMenu.LinkGamesFeeder,
|
||||
handlers = {
|
||||
update_game_list = SystemLinkJoinMenu.UpdateGameList,
|
||||
menu_create = function(f12_arg0, f12_arg1)
|
||||
local f12_local0 = LUI.FlowManager.GetMenuScopedDataFromElement(f12_arg0)
|
||||
f12_local0.serverList = f12_arg0
|
||||
SystemLinkJoinMenu.RefreshServers(f12_arg0, f12_arg1)
|
||||
end
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "button_helper_text_main",
|
||||
id = "online_vault_helper_text_id",
|
||||
properties = {
|
||||
left_inset = 10,
|
||||
right_inset = -10,
|
||||
top_margin = GenericFooterDims.TopMargin_WithoutBackground,
|
||||
height = 42,
|
||||
spacing = 12,
|
||||
background_alpha = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UITimer",
|
||||
id = "menu_systemlink_join_update_timer",
|
||||
properties = {
|
||||
event = "update_game_list",
|
||||
interval = 250,
|
||||
disposable = false,
|
||||
broadcastToRoot = true
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIBindButton",
|
||||
id = "menu_systemlink_join_bind_button_id",
|
||||
handlers = {
|
||||
button_secondary = MBh.LeaveMenu(),
|
||||
button_alt1 = SystemLinkJoinMenu.RefreshServers,
|
||||
button_alt2 = OpenFiltersMenu
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
LUI.MenuBuilder.m_definitions["menu_systemlink_join"] = function()
|
||||
local menu = SystemLinkJoinMenu.menu_systemlink_join()
|
||||
|
||||
local rows = menu.children[2].children[3].children
|
||||
local header = rows[1]
|
||||
|
||||
|
||||
-- Increase server list width
|
||||
menu.children[2].states.default.left = 100
|
||||
menu.children[2].states.default.right = -100
|
||||
|
||||
menu.children[3].properties.interval = 10 -- 250
|
||||
|
||||
return menu
|
||||
end
|
||||
|
||||
ServerPaswordListFeeder = function()
|
||||
return {
|
||||
{
|
||||
type = "UIVerticalList",
|
||||
id = "password_field_items",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
leftAnchor = true,
|
||||
bottomAnchor = false,
|
||||
rightAnchor = true,
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "UIGenericButton",
|
||||
id = "password_button_id",
|
||||
properties = {
|
||||
variant = GenericButtonSettings.Variants.Plain,
|
||||
button_text = Engine.Localize("PATCH_MENU_CHANGE_PASSWORD_CAPS"),
|
||||
button_display_func = function()
|
||||
local f31_local0 = Engine.GetDvarString("password")
|
||||
if f31_local0 then
|
||||
f31_local0 = Engine.GetDvarString("password") ~= ""
|
||||
end
|
||||
local f31_local1
|
||||
if f31_local0 then
|
||||
f31_local1 = Engine.Localize("PATCH_MENU_PASSWORD_SET")
|
||||
if not f31_local1 then
|
||||
|
||||
else
|
||||
return f31_local1
|
||||
end
|
||||
end
|
||||
f31_local1 = Engine.Localize("MENU_NONE")
|
||||
end,
|
||||
button_action_func = function(f32_arg0, f32_arg1)
|
||||
Engine.ExecNow("setfromdvar ui_password password")
|
||||
Engine.OpenScreenKeyboard(f32_arg1.controller, Engine.Localize("MENU_PASSWORD"), Engine.GetDvarString("ui_password") or "", Lobby.PasswordLength, false, false, CoD.KeyboardInputTypes.Password)
|
||||
end
|
||||
},
|
||||
handlers = {
|
||||
text_input_complete = function(f33_arg0, f33_arg1)
|
||||
if f33_arg1.text then
|
||||
Engine.SetDvarString("password", f33_arg1.text)
|
||||
f33_arg0:processEvent({
|
||||
name = "content_refresh"
|
||||
})
|
||||
end
|
||||
end
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIGenericButton",
|
||||
id = "connect_button_id",
|
||||
properties = {
|
||||
variant = GenericButtonSettings.Variants.Plain,
|
||||
button_text = Engine.Localize("MENU_JOIN_GAME"), button_action_func = function()
|
||||
Lobby.JoinServer(controller, server.idx)
|
||||
end
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
password_field = function(f50_arg0, f50_arg1)
|
||||
return {
|
||||
type = "UIElement",
|
||||
id = "server_popup_container_id",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
left = 0,
|
||||
right = 0
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "UIImage",
|
||||
id = "darken_bg",
|
||||
states = {
|
||||
default = CoD.ColorizeState(Swatches.Overlay.Color, {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
left = 0,
|
||||
right = 0,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
material = RegisterMaterial("white"),
|
||||
alpha = Swatches.Overlay.AlphaMore
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIElement",
|
||||
id = "mp_server_filters_popup_id",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = false,
|
||||
bottomAnchor = false,
|
||||
leftAnchor = false,
|
||||
rightAnchor = false,
|
||||
top = -1 * Leaderboards.Layout.FilterHeight * 0.6,
|
||||
width = Leaderboards.Layout.FilterWidth,
|
||||
height = 145
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "generic_drop_shadow",
|
||||
properties = {
|
||||
offset_shadow = 0
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "generic_menu_titlebar",
|
||||
id = "server_filters_popup_title_bar_id",
|
||||
properties = {
|
||||
title_bar_text = Engine.Localize("@LUA_MENU_LOBBY_JOINING"),
|
||||
fill_alpha = 1
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "generic_menu_background",
|
||||
id = "server_filters_popup_background",
|
||||
properties = {
|
||||
fill_alpha = 1
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIElement",
|
||||
id = "mp_server_password_popup_page_id",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = AAR.Layout.TitleBarHeight + 1,
|
||||
bottom = -1,
|
||||
left = 1,
|
||||
right = -1,
|
||||
}
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "generic_border",
|
||||
properties = {
|
||||
thickness = 2,
|
||||
border_red = Colors.generic_menu_frame_color.r,
|
||||
border_green = Colors.generic_menu_frame_color.g,
|
||||
border_blue = Colors.generic_menu_frame_color.b
|
||||
},
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
left = 0,
|
||||
right = 0,
|
||||
alpha = 0.6
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIVerticalList",
|
||||
id = "server_filters_popup_vlist",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = false,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = -90,
|
||||
bottom = 0,
|
||||
left = 0,
|
||||
right = 0,
|
||||
spacing = 5
|
||||
}
|
||||
},
|
||||
childrenFeeder = ServerPaswordListFeeder
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIBindButton",
|
||||
id = "filters_popup_back_button",
|
||||
handlers = {
|
||||
button_secondary = MBh.DoMultiple({
|
||||
MBh.LeaveMenu(),
|
||||
FiltersPopupClose,
|
||||
ForceRefreshServers
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
LUI.MenuBuilder.registerDef("server_password_field", password_field)
|
167
localappdata/xlabs/data/iw6x/data/ui_scripts/stats/__init__.lua
Normal file
@ -0,0 +1,167 @@
|
||||
if (game:issingleplayer() or not Engine.InFrontend()) then
|
||||
return
|
||||
end
|
||||
|
||||
game:addlocalizedstring("LUA_MENU_UNLOCKALL", "UNLOCK ALL")
|
||||
game:addlocalizedstring("LUA_MENU_UNLOCKALL_DESC",
|
||||
"Whether all items should be unlocked.")
|
||||
|
||||
function UnlockAllAction( f1_arg0, f1_arg1 )
|
||||
Engine.Exec("unlockstats")
|
||||
end
|
||||
|
||||
function StatsButtonHelper( f2_arg0, f2_arg1 )
|
||||
f2_arg0:processEvent( LUI.ButtonHelperText.CommonEvents.addBackButton )
|
||||
end
|
||||
|
||||
function BarrackPrestigeResetStatsAction( f3_arg0, f3_arg1 )
|
||||
LUI.FlowManager.RequestAddMenu( f3_arg0, "prestige_reset", true, f3_arg1.controller )
|
||||
end
|
||||
|
||||
function menu_stats()
|
||||
return {
|
||||
type = "UIElement",
|
||||
id = "menu_stats_root",
|
||||
states = {
|
||||
default = {
|
||||
topAnchor = true,
|
||||
bottomAnchor = true,
|
||||
leftAnchor = true,
|
||||
rightAnchor = true,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
left = 0,
|
||||
right = 0
|
||||
}
|
||||
},
|
||||
handlers = {
|
||||
menu_create = StatsButtonHelper,
|
||||
},
|
||||
children = {
|
||||
{
|
||||
type = "generic_menu_title",
|
||||
id = "stats_title_text_id",
|
||||
properties = {
|
||||
menu_title = Engine.Localize( "@LUA_MENU_BARRACKS_CAPS" )
|
||||
}
|
||||
},
|
||||
{
|
||||
type = "UIVerticalList",
|
||||
id = "stats_options_vlist_id",
|
||||
states = {
|
||||
default = {
|
||||
alignment = LUI.Alignment.Top,
|
||||
leftAnchor = true,
|
||||
rightAnchor = false,
|
||||
topAnchor = true,
|
||||
bottomAnchor = false,
|
||||
left = GenericMenuDims.menu_left,
|
||||
right = GenericMenuDims.menu_right,
|
||||
top = GenericMenuDims.menu_top,
|
||||
bottom = GenericMenuDims.menu_bottom
|
||||
}
|
||||
},
|
||||
childrenFeeder = StatsOptionsFeeder
|
||||
},
|
||||
{
|
||||
type = "button_helper_text_main",
|
||||
id = "stats_button_helper_text_id"
|
||||
},
|
||||
{
|
||||
type = "UIBindButton",
|
||||
id = "stats_bind_buttons_id",
|
||||
handlers = {
|
||||
button_secondary = MBh.LeaveMenu()
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
function StatsOptionsFeeder( f8_arg0 )
|
||||
local f8_local4 = {}
|
||||
local f8_local0 = Engine.IsAliensMode()
|
||||
local f8_local2 = Engine.InLobby()
|
||||
local f8_local3 = f8_arg0.exclusiveController
|
||||
f8_local4[#f8_local4 + 1] = {
|
||||
type = "UIGenericButton",
|
||||
id = "unlockall_items_button_id",
|
||||
properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_UNLOCKALL" ),
|
||||
button_action_func = UnlockAllAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_UNLOCKALL_DESC" )
|
||||
}
|
||||
}
|
||||
if not f8_local2 then
|
||||
local f8_local5 = #f8_local4 + 1
|
||||
local f8_local6 = {
|
||||
type = "UIGenericButton",
|
||||
id = "reset_stats_button_id"
|
||||
}
|
||||
local f8_local7
|
||||
if Cac.GetPrestigeLevel( f8_local3, Cac.GetSquadLoc() ) == 10 then
|
||||
f8_local7 = Engine.IsUserAGuest( f8_local3 )
|
||||
else
|
||||
f8_local7 = true
|
||||
end
|
||||
f8_local6.disabled = f8_local7
|
||||
f8_local6.properties = {
|
||||
button_text = Engine.Localize( "@LUA_MENU_MP_RESET_STATS_CAPS" ),
|
||||
button_action_func = BarrackPrestigeResetStatsAction,
|
||||
desc_text = Engine.Localize( "@LUA_MENU_MP_RESET_STATS_DESC" )
|
||||
}
|
||||
f8_local6.handlers = {
|
||||
element_refresh = function ( f12_arg0, f12_arg1 )
|
||||
local f12_local0
|
||||
if Cac.GetPrestigeLevel( f8_local3, Cac.GetSquadLoc() ) == 10 then
|
||||
f12_local0 = Engine.IsUserAGuest( f8_local3 )
|
||||
else
|
||||
f12_local0 = true
|
||||
end
|
||||
local f12_local1 = f12_arg0
|
||||
local f12_local2 = f12_arg0.processEvent
|
||||
local f12_local3 = {}
|
||||
local f12_local4
|
||||
if f12_local0 then
|
||||
f12_local4 = "disable"
|
||||
if not f12_local4 then
|
||||
|
||||
else
|
||||
f12_local3.name = f12_local4
|
||||
f12_local2( f12_local1, f12_local3 )
|
||||
end
|
||||
end
|
||||
f12_local4 = "enable"
|
||||
end
|
||||
}
|
||||
f8_local4[f8_local5] = f8_local6
|
||||
end
|
||||
f8_local4[#f8_local4 + 1] = {
|
||||
type = "button_desc_text",
|
||||
id = "stats_button_description_id"
|
||||
}
|
||||
return f8_local4
|
||||
end
|
||||
|
||||
function stats_options_vlist()
|
||||
return {
|
||||
type = "UIVerticalList",
|
||||
focusable = true,
|
||||
states = {
|
||||
default = {
|
||||
alignment = LUI.Alignment.Top,
|
||||
leftAnchor = true,
|
||||
rightAnchor = false,
|
||||
topAnchor = true,
|
||||
bottomAnchor = false,
|
||||
left = GenericMenuDims.menu_left,
|
||||
right = GenericMenuDims.menu_right,
|
||||
top = GenericMenuDims.menu_top,
|
||||
bottom = GenericMenuDims.menu_bottom
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
LUI.MenuBuilder.registerDef( "menu_stats", menu_stats )
|
||||
LUI.MenuBuilder.registerDef( "stats_options_vlist", stats_options_vlist )
|
@ -0,0 +1,101 @@
|
||||
if (game:issingleplayer()) then
|
||||
return
|
||||
end
|
||||
|
||||
if (package.loaded["LUI.mp_hud.OptionsMenu"] == nil) then
|
||||
return
|
||||
end
|
||||
|
||||
package.loaded["LUI.mp_hud.OptionsMenu"].options_def = function()
|
||||
local f14_local0 = GameX.GetGameMode()
|
||||
local f14_local1 = Engine.TableLookup( GameTypesTable.File, GameTypesTable.Cols.Ref, f14_local0, GameTypesTable.Cols.ClassChoice ) == "1"
|
||||
|
||||
if not f14_local1 then
|
||||
f14_local1 = GameX.UsesFakeLoadout()
|
||||
end
|
||||
|
||||
local f14_local2 = LUI.mp_hud.OptionsMenu.checkTeamChoice( f14_local0 )
|
||||
local f14_local3 = GameX.IsRankedMatch()
|
||||
local f14_local4 = Engine.GetDvarBool( "splitscreen_ingame" )
|
||||
local f14_local5 = Game.GetOmnvar( "ui_team_selected" )
|
||||
local f14_local6 = Game.GetOmnvar( "ui_loadout_selected" )
|
||||
local f14_local7 = LUI.mp_hud.OptionsMenu.chooseClassCheck( f14_local3, f14_local5, f14_local2 )
|
||||
local self = LUI.UIVerticalList.new()
|
||||
self.id = "pause_selections_Id"
|
||||
|
||||
self:registerAnimationState("default", {
|
||||
topAnchor = true,
|
||||
leftAnchor = true,
|
||||
bottomAnchor = false,
|
||||
rightAnchor = false,
|
||||
top = GenericMenuDims.menu_top,
|
||||
left = GenericMenuDims.menu_left,
|
||||
bottom = GenericMenuDims.menu_bottom,
|
||||
right = GenericMenuDims.menu_right,
|
||||
alignment = LUI.Alignment.Top
|
||||
})
|
||||
|
||||
self:animateToState( "default", 0 )
|
||||
self:makeFocusable()
|
||||
|
||||
if f14_local0 ~= "aliens" and false == CoD.IsFireTeamMode() and GameX.IsSpectatingNotOnTeam() == false and f14_local1 == true and f14_local7 == true and not MLG.IsMLGSpectator() then
|
||||
LUI.MenuBuilder.BuildAddChild(self, {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPPause_0",
|
||||
properties = {
|
||||
childNum = 1,
|
||||
button_text = Engine.Localize( "@LUA_MENU_CHOOSE_CLASS_CAPS" ),
|
||||
button_action_func = LUI.mp_hud.OptionsMenu.chooseClassButtonAction
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
if f14_local0 ~= "aliens" and false == CoD.IsFireTeamMode() and f14_local2 == true and not MLG.IsMLGSpectator() then
|
||||
LUI.MenuBuilder.BuildAddChild(self, {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPPause_1",
|
||||
properties = {
|
||||
childNum = 2,
|
||||
button_text = Engine.Localize( "@LUA_MENU_CHANGE_TEAM_CAPS" ),
|
||||
button_action_func = LUI.mp_hud.OptionsMenu.changeTeamButtonAction
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
LUI.MenuBuilder.BuildAddChild(self, {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPPause_2",
|
||||
disabledFunc = LUI.mp_hud.OptionsMenu.optionsLockedUpdate,
|
||||
properties = {
|
||||
childNum = 3,
|
||||
button_text = Engine.Localize( "@LUA_MENU_OPTIONS_CAPS" ),
|
||||
button_action_func = LUI.mp_hud.OptionsMenu.optionsButtonAction
|
||||
},
|
||||
handlers = {
|
||||
refresh_options_button = LUI.mp_hud.OptionsMenu.refreshOptionDisable
|
||||
}
|
||||
})
|
||||
|
||||
if GameX.IsOnlineMatch() and (not Engine.IsAliensMode() or not Game.GetOmnvar( "ui_alien_is_solo" )) and not MLG.IsMLGSpectator() then
|
||||
LUI.MenuBuilder.BuildAddChild(self, {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPPause_3",
|
||||
properties = {
|
||||
childNum = 4,
|
||||
button_text = Engine.Localize( "@LUA_MENU_MUTE_PLAYERS_CAPS" ),
|
||||
button_action_func = LUI.mp_hud.OptionsMenu.mutePlayersButtonAction
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
LUI.MenuBuilder.BuildAddChild(self, {
|
||||
type = "UIGenericButton",
|
||||
id = "btn_MPPause_5",
|
||||
properties = {
|
||||
childNum = 6,
|
||||
button_text = Engine.Localize( "@LUA_MENU_END_GAME_CAPS" ),
|
||||
button_action_func = LUI.mp_hud.OptionsMenu.endGameButtonAction
|
||||
}
|
||||
})
|
||||
return self
|
||||
end
|
BIN
localappdata/xlabs/data/iw6x/iw6x.exe
Normal file
359
localappdata/xlabs/data/launcher-ui/css/main.css
Normal file
@ -0,0 +1,359 @@
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Segoe UI Emoji', Tahoma, Geneva, Verdana, sans-serif;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
user-select: none;
|
||||
background: #333;
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
img {
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
|
||||
#controls {
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#container {
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
#background {
|
||||
position: fixed;
|
||||
top: -100px;
|
||||
left: -100px;
|
||||
right: -100px;
|
||||
bottom: -100px;
|
||||
background: linear-gradient( 135deg, rgba(6, 10, 15, 1) 32%, rgba(26, 43, 65, 1) 50%, rgba(79, 109, 148, 1) 59%, rgba(157, 174, 182, 1) 65%, rgba(65, 82, 91, 1) 78%, rgba(42, 55, 63, 1) 89%, rgba(14, 14, 14, 1) 100%);
|
||||
filter: blur(50px);
|
||||
box-shadow: inset 0px 0px 84px 223px rgb(51 51 51 / 50%);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.container {
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
margin: 15px;
|
||||
display: inline-block;
|
||||
min-width: 50px;
|
||||
min-height: 25px;
|
||||
box-shadow: 0 9px 19px rgba(0, 0, 0, 0.15), 0 15px 12px rgba(0, 0, 0, 0.15);
|
||||
background: #222;
|
||||
}
|
||||
|
||||
img.container {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 0px;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
transition: box-shadow 0.1s linear;
|
||||
background: #333;
|
||||
}
|
||||
|
||||
.a.card:hover {
|
||||
box-shadow: 0 2px 19px rgba(0, 17, 255, 0), 0 11px 40px rgba(51, 146, 255, 0);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.card>.title {
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
padding: 20px;
|
||||
display: block;
|
||||
flex: 0 1 auto;
|
||||
background: #222;
|
||||
}
|
||||
|
||||
.card>.content {
|
||||
padding: 20px;
|
||||
flex: 1 1 auto;
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
|
||||
.card>.content.img {
|
||||
padding: 0px;
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
}
|
||||
|
||||
#container {
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#navigation {
|
||||
flex: 0 1 auto;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
display: inline-block;
|
||||
box-shadow: 0 19px 38px rgba(0, 0, 0, 0.03), 0 15px 12px rgba(0, 0, 0, 0.03);
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
background: #222;
|
||||
}
|
||||
|
||||
#navigation>.separator {
|
||||
width: calc(100% + 40px);
|
||||
height: 1px;
|
||||
display: block;
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
z-index: 0;
|
||||
position: relative;
|
||||
background: #333;
|
||||
}
|
||||
|
||||
#navigation>.element {
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
margin: auto;
|
||||
margin-bottom: 20px;
|
||||
margin-top: 20px;
|
||||
border-radius: 15px;
|
||||
display: block;
|
||||
width: 7vw;
|
||||
height: 7vw;
|
||||
transition: box-shadow 0.1s linear;
|
||||
box-shadow: 0 9px 19px rgba(0, 0, 0, 0.2), 0 15px 12px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#navigation>.element:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#navigation>.element:first-of-type {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
#navigation>#settings.element {
|
||||
background: #333;
|
||||
}
|
||||
|
||||
#navigation>#settings.element>img {
|
||||
filter: invert(8%) sepia(8%) saturate(0%) hue-rotate(347deg) brightness(94%) contrast(100%);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#navigation>.element.active {
|
||||
box-shadow: 0 2px 19px rgba(0, 17, 255, 0), 0 11px 40px rgba(51, 146, 255, 0);
|
||||
}
|
||||
|
||||
#content {
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
#controls {
|
||||
z-index: 99999;
|
||||
flex: 0 1 auto;
|
||||
-webkit-user-select: none;
|
||||
-webkit-app-region: drag;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
background: #222;
|
||||
border-bottom: 1px solid #333;
|
||||
}
|
||||
|
||||
#controls>.title {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#controls>span.button {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
float: right;
|
||||
-webkit-app-region: no-drag;
|
||||
opacity: 0.6;
|
||||
transition: opacity 0.1s linear;
|
||||
border: 5px solid #222;
|
||||
}
|
||||
|
||||
#controls>span.button:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#minimize-button {
|
||||
background: rgb(255, 217, 0);
|
||||
}
|
||||
|
||||
#close-button {
|
||||
background: rgb(255, 61, 61);
|
||||
}
|
||||
|
||||
#message-box {
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.1s linear;
|
||||
}
|
||||
|
||||
#message-box.visible {
|
||||
pointer-events: all;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#message-box>.container {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 45%;
|
||||
transform: translate(-50%, -50%);
|
||||
min-width: 300px;
|
||||
background: #333;
|
||||
}
|
||||
|
||||
#message-box .mb-buttons {
|
||||
display: block;
|
||||
text-align: right;
|
||||
margin-top: 15px;
|
||||
padding-top: 15px;
|
||||
border-top: 1px solid #222;
|
||||
}
|
||||
|
||||
#vignette {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 1px;
|
||||
bottom: 1px;
|
||||
z-index: 999999;
|
||||
border-radius: 8px;
|
||||
pointer-events: none;
|
||||
box-shadow: inset 0 0 2px rgb(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 10px;
|
||||
margin: 5px;
|
||||
border-radius: 5px;
|
||||
transition: box-shadow 0.1s linear;
|
||||
color: #bbb;
|
||||
background: #222;
|
||||
border: 1px solid rgb(51 51 51 / 50%);
|
||||
}
|
||||
|
||||
button:hover {
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.07), 0 3px 6px rgba(0, 0, 0, 0.13);
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
padding: 10px;
|
||||
margin: 5px;
|
||||
border-radius: 5px;
|
||||
transition: border 0.1s linear;
|
||||
outline: 0;
|
||||
width: 250px;
|
||||
color: #bbb;
|
||||
background: #222;
|
||||
border: 1px solid #222;
|
||||
}
|
||||
|
||||
input[type="text"]:focus {
|
||||
border: 1px solid rgba(187, 187, 187, 0.3);
|
||||
}
|
||||
|
||||
.input {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.two-grid {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.two-grid>* {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.two-grid>:first-child {
|
||||
text-align: left;
|
||||
flex: 0 1 auto;
|
||||
}
|
||||
|
||||
.two-grid>:last-child {
|
||||
text-align: right;
|
||||
margin-left: auto;
|
||||
justify-content: flex-end;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
input[type="radio"] {
|
||||
position: relative;
|
||||
margin: 5px;
|
||||
margin-right: 7px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input[type="radio"]::before {
|
||||
content: '';
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
display: block;
|
||||
border-radius: 50%;
|
||||
left: -5px;
|
||||
top: -4px;
|
||||
position: absolute;
|
||||
border: 1px solid rgba(0, 0, 0, 0.08);
|
||||
transition: box-shadow 0.1s linear;
|
||||
background: #222;
|
||||
}
|
||||
|
||||
input[type="radio"]::after {
|
||||
content: '';
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
display: block;
|
||||
border-radius: 50%;
|
||||
left: 1px;
|
||||
top: 2px;
|
||||
position: absolute;
|
||||
background: #222;
|
||||
}
|
||||
|
||||
input[type="radio"]:checked {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
input[type="radio"]:checked::after {
|
||||
background: rgb(0, 135, 193);
|
||||
}
|
||||
|
||||
input[type="radio"]:hover::before {
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.07), 0 3px 6px rgba(0, 0, 0, 0.13);
|
||||
}
|
||||
|
||||
::selection {
|
||||
color: white;
|
||||
background: rgb(0, 135, 193);
|
||||
}
|
||||
|
||||
#dark-mode-toggle {
|
||||
--dark-mode-toggle-icon-size: 1.25rem;
|
||||
}
|
BIN
localappdata/xlabs/data/launcher-ui/img/cog.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
localappdata/xlabs/data/launcher-ui/img/iw4x-mp.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
localappdata/xlabs/data/launcher-ui/img/iw4x-sp.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
localappdata/xlabs/data/launcher-ui/img/iw4x.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
localappdata/xlabs/data/launcher-ui/img/iw6x-mp.png
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
localappdata/xlabs/data/launcher-ui/img/iw6x-sp.png
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
localappdata/xlabs/data/launcher-ui/img/iw6x.png
Normal file
After Width: | Height: | Size: 95 KiB |
BIN
localappdata/xlabs/data/launcher-ui/img/s1x-mp.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
localappdata/xlabs/data/launcher-ui/img/s1x-sp.png
Normal file
After Width: | Height: | Size: 99 KiB |
BIN
localappdata/xlabs/data/launcher-ui/img/s1x-survival.png
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
localappdata/xlabs/data/launcher-ui/img/s1x-zm.png
Normal file
After Width: | Height: | Size: 103 KiB |
BIN
localappdata/xlabs/data/launcher-ui/img/s1x.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
localappdata/xlabs/data/launcher-ui/img/splash-1.png
Normal file
After Width: | Height: | Size: 13 MiB |
BIN
localappdata/xlabs/data/launcher-ui/img/splash-2.png
Normal file
After Width: | Height: | Size: 13 MiB |
BIN
localappdata/xlabs/data/launcher-ui/img/xlabs.png
Normal file
After Width: | Height: | Size: 1.0 MiB |
16
localappdata/xlabs/data/launcher-ui/js/command.js
Normal file
@ -0,0 +1,16 @@
|
||||
window.executeCommand = function(command, data) {
|
||||
|
||||
var object = {
|
||||
command: command,
|
||||
data: data || null,
|
||||
}
|
||||
|
||||
return fetch("/command", {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(object)
|
||||
}).then(data => data.json());
|
||||
};
|
132
localappdata/xlabs/data/launcher-ui/js/main.js
Normal file
@ -0,0 +1,132 @@
|
||||
window.addEventListener("load", initialize);
|
||||
window.channel = window.executeCommand("get-channel");
|
||||
|
||||
function sleep(milliseconds) {
|
||||
return new Promise(resolve => {
|
||||
setTimeout(resolve, milliseconds);
|
||||
});
|
||||
}
|
||||
|
||||
function makeSleep(milliseconds) {
|
||||
return () => sleep(milliseconds);
|
||||
}
|
||||
|
||||
function waitForAllImages() {
|
||||
return new Promise(resolve => {
|
||||
function waitForAllImagesInternal() {
|
||||
const images = document.querySelectorAll('img');
|
||||
|
||||
for (var i = 0; i < images.length; ++i) {
|
||||
if (!images[i].complete) {
|
||||
window.requestAnimationFrame(waitForAllImagesInternal);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
resolve();
|
||||
}
|
||||
|
||||
waitForAllImagesInternal();
|
||||
});
|
||||
}
|
||||
|
||||
function addStyleElement(css) {
|
||||
var head = document.head || document.getElementsByTagName('head')[0],
|
||||
style = document.createElement('style');
|
||||
|
||||
head.appendChild(style);
|
||||
|
||||
style.type = 'text/css';
|
||||
if (style.styleSheet) {
|
||||
// This is required for IE8 and below.
|
||||
style.styleSheet.cssText = css;
|
||||
} else {
|
||||
style.appendChild(document.createTextNode(css));
|
||||
}
|
||||
}
|
||||
|
||||
function getOtherChannel(channel) {
|
||||
if (channel == "main") {
|
||||
return "dev";
|
||||
}
|
||||
return "main";
|
||||
}
|
||||
|
||||
function adjustChannelElements() {
|
||||
window.channel.then(channel => {
|
||||
addStyleElement(`.channel-${getOtherChannel(channel)}{display: none;}`);
|
||||
});
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
initializeNavigation() //
|
||||
.then(() => waitForAllImages()) //
|
||||
.then(makeSleep(300))
|
||||
.then(() => window.executeCommand("show"));
|
||||
|
||||
document.querySelector("#minimize-button").onclick = () => {
|
||||
window.executeCommand("minimize");
|
||||
};
|
||||
|
||||
document.querySelector("#close-button").onclick = () => {
|
||||
window.executeCommand("close");
|
||||
};
|
||||
|
||||
adjustChannelElements();
|
||||
}
|
||||
|
||||
window.showSettings = function() {
|
||||
document.querySelector("#navigation>#settings.element").click();
|
||||
}
|
||||
|
||||
function initializeNavigation() {
|
||||
var elements = document.querySelectorAll("#navigation>.element");
|
||||
elements.forEach(e => {
|
||||
e.addEventListener("click", handleNavigationClick);
|
||||
});
|
||||
|
||||
return loadInitialPage();
|
||||
}
|
||||
|
||||
function removeActiveElement() {
|
||||
var element = document.querySelector("#navigation>.element.active");
|
||||
if (element) {
|
||||
element.classList.remove("active");
|
||||
}
|
||||
}
|
||||
|
||||
function handleNavigationClick(e) {
|
||||
const el = this;
|
||||
if (el.classList.contains("active")) {
|
||||
return;
|
||||
}
|
||||
|
||||
removeActiveElement();
|
||||
el.classList.add("active");
|
||||
loadNavigationPage(el.id);
|
||||
}
|
||||
|
||||
function loadInitialPage() {
|
||||
const el = document.querySelector("#navigation>.element.active");
|
||||
return loadNavigationPage(el.id);
|
||||
}
|
||||
|
||||
function setInnerHTML(elm, html) {
|
||||
elm.innerHTML = html;
|
||||
Array.from(elm.querySelectorAll("script")).forEach(oldScript => {
|
||||
const newScript = document.createElement("script");
|
||||
Array.from(oldScript.attributes)
|
||||
.forEach(attr => newScript.setAttribute(attr.name, attr.value));
|
||||
newScript.appendChild(document.createTextNode(oldScript.innerHTML));
|
||||
oldScript.parentNode.replaceChild(newScript, oldScript);
|
||||
});
|
||||
}
|
||||
|
||||
function loadNavigationPage(page) {
|
||||
var content = document.querySelector("#content");
|
||||
return fetch(`./pages/${page}.html`).then(data => {
|
||||
return data.text()
|
||||
}).then(text => {
|
||||
setInnerHTML(content, text);
|
||||
});
|
||||
}
|
47
localappdata/xlabs/data/launcher-ui/js/message-box.js
Normal file
@ -0,0 +1,47 @@
|
||||
function constructMessageBox(title, message, buttons) {
|
||||
title = title || "Error";
|
||||
nessage = message || "";
|
||||
buttons = buttons || ["Ok"];
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
try{
|
||||
const messageBox = document.querySelector("#message-box");
|
||||
|
||||
const resolveInternal = function() {
|
||||
messageBox.classList.remove("visible");
|
||||
return resolve.apply(this, arguments);
|
||||
};
|
||||
|
||||
const titleElement = messageBox.querySelector(".mb-title");
|
||||
titleElement.innerHTML = title;
|
||||
|
||||
const contentElement = messageBox.querySelector(".mb-content");
|
||||
contentElement.innerHTML = message;
|
||||
|
||||
const buttonElement = messageBox.querySelector(".mb-buttons");
|
||||
buttonElement.textContent = "";
|
||||
|
||||
messageBox.classList.add("visible");
|
||||
|
||||
buttons.forEach((value, index) => {
|
||||
|
||||
var button = document.createElement("button");
|
||||
button.innerHTML = value;
|
||||
button.onclick = resolveInternal.bind(this, index);
|
||||
buttonElement.appendChild(button);
|
||||
});
|
||||
}
|
||||
catch(e) {
|
||||
reject(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.showMessageBox = function() {
|
||||
window.lastBox = window.lastBox || Promise.resolve();
|
||||
|
||||
const newBox = window.lastBox.then(() => constructMessageBox.apply(this, arguments));
|
||||
window.lastBox = newBox;
|
||||
|
||||
return newBox;
|
||||
};
|
53
localappdata/xlabs/data/launcher-ui/main.html
Normal file
@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>X Labs | Launcher</title>
|
||||
<meta charset="UTF-8" />
|
||||
<link href="./css/main.css" rel="stylesheet" />
|
||||
<script src="./js/command.js"></script>
|
||||
<script src="./js/message-box.js"></script>
|
||||
<script src="./js/main.js"></script>
|
||||
</head>
|
||||
|
||||
<body class="hidden">
|
||||
<div id="background"></div>
|
||||
<div id="controls">
|
||||
<span class="title channel-dev">Experimental</span>
|
||||
|
||||
<span class="button" id="close-button"></span>
|
||||
<span class="button" id="minimize-button"></span>
|
||||
</div>
|
||||
<div id="container">
|
||||
<div id="navigation">
|
||||
<img class="element active" src="./img/xlabs.png" id="home" />
|
||||
<span class="separator"></span>
|
||||
<img class="element" src="./img/s1x.png" id="s1x" />
|
||||
<img class="element" src="./img/iw6x.png" id="iw6x" />
|
||||
<img class="element" src="./img/iw4x.png" id="iw4x" />
|
||||
<span class="separator"></span>
|
||||
<span class="element" id="settings">
|
||||
<img src="./img/cog.png" />
|
||||
</span>
|
||||
</div>
|
||||
<div id="content"></div>
|
||||
</div>
|
||||
|
||||
<span id="message-box">
|
||||
<span id="data" class="container card">
|
||||
<span class="title mb-title"></span>
|
||||
<span class="content">
|
||||
<span class="mb-content"></span>
|
||||
<span class="mb-buttons"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<div id="vignette"></div>
|
||||
|
||||
<!-- This is necessary to load preferred mode (if changed) on opening launcher -->
|
||||
<dark-mode-toggle hidden permanent="true">
|
||||
</dark-mode-toggle>
|
||||
</body>
|
||||
|
||||
</html>
|
27
localappdata/xlabs/data/launcher-ui/pages/home.html
Normal file
@ -0,0 +1,27 @@
|
||||
<div class="grid">
|
||||
<span id="data" class="container card">
|
||||
<span class="title">Welcome to X Labs</span>
|
||||
<span class="content">
|
||||
<p>Welcome to the new X Labs launcher! 🥳<br><br>The launcher is still a work-in-progress. <br>But once it is complete, it will unify all games in one place.</p>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<img id="splash" class="container" src="./img/splash-1.png" />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
#content>.grid {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#data {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
#splash {
|
||||
flex: 0 1 auto;
|
||||
height: calc(100% - 30px);
|
||||
/* This is still a bug :( */
|
||||
}
|
||||
</style>
|
55
localappdata/xlabs/data/launcher-ui/pages/iw4x.html
Normal file
@ -0,0 +1,55 @@
|
||||
<div class="grid">
|
||||
<span class="a container card" id="mw2-sp">
|
||||
<span class="title">Singleplayer</span>
|
||||
<span class="content img" style="background-image: url(./img/iw4x-sp.png)"></span>
|
||||
</span>
|
||||
|
||||
<span class="a container card" id="mw2-mp">
|
||||
<span class="title">Multiplayer</span>
|
||||
<span class="content img" style="background-image: url(./img/iw4x-mp.png)"></span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
#content>.grid {
|
||||
flex: 1 1 auto;
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-auto-rows: minmax(100px, auto);
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
function launchMW2Variant(id) {
|
||||
executeCommand('launch-mw2', id);
|
||||
}
|
||||
|
||||
function showConfigureWarning() {
|
||||
window.showMessageBox("⚙ IW4x not configured",
|
||||
"You have not configured your <b>MW2 installation</b> path.<br><br>Please do so in the settings!", ["Ok"]).then(index => {
|
||||
window.showSettings();
|
||||
});
|
||||
}
|
||||
|
||||
function handleMW2() {
|
||||
const el = this;
|
||||
const id = el.id;
|
||||
|
||||
executeCommand('get-property', 'mw2-install').then(folder => {
|
||||
if (!folder) {
|
||||
showConfigureWarning();
|
||||
} else {
|
||||
launchMW2Variant(id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const mw2Nnodes = document.querySelectorAll("#content>.grid>.a");
|
||||
for (var i = 0; i < mw2Nnodes.length; ++i) {
|
||||
const node = mw2Nnodes[i];
|
||||
node.onclick = handleMW2;
|
||||
}
|
||||
})();
|
||||
</script>
|
58
localappdata/xlabs/data/launcher-ui/pages/iw6x.html
Normal file
@ -0,0 +1,58 @@
|
||||
<div class="grid">
|
||||
<span class="a container card" id="ghosts-sp">
|
||||
<span class="title">Singleplayer</span>
|
||||
<span class="content img" style="background-image: url(./img/iw6x-sp.png)"></span>
|
||||
</span>
|
||||
|
||||
<span class="a container card" id="ghosts-mp">
|
||||
<span class="title">Multiplayer</span>
|
||||
<span class="content img" style="background-image: url(./img/iw6x-mp.png)"></span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
#content>.grid {
|
||||
flex: 1 1 auto;
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-auto-rows: minmax(100px, auto);
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
function launchGhostsVariant(id) {
|
||||
executeCommand('launch-ghosts', id);
|
||||
}
|
||||
|
||||
function showConfigureWarning() {
|
||||
window.showMessageBox("⚙ IW6x not configured",
|
||||
"You have not configured your <b>Ghosts installation</b> path.<br><br>Please do so in the settings!",
|
||||
["Ok"]).then(index => {
|
||||
window.showSettings();
|
||||
});
|
||||
}
|
||||
|
||||
function handleGhosts() {
|
||||
const el = this;
|
||||
const id = el.id;
|
||||
|
||||
executeCommand('get-property', 'ghosts-install').then(folder => {
|
||||
console.log(folder);
|
||||
if (!folder) {
|
||||
showConfigureWarning();
|
||||
}
|
||||
else {
|
||||
launchGhostsVariant(id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const ghostsNnodes = document.querySelectorAll("#content>.grid>.a");
|
||||
for (var i = 0; i < ghostsNnodes.length; ++i) {
|
||||
const node = ghostsNnodes[i];
|
||||
node.onclick = handleGhosts;
|
||||
}
|
||||
})();
|
||||
</script>
|
68
localappdata/xlabs/data/launcher-ui/pages/s1x.html
Normal file
@ -0,0 +1,68 @@
|
||||
<div class="grid">
|
||||
<span class="a container card" id="aw-sp">
|
||||
<span class="title">Singleplayer</span>
|
||||
<span class="content img" style="background-image: url(./img/s1x-sp.png)"></span>
|
||||
</span>
|
||||
|
||||
<span class="a container card" id="aw-mp">
|
||||
<span class="title">Multiplayer</span>
|
||||
<span class="content img" style="background-image: url(./img/s1x-mp.png)"></span>
|
||||
</span>
|
||||
|
||||
<span class="a container card" id="aw-zm">
|
||||
<span class="title">Zombies</span>
|
||||
<span class="content img" style="background-image: url(./img/s1x-zm.png)"></span>
|
||||
</span>
|
||||
|
||||
<span class="a container card" id="aw-survival">
|
||||
<span class="title">Survival</span>
|
||||
<span class="content img" style="background-image: url(./img/s1x-survival.png)"></span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
#content>.grid {
|
||||
flex: 1 1 auto;
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-auto-rows: minmax(100px, auto);
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
function launchAWVariant(id) {
|
||||
executeCommand('launch-aw', id);
|
||||
}
|
||||
|
||||
function showConfigureWarning() {
|
||||
window.showMessageBox("⚙ S1x not configured",
|
||||
"You have not configured your <b>Advanced Warfare installation</b> path.<br><br>Please do so in the settings!",
|
||||
["Ok"]).then(index => {
|
||||
window.showSettings();
|
||||
});
|
||||
}
|
||||
|
||||
function handleAW() {
|
||||
const el = this;
|
||||
const id = el.id;
|
||||
|
||||
executeCommand('get-property', 'aw-install').then(folder => {
|
||||
console.log(folder);
|
||||
if (!folder) {
|
||||
showConfigureWarning();
|
||||
}
|
||||
else {
|
||||
launchAWVariant(id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const awNnodes = document.querySelectorAll("#content>.grid>.a");
|
||||
for (var i = 0; i < awNnodes.length; ++i) {
|
||||
const node = awNnodes[i];
|
||||
node.onclick = handleAW;
|
||||
}
|
||||
})();
|
||||
</script>
|
176
localappdata/xlabs/data/launcher-ui/pages/settings.html
Normal file
@ -0,0 +1,176 @@
|
||||
<div class="grid">
|
||||
<span id="data" class="container card">
|
||||
<span class="title">Settings</span>
|
||||
<span class="content">
|
||||
<p>
|
||||
<span class="two-grid">
|
||||
<span>Advanced Warfare Installation</span>
|
||||
<span>
|
||||
<span class="input">
|
||||
<input type="text" id="aw-install" readonly>
|
||||
<button id="aw-browse">Browse</button>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="two-grid">
|
||||
<span>Ghosts Installation</span>
|
||||
<span>
|
||||
<span class="input">
|
||||
<input type="text" id="ghosts-install" readonly>
|
||||
<button id="ghosts-browse">Browse</button>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="two-grid">
|
||||
<span>Modern Warfare 2 Installation</span>
|
||||
<span>
|
||||
<span class="input">
|
||||
<input type="text" id="mw2-install" readonly>
|
||||
<button id="mw2-browse">Browse</button>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="two-grid">
|
||||
<span>Update Channel</span>
|
||||
<span>
|
||||
<span class="input">
|
||||
<input type="radio" id="channel-main" name="channel" value="channel-main">
|
||||
<label for="channel-main">Stable</label>
|
||||
</span>
|
||||
<span class="input">
|
||||
<input type="radio" id="channel-dev" name="channel" value="channel-dev">
|
||||
<label for="channel-dev">Experimental</label>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</p>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
#content>.grid {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#data {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
#content .content>:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#content .content>:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#content button {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
function handleChannelChange() {
|
||||
const id = this.id;
|
||||
const newChannel = id.substring(8);
|
||||
|
||||
window.channel.then(channel => {
|
||||
if (channel == newChannel) {
|
||||
return;
|
||||
}
|
||||
|
||||
const channelTexts = {
|
||||
'main': `You are about to switch to the <b>stable</b> channel.<br><br>Are you sure you want to do that?`,
|
||||
'dev': `You are about to switch to the <b>experimental</b> channel.<br><br>You will get more frequent updates, but overall stability may decrease.<br><br>Are you sure you want to do that?`,
|
||||
};
|
||||
|
||||
const text = channelTexts[newChannel];
|
||||
|
||||
window.showMessageBox("⚠ Warning",
|
||||
text, ["Yes", "Cancel"]).then(index => {
|
||||
if (index == 0) {
|
||||
executeCommand('switch-channel', newChannel);
|
||||
} else {
|
||||
checkCurrentChannelRadio();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function checkCurrentChannelRadio() {
|
||||
window.channel.then(channel => {
|
||||
document.querySelector(`input#channel-${channel}`).checked = true;
|
||||
});
|
||||
}
|
||||
|
||||
checkCurrentChannelRadio();
|
||||
|
||||
var nodes = document.querySelectorAll('input[name="channel"]');
|
||||
for (var i = 0; i < nodes.length; ++i) {
|
||||
nodes[i].onclick = handleChannelChange;
|
||||
}
|
||||
|
||||
// set textbox path and save property to json
|
||||
document.querySelector("#aw-browse").onclick = function () {
|
||||
executeCommand('browse-folder').then(folder => {
|
||||
if (folder) {
|
||||
document.querySelector("#aw-install").value = folder;
|
||||
executeCommand('set-property', {
|
||||
'aw-install': folder
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
document.querySelector("#ghosts-browse").onclick = function () {
|
||||
executeCommand('browse-folder').then(folder => {
|
||||
if (folder) {
|
||||
document.querySelector("#ghosts-install").value = folder;
|
||||
executeCommand('set-property', {
|
||||
'ghosts-install': folder
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
document.querySelector("#mw2-browse").onclick = function () {
|
||||
executeCommand('browse-folder').then(folder => {
|
||||
if (folder) {
|
||||
document.querySelector("#mw2-install").value = folder;
|
||||
executeCommand('set-property', {
|
||||
'mw2-install': folder
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// get path already set in config if path is set
|
||||
executeCommand('get-property', 'aw-install').then(folder => {
|
||||
if (folder) {
|
||||
document.querySelector("#aw-install").value = folder;
|
||||
}
|
||||
});
|
||||
|
||||
executeCommand('get-property', 'ghosts-install').then(folder => {
|
||||
if (folder) {
|
||||
document.querySelector("#ghosts-install").value = folder;
|
||||
}
|
||||
});
|
||||
|
||||
executeCommand('get-property', 'mw2-install').then(folder => {
|
||||
if (folder) {
|
||||
document.querySelector("#mw2-install").value = folder;
|
||||
}
|
||||
});
|
||||
</script>
|
228
localappdata/xlabs/data/s1x/data/dw/entitlement_config.info
Normal file
@ -0,0 +1,228 @@
|
||||
version 7
|
||||
|
||||
// Entitlement ID Ranges
|
||||
// 0 - 299 ???
|
||||
// 300 - 399 Clan Entitlements
|
||||
// 400 - 599 ???
|
||||
// 600 - 699 Clan War Entitlements
|
||||
// 700 - 799 Generic Elite Entitlements
|
||||
|
||||
// Number of keys to read from the key archive
|
||||
keys_to_read 16
|
||||
|
||||
// unlocks in game - type, key index, bit, name, payload...
|
||||
unlock 0 0 600 //clan wars demon_skull_p
|
||||
unlock 0 1 601 //clan wars dead_ninja_p
|
||||
unlock 0 2 602 //clan wars mummy_p
|
||||
unlock 0 3 603 //clan wars skull_bow_p
|
||||
unlock 0 4 604 //clan wars cyclops_skull_p
|
||||
unlock 0 5 605 //clan wars dead_gnome_p
|
||||
unlock 0 6 606 //clan wars gold_grill_p
|
||||
unlock 0 7 607 //clan wars pirate_skull_p
|
||||
unlock 0 8 608 //clan wars gargoyle_p
|
||||
unlock 0 9 609 //clan wars vulture_p
|
||||
unlock 0 10 610 //clan wars warrior_mask_p
|
||||
unlock 0 11 611 //clan wars yeti_p
|
||||
unlock 0 12 612 //clan wars dead_owl_p
|
||||
unlock 0 13 613 //clan wars money_bags_p
|
||||
unlock 0 14 614 //clan wars injured_octopus_p
|
||||
unlock 0 15 615 //clan wars hotdog_p
|
||||
unlock 0 16 616 //clan wars crab_p
|
||||
unlock 0 17 617 //clan wars angry_robot_p
|
||||
unlock 0 18 618 //clan wars triangle_dot_ret
|
||||
unlock 0 19 619 //clan wars gold_chain_emb
|
||||
unlock 0 20 620 //clan wars wing_emb
|
||||
unlock 0 21 621 //clan wars brass_knuck_emb
|
||||
unlock 0 22 622 //clan wars ninja_emb
|
||||
unlock 0 25 623 //clan wars reaper head
|
||||
unlock 0 26 624 //clan wars merc head
|
||||
unlock 0 27 625 //clan wars body
|
||||
unlock 0 28 460 //clan wars diamond division reticle
|
||||
unlock 0 29 401 //clan wars diamond division camo
|
||||
unlock 0 30 627 //clan wars diamond division assassin head
|
||||
unlock 0 31 626 //clan wars diamond division savage head
|
||||
unlock 0 32 628 //clan wars diamond division body
|
||||
|
||||
unlock 3 0 700 //Download the mobile app
|
||||
unlock 3 1 701 //Founder Skull
|
||||
|
||||
unlock 3 4 500 //NEVERSOFT
|
||||
unlock 3 3 501 //IW
|
||||
unlock 3 5 502 //RAVEN
|
||||
unlock 3 7 503 //HIGH_MOON
|
||||
unlock 3 6 504 //BEACHHEAD
|
||||
|
||||
unlock 13 0 209 //monster beast patch
|
||||
unlock 13 2 210 //monster beast playercard
|
||||
unlock 13 1 211 //monster viper patch
|
||||
unlock 13 3 212 //monster viper playercard
|
||||
|
||||
unlock 13 4 216 //riley / classic ghost head
|
||||
|
||||
unlock 13 30 217 //watcher patch
|
||||
unlock 13 31 213 //federation patch
|
||||
unlock 13 32 215 //into the deep patch
|
||||
unlock 13 33 214 //no man's land patch
|
||||
|
||||
//Platform Unlocks
|
||||
platform 200 255161 //team leader head
|
||||
platform 201 255161 //team leader playercard
|
||||
platform 202 255161 //team leader patch
|
||||
platform 403 255161 //team leader camo
|
||||
platform 451 255161 //team leader reticle
|
||||
|
||||
platform 200 255160 //team leader head
|
||||
platform 201 255160 //team leader playercard
|
||||
platform 202 255160 //team leader patch
|
||||
platform 403 255160 //team leader camo
|
||||
platform 451 255160 //team leader reticle
|
||||
|
||||
platform 206 255162 //insignia playercard
|
||||
platform 205 255162 //insignia patch
|
||||
|
||||
platform 216 255165 //classic ghost character
|
||||
|
||||
platform 213 255167 //federation patch
|
||||
platform 214 255168 //no mans land patch
|
||||
platform 215 255169 //into the deep patch
|
||||
|
||||
platform 207 255163 //digital hardened patch
|
||||
platform 208 255163 //digital hardened playercard
|
||||
|
||||
platform 217 255166 //Steam Patch - The Watcher
|
||||
|
||||
platform 222 268100 //festive playercard
|
||||
platform 221 268100 //festive patch
|
||||
platform 410 268100 //festive camo
|
||||
platform 453 268100 //festive reticle
|
||||
|
||||
platform 550 268101 //wolf
|
||||
|
||||
platform 551 277670 //extra slots
|
||||
|
||||
platform 552 277671 // hero character - elias
|
||||
platform 553 277672 // hero character - hesh
|
||||
platform 554 277673 // hero character - merrick
|
||||
platform 555 277674 // hero character - keegan
|
||||
platform 556 277675 // hero character - price
|
||||
|
||||
platform 557 281343 // Hazmat character
|
||||
platform 558 281340 // Makarov Legend Pack
|
||||
platform 559 281342 // Rorke Character
|
||||
platform 560 281341 // Zakhaev Character
|
||||
|
||||
platform 561 286632 // Soap Legend Pack
|
||||
platform 562 286633 // Extinction Squad
|
||||
platform 563 286634 // TF141
|
||||
|
||||
platform 490 277676 // Personalization pack 1 - Ducky
|
||||
platform 491 277677 // Personalization pack 2 - Blood
|
||||
platform 492 277678 // Personalization pack 3 - Inferno
|
||||
platform 493 277679 // Personalization pack 4 - Kittens
|
||||
|
||||
platform 494 281344 // Personalization pack 5
|
||||
platform 495 281345 // Personalization pack 6
|
||||
platform 496 281346 // Personalization pack 7
|
||||
platform 497 281347 // Personalization pack 8
|
||||
platform 498 286630 // Personalization pack 9
|
||||
platform 499 286631 // Personalization pack 10
|
||||
|
||||
platform 510 295430 // Personalization pack 11
|
||||
platform 511 295431 // Personalization pack 12
|
||||
platform 512 295432 // Personalization pack 13
|
||||
platform 513 295433 // Personalization pack 14
|
||||
platform 515 295434 // Personalization pack 15
|
||||
platform 516 295435 // Personalization pack 16
|
||||
|
||||
platform 517 295439 // Personalization pack 17
|
||||
platform 518 295440 // Personalization pack 18
|
||||
platform 519 301111 // Personalization pack 19
|
||||
platform 520 301112 // Personalization pack 20
|
||||
platform 521 301113 // Personalization pack 21
|
||||
platform 522 301114 // Personalization pack 22
|
||||
platform 523 301110 // Personalization pack Flags
|
||||
|
||||
platform 564 295436 // Spectrum Character
|
||||
platform 565 295437 // Astronaut Character
|
||||
platform 566 295438 // Resistance Squad
|
||||
|
||||
platform 567 309870 // Bluntforce Character
|
||||
platform 568 309871 // Inferno Character
|
||||
platform 569 309872 // Bling Character
|
||||
|
||||
platform 480 259250 //dlc gun 1
|
||||
platform 480 301116 //dlc gun 1
|
||||
platform 481 259250 //dlc gun 1
|
||||
platform 481 301116 //dlc gun 1
|
||||
|
||||
platform 482 259251 //Ripper from Devastation
|
||||
platform 482 255161 //Ripper from Season Pass
|
||||
platform 482 301115 //Ripper from mDLC
|
||||
|
||||
//Clan Entitlements - ID 300 - 399 - type, bit, entitlement id
|
||||
clan 0 300
|
||||
clan 0 301
|
||||
clan 1 302
|
||||
clan 2 303
|
||||
clan 3 304
|
||||
clan 3 305
|
||||
clan 3 306
|
||||
clan 4 307
|
||||
clan 4 308
|
||||
clan 4 309
|
||||
clan 5 310
|
||||
clan 5 311
|
||||
clan 6 312
|
||||
clan 7 313
|
||||
clan 8 314
|
||||
clan 8 315
|
||||
clan 8 316
|
||||
clan 9 317
|
||||
clan 10 318
|
||||
clan 10 319
|
||||
clan 10 320
|
||||
clan 10 321
|
||||
clan 10 322
|
||||
clan 11 323
|
||||
clan 12 324
|
||||
clan 13 325
|
||||
clan 13 326
|
||||
clan 13 327
|
||||
clan 13 328
|
||||
clan 13 329
|
||||
clan 14 330
|
||||
clan 15 331
|
||||
clan 15 332
|
||||
clan 15 333
|
||||
clan 16 334
|
||||
clan 16 335
|
||||
clan 16 336
|
||||
clan 16 337
|
||||
clan 16 338
|
||||
clan 17 339
|
||||
clan 18 340
|
||||
clan 19 341
|
||||
clan 19 342
|
||||
clan 19 343
|
||||
clan 19 344
|
||||
clan 20 345
|
||||
clan 20 346
|
||||
clan 21 347
|
||||
clan 21 348
|
||||
clan 21 349
|
||||
clan 22 350
|
||||
clan 23 351
|
||||
clan 24 352
|
||||
clan 25 353
|
||||
clan 26 354
|
||||
clan 26 355
|
||||
clan 26 356
|
||||
clan 26 357
|
||||
clan 27 358
|
||||
|
||||
//Clan Level Challenges - type, required level, challenge id
|
||||
clanlevelchallenge 23 ch_cam_clan_02 // Kiss of Death Camo
|
||||
|
||||
//Clan War Challenges - type, key index, bit offset, challenge id
|
||||
entitlementchallenge 0 18 ch_ret_clan // clan wars reticle - Triad
|
||||
entitlementchallenge 0 24 ch_cam_clan_01 // clan wars camo - Body Count
|
BIN
localappdata/xlabs/data/s1x/data/dw/ffotd-1.22.1.ff
Normal file
1050
localappdata/xlabs/data/s1x/data/dw/lootConfig_tu22.csv
Normal file
1
localappdata/xlabs/data/s1x/data/dw/mm.cfg
Normal file
@ -0,0 +1 @@
|
||||
XX 0 D150 0 G5 4 F 6 H 60 S 30 B 20 M49152 40 M14336 0 P50 8 P75 16 P100 24 P120 32 P150
|
BIN
localappdata/xlabs/data/s1x/data/dw/playlists_tu22.aggr
Normal file
172
localappdata/xlabs/data/s1x/data/dw/social_tu22.cfg
Normal file
@ -0,0 +1,172 @@
|
||||
// increment this version number when making changes to the social config
|
||||
set social_config_version 40
|
||||
|
||||
set userGroup_max_retry_time 10000
|
||||
|
||||
set elite_clan_active 0
|
||||
set elite_clan_remote_view_active 0
|
||||
set elite_clan_emblem_upload_active 0
|
||||
|
||||
set dw_presence_active 1
|
||||
set dw_presence_put_rate 60000
|
||||
set dw_presence_get_rate 120000
|
||||
|
||||
#ifdef MP
|
||||
set live_qosec_lastupdatems 5000
|
||||
//set enableServerReporting 1
|
||||
//set iotd_active 1 // DO NOT TURN ON: it doesn't work on PC
|
||||
set ca_do_mlc 1
|
||||
|
||||
set dsping_dc_0 "101,New,40.54,-74.47,108.61.88.37:10000,108.61.89.108:40000,108.61.89.116:40000,108.61.87.84:40000"
|
||||
set dsping_dc_1 "102,Chi,41.88,-87.63,108.61.238.217:40000,108.61.238.138:40000,108.61.238.133:40000,108.61.238.130:40000"
|
||||
set dsping_dc_2 "103,Dal,32.78,-96.8,108.61.239.113:40000,108.61.239.173:40000,108.61.239.177:40000,108.61.239.180:40000"
|
||||
set dsping_dc_3 "104,Sea,47.61,-122.33,108.61.233.124:40000,108.61.233.100:40000,108.61.233.106:40000,108.61.233.105:40000"
|
||||
set dsping_dc_4 "105,Los,34.05,-118.24,108.61.234.129:40000,108.61.234.204:40000,108.61.234.187:40000,108.61.234.130:40000"
|
||||
set dsping_dc_5 "106,Atl,33.75,-84.39,108.61.236.109:40000,108.61.236.153:40000,108.61.236.152:40000,108.61.236.112:40000"
|
||||
set dsping_dc_6 "107,Ams,52.37,4.9,173.199.64.6:40000,173.199.109.10:40000,173.199.64.13:40000,173.199.64.14:40000"
|
||||
set dsping_dc_7 "108,Lon,51.51,-0.12,108.61.230.120:10000,108.61.230.152:40000,108.61.230.145:40000,108.61.230.143:40000"
|
||||
set dsping_dc_8 "109,Fra,50.11,8.68,173.199.105.18:40000,195.122.135.238:40000,195.122.135.97:40000,195.122.135.232:40000"
|
||||
set dsping_dc_9 "111,Tam,27.7,-82.58,4.79.145.108:40000,4.79.145.111:40000,4.79.145.110:40000,4.79.145.189:40000"
|
||||
set dsping_dc_10 "112,San,37.34,-121.89,108.61.235.179:40000,108.61.235.112:40000,108.61.235.114:40000,108.61.235.100:40000"
|
||||
set dsping_dc_11 "113,St.,38.63,-90.2,108.61.232.122:40000,108.61.232.110:40000,108.61.232.109:40000,108.61.232.111:40000"
|
||||
set dsping_dc_12 "115,Mon,45.51,-73.55,108.61.231.117:40000,108.61.231.106:40000,108.61.231.114:40000,108.61.231.119:40000"
|
||||
set dsping_dc_13 "119,Syd,-33.87,151.21,108.61.227.109:40000,108.61.227.115:40000,108.61.227.101:40000,108.61.227.107:40000"
|
||||
set dsping_dc_14 "121,Den,56.04,9.93,108.61.106.30:40000,108.61.106.31:40000"
|
||||
set dsping_dc_15 "124,Par,48.86,2.35,108.61.237.152:40000,108.61.237.150:40000,108.61.237.200:40000,108.61.237.154:40000"
|
||||
set dsping_dc_16 "125,Tok,35.69,139.69,173.199.82.235:40000,173.199.82.237:40000,173.199.82.239:40000,173.199.82.246:40000"
|
||||
set dsping_dc_17 "126,Mos,55.76,37.62,173.199.67.29:40000,173.199.67.32:40000,173.199.67.27:40000"
|
||||
set dsping_dc_18 "127,War,52.23,21.01,173.199.83.237:40000,173.199.83.227:40000,173.199.83.236:40000,173.199.83.234:40000"
|
||||
set dsping_dc_19 "129,Mad,40.42,-3.7,93.93.65.202:40000,93.93.65.203:40000,93.93.65.201:40000,93.93.65.200:40000"
|
||||
set dsping_dc_20 "130,Sao,-23.55,-46.64,189.1.174.20:40000,189.1.174.184:40000"
|
||||
set dsping_dc_21 "131,Cap,-33.92,18.42,197.84.209.11:40000,197.84.209.12:40000"
|
||||
set dsping_dc_22 "132,Joh,-26.2,28.05,197.80.212.5:40000,197.80.212.7:40000"
|
||||
set dsping_dc_23 "133,Mil,45.47,9.19, 108.61.102.20:40000,108.61.102.27:40000"
|
||||
|
||||
|
||||
set ds_pingclient_maxpings 10
|
||||
set ds_pingclient_minpings 4
|
||||
set ds_pingclient_maxpings_per_tick 1
|
||||
|
||||
|
||||
set ds_serverConnectTimeout 3000
|
||||
set ds_listenServerConnectTimeout 10000
|
||||
set ds_serverAcquireTimeout 2000
|
||||
set ds_introRequestTimeout 2000
|
||||
set ds_serverListExpiryPeriod 60000
|
||||
set ds_serverAcquisitionPeriod 7000
|
||||
|
||||
set max_party_share_ds_pings 8
|
||||
set dc_lobbymerge 1
|
||||
set s_avg_max_weighting 0
|
||||
#endif
|
||||
|
||||
//set motd_store_link 1 // Ghost has this line active, not referenced in code
|
||||
|
||||
set mm_skill_lower_bucket 806
|
||||
set mm_skill_upper_bucket 1051
|
||||
set mm_feed_performance 1
|
||||
|
||||
#ifdef MP
|
||||
set past_title_data_active 0
|
||||
set past_title_data_read_failure_interval_hours 72
|
||||
set past_title_data_read_success_interval_hours 192
|
||||
#endif
|
||||
|
||||
set mm_skill_enforcement 0
|
||||
set mm_use_onboarding_skill 1
|
||||
set mm_bucket_option 1 // isolate onboarding pool
|
||||
|
||||
set comscore_active 1
|
||||
|
||||
#ifdef MP
|
||||
set enable_emblemAppDownload 0
|
||||
set marketing_active 0
|
||||
set emblems_active 0
|
||||
set selfie_active 0
|
||||
#endif
|
||||
|
||||
set enable_video_options_preload_shader_controls 1
|
||||
|
||||
// ChurnScore
|
||||
set churnscore_scaling_param1 818.1
|
||||
set churnscore_scaling_param2 6288.3
|
||||
set churnscore_scoring_param1 3.53478575181172
|
||||
set churnscore_scoring_multiplier_totalkillscap -0.527447816986428
|
||||
set churnscore_scoring_multiplier_gameperformance -0.32373506559784
|
||||
set churnscore_scoring_multiplier_daysbetweentitles 0.00058954962393
|
||||
set churnscore_scoring_multiplier_previoustitlematches -0.00003043977270
|
||||
set churnscore_scoring_multiplier_currenttitlematches -0.00112090114056
|
||||
set churnscore_scoring_multiplier_dayssincelaunch 0
|
||||
set churnscore_scoring_multiplier_disconnectflag 1.02002532365439
|
||||
set churnscore_scoring_multiplier_spflag -0.06442491477533
|
||||
set churnscore_scoring_multiplier_timesincelastmatch 5.94629549261903E-07
|
||||
|
||||
// RedeemCoupons
|
||||
set inventory_taskRedeemCouponTimeout 10.0 // in sec
|
||||
set inventory_fullRedeemCouponTimeout 15000 // in ms
|
||||
set inventory_handleRedeemCouponErrorAsSuccess 1
|
||||
set inventory_handleRedeemCouponErrorCode 8045
|
||||
set inventory_ignoreOldPushNotifications 1
|
||||
set inventory_maxRewardRollsClaimed 35
|
||||
|
||||
// DLC
|
||||
set inventory_exchangeRetryMax 1
|
||||
set useCPMarkerForCPOwnership 1
|
||||
set earlyAccessDLC 3
|
||||
set inventory_handleRedeemCouponErrorAsSuccess 1
|
||||
set inventory_handleRedeemCouponErrorCode 8045
|
||||
set inventory_ignoreOldPushNotifications 1
|
||||
|
||||
set igs_version 10
|
||||
set igs_config_dw_filename "winStoreConfig_tu22.csv"
|
||||
set armory_contentpacks_enabled 5
|
||||
|
||||
set msg_field_delta2 0 // matched in socialds
|
||||
|
||||
// DAILY Challenges
|
||||
set dailychallenge_killswitch 1727554559 // all enabled
|
||||
set dailychallenge_killswitch2 2041 // all enabled
|
||||
|
||||
// Ranked Play
|
||||
set rankedPlaylistLockoutDuration 900
|
||||
set rankedPlayEndMatchKeepLobby 1
|
||||
set scr_game_season 10 // matched in socialds
|
||||
|
||||
set zombiesAllowSoloPause 1
|
||||
|
||||
set csdRewardRanks32 537395200
|
||||
set csdRewardRanks64 128
|
||||
|
||||
//Skill-Based Matchmaking Control
|
||||
set mm_skill_param_xi 1.0341387
|
||||
set mm_skill_param_lambda 0.1631656
|
||||
set mm_skill_param_gamma -0.02225907
|
||||
set mm_skill_param_delta 0.8303422
|
||||
|
||||
set prestige30EasterEggEnabled 1
|
||||
|
||||
set enableS1TUSpawnSightTraces 1 // matched in socialds
|
||||
|
||||
//Special Base Weapon Killswitch
|
||||
set baseWeaponsKillswitch "" // matched in socialds
|
||||
|
||||
// Loot Config
|
||||
set lootConfig_dw_enabled 1
|
||||
set lootConfig_dw_filename "lootConfig_tu22.csv"
|
||||
set lootConfig_redeem_xp "500,1000,2000,4000,3000"
|
||||
set lootConfig_redeem_codpoint "500,1000,2000,4000,3000"
|
||||
|
||||
set codPointStore_enabled 0
|
||||
set codPointStore_dw_filename "codPointStoreConfig_tu22.csv"
|
||||
|
||||
// must match socialds
|
||||
set bg_customization_gearSetBonusEnabled 1
|
||||
set bg_customization_gearSetBonusXP .05
|
||||
set bg_customization_gearSetKillswitch_1 16777215
|
||||
set bg_customization_gearSetKillswitch_2 16777215
|
||||
set bg_customization_gearSetKillswitch_3 16646143
|
||||
set bg_customization_gearSetKillswitch_4 12582399
|
||||
set bg_customization_gearSetKillswitch_5 16777215
|
||||
|
||||
//Redeem 50 Duplicate
|
||||
set lui_loot_duplicateredemption 0
|
206
localappdata/xlabs/data/s1x/data/dw/winStoreConfig_tu22.csv
Normal file
@ -0,0 +1,206 @@
|
||||
#Game Language to offerids mapping
|
||||
#english,EN
|
||||
#french,FR
|
||||
#frenchcan,FR
|
||||
#german,DE-LV
|
||||
#austrian,DE-FV
|
||||
#italian,IT
|
||||
#spanish,ES
|
||||
#british,EN
|
||||
#russian,RU
|
||||
#polish,PL
|
||||
#korean,EN
|
||||
#japanese,EN-JA
|
||||
#fulljap,JA
|
||||
|
||||
#visibility refer to igsProductVisibility_e
|
||||
# 0 - Visible Always
|
||||
# 1 - Hide Always ( Hide in store and in Front End )
|
||||
# 2 - Visible for season pass holders ( Hide in store if player does not own season pass )
|
||||
# 3 - Visible for non season pass holders ( Hide in store if player owns season pass )
|
||||
# 4 - Hide in CAC / CAO ( Show in Store,Hide in Front End )
|
||||
# 5 - Early Access ( Hide in the store,Show in Front End )
|
||||
|
||||
version,version_id,10
|
||||
|
||||
#type = product,UID,Product ID,Image Name,dlcName,category,#Language List separated by space delimiter,#visibility,#productgroup,#seenIndex,#name
|
||||
product,product_1,317660,img_store_season_pass,seasonpass,seasonpass,english french german italian spanish russian polish korean taiwanese chinese thai czech spanishna portuguese arabic,0,,,# Season Pass
|
||||
|
||||
product,product_2,318791,img_store_mappacks_havok,dlc2,mappacks,all,0,,,# Havoc
|
||||
product,product_3,318792,img_store_mappacks_ascendance,dlc3,mappacks,all,0,,32,# Ascendance
|
||||
product,product_4,318793,img_store_mappacks_supremacy,dlc4,mappacks,all,0,,,# Supremacy
|
||||
product,product_5,318794,img_store_mappacks_reckoning,dlc5,mappacks,all,0,,,# Reckoning
|
||||
|
||||
# MDLC 2.5 - Standard Packs
|
||||
product,product_137,343596,img_store_personpacks_ice,mdlc62,personpacks,all,0,,34,# Ice Pack
|
||||
product,product_138,343597,img_store_personpacks_disco,mdlc63,personpacks,all,0,,35,# Disco Pack
|
||||
product,product_139,343598,img_store_personpacks_cards,mdlc64,personpacks,all,0,,36,# Cards Pack
|
||||
product,product_140,343599,img_store_personpacks_jackpot,mdlc65,personpacks,all,0,,37,# Jackpot Pack
|
||||
product,product_141,343590,img_store_personpacks_blackout,mdlc66,personpacks,all,1,,38,# BLOPS3 Pack
|
||||
|
||||
# MDLC 2 - Standard Packs
|
||||
product,product_6,343591,img_store_personpacks_tiki,mdlc34,personpacks,all,0,,,# Tiki
|
||||
product,product_7,343592,img_store_personpacks_gasfire,mdlc35,personpacks,all,0,,,# Gas Fire
|
||||
product,product_8,343593,img_store_personpacks_leaf,mdlc36,personpacks,all,0,,,# Leaf
|
||||
product,product_9,343594,img_store_personpacks_psych,mdlc37,personpacks,all,0,,,# Psychadelic
|
||||
|
||||
product,product_10,331060,img_store_personpacks_magma,mdlc7,personpacks,all,0,,,# Magma
|
||||
product,product_11,331061,img_store_personpacks_lightning,mdlc8,personpacks,all,0,,,# Lightning
|
||||
product,product_12,331062,img_store_personpacks_hide,mdlc9,personpacks,all,0,,,# Hide
|
||||
product,product_13,331063,img_store_personpacks_nanotech,mdlc10,personpacks,all,0,,,# Nanotech
|
||||
|
||||
# MDLC 2.5 Premium Personalization Packs
|
||||
product,product_136,343590,img_store_personpacks_premium_blackout,mdlc61,PREMPERSONPACKS,all,1,,33,# BLOPS3 Prem Pack
|
||||
|
||||
# MDLC 2 - Premium Personalization Packs
|
||||
product,product_14,343596,img_store_personpacks_premium_tiki,mdlc38,prempersonpacks,all,1,,,# Premium Tiki
|
||||
product,product_15,343597,img_store_personpacks_premium_gasfire,mdlc39,prempersonpacks,all,1,,,# Premium Gas Fire
|
||||
product,product_16,343598,img_store_personpacks_premium_leaf,mdlc40,prempersonpacks,all,1,,,# Premium Leaf
|
||||
product,product_17,343599,img_store_personpacks_premium_psych,mdlc41,prempersonpacks,all,1,,,# Premium Psychadelic
|
||||
|
||||
product,product_18,343600,img_store_personpacks_premium_cod_champs,mdlc42,prempersonpacks,all,0,,,# Premium Cod Champs
|
||||
product,product_19,331064,img_store_personpacks_premium_magma,mdlc11,prempersonpacks,all,0,,,# Premium Magma
|
||||
product,product_20,331065,img_store_personpacks_premium_lightning,mdlc12,prempersonpacks,all,0,,,# Premium Lightning
|
||||
product,product_21,331066,img_store_personpacks_premium_hide,mdlc13,prempersonpacks,all,0,,,# Premium Hide
|
||||
product,product_22,331067,img_store_personpacks_premium_nanotech,mdlc14,prempersonpacks,all,0,,,# Premium Nanotech
|
||||
|
||||
# MDLC 2 - Exo Packs
|
||||
product,product_23,343601,img_store_operatorpacks_cowboy,mdlc101,operatorpacks,all,1,,,# Cowboy
|
||||
product,product_24,343602,img_store_operatorpacks_surfer,mdlc43,operatorpacks,all,1,,,# Surfer
|
||||
product,product_25,343604,img_store_operatorpacks_octopus,mdlc45,operatorpacks,all,1,,,# Octopus
|
||||
# MDLC 2 - Lady Gear Exo Packs
|
||||
product,product_26,345600,img_store_operatorpacks_rose_camo,mdlc59,OPERATORPACKS,all,1,,,# Rose Camo / Passionate
|
||||
product,product_27,345601,img_store_operatorpacks_white_blue,mdlc60,OPERATORPACKS,all,1,,,# White Blue / Tenacious
|
||||
|
||||
product,product_28,5f3f93ca-03ab-4fdd-aa00-63f17fb08d79,img_store_operatorpacks_steam_punk,mdlc15,operatorpacks,all,0,,,# Steam Punk
|
||||
product,product_29,beb1715c-5825-4ae3-844d-1f72231f9306,img_store_operatorpacks_panda,mdlc16,operatorpacks,all,0,,,# Panda
|
||||
product,product_30,05e1b887-e323-4aaf-b95b-12e9512f76aa,img_store_operatorpacks_bali_mask,mdlc17,operatorpacks,all,0,,,#Bali Mask
|
||||
product,product_31,33c64260-e212-4794-8abe-9810f04471e7,img_store_operatorpacks_classic_biker,mdlc18,operatorpacks,all,0,,,#Classic Biker
|
||||
|
||||
# MDLC 2 - Flags
|
||||
product,product_32,334460,img_store_flag_packs_argentinia,mdlc46,flagpacks,all,1,,,# Argentina Flag
|
||||
product,product_33,343605,img_store_flag_packs_austria,mdlc47,flagpacks,all,1,,,# Austria Flag
|
||||
product,product_34,333086,img_store_flag_packs_brazil,mdlc26,flagpacks,all,1,,,# Brazil Flag
|
||||
product,product_35,343606,img_store_flag_packs_columbia,mdlc48,flagpacks,all,1,,,# Columbia Flag
|
||||
product,product_36,343607,img_store_flag_packs_ireland,mdlc49,flagpacks,all,1,,,# Ireland Flag
|
||||
product,product_37,343608,img_store_flag_packs_new_zealand,mdlc50,flagpacks,all,1,,,# New Zealand Flag
|
||||
product,product_38,343609,img_store_flag_packs_portugal,mdlc51,flagpacks,all,1,,,# Portugal Flag
|
||||
|
||||
product,product_39,331072,img_store_flag_packs_usa,mdlc19,flagpacks,all,0,,,# USA Flag
|
||||
product,product_40,333080,img_store_flag_packs_uk,mdlc20,flagpacks,all,0,,,# UK Flag
|
||||
product,product_41,333081,img_store_flag_packs_canada,mdlc21,flagpacks,all,0,,,# Canada Flag
|
||||
product,product_42,333082,img_store_flag_packs_france,mdlc22,flagpacks,all,0,,,# France Flag
|
||||
product,product_43,333083,img_store_flag_packs_germany,mdlc23,flagpacks,all,0,,,# Germany Flag
|
||||
product,product_44,333084,img_store_flag_packs_australia,mdlc24,flagpacks,all,0,,,# Australia Flag
|
||||
product,product_45,333087,img_store_flag_packs_italy,mdlc27,flagpacks,all,0,,,# Italy Flag
|
||||
product,product_46,333088,img_store_flag_packs_spain,mdlc28,flagpacks,all,0,,,# Spain Flag
|
||||
product,product_47,334220,img_store_flag_packs_netherlands,mdlc29,flagpacks,all,0,,,# Netherlands Flag
|
||||
product,product_48,334221,img_store_flag_packs_japan,mdlc30,flagpacks,all,0,,,# Japan Flag
|
||||
|
||||
product,product_49,343610,img_store_cac_slots,mdlc52,otheritems,all,0,,,# Create A Class Slots
|
||||
product,product_50,343612,img_store_armory_slots1,mdlc54,otheritems,all,0,armoryslots,,# Armory Slots
|
||||
product,product_51,343613,img_store_armory_slots2,mdlc55,otheritems,all,0,armoryslots,,# Armory Slots
|
||||
product,product_52,343614,img_store_armory_slots3,mdlc56,otheritems,all,0,armoryslots,,# Armory Slots
|
||||
product,product_53,343615,img_store_armory_slots4,mdlc57,otheritems,all,0,armoryslots,,# Armory Slots
|
||||
product,product_54,343616,img_store_armory_slots5,mdlc58,otheritems,all,0,armoryslots,,# Armory Slots
|
||||
product,product_55,318790,img_store_mappacks_atlas_gorge,dlc1,otheritems,all,0,,,# Atlas Gorge
|
||||
|
||||
product,product_56,00000,img_store_supplydrops_1,supdrp61,supplydrops,all,1,supplydrops_1,,# Supply Drops 1
|
||||
product,product_57,76a554fb-c4b4-4a3e-b913-dcd0c61de638,img_store_supplydrops_1,supdrp62,supplydrops,all,1,supplydrops_1,,# Supply Drops 1
|
||||
product,product_58,ed37f45c-1d3c-451c-87c3-0bb46ca51fa6,img_store_supplydrops_1,supdrp63,supplydrops,all,1,supplydrops_1,,# Supply Drops 1
|
||||
product,product_59,518865ed-dfae-4d8a-836e-e0e5dc2c3d08,img_store_supplydrops_1,supdrp64,supplydrops,all,1,supplydrops_1,,# Supply Drops 1
|
||||
product,product_60,3b9f4478-900d-43f9-b4b1-eb1f901ce961,img_store_supplydrops_1,supdrp65,supplydrops,all,1,supplydrops_1,,# Supply Drops 1
|
||||
product,product_61,f20bfb05-cca9-4a61-971b-c6c620b928b0,img_store_supplydrops_1,supdrp66,supplydrops,all,1,supplydrops_1,,# Supply Drops 1
|
||||
product,product_62,a75ee2b8-42f6-46b1-a45f-db6e64a98872,img_store_supplydrops_1,supdrp67,supplydrops,all,1,supplydrops_1,,# Supply Drops 1
|
||||
product,product_63,20f97f87-52a7-461e-8b78-9a54080bd400,img_store_supplydrops_1,supdrp68,supplydrops,all,1,supplydrops_1,,# Supply Drops 1
|
||||
product,product_64,f03ad620-bc8a-4f4f-a3b0-3630347b8a30,img_store_supplydrops_1,supdrp69,supplydrops,all,1,supplydrops_1,,# Supply Drops 1
|
||||
product,product_65,ebe31b71-f8cc-4f0d-9915-6a13d53af74b,img_store_supplydrops_1,supdrp70,supplydrops,all,1,supplydrops_1,,# Supply Drops 1
|
||||
product,product_111,b05003d8-bf77-4d04-a0cc-d8a36425b813,img_store_supplydrops_1,supdrp72,supplydrops,all,1,supplydrops_1,22,# Supply Drops 1
|
||||
product,product_112,2b7b516c-8e7e-45b7-92fd-dc2040c08d6e,img_store_supplydrops_1,supdrp73,supplydrops,all,1,supplydrops_1,22,# Supply Drops 1
|
||||
product,product_113,5de14218-1543-4fc5-ae89-eb4037109234,img_store_supplydrops_1,supdrp74,supplydrops,all,1,supplydrops_1,22,# Supply Drops 1
|
||||
product,product_114,3404d799-4341-46de-95ea-c6bdd47c8e39,img_store_supplydrops_1,supdrp75,supplydrops,all,1,supplydrops_1,22,# Supply Drops 1
|
||||
product,product_115,3f05faaf-a59b-4807-ad58-0bd28f520cc9,img_store_supplydrops_1,supdrp76,supplydrops,all,1,supplydrops_1,22,# Supply Drops 1
|
||||
|
||||
product,product_66,6031ecd6-a183-4c71-9022-9685dde26ebd,img_store_supplydrops_3,supdrp91,supplydrops,all,1,supplydrops_3,,# Supply Drops 3
|
||||
product,product_67,6aebd756-0b60-4ad4-8639-d27db2ae79e0,img_store_supplydrops_3,supdrp92,supplydrops,all,1,supplydrops_3,,# Supply Drops 3
|
||||
product,product_68,93a0c86c-c7af-464c-88d7-6e0519d482f4,img_store_supplydrops_3,supdrp93,supplydrops,all,1,supplydrops_3,,# Supply Drops 3
|
||||
product,product_69,6ca3fa67-8844-4128-89e0-8d4b7b8c5e3a,img_store_supplydrops_3,supdrp94,supplydrops,all,1,supplydrops_3,,# Supply Drops 3
|
||||
product,product_70,55c76436-50d8-401e-8761-b9ceeb18c7c4,img_store_supplydrops_3,supdrp95,supplydrops,all,1,supplydrops_3,,# Supply Drops 3
|
||||
product,product_71,844742d6-baa0-4079-892e-649a45564b56,img_store_supplydrops_3,supdrp96,supplydrops,all,1,supplydrops_3,,# Supply Drops 3
|
||||
product,product_72,605fb575-1482-4e0f-8934-165e290d26ca,img_store_supplydrops_3,supdrp97,supplydrops,all,1,supplydrops_3,,# Supply Drops 3
|
||||
product,product_73,64d0e219-b602-4906-b714-895d020bae2a,img_store_supplydrops_3,supdrp98,supplydrops,all,1,supplydrops_3,,# Supply Drops 3
|
||||
product,product_74,fc0e23af-fc91-4711-b3ca-a45c3ab03049,img_store_supplydrops_3,supdrp99,supplydrops,all,1,supplydrops_3,,# Supply Drops 3
|
||||
product,product_75,e9886801-697b-4b40-93bd-6f9b37b6102b,img_store_supplydrops_3,supdrp100,supplydrops,all,1,supplydrops_3,,# Supply Drops 3
|
||||
product,product_116,3c32e23a-514d-487c-9733-c9c8ec6fd55b,img_store_supplydrops_3,supdrp77,supplydrops,all,1,supplydrops_3,23,# Supply Drops 3
|
||||
product,product_117,906884d7-2864-4cd2-b725-1129c111abab,img_store_supplydrops_3,supdrp78,supplydrops,all,1,supplydrops_3,23,# Supply Drops 3
|
||||
product,product_118,28e9c053-da80-4f8a-b1b3-26cf9e6cad59,img_store_supplydrops_3,supdrp79,supplydrops,all,1,supplydrops_3,23,# Supply Drops 3
|
||||
product,product_119,13668620-fb95-4e3b-b15b-05ca33cb90dc,img_store_supplydrops_3,supdrp80,supplydrops,all,1,supplydrops_3,23,# Supply Drops 3
|
||||
product,product_120,e9e772ce-aeb5-4831-9672-f2ab1c0459f5,img_store_supplydrops_3,supdrp81,supplydrops,all,1,supplydrops_3,23,# Supply Drops 3
|
||||
|
||||
product,product_76,156f40b5-3683-4c26-a6d0-f2358701df53,img_store_supplydrops_5,supdrp71,supplydrops,all,1,supplydrops_5,,# Supply Drops 5
|
||||
product,product_77,3ec7cec9-91ff-4931-8785-e7092495c5cb,img_store_supplydrops_5,supdrp72,supplydrops,all,1,supplydrops_5,,# Supply Drops 5
|
||||
product,product_78,29af6a13-c4ce-469c-aee1-82bdcef9307f,img_store_supplydrops_5,supdrp73,supplydrops,all,1,supplydrops_5,,# Supply Drops 5
|
||||
product,product_79,92334032-5350-4319-ad0b-a5dac31e491f,img_store_supplydrops_5,supdrp74,supplydrops,all,1,supplydrops_5,,# Supply Drops 5
|
||||
product,product_80,9974b492-3253-4873-97cc-68a47117f09f,img_store_supplydrops_5,supdrp75,supplydrops,all,1,supplydrops_5,,# Supply Drops 5
|
||||
product,product_81,d3a71cec-ceb3-452a-baa1-97ce8360cee8,img_store_supplydrops_5,supdrp76,supplydrops,all,1,supplydrops_5,,# Supply Drops 5
|
||||
product,product_82,93e9ba95-0738-4302-9880-33774f4e4b2a,img_store_supplydrops_5,supdrp77,supplydrops,all,1,supplydrops_5,,# Supply Drops 5
|
||||
product,product_83,5998caba-5f9f-475c-bc45-a4f2d9386105,img_store_supplydrops_5,supdrp78,supplydrops,all,1,supplydrops_5,,# Supply Drops 5
|
||||
product,product_84,5afa84ac-abe3-4db9-917e-29933134d4be,img_store_supplydrops_5,supdrp79,supplydrops,all,1,supplydrops_5,,# Supply Drops 5
|
||||
product,product_85,4f7350d9-90aa-4f91-a974-8fe399280d7c,img_store_supplydrops_5,supdrp80,supplydrops,all,1,supplydrops_5,,# Supply Drops 5
|
||||
product,product_121,19938ec4-0047-4d17-8002-97c6584413fa,img_store_supplydrops_5,supdrp82,supplydrops,all,1,supplydrops_5,24,# Supply Drops 5
|
||||
product,product_122,e2bb0ca8-66cc-4658-a34c-0c80babdb0df,img_store_supplydrops_5,supdrp83,supplydrops,all,1,supplydrops_5,24,# Supply Drops 5
|
||||
product,product_123,411f8663-77fd-4821-8eef-8e213ba1f4ed,img_store_supplydrops_5,supdrp84,supplydrops,all,1,supplydrops_5,24,# Supply Drops 5
|
||||
product,product_124,2a9140a1-946b-4a07-a790-6f7d4ee541d7,img_store_supplydrops_5,supdrp85,supplydrops,all,1,supplydrops_5,24,# Supply Drops 5
|
||||
product,product_125,af7f50e7-dc1b-4b14-b78d-61ae560b2a00,img_store_supplydrops_5,supdrp86,supplydrops,all,1,supplydrops_5,24,# Supply Drops 5
|
||||
|
||||
product,product_86,5de0f259-b94b-40a9-a2ea-dba2f95f8b87,img_store_supplydrops_10,supdrp81,supplydrops,all,1,supplydrops_10,,# Supply Drops 10
|
||||
product,product_87,89f452a5-5c6f-4d8e-a203-35de25a73805,img_store_supplydrops_10,supdrp82,supplydrops,all,1,supplydrops_10,,# Supply Drops 10
|
||||
product,product_88,c503ee82-39c2-4a0e-93fe-e9acfc846a81,img_store_supplydrops_10,supdrp83,supplydrops,all,1,supplydrops_10,,# Supply Drops 10
|
||||
product,product_89,e2c670f6-567b-4bd1-ae36-c2f039e22add,img_store_supplydrops_10,supdrp84,supplydrops,all,1,supplydrops_10,,# Supply Drops 10
|
||||
product,product_90,b38a63b5-2c14-445f-a9d7-31ad59b4fe5c,img_store_supplydrops_10,supdrp85,supplydrops,all,1,supplydrops_10,,# Supply Drops 10
|
||||
product,product_91,8c448893-0809-4c4f-be73-fa574be15333,img_store_supplydrops_10,supdrp86,supplydrops,all,1,supplydrops_10,,# Supply Drops 10
|
||||
product,product_92,82a96d7b-859b-46a9-a7c7-ba082558066b,img_store_supplydrops_10,supdrp87,supplydrops,all,1,supplydrops_10,,# Supply Drops 10
|
||||
product,product_93,9bc7070b-4a5a-4d39-9957-734eafd3f8e0,img_store_supplydrops_10,supdrp88,supplydrops,all,1,supplydrops_10,,# Supply Drops 10
|
||||
product,product_94,dda9be88-d5cc-4827-aecf-40e9598f4adb,img_store_supplydrops_10,supdrp89,supplydrops,all,1,supplydrops_10,,# Supply Drops 10
|
||||
product,product_95,4067a17b-23c7-4999-a514-8ed9041e8a02,img_store_supplydrops_10,supdrp90,supplydrops,all,1,supplydrops_10,,# Supply Drops 10
|
||||
product,product_126,10cd1171-2eb4-4dcb-a281-372b747319f6,img_store_supplydrops_10,supdrp87,supplydrops,all,1,supplydrops_10,25,# Supply Drops 10
|
||||
product,product_127,8706ff47-4cc7-4957-a4f3-d9589be39d78,img_store_supplydrops_10,supdrp88,supplydrops,all,1,supplydrops_10,25,# Supply Drops 10
|
||||
product,product_128,ff9063ee-79ef-4b4a-8e22-df83f700e292,img_store_supplydrops_10,supdrp89,supplydrops,all,1,supplydrops_10,25,# Supply Drops 10
|
||||
product,product_129,31cdd8b7-2c6a-414b-8e02-a2d7f6f64f12,img_store_supplydrops_10,supdrp90,supplydrops,all,1,supplydrops_10,25,# Supply Drops 10
|
||||
product,product_130,de53b351-a6ab-4089-a30b-0396f6fad455,img_store_supplydrops_10,supdrp91,supplydrops,all,1,supplydrops_10,25,# Supply Drops 10
|
||||
|
||||
# Consumable Supply Drops
|
||||
product,product_96,c5f202f9-3386-4d8b-9f5f-fc4f16f78ed3,img_store_supplydrops_1,supdrp46,supplydrops_v2,all,1,,26,# Consumable Supply Drops 1
|
||||
product,product_97,0463b195-81cb-43c8-87a4-814043492ac1,img_store_supplydrops_3,supdrp50,supplydrops_v2,all,1,,27,# Consumable Supply Drops 3
|
||||
product,product_98,ef8577d9-0cab-433d-8955-8dd96089218e,img_store_supplydrops_5,supdrp47,supplydrops_v2,all,1,,28,# Consumable Supply Drops 5
|
||||
product,product_99,4b49d2af-d9ed-4f4a-8aa1-0fc3c2e70f87,img_store_supplydrops_10,supdrp48,supplydrops_v2,all,1,,29,# Consumable Supply Drops 10
|
||||
product,product_100,ca0012ef-1206-4173-8979-d2d4f3d66a57,img_store_supplydrops_20,supdrp71,supplydrops_v2,all,1,,31,# Consumable Supply Drops 20
|
||||
|
||||
# More Durable Supply Drops
|
||||
product,product_101,48a1c3f1-c47f-4752-95c8-658630e29cd1,img_store_supplydrops_20,supdrp61,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
product,product_102,e0556d68-6bbf-4fce-affb-28c4eec8eb25,img_store_supplydrops_20,supdrp62,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
product,product_103,d627860d-bf3a-4972-9eb5-51a68bf4eb44,img_store_supplydrops_20,supdrp63,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
product,product_104,641bb491-7dda-42c9-850f-a9d6774236a0,img_store_supplydrops_20,supdrp64,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
product,product_105,c53a24c9-c07b-468d-bbc5-1d57ccdfd82c,img_store_supplydrops_20,supdrp65,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
product,product_106,fcc7f36b-3158-4129-a13d-8437924eb9ee,img_store_supplydrops_20,supdrp66,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
product,product_107,a21a0bda-abed-47a2-9d97-40bede8bfd7b,img_store_supplydrops_20,supdrp67,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
product,product_108,c7492ab3-7a7c-46d7-8efd-2a6ecd844dd7,img_store_supplydrops_20,supdrp68,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
product,product_109,e6a955fb-c723-42f7-b391-615dce049592,img_store_supplydrops_20,supdrp69,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
product,product_110,a4f8bf5c-4af4-4f4b-9996-e0816475ff6b,img_store_supplydrops_20,supdrp70,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
product,product_131,0b917713-e3a1-406b-9a61-dd1afa2212f5,img_store_supplydrops_20,supdrp92,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
product,product_132,69377444-37e1-4b99-8008-376a1da8d886,img_store_supplydrops_20,supdrp93,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
product,product_133,c3ae1aee-1445-4601-9577-033496317972,img_store_supplydrops_20,supdrp94,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
product,product_134,7d66fdd5-ebac-4893-be48-439867faccda,img_store_supplydrops_20,supdrp95,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
product,product_135,466f1cd8-ce9e-4ee8-ad7b-79d9e8c4e57b,img_store_supplydrops_20,supdrp96,supplydrops,all,1,supplydrops_20,30,# Supply Drops 20
|
||||
|
||||
#MDLC 4 OHM Standalone
|
||||
product,product_142,343595,img_store_ohm,mdlc70,OTHERITEMS,all,0,,,#OHM Standalone Pack
|
||||
#type = category,UID,category ID,title,Language List separated by space delimiter,visibility (0-show,1-hide)
|
||||
category,category_1,1,seasonpass,LUA_MENU_STORE_SEASON_PASS,english french german italian spanish russian polish korean taiwanese chinese thai czech spanishna portuguese arabic,0
|
||||
category,category_2,2,mappacks,LUA_MENU_STORE_MAP_PACKS,all,0
|
||||
category,category_3,3,prempersonpacks,LUA_MENU_STORE_PREMIUM_PERSONALIZATION_PACKS,all,0
|
||||
category,category_4,4,personpacks,LUA_MENU_STORE_PERSONALIZATION_PACKS,all,0
|
||||
category,category_5,5,operatorpacks,LUA_MENU_STORE_PREMIUM_EXO_PACKS,all,0
|
||||
category,category_6,6,flagpacks,LUA_MENU_STORE_EXO_PACKS,all,0
|
||||
category,category_7,7,supplydrops,LUA_MENU_STORE_SUPPLYDROPS,all,1
|
||||
category,category_8,8,otheritems,LUA_MENU_STORE_ADDITIONAL_ITEMS,all,0
|
|
3637
localappdata/xlabs/data/s1x/data/maps/mp/gametypes/_damage.gsc
Normal file
3548
localappdata/xlabs/data/s1x/data/maps/mp/gametypes/_gamelogic.gsc
Normal file
2226
localappdata/xlabs/data/s1x/data/maps/mp/gametypes/_playerlogic.gsc
Normal file
507
localappdata/xlabs/data/s1x/data/maps/mp/gametypes/gun.gsc
Normal file
@ -0,0 +1,507 @@
|
||||
// S1 GSC SOURCE
|
||||
// Dumped by https://github.com/xensik/gsc-tool
|
||||
|
||||
main()
|
||||
{
|
||||
maps\mp\gametypes\_globallogic::init();
|
||||
maps\mp\gametypes\_callbacksetup::setupcallbacks();
|
||||
maps\mp\gametypes\_globallogic::setupcallbacks();
|
||||
setguns();
|
||||
maps\mp\_utility::registertimelimitdvar( level.gametype, 10 );
|
||||
setdvar( "scr_gun_scorelimit", level.gun_guns.size );
|
||||
maps\mp\_utility::registerscorelimitdvar( level.gametype, level.gun_guns.size );
|
||||
level thread reinitializescorelimitonmigration();
|
||||
maps\mp\_utility::registerroundlimitdvar( level.gametype, 1 );
|
||||
maps\mp\_utility::registerwinlimitdvar( level.gametype, 0 );
|
||||
maps\mp\_utility::registernumlivesdvar( level.gametype, 0 );
|
||||
maps\mp\_utility::registerhalftimedvar( level.gametype, 0 );
|
||||
level.matchrules_randomize = 0;
|
||||
level.matchrules_damagemultiplier = 0;
|
||||
level.matchrules_vampirism = 0;
|
||||
|
||||
setspecialloadout();
|
||||
level.teambased = 0;
|
||||
level.doprematch = 1;
|
||||
level.onstartgametype = ::onstartgametype;
|
||||
level.onspawnplayer = ::onspawnplayer;
|
||||
level.getspawnpoint = ::getspawnpoint;
|
||||
level.onplayerkilled = ::onplayerkilled;
|
||||
level.ontimelimit = ::ontimelimit;
|
||||
level.onplayerscore = ::onplayerscore;
|
||||
level.bypassclasschoicefunc = ::gungameclass;
|
||||
level.assists_disabled = 1;
|
||||
level.setbacklevel = maps\mp\_utility::getintproperty( "scr_setback_levels", 1 );
|
||||
level.lastguntimevo = 0;
|
||||
|
||||
if ( level.matchrules_damagemultiplier )
|
||||
level.modifyplayerdamage = maps\mp\gametypes\_damage::gamemodemodifyplayerdamage;
|
||||
|
||||
setteammode( "ffa" );
|
||||
game["dialog"]["gametype"] = "gg_intro";
|
||||
game["dialog"]["defense_obj"] = "gbl_start";
|
||||
game["dialog"]["offense_obj"] = "gbl_start";
|
||||
game["dialog"]["humiliation"] = "gg_humiliation";
|
||||
game["dialog"]["lastgun"] = "at_anr1_gg_lastgun";
|
||||
|
||||
if ( maps\mp\_utility::isgrapplinghookgamemode() )
|
||||
game["dialog"]["gametype"] = "grap_" + game["dialog"]["gametype"];
|
||||
}
|
||||
|
||||
initializematchrules()
|
||||
{
|
||||
maps\mp\_utility::setcommonrulesfrommatchrulesdata( 1 );
|
||||
level.matchrules_randomize = getmatchrulesdata( "gunData", "randomize" );
|
||||
setdvar( "scr_gun_scorelimit", level.gun_guns.size );
|
||||
maps\mp\_utility::registerscorelimitdvar( level.gametype, level.gun_guns.size );
|
||||
setdvar( "scr_gun_winlimit", 1 );
|
||||
maps\mp\_utility::registerwinlimitdvar( "gun", 1 );
|
||||
setdvar( "scr_gun_roundlimit", 1 );
|
||||
maps\mp\_utility::registerroundlimitdvar( "gun", 1 );
|
||||
setdvar( "scr_gun_halftime", 0 );
|
||||
maps\mp\_utility::registerhalftimedvar( "gun", 0 );
|
||||
setdvar( "scr_gun_playerrespawndelay", 0 );
|
||||
setdvar( "scr_gun_waverespawndelay", 0 );
|
||||
setdvar( "scr_player_forcerespawn", 1 );
|
||||
setdvar( "scr_setback_levels", getmatchrulesdata( "gunData", "setbackLevels" ) );
|
||||
}
|
||||
|
||||
reinitializescorelimitonmigration()
|
||||
{
|
||||
setdvar( "scr_gun_scorelimit", level.gun_guns.size );
|
||||
maps\mp\_utility::registerscorelimitdvar( level.gametype, level.gun_guns.size );
|
||||
}
|
||||
|
||||
onstartgametype()
|
||||
{
|
||||
setclientnamemode( "auto_change" );
|
||||
maps\mp\_utility::setobjectivetext( "allies", &"OBJECTIVES_DM" );
|
||||
maps\mp\_utility::setobjectivetext( "axis", &"OBJECTIVES_DM" );
|
||||
maps\mp\_utility::setobjectivescoretext( "allies", &"OBJECTIVES_DM_SCORE" );
|
||||
maps\mp\_utility::setobjectivescoretext( "axis", &"OBJECTIVES_DM_SCORE" );
|
||||
maps\mp\_utility::setobjectivehinttext( "allies", &"OBJECTIVES_DM_HINT" );
|
||||
maps\mp\_utility::setobjectivehinttext( "axis", &"OBJECTIVES_DM_HINT" );
|
||||
initspawns();
|
||||
var_0 = [];
|
||||
maps\mp\gametypes\_gameobjects::main( var_0 );
|
||||
level.quickmessagetoall = 1;
|
||||
level.blockweapondrops = 1;
|
||||
level thread onplayerconnect();
|
||||
}
|
||||
|
||||
initspawns()
|
||||
{
|
||||
level.spawnmins = ( 0, 0, 0 );
|
||||
level.spawnmaxs = ( 0, 0, 0 );
|
||||
level.spawn_name = "mp_dm_spawn";
|
||||
maps\mp\gametypes\_spawnlogic::addspawnpoints( "allies", level.spawn_name );
|
||||
maps\mp\gametypes\_spawnlogic::addspawnpoints( "axis", level.spawn_name );
|
||||
level.mapcenter = maps\mp\gametypes\_spawnlogic::findboxcenter( level.spawnmins, level.spawnmaxs );
|
||||
setmapcenter( level.mapcenter );
|
||||
}
|
||||
|
||||
onplayerconnect()
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
player.gungamegunindex = 0;
|
||||
player.gungameprevgunindex = 0;
|
||||
player.stabs = 0;
|
||||
player.mysetbacks = 0;
|
||||
player.lastleveluptime = 0;
|
||||
player.showsetbacksplash = 0;
|
||||
|
||||
if ( level.matchrules_randomize )
|
||||
player.gunlist = common_scripts\utility::array_randomize( level.gun_guns );
|
||||
|
||||
player thread refillammo();
|
||||
player thread refillsinglecountammo();
|
||||
player thread watchforhostmigration();
|
||||
}
|
||||
}
|
||||
|
||||
getspawnpoint()
|
||||
{
|
||||
var_0 = maps\mp\gametypes\_spawnlogic::getteamspawnpoints( self.pers["team"] );
|
||||
|
||||
if ( level.ingraceperiod )
|
||||
var_1 = maps\mp\gametypes\_spawnlogic::getspawnpoint_random( var_0 );
|
||||
else
|
||||
var_1 = maps\mp\gametypes\_spawnscoring::getspawnpoint_freeforall( var_0 );
|
||||
|
||||
maps\mp\gametypes\_spawnlogic::recon_set_spawnpoint( var_1 );
|
||||
return var_1;
|
||||
}
|
||||
|
||||
gungameclass()
|
||||
{
|
||||
self.pers["class"] = "gamemode";
|
||||
self.pers["lastClass"] = "";
|
||||
self.pers["gamemodeLoadout"] = level.gun_loadout;
|
||||
self.class = self.pers["class"];
|
||||
self.lastclass = self.pers["lastClass"];
|
||||
self loadweapons( level.gun_guns[0] );
|
||||
}
|
||||
|
||||
onspawnplayer()
|
||||
{
|
||||
thread waitloadoutdone();
|
||||
}
|
||||
|
||||
waitloadoutdone()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
self endon( "disconnect" );
|
||||
level waittill( "player_spawned" );
|
||||
givenextgun( 1 );
|
||||
|
||||
if ( self.showsetbacksplash )
|
||||
{
|
||||
self.showsetbacksplash = 0;
|
||||
thread maps\mp\_events::decreasegunlevelevent();
|
||||
}
|
||||
}
|
||||
|
||||
watchforhostmigration()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
self endon( "disconnect" );
|
||||
|
||||
for (;;)
|
||||
{
|
||||
self waittill( "player_migrated" );
|
||||
|
||||
if ( self.sessionstate == "spectator" )
|
||||
maps\mp\gametypes\_menus::handleclasschoicedisallowed();
|
||||
}
|
||||
}
|
||||
|
||||
onplayerscore( var_0, var_1, var_2 )
|
||||
{
|
||||
if ( var_0 == "gained_gun_score" )
|
||||
{
|
||||
var_3 = maps\mp\gametypes\_rank::getscoreinfovalue( var_0 );
|
||||
var_1 maps\mp\_utility::setextrascore0( var_1.extrascore0 + var_3 );
|
||||
var_1 maps\mp\gametypes\_gamescore::updatescorestatsffa( var_1, var_3 );
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( var_0 == "dropped_gun_score" )
|
||||
{
|
||||
var_4 = min( level.setbacklevel, self.score );
|
||||
return int( var_4 * -1 );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
onplayerkilled( var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, var_9 )
|
||||
{
|
||||
if ( !isdefined( var_1 ) )
|
||||
return;
|
||||
|
||||
if ( var_3 == "MOD_TRIGGER_HURT" && !isplayer( var_1 ) )
|
||||
var_1 = self;
|
||||
|
||||
if ( var_3 == "MOD_FALLING" || isplayer( var_1 ) )
|
||||
{
|
||||
if ( var_3 == "MOD_FALLING" || var_1 == self || maps\mp\_utility::ismeleemod( var_3 ) && var_4 != "riotshield_mp" || var_4 == "boost_slam_mp" || var_4 == "iw5_dlcgun12loot8_mp" )
|
||||
{
|
||||
self playlocalsound( "mp_war_objective_lost" );
|
||||
self.gungameprevgunindex = self.gungamegunindex;
|
||||
self.gungamegunindex = int( max( 0, self.gungamegunindex - level.setbacklevel ) );
|
||||
self.lastkillweapon = undefined;
|
||||
|
||||
if ( self.gungameprevgunindex > self.gungamegunindex )
|
||||
{
|
||||
self.mysetbacks++;
|
||||
maps\mp\_utility::setextrascore1( self.mysetbacks );
|
||||
self.showsetbacksplash = 1;
|
||||
|
||||
if ( maps\mp\_utility::ismeleemod( var_3 ) || var_4 == "boost_slam_mp" || var_4 == "iw5_dlcgun12loot8_mp" )
|
||||
{
|
||||
var_1.stabs++;
|
||||
var_1.assists = var_1.stabs;
|
||||
var_1 thread maps\mp\_events::setbackenemygunlevelevent();
|
||||
|
||||
if ( self.gungameprevgunindex == level.gun_guns.size - 1 )
|
||||
{
|
||||
var_1 thread maps\mp\_events::setbackfirstplayergunlevelevent();
|
||||
var_1 maps\mp\_utility::leaderdialogonplayer( "humiliation", "status" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( var_3 == "MOD_PISTOL_BULLET" || var_3 == "MOD_RIFLE_BULLET" || var_3 == "MOD_HEAD_SHOT" || var_3 == "MOD_PROJECTILE" || var_3 == "MOD_PROJECTILE_SPLASH" || var_3 == "MOD_EXPLOSIVE" || var_3 == "MOD_IMPACT" || var_3 == "MOD_GRENADE" || var_3 == "MOD_GRENADE_SPLASH" || maps\mp\_utility::ismeleemod( var_3 ) && var_4 == "riotshield_mp" )
|
||||
{
|
||||
if ( isdefined( var_1.lastkillweapon ) && var_1.lastkillweapon == var_4 )
|
||||
return;
|
||||
|
||||
var_10 = level.gun_guns;
|
||||
|
||||
if ( level.matchrules_randomize )
|
||||
var_10 = var_1.gunlist;
|
||||
|
||||
var_11 = var_10[var_1.gungamegunindex];
|
||||
|
||||
if ( !issubstr( var_4, maps\mp\_utility::getbaseweaponname( var_11 ) ) )
|
||||
return;
|
||||
|
||||
var_1.lastkillweapon = var_4;
|
||||
|
||||
if ( var_1.lastleveluptime + 3000 > gettime() )
|
||||
var_1 thread maps\mp\_events::quickgunlevelevent();
|
||||
|
||||
var_1.lastleveluptime = gettime();
|
||||
var_1.gungameprevgunindex = var_1.gungamegunindex;
|
||||
var_1.gungamegunindex++;
|
||||
var_1 thread maps\mp\_events::increasegunlevelevent();
|
||||
|
||||
if ( var_1.gungamegunindex == level.gun_guns.size - 1 )
|
||||
{
|
||||
maps\mp\_utility::playsoundonplayers( "mp_enemy_obj_captured" );
|
||||
level thread maps\mp\_utility::teamplayercardsplash( "callout_top_gun_rank", var_1 );
|
||||
var_12 = gettime();
|
||||
|
||||
if ( level.lastguntimevo + 4500 < var_12 )
|
||||
{
|
||||
level thread maps\mp\_utility::leaderdialogonplayers( "lastgun", level.players, "status" );
|
||||
level.lastguntimevo = var_12;
|
||||
}
|
||||
}
|
||||
|
||||
if ( var_1.gungamegunindex < level.gun_guns.size )
|
||||
var_1 givenextgun( 0, var_4 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
givenextgun( var_0, var_1 )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
var_2 = getnextgun();
|
||||
self.gun_curgun = var_2;
|
||||
var_2 = addattachments( var_2 );
|
||||
|
||||
while ( !self loadweapons( var_2 ) )
|
||||
waitframe();
|
||||
|
||||
if ( isdefined( var_1 ) )
|
||||
self takeweapon( var_1 );
|
||||
else
|
||||
self takeallweapons();
|
||||
|
||||
maps\mp\_utility::_giveweapon( var_2 );
|
||||
self switchtoweaponimmediate( var_2 );
|
||||
|
||||
if ( isdefined( var_0 ) && var_0 == 1 )
|
||||
self setspawnweapon( var_2 );
|
||||
|
||||
var_3 = maps\mp\_utility::getbaseweaponname( var_2 );
|
||||
self.pers["primaryWeapon"] = var_3;
|
||||
self.primaryweapon = var_2;
|
||||
self givestartammo( var_2 );
|
||||
self switchtoweapon( var_2 );
|
||||
self.gungameprevgunindex = self.gungamegunindex;
|
||||
}
|
||||
|
||||
getnextgun()
|
||||
{
|
||||
var_0 = level.gun_guns;
|
||||
var_1 = [];
|
||||
var_2 = undefined;
|
||||
|
||||
if ( level.matchrules_randomize )
|
||||
var_0 = self.gunlist;
|
||||
|
||||
var_2 = var_0[self.gungamegunindex];
|
||||
var_1[var_1.size] = var_2;
|
||||
|
||||
if ( self.gungamegunindex + 1 < var_0.size )
|
||||
var_1[var_1.size] = var_0[self.gungamegunindex + 1];
|
||||
|
||||
if ( self.gungamegunindex > 0 )
|
||||
var_1[var_1.size] = var_0[self.gungamegunindex - 1];
|
||||
|
||||
self loadweapons( var_1 );
|
||||
return var_2;
|
||||
}
|
||||
|
||||
addattachments( var_0 )
|
||||
{
|
||||
if ( getdvarint( "scr_gun_loot_variants", 0 ) == 1 )
|
||||
{
|
||||
var_1 = tablelookup( "mp/statstable.csv", 4, var_0, 40 );
|
||||
|
||||
if ( isdefined( var_1 ) && var_1 != "" )
|
||||
var_2 = maps\mp\gametypes\_class::buildweaponname( var_0, var_1, "none", "none", 0, 0 );
|
||||
else
|
||||
var_2 = maps\mp\gametypes\_class::buildweaponname( var_0, "none", "none", "none", 0, 0 );
|
||||
}
|
||||
else
|
||||
var_2 = maps\mp\gametypes\_class::buildweaponname( var_0, "none", "none", "none", 0, 0 );
|
||||
|
||||
return var_2;
|
||||
}
|
||||
|
||||
ontimelimit()
|
||||
{
|
||||
level.finalkillcam_winner = "none";
|
||||
var_0 = gethighestprogressedplayers();
|
||||
|
||||
if ( !isdefined( var_0 ) || !var_0.size )
|
||||
thread maps\mp\gametypes\_gamelogic::endgame( "tie", game["end_reason"]["time_limit_reached"] );
|
||||
else if ( var_0.size == 1 )
|
||||
thread maps\mp\gametypes\_gamelogic::endgame( var_0[0], game["end_reason"]["time_limit_reached"] );
|
||||
else if ( var_0[var_0.size - 1].gungamegunindex > var_0[var_0.size - 2].gungamegunindex )
|
||||
thread maps\mp\gametypes\_gamelogic::endgame( var_0[var_0.size - 1], game["end_reason"]["time_limit_reached"] );
|
||||
else
|
||||
thread maps\mp\gametypes\_gamelogic::endgame( "tie", game["end_reason"]["time_limit_reached"] );
|
||||
}
|
||||
|
||||
gethighestprogressedplayers()
|
||||
{
|
||||
var_0 = -1;
|
||||
var_1 = [];
|
||||
|
||||
foreach ( var_3 in level.players )
|
||||
{
|
||||
if ( isdefined( var_3.gungamegunindex ) && var_3.gungamegunindex >= var_0 )
|
||||
{
|
||||
var_0 = var_3.gungamegunindex;
|
||||
var_1[var_1.size] = var_3;
|
||||
}
|
||||
}
|
||||
|
||||
return var_1;
|
||||
}
|
||||
|
||||
refillammo()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
self endon( "disconnect" );
|
||||
|
||||
for (;;)
|
||||
{
|
||||
self waittill( "reload" );
|
||||
self givestartammo( self.primaryweapon );
|
||||
}
|
||||
}
|
||||
|
||||
refillsinglecountammo()
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
self endon( "disconnect" );
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if ( maps\mp\_utility::isreallyalive( self ) && self.team != "spectator" && isdefined( self.primaryweapon ) && self getammocount( self.primaryweapon ) == 0 )
|
||||
{
|
||||
wait 2;
|
||||
self notify( "reload" );
|
||||
wait 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
setguns()
|
||||
{
|
||||
var_0 = getdvarint( "scr_gun_loot_variants", 0 );
|
||||
level.gun_guns = [];
|
||||
level.gun_guns[0] = "iw5_asm1";
|
||||
level.gun_guns[1] = "iw5_asaw";
|
||||
level.gun_guns[2] = "iw5_himar";
|
||||
level.gun_guns[3] = "iw5_kf5";
|
||||
level.gun_guns[4] = "iw5_hbra3";
|
||||
level.gun_guns[5] = "iw5_mp11";
|
||||
level.gun_guns[6] = "iw5_ak12";
|
||||
level.gun_guns[7] = "iw5_sn6";
|
||||
level.gun_guns[8] = "iw5_arx160";
|
||||
level.gun_guns[9] = "iw5_hmr9";
|
||||
level.gun_guns[10] = "iw5_maul";
|
||||
level.gun_guns[11] = "iw5_dlcgun3";
|
||||
level.gun_guns[12] = "iw5_em1";
|
||||
level.gun_guns[13] = "iw5_uts19";
|
||||
level.gun_guns[14] = "iw5_lsat";
|
||||
level.gun_guns[15] = "iw5_rhino";
|
||||
level.gun_guns[16] = "iw5_exoxmg";
|
||||
level.gun_guns[17] = "iw5_epm3";
|
||||
level.gun_guns[18] = "iw5_mors";
|
||||
level.gun_guns[19] = "iw5_rw1";
|
||||
level.gun_guns[20] = "iw5_vbr";
|
||||
level.gun_guns[21] = "iw5_pbw";
|
||||
level.gun_guns[22] = "iw5_thor";
|
||||
level.gun_guns[23] = "iw5_mahem";
|
||||
level.gun_guns[24] = "iw5_exocrossbow";
|
||||
|
||||
if ( isdefined( var_0 ) && var_0 )
|
||||
{
|
||||
for ( var_1 = 0; var_1 < level.gun_guns.size; var_1++ )
|
||||
{
|
||||
var_2 = level.gun_guns[var_1];
|
||||
|
||||
if ( maps\mp\_utility::getweaponclass( var_2 ) == "weapon_projectile" || maps\mp\_utility::getweaponclass( var_2 ) == "weapon_sec_special" )
|
||||
var_2 = assign_random_loot_variant( var_2, 4 );
|
||||
else
|
||||
var_2 = assign_random_loot_variant( var_2, 10 );
|
||||
|
||||
level.gun_guns[var_1] = var_2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assign_random_loot_variant( var_0, var_1 )
|
||||
{
|
||||
var_2 = randomint( var_1 );
|
||||
|
||||
switch ( var_2 )
|
||||
{
|
||||
case 0:
|
||||
var_0 += "loot0";
|
||||
break;
|
||||
case 1:
|
||||
var_0 += "loot1";
|
||||
break;
|
||||
case 2:
|
||||
var_0 += "loot2";
|
||||
break;
|
||||
case 3:
|
||||
var_0 += "loot3";
|
||||
break;
|
||||
case 4:
|
||||
var_0 += "loot4";
|
||||
break;
|
||||
case 5:
|
||||
var_0 += "loot5";
|
||||
break;
|
||||
case 6:
|
||||
var_0 += "loot6";
|
||||
break;
|
||||
case 7:
|
||||
var_0 += "loot7";
|
||||
break;
|
||||
case 8:
|
||||
var_0 += "loot8";
|
||||
break;
|
||||
case 9:
|
||||
var_0 += "loot9";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return var_0;
|
||||
}
|
||||
|
||||
setspecialloadout()
|
||||
{
|
||||
level.gun_loadout = maps\mp\gametypes\_class::getemptyloadout();
|
||||
|
||||
if ( maps\mp\gametypes\_class::isvalidprimary( level.gun_guns[0] ) )
|
||||
level.gun_loadout["loadoutPrimary"] = level.gun_guns[0];
|
||||
else if ( maps\mp\gametypes\_class::isvalidsecondary( level.gun_guns[0], 0 ) )
|
||||
level.gun_loadout["loadoutSecondary"] = level.gun_guns[0];
|
||||
}
|