diff --git a/Content/Blueprint/Core/BP_3DtextHelp.uasset b/Content/Blueprint/Core/BP_3DtextHelp.uasset index fcceec93..30c61c95 100644 Binary files a/Content/Blueprint/Core/BP_3DtextHelp.uasset and b/Content/Blueprint/Core/BP_3DtextHelp.uasset differ diff --git a/Content/Blueprint/Core/BP_AllSenario.uasset b/Content/Blueprint/Core/BP_AllSenario.uasset index 67e20fd8..274f5fea 100644 Binary files a/Content/Blueprint/Core/BP_AllSenario.uasset and b/Content/Blueprint/Core/BP_AllSenario.uasset differ diff --git a/Content/Blueprint/Core/BP_NaviSplineCreator.uasset b/Content/Blueprint/Core/BP_NaviSplineCreator.uasset index 0450671d..3518e74e 100644 Binary files a/Content/Blueprint/Core/BP_NaviSplineCreator.uasset and b/Content/Blueprint/Core/BP_NaviSplineCreator.uasset differ diff --git a/Content/Blueprint/Core/BP_ToHoldItem.uasset b/Content/Blueprint/Core/BP_ToHoldItem.uasset index edddeb18..1d9db62a 100644 Binary files a/Content/Blueprint/Core/BP_ToHoldItem.uasset and b/Content/Blueprint/Core/BP_ToHoldItem.uasset differ diff --git a/Content/Blueprint/Core/BP_allObjectCreate.uasset b/Content/Blueprint/Core/BP_allObjectCreate.uasset index 90aac715..4a301c87 100644 Binary files a/Content/Blueprint/Core/BP_allObjectCreate.uasset and b/Content/Blueprint/Core/BP_allObjectCreate.uasset differ diff --git a/Content/Blueprint/Core/BP_randomizeChangeMaterialTexture.uasset b/Content/Blueprint/Core/BP_randomizeChangeMaterialTexture.uasset index 76d8cb90..c3c59da5 100644 Binary files a/Content/Blueprint/Core/BP_randomizeChangeMaterialTexture.uasset and b/Content/Blueprint/Core/BP_randomizeChangeMaterialTexture.uasset differ diff --git a/Content/Blueprint/DATA/Enums/EBathromm.uasset b/Content/Blueprint/DATA/Enums/EBathromm.uasset deleted file mode 100644 index 89436862..00000000 Binary files a/Content/Blueprint/DATA/Enums/EBathromm.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/EDecoration.uasset b/Content/Blueprint/DATA/Enums/EDecoration.uasset deleted file mode 100644 index d98c10b8..00000000 Binary files a/Content/Blueprint/DATA/Enums/EDecoration.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/EElectronics.uasset b/Content/Blueprint/DATA/Enums/EElectronics.uasset deleted file mode 100644 index ac5bfa0e..00000000 Binary files a/Content/Blueprint/DATA/Enums/EElectronics.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/EFurniture.uasset b/Content/Blueprint/DATA/Enums/EFurniture.uasset deleted file mode 100644 index 3871f216..00000000 Binary files a/Content/Blueprint/DATA/Enums/EFurniture.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/EGoalList.uasset b/Content/Blueprint/DATA/Enums/EGoalList.uasset deleted file mode 100644 index 09edffce..00000000 Binary files a/Content/Blueprint/DATA/Enums/EGoalList.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/EHoldHand.uasset b/Content/Blueprint/DATA/Enums/EHoldHand.uasset deleted file mode 100644 index 5431c8c8..00000000 Binary files a/Content/Blueprint/DATA/Enums/EHoldHand.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/EItemType.uasset b/Content/Blueprint/DATA/Enums/EItemType.uasset deleted file mode 100644 index 195cffd0..00000000 Binary files a/Content/Blueprint/DATA/Enums/EItemType.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/EKitchenWware.uasset b/Content/Blueprint/DATA/Enums/EKitchenWware.uasset deleted file mode 100644 index f18d546b..00000000 Binary files a/Content/Blueprint/DATA/Enums/EKitchenWware.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/ELevelType.uasset b/Content/Blueprint/DATA/Enums/ELevelType.uasset deleted file mode 100644 index 50762cc2..00000000 Binary files a/Content/Blueprint/DATA/Enums/ELevelType.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/EListGroupModels.uasset b/Content/Blueprint/DATA/Enums/EListGroupModels.uasset deleted file mode 100644 index c665f89f..00000000 Binary files a/Content/Blueprint/DATA/Enums/EListGroupModels.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/ERobotAccessoriesArms.uasset b/Content/Blueprint/DATA/Enums/ERobotAccessoriesArms.uasset deleted file mode 100644 index d211cede..00000000 Binary files a/Content/Blueprint/DATA/Enums/ERobotAccessoriesArms.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/ERobotAccessoriesHands.uasset b/Content/Blueprint/DATA/Enums/ERobotAccessoriesHands.uasset deleted file mode 100644 index 8231008b..00000000 Binary files a/Content/Blueprint/DATA/Enums/ERobotAccessoriesHands.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/ERobotAccessoriesHeads.uasset b/Content/Blueprint/DATA/Enums/ERobotAccessoriesHeads.uasset deleted file mode 100644 index 0c4c5a4d..00000000 Binary files a/Content/Blueprint/DATA/Enums/ERobotAccessoriesHeads.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/ERobotAccessoriesSensors.uasset b/Content/Blueprint/DATA/Enums/ERobotAccessoriesSensors.uasset deleted file mode 100644 index bc8b7e87..00000000 Binary files a/Content/Blueprint/DATA/Enums/ERobotAccessoriesSensors.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/ERobotOtherAccessories.uasset b/Content/Blueprint/DATA/Enums/ERobotOtherAccessories.uasset deleted file mode 100644 index 3ba795b0..00000000 Binary files a/Content/Blueprint/DATA/Enums/ERobotOtherAccessories.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/ERobotsMainCategories.uasset b/Content/Blueprint/DATA/Enums/ERobotsMainCategories.uasset deleted file mode 100644 index c7927319..00000000 Binary files a/Content/Blueprint/DATA/Enums/ERobotsMainCategories.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/Enums/ESenarioEnum.uasset b/Content/Blueprint/DATA/Enums/ESenarioEnum.uasset deleted file mode 100644 index 8a7751d5..00000000 Binary files a/Content/Blueprint/DATA/Enums/ESenarioEnum.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/datatables/DT_Bathroom.uasset b/Content/Blueprint/DATA/datatables/DT_Bathroom.uasset deleted file mode 100644 index ebcbf1b2..00000000 Binary files a/Content/Blueprint/DATA/datatables/DT_Bathroom.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/datatables/DT_Decoration.uasset b/Content/Blueprint/DATA/datatables/DT_Decoration.uasset deleted file mode 100644 index c9917789..00000000 Binary files a/Content/Blueprint/DATA/datatables/DT_Decoration.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/datatables/DT_Electronics.uasset b/Content/Blueprint/DATA/datatables/DT_Electronics.uasset deleted file mode 100644 index e7e9c2c3..00000000 Binary files a/Content/Blueprint/DATA/datatables/DT_Electronics.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/datatables/DT_Furniture.uasset b/Content/Blueprint/DATA/datatables/DT_Furniture.uasset deleted file mode 100644 index 7cf29637..00000000 Binary files a/Content/Blueprint/DATA/datatables/DT_Furniture.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/datatables/DT_Item.uasset b/Content/Blueprint/DATA/datatables/DT_Item.uasset deleted file mode 100644 index c9d74550..00000000 Binary files a/Content/Blueprint/DATA/datatables/DT_Item.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/datatables/DT_Kitchenware.uasset b/Content/Blueprint/DATA/datatables/DT_Kitchenware.uasset deleted file mode 100644 index 11977220..00000000 Binary files a/Content/Blueprint/DATA/datatables/DT_Kitchenware.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/structures/EJsonTypeStruct.uasset b/Content/Blueprint/DATA/structures/EJsonTypeStruct.uasset deleted file mode 100644 index 6c53e15d..00000000 Binary files a/Content/Blueprint/DATA/structures/EJsonTypeStruct.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/structures/FBathroomStruct.uasset b/Content/Blueprint/DATA/structures/FBathroomStruct.uasset deleted file mode 100644 index 8866aa65..00000000 Binary files a/Content/Blueprint/DATA/structures/FBathroomStruct.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/structures/FDecorationStruct.uasset b/Content/Blueprint/DATA/structures/FDecorationStruct.uasset deleted file mode 100644 index ee6936ab..00000000 Binary files a/Content/Blueprint/DATA/structures/FDecorationStruct.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/structures/FElectronicsStruct.uasset b/Content/Blueprint/DATA/structures/FElectronicsStruct.uasset deleted file mode 100644 index 589d2f04..00000000 Binary files a/Content/Blueprint/DATA/structures/FElectronicsStruct.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/structures/FFurnitureStruct.uasset b/Content/Blueprint/DATA/structures/FFurnitureStruct.uasset deleted file mode 100644 index b2202e84..00000000 Binary files a/Content/Blueprint/DATA/structures/FFurnitureStruct.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/structures/FItemStrucT.uasset b/Content/Blueprint/DATA/structures/FItemStrucT.uasset deleted file mode 100644 index d9d1730c..00000000 Binary files a/Content/Blueprint/DATA/structures/FItemStrucT.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/structures/FKitchenwareStruct.uasset b/Content/Blueprint/DATA/structures/FKitchenwareStruct.uasset deleted file mode 100644 index 64745e57..00000000 Binary files a/Content/Blueprint/DATA/structures/FKitchenwareStruct.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/structures/FLevelStruct.uasset b/Content/Blueprint/DATA/structures/FLevelStruct.uasset deleted file mode 100644 index eeefe1df..00000000 Binary files a/Content/Blueprint/DATA/structures/FLevelStruct.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/structures/FLuckyCodeStruct.uasset b/Content/Blueprint/DATA/structures/FLuckyCodeStruct.uasset deleted file mode 100644 index 6783053a..00000000 Binary files a/Content/Blueprint/DATA/structures/FLuckyCodeStruct.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/structures/FMainBPCharacterStruct.uasset b/Content/Blueprint/DATA/structures/FMainBPCharacterStruct.uasset deleted file mode 100644 index 583face6..00000000 Binary files a/Content/Blueprint/DATA/structures/FMainBPCharacterStruct.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/structures/FStretchRobotActuatorStruct.uasset b/Content/Blueprint/DATA/structures/FStretchRobotActuatorStruct.uasset deleted file mode 100644 index 1c6f03c8..00000000 Binary files a/Content/Blueprint/DATA/structures/FStretchRobotActuatorStruct.uasset and /dev/null differ diff --git a/Content/Blueprint/DATA/structures/FrandomMaterialTextureStruct.uasset b/Content/Blueprint/DATA/structures/FrandomMaterialTextureStruct.uasset deleted file mode 100644 index 2fff302f..00000000 Binary files a/Content/Blueprint/DATA/structures/FrandomMaterialTextureStruct.uasset and /dev/null differ diff --git a/Content/Blueprint/Game/BP_LuckyGameinstanceMode.uasset b/Content/Blueprint/Game/BP_LuckyGameinstanceMode.uasset index 10801565..f4b24268 100644 Binary files a/Content/Blueprint/Game/BP_LuckyGameinstanceMode.uasset and b/Content/Blueprint/Game/BP_LuckyGameinstanceMode.uasset differ diff --git a/Content/Blueprint/RobotPawnActors/BP_DroneRobot.uasset b/Content/Blueprint/RobotPawnActors/BP_DroneRobot.uasset index a4cb34ca..d4011b75 100644 Binary files a/Content/Blueprint/RobotPawnActors/BP_DroneRobot.uasset and b/Content/Blueprint/RobotPawnActors/BP_DroneRobot.uasset differ diff --git a/Content/Blueprint/RobotPawnActors/BP_MujocoBostonDynamicsSpotWithArm.uasset b/Content/Blueprint/RobotPawnActors/BP_MujocoBostonDynamicsSpotWithArm.uasset index 1ca505ec..d524acd4 100644 Binary files a/Content/Blueprint/RobotPawnActors/BP_MujocoBostonDynamicsSpotWithArm.uasset and b/Content/Blueprint/RobotPawnActors/BP_MujocoBostonDynamicsSpotWithArm.uasset differ diff --git a/Content/Blueprint/RobotPawnActors/BP_MujocoUnitreeGo2.uasset b/Content/Blueprint/RobotPawnActors/BP_MujocoUnitreeGo2.uasset index cda9e89f..aa865ffd 100644 Binary files a/Content/Blueprint/RobotPawnActors/BP_MujocoUnitreeGo2.uasset and b/Content/Blueprint/RobotPawnActors/BP_MujocoUnitreeGo2.uasset differ diff --git a/Content/Blueprint/RobotPawnActors/BP_PuralinkRobot.uasset b/Content/Blueprint/RobotPawnActors/BP_PuralinkRobot.uasset index 1eb65cac..0709a4cc 100644 Binary files a/Content/Blueprint/RobotPawnActors/BP_PuralinkRobot.uasset and b/Content/Blueprint/RobotPawnActors/BP_PuralinkRobot.uasset differ diff --git a/Content/Blueprint/RobotPawnActors/BP_RevoluteRobot.uasset b/Content/Blueprint/RobotPawnActors/BP_RevoluteRobot.uasset index 726ea24c..6a0bba4e 100644 Binary files a/Content/Blueprint/RobotPawnActors/BP_RevoluteRobot.uasset and b/Content/Blueprint/RobotPawnActors/BP_RevoluteRobot.uasset differ diff --git a/Content/Blueprint/RobotPawnActors/BP_WheeledRobot.uasset b/Content/Blueprint/RobotPawnActors/BP_WheeledRobot.uasset index 1ba57933..b86abc62 100644 Binary files a/Content/Blueprint/RobotPawnActors/BP_WheeledRobot.uasset and b/Content/Blueprint/RobotPawnActors/BP_WheeledRobot.uasset differ diff --git a/Content/Blueprint/RobotPawnActors/BP_mujokoArm.uasset b/Content/Blueprint/RobotPawnActors/BP_mujokoArm.uasset index d17ce0ca..59ff996a 100644 Binary files a/Content/Blueprint/RobotPawnActors/BP_mujokoArm.uasset and b/Content/Blueprint/RobotPawnActors/BP_mujokoArm.uasset differ diff --git a/Content/Blueprint/RobotPawnActors/BP_mujokoStretch.uasset b/Content/Blueprint/RobotPawnActors/BP_mujokoStretch.uasset index 1be9fd84..974b5260 100644 Binary files a/Content/Blueprint/RobotPawnActors/BP_mujokoStretch.uasset and b/Content/Blueprint/RobotPawnActors/BP_mujokoStretch.uasset differ diff --git a/Content/Blueprint/oldRobotsBP/BP_DJI_DroneMovementBluePrint.uasset b/Content/Blueprint/oldRobotsBP/BP_DJI_DroneMovementBluePrint.uasset index 2eeebe38..8589a4c5 100644 Binary files a/Content/Blueprint/oldRobotsBP/BP_DJI_DroneMovementBluePrint.uasset and b/Content/Blueprint/oldRobotsBP/BP_DJI_DroneMovementBluePrint.uasset differ diff --git a/Content/Blueprint/oldRobotsBP/BP_WheeledRobot_OneArm.uasset b/Content/Blueprint/oldRobotsBP/BP_WheeledRobot_OneArm.uasset index 5cb8bbbd..f8c70a5b 100644 Binary files a/Content/Blueprint/oldRobotsBP/BP_WheeledRobot_OneArm.uasset and b/Content/Blueprint/oldRobotsBP/BP_WheeledRobot_OneArm.uasset differ diff --git a/Content/Blueprint/vehicle/StretchRobot_vehicle_BP.uasset b/Content/Blueprint/vehicle/StretchRobot_vehicle_BP.uasset index 02c33629..096dfad7 100644 Binary files a/Content/Blueprint/vehicle/StretchRobot_vehicle_BP.uasset and b/Content/Blueprint/vehicle/StretchRobot_vehicle_BP.uasset differ diff --git a/Content/GameBP/BP_LuckyRobotsLibrary.uasset b/Content/GameBP/BP_LuckyRobotsLibrary.uasset index dfa01397..18090b26 100644 Binary files a/Content/GameBP/BP_LuckyRobotsLibrary.uasset and b/Content/GameBP/BP_LuckyRobotsLibrary.uasset differ diff --git a/Content/GameBP/Datatable/DT_HoldItem.uasset b/Content/GameBP/Datatable/DT_HoldItem.uasset new file mode 100644 index 00000000..1d3dddc6 Binary files /dev/null and b/Content/GameBP/Datatable/DT_HoldItem.uasset differ diff --git a/Content/Blueprint/DATA/datatables/DT_RichTextBlock.uasset b/Content/GameBP/Datatable/DT_RichTextBlock.uasset similarity index 95% rename from Content/Blueprint/DATA/datatables/DT_RichTextBlock.uasset rename to Content/GameBP/Datatable/DT_RichTextBlock.uasset index a9ec0ae3..6887bbff 100644 Binary files a/Content/Blueprint/DATA/datatables/DT_RichTextBlock.uasset and b/Content/GameBP/Datatable/DT_RichTextBlock.uasset differ diff --git a/Content/GameBP/Datatable/SelectableItemData/DT_Bathroom.uasset b/Content/GameBP/Datatable/SelectableItemData/DT_Bathroom.uasset new file mode 100644 index 00000000..af58614c Binary files /dev/null and b/Content/GameBP/Datatable/SelectableItemData/DT_Bathroom.uasset differ diff --git a/Content/GameBP/Datatable/SelectableItemData/DT_Decoration.uasset b/Content/GameBP/Datatable/SelectableItemData/DT_Decoration.uasset new file mode 100644 index 00000000..f033336f Binary files /dev/null and b/Content/GameBP/Datatable/SelectableItemData/DT_Decoration.uasset differ diff --git a/Content/GameBP/Datatable/SelectableItemData/DT_Electronics.uasset b/Content/GameBP/Datatable/SelectableItemData/DT_Electronics.uasset new file mode 100644 index 00000000..60bbf575 Binary files /dev/null and b/Content/GameBP/Datatable/SelectableItemData/DT_Electronics.uasset differ diff --git a/Content/GameBP/Datatable/SelectableItemData/DT_Furniture.uasset b/Content/GameBP/Datatable/SelectableItemData/DT_Furniture.uasset new file mode 100644 index 00000000..1e2571ae Binary files /dev/null and b/Content/GameBP/Datatable/SelectableItemData/DT_Furniture.uasset differ diff --git a/Content/GameBP/Datatable/SelectableItemData/DT_Kitchenware.uasset b/Content/GameBP/Datatable/SelectableItemData/DT_Kitchenware.uasset new file mode 100644 index 00000000..5f418910 Binary files /dev/null and b/Content/GameBP/Datatable/SelectableItemData/DT_Kitchenware.uasset differ diff --git a/Content/Map/SelectLevel.umap b/Content/Map/SelectLevel.umap index 01731c67..c18069df 100644 Binary files a/Content/Map/SelectLevel.umap and b/Content/Map/SelectLevel.umap differ diff --git a/Content/luckyBot/Luckywidget/ChildItems/WB_GrabAndPull.uasset b/Content/luckyBot/Luckywidget/ChildItems/WB_GrabAndPull.uasset index 7fa43192..6b527050 100644 Binary files a/Content/luckyBot/Luckywidget/ChildItems/WB_GrabAndPull.uasset and b/Content/luckyBot/Luckywidget/ChildItems/WB_GrabAndPull.uasset differ diff --git a/Content/luckyBot/Luckywidget/ChildItems/WB_NavigateSimpleEnvironments.uasset b/Content/luckyBot/Luckywidget/ChildItems/WB_NavigateSimpleEnvironments.uasset index f82b14b0..66dd25a2 100644 Binary files a/Content/luckyBot/Luckywidget/ChildItems/WB_NavigateSimpleEnvironments.uasset and b/Content/luckyBot/Luckywidget/ChildItems/WB_NavigateSimpleEnvironments.uasset differ diff --git a/Content/luckyBot/Luckywidget/ChildItems/WB_ObjectsListCheckbox.uasset b/Content/luckyBot/Luckywidget/ChildItems/WB_ObjectsListCheckbox.uasset index 7b374ad1..4a63f00e 100644 Binary files a/Content/luckyBot/Luckywidget/ChildItems/WB_ObjectsListCheckbox.uasset and b/Content/luckyBot/Luckywidget/ChildItems/WB_ObjectsListCheckbox.uasset differ diff --git a/Content/luckyBot/Luckywidget/ChildItems/WB_ObjectsListItem.uasset b/Content/luckyBot/Luckywidget/ChildItems/WB_ObjectsListItem.uasset index 80ab0621..7ca98155 100644 Binary files a/Content/luckyBot/Luckywidget/ChildItems/WB_ObjectsListItem.uasset and b/Content/luckyBot/Luckywidget/ChildItems/WB_ObjectsListItem.uasset differ diff --git a/Content/luckyBot/Luckywidget/ChildItems/WB_PickAndPlace.uasset b/Content/luckyBot/Luckywidget/ChildItems/WB_PickAndPlace.uasset index 6d2ac369..0ba4fb8d 100644 Binary files a/Content/luckyBot/Luckywidget/ChildItems/WB_PickAndPlace.uasset and b/Content/luckyBot/Luckywidget/ChildItems/WB_PickAndPlace.uasset differ diff --git a/Content/luckyBot/Luckywidget/ChildItems/WB_SimplePick.uasset b/Content/luckyBot/Luckywidget/ChildItems/WB_SimplePick.uasset index c8e71c58..7e1dadad 100644 Binary files a/Content/luckyBot/Luckywidget/ChildItems/WB_SimplePick.uasset and b/Content/luckyBot/Luckywidget/ChildItems/WB_SimplePick.uasset differ diff --git a/Content/luckyBot/Luckywidget/ChildItems/WB_SimplePlace.uasset b/Content/luckyBot/Luckywidget/ChildItems/WB_SimplePlace.uasset index 597ddbb6..cd9dfcd7 100644 Binary files a/Content/luckyBot/Luckywidget/ChildItems/WB_SimplePlace.uasset and b/Content/luckyBot/Luckywidget/ChildItems/WB_SimplePlace.uasset differ diff --git a/Content/luckyBot/Luckywidget/WB_GameWidget.uasset b/Content/luckyBot/Luckywidget/WB_GameWidget.uasset index 21c28c6b..1855d71a 100644 Binary files a/Content/luckyBot/Luckywidget/WB_GameWidget.uasset and b/Content/luckyBot/Luckywidget/WB_GameWidget.uasset differ diff --git a/Content/luckyBot/Luckywidget/menu/WB_AllObjects.uasset b/Content/luckyBot/Luckywidget/menu/WB_AllObjects.uasset index 231756e9..6a7ce086 100644 Binary files a/Content/luckyBot/Luckywidget/menu/WB_AllObjects.uasset and b/Content/luckyBot/Luckywidget/menu/WB_AllObjects.uasset differ diff --git a/Content/luckyBot/Luckywidget/menu/WB_AllRandom.uasset b/Content/luckyBot/Luckywidget/menu/WB_AllRandom.uasset index 5076e23b..6abeecdb 100644 Binary files a/Content/luckyBot/Luckywidget/menu/WB_AllRandom.uasset and b/Content/luckyBot/Luckywidget/menu/WB_AllRandom.uasset differ diff --git a/Content/luckyBot/Luckywidget/menu/WB_CaptureSettings.uasset b/Content/luckyBot/Luckywidget/menu/WB_CaptureSettings.uasset index e8b0d684..acc30d6c 100644 Binary files a/Content/luckyBot/Luckywidget/menu/WB_CaptureSettings.uasset and b/Content/luckyBot/Luckywidget/menu/WB_CaptureSettings.uasset differ diff --git a/Content/luckyBot/Luckywidget/menu/WB_ListViewTaskPeopleObject.uasset b/Content/luckyBot/Luckywidget/menu/WB_ListViewTaskPeopleObject.uasset index c818d9e0..ef005221 100644 Binary files a/Content/luckyBot/Luckywidget/menu/WB_ListViewTaskPeopleObject.uasset and b/Content/luckyBot/Luckywidget/menu/WB_ListViewTaskPeopleObject.uasset differ diff --git a/Content/luckyBot/Luckywidget/menu/WB_SelectGoalMenu.uasset b/Content/luckyBot/Luckywidget/menu/WB_SelectGoalMenu.uasset index ec3c1993..08b5a621 100644 Binary files a/Content/luckyBot/Luckywidget/menu/WB_SelectGoalMenu.uasset and b/Content/luckyBot/Luckywidget/menu/WB_SelectGoalMenu.uasset differ diff --git a/Source/Luckyrobots/Private/LuckyRobotsPlayerController.cpp b/Source/Luckyrobots/Private/Controllers/LuckyRobotsPlayerController.cpp similarity index 60% rename from Source/Luckyrobots/Private/LuckyRobotsPlayerController.cpp rename to Source/Luckyrobots/Private/Controllers/LuckyRobotsPlayerController.cpp index 0519d757..95d5976c 100644 --- a/Source/Luckyrobots/Private/LuckyRobotsPlayerController.cpp +++ b/Source/Luckyrobots/Private/Controllers/LuckyRobotsPlayerController.cpp @@ -1,5 +1,5 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "LuckyRobotsPlayerController.h" +#include "Controllers/LuckyRobotsPlayerController.h" diff --git a/Source/Luckyrobots/Private/LuckyRobotsGameInstance.cpp b/Source/Luckyrobots/Private/Core/LuckyRobotsGameInstance.cpp similarity index 50% rename from Source/Luckyrobots/Private/LuckyRobotsGameInstance.cpp rename to Source/Luckyrobots/Private/Core/LuckyRobotsGameInstance.cpp index 7eb55513..8f7719c5 100644 --- a/Source/Luckyrobots/Private/LuckyRobotsGameInstance.cpp +++ b/Source/Luckyrobots/Private/Core/LuckyRobotsGameInstance.cpp @@ -1,23 +1,22 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "LuckyRobotsGameInstance.h" -#include "LuckyRobotsGameState.h" +#include "Core/LuckyRobotsGameInstance.h" +#include "GameModes/LuckyRobotsGameState.h" #include "Kismet/GameplayStatics.h" -#include "GameUserWidget.h" +#include "UI/GameUserWidget.h" +#include "Kismet/KismetSystemLibrary.h" -void ULuckyRobotsGameInstance::DoSendMessage(FString SendValue) +void ULuckyRobotsGameInstance::DoSendMessage(const FString& SendValue) { - ALuckyRobotsGameState* LuckyRobotsGameState = Cast(UGameplayStatics::GetGameState(this)); - if (LuckyRobotsGameState) + if (ALuckyRobotsGameState* GameState = Cast(UGameplayStatics::GetGameState(this))) { - LuckyRobotsGameState->DoSendMessage(SendValue); + GameState->DoSendMessage(SendValue); } - - DoLogItemAdd("Receive", SendValue, ELogItemType::Debug); + DoLogItemAdd(TEXT("Receive"), SendValue, ELogItemType::Debug); } -void ULuckyRobotsGameInstance::DoLogItemAdd(FString Topic, FString MsgText, ELogItemType LogItemType) +void ULuckyRobotsGameInstance::DoLogItemAdd(const FString& Topic, const FString& MsgText, ELogItemType LogItemType) { if (GameUserWidget) { @@ -27,15 +26,16 @@ void ULuckyRobotsGameInstance::DoLogItemAdd(FString Topic, FString MsgText, ELog void ULuckyRobotsGameInstance::SwitchGamePaused() { - UGameplayStatics::SetGamePaused(this, !UGameplayStatics::IsGamePaused(this)); + bool bPaused = UGameplayStatics::IsGamePaused(this); + UGameplayStatics::SetGamePaused(this, !bPaused); - if (UGameplayStatics::IsGamePaused(this)) + if (!bPaused) { - UKismetSystemLibrary::ExecuteConsoleCommand(this, "r.SceneRendering 0"); + UKismetSystemLibrary::ExecuteConsoleCommand(this, TEXT("r.SceneRendering 0")); } else { - UKismetSystemLibrary::ExecuteConsoleCommand(this, "r.SceneRendering 1"); + UKismetSystemLibrary::ExecuteConsoleCommand(this, TEXT("r.SceneRendering 1")); } } @@ -44,18 +44,19 @@ void ULuckyRobotsGameInstance::ClearTaskList() TaskList.Empty(); } -void ULuckyRobotsGameInstance::AddTask(FGoalsTaskData TaskData) +void ULuckyRobotsGameInstance::AddTask(const FGoalsTaskData& TaskData) { TaskList.Add(TaskData); } -void ULuckyRobotsGameInstance::RemoveTask(FGoalsTaskData TaskData) + +void ULuckyRobotsGameInstance::RemoveTask(const FGoalsTaskData& TaskData) { TaskList.Remove(TaskData); } void ULuckyRobotsGameInstance::RemoveTaskByGoalType(EGoalType GoalType) { - for (auto Task : TaskList) + for (const FGoalsTaskData& Task : TaskList) { if (Task.GoalType == GoalType) { @@ -65,12 +66,12 @@ void ULuckyRobotsGameInstance::RemoveTaskByGoalType(EGoalType GoalType) } } -int ULuckyRobotsGameInstance::GetTaskNum() +int32 ULuckyRobotsGameInstance::GetTaskNum() const { return TaskList.Num(); } -void ULuckyRobotsGameInstance::SetTask(int Index, FGoalsTaskData TaskData) +void ULuckyRobotsGameInstance::SetTask(int32 Index, const FGoalsTaskData& TaskData) { if (TaskList.IsValidIndex(Index)) { @@ -78,7 +79,7 @@ void ULuckyRobotsGameInstance::SetTask(int Index, FGoalsTaskData TaskData) } else { - for (int i = TaskList.Num(); i < Index; i++) + while (TaskList.Num() < Index) { FGoalsTaskData TempTaskData; AddTask(TempTaskData); @@ -87,39 +88,37 @@ void ULuckyRobotsGameInstance::SetTask(int Index, FGoalsTaskData TaskData) } } -bool ULuckyRobotsGameInstance::GetTask(int Index, FGoalsTaskData& TaskData) +bool ULuckyRobotsGameInstance::GetTask(int32 Index, FGoalsTaskData& OutTaskData) const { if (TaskList.IsValidIndex(Index)) { - TaskData = TaskList[Index]; + OutTaskData = TaskList[Index]; return true; } - return false; } void ULuckyRobotsGameInstance::ReSetTaskList() { TArray TempTaskList; - for (auto Task : TaskList) + for (FGoalsTaskData& Task : TaskList) { Task.bIsStart = false; - Task.bIsStart = false; + Task.bIsComplete = false; Task.bActive = false; TempTaskList.Add(Task); } - TaskList = TempTaskList; } -TArray ULuckyRobotsGameInstance::GetTaskList() +TArray ULuckyRobotsGameInstance::GetTaskList() const { return TaskList; } -void ULuckyRobotsGameInstance::DoSetTempTaskValueChange(bool IsClear) +void ULuckyRobotsGameInstance::DoSetTempTaskValueChange(bool bIsClear) { - if (IsClear) + if (bIsClear) { ClearTaskList(); } @@ -134,133 +133,162 @@ void ULuckyRobotsGameInstance::DoSetTempTaskValueChange(bool IsClear) } } - -void ULuckyRobotsGameInstance::SetCurrentFolderName(FString FolderName) +void ULuckyRobotsGameInstance::SetCurrentFolderName(const FString& FolderName) { CurrentCaptureSettingsData.FolderName = FText::FromString(FolderName); } -void ULuckyRobotsGameInstance::SetCurrentFileName(FString FileName) + +void ULuckyRobotsGameInstance::SetCurrentFileName(const FString& FileName) { CurrentCaptureSettingsData.FileName = FText::FromString(FileName); } -void ULuckyRobotsGameInstance::SetCurrentWritesPerSec(int WritesPerSec) + +void ULuckyRobotsGameInstance::SetCurrentWritesPerSec(int32 WritesPerSec) { CurrentCaptureSettingsData.WritesPerSec = FText::FromString(FString::FromInt(WritesPerSec)); } + void ULuckyRobotsGameInstance::SetCurrentIsScenario(bool IsScenario) { CurrentCaptureSettingsData.IsScenario = IsScenario; } + void ULuckyRobotsGameInstance::SetCurrentIsRandomLight(bool bLight) { CurrentCaptureSettingsData.bLight = bLight; } + void ULuckyRobotsGameInstance::SetCurrentIsRandomMaterials(bool bMaterials) { CurrentCaptureSettingsData.bMaterials = bMaterials; } + void ULuckyRobotsGameInstance::SetCurrentIsRandomRobotPosition(bool bRobotPosition) { CurrentCaptureSettingsData.bRobotPosition = bRobotPosition; } + void ULuckyRobotsGameInstance::SetCurrentIsRandomPets(bool bPets) { CurrentCaptureSettingsData.bPets = bPets; } -void ULuckyRobotsGameInstance::SetCurrentPetsNumber(int PetsNumber) + +void ULuckyRobotsGameInstance::SetCurrentPetsNumber(int32 PetsNumber) { CurrentCaptureSettingsData.NumberOfPets = FText::FromString(FString::FromInt(PetsNumber)); } + void ULuckyRobotsGameInstance::SetCurrentIsRandomPeople(bool bPeople) { CurrentCaptureSettingsData.bPeople = bPeople; } -void ULuckyRobotsGameInstance::SetCurrentPeopleNumber(int PeopleNumber) + +void ULuckyRobotsGameInstance::SetCurrentPeopleNumber(int32 PeopleNumber) { CurrentCaptureSettingsData.NumberOfPeople = FText::FromString(FString::FromInt(PeopleNumber)); } + void ULuckyRobotsGameInstance::SetCurrentIsRandomObjects(bool bObjects) { CurrentCaptureSettingsData.bObjects = bObjects; } -void ULuckyRobotsGameInstance::SetCurrentObjectsNumber(int ObjectsNumber) + +void ULuckyRobotsGameInstance::SetCurrentObjectsNumber(int32 ObjectsNumber) { CurrentCaptureSettingsData.NumberOfObjects = FText::FromString(FString::FromInt(ObjectsNumber)); } -void ULuckyRobotsGameInstance::SetCurrentRandomMeshes(TArray> RandomMeshes) + +void ULuckyRobotsGameInstance::SetCurrentRandomMeshes(const TArray>& RandomMeshes) { CurrentCaptureSettingsData.RandomMeshes = RandomMeshes; } + void ULuckyRobotsGameInstance::SetCurrentIsInfiniteCapture(bool bInfiniteCapture) { CurrentCaptureSettingsData.bInfiniteCapture = bInfiniteCapture; } -void ULuckyRobotsGameInstance::SetCurrentCaptureNumber(int CaptureNumber) + +void ULuckyRobotsGameInstance::SetCurrentCaptureNumber(int32 CaptureNumber) { CurrentCaptureSettingsData.NumberOfCaptures = FText::FromString(FString::FromInt(CaptureNumber)); } -FString ULuckyRobotsGameInstance::GetCurrentFolderName() +FString ULuckyRobotsGameInstance::GetCurrentFolderName() const { return CurrentCaptureSettingsData.FolderName.ToString(); } -FString ULuckyRobotsGameInstance::GetCurrentFileName() + +FString ULuckyRobotsGameInstance::GetCurrentFileName() const { return CurrentCaptureSettingsData.FileName.ToString(); } -int ULuckyRobotsGameInstance::GetCurrentWritesPerSec() + +int32 ULuckyRobotsGameInstance::GetCurrentWritesPerSec() const { - return FCString::Atoi(*(CurrentCaptureSettingsData.WritesPerSec.ToString())); + return FCString::Atoi(*CurrentCaptureSettingsData.WritesPerSec.ToString()); } -bool ULuckyRobotsGameInstance::GetCurrentIsScenario() + +bool ULuckyRobotsGameInstance::GetCurrentIsScenario() const { return CurrentCaptureSettingsData.IsScenario; } -bool ULuckyRobotsGameInstance::GetCurrentIsRandomLight() + +bool ULuckyRobotsGameInstance::GetCurrentIsRandomLight() const { return CurrentCaptureSettingsData.bLight; } -bool ULuckyRobotsGameInstance::GetCurrentIsRandomMaterials() + +bool ULuckyRobotsGameInstance::GetCurrentIsRandomMaterials() const { return CurrentCaptureSettingsData.bMaterials; } -bool ULuckyRobotsGameInstance::GetCurrentIsRandomRobotPosition() + +bool ULuckyRobotsGameInstance::GetCurrentIsRandomRobotPosition() const { return CurrentCaptureSettingsData.bRobotPosition; } -bool ULuckyRobotsGameInstance::GetCurrentIsRandomPets() + +bool ULuckyRobotsGameInstance::GetCurrentIsRandomPets() const { return CurrentCaptureSettingsData.bPets; } -int ULuckyRobotsGameInstance::GetCurrentPetsNumber() + +int32 ULuckyRobotsGameInstance::GetCurrentPetsNumber() const { - return FCString::Atoi(*(CurrentCaptureSettingsData.NumberOfPets.ToString())); + return FCString::Atoi(*CurrentCaptureSettingsData.NumberOfPets.ToString()); } -bool ULuckyRobotsGameInstance::GetCurrentIsRandomPeople() + +bool ULuckyRobotsGameInstance::GetCurrentIsRandomPeople() const { return CurrentCaptureSettingsData.bPeople; } -int ULuckyRobotsGameInstance::GetCurrentPeopleNumber() + +int32 ULuckyRobotsGameInstance::GetCurrentPeopleNumber() const { - return FCString::Atoi(*(CurrentCaptureSettingsData.NumberOfPeople.ToString())); + return FCString::Atoi(*CurrentCaptureSettingsData.NumberOfPeople.ToString()); } -bool ULuckyRobotsGameInstance::GetCurrentIsRandomObjects() + +bool ULuckyRobotsGameInstance::GetCurrentIsRandomObjects() const { return CurrentCaptureSettingsData.bObjects; } -int ULuckyRobotsGameInstance::GetCurrentObjectsNumber() + +int32 ULuckyRobotsGameInstance::GetCurrentObjectsNumber() const { - return FCString::Atoi(*(CurrentCaptureSettingsData.NumberOfObjects.ToString())); + return FCString::Atoi(*CurrentCaptureSettingsData.NumberOfObjects.ToString()); } -TArray> ULuckyRobotsGameInstance::GetCurrentRandomMeshes() + +TArray> ULuckyRobotsGameInstance::GetCurrentRandomMeshes() const { return CurrentCaptureSettingsData.RandomMeshes; } -bool ULuckyRobotsGameInstance::GetCurrentIsInfiniteCapture() + +bool ULuckyRobotsGameInstance::GetCurrentIsInfiniteCapture() const { return CurrentCaptureSettingsData.bInfiniteCapture; } -int ULuckyRobotsGameInstance::GetCurrentCaptureNumber() + +int32 ULuckyRobotsGameInstance::GetCurrentCaptureNumber() const { - return FCString::Atoi(*(CurrentCaptureSettingsData.NumberOfCaptures.ToString())); -} \ No newline at end of file + return FCString::Atoi(*CurrentCaptureSettingsData.NumberOfCaptures.ToString()); +} diff --git a/Source/Luckyrobots/Private/FunctionLibraries/LuckyRobotsFunctionLibrary.cpp b/Source/Luckyrobots/Private/FunctionLibraries/LuckyRobotsFunctionLibrary.cpp new file mode 100644 index 00000000..cacce306 --- /dev/null +++ b/Source/Luckyrobots/Private/FunctionLibraries/LuckyRobotsFunctionLibrary.cpp @@ -0,0 +1,125 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "FunctionLibraries/LuckyRobotsFunctionLibrary.h" +#include "Core/LuckyRobotsGameInstance.h" +#include "GameFramework/GameUserSettings.h" +#include "Kismet/GameplayStatics.h" +#include "Settings/SG_CaptureSetting.h" + +ULuckyRobotsGameInstance* ULuckyRobotsFunctionLibrary::GetLuckyRobotsGameInstance(const UObject* WorldContextObject) +{ + if (WorldContextObject && WorldContextObject->GetWorld()) + { + return Cast(WorldContextObject->GetWorld()->GetGameInstance()); + } + return nullptr; +} + +TArray ULuckyRobotsFunctionLibrary::GetActiveRobotDataList(const UObject* WorldContextObject) +{ + TArray RobotDataList; + if (ULuckyRobotsGameInstance* GameInstance = GetLuckyRobotsGameInstance(WorldContextObject)) + { + if (GameInstance->RobotDataDataTable) + { + FString ContextString; + TArray RowNames = GameInstance->RobotDataDataTable->GetRowNames(); + for (const FName& RowName : RowNames) + { + FRobotData* pRow = GameInstance->RobotDataDataTable->FindRow(RowName, ContextString); + if (pRow && pRow->bActive) + { + RobotDataList.Add(*pRow); + } + } + } + } + return RobotDataList; +} + +TArray ULuckyRobotsFunctionLibrary::GetActiveLevelDataList(const UObject* WorldContextObject) +{ + TArray LevelDataList; + if (ULuckyRobotsGameInstance* GameInstance = GetLuckyRobotsGameInstance(WorldContextObject)) + { + if (GameInstance->LevelDataTable) + { + FString ContextString; + TArray RowNames = GameInstance->LevelDataTable->GetRowNames(); + for (const FName& RowName : RowNames) + { + FLevelData* pRow = GameInstance->LevelDataTable->FindRow(RowName, ContextString); + if (pRow && pRow->bActive) + { + LevelDataList.Add(*pRow); + } + } + } + } + return LevelDataList; +} + +void ULuckyRobotsFunctionLibrary::UpdateQualitySettings(const UObject* WorldContextObject) +{ + if (ULuckyRobotsGameInstance* GameInstance = GetLuckyRobotsGameInstance(WorldContextObject)) + { + if (UGameUserSettings* GameUserSettings = GEngine->GetGameUserSettings()) + { + GameUserSettings->SetOverallScalabilityLevel(static_cast(GameInstance->CurrentSelectQuality)); + GameUserSettings->SaveSettings(); + GameUserSettings->ApplySettings(true); + } + } +} + +FCaptureSettingsData ULuckyRobotsFunctionLibrary::LoadCaptureSettings(const UObject* WorldContextObject) +{ + FCaptureSettingsData DefaultCaptureSetting; + DefaultCaptureSetting.FolderName = FText::FromString("robotdata"); + DefaultCaptureSetting.FileName = FText::FromString("FILE"); + DefaultCaptureSetting.WritesPerSec = FText::FromString("1"); + DefaultCaptureSetting.NumberOfPeople = FText::FromString("1"); + DefaultCaptureSetting.NumberOfObjects = FText::FromString("1"); + DefaultCaptureSetting.NumberOfCaptures = FText::FromString("1"); + + USG_CaptureSetting* SaveGame = Cast(UGameplayStatics::LoadGameFromSlot("SGCaptureSettings", 0)); + if (SaveGame) + { + if (ULuckyRobotsGameInstance* GameInstance = GetLuckyRobotsGameInstance(WorldContextObject)) + { + GameInstance->CurrentCaptureSettingsData = SaveGame->CaptureSetting; + } + return SaveGame->CaptureSetting; + } + else + { + SaveGame = Cast(UGameplayStatics::CreateSaveGameObject(USG_CaptureSetting::StaticClass())); + if (SaveGame) + { + SaveGame->CaptureSetting = DefaultCaptureSetting; + UGameplayStatics::SaveGameToSlot(SaveGame, "SGCaptureSettings", 0); + } + } + + return DefaultCaptureSetting; +} + +void ULuckyRobotsFunctionLibrary::SaveCaptureSettings(const UObject* WorldContextObject, FCaptureSettingsData CaptureSetting) +{ + if (ULuckyRobotsGameInstance* GameInstance = GetLuckyRobotsGameInstance(WorldContextObject)) + { + GameInstance->CurrentCaptureSettingsData = CaptureSetting; + } + + USG_CaptureSetting* SaveGame = Cast(UGameplayStatics::LoadGameFromSlot("SGCaptureSettings", 0)); + if (!SaveGame) + { + SaveGame = Cast(UGameplayStatics::CreateSaveGameObject(USG_CaptureSetting::StaticClass())); + } + if (SaveGame) + { + SaveGame->CaptureSetting = CaptureSetting; + UGameplayStatics::SaveGameToSlot(SaveGame, "SGCaptureSettings", 0); + } +} diff --git a/Source/Luckyrobots/Private/LuckyRobotsGameMode.cpp b/Source/Luckyrobots/Private/GameModes/LuckyRobotsGameMode.cpp similarity index 59% rename from Source/Luckyrobots/Private/LuckyRobotsGameMode.cpp rename to Source/Luckyrobots/Private/GameModes/LuckyRobotsGameMode.cpp index 6d7577a4..199ba271 100644 --- a/Source/Luckyrobots/Private/LuckyRobotsGameMode.cpp +++ b/Source/Luckyrobots/Private/GameModes/LuckyRobotsGameMode.cpp @@ -1,14 +1,13 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "LuckyRobotsGameMode.h" -#include "LuckyRobotsGameInstance.h" -#include "LuckyRobotsFunctionLibrary.h" +#include "GameModes/LuckyRobotsGameMode.h" +#include "Core/LuckyRobotsGameInstance.h" +#include "FunctionLibraries/LuckyRobotsFunctionLibrary.h" void ALuckyRobotsGameMode::BeginPlay() { Super::BeginPlay(); - ULuckyRobotsFunctionLibrary::UpdateQualitySettings(this); } @@ -17,24 +16,21 @@ UClass* ALuckyRobotsGameMode::GetDefaultPawnClassForController_Implementation(AC UClass* RobotClass = Super::GetDefaultPawnClassForController_Implementation(InController); ERobotsName CurrentRobot = ERobotsName::None; - ULuckyRobotsGameInstance* LuckyRobotsGameInstance = Cast(GetGameInstance()); - if (LuckyRobotsGameInstance) + if (ULuckyRobotsGameInstance* GameInstance = Cast(GetGameInstance())) { - CurrentRobot = LuckyRobotsGameInstance->CurrentSelectRobot; + CurrentRobot = GameInstance->CurrentSelectRobot; } if (CurrentRobot != ERobotsName::None) { TArray ActiveRobotDataList = ULuckyRobotsFunctionLibrary::GetActiveRobotDataList(this); - for (auto ActiveRobotData : ActiveRobotDataList) + for (const FRobotData& RobotData : ActiveRobotDataList) { - if (ActiveRobotData.Name == CurrentRobot) + if (RobotData.Name == CurrentRobot) { - RobotClass = ActiveRobotData.RobotClass; + RobotClass = RobotData.RobotClass; break; } } } - return RobotClass; } - diff --git a/Source/Luckyrobots/Private/LuckyRobotsGameState.cpp b/Source/Luckyrobots/Private/GameModes/LuckyRobotsGameState.cpp similarity index 51% rename from Source/Luckyrobots/Private/LuckyRobotsGameState.cpp rename to Source/Luckyrobots/Private/GameModes/LuckyRobotsGameState.cpp index bb4e6587..dfe75858 100644 --- a/Source/Luckyrobots/Private/LuckyRobotsGameState.cpp +++ b/Source/Luckyrobots/Private/GameModes/LuckyRobotsGameState.cpp @@ -1,10 +1,10 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "LuckyRobotsGameState.h" +#include "GameModes/LuckyRobotsGameState.h" #include "SocketIOClientComponent.h" -#include "LuckyRobotsFunctionLibrary.h" -#include "LuckyRobotsGameInstance.h" +#include "FunctionLibraries/LuckyRobotsFunctionLibrary.h" +#include "Core/LuckyRobotsGameInstance.h" ALuckyRobotsGameState::ALuckyRobotsGameState() { @@ -14,7 +14,6 @@ ALuckyRobotsGameState::ALuckyRobotsGameState() void ALuckyRobotsGameState::BeginPlay() { Super::BeginPlay(); - if (SocketIOClientComponent) { SocketIOClientComponent->Connect(L"http://localhost:3000/"); @@ -23,33 +22,25 @@ void ALuckyRobotsGameState::BeginPlay() void ALuckyRobotsGameState::DoSendMessage(FString SendValue) { - if (SocketIOClientComponent) + if (SocketIOClientComponent && SocketIOClientComponent->bIsConnected) { - if (SocketIOClientComponent->bIsConnected) - { - USIOJsonValue* SIOJsonValue = USIOJsonValue::ConstructJsonValueString(this, SendValue); - SocketIOClientComponent->Emit("message", SIOJsonValue); - } + USIOJsonValue* SIOJsonValue = USIOJsonValue::ConstructJsonValueString(this, SendValue); + SocketIOClientComponent->Emit(TEXT("message"), SIOJsonValue); } } - void ALuckyRobotsGameState::DoSocketOnConnect(FString SocketId, FString SessionId, bool IsReconnection) { - if (SocketIOClientComponent) + if (SocketIOClientComponent && SocketIOClientComponent->bIsConnected) { - if (SocketIOClientComponent->bIsConnected) - { - SocketIOClientComponent->BindEventToGenericEvent("response"); - } + SocketIOClientComponent->BindEventToGenericEvent(TEXT("response")); } } void ALuckyRobotsGameState::DoSocketOnGenericEvent(FString EventName, USIOJsonValue* EventData) { - ULuckyRobotsGameInstance* LuckyRobotsGameInstance = ULuckyRobotsFunctionLibrary::GetLuckyRobotsGameInstance(this); - if (LuckyRobotsGameInstance) + if (ULuckyRobotsGameInstance* GameInstance = ULuckyRobotsFunctionLibrary::GetLuckyRobotsGameInstance(this)) { - LuckyRobotsGameInstance->DoGetDispatch(EventName, EventData); + GameInstance->DoGetDispatch(EventName, EventData); } -} \ No newline at end of file +} diff --git a/Source/Luckyrobots/Private/GameUserWidget.cpp b/Source/Luckyrobots/Private/GameUserWidget.cpp deleted file mode 100644 index f73027f7..00000000 --- a/Source/Luckyrobots/Private/GameUserWidget.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Fill out your copyright notice in the Description page of Project Settings. - - -#include "GameUserWidget.h" -#include "LuckyRobotsFunctionLibrary.h" -#include "LuckyRobotsGameInstance.h" - -void UGameUserWidget::NativeConstruct() -{ - Super::NativeConstruct(); - - ULuckyRobotsGameInstance* LuckyRobotsGameInstance = ULuckyRobotsFunctionLibrary::GetLuckyRobotsGameInstance(this); - if (LuckyRobotsGameInstance) - { - LuckyRobotsGameInstance->GameUserWidget = this; - } -} \ No newline at end of file diff --git a/Source/Luckyrobots/Private/LobbyGameMode.cpp b/Source/Luckyrobots/Private/Lobby/LobbyGameMode.cpp similarity index 68% rename from Source/Luckyrobots/Private/LobbyGameMode.cpp rename to Source/Luckyrobots/Private/Lobby/LobbyGameMode.cpp index c2942b1a..0f7abba0 100644 --- a/Source/Luckyrobots/Private/LobbyGameMode.cpp +++ b/Source/Luckyrobots/Private/Lobby/LobbyGameMode.cpp @@ -1,8 +1,8 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "LobbyGameMode.h" -#include "LuckyRobotsFunctionLibrary.h" +#include "Lobby/LobbyGameMode.h" +#include "FunctionLibraries/LuckyRobotsFunctionLibrary.h" void ALobbyGameMode::BeginPlay() { diff --git a/Source/Luckyrobots/Private/LobbyPlayerController.cpp b/Source/Luckyrobots/Private/Lobby/LobbyPlayerController.cpp similarity index 93% rename from Source/Luckyrobots/Private/LobbyPlayerController.cpp rename to Source/Luckyrobots/Private/Lobby/LobbyPlayerController.cpp index 6aa12218..14f31e84 100644 --- a/Source/Luckyrobots/Private/LobbyPlayerController.cpp +++ b/Source/Luckyrobots/Private/Lobby/LobbyPlayerController.cpp @@ -1,7 +1,7 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "LobbyPlayerController.h" +#include "Lobby/LobbyPlayerController.h" void ALobbyPlayerController::BeginPlay() { diff --git a/Source/Luckyrobots/Private/LuckyRobotsFunctionLibrary.cpp b/Source/Luckyrobots/Private/LuckyRobotsFunctionLibrary.cpp deleted file mode 100644 index 901f9a3f..00000000 --- a/Source/Luckyrobots/Private/LuckyRobotsFunctionLibrary.cpp +++ /dev/null @@ -1,137 +0,0 @@ -// Fill out your copyright notice in the Description page of Project Settings. - - -#include "LuckyRobotsFunctionLibrary.h" -#include "LuckyRobotsGameInstance.h" -#include "GameFramework/GameUserSettings.h" -#include "Kismet/GameplayStatics.h" -#include "SG_CaptureSetting.h" - -ULuckyRobotsGameInstance* ULuckyRobotsFunctionLibrary::GetLuckyRobotsGameInstance(const UObject* WorldContextObject) -{ - return Cast(WorldContextObject->GetWorld()->GetGameInstance()); -} - -TArray ULuckyRobotsFunctionLibrary::GetActiveRobotDataList(const UObject* WorldContextObject) -{ - TArray RobotDataList; - ULuckyRobotsGameInstance* LuckyRobotsGameInstance = GetLuckyRobotsGameInstance(WorldContextObject); - if (LuckyRobotsGameInstance) - { - if (LuckyRobotsGameInstance->RobotDataDataTable) - { - FString ContextString; - TArray RowNames = LuckyRobotsGameInstance->RobotDataDataTable->GetRowNames(); - for (auto RowString : RowNames) - { - FRobotData* pRow = LuckyRobotsGameInstance->RobotDataDataTable->FindRow(FName(RowString), ContextString); - if (pRow) - { - if (pRow->bActive) - { - RobotDataList.Add(*pRow); - } - } - } - } - } - return RobotDataList; -} - -TArray ULuckyRobotsFunctionLibrary::GetActiveLevelDataList(const UObject* WorldContextObject) -{ - TArray LevelDataList; - ULuckyRobotsGameInstance* LuckyRobotsGameInstance = GetLuckyRobotsGameInstance(WorldContextObject); - if (LuckyRobotsGameInstance) - { - if (LuckyRobotsGameInstance->LevelDataTable) - { - FString ContextString; - TArray RowNames = LuckyRobotsGameInstance->LevelDataTable->GetRowNames(); - for (auto RowString : RowNames) - { - FLevelData* pRow = LuckyRobotsGameInstance->LevelDataTable->FindRow(FName(RowString), ContextString); - if (pRow) - { - if (pRow->bActive) - { - LevelDataList.Add(*pRow); - } - } - } - } - } - return LevelDataList; -} - -void ULuckyRobotsFunctionLibrary::UpdateQualitySettings(const UObject* WorldContextObject) -{ - ULuckyRobotsGameInstance* LuckyRobotsGameInstance = GetLuckyRobotsGameInstance(WorldContextObject); - if (LuckyRobotsGameInstance) - { - // Load game user settings and apply - UGameUserSettings* GameUserSettings = GEngine->GetGameUserSettings(); - if (GameUserSettings) - { - GameUserSettings->SetOverallScalabilityLevel(int(LuckyRobotsGameInstance->CurrentSelectQuality)); - GameUserSettings->SaveSettings(); - GameUserSettings->ApplySettings(true); - } - } -} - -FCaptureSettingsData ULuckyRobotsFunctionLibrary::LoadCaptureSettings(const UObject* WorldContextObject) -{ - FCaptureSettingsData DefaultCaptureSetting; - DefaultCaptureSetting.FolderName = FText::FromString("robotdata"); - DefaultCaptureSetting.FileName = FText::FromString("FILE"); - DefaultCaptureSetting.WritesPerSec = FText::FromString("1"); - DefaultCaptureSetting.NumberOfPeople = FText::FromString("1"); - DefaultCaptureSetting.NumberOfObjects = FText::FromString("1"); - DefaultCaptureSetting.NumberOfCaptures = FText::FromString("1"); - - USG_CaptureSetting* SaveGame = nullptr; - SaveGame = Cast(UGameplayStatics::LoadGameFromSlot("SGCaptureSettings", 0)); - if (SaveGame) - { - ULuckyRobotsGameInstance* LuckyRobotsGameInstance = GetLuckyRobotsGameInstance(WorldContextObject); - if (LuckyRobotsGameInstance) - { - LuckyRobotsGameInstance->CurrentCaptureSettingsData = SaveGame->CaptureSetting; - } - return SaveGame->CaptureSetting; - } - else - { - SaveGame = Cast(UGameplayStatics::CreateSaveGameObject(USG_CaptureSetting::StaticClass())); - if (SaveGame) - { - SaveGame->CaptureSetting = DefaultCaptureSetting; - UGameplayStatics::SaveGameToSlot(SaveGame, "SGCaptureSettings", 0); - } - } - - return DefaultCaptureSetting; -} - -void ULuckyRobotsFunctionLibrary::SaveCaptureSettings(const UObject* WorldContextObject, FCaptureSettingsData CaptureSetting) -{ - ULuckyRobotsGameInstance* LuckyRobotsGameInstance = GetLuckyRobotsGameInstance(WorldContextObject); - if (LuckyRobotsGameInstance) - { - LuckyRobotsGameInstance->CurrentCaptureSettingsData = CaptureSetting; - } - - USG_CaptureSetting* SaveGame = nullptr; - SaveGame = Cast(UGameplayStatics::LoadGameFromSlot("SGCaptureSettings", 0)); - if (!SaveGame) - { - SaveGame = Cast(UGameplayStatics::CreateSaveGameObject(USG_CaptureSetting::StaticClass())); - } - - if (SaveGame) - { - SaveGame->CaptureSetting = CaptureSetting; - UGameplayStatics::SaveGameToSlot(SaveGame, "SGCaptureSettings", 0); - } -} \ No newline at end of file diff --git a/Source/Luckyrobots/Private/MainScreenUserWidget.cpp b/Source/Luckyrobots/Private/MainScreenUserWidget.cpp deleted file mode 100644 index c06c7dec..00000000 --- a/Source/Luckyrobots/Private/MainScreenUserWidget.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// Fill out your copyright notice in the Description page of Project Settings. - - -#include "MainScreenUserWidget.h" -#include "Engine/DataTable.h" -#include "LuckyRobotsGameInstance.h" -#include "LuckyRobotsFunctionLibrary.h" - -void UMainScreenUserWidget::NativeConstruct() -{ - Super::NativeConstruct(); - - InitData(); -} - -void UMainScreenUserWidget::InitData() -{ - InitRobotData(); - InitLevelData(); - - ULuckyRobotsGameInstance* LuckyRobotsGameInstance = Cast(GetGameInstance()); - if (LuckyRobotsGameInstance) - { - iCurrentSelectQuality = int(LuckyRobotsGameInstance->CurrentSelectQuality); - } -} - -void UMainScreenUserWidget::InitRobotData() -{ - RobotDataList = ULuckyRobotsFunctionLibrary::GetActiveRobotDataList(this); - - iCurrentSelectRobot = 0; - UpdateSelectRobot(); -} - -void UMainScreenUserWidget::InitLevelData() -{ - LevelDataList = ULuckyRobotsFunctionLibrary::GetActiveLevelDataList(this); - - FRobotData CurrentRobotData = GetCurrentRobotData(); - if (CurrentRobotData.Name != ERobotsName::None) - { - TArray ActiveLevelDataList = LevelDataList; - - LevelDataList.Empty(); - for (auto ActiveLevelData : ActiveLevelDataList) - { - if (ActiveLevelData.RobotTypeList.Find(CurrentRobotData.RobotType) >= 0) - { - LevelDataList.Add(ActiveLevelData); - } - } - } - - iCurrentSelectLevel = 0; - UpdateSelectLevel(); -} - -FRobotData UMainScreenUserWidget::GetCurrentRobotData() -{ - FRobotData CurrentRobotData; - if (RobotDataList.IsValidIndex(iCurrentSelectRobot)) - { - CurrentRobotData = RobotDataList[iCurrentSelectRobot]; - } - return CurrentRobotData; -} - -FLevelData UMainScreenUserWidget::GetCurrentLevelData() -{ - FLevelData CurrentLevelData; - if (LevelDataList.IsValidIndex(iCurrentSelectLevel)) - { - CurrentLevelData = LevelDataList[iCurrentSelectLevel]; - } - return CurrentLevelData; -} - -void UMainScreenUserWidget::SelectNextRobot() -{ - iCurrentSelectRobot = FMath::Clamp(iCurrentSelectRobot + 1, 0, RobotDataList.Num() - 1); - UpdateSelectRobot(); -} - -void UMainScreenUserWidget::SelectPreviousRobot() -{ - iCurrentSelectRobot = FMath::Clamp(iCurrentSelectRobot - 1, 0, RobotDataList.Num() - 1); - UpdateSelectRobot(); -} - -void UMainScreenUserWidget::SelectNextLevel() -{ - iCurrentSelectLevel = FMath::Clamp(iCurrentSelectLevel + 1, 0, LevelDataList.Num() - 1); - UpdateSelectLevel(); -} - -void UMainScreenUserWidget::SelectPreviousLevel() -{ - iCurrentSelectLevel = FMath::Clamp(iCurrentSelectLevel - 1, 0, LevelDataList.Num() - 1); - UpdateSelectLevel(); -} - -void UMainScreenUserWidget::SelectNextQuality() -{ - UEnum* QualityEnum = StaticEnum(); - int QualityEnumNum = QualityEnum->NumEnums() - 1; - iCurrentSelectQuality = FMath::Clamp(iCurrentSelectQuality - 1, 0, QualityEnumNum - 1); - - UpdateSelectQuality(); -} - -void UMainScreenUserWidget::SelectPreviousQuality() -{ - UEnum* QualityEnum = StaticEnum(); - int QualityEnumNum = QualityEnum->NumEnums() - 1; - iCurrentSelectQuality = FMath::Clamp(iCurrentSelectQuality + 1, 0, QualityEnumNum - 1); - - UpdateSelectQuality(); -} - -void UMainScreenUserWidget::UpdateSelectRobot() -{ - ULuckyRobotsGameInstance* LuckyRobotsGameInstance = Cast(GetGameInstance()); - if (LuckyRobotsGameInstance) - { - LuckyRobotsGameInstance->CurrentSelectRobot = GetCurrentRobotData().Name; - } - BPUpdateSelectRobot(); - InitLevelData(); -} -void UMainScreenUserWidget::UpdateSelectLevel() -{ - ULuckyRobotsGameInstance* LuckyRobotsGameInstance = Cast(GetGameInstance()); - if (LuckyRobotsGameInstance) - { - LuckyRobotsGameInstance->CurrentSelectLevel = GetCurrentLevelData().LevelEnum; - } - BPUpdateSelectLevel(); -} - -void UMainScreenUserWidget::UpdateSelectQuality() -{ - ULuckyRobotsGameInstance* LuckyRobotsGameInstance = Cast(GetGameInstance()); - if (LuckyRobotsGameInstance) - { - LuckyRobotsGameInstance->CurrentSelectQuality = static_cast(iCurrentSelectQuality); - } - BPUpdateSelectQuality(); -} \ No newline at end of file diff --git a/Source/Luckyrobots/Private/Menus/MainScreenUserWidget.cpp b/Source/Luckyrobots/Private/Menus/MainScreenUserWidget.cpp new file mode 100644 index 00000000..6e101190 --- /dev/null +++ b/Source/Luckyrobots/Private/Menus/MainScreenUserWidget.cpp @@ -0,0 +1,137 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "Menus/MainScreenUserWidget.h" +#include "Engine/DataTable.h" +#include "Core/LuckyRobotsGameInstance.h" +#include "FunctionLibraries/LuckyRobotsFunctionLibrary.h" + +void UMainScreenUserWidget::NativeConstruct() +{ + Super::NativeConstruct(); + InitData(); +} + +void UMainScreenUserWidget::InitData() +{ + InitRobotData(); + InitLevelData(); + + if (ULuckyRobotsGameInstance* GameInstance = Cast(GetGameInstance())) + { + CurrentQualityIndex = static_cast(GameInstance->CurrentSelectQuality); + } +} + +void UMainScreenUserWidget::InitRobotData() +{ + RobotDataList = ULuckyRobotsFunctionLibrary::GetActiveRobotDataList(this); + CurrentRobotIndex = 0; + UpdateSelectRobot(); +} + +void UMainScreenUserWidget::InitLevelData() +{ + LevelDataList = ULuckyRobotsFunctionLibrary::GetActiveLevelDataList(this); + FRobotData CurrentRobotData = GetCurrentRobotData(); + if (CurrentRobotData.Name != ERobotsName::None) + { + TArray FilteredLevels; + for (const FLevelData& LevelData : LevelDataList) + { + if (LevelData.RobotTypeList.Contains(CurrentRobotData.RobotType)) + { + FilteredLevels.Add(LevelData); + } + } + LevelDataList = FilteredLevels; + } + CurrentLevelIndex = 0; + UpdateSelectLevel(); +} + +FRobotData UMainScreenUserWidget::GetCurrentRobotData() const +{ + if (RobotDataList.IsValidIndex(CurrentRobotIndex)) + { + return RobotDataList[CurrentRobotIndex]; + } + return FRobotData(); +} + +FLevelData UMainScreenUserWidget::GetCurrentLevelData() const +{ + if (LevelDataList.IsValidIndex(CurrentLevelIndex)) + { + return LevelDataList[CurrentLevelIndex]; + } + return FLevelData(); +} + +void UMainScreenUserWidget::SelectNextRobot() +{ + CurrentRobotIndex = FMath::Clamp(CurrentRobotIndex + 1, 0, RobotDataList.Num() - 1); + UpdateSelectRobot(); +} + +void UMainScreenUserWidget::SelectPreviousRobot() +{ + CurrentRobotIndex = FMath::Clamp(CurrentRobotIndex - 1, 0, RobotDataList.Num() - 1); + UpdateSelectRobot(); +} + +void UMainScreenUserWidget::SelectNextLevel() +{ + CurrentLevelIndex = FMath::Clamp(CurrentLevelIndex + 1, 0, LevelDataList.Num() - 1); + UpdateSelectLevel(); +} + +void UMainScreenUserWidget::SelectPreviousLevel() +{ + CurrentLevelIndex = FMath::Clamp(CurrentLevelIndex - 1, 0, LevelDataList.Num() - 1); + UpdateSelectLevel(); +} + +void UMainScreenUserWidget::SelectNextQuality() +{ + UEnum* QualityEnum = StaticEnum(); + int32 EnumCount = QualityEnum->NumEnums() - 1; + CurrentQualityIndex = FMath::Clamp(CurrentQualityIndex - 1, 0, EnumCount - 1); + UpdateSelectQuality(); +} + +void UMainScreenUserWidget::SelectPreviousQuality() +{ + UEnum* QualityEnum = StaticEnum(); + int32 EnumCount = QualityEnum->NumEnums() - 1; + CurrentQualityIndex = FMath::Clamp(CurrentQualityIndex + 1, 0, EnumCount - 1); + UpdateSelectQuality(); +} + +void UMainScreenUserWidget::UpdateSelectRobot() +{ + if (ULuckyRobotsGameInstance* GameInstance = Cast(GetGameInstance())) + { + GameInstance->CurrentSelectRobot = GetCurrentRobotData().Name; + } + BPUpdateSelectRobot(); + InitLevelData(); +} + +void UMainScreenUserWidget::UpdateSelectLevel() +{ + if (ULuckyRobotsGameInstance* GameInstance = Cast(GetGameInstance())) + { + GameInstance->CurrentSelectLevel = GetCurrentLevelData().LevelEnum; + } + BPUpdateSelectLevel(); +} + +void UMainScreenUserWidget::UpdateSelectQuality() +{ + if (ULuckyRobotsGameInstance* GameInstance = Cast(GetGameInstance())) + { + GameInstance->CurrentSelectQuality = static_cast(CurrentQualityIndex); + } + BPUpdateSelectQuality(); +} diff --git a/Source/Luckyrobots/Private/SG_CaptureSetting.cpp b/Source/Luckyrobots/Private/Settings/SG_CaptureSetting.cpp similarity index 66% rename from Source/Luckyrobots/Private/SG_CaptureSetting.cpp rename to Source/Luckyrobots/Private/Settings/SG_CaptureSetting.cpp index 64b88c56..6f33b329 100644 --- a/Source/Luckyrobots/Private/SG_CaptureSetting.cpp +++ b/Source/Luckyrobots/Private/Settings/SG_CaptureSetting.cpp @@ -1,4 +1,4 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "SG_CaptureSetting.h" +#include "Settings/SG_CaptureSetting.h" diff --git a/Source/Luckyrobots/Private/UI/GameUserWidget.cpp b/Source/Luckyrobots/Private/UI/GameUserWidget.cpp new file mode 100644 index 00000000..38e7b595 --- /dev/null +++ b/Source/Luckyrobots/Private/UI/GameUserWidget.cpp @@ -0,0 +1,14 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "UI/GameUserWidget.h" +#include "Core/LuckyRobotsGameInstance.h" + +void UGameUserWidget::NativeConstruct() +{ + Super::NativeConstruct(); + if (ULuckyRobotsGameInstance* GameInstance = Cast(GetGameInstance())) + { + GameInstance->GameUserWidget = this; + } +} diff --git a/Source/Luckyrobots/Private/CaptureSettingsUserWidget.cpp b/Source/Luckyrobots/Private/UI/Settings/CaptureSettingsUserWidget.cpp similarity index 61% rename from Source/Luckyrobots/Private/CaptureSettingsUserWidget.cpp rename to Source/Luckyrobots/Private/UI/Settings/CaptureSettingsUserWidget.cpp index d0c258be..272118a8 100644 --- a/Source/Luckyrobots/Private/CaptureSettingsUserWidget.cpp +++ b/Source/Luckyrobots/Private/UI/Settings/CaptureSettingsUserWidget.cpp @@ -1,5 +1,5 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "CaptureSettingsUserWidget.h" +#include "UI/Settings/CaptureSettingsUserWidget.h" diff --git a/Source/Luckyrobots/Public/LuckyRobotsPlayerController.h b/Source/Luckyrobots/Public/Controllers/LuckyRobotsPlayerController.h similarity index 100% rename from Source/Luckyrobots/Public/LuckyRobotsPlayerController.h rename to Source/Luckyrobots/Public/Controllers/LuckyRobotsPlayerController.h diff --git a/Source/Luckyrobots/Public/LuckyRobotsGameInstance.h b/Source/Luckyrobots/Public/Core/LuckyRobotsGameInstance.h similarity index 66% rename from Source/Luckyrobots/Public/LuckyRobotsGameInstance.h rename to Source/Luckyrobots/Public/Core/LuckyRobotsGameInstance.h index 1fb1293e..651db9b6 100644 --- a/Source/Luckyrobots/Public/LuckyRobotsGameInstance.h +++ b/Source/Luckyrobots/Public/Core/LuckyRobotsGameInstance.h @@ -24,9 +24,23 @@ public: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config") UDataTable* LevelDataTable; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config") + UDataTable* FurnitureDataTable; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config") + UDataTable* DecorationDataTable; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config") + UDataTable* KitchenwareDataTable; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config") + UDataTable* ElectronicsDataTable; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Config") + UDataTable* BathroomDataTable; + public: bool bIsFirstOpenGame; - bool bIsDebug; bool bIsWidgetTestMode; bool bIsShowPath; @@ -48,10 +62,10 @@ public: bool bIsMouseOpen; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture") - bool bIschange; + bool bIsChanged; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture") - int FolderCount; + int32 FolderCount; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Capture") FTransform TargetPosition; @@ -90,10 +104,10 @@ public: public: UFUNCTION(BlueprintCallable) - void DoSendMessage(FString SendValue); + void DoSendMessage(const FString& SendValue); UFUNCTION(BlueprintCallable) - void DoLogItemAdd(FString Topic, FString MsgText, ELogItemType LogItemType); + void DoLogItemAdd(const FString& Topic, const FString& MsgText, ELogItemType LogItemType); UFUNCTION(BlueprintCallable) void SwitchGamePaused(); @@ -103,41 +117,41 @@ public: void ClearTaskList(); UFUNCTION(BlueprintCallable) - void AddTask(FGoalsTaskData TaskData); + void AddTask(const FGoalsTaskData& TaskData); UFUNCTION(BlueprintCallable) - void RemoveTask(FGoalsTaskData TaskData); + void RemoveTask(const FGoalsTaskData& TaskData); UFUNCTION(BlueprintCallable) void RemoveTaskByGoalType(EGoalType GoalType); UFUNCTION(BlueprintPure) - int GetTaskNum(); + int32 GetTaskNum() const; UFUNCTION(BlueprintCallable) - void SetTask(int Index, FGoalsTaskData TaskData); + void SetTask(int32 Index, const FGoalsTaskData& TaskData); UFUNCTION(BlueprintCallable) - bool GetTask(int Index, FGoalsTaskData& TaskData); + bool GetTask(int32 Index, FGoalsTaskData& OutTaskData) const; UFUNCTION(BlueprintCallable) void ReSetTaskList(); UFUNCTION(BlueprintPure) - TArray GetTaskList(); + TArray GetTaskList() const; UFUNCTION(BlueprintCallable) - void DoSetTempTaskValueChange(bool IsClear); + void DoSetTempTaskValueChange(bool bIsClear); public: UFUNCTION(BlueprintCallable) - void SetCurrentFolderName(FString FolderName); + void SetCurrentFolderName(const FString& FolderName); UFUNCTION(BlueprintCallable) - void SetCurrentFileName(FString FileName); + void SetCurrentFileName(const FString& FileName); UFUNCTION(BlueprintCallable) - void SetCurrentWritesPerSec(int WritesPerSec); + void SetCurrentWritesPerSec(int32 WritesPerSec); UFUNCTION(BlueprintCallable) void SetCurrentIsScenario(bool IsScenario); @@ -155,77 +169,77 @@ public: void SetCurrentIsRandomPets(bool bPets); UFUNCTION(BlueprintCallable) - void SetCurrentPetsNumber(int PetsNumber); + void SetCurrentPetsNumber(int32 PetsNumber); UFUNCTION(BlueprintCallable) void SetCurrentIsRandomPeople(bool bPeople); UFUNCTION(BlueprintCallable) - void SetCurrentPeopleNumber(int PeopleNumber); + void SetCurrentPeopleNumber(int32 PeopleNumber); UFUNCTION(BlueprintCallable) void SetCurrentIsRandomObjects(bool bObjects); UFUNCTION(BlueprintCallable) - void SetCurrentObjectsNumber(int ObjectsNumber); + void SetCurrentObjectsNumber(int32 ObjectsNumber); UFUNCTION(BlueprintCallable) - void SetCurrentRandomMeshes(TArray> RandomMeshes); + void SetCurrentRandomMeshes(const TArray>& RandomMeshes); UFUNCTION(BlueprintCallable) void SetCurrentIsInfiniteCapture(bool bInfiniteCapture); UFUNCTION(BlueprintCallable) - void SetCurrentCaptureNumber(int CaptureNumber); + void SetCurrentCaptureNumber(int32 CaptureNumber); public: UFUNCTION(BlueprintPure) - FString GetCurrentFolderName(); + FString GetCurrentFolderName() const; UFUNCTION(BlueprintPure) - FString GetCurrentFileName(); + FString GetCurrentFileName() const; UFUNCTION(BlueprintPure) - int GetCurrentWritesPerSec(); + int32 GetCurrentWritesPerSec() const; UFUNCTION(BlueprintPure) - bool GetCurrentIsScenario(); + bool GetCurrentIsScenario() const; UFUNCTION(BlueprintPure) - bool GetCurrentIsRandomLight(); + bool GetCurrentIsRandomLight() const; UFUNCTION(BlueprintPure) - bool GetCurrentIsRandomMaterials(); + bool GetCurrentIsRandomMaterials() const; UFUNCTION(BlueprintPure) - bool GetCurrentIsRandomRobotPosition(); + bool GetCurrentIsRandomRobotPosition() const; UFUNCTION(BlueprintPure) - bool GetCurrentIsRandomPets(); + bool GetCurrentIsRandomPets() const; UFUNCTION(BlueprintPure) - int GetCurrentPetsNumber(); + int32 GetCurrentPetsNumber() const; UFUNCTION(BlueprintPure) - bool GetCurrentIsRandomPeople(); + bool GetCurrentIsRandomPeople() const; UFUNCTION(BlueprintPure) - int GetCurrentPeopleNumber(); + int32 GetCurrentPeopleNumber() const; UFUNCTION(BlueprintPure) - bool GetCurrentIsRandomObjects(); + bool GetCurrentIsRandomObjects() const; UFUNCTION(BlueprintPure) - int GetCurrentObjectsNumber(); + int32 GetCurrentObjectsNumber() const; UFUNCTION(BlueprintPure) - TArray> GetCurrentRandomMeshes(); + TArray> GetCurrentRandomMeshes() const; UFUNCTION(BlueprintPure) - bool GetCurrentIsInfiniteCapture(); + bool GetCurrentIsInfiniteCapture() const; UFUNCTION(BlueprintPure) - int GetCurrentCaptureNumber(); + int32 GetCurrentCaptureNumber() const; public: UFUNCTION(BlueprintImplementableEvent) diff --git a/Source/Luckyrobots/Public/LuckyRobotsFunctionLibrary.h b/Source/Luckyrobots/Public/FunctionLibraries/LuckyRobotsFunctionLibrary.h similarity index 100% rename from Source/Luckyrobots/Public/LuckyRobotsFunctionLibrary.h rename to Source/Luckyrobots/Public/FunctionLibraries/LuckyRobotsFunctionLibrary.h diff --git a/Source/Luckyrobots/Public/LuckyRobotsGameMode.h b/Source/Luckyrobots/Public/GameModes/LuckyRobotsGameMode.h similarity index 100% rename from Source/Luckyrobots/Public/LuckyRobotsGameMode.h rename to Source/Luckyrobots/Public/GameModes/LuckyRobotsGameMode.h diff --git a/Source/Luckyrobots/Public/LuckyRobotsGameState.h b/Source/Luckyrobots/Public/GameModes/LuckyRobotsGameState.h similarity index 100% rename from Source/Luckyrobots/Public/LuckyRobotsGameState.h rename to Source/Luckyrobots/Public/GameModes/LuckyRobotsGameState.h diff --git a/Source/Luckyrobots/Public/LobbyGameMode.h b/Source/Luckyrobots/Public/Lobby/LobbyGameMode.h similarity index 100% rename from Source/Luckyrobots/Public/LobbyGameMode.h rename to Source/Luckyrobots/Public/Lobby/LobbyGameMode.h diff --git a/Source/Luckyrobots/Public/LobbyPlayerController.h b/Source/Luckyrobots/Public/Lobby/LobbyPlayerController.h similarity index 100% rename from Source/Luckyrobots/Public/LobbyPlayerController.h rename to Source/Luckyrobots/Public/Lobby/LobbyPlayerController.h diff --git a/Source/Luckyrobots/Public/MainScreenUserWidget.h b/Source/Luckyrobots/Public/Menus/MainScreenUserWidget.h similarity index 83% rename from Source/Luckyrobots/Public/MainScreenUserWidget.h rename to Source/Luckyrobots/Public/Menus/MainScreenUserWidget.h index 7e30945d..d8c7e311 100644 --- a/Source/Luckyrobots/Public/MainScreenUserWidget.h +++ b/Source/Luckyrobots/Public/Menus/MainScreenUserWidget.h @@ -1,5 +1,3 @@ -// Fill out your copyright notice in the Description page of Project Settings. - #pragma once #include "CoreMinimal.h" @@ -7,16 +5,12 @@ #include "SharedDef.h" #include "MainScreenUserWidget.generated.h" -class UDataTable; -/** - * - */ UCLASS() class LUCKYROBOTS_API UMainScreenUserWidget : public UUserWidget { GENERATED_BODY() protected: - virtual void NativeConstruct(); + virtual void NativeConstruct() override; public: UPROPERTY(EditAnywhere, BlueprintReadWrite) @@ -26,24 +20,29 @@ public: TArray LevelDataList; UPROPERTY(EditAnywhere, BlueprintReadWrite) - int iCurrentSelectRobot; - UPROPERTY(EditAnywhere, BlueprintReadWrite) - int iCurrentSelectLevel; + int32 CurrentRobotIndex; UPROPERTY(EditAnywhere, BlueprintReadWrite) - int iCurrentSelectQuality; + int32 CurrentLevelIndex; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int32 CurrentQualityIndex; public: UFUNCTION(BlueprintCallable) void InitData(); + UFUNCTION(BlueprintCallable) void InitRobotData(); + UFUNCTION(BlueprintCallable) void InitLevelData(); + UFUNCTION(BlueprintCallable) - FRobotData GetCurrentRobotData(); + FRobotData GetCurrentRobotData() const; + UFUNCTION(BlueprintCallable) - FLevelData GetCurrentLevelData(); + FLevelData GetCurrentLevelData() const; UFUNCTION(BlueprintCallable) void SelectNextRobot(); diff --git a/Source/Luckyrobots/Public/SG_CaptureSetting.h b/Source/Luckyrobots/Public/Settings/SG_CaptureSetting.h similarity index 100% rename from Source/Luckyrobots/Public/SG_CaptureSetting.h rename to Source/Luckyrobots/Public/Settings/SG_CaptureSetting.h diff --git a/Source/Luckyrobots/Public/SharedDef.h b/Source/Luckyrobots/Public/SharedDef.h index 639c0bf1..4e882db4 100644 --- a/Source/Luckyrobots/Public/SharedDef.h +++ b/Source/Luckyrobots/Public/SharedDef.h @@ -2,124 +2,225 @@ #include "SharedDef.generated.h" - UENUM(BlueprintType) enum class ERobotsCategories : uint8 { - Wheeled UMETA(DisplayName = "Wheeled Robots"), - FourLegged UMETA(DisplayName = "Four-Legged Robots"), - TwoLegged UMETA(DisplayName = "Two-Legged Robots"), - Stationary UMETA(DisplayName = "Stationary Robots"), - IndoorFlying UMETA(DisplayName = "Indoor Flying Robots"), - SwimmingUnderwater UMETA(DisplayName = "Swimming/Underwater Robots"), - CrawlingModular UMETA(DisplayName = "Crawling/Modular Robots"), - Arm UMETA(DisplayName = "Arm-Robots"), - OutdoorFlying UMETA(DisplayName = "Outdoor Flying Robots") + Wheeled UMETA(DisplayName = "Wheeled Robots"), + FourLegged UMETA(DisplayName = "Four-Legged Robots"), + TwoLegged UMETA(DisplayName = "Two-Legged Robots"), + Stationary UMETA(DisplayName = "Stationary Robots"), + IndoorFlying UMETA(DisplayName = "Indoor Flying Robots"), + SwimmingUnderwater UMETA(DisplayName = "Swimming/Underwater Robots"), + CrawlingModular UMETA(DisplayName = "Crawling/Modular Robots"), + Arm UMETA(DisplayName = "Arm-Robots"), + OutdoorFlying UMETA(DisplayName = "Outdoor Flying Robots") }; UENUM(BlueprintType) enum class ERobotsName : uint8 { - None UMETA(DisplayName = "None"), - Luck_e UMETA(DisplayName = "Luck-e"), - Stretch UMETA(DisplayName = "Stretch"), - LuckyDrone UMETA(DisplayName = "Lucky Drone"), - DJIDrone UMETA(DisplayName = "DJI Drone"), - ArmLucky UMETA(DisplayName = "Arm Lucky"), - UnitreeG1 UMETA(DisplayName = "Unitree G1"), - StretchRobotV1 UMETA(DisplayName = "Stretch Robot V1"), - PandaArmRobot UMETA(DisplayName = "Panda Arm Robot"), - PuralinkRobot UMETA(DisplayName = "Puralink Robot"), - UnitreeGo2 UMETA(DisplayName = "Unitree Go 2"), - RevoluteRobot UMETA(DisplayName = "Revolute Robot"), - BostonSpotRobot UMETA(DisplayName = "Boston Spot Robot") + None UMETA(DisplayName = "None"), + Luck_e UMETA(DisplayName = "Luck-e"), + Stretch UMETA(DisplayName = "Stretch"), + LuckyDrone UMETA(DisplayName = "Lucky Drone"), + DJIDrone UMETA(DisplayName = "DJI Drone"), + ArmLucky UMETA(DisplayName = "Arm Lucky"), + UnitreeG1 UMETA(DisplayName = "Unitree G1"), + StretchRobotV1 UMETA(DisplayName = "Stretch Robot V1"), + PandaArmRobot UMETA(DisplayName = "Panda Arm Robot"), + PuralinkRobot UMETA(DisplayName = "Puralink Robot"), + UnitreeGo2 UMETA(DisplayName = "Unitree Go 2"), + RevoluteRobot UMETA(DisplayName = "Revolute Robot"), + BostonSpotRobot UMETA(DisplayName = "Boston Spot Robot") }; UENUM(BlueprintType) enum class ELevelType : uint8 { - Home UMETA(DisplayName = "Home"), - Office UMETA(DisplayName = "Office"), - Street UMETA(DisplayName = "Street"), - TestLevel UMETA(DisplayName = "TestLevel") + Home UMETA(DisplayName = "Home"), + Office UMETA(DisplayName = "Office"), + Street UMETA(DisplayName = "Street"), + TestLevel UMETA(DisplayName = "TestLevel") }; UENUM(BlueprintType) enum class ELevelEnum : uint8 { - None UMETA(DisplayName = "None"), - TestLevel UMETA(DisplayName = "Test Level"), - Loft UMETA(DisplayName = "Loft"), - Rome UMETA(DisplayName = "Rome"), - Paris UMETA(DisplayName = "Paris"), - Marseille UMETA(DisplayName = "Marseille"), - Istanbul UMETA(DisplayName = "Istanbul"), - Office UMETA(DisplayName = "Office"), - BasicForest UMETA(DisplayName = "Basic Forest"), - NaturalForest UMETA(DisplayName = "Natural Forest"), - KitchenForArmRobot UMETA(DisplayName = "Kitchen for Arm Robot"), - PipeFabric UMETA(DisplayName = "Pipe Fabric") + None UMETA(DisplayName = "None"), + TestLevel UMETA(DisplayName = "Test Level"), + Loft UMETA(DisplayName = "Loft"), + Rome UMETA(DisplayName = "Rome"), + Paris UMETA(DisplayName = "Paris"), + Marseille UMETA(DisplayName = "Marseille"), + Istanbul UMETA(DisplayName = "Istanbul"), + Office UMETA(DisplayName = "Office"), + BasicForest UMETA(DisplayName = "Basic Forest"), + NaturalForest UMETA(DisplayName = "Natural Forest"), + KitchenForArmRobot UMETA(DisplayName = "Kitchen for Arm Robot"), + PipeFabric UMETA(DisplayName = "Pipe Fabric") }; UENUM(BlueprintType) enum class EQualityEnum : uint8 { - Low UMETA(DisplayName = "Low"), - Middle UMETA(DisplayName = "Middle"), - High UMETA(DisplayName = "High"), - Epic UMETA(DisplayName = "Epic") + Low UMETA(DisplayName = "Low"), + Middle UMETA(DisplayName = "Middle"), + High UMETA(DisplayName = "High"), + Epic UMETA(DisplayName = "Epic") }; UENUM(BlueprintType) enum class EGoalType : uint8 { - GrabAndPull UMETA(DisplayName = "Grab and Pull"), - GrabAndRotate UMETA(DisplayName = "Grab and Rotate"), - GrabAndOpen UMETA(DisplayName = "Grab and Open"), - PickAndPlace UMETA(DisplayName = "Pick and Place"), - Pick UMETA(DisplayName = "Pick"), - GrabAndInsert UMETA(DisplayName = "Grab and Insert"), - Find UMETA(DisplayName = "Find"), - Point UMETA(DisplayName = "Point"), - PointWithLaserPointer UMETA(DisplayName = "Point with Laser Pointer"), - RotateHand UMETA(DisplayName = "Rotate Hand"), - SliceDice UMETA(DisplayName = "Slice/Dice"), - Wipe UMETA(DisplayName = "Wipe"), - FoldUnfold UMETA(DisplayName = "Fold/Unfold"), - ArrangeOrganize UMETA(DisplayName = "Arrange/Organize"), - PressButton UMETA(DisplayName = "Press Button"), - PourDispense UMETA(DisplayName = "Pour/Dispense"), - NavigateSimpleEnvironments UMETA(DisplayName = "Navigate Simple Environments"), - NavigateComplexTerrain UMETA(DisplayName = "Navigate Complex Terrain"), - ClimbStairsOrRamps UMETA(DisplayName = "Climb Stairs or Ramps"), - BalanceStabilize UMETA(DisplayName = "Balance/Stabilize"), - DockingAndCharging UMETA(DisplayName = "Docking and Charging"), - ChangeGripper UMETA(DisplayName = "Change Gripper"), - Place UMETA(DisplayName = "Place") + GrabAndPull UMETA(DisplayName = "Grab and Pull"), + GrabAndRotate UMETA(DisplayName = "Grab and Rotate"), + GrabAndOpen UMETA(DisplayName = "Grab and Open"), + PickAndPlace UMETA(DisplayName = "Pick and Place"), + Pick UMETA(DisplayName = "Pick"), + GrabAndInsert UMETA(DisplayName = "Grab and Insert"), + Find UMETA(DisplayName = "Find"), + Point UMETA(DisplayName = "Point"), + PointWithLaserPointer UMETA(DisplayName = "Point with Laser Pointer"), + RotateHand UMETA(DisplayName = "Rotate Hand"), + SliceDice UMETA(DisplayName = "Slice/Dice"), + Wipe UMETA(DisplayName = "Wipe"), + FoldUnfold UMETA(DisplayName = "Fold/Unfold"), + ArrangeOrganize UMETA(DisplayName = "Arrange/Organize"), + PressButton UMETA(DisplayName = "Press Button"), + PourDispense UMETA(DisplayName = "Pour/Dispense"), + NavigateSimpleEnvironments UMETA(DisplayName = "Navigate Simple Environments"), + NavigateComplexTerrain UMETA(DisplayName = "Navigate Complex Terrain"), + ClimbStairsOrRamps UMETA(DisplayName = "Climb Stairs or Ramps"), + BalanceStabilize UMETA(DisplayName = "Balance/Stabilize"), + DockingAndCharging UMETA(DisplayName = "Docking and Charging"), + ChangeGripper UMETA(DisplayName = "Change Gripper"), + Place UMETA(DisplayName = "Place") }; UENUM(BlueprintType) enum class ESaveDataType : uint8 { - file UMETA(DisplayName = "file"), - webserver UMETA(DisplayName = "webserver"), - http UMETA(DisplayName = "http"), - debug UMETA(DisplayName = "debug"), - none UMETA(DisplayName = "none") + file UMETA(DisplayName = "file"), + webserver UMETA(DisplayName = "webserver"), + http UMETA(DisplayName = "http"), + debug UMETA(DisplayName = "debug"), + none UMETA(DisplayName = "none") }; UENUM(BlueprintType) enum class ELogItemType : uint8 { - Debug UMETA(DisplayName = "Debug"), - War UMETA(DisplayName = "War"), - Error UMETA(DisplayName = "Error"), - Consol UMETA(DisplayName = "Consol") + Debug UMETA(DisplayName = "Debug"), + War UMETA(DisplayName = "War"), + Error UMETA(DisplayName = "Error"), + Consol UMETA(DisplayName = "Consol") }; + +UENUM(BlueprintType) +enum class EFurniture : uint8 +{ + None UMETA(DisplayName = "None"), + Sofas UMETA(DisplayName = "Sofas"), + Chairs UMETA(DisplayName = "Chairs"), + Tables UMETA(DisplayName = "Tables"), + Beds UMETA(DisplayName = "Beds"), + Cabinets UMETA(DisplayName = "Cabinets"), + Shelves UMETA(DisplayName = "Shelves"), + Desks UMETA(DisplayName = "Desks"), + Doors UMETA(DisplayName = "Doors"), + Drawers UMETA(DisplayName = "Drawers") +}; + +UENUM(BlueprintType) +enum class EDecoration : uint8 +{ + None UMETA(DisplayName = "None"), + Carpets UMETA(DisplayName = "Carpets"), + Paintings UMETA(DisplayName = "Paintings"), + Vases UMETA(DisplayName = "Vases"), + Lamps UMETA(DisplayName = "Lamps"), + Mirrors UMETA(DisplayName = "Mirrors"), + Curtains UMETA(DisplayName = "Curtains"), + Plants UMETA(DisplayName = "Plants"), + Textiles UMETA(DisplayName = "Textiles"), + Lighting UMETA(DisplayName = "Lighting"), + Outdoor UMETA(DisplayName = "Outdoor"), + OfficeSupplies UMETA(DisplayName = "Office Supplies"), + Books UMETA(DisplayName = "Books"), + ToolsAndEquipment UMETA(DisplayName = "Tools And Equipment"), + Dressing UMETA(DisplayName = "Dressing"), + BasketsAndBoxes UMETA(DisplayName = "Baskets And Boxes") +}; + +UENUM(BlueprintType) +enum class EKitchenware : uint8 +{ + None UMETA(DisplayName = "None"), + Plates UMETA(DisplayName = "Plates"), + Glasses UMETA(DisplayName = "Glasses"), + Cutlery UMETA(DisplayName = "Cutlery"), + Pots UMETA(DisplayName = "Pots"), + SmallAppliances UMETA(DisplayName = "Small Appliances"), + Cups UMETA(DisplayName = "Cups"), + Bottles UMETA(DisplayName = "Bottles") +}; + +UENUM(BlueprintType) +enum class EElectronics : uint8 +{ + None UMETA(DisplayName = "None"), + Television UMETA(DisplayName = "Television"), + LargeAppliances UMETA(DisplayName = "Large Appliances"), + Oven UMETA(DisplayName = "Oven"), + Computer UMETA(DisplayName = "Computer"), + KitchenGadgets UMETA(DisplayName = "Kitchen Gadgets"), + MusicGadgets UMETA(DisplayName = "Music Gadgets"), + SmallElectronics UMETA(DisplayName = "Small Electronics") +}; + +UENUM(BlueprintType) +enum class EBathroom : uint8 +{ + None UMETA(DisplayName = "None"), + Towels UMETA(DisplayName = "Towels"), + SoapDispenser UMETA(DisplayName = "Soap Dispenser"), + ShowerCurtains UMETA(DisplayName = "Shower Curtains"), + BathMats UMETA(DisplayName = "Bath Mats"), + Toiletries UMETA(DisplayName = "Toiletries") +}; + +UENUM(BlueprintType) +enum class EItemCategory : uint8 +{ + Furniture UMETA(DisplayName = "Furniture"), + Decoration UMETA(DisplayName = "Decoration"), + Kitchenware UMETA(DisplayName = "Kitchenware"), + Electronics UMETA(DisplayName = "Electronics"), + Bathroom UMETA(DisplayName = "Bathroom") +}; + +UENUM(BlueprintType) +enum class EHoldItemType : uint8 +{ + None UMETA(DisplayName = "None"), + HoldObject UMETA(DisplayName = "Hold Object"), + DontTouch UMETA(DisplayName = "Don't Touch") +}; + +UENUM(BlueprintType) +enum class EScenarioEnum : uint8 +{ + None UMETA(DisplayName = "None"), + TidyUp UMETA(DisplayName = "Tidy Up"), + Draw UMETA(DisplayName = "Draw"), + StoveOff UMETA(DisplayName = "Stove Off") +}; + USTRUCT(BlueprintType) struct FRobotData : public FTableRowBase { GENERATED_BODY() + public: UPROPERTY(EditAnywhere, BlueprintReadWrite) ERobotsName Name; @@ -147,9 +248,10 @@ USTRUCT(BlueprintType) struct FLevelData : public FTableRowBase { GENERATED_BODY() + public: UPROPERTY(EditAnywhere, BlueprintReadWrite) - int ID; + int32 ID; UPROPERTY(EditAnywhere, BlueprintReadWrite) ELevelEnum LevelEnum; @@ -157,7 +259,6 @@ public: UPROPERTY(EditAnywhere, BlueprintReadWrite) ELevelType LevelType; - UPROPERTY(EditAnywhere, BlueprintReadWrite) TSoftObjectPtr LevelObject; @@ -178,12 +279,12 @@ public: LevelObject == Other.LevelObject && LevelImage == Other.LevelImage && bActive == Other.bActive && - RobotTypeList == Other.RobotTypeList; + RobotTypeList == Other.RobotTypeList; } FLevelData& operator=(const FLevelData& Other) { - if (this != &Other) + if (this != &Other) { ID = Other.ID; LevelEnum = Other.LevelEnum; @@ -201,6 +302,7 @@ USTRUCT(BlueprintType) struct FGoalsTaskData : public FTableRowBase { GENERATED_BODY() + public: UPROPERTY(EditAnywhere, BlueprintReadWrite) EGoalType GoalType; @@ -215,13 +317,13 @@ public: TSoftObjectPtr TargetActor; UPROPERTY(EditAnywhere, BlueprintReadWrite) - bool bIsComplate; + bool bIsComplete; UPROPERTY(EditAnywhere, BlueprintReadWrite) FVector DropOffLocation; UPROPERTY(EditAnywhere, BlueprintReadWrite) - FString ObjectName; + FString ObjectName; UPROPERTY(EditAnywhere, BlueprintReadWrite) bool bActive; @@ -230,9 +332,9 @@ public: { return GoalType == Other.GoalType && bIsStart == Other.bIsStart && - TargetLocation.Equals(Other.TargetLocation, 0.01f) && + TargetLocation.Equals(Other.TargetLocation, 0.01f) && TargetActor == Other.TargetActor && - bIsComplate == Other.bIsComplate && + bIsComplete == Other.bIsComplete && DropOffLocation.Equals(Other.DropOffLocation, 0.01f) && ObjectName == Other.ObjectName && bActive == Other.bActive; @@ -240,13 +342,13 @@ public: FGoalsTaskData& operator=(const FGoalsTaskData& Other) { - if (this != &Other) + if (this != &Other) { GoalType = Other.GoalType; bIsStart = Other.bIsStart; TargetLocation = Other.TargetLocation; TargetActor = Other.TargetActor; - bIsComplate = Other.bIsComplate; + bIsComplete = Other.bIsComplete; DropOffLocation = Other.DropOffLocation; ObjectName = Other.ObjectName; bActive = Other.bActive; @@ -259,6 +361,7 @@ USTRUCT(BlueprintType) struct FCaptureSettingsData : public FTableRowBase { GENERATED_BODY() + public: UPROPERTY(EditAnywhere, BlueprintReadWrite) FText FolderName = FText::FromString("robotdata"); @@ -303,10 +406,10 @@ public: FText NumberOfObjects = FText::FromString("1"); UPROPERTY(EditAnywhere, BlueprintReadWrite) - TArray> RandomMeshes; + TArray> RandomMeshes; UPROPERTY(EditAnywhere, BlueprintReadWrite) - bool bInfiniteCapture; + bool bInfiniteCapture; UPROPERTY(EditAnywhere, BlueprintReadWrite) FText NumberOfCaptures = FText::FromString("1"); @@ -317,7 +420,7 @@ public: FileName.EqualTo(Other.FileName) && WritesPerSec.EqualTo(Other.WritesPerSec) && IsScenario == Other.IsScenario && - TaskList == Other.TaskList && + TaskList == Other.TaskList && bLight == Other.bLight && bMaterials == Other.bMaterials && bRobotPosition == Other.bRobotPosition && @@ -327,14 +430,14 @@ public: NumberOfPeople.EqualTo(Other.NumberOfPeople) && bObjects == Other.bObjects && NumberOfObjects.EqualTo(Other.NumberOfObjects) && - RandomMeshes == Other.RandomMeshes && + RandomMeshes == Other.RandomMeshes && bInfiniteCapture == Other.bInfiniteCapture && NumberOfCaptures.EqualTo(Other.NumberOfCaptures); } FCaptureSettingsData& operator=(const FCaptureSettingsData& Other) { - if (this != &Other) + if (this != &Other) { FolderName = Other.FolderName; FileName = Other.FileName; @@ -362,6 +465,7 @@ USTRUCT(BlueprintType) struct FAllGoalListData : public FTableRowBase { GENERATED_BODY() + public: UPROPERTY(EditAnywhere, BlueprintReadWrite) EGoalType GoalType; @@ -380,9 +484,10 @@ USTRUCT(BlueprintType) struct FLuckyCode : public FTableRowBase { GENERATED_BODY() + public: UPROPERTY(EditAnywhere, BlueprintReadWrite) - int ID; + int32 ID; UPROPERTY(EditAnywhere, BlueprintReadWrite) FString Code; @@ -393,3 +498,150 @@ public: UPROPERTY(EditAnywhere, BlueprintReadWrite) bool bCallback; }; + +USTRUCT(BlueprintType) +struct FSelectableItemData : public FTableRowBase +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + int32 ID; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + EItemCategory Category; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item", meta = (EditCondition = "Category == EItemCategory::Furniture", EditConditionHides)) + EFurniture FurnitureType; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item", meta = (EditCondition = "Category == EItemCategory::Decoration", EditConditionHides)) + EDecoration DecorationType; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item", meta = (EditCondition = "Category == EItemCategory::Kitchenware", EditConditionHides)) + EKitchenware KitchenwareType; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item", meta = (EditCondition = "Category == EItemCategory::Electronics", EditConditionHides)) + EElectronics ElectronicsType; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item", meta = (EditCondition = "Category == EItemCategory::Bathroom", EditConditionHides)) + EBathroom BathroomType; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + FString Name; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + TSoftObjectPtr Icon; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + TSoftObjectPtr Mesh; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + FString Description; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + bool bIsStatic; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + FTransform Transform; + + FSelectableItemData() + : ID(0) + , Category(EItemCategory::Furniture) + , FurnitureType(EFurniture::None) + , DecorationType(EDecoration::None) + , KitchenwareType(EKitchenware::None) + , ElectronicsType(EElectronics::None) + , BathroomType(EBathroom::None) + , Name(TEXT("")) + , Icon(nullptr) + , Mesh(nullptr) + , Description(TEXT("")) + , bIsStatic(false) + , Transform(FTransform::Identity) + { + } +}; + +USTRUCT(BlueprintType) +struct FHoldItemStruct : public FTableRowBase +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + int32 ID; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + FString Name; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + TSoftObjectPtr Icon; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + TSoftObjectPtr Mesh; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + FString Description; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + EHoldItemType Type; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + EScenarioEnum ScenarioEnum; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") + FTransform Transform; + + FHoldItemStruct() + : ID(0) + , Name(TEXT("")) + , Icon(nullptr) + , Mesh(nullptr) + , Description(TEXT("")) + , Type(EHoldItemType::None) + , ScenarioEnum(EScenarioEnum::None) + , Transform(FTransform::Identity) + { + } +}; + +USTRUCT(BlueprintType) +struct FStretchRobotActuator +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Actuator") + FString Name; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Actuator") + float Min; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Actuator") + float Max; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Actuator") + int32 Index; +}; + +USTRUCT(BlueprintType) +struct FRandomMaterialTexture +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray> Meshs; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray> Materials; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray> Textures; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + bool RandomMaterial; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + bool RandomTexture; +}; diff --git a/Source/Luckyrobots/Public/GameUserWidget.h b/Source/Luckyrobots/Public/UI/GameUserWidget.h similarity index 92% rename from Source/Luckyrobots/Public/GameUserWidget.h rename to Source/Luckyrobots/Public/UI/GameUserWidget.h index 848e24fd..6a663e86 100644 --- a/Source/Luckyrobots/Public/GameUserWidget.h +++ b/Source/Luckyrobots/Public/UI/GameUserWidget.h @@ -16,7 +16,7 @@ class LUCKYROBOTS_API UGameUserWidget : public UUserWidget GENERATED_BODY() protected: - virtual void NativeConstruct(); + virtual void NativeConstruct() override; public: UFUNCTION(BlueprintImplementableEvent) diff --git a/Source/Luckyrobots/Public/CaptureSettingsUserWidget.h b/Source/Luckyrobots/Public/UI/Settings/CaptureSettingsUserWidget.h similarity index 100% rename from Source/Luckyrobots/Public/CaptureSettingsUserWidget.h rename to Source/Luckyrobots/Public/UI/Settings/CaptureSettingsUserWidget.h