Skip to content

Commit 7ed3bd4

Browse files
committed
tools bugfix
1 parent df6b801 commit 7ed3bd4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

cgss/main.php

+1
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ function main() {
350350
}
351351
fclose($f);
352352
} else if ($entry['type'] == 'index' && $entry['sql']) {
353+
$tblName = $entry['tbl_name'];
353354
file_put_contents("data/${tblName}.sql", $entry['sql'].";\n", FILE_APPEND);
354355
}
355356
//echo "\r".++$i.'/'.count($tables);

redive/main.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function do_commit($TruthVersion, $db = NULL) {
107107
$commitMessage[] = '- '.count($diff_send['new_table']).' new table: '. implode(', ', $diff_send['new_table']);
108108
}
109109
if (isset($versionDiff['unit'])) {
110-
$diff_send['card'] = array_map(function ($a){ return str_repeat('', $a['rarity']).$a['name'];}, $versionDiff['card']);
110+
$diff_send['card'] = array_map(function ($a){ return str_repeat('', $a['rarity']).$a['name'];}, $versionDiff['unit']);
111111
$commitMessage[] = '- new unit: '. implode(', ', $diff_send['card']);
112112
}
113113
if (isset($versionDiff['event'])) {
@@ -341,7 +341,13 @@ function main() {
341341
file_put_contents('data/+manifest_movie.txt', $manifest);
342342

343343
$manifest = file_get_contents('data/+manifest_masterdata.txt');
344-
$manifest = explode(',', $manifest);
344+
$manifest = array_map(function ($i){ return explode(',', $i); }, explode("\n", $manifest));
345+
foreach ($manifest as $entry) {
346+
if ($entry[0] === 'a/masterdata_master.unity3d') { $manifest = $entry; break; }
347+
}
348+
if ($manifest[0] !== 'a/masterdata_master.unity3d') {
349+
throw new Exception('masterdata_master.unity3d not found');
350+
}
345351
$bundleHash = $manifest[1];
346352
$bundleSize = $manifest[3]|0;
347353
if ($last_version['hash'] == $bundleHash) {
@@ -406,6 +412,7 @@ function main() {
406412
}
407413
fclose($f);
408414
} else if ($entry['type'] == 'index' && !empty($entry['sql'])) {
415+
$tblName = $entry['tbl_name'];
409416
file_put_contents("data/${tblName}.sql", $entry['sql'].";\n", FILE_APPEND);
410417
}
411418
}

0 commit comments

Comments
 (0)