diff --git a/source/EngineGpuKernels/ReconnectorProcessor.cuh b/source/EngineGpuKernels/ReconnectorProcessor.cuh index d79d74c29..d8505fb44 100644 --- a/source/EngineGpuKernels/ReconnectorProcessor.cuh +++ b/source/EngineGpuKernels/ReconnectorProcessor.cuh @@ -70,10 +70,10 @@ __inline__ __device__ void ReconnectorProcessor::tryCreateConnection(SimulationD && (otherCell->mutationId == cell->mutationId || otherCell->mutationId == 0 || otherCell->mutationId == 1)) { return; } - if (reconnector.restrictToMutants == ReconnectorRestrictToMutants_RestrictToZeroMutants && otherCell->mutationId != 0) { + if (reconnector.restrictToMutants == ReconnectorRestrictToMutants_RestrictToHandcraftedCells && otherCell->mutationId != 0) { return; } - if (reconnector.restrictToMutants == ReconnectorRestrictToMutants_RestrictToRespawnedMutants && otherCell->mutationId != 1) { + if (reconnector.restrictToMutants == ReconnectorRestrictToMutants_RestrictToFreeCells && otherCell->mutationId != 1) { return; } if (reconnector.restrictToMutants == ReconnectorRestrictToMutants_RestrictToLessComplexMutants diff --git a/source/EngineGpuKernels/SensorProcessor.cuh b/source/EngineGpuKernels/SensorProcessor.cuh index 69e58baa1..732780bf4 100644 --- a/source/EngineGpuKernels/SensorProcessor.cuh +++ b/source/EngineGpuKernels/SensorProcessor.cuh @@ -98,10 +98,10 @@ __inline__ __device__ uint32_t SensorProcessor::getCellDensity( if (restrictToMutants == SensorRestrictToMutants_RestrictToOtherMutants) { result = densityMap.getOtherMutantDensity(timestep, scanPos, cell->mutationId); } - if (restrictToMutants == SensorRestrictToMutants_RestrictToEmergentCells) { + if (restrictToMutants == SensorRestrictToMutants_RestrictToFreeCells) { result = densityMap.getEmergentCellDensity(scanPos); } - if (restrictToMutants == SensorRestrictToMutants_RestrictToZeroMutants) { + if (restrictToMutants == SensorRestrictToMutants_RestrictToHandcraftedCells) { result = densityMap.getZeroMutantDensity(scanPos); } if (restrictToMutants == SensorRestrictToMutants_RestrictToLessComplexMutants) { @@ -161,7 +161,7 @@ SensorProcessor::searchNeighborhood(SimulationData& data, SimulationStatistics& uint32_t density = 0; if (!blockedByWall[angleIndex]) { - if (restrictToMutants == SensorRestrictToMutants_NoRestriction || restrictToMutants == SensorRestrictToMutants_RestrictToZeroMutants + if (restrictToMutants == SensorRestrictToMutants_NoRestriction || restrictToMutants == SensorRestrictToMutants_RestrictToHandcraftedCells || densityMap.getZeroMutantDensity(scanPos) == 0) { density = getCellDensity(data.timestep, cell, restrictToColor, restrictToMutants, densityMap, scanPos); } else { @@ -323,10 +323,10 @@ __inline__ __device__ void SensorProcessor::flagDetectedCells(SimulationData& da || static_cast(cell->mutationId & 0xffff) == otherCell->ancestorMutationId)) { continue; } - if (restrictToMutants == SensorRestrictToMutants_RestrictToEmergentCells && otherCell->mutationId != 1) { + if (restrictToMutants == SensorRestrictToMutants_RestrictToFreeCells && otherCell->mutationId != 1) { continue; } - if (restrictToMutants == SensorRestrictToMutants_RestrictToZeroMutants && otherCell->mutationId != 0) { + if (restrictToMutants == SensorRestrictToMutants_RestrictToHandcraftedCells && otherCell->mutationId != 0) { continue; } if (restrictToMutants == SensorRestrictToMutants_RestrictToLessComplexMutants diff --git a/source/EngineInterface/CellFunctionConstants.h b/source/EngineInterface/CellFunctionConstants.h index 573726e2d..d2269b91d 100644 --- a/source/EngineInterface/CellFunctionConstants.h +++ b/source/EngineInterface/CellFunctionConstants.h @@ -59,8 +59,8 @@ enum SensorRestrictToMutants_ SensorRestrictToMutants_NoRestriction, SensorRestrictToMutants_RestrictToSameMutants, SensorRestrictToMutants_RestrictToOtherMutants, - SensorRestrictToMutants_RestrictToEmergentCells, - SensorRestrictToMutants_RestrictToZeroMutants, + SensorRestrictToMutants_RestrictToFreeCells, + SensorRestrictToMutants_RestrictToHandcraftedCells, SensorRestrictToMutants_RestrictToLessComplexMutants, SensorRestrictToMutants_RestrictToMoreComplexMutants, SensorRestrictToMutants_Count @@ -149,8 +149,8 @@ enum ReconnectorRestrictToMutants_ ReconnectorRestrictToMutants_NoRestriction, ReconnectorRestrictToMutants_RestrictToSameMutants, ReconnectorRestrictToMutants_RestrictToOtherMutants, - ReconnectorRestrictToMutants_RestrictToRespawnedMutants, - ReconnectorRestrictToMutants_RestrictToZeroMutants, + ReconnectorRestrictToMutants_RestrictToFreeCells, + ReconnectorRestrictToMutants_RestrictToHandcraftedCells, ReconnectorRestrictToMutants_RestrictToLessComplexMutants, ReconnectorRestrictToMutants_RestrictToMoreComplexMutants, ReconnectorRestrictToMutants_Count diff --git a/source/EngineInterface/SerializerService.cpp b/source/EngineInterface/SerializerService.cpp index 78ff0a517..6a5cd42ff 100644 --- a/source/EngineInterface/SerializerService.cpp +++ b/source/EngineInterface/SerializerService.cpp @@ -353,7 +353,7 @@ namespace cereal } if (auxiliaries.contains(Id_SensorGenome_RestrictToOtherMutants_Deprecated)) { auto restrictToOtherMutants = std::get(auxiliaries.at(Id_SensorGenome_RestrictToOtherMutants_Deprecated)); - data.restrictToMutants = restrictToOtherMutants ? SensorRestrictToMutants_RestrictToEmergentCells : SensorRestrictToMutants_NoRestriction; + data.restrictToMutants = restrictToOtherMutants ? SensorRestrictToMutants_RestrictToFreeCells : SensorRestrictToMutants_NoRestriction; } } //<<< @@ -666,7 +666,7 @@ namespace cereal } if (auxiliaries.contains(Id_Sensor_RestrictToOtherMutants_Deprecated)) { auto restrictToOtherMutants = std::get(auxiliaries.at(Id_Sensor_RestrictToOtherMutants_Deprecated)); - data.restrictToMutants = restrictToOtherMutants ? SensorRestrictToMutants_RestrictToEmergentCells : SensorRestrictToMutants_NoRestriction; + data.restrictToMutants = restrictToOtherMutants ? SensorRestrictToMutants_RestrictToFreeCells : SensorRestrictToMutants_NoRestriction; } } //<<< diff --git a/source/EngineTests/ConstructorTests.cpp b/source/EngineTests/ConstructorTests.cpp index 7ed4fb272..163f6e0ab 100644 --- a/source/EngineTests/ConstructorTests.cpp +++ b/source/EngineTests/ConstructorTests.cpp @@ -1016,7 +1016,7 @@ TEST_F(ConstructorTests, constructMuscleCell) TEST_F(ConstructorTests, constructSensorCell) { - auto sensorDesc = SensorGenomeDescription().setFixedAngle(90.0f).setColor(2).setMinDensity(0.5f).setRestrictToMutants(SensorRestrictToMutants_RestrictToEmergentCells); + auto sensorDesc = SensorGenomeDescription().setFixedAngle(90.0f).setColor(2).setMinDensity(0.5f).setRestrictToMutants(SensorRestrictToMutants_RestrictToFreeCells); auto genome = GenomeDescriptionService::convertDescriptionToBytes(GenomeDescription().setCells({CellGenomeDescription().setCellFunction(sensorDesc)})); DataDescription data; diff --git a/source/EngineTests/ReconnectorTests.cpp b/source/EngineTests/ReconnectorTests.cpp index 6d5e74098..4fe50f0fc 100644 --- a/source/EngineTests/ReconnectorTests.cpp +++ b/source/EngineTests/ReconnectorTests.cpp @@ -412,7 +412,7 @@ TEST_F(ReconnectorTests, establishConnection_restrictToZeroMutants_success) .setMaxConnections(2) .setExecutionOrderNumber(0) .setInputExecutionOrderNumber(5) - .setCellFunction(ReconnectorDescription().setRestrictToMutants(ReconnectorRestrictToMutants_RestrictToZeroMutants)), + .setCellFunction(ReconnectorDescription().setRestrictToMutants(ReconnectorRestrictToMutants_RestrictToHandcraftedCells)), CellDescription() .setId(2) .setPos({11.0f, 10.0f}) @@ -451,7 +451,7 @@ TEST_F(ReconnectorTests, establishConnection_restrictToZeroMutants_failed) .setMaxConnections(2) .setExecutionOrderNumber(0) .setInputExecutionOrderNumber(5) - .setCellFunction(ReconnectorDescription().setRestrictToMutants(ReconnectorRestrictToMutants_RestrictToZeroMutants)), + .setCellFunction(ReconnectorDescription().setRestrictToMutants(ReconnectorRestrictToMutants_RestrictToHandcraftedCells)), CellDescription() .setId(2) .setPos({11.0f, 10.0f}) @@ -488,7 +488,7 @@ TEST_F(ReconnectorTests, establishConnection_restrictToRespawned_success) .setMaxConnections(2) .setExecutionOrderNumber(0) .setInputExecutionOrderNumber(5) - .setCellFunction(ReconnectorDescription().setRestrictToMutants(ReconnectorRestrictToMutants_RestrictToRespawnedMutants)), + .setCellFunction(ReconnectorDescription().setRestrictToMutants(ReconnectorRestrictToMutants_RestrictToFreeCells)), CellDescription() .setId(2) .setPos({11.0f, 10.0f}) @@ -527,7 +527,7 @@ TEST_F(ReconnectorTests, establishConnection_restrictToRespawned_failed) .setMaxConnections(2) .setExecutionOrderNumber(0) .setInputExecutionOrderNumber(5) - .setCellFunction(ReconnectorDescription().setRestrictToMutants(ReconnectorRestrictToMutants_RestrictToRespawnedMutants)), + .setCellFunction(ReconnectorDescription().setRestrictToMutants(ReconnectorRestrictToMutants_RestrictToFreeCells)), CellDescription() .setId(2) .setPos({11.0f, 10.0f}) diff --git a/source/EngineTests/SensorTests.cpp b/source/EngineTests/SensorTests.cpp index 75a3a57f1..ff57c8e09 100644 --- a/source/EngineTests/SensorTests.cpp +++ b/source/EngineTests/SensorTests.cpp @@ -654,7 +654,7 @@ TEST_F(SensorTests, scanNeighborhood_targetedCreature_zeroMutant_found) .setMaxConnections(2) .setExecutionOrderNumber(0) .setInputExecutionOrderNumber(5) - .setCellFunction(SensorDescription().setRestrictToMutants(SensorRestrictToMutants_RestrictToZeroMutants)), + .setCellFunction(SensorDescription().setRestrictToMutants(SensorRestrictToMutants_RestrictToHandcraftedCells)), CellDescription() .setId(2) .setMutationId(6) @@ -690,7 +690,7 @@ TEST_F(SensorTests, scanNeighborhood_targetedCreature_zeroMutant_notFound) .setMaxConnections(2) .setExecutionOrderNumber(0) .setInputExecutionOrderNumber(5) - .setCellFunction(SensorDescription().setRestrictToMutants(SensorRestrictToMutants_RestrictToZeroMutants)), + .setCellFunction(SensorDescription().setRestrictToMutants(SensorRestrictToMutants_RestrictToHandcraftedCells)), CellDescription() .setId(2) .setMutationId(6) @@ -726,7 +726,7 @@ TEST_F(SensorTests, scanNeighborhood_targetedCreature_respawnedMutant_found) .setMaxConnections(2) .setExecutionOrderNumber(0) .setInputExecutionOrderNumber(5) - .setCellFunction(SensorDescription().setRestrictToMutants(SensorRestrictToMutants_RestrictToEmergentCells)), + .setCellFunction(SensorDescription().setRestrictToMutants(SensorRestrictToMutants_RestrictToFreeCells)), CellDescription() .setId(2) .setMutationId(6) @@ -762,7 +762,7 @@ TEST_F(SensorTests, scanNeighborhood_targetedCreature_respawnedMutant_notFound) .setMaxConnections(2) .setExecutionOrderNumber(0) .setInputExecutionOrderNumber(5) - .setCellFunction(SensorDescription().setRestrictToMutants(SensorRestrictToMutants_RestrictToEmergentCells)), + .setCellFunction(SensorDescription().setRestrictToMutants(SensorRestrictToMutants_RestrictToFreeCells)), CellDescription() .setId(2) .setMutationId(6) diff --git a/source/Gui/GenomeEditorWindow.cpp b/source/Gui/GenomeEditorWindow.cpp index 4c8ecd62b..a88c7e7f4 100644 --- a/source/Gui/GenomeEditorWindow.cpp +++ b/source/Gui/GenomeEditorWindow.cpp @@ -644,7 +644,7 @@ void _GenomeEditorWindow::processNode( AlienImGui::Combo( AlienImGui::ComboParameters() .name("Scan mutants") - .values({"None", "Same mutants", "Other mutants", "Free cells", "Handcrafted constructs", "Less complex mutants", "More complex mutants"}) + .values({"None", "Same mutants", "Other mutants", "Free cells", "Handcrafted cells", "Less complex mutants", "More complex mutants"}) .textWidth(ContentTextWidth) .tooltip(Const::SensorRestrictToMutantsTooltip), sensor.restrictToMutants); @@ -749,7 +749,7 @@ void _GenomeEditorWindow::processNode( AlienImGui::Combo( AlienImGui::ComboParameters() .name("Restrict to mutants") - .values({"None", "Same mutants", "Other mutants", "Free cells", "Handcrafted constructs", "Less complex mutants", "More complex mutants"}) + .values({"None", "Same mutants", "Other mutants", "Free cells", "Handcrafted cells", "Less complex mutants", "More complex mutants"}) .textWidth(ContentTextWidth) .tooltip(Const::ReconnectorRestrictToMutantsTooltip), reconnector.restrictToMutants); diff --git a/source/Gui/InspectorWindow.cpp b/source/Gui/InspectorWindow.cpp index 5a077f9d6..3fc6ad7be 100644 --- a/source/Gui/InspectorWindow.cpp +++ b/source/Gui/InspectorWindow.cpp @@ -684,7 +684,7 @@ void _InspectorWindow::processSensorContent(SensorDescription& sensor) AlienImGui::Combo( AlienImGui::ComboParameters() .name("Scan mutants") - .values({"None", "Same mutants", "Other mutants", "Free cells", "Handcrafted constructs", "Less complex mutants", "More complex mutants"}) + .values({"None", "Same mutants", "Other mutants", "Free cells", "Handcrafted cells", "Less complex mutants", "More complex mutants"}) .textWidth(CellFunctionTextWidth) .tooltip(Const::SensorRestrictToMutantsTooltip), sensor.restrictToMutants); @@ -713,7 +713,7 @@ void _InspectorWindow::processReconnectorContent(ReconnectorDescription& reconne AlienImGui::Combo( AlienImGui::ComboParameters() .name("Restrict to mutants") - .values({"None", "Same mutants", "Other mutants", "Free cells", "Handcrafted constructs", "Less complex mutants", "More complex mutants"}) + .values({"None", "Same mutants", "Other mutants", "Free cells", "Handcrafted cells", "Less complex mutants", "More complex mutants"}) .textWidth(CellFunctionTextWidth) .tooltip(Const::ReconnectorRestrictToMutantsTooltip), reconnector.restrictToMutants);