diff --git a/BrothelSource/brothel.blend b/BrothelSource/brothel.blend deleted file mode 100644 index 08e2f97..0000000 Binary files a/BrothelSource/brothel.blend and /dev/null differ diff --git a/BrothelSource/brothel_bckp.fbx b/BrothelSource/brothel_bckp.fbx deleted file mode 100644 index dbed961..0000000 Binary files a/BrothelSource/brothel_bckp.fbx and /dev/null differ diff --git a/BrothelSource/brothelsource.blend b/BrothelSource/brothelsource.blend new file mode 100644 index 0000000..dd44724 Binary files /dev/null and b/BrothelSource/brothelsource.blend differ diff --git a/BrothelSystem/mod.lua b/BrothelSystem/mod.lua index 375fd7b..35c78fe 100644 --- a/BrothelSystem/mod.lua +++ b/BrothelSystem/mod.lua @@ -2,8 +2,8 @@ local BrothelSystemMod = foundation.createMod(); --- Monuments (brothel) -BrothelSystemMod:dofile("scripts/brothel/monument.lua") +-- Buildings (brothel) +BrothelSystemMod:dofile("scripts/brothel/building.lua") -- Jobs BrothelSystemMod:dofile("scripts/jobs.lua") diff --git a/BrothelSystem/models/brothel.fbx b/BrothelSystem/models/brothel.fbx index 50139d1..b0bc495 100644 Binary files a/BrothelSystem/models/brothel.fbx and b/BrothelSystem/models/brothel.fbx differ diff --git a/BrothelSystem/models/brothel.fbx.meta b/BrothelSystem/models/brothel.fbx.meta index d24f4f0..3205b28 100644 --- a/BrothelSystem/models/brothel.fbx.meta +++ b/BrothelSystem/models/brothel.fbx.meta @@ -1,858 +1,38 @@ - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - + @@ -865,2287 +45,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -3153,21 +59,40 @@ - + - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + + + + + + @@ -3177,20 +102,28 @@ - - + + - - + + - - + + - - + + + + + + + + + + diff --git a/BrothelSystem/scripts/brothel/monument.lua b/BrothelSystem/scripts/brothel/building.lua similarity index 56% rename from BrothelSystem/scripts/brothel/monument.lua rename to BrothelSystem/scripts/brothel/building.lua index 1dc3f13..c47f491 100644 --- a/BrothelSystem/scripts/brothel/monument.lua +++ b/BrothelSystem/scripts/brothel/building.lua @@ -7,40 +7,32 @@ BrothelSystemMod:registerAssetProcessor("models/brothel.fbx", { DataType = "BUILDING_ASSET_PROCESSOR" }) --- Register all mithril factory building parts and their properties +-- Register all brothel building parts and their properties BrothelSystemMod:dofile("scripts/brothel/building_parts.lua") -- Register the brothel monument BrothelSystemMod:register({ - DataType = "MONUMENT", + --Déclare que l'objet que l'on crée appartient à la class BUILDING + DataType = "BUILDING", + --Déclare la classe de l'objet que l'on crée Id = "BROTHEL", Name = "BROTHEL_NAME", Description = "BROTHEL_DESC", - BuildingType = BUILDING_TYPE.MONUMENT, + --Renseigne le champ Building Type. cela va permettre de classer l'objet dans les menus + BuildingType = "GENERAL", BuildingPartSetList = { { Name = "BROTHEL_CORE", - BuildingPartList = { "BROTHEL" } - }, - { - Name = "ENTRANCE", - BuildingPartList = { - "BROTHEL_DOOR_A_PART" - } + BuildingPartList = { "BROTHEL_WORKPLACE_PART" + } + } - }, - RequiredPartList = { - -- Necessarily a list of 'MONUMENT_REQUIRED_PART_PAIR', no need to specify the DataType of each element of the list - { Category = "CORE", Quantity = 1 }, - { Category = "DOOR", Quantity = 1 } - }, - IsManuallyUnlocked = true, - IsDestructible = true, - IsEditable = true, - IsClearTrees = true + } }) + + BrothelSystemMod:register({ DataType = "UNLOCKABLE_BUILDING", Id = "UNLOCKABLE_BROTHEL", diff --git a/BrothelSystem/scripts/brothel/building_parts.lua b/BrothelSystem/scripts/brothel/building_parts.lua index d3c854d..84c6997 100644 --- a/BrothelSystem/scripts/brothel/building_parts.lua +++ b/BrothelSystem/scripts/brothel/building_parts.lua @@ -1,106 +1,55 @@ local BrothelSystemMod = ... -------------------------------BROTHEL--------------------------------- +------------------------------BROTHEL WORKPLACE--------------------------------- +-----------------------------------MODEL---------------------------------------- -- Register core prefab nodes -BrothelSystemMod:registerAssetId("models/brothel.fbx/Prefab/Brothel/Core/RootPart", "BROTHEL_CORE_ROOT_PREFAB") -BrothelSystemMod:registerAssetId("models/brothel.fbx/Prefab/Brothel/Core/TopPart", "BROTHEL_CORE_TOP_PREFAB") -BrothelSystemMod:registerAssetId("models/brothel.fbx/Prefab/Brothel/Core/Tiling1Part", "BROTHEL_CORE_TILING1_PREFAB") -BrothelSystemMod:registerAssetId("models/brothel.fbx/Prefab/Brothel/Core/Tiling2Part", "BROTHEL_CORE_TILING2_PREFAB") -BrothelSystemMod:registerAssetId("models/brothel.fbx/Prefab/Brothel/Core/Tiling3Part", "BROTHEL_CORE_TILING3_PREFAB") - --- Register door prefab nodes -BrothelSystemMod:registerAssetId("models/brothel.fbx/Prefab/Brothel/DoorAPart", "BROTHEL_DOOR_A_PREFAB") - --------------------------------------------------------------------------- - --- Create default building part registering function -function registerDefaultBuildingPart(_nodePrefix) - BrothelSystemMod:register({ - DataType = "BUILDING_PART", - Id = _nodePrefix .. "_PART", - Mover = { DataType = "BUILDING_PART_MOVER" }, - ConstructorData = { DataType = "BUILDING_CONSTRUCTOR_DEFAULT", CoreObjectPrefab = _nodePrefix .. "_PREFAB" } - }) -end - -local defaultNodePrefixList = { - "BROTHEL_CORE_TOP", - "BROTHEL_CORE_TILING1", - "BROTHEL_CORE_TILING2", - "BROTHEL_CORE_TILING3" -} - --- Register simple building part assets -for i, nodePrefix in ipairs(defaultNodePrefixList) do - registerDefaultBuildingPart(nodePrefix) -end - --------------------------------------------------------------------------- - -BrothelSystemMod:register({ - DataType = "BUILDING_FUNCTION_WORKPLACE", - Id = "BROTHEL_CORE_FUNCTION", - WorkerCapacity = 4, - RelatedJob = { Job = "TRANSPORTER", Behavior = "WORK_BEHAVIOR" }, - ResourceProduced = { -- Necessarily a list of 'RESOURCE_QUANTITY_PAIR', no need to specify the DataType - { Resource = "BARREL", Quantity = 5 } - } +BrothelSystemMod:registerAssetId("models/brothel.fbx/Prefab/Brothel", "BROTHEL_CORE_PREFAB") +BrothelSystemMod:registerPrefabComponent("models/brothel.fbx/Prefab/Brothel", +{ + DataType = "COMP_BUILDING_PART", + HasBuildingZone = true, + BuildingZone = { 3, 3 } }) --- Register the brothel core part +-- Register the brothel workplace part BrothelSystemMod:register({ DataType = "BUILDING_PART", - Id = "BROTHEL", - Name = "BROTHEL_NAME", - Description = "BROTHEL_DESC", - Category = "CORE", - Mover = { DataType = "BUILDING_PART_MOVER_INSTANCE" }, - ConstructorData = { - DataType = "BUILDING_CONSTRUCTOR_SCALER", -- Since there are different types of building constructor, 'DataType' is necessary here - CoreObjectPrefab = "BROTHEL_CORE_ROOT_PREFAB", - EndPart = "BROTHEL_CORE_TOP_PART", - FillerList = { - "BROTHEL_CORE_TILING1_PART", - "BROTHEL_CORE_TILING2_PART", - "BROTHEL_CORE_TILING3_PART" - }, - BasementFillerList = { - "BROTHEL_CORE_TILING1_PART", - "BROTHEL_CORE_TILING2_PART", - "BROTHEL_CORE_TILING3_PART" - }, - }, - BuildingFunction = "BROTHEL_CORE_FUNCTION", - Cost = { - UpkeepCost = { -- List of RESOURCE_QUANTITY_PAIR - { Resource = "GOLD", Quantity = 3 } - }, - RessourcesNeeded = { -- List of RESOURCE_QUANTITY_PAIR - { Resource = "WOOD", Quantity = 30 }, - { Resource = "STONE", Quantity = 20 } - } - } -}) - --- Register the brothel door A part -BrothelSystemMod:register({ - DataType = "BUILDING_PART", - Id = "BROTHEL_DOOR_A_PART", - Name = "BROTHEL_DOOR_A_NAME", - Description = "BROTHEL_DOOR_A_DESC", - Category = "DOOR", - Mover = { DataType = "BUILDING_PART_MOVER_INSTANCE" }, + Id = "BROTHEL_WORKPLACE_PART", ConstructorData = { DataType = "BUILDING_CONSTRUCTOR_DEFAULT", - CoreObjectPrefab = "BROTHEL_DOOR_A_PREFAB" + CoreObjectPrefab = "BROTHEL_CORE_PREFAB" }, +--Ca c'est pour déclarer le visuel de construction si il y en a un ! + ConstructionVisual = "BROTHEL_CORE_PREFAB", Cost = { - RessourcesNeeded = { -- List of RESOURCE_QUANTITY_PAIR + UpkeepCost = { + { Resource = "GOLD", Quantity = 1 } + }, + RessourcesNeeded = { { Resource = "WOOD", Quantity = 5 } } - } + }, + AssetBuildingFunction = "BROTHEL_FUNCTION" }) +-----------------------------------FUNCTION---------------------------------------- +BrothelSystemMod:register({ + DataType = "BUILDING_FUNCTION_WORKPLACE", + Id = "BROTHEL_FUNCTION", + WorkerCapacity = 5, + RelatedJob = { + Job = "HOOKER", Behavior = "WORK_BEHAVIOR" + }, + InputInventoryCapacity = { + { Resource = "WOOLEN_CLOTH", Quantity = 50 } + }, + ResourceListNeeded = { + { Resource = "WOOLEN_CLOTH", Quantity = 1 } + }, + ResourceProduced = { + { Resource = "BARREL", Quantity = 1 } + } +}) \ No newline at end of file diff --git a/BrothelSystem/scripts/jobs.lua b/BrothelSystem/scripts/jobs.lua index 41ebe21..2a24698 100644 --- a/BrothelSystem/scripts/jobs.lua +++ b/BrothelSystem/scripts/jobs.lua @@ -1,27 +1,13 @@ -local mod = ... +local BrothelSystemMod = ... -- Register mithril miner job -mod:register({ +BrothelSystemMod:register({ DataType = "JOB", - Id = "MITHRIL_MINER", - JobName = "MITHRIL_MINER_NAME", - JobDescription = "MITHRIL_MINER_DESC", + Id = "HOOKER", + JobName = "HOOKER_NAME", + JobDescription = "HOOKER_DESC", CharacterSetup = { - WorkAnimation = AGENT_ANIMATION.MINE, - }, - IsLockedByDefault = true, - UseWorkplaceBehavior = true, - AssetJobProgression = "DEFAULT_JOB_PROGRESSION" -}) - --- Register mithril artisan job (used here to craft chainmails AND necklaces) -mod:register({ - DataType = "JOB", - Id = "MITHRIL_ARTISAN", - JobName = "MITHRIL_ARTISAN_NAME", - JobDescription = "MITHRIL_ARTISAN_DESC", - CharacterSetup = { - WorkAnimation = AGENT_ANIMATION.SMITHING, + WorkAnimation = AGENT_ANIMATION.IDLE, }, IsLockedByDefault = true, UseWorkplaceBehavior = true,