Bläddra i källkod

fix linux build

Kolja Strohm 3 veckor sedan
förälder
incheckning
3d6f3d8469

+ 2 - 0
FactoryCraft/Area.cpp

@@ -62,6 +62,8 @@ int getDirectionIndex(Direction dir)
         return 4;
     case BOTTOM:
         return 5;
+    default:
+        break;
     }
     assert(false);
     return -1;

+ 2 - 4
FactoryCraft/BasicTool.cpp

@@ -208,9 +208,9 @@ BasicToolItemType::BasicToolItemType()
       handleMaterialDurability(10.f),
       handleMaterialDurabilityMultiplier(0.0),
       levelUpRule(0),
+      brokenItemTypeId(-1),
       brokenItemTypeName(),
-      itemSkillConfigJson(0),
-      brokenItemTypeId(-1)
+      itemSkillConfigJson(0)
 {}
 
 BasicToolItemType::~BasicToolItemType()
@@ -1638,11 +1638,9 @@ bool DamagingItemSkill::use(Entity* zActor, Item* zUsedItem, Block* zTarget)
             break;
         }
     }
-    bool invalid = 0;
     if (usedConfig == 0)
     {
         usedConfig = invalidUseConfig;
-        invalid = 1;
     }
     float damage = usedConfig->getDamage()
                  + usedConfig->getDamagePerHeadHardness()

+ 0 - 1
FactoryCraft/BiomGenerator.cpp

@@ -237,7 +237,6 @@ BiomGenerator* BiomGeneratorFactory::fromJson(
             Game::INSTANCE->zTypeRegistry()->fromJson<JBoolExpression>(
                 zJson->zValue("condition")));
     }
-    bool first = 1;
     for (Framework::JSON::JSONValue* value :
         *zJson->zValue("structurCollections")->asArray())
     {

+ 4 - 4
FactoryCraft/Block.cpp

@@ -480,8 +480,8 @@ BasicBlockItemType::BasicBlockItemType()
       hardness(1.f),
       speedModifier(1.f),
       blockTypeName(""),
-      placeableProof(0),
-      blockTypeId(-1)
+      blockTypeId(-1),
+      placeableProof(0)
 {}
 
 BasicBlockItemType::BasicBlockItemType(Framework::Text name,
@@ -500,8 +500,8 @@ BasicBlockItemType::BasicBlockItemType(Framework::Text name,
       hardness(hardness),
       speedModifier(speedModifier),
       blockTypeName(blockTypeName),
-      placeableProof(placeableProof),
-      blockTypeId(-1)
+      blockTypeId(-1),
+      placeableProof(placeableProof)
 {
     setName(name);
     setModel(model);

+ 2 - 2
FactoryCraft/BlockReplacementDrop.cpp

@@ -6,8 +6,8 @@
 
 BlockReplacementDrop::BlockReplacementDrop(Framework::Text blockTypeName)
     : DropConfig(),
-      blockTypeName(blockTypeName),
-      zBlockType(0)
+      zBlockType(0),
+      blockTypeName(blockTypeName)
 {}
 
 void BlockReplacementDrop::initialize()

+ 2 - 4
FactoryCraft/BlockType.cpp

@@ -15,15 +15,13 @@ BlockType::BlockType()
       initialMaxHP(0),
       needsClientInstance(true),
       lightSource(false),
-      name(),
       needModelSubscription(false),
       initialMapColor(0),
-      defaultBlock(0),
-      groupNames(),
       hardness(1.f),
       damagableByHand(0),
       itemType(0),
-      defaultFrontDirection(Direction::NORTH)
+      defaultFrontDirection(Direction::NORTH),
+      defaultBlock(0)
 {}
 
 BlockType::~BlockType()

+ 2 - 0
FactoryCraft/BlockType.h

@@ -268,6 +268,8 @@ public:
             result->addValue("defaultFrontDirection",
                 new Framework::JSON::JSONString("BOTTOM"));
             break;
+        default:
+            break;
         }
         return result;
     }

+ 8 - 6
FactoryCraft/Chunk.cpp

@@ -281,6 +281,8 @@ void Chunk::sendLightToClient(
                     }
                 }
                 break;
+            default:
+                break;
             }
         }
     }
@@ -306,10 +308,8 @@ void Chunk::sendLightToClient(
                     }
                     else
                     {
-                        int dir;
+                        int dir = 0;
                         int index = 0;
-                        int tmpX = x;
-                        int tmpY = y;
                         index = (((x + CHUNK_SIZE) % CHUNK_SIZE) * CHUNK_SIZE
                                     + ((y + CHUNK_SIZE) % CHUNK_SIZE))
                                   * WORLD_HEIGHT
@@ -573,14 +573,17 @@ void Chunk::api(Framework::StreamReader* zRequest,
 void Chunk::initializeLightning()
 {
     unsigned char dayLight[3] = {255, 255, 255};
-    unsigned char noLight[3] = {0, 0, 0};
     unsigned short visited[CHUNK_SIZE][WORLD_HEIGHT];
     memset(visited, 0, sizeof(visited));
+#ifdef _DEBUG
     int minZ = 0;
+#endif
     int goUps = 0;
     for (int z = WORLD_HEIGHT - 1; z >= 0; z--)
     {
+#ifdef _DEBUG
         minZ = z;
+#endif
         unsigned char max[3] = {0, 0, 0};
         bool allVisited = 1;
         for (int x = 0; x < CHUNK_SIZE; x++)
@@ -736,7 +739,6 @@ void Chunk::updateLightSources()
         int x = (i / WORLD_HEIGHT) / CHUNK_SIZE;
         int y = (i / WORLD_HEIGHT) % CHUNK_SIZE;
         int z = i % WORLD_HEIGHT;
-        Framework::Vec3<int> pos = {x, y, z};
         zDim->updateLightning(
             Framework::Vec3<int>(x + this->location.x - CHUNK_SIZE / 2,
                 y + this->location.y - CHUNK_SIZE / 2,
@@ -996,7 +998,7 @@ void Chunk::sendBlockInfo(Framework::Vec3<int> location)
     }
     char* msg = new char[size];
     msg[0] = 0; // set block
-    *(unsigned short*)(msg + 1) = typeId;
+    *(unsigned short*)(msg + 1) = (unsigned short)typeId;
     *(int*)(msg + 3) = index * WORLD_HEIGHT + location.z;
     msg[7] = state;
     int i = 8;

+ 4 - 4
FactoryCraft/DefaultInventoryDrop.cpp

@@ -1,9 +1,9 @@
 #include "DefaultInventoryDrop.h"
 
-#include <Block.h>
-#include <Entity.h>
-#include <Inventory.h>
-#include <ItemSlot.h>
+#include "Block.h"
+#include "Entity.h"
+#include "Inventory.h"
+#include "ItemSlot.h"
 
 DefaultInventoryItemDrop::DefaultInventoryItemDrop()
     : DropConfig()

+ 3 - 1
FactoryCraft/DimensionGenerator.cpp

@@ -493,7 +493,7 @@ Chunk* BiomedCavedDimensionGenerator::generateChunk(int centerX, int centerY)
                 {
                     *zPos = (float)z;
                     bool underwater = current == seaFluidBlockTypeId;
-                    bool underground = z < *terrainHeightP;
+                    bool underground = (float)z < *terrainHeightP;
                     bool surface = z == (int)round(*terrainHeightP);
                     biom->generatePlants(x + centerX,
                         y + centerY,
@@ -588,6 +588,8 @@ void BiomedCavedDimensionGenerator::postprocessChunk(Chunk* zChunk)
                 xj = 1;
                 yOffset = -1;
                 break;
+            default:
+                break;
             }
             for (int o = 0; o < borderOffset; o++)
             {

+ 1 - 0
FactoryCraft/DropCondition.h

@@ -10,6 +10,7 @@ class Block;
 class DropCondition
 {
 public:
+    virtual ~DropCondition() = default;
     virtual bool evaluate(Entity* zActor,
         Item* zItem,
         ItemSkill* zUsedSkill,

+ 14 - 5
FactoryCraft/Entity.cpp

@@ -27,8 +27,7 @@ bool ActionTarget::isBlock(
     Framework::Vec3<int> blockPos, Direction blockSide) const
 {
     return this->entityId == -1 && this->blockPos == blockPos
-        && (this->targetBlockSide == targetBlockSide
-            || blockSide == NO_DIRECTION);
+        && (this->targetBlockSide == blockSide || blockSide == NO_DIRECTION);
 }
 
 bool ActionTarget::isEntity(int entityId) const
@@ -247,10 +246,19 @@ ActionTarget* ActionTarget::load(Framework::StreamReader* zReader)
 Entity::Entity(
     int typeId, Framework::Vec3<float> location, int dimensionId, int entityId)
     : Inventory(location, dimensionId, true),
+      stamina(1.f),
+      hunger(1.f),
+      currentHP(1.f),
+      thirst(1.f),
       chatSecurityLevel(0),
       lastChunkCenter(0, 0),
       lastSavedChunkCenter(Framework::Maybe<Framework::Point>::empty()),
       lastDimensionId(-1),
+      maxHP(1.f),
+      maxStamina(1.f),
+      maxHunger(1.f),
+      maxThirst(1.f),
+      targetDistanceLimit(0.f),
       maxMovementSpeed(0.f),
       speed(0, 0, 0),
       faceDir(1, 0, 0),
@@ -261,6 +269,7 @@ Entity::Entity(
       jumpSpeed(0.f),
       id(entityId),
       placeBlockCooldown(0.0),
+      rotation(0.f),
       movementFlags(0),
       collisionMap(0),
       collisionMapLength(0)
@@ -1550,7 +1559,7 @@ double Entity::getHitDistance(
     rotatedRayDirection.normalize();
     if (rotatedRayDirection.x != 0)
     {
-        float d;
+        float d = 0.f;
         if (rotatedRayDirection.x > 0)
         {
             float border = getPosition().x - boundingBox.x;
@@ -1576,7 +1585,7 @@ double Entity::getHitDistance(
     }
     if (rotatedRayDirection.y != 0)
     {
-        float d;
+        float d = 0.f;
         if (rotatedRayDirection.y > 0)
         {
             float border = getPosition().y - boundingBox.y;
@@ -1602,7 +1611,7 @@ double Entity::getHitDistance(
     }
     if (rotatedRayDirection.z != 0)
     {
-        float d;
+        float d = 0.f;
         if (rotatedRayDirection.z > 0)
         {
             float border = getPosition().z - boundingBox.z;

+ 2 - 2
FactoryCraft/Entity.h

@@ -1,9 +1,9 @@
 #pragma once
 
 #include <Maybe.h>
+#include <Timer.h>
 #include <Vec3.h>
 #include <Writer.h>
-#include <Timer.h>
 
 #include "Inventory.h"
 #include "ItemSkill.h"
@@ -67,8 +67,8 @@ private:
     float thirst;
     int chatSecurityLevel;
     Framework::Point lastChunkCenter;
-    int lastDimensionId;
     Framework::Maybe<Framework::Point> lastSavedChunkCenter;
+    int lastDimensionId;
 
 protected:
     float maxHP;

+ 2 - 2
FactoryCraft/EntityType.cpp

@@ -7,8 +7,8 @@
 EntityType::EntityType()
     : ReferenceCounter(),
       name(""),
-      model(0),
-      id(-1)
+      id(-1),
+      model(0)
 {}
 
 EntityType::~EntityType()

+ 10 - 4
FactoryCraft/FactoryCraft.vcxproj

@@ -65,6 +65,7 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <UseDebugLibraries>false</UseDebugLibraries>
     <RemoteRootDir>/home/kolja/projects</RemoteRootDir>
+    <RemoteProjectRelDir>/home/kolja/projects/Server/$(ProjectName)/release/</RemoteProjectRelDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     <UseDebugLibraries>false</UseDebugLibraries>
@@ -81,7 +82,7 @@
     <OutDir>/home/kolja/projects/Server/$(ProjectName)/debug/</OutDir>
     <IntDir>/home/kolja/projects/Server/$(ProjectName)/debug/</IntDir>
     <RemoteProjectDir>$(RemoteRootDir)/Server/$(ProjectName)/debug</RemoteProjectDir>
-    <IncludePath>..\..\..\..\..\Allgemein\Framework;../../../Framework/debug;..\..\..\..\..\Allgemein\Network\Network;../../../Network/debug/Network;../../../KsgScript/debug/KsgScript;..\..\..\..\..\Allgemein\KSGScript\KSGScript\Include;D:\visual studio\Common7\IDE\VC\Linux\include\usr\include\x86_64-linux-gnu\bits;$(IncludePath)</IncludePath>
+    <IncludePath>../../../Framework/debug;../../../Network/debug/Network;D:\visual studio\Common7\IDE\VC\Linux\include\usr\include\x86_64-linux-gnu\bits;$(IncludePath)</IncludePath>
     <RemoteTargetPath>$(RemoteProjectDir)/$(TargetName)$(TargetExt)</RemoteTargetPath>
     <RemoteLinkLocalCopyOutput>true</RemoteLinkLocalCopyOutput>
     <RemoteIntRelDir>/home/kolja/projects/Server/$(ProjectName)/debug/</RemoteIntRelDir>
@@ -94,6 +95,9 @@
     <RemoteProjectDir>$(RemoteRootDir)/Server/$(ProjectName)/release</RemoteProjectDir>
     <IncludePath>..\..\..\..\..\Allgemein\Framework;../../../Framework/release;..\..\..\..\..\Allgemein\Network\Network;../../../Network/release/Network;../../../KsgScript/release/KsgScript;..\..\..\..\..\Allgemein\KSGScript\KSGScript\Include;$(IncludePath)</IncludePath>
     <RemoteTargetPath>$(RemoteProjectDir)/$(TargetName)$(TargetExt)</RemoteTargetPath>
+    <RemoteIntRelDir>/home/kolja/projects/Server/$(ProjectName)/release/</RemoteIntRelDir>
+    <RemoteOutRelDir>/home/kolja/projects/Server/$(ProjectName)/release/</RemoteOutRelDir>
+    <RemoteDeployDir>/home/kolja/projects/Server/$(ProjectName)/release/</RemoteDeployDir>
   </PropertyGroup>
   <ItemGroup>
     <ClInclude Include="Animal.h" />
@@ -329,7 +333,7 @@
     <ClCompile Include="Server.cpp" />
     <ClCompile Include="ShapedNoise.cpp" />
     <ClCompile Include="SpecificItemDrop.cpp" />
-    <ClCompile Include="SpecificItemDrop.h" />
+    <ClInclude Include="SpecificItemDrop.h" />
     <ClCompile Include="Start.cpp" />
     <ClCompile Include="StructureCollection.cpp" />
     <ClCompile Include="TickOrganizer.cpp" />
@@ -357,7 +361,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <Link>
       <AdditionalLibraryDirectories>$(RemoteRootDir)/sql/debug;$(RemoteRootDir)/Network/debug;$(RemoteRootDir)/Framework/debug;/usr/lib/;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <LibraryDependencies>dbgFramework;dbgNetwork;dbgSQL;pq;pthread;ssl;ncurses</LibraryDependencies>
+      <LibraryDependencies>dbgFramework;dbgNetwork;pthread;ssl;ncurses</LibraryDependencies>
       <AdditionalOptions>-Wl,-rpath,../lib %(AdditionalOptions)</AdditionalOptions>
       <OutputFile>$(RemoteProjectDir)/$(TargetName)$(TargetExt)</OutputFile>
     </Link>
@@ -374,7 +378,9 @@
       <AdditionalOptions>-Wl,-rpath,../lib %(AdditionalOptions)</AdditionalOptions>
     </Link>
     <ClCompile>
-      <CppLanguageStandard>c++17</CppLanguageStandard>
+      <CppLanguageStandard>c++23</CppLanguageStandard>
+      <ObjectFileName>%(filename).o</ObjectFileName>
+      <AdditionalIncludeDirectories>../../../Framework/release;../../../Network/release/Network</AdditionalIncludeDirectories>
     </ClCompile>
   </ItemDefinitionGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

+ 5 - 3
FactoryCraft/FactoryCraft.vcxproj.filters

@@ -516,6 +516,10 @@
     <ClInclude Include="UIMLBuilder.h">
       <Filter>UI\Builder</Filter>
     </ClInclude>
+    <ClInclude Include="Orientation.h" />
+    <ClInclude Include="SpecificItemDrop.h">
+      <Filter>drops\implementations</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="Server.cpp">
@@ -818,9 +822,6 @@
     <ClCompile Include="ItemTypeNameFactory.cpp">
       <Filter>server\config</Filter>
     </ClCompile>
-    <ClCompile Include="SpecificItemDrop.h">
-      <Filter>drops\implementations</Filter>
-    </ClCompile>
     <ClCompile Include="DropChanceCondition.cpp">
       <Filter>drops\conditions</Filter>
     </ClCompile>
@@ -893,5 +894,6 @@
     <ClCompile Include="PlantConfig.cpp">
       <Filter>world\generator\biom\plants</Filter>
     </ClCompile>
+    <ClCompile Include="Orientation.cpp" />
   </ItemGroup>
 </Project>

+ 4 - 13
FactoryCraft/FluidBlock.cpp

@@ -12,8 +12,8 @@ FluidBlock::FluidBlock(int typeId,
     int dimensionId,
     Framework::Vec3<float> lightWeights)
     : Block(typeId, pos, dimensionId, 0),
-      lightWeights(lightWeights),
       nextFlow(0),
+      lightWeights(lightWeights),
       maxFlowDistance(8)
 {
     transparent = 1;
@@ -66,8 +66,8 @@ void FluidBlock::doFlow()
     bool doesFlowSidewards = 1;
     Framework::Either<Block*, int> below = Game::INSTANCE->zBlockAt(
         getPos() + getDirection(Direction::BOTTOM), getDimensionId(), 0);
-    if (((below.isA() && below.getA()->zBlockType() == zBlockType()
-             || below.getB() == BlockTypeEnum::AIR)
+    if ((((below.isA() && below.getA()->zBlockType() == zBlockType())
+             || (below.getB() == BlockTypeEnum::AIR))
             && distanceToSource)
         || distanceToSource >= maxFlowDistance)
     {
@@ -75,7 +75,6 @@ void FluidBlock::doFlow()
     }
     bool changed = false;
     int minNeighborDistance = maxFlowDistance;
-    char nextFlowOptions = 0;
     for (int i = 0; i < 6; i++)
     {
         Direction dir = getDirectionFromIndex(i);
@@ -85,10 +84,7 @@ void FluidBlock::doFlow()
         {
             if (neighbor.isA() && neighbor.getA()->zBlockType() == zBlockType())
             {
-                FluidBlock* neighbour
-                    = dynamic_cast<FluidBlock*>(neighbor.getA());
                 minNeighborDistance = 0;
-                nextFlowOptions = (char)getOppositeDirection(dir);
             }
             continue;
         }
@@ -138,11 +134,6 @@ void FluidBlock::doFlow()
                 if (neighbour->distanceToSource < minNeighborDistance)
                 {
                     minNeighborDistance = neighbour->distanceToSource;
-                    nextFlowOptions = (char)getOppositeDirection(dir);
-                }
-                else if (neighbour->distanceToSource == minNeighborDistance)
-                {
-                    nextFlowOptions = (char)getOppositeDirection(dir);
                 }
             }
         }
@@ -151,7 +142,7 @@ void FluidBlock::doFlow()
     {
         if (minNeighborDistance + 1 > distanceToSource)
         {
-            distanceToSource = minNeighborDistance + 1;
+            distanceToSource = (char)(minNeighborDistance + 1);
             flowOptions = 0; // reavaluated next tick
             changed = true;
         }

+ 2 - 3
FactoryCraft/FluidContainer.cpp

@@ -67,7 +67,6 @@ void FluidContainerItem::onPlaced()
 
 UIMLTooltipBuilder* FluidContainerItem::getTooltipUIML() const
 {
-    UIMLTooltipBuilder* builder = UIMLBuilder::createTooltip();
     Framework::Text content;
     content.append() << getName();
     if (fluidTypeId != 0)
@@ -113,10 +112,10 @@ bool FluidContainerItem::applyFoodEffects(Entity* zTarget)
             setAmount(getAmount() - drinkable);
             zTarget->setThirst(
                 zTarget->getThirst()
-                + drinkable * fluidType->getThirstRecoveryPerL());
+                + (float)drinkable * fluidType->getThirstRecoveryPerL());
             zTarget->setHunger(
                 zTarget->getHunger()
-                + drinkable * fluidType->getHungerRecoveryPerL());
+                + (float)drinkable * fluidType->getHungerRecoveryPerL());
             return true;
         }
     }

+ 2 - 1
FactoryCraft/GeneratorRule.cpp

@@ -44,7 +44,8 @@ void GeneratorRule::initialize(JExpressionMemory* zMemory)
 
 bool GeneratorRule::checkCondition(int x, int y, int z)
 {
-    if ((topLayerF && z > *topLayerF) || (botomLayerF && z < *botomLayerF))
+    if ((topLayerF && (float)z > *topLayerF)
+        || (botomLayerF && (float)z < *botomLayerF))
     {
         return false;
     }

+ 2 - 1
FactoryCraft/ItemFilter.h

@@ -3,7 +3,8 @@
 #include <Array.h>
 #include <functional>
 #include <ReferenceCounter.h>
-#include <TypeRegistry.h>
+
+#include "TypeRegistry.h"
 
 class Item;
 class ItemType;

+ 1 - 1
FactoryCraft/ItemModifier.cpp

@@ -127,7 +127,7 @@ AttributeItemModifier* AttributeItemModifierFactory::fromJson(
     AttributeItemModifier* result = new AttributeItemModifier();
     auto attribute = zJson->getFields();
     auto value = zJson->getValues();
-    while (attribute, value)
+    while (attribute && value)
     {
         if (!attribute.val().isEqual("type"))
         {

+ 12 - 12
FactoryCraft/ItemSlot.cpp

@@ -6,13 +6,13 @@ ItemSlot::ItemSlot(Framework::Text name,
     int maxSize,
     int pullPriority,
     int pushPriority,
-    int allowedPullSide,
-    int allowedPushSides,
+    Directions allowedPullSides,
+    Directions allowedPushSides,
     bool allowHigherStackSize)
     : ReferenceCounter(),
       items(0),
       maxSize(maxSize),
-      allowedPullSide(allowedPullSide),
+      allowedPullSides(allowedPullSides),
       allowedPushSides(allowedPushSides),
       pullPriority(pullPriority),
       pushPriority(pushPriority),
@@ -34,7 +34,7 @@ void ItemSlot::setId(int id)
 ItemStack* ItemSlot::takeItemsOut(int count, Direction dir)
 {
     if (!items) return 0;
-    if ((dir | allowedPullSide) == allowedPullSide)
+    if ((dir | allowedPullSides) == allowedPullSides)
     {
         ItemStack* result = items->split(count);
         if (items->getSize() == 0)
@@ -199,8 +199,8 @@ ItemSlot* ItemSlotFactory::fromJson(Framework::JSON::JSONObject* zJson) const
         = (int)zJson->zValue("pullPriority")->asNumber()->getNumber();
     int pushPriority
         = (int)zJson->zValue("pushPriority")->asNumber()->getNumber();
-    int allowedPullSides = 0;
-    int allowedPushSides = 0;
+    Directions allowedPullSides = 0;
+    Directions allowedPushSides = 0;
     for (Framework::JSON::JSONValue* side :
         *zJson->zValue("allowedPullSides")->asArray())
     {
@@ -284,17 +284,17 @@ Framework::JSON::JSONObject* ItemSlotFactory::toJsonObject(
         new Framework::JSON::JSONNumber((double)zObject->getPushPriority()));
     Framework::JSON::JSONArray* allowedPullSides
         = new Framework::JSON::JSONArray();
-    if (zObject->allowedPullSide & TOP)
+    if (zObject->allowedPullSides & TOP)
         allowedPullSides->addValue(new Framework::JSON::JSONString("TOP"));
-    if (zObject->allowedPullSide & BOTTOM)
+    if (zObject->allowedPullSides & BOTTOM)
         allowedPullSides->addValue(new Framework::JSON::JSONString("BOTTOM"));
-    if (zObject->allowedPullSide & NORTH)
+    if (zObject->allowedPullSides & NORTH)
         allowedPullSides->addValue(new Framework::JSON::JSONString("NORTH"));
-    if (zObject->allowedPullSide & EAST)
+    if (zObject->allowedPullSides & EAST)
         allowedPullSides->addValue(new Framework::JSON::JSONString("EAST"));
-    if (zObject->allowedPullSide & SOUTH)
+    if (zObject->allowedPullSides & SOUTH)
         allowedPullSides->addValue(new Framework::JSON::JSONString("SOUTH"));
-    if (zObject->allowedPullSide & WEST)
+    if (zObject->allowedPullSides & WEST)
         allowedPullSides->addValue(new Framework::JSON::JSONString("WEST"));
     result->addValue("allowedPullSides", allowedPullSides);
     Framework::JSON::JSONArray* allowedPushSides

+ 3 - 3
FactoryCraft/ItemSlot.h

@@ -23,7 +23,7 @@ class ItemSlot : public virtual Framework::ReferenceCounter,
 private:
     ItemStack* items;
     int maxSize;
-    Directions allowedPullSide;
+    Directions allowedPullSides;
     Directions allowedPushSides;
     int pullPriority;
     int pushPriority;
@@ -38,8 +38,8 @@ public:
         int maxSize,
         int pullPriority,
         int pushPriority,
-        int allowedPullSides,
-        int allowedPushSides,
+        Directions allowedPullSides,
+        Directions allowedPushSides,
         bool allowHigherStackSize);
     ~ItemSlot();
 

+ 3 - 3
FactoryCraft/ModelInfo.cpp

@@ -63,9 +63,9 @@ void ModelInfo::setModelPath(Framework::Text path)
             boundingBox.y = abs(tmp.y);
             boundingBox.z = abs(tmp.z);
             tmp = data->getMinPos();
-            boundingBox.x = max(boundingBox.x, abs(tmp.x));
-            boundingBox.y = max(boundingBox.y, abs(tmp.y));
-            boundingBox.z = max(boundingBox.z, abs(tmp.z));
+            boundingBox.x = MAX(boundingBox.x, abs(tmp.x));
+            boundingBox.y = MAX(boundingBox.y, abs(tmp.y));
+            boundingBox.z = MAX(boundingBox.z, abs(tmp.z));
             data->release();
             loades = 1;
         }

+ 4 - 3
FactoryCraft/NoiseInterpolator.h

@@ -1,9 +1,10 @@
 #pragma once
 
-#include "Cache.h"
+#include <Cache.h>
+#include <Point.h>
+#include <RCPointer.h>
+
 #include "Noise.h"
-#include "Point.h"
-#include "RCPointer.h"
 
 class NoiseInterpolator : public Noise
 {

+ 3 - 4
FactoryCraft/PlaceableProof.cpp

@@ -9,7 +9,7 @@ PlaceableProof::PlaceableProof()
 {}
 
 PlaceableProofAnd::PlaceableProofAnd()
-    : proofs(proofs)
+    : PlaceableProof()
 {}
 
 bool PlaceableProofAnd::isPlacable(
@@ -80,7 +80,7 @@ const char* PlaceableProofAndFactory::getTypeToken() const
 }
 
 PlaceableProofOr::PlaceableProofOr()
-    : proofs(proofs)
+    : PlaceableProof()
 {}
 
 bool PlaceableProofOr::isPlacable(
@@ -151,8 +151,7 @@ const char* PlaceableProofOrFactory::getTypeToken() const
 }
 
 PlaceableProofNot::PlaceableProofNot()
-    : PlaceableProof(),
-      proof(proof)
+    : PlaceableProof()
 {}
 
 PlaceableProofNot::~PlaceableProofNot()

+ 1 - 1
FactoryCraft/PlaceableProof.h

@@ -1,10 +1,10 @@
 #pragma once
 
 #include <Array.h>
-#include <TypeRegistry.h>
 #include <Vec3.h>
 
 #include "Area.h"
+#include "TypeRegistry.h"
 
 class Item;
 class BlockFilter;

+ 2 - 0
FactoryCraft/Start.cpp

@@ -40,7 +40,9 @@ static void onError(int i)
 {
     Sleep(10000);
     Logging::error() << "Creating dump";
+#ifdef WIN32
     createMinidump(0);
+#endif
     if (mserver)
     {
         Logging::error()

+ 4 - 6
FactoryCraft/TypeRegistry.h

@@ -84,7 +84,7 @@ protected:
  */
 template<typename T,
     typename S,
-    typename = std::enable_if<std::is_base_of<T, S>::value>>
+    typename = typename std::enable_if<std::is_base_of<T, S>::value>::type>
 class SubTypeFactory : public ObjectTypeFactory<S>
 {
 public:
@@ -268,9 +268,7 @@ public:
             this->validator->getThis());
     }
 
-    template<typename S,
-        typename = std::enable_if<std::is_base_of<T, S>::value>>
-    void addFactory(SubTypeFactory<T, S>* factory)
+    template<typename S> void addFactory(SubTypeFactory<T, S>* factory)
     {
         factories.add(new SubTypeFactoryRef<T>(
             [factory]() { return factory->getTypeToken(); },
@@ -352,7 +350,7 @@ public:
 
     template<typename T,
         typename S,
-        typename = std::enable_if<std::is_base_of<T, S>::value>>
+        typename = typename std::enable_if<std::is_base_of<T, S>::value>::type>
     void registerSubType(SubTypeFactory<T, S>* factory)
     {
         Framework::Text typeId = typeid(T).name();
@@ -377,7 +375,7 @@ public:
             throw Framework::Text("Type not registered as Polymorphic type: ")
                 + typeId;
         }
-        polymorphFactory->addFactory<S>(factory);
+        polymorphFactory->template addFactory<S>(factory);
         Framework::Text typeIdS = typeid(S).name();
         parsableTypeNames.add(new Framework::Text(typeIdS));
         registerType(factory);

+ 1 - 0
FactoryCraft/UIMLBuilder.h

@@ -1173,6 +1173,7 @@ public:
     UIMLQuestGraphBuilder* addQuestNode(UIMLQuestNodeBuilder* questNode)
     {
         result->addChild(questNode->build());
+        return this;
     }
 };
 

+ 2 - 2
Windows Version/Windows Version.vcxproj

@@ -115,7 +115,7 @@
       <SDLCheck>true</SDLCheck>
       <PreprocessorDefinitions>_DEBUG;_CONSOLE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ConformanceMode>true</ConformanceMode>
-      <LanguageStandard>stdcpplatest</LanguageStandard>
+      <LanguageStandard>stdcpp23</LanguageStandard>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
     </ClCompile>
     <Link>
@@ -140,7 +140,7 @@ copy ..\..\..\..\..\Allgemein\Framework\x64\debug\Framework.dll Framework.dll</C
       <SDLCheck>true</SDLCheck>
       <PreprocessorDefinitions>NDEBUG;_CONSOLE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ConformanceMode>true</ConformanceMode>
-      <LanguageStandard>stdcpp20</LanguageStandard>
+      <LanguageStandard>stdcpp23</LanguageStandard>
       <WholeProgramOptimization>true</WholeProgramOptimization>
     </ClCompile>
     <Link>