Skip to content

Commit

Permalink
Merge pull request #814 from plural/rwr-startup-hacks
Browse files Browse the repository at this point in the history
Update the NRDB Classic Startup Hacks for RwR.
  • Loading branch information
plural authored Mar 20, 2024
2 parents 8939b8f + 046a740 commit 9af286e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/AppBundle/Controller/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ public function displayAction(
$standard_legal = "available";

// Startup legality is currently hard-coded since the DB doesn't know anything about it.
$startupCycles = ['system-gateway' => true, 'system-update-2021' => true, 'borealis' => true, 'liberation' => true]; // Hardcoded Startup Codes
$startupCycles = ['system-gateway' => true, 'system-update-2021' => true, 'liberation' => true]; // Hardcoded Startup Codes
$startup_legal = false;

$rotated_count = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/AppBundle/Service/CardsData.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function allsetsdata()
/** @var Cycle[] $list_cycles */
$list_cycles = $this->entityManager->getRepository(Cycle::class)->findBy([], ["position" => "DESC"]);
$non_standard_packs = ['draft', 'napd'];
$startup_cycles = ['system-gateway', 'system-update-2021', 'borealis', 'liberation']; // Hardcoded Startup Codes
$startup_cycles = ['system-gateway', 'system-update-2021', 'liberation']; // Hardcoded Startup Codes
$non_startup_cycles = [];
$non_eternal_packs = ['draft', 'napd', 'tdc'];
$cycles = [];
Expand Down Expand Up @@ -729,7 +729,7 @@ public function get_search_rows(array $conditions, string $sortorder, string $lo
$condition[0] = strtolower($condition[0]);
if ($condition[0] == "startup") {
// Add the valid cycles for startup and add them to the WHERE clause for the query.
$cycles = ['system-gateway', 'system-update-2021', 'borealis', 'liberation']; // Hardcoded Startup Codes
$cycles = ['system-gateway', 'system-update-2021', 'liberation']; // Hardcoded Startup Codes
$placeholders = array();
foreach($cycles as $cycle) {
array_push($placeholders, "?$i");
Expand Down
6 changes: 2 additions & 4 deletions web/js/deck.v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,12 @@ function create_collection_tab(initialPackSelection) {
let startup_cycles = Array(); // Hardcoded Startup Codes
startup_cycles['system-gateway'] = 1;
startup_cycles['system-update-2021'] = 1;
startup_cycles['borealis'] = 1;
startup_cycles['liberation'] = 1;
let startup_packs = Array(); // Hardcoded Startup Codes
startup_packs['sg'] = 1;
startup_packs['su21'] = 1;
startup_packs['msbp'] = 1;
startup_packs['ms'] = 1;
startup_packs['ph'] = 1;
startup_packs['tai'] = 1;
startup_packs['rwr'] = 1;
event.preventDefault();
$('#pack_code').find(':checkbox').each(function() {
$(this).prop('checked', Boolean(startup_cycles[$(this).prop('name')] || startup_packs[$(this).prop('name')]));
Expand All @@ -242,6 +239,7 @@ function create_collection_tab(initialPackSelection) {
startup_packs['ms'] = 1;
startup_packs['ph'] = 1;
startup_packs['tai'] = 1;
startup_packs['rwr'] = 1;
event.preventDefault();
$('#pack_code').find(':checkbox').each(function() {
$(this).prop('checked', Boolean(startup_cycles[$(this).prop('name')] || startup_packs[$(this).prop('name')]));
Expand Down
2 changes: 1 addition & 1 deletion web/js/initbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $(function() {
let visible = true;
// Startup
if (format === 'startup') {
visible = ['sg', 'su21', 'msbp', 'ms', 'ph', 'tai'].some(p => $(this).hasClass('pack-' + p)); // Hardcoded Startup Codes
visible = ['sg', 'su21', 'tai', 'rwr'].some(p => $(this).hasClass('pack-' + p)); // Hardcoded Startup Codes
}
// Standard
else if (format === 'standard') {
Expand Down
1 change: 0 additions & 1 deletion web/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ $(document).on('data.app', function() {
var startup_cycles = Array(); // Hardcoded Startup Codes
startup_cycles['system-gateway'] = 1;
startup_cycles['system-update-2021'] = 1;
startup_cycles['borealis'] = 1;
startup_cycles['liberation'] = 1;
var nsg_cycles = Array(); // Hardcoded NSG Codes
nsg_cycles['system-gateway'] = 1;
Expand Down

0 comments on commit 9af286e

Please sign in to comment.