Start terrain refactor

This commit is contained in:
2023-10-08 09:18:43 -04:00
parent ffb541a12e
commit 0d75e6db9b
12 changed files with 52 additions and 53 deletions
@@ -1,6 +1,6 @@
package engine.db.handlers;
import engine.InterestManagement.HeightMap;
import engine.InterestManagement.Terrain;
import engine.gameManager.DbManager;
import org.pmw.tinylog.Logger;
@@ -18,8 +18,8 @@ public class dbHeightMapHandler extends dbHandlerBase {
public void LOAD_ALL_HEIGHTMAPS() {
HeightMap thisHeightmap;
HeightMap.heightMapsCreated = 0;
Terrain thisHeightmap;
Terrain.heightMapsCreated = 0;
try (Connection connection = DbManager.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM static_zone_heightmap INNER JOIN static_zone_size ON static_zone_size.loadNum = static_zone_heightmap.zoneLoadID")) {
@@ -27,7 +27,7 @@ public class dbHeightMapHandler extends dbHandlerBase {
ResultSet rs = preparedStatement.executeQuery();
while (rs.next()) {
thisHeightmap = new HeightMap(rs);
thisHeightmap = new Terrain(rs);
if (thisHeightmap.heightmapImage == null) {
Logger.info("Imagemap for " + thisHeightmap.heightMapID + " was null");