Skip to content

Commit

Permalink
Merge pull request #895 from sporchia/v31.0.7
Browse files Browse the repository at this point in the history
V31.0.7 Release
  • Loading branch information
tcprescott authored Nov 30, 2020
2 parents d499a2e + c1fedd6 commit 3599366
Show file tree
Hide file tree
Showing 33 changed files with 22,210 additions and 21,830 deletions.
21 changes: 20 additions & 1 deletion app/Console/Commands/UpdateBuildRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,28 @@ public function handle()
}
}

$build_date = $this->argument('build');

if (!$build_date) {
$git_log = new Process(
['git', 'log', '-1','--format=%cd', '--date=short'],
base_path("vendor/z3/randomizer"));

$git_log->run();

if (!$git_log->isSuccessful()) {
$this->error($proc->getErrorOutput());

$this->error("Unable to retrieve last commit date.");

return 301;
}

$build_date = trim($git_log->getOutput());
}

$build = Build::firstOrNew([
'build' => $this->argument('build') ?? date('Y-m-d'),
'build' => $build_date,
]);
$build->hash = hash_file('md5', $romFile);
$build->patch = '[]';
Expand Down
6 changes: 3 additions & 3 deletions app/Enemizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function randomize(int $rng_seed = null)
$system = php_uname('s') == 'Darwin' ? 'osx' : 'linux';

$proc = new Process([
base_path("bin/enemizer/$system/EnemizerCLI.Core"),
base_path("vendor/z3/enemizer_$system/EnemizerCLI.Core"),
'--rom',
config('enemizer.base'),
'--seed',
Expand All @@ -80,7 +80,7 @@ public function randomize(int $rng_seed = null)
$this->options_file,
'--output',
$this->patch_file,
], base_path("bin/enemizer/$system"));
], base_path("vendor/z3/enemizer_$system"));

Log::debug($proc->getCommandLine());

Expand All @@ -94,7 +94,7 @@ public function randomize(int $rng_seed = null)
throw new \Exception("Unable to generate");
}

$file_contents = file_get_contents(base_path("bin/enemizer/$system/enemizerBasePatch.json"));
$file_contents = file_get_contents(base_path("vendor/z3/enemizer_$system/enemizerBasePatch.json"));

if ($file_contents === false) {
Log::error('enemizer base not readable');
Expand Down
2 changes: 1 addition & 1 deletion app/Randomizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ public function randomizeCredits(World $world)
"sandstorms", "sandwiched", "sauerkraut", "schipperke", "schismatic", "schizocarp", "schmalzier",
"schmeering", "schmoosing", "shibboleth", "shovelnose", "sahananana", "sarararara", "salamander",
"sharshalah", "shahabadoo", "sassafrass", "saddlebags", "sandalwood", "shagadelic", "sandcastle",
"saltpeters", "shabbiness", "shlrshlrsh", "sassyralph", "sallyacorn", "sahasrahbot"
"saltpeters", "shabbiness", "shlrshlrsh", "sassyralph", "sallyacorn", "sahasrahbot", "sasharalla",
]));
$world->setCredit('kakariko', "$name's homecoming");

Expand Down
29 changes: 27 additions & 2 deletions app/Rom.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
*/
class Rom
{
const BUILD = '2020-08-03';
const HASH = '11f68a2420b7ca44de97878582e6aa05';
const BUILD = '2020-09-25';
const HASH = '251976ea7cdaadf16742c4f86c571732';
const SIZE = 2097152;

private $tmp_file;
Expand Down Expand Up @@ -2664,6 +2664,31 @@ public function setMirrorlessSaveAndQuitToLightWorld(bool $enable = true): self
return $this;
}

/**
* Sets intro text and, in the future, other game elements to mask settings
* visible to the player prior to the start of a run. This is used when
* spoilers is set to "mystery". This text is currently what is used by
* the entrance randomizer.
*
* @param bool $enable switch on or off
*
* @return $this
*/
public function setMysteryMasking(bool $enable = true): self
{
if ($enable) {
$this->text->setString('intro_main', "{INTRO}\n Episode III\n{PAUSE3}\n A Link to\n the Past\n"
. "{PAUSE3}\n Randomizer\n{PAUSE3}\nAfter mostly disregarding what happened in the first two games.\n"
. "{PAUSE3}\nLink awakens to his uncle leaving the house.\n{PAUSE3}\nHe just runs out the door,\n"
. "{PAUSE3}\ninto the rainy night.\n{PAUSE3}\n{CHANGEPIC}\nGanon has moved around all the items in Hyrule.\n"
. "{PAUSE7}\nYou will have to find all the items necessary to beat Ganon.\n"
. "{PAUSE7}\nThis is your chance to be a hero.\n{PAUSE3}\n{CHANGEPIC}\n"
. "You must get the 7 crystals to beat Ganon.\n{PAUSE9}\n{CHANGEPIC}", false);
}

return $this;
}

/**
* Enable/Disable ability to Save and Quit from Boss room after item collection.
*
Expand Down
4 changes: 3 additions & 1 deletion app/World.php
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ public function getSpoiler(array $meta = []): array
'crystals_ganon' => $this->config('crystals.ganon'),
'crystals_tower' => $this->config('crystals.tower'),
'tournament' => $this->config('tournament', false),
'size' => $this->isEnemized() ? 4 : 2,
'size' => 2,
'hints' => $this->config('spoil.Hints'),
'spoilers' => $this->config('spoilers', 'off'),
'allow_quickswap' => $this->config('allow_quickswap'),
Expand Down Expand Up @@ -1151,6 +1151,8 @@ public function writeToRom(Rom $rom, bool $save = false): Rom
$rom->setGameType('item');
}

$rom->setMysteryMasking($this->config('spoilers', 'on') === 'mystery');

$rom->writeCredits();
$rom->writeText();

Expand Down
29 changes: 20 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"martinlindhe/laravel-vue-i18n-generator": "^0.1.35",
"sentry/sentry": "^2.0",
"sentry/sentry-laravel": "^1.0",
"z3/enemizer": "6.0.29",
"z3/enemizer_linux": "6.1.0.180",
"z3/enemizer_osx": "6.1.0.180",
"z3/entrancerandomizer": "^0.6.3",
"z3/randomizer": "^31.0"
},
Expand All @@ -46,23 +47,33 @@
"type": "package",
"package": {
"name": "z3/randomizer",
"version": "31.0.5",
"version": "31.0.7",
"source": {
"url": "https://github.com/KatDevsGames/z3randomizer",
"type": "git",
"reference": "tags/31.0.5"
"reference": "76f35b878696eea8ac869ef7c148a65e4e7825b5"
}
}
},
{
"type": "package",
"package": {
"name": "z3/enemizer",
"version": "6.0.29",
"source": {
"url": "https://github.com/Zarby89/Enemizer",
"type": "git",
"reference": "tags/6.0.29"
"name": "z3/enemizer_linux",
"version": "6.1.0.180",
"dist": {
"url": "https://github.com/tcprescott/Enimizer/releases/download/2mb-rom/ubuntu.16.04-x64.tar.gz",
"type": "tar"
}
}
},
{
"type": "package",
"package": {
"name": "z3/enemizer_osx",
"version": "6.1.0.180",
"dist": {
"url": "https://github.com/tcprescott/Enimizer/releases/download/2mb-rom/osx.10.12-x64.tar.gz",
"type": "tar"
}
}
},
Expand Down
Loading

0 comments on commit 3599366

Please sign in to comment.