mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-13 16:34:23 -05:00
gendoc fixes, cube docs need fixing
This commit is contained in:
30
genDocs.php
30
genDocs.php
@@ -266,6 +266,9 @@ EOT;
|
||||
FROM cubemain
|
||||
WHERE enabled > 0
|
||||
AND `input 1` <> 'ib3'
|
||||
AND `input 1` <> 'ib2'
|
||||
AND `input 1` <> 'ib1'
|
||||
AND `input 2` <> 'ooc'
|
||||
AND `description` NOT LIKE '%Stone x%'
|
||||
AND `description` NOT LIKE '%Unstacker%' ";
|
||||
$res = PDO_FetchAll($sql);
|
||||
@@ -342,7 +345,7 @@ EOT;
|
||||
]
|
||||
);
|
||||
|
||||
// var_dump($output_codes);
|
||||
//var_dump($output_codes);
|
||||
// output_codes is an array
|
||||
// output codes of outputs, like output, output b, output c.
|
||||
// each output can have 3 or 4 level item code or a amu,mag,pre=331 code
|
||||
@@ -366,7 +369,11 @@ EOT;
|
||||
$str = preg_replace($p, "", $str);
|
||||
}
|
||||
|
||||
// if empty str == 4-letter code, so just display
|
||||
if ($output_codes[$outputNum] == 'usetype' || $output_codes[$outputNum] == 'useitem') {
|
||||
$output_codes[$outputNum][0] = $input_codes[1];
|
||||
}
|
||||
|
||||
// if empty, str == 4-letter code, so just display
|
||||
if (empty($str)) {
|
||||
$output_codes[$outputNum][0] = ($oarray[0]);
|
||||
} else {
|
||||
@@ -377,6 +384,9 @@ EOT;
|
||||
} else { // else output code is three/four letter code
|
||||
$value .= ",";
|
||||
|
||||
|
||||
//var_dump($output_codes[$outputNum]);
|
||||
|
||||
$output_codes[$outputNum] = explode(",", $value); // hpot,qty=3
|
||||
$oarray = explode(",", $value); // hpot,qty=3
|
||||
$str = $strings[$oarray[0]]; //"SELECT `String` FROM `strings` WHERE Key=\"{$oarray[0]}\"";
|
||||
@@ -389,8 +399,8 @@ EOT;
|
||||
}
|
||||
|
||||
|
||||
// if empty str == 4-letter code, so just display
|
||||
if (empty($str)) {
|
||||
// if empty, str == 4-letter code, so just display
|
||||
if (empty($str)) {
|
||||
$output_codes[$outputNum][0] = ($oarray[0]);
|
||||
} else {
|
||||
$output_codes[$outputNum][0] = $str;
|
||||
@@ -532,6 +542,8 @@ EOT;
|
||||
}
|
||||
|
||||
|
||||
//var_dump($output);
|
||||
|
||||
$htmlRow .= "<td class='_output1'>"; // change _output to output
|
||||
if (!empty($output["output"]["img"])) {
|
||||
$htmlRow .= "<img src='img/items/{$output["output"]["img"]}'><br>";
|
||||
@@ -540,7 +552,7 @@ EOT;
|
||||
$output["output"][0] = preg_replace($p, "", $output["output"][0]);
|
||||
}
|
||||
|
||||
$htmlRow .= '<span style="color: #AF833B;">' . $output["output"][0] . "</span><br>";
|
||||
$htmlRow .= '<span style="color: #AF833B;">' . $output["output"][0] . "</span><br>";
|
||||
$key1 = array_search($output["input $i"][0], $itemtypesTbl);
|
||||
|
||||
if (str_contains($output["output"][1], "ÿc")) {
|
||||
@@ -1051,6 +1063,12 @@ EOT;
|
||||
$data['name'] = (implode('\n', $data['name']));
|
||||
} else {
|
||||
$data['name'] = $strings[$r['namestr']];
|
||||
|
||||
if (strpos($data['name'], '\n') !== false) {
|
||||
$lines = explode('\n', $data['name']);
|
||||
$reversedLines = array_reverse($lines);
|
||||
$data['name'] = implode("<br>", $reversedLines);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1132,7 +1150,7 @@ EOT;
|
||||
$p = "/ÿc[\d:;\/.]/i";
|
||||
$data['spelldesc'] = preg_replace($p, "", $data['spelldesc']);
|
||||
|
||||
$spelldesc = array_reverse(explode('}', $data['spelldesc']));
|
||||
$spelldesc = array_reverse(explode('\n', $data['spelldesc']));
|
||||
$data['spelldesc'] = (implode('<br>', $spelldesc));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user