diff --git a/.gitignore b/.gitignore
index 167179f..a887929 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
BrothelSystem/generated_ids.lua
BrothelSource/generated_ids.lua
+
+Example 02/
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/brothel.blend b/BrothelSource/brothelsource.blend
similarity index 63%
rename from BrothelSource/brothel.blend
rename to BrothelSource/brothelsource.blend
index 4d61107..dd44724 100644
Binary files a/BrothelSource/brothel.blend and b/BrothelSource/brothelsource.blend differ
diff --git a/BrothelSystem/mod.lua b/BrothelSystem/mod.lua
index cab5870..35c78fe 100644
--- a/BrothelSystem/mod.lua
+++ b/BrothelSystem/mod.lua
@@ -1,29 +1,27 @@
-local mod = foundation.createMod();
+local BrothelSystemMod = foundation.createMod();
-mod:registerAssetId("models/brothel.fbx/Prefab/Brothel", "PREFAB_BROTHEL")
-mod:register({
- DataType = "BUILDING",
- Id = "BROTHEL",
- Name = "BROTHEL_NAME",
- Description = "BROTHEL_DESC",
- BuildingType = "GENERAL",
- BuildingPartSetList = {
- {
- Name = "BROTHEL_NAME",
- BuildingPartList = { "BROTHEL" }
+
+-- Buildings (brothel)
+BrothelSystemMod:dofile("scripts/brothel/building.lua")
+
+-- Jobs
+BrothelSystemMod:dofile("scripts/jobs.lua")
+
+
+
+-- Override default Labour estate
+BrothelSystemMod:override({
+ Id = "LABOUR",
+ EstateProgressList = { -- Add a new estate progress tier
+ Action = "APPEND",
+ {
+ DataType = "ESTATE_PROGRESS_TIER",
+ SplendorRequired = 0,
+ VillagerStatusRequired = { Status = "SERF", Quantity = 0 },
+ UpgradeList = {
+ "UNLOCKABLE_BROTHEL"
+ }
}
}
})
-
-mod:register({
- DataType = "BUILDING_PART",
- Id = "BROTHEL",
- Name = "BROTHEL_NAME",
- Description = "BROTHEL_DESC",
- Category = "GENERAL",
- ConstructorData = {
- DataType = "BUILDING_CONSTRUCTOR_DEFAULT",
- CoreObjectPrefab = "PREFAB_BROTHEL"
- }
-})
\ No newline at end of file
diff --git a/BrothelSystem/models/brothel.fbx b/BrothelSystem/models/brothel.fbx
index 7eac42a..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 3564c89..3205b28 100644
--- a/BrothelSystem/models/brothel.fbx.meta
+++ b/BrothelSystem/models/brothel.fbx.meta
@@ -1,36 +1,38 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -46,41 +48,51 @@
-
+
-
+
+
+
+
-
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
+
+
+ -
+
+
+
@@ -90,27 +102,27 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/BrothelSystem/models/brothelSource.fbx b/BrothelSystem/models/brothelSource.fbx
new file mode 100644
index 0000000..7eac42a
Binary files /dev/null and b/BrothelSystem/models/brothelSource.fbx differ
diff --git a/BrothelSystem/models/brothelSource.fbx.meta b/BrothelSystem/models/brothelSource.fbx.meta
new file mode 100644
index 0000000..23c015f
--- /dev/null
+++ b/BrothelSystem/models/brothelSource.fbx.meta
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
-
+
+
+
-
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+
+
+
diff --git a/BrothelSystem/scripts/brothel/building.lua b/BrothelSystem/scripts/brothel/building.lua
new file mode 100644
index 0000000..c47f491
--- /dev/null
+++ b/BrothelSystem/scripts/brothel/building.lua
@@ -0,0 +1,48 @@
+local BrothelSystemMod = ...
+
+---------------------
+
+-- Apply building asset processor
+BrothelSystemMod:registerAssetProcessor("models/brothel.fbx", {
+ DataType = "BUILDING_ASSET_PROCESSOR"
+})
+
+-- Register all brothel building parts and their properties
+BrothelSystemMod:dofile("scripts/brothel/building_parts.lua")
+
+
+-- Register the brothel monument
+BrothelSystemMod:register({
+ --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",
+ --Renseigne le champ Building Type. cela va permettre de classer l'objet dans les menus
+ BuildingType = "GENERAL",
+ BuildingPartSetList = {
+ {
+ Name = "BROTHEL_CORE",
+ BuildingPartList = { "BROTHEL_WORKPLACE_PART"
+ }
+
+ }
+ }
+})
+
+
+
+BrothelSystemMod:register({
+ DataType = "UNLOCKABLE_BUILDING",
+ Id = "UNLOCKABLE_BROTHEL",
+ Name = "UNLOCKABLE_BROTHEL_NAME",
+ Description = "UNLOCKABLE_BROTHEL_DESC",
+ EstateInfluenceCostList = {
+ { Estate = "LABOUR", Quantity = 0 }
+ },
+ RelatedProp = "BROTHEL"
+})
+
+------------- LIMIT ------
+
diff --git a/BrothelSystem/scripts/brothel/building_parts.lua b/BrothelSystem/scripts/brothel/building_parts.lua
new file mode 100644
index 0000000..fd5a86f
--- /dev/null
+++ b/BrothelSystem/scripts/brothel/building_parts.lua
@@ -0,0 +1,55 @@
+local BrothelSystemMod = ...
+
+
+------------------------------BROTHEL WORKPLACE---------------------------------
+
+-----------------------------------MODEL----------------------------------------
+-- Register core prefab nodes
+BrothelSystemMod:registerAssetId("models/brothel.fbx/Prefab/Brothel", "BROTHEL_CORE_PREFAB")
+BrothelSystemMod:registerPrefabComponent("models/brothel.fbx/Prefab/Brothel",
+{
+ DataType = "COMP_BUILDING_PART",
+ HasBuildingZone = true,
+ BuildingZone = { 10, 10 }
+})
+
+-- Register the brothel workplace part
+BrothelSystemMod:register({
+ DataType = "BUILDING_PART",
+ Id = "BROTHEL_WORKPLACE_PART",
+ ConstructorData = {
+ DataType = "BUILDING_CONSTRUCTOR_DEFAULT",
+ 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 = {
+ 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
new file mode 100644
index 0000000..2a24698
--- /dev/null
+++ b/BrothelSystem/scripts/jobs.lua
@@ -0,0 +1,15 @@
+local BrothelSystemMod = ...
+
+-- Register mithril miner job
+BrothelSystemMod:register({
+ DataType = "JOB",
+ Id = "HOOKER",
+ JobName = "HOOKER_NAME",
+ JobDescription = "HOOKER_DESC",
+ CharacterSetup = {
+ WorkAnimation = AGENT_ANIMATION.IDLE,
+ },
+ IsLockedByDefault = true,
+ UseWorkplaceBehavior = true,
+ AssetJobProgression = "DEFAULT_JOB_PROGRESSION"
+})
\ No newline at end of file