Skip to content

Commit

Permalink
Merge pull request sporchia#471 from KevinCathcart/entrance0.6.1
Browse files Browse the repository at this point in the history
Update to ER 0.6.1
  • Loading branch information
sporchia authored Mar 31, 2018
2 parents d466616 + 31ed6c4 commit 292da3d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
11 changes: 10 additions & 1 deletion app/EntranceRandomizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
class EntranceRandomizer extends Randomizer {
const LOGIC = -1;
const VERSION = '0.6.0';
const VERSION = '0.6.1';
private $spoiler;
private $patch;
protected $shuffle;
Expand All @@ -38,6 +38,7 @@ public function __construct($difficulty = 'normal', $logic = 'noglitches', $goal
$this->timer_mode = 'none';
$this->seed = new Seed;
$this->keysanity = false;
$this->retro = false;

switch ($this->variation) {
case 'timed-race':
Expand All @@ -55,6 +56,9 @@ public function __construct($difficulty = 'normal', $logic = 'noglitches', $goal
case 'key-sanity':
$this->keysanity = true;
break;
case 'retro':
$this->retro = true;
break;
}
}

Expand All @@ -68,6 +72,10 @@ public function makeSeed(int $rng_seed = null) {
if ($this->keysanity) {
$keysanity_flag = ' --keysanity';
}
$retro_flag = '';
if ($this->retro) {
$retro_flag = ' --retro';
}

$proc = new Process('python3 '
. base_path('vendor/z3/entrancerandomizer/EntranceRandomizer.py')
Expand All @@ -77,6 +85,7 @@ public function makeSeed(int $rng_seed = null) {
. ' --shuffle ' . $this->shuffle
. ' --timer ' . $this->timer_mode
. $keysanity_flag
. $retro_flag
. ' --seed ' . $rng_seed
. ' --jsonout --loglevel error');

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"sentry/sentry": "^1.8",
"sentry/sentry-laravel": "^0.8.0",
"z3/enemizer": "6.0.22",
"z3/entrancerandomizer": "0.6.0"
"z3/entrancerandomizer": "0.6.1"
},
"require-dev": {
"sami/sami": "*",
Expand Down Expand Up @@ -53,11 +53,11 @@
"type": "package",
"package": {
"name": "z3/entrancerandomizer",
"version": "0.6.0",
"version": "0.6.1",
"source": {
"url": "https://github.com/AmazingAmpharos/ALttPEntranceRandomizer",
"type": "git",
"reference": "tags/0.6.0"
"reference": "tags/0.6.1"
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions config/alttp.php
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@
'ohko' => 'OHKO',
'triforce-hunt' => 'Triforce Piece Hunt',
'key-sanity' => 'Key-sanity',
'retro' => 'Retro',
],
],
'item' => [
Expand Down
6 changes: 3 additions & 3 deletions resources/views/_rom_spoiler.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function pasrseSpoilerToTabs(spoiler) {
+ ((section == active_nav) ? 'class="active"' : '') + '><a data-toggle="tab" data-section="' + section
+ '" href="#spoiler-' + section.replace(/ /g, '_') + '">' + section
+ '<span class="badge badge-pill"></span></a></li>'));
if (['entrances'].indexOf(section) !== -1) {
if (['Entrances'].indexOf(section) !== -1) {
var table = $('<table class="table table-striped"><thead><tr><th>Entrance</th><th>Direction</th><th>Exit</th></tr></thead><tbody></tbody></table>');
var tbody = table.find('tbody');
for (loc in spoiler[section]) {
Expand All @@ -57,7 +57,7 @@ function pasrseSpoilerToTabs(spoiler) {
content.append($('<div id="spoiler-' + section.replace(/ /g, '_') + '" class="tab-pane'
+ ((section == active_nav) ? ' active' : '') + '">'
+ '</div>').append(table));
} else if (['playthrough'].indexOf(section) !== -1 && !spoiler['entrances']) {
} else if (['playthrough'].indexOf(section) !== -1 && !spoiler['Entrances']) {
var table = $('<table class="table table-striped"><thead><tr><th>Sphere</th><th>Region</th><th>Location</th><th>Item</th></tr></thead><tbody></tbody></table>');
var tbody = table.find('tbody');
for (sphere in spoiler[section]) {
Expand All @@ -73,7 +73,7 @@ function pasrseSpoilerToTabs(spoiler) {
content.append($('<div id="spoiler-' + section.replace(/ /g, '_') + '" class="tab-pane'
+ ((section == active_nav) ? ' active' : '') + '">'
+ '</div>').append(table));
} else if (['playthrough'].indexOf(section) !== -1 && spoiler['entrances']) {
} else if (['playthrough'].indexOf(section) !== -1 && spoiler['Entrances']) {
var table = $('<table class="table table-striped"><thead><tr><th>Sphere</th><th>Location</th><th>Item</th></tr></thead><tbody></tbody></table>');
var tbody = table.find('tbody');
for (sphere in spoiler[section]) {
Expand Down
1 change: 1 addition & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
$spoiler = $rand->getSpoiler();
$hash = $rand->saveSeedRecord();
} catch (Exception $e) {
report($e);
return response('Failed', 409);
}

Expand Down

0 comments on commit 292da3d

Please sign in to comment.