refactor: installation happens at MySQL side

A lot has happened here. Here's the list:

1. autoloader was added that should prevent various "failed to open
stream" errors when trying to load new classes

2. PHP-based data generation was replaced by MySQL-based one, hopefully
fixing the installation problems when insert payload it too high and the
DB wouldn't populate with some users

3. thanks to step 2, the installation should be really almost
instantenious, instead of waiting a long time for many SQL connections
and queries to populate the world

4. World Data & Oasis generation and population is done in 1 step now
This commit is contained in:
Martin Ambrus
2017-10-27 18:27:03 +02:00
parent 93fbba445e
commit 1066fff9a2
26 changed files with 957 additions and 447 deletions
+29 -9
View File
@@ -14,20 +14,40 @@
## Source code: https://github.com/Shadowss/TravianZ ##
## ##
#################################################################################
include_once('../GameEngine/config.php');
if(isset($_GET['c']) && $_GET['c'] == 1) {
echo "<div class=\"headline\"><span class=\"f10 c5\">Error importing database. Check configuration.</span></div><br>";
echo "<div class=\"headline\"><span class=\"f10 c5\">Error importing database. Check configuration.</span></div><br>";
}
if(isset($_GET['err']) && $_GET['err'] == 1) {
echo "<br /><hr /><br /><div class=\"headline\"><span class=\"f10 c5\">Existing structure was found in the database! Please remove old game tables with the <i>".TB_PREFIX."</i> prefix from the '<strong>".SQL_DB."</strong>' database before continuing.</span></div><br /><br />";
}
?>
<form action="process.php" method="post" id="dataform">
<input type="hidden" name="substruc" value="1">
<input type="hidden" name="substruc" value="1">
<p>
<span class="f10 c">Create SQL Structure</span>
<table>
<tr><td>Warning: This can take some time. Wait till the next page has been loaded! Click Create to proceed..</td></tr>
<tr><td><center><input type="submit" name="Submit" id="Submit" value="Create.." onClick="return proceed()"></center></td></tr>
</table>
</p>
<p>
<span class="f10 c">Create Database Structure</span>
<table>
<tr>
<td>
Warning: This can take some time. Please wait until the next page has been loaded. Click Create to proceed...
<br />
<br />
</td>
</tr>
<tr>
<td>
<center>
<input type="submit" name="Submit" id="Submit" value="Create" onClick="return proceed()" />
<br />
<br />
</center>
</td>
</tr>
</table>
</p>
</form>
</div>