Add working brothel building
This commit is contained in:
parent
a7fb4d140d
commit
eb6db5aed9
9 changed files with 124 additions and 3264 deletions
Binary file not shown.
Binary file not shown.
BIN
BrothelSource/brothelsource.blend
Normal file
BIN
BrothelSource/brothelsource.blend
Normal file
Binary file not shown.
|
@ -2,8 +2,8 @@ local BrothelSystemMod = foundation.createMod();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Monuments (brothel)
|
-- Buildings (brothel)
|
||||||
BrothelSystemMod:dofile("scripts/brothel/monument.lua")
|
BrothelSystemMod:dofile("scripts/brothel/building.lua")
|
||||||
|
|
||||||
-- Jobs
|
-- Jobs
|
||||||
BrothelSystemMod:dofile("scripts/jobs.lua")
|
BrothelSystemMod:dofile("scripts/jobs.lua")
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -7,40 +7,32 @@ BrothelSystemMod:registerAssetProcessor("models/brothel.fbx", {
|
||||||
DataType = "BUILDING_ASSET_PROCESSOR"
|
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")
|
BrothelSystemMod:dofile("scripts/brothel/building_parts.lua")
|
||||||
|
|
||||||
|
|
||||||
-- Register the brothel monument
|
-- Register the brothel monument
|
||||||
BrothelSystemMod:register({
|
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",
|
Id = "BROTHEL",
|
||||||
Name = "BROTHEL_NAME",
|
Name = "BROTHEL_NAME",
|
||||||
Description = "BROTHEL_DESC",
|
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 = {
|
BuildingPartSetList = {
|
||||||
{
|
{
|
||||||
Name = "BROTHEL_CORE",
|
Name = "BROTHEL_CORE",
|
||||||
BuildingPartList = { "BROTHEL" }
|
BuildingPartList = { "BROTHEL_WORKPLACE_PART"
|
||||||
},
|
}
|
||||||
{
|
|
||||||
Name = "ENTRANCE",
|
|
||||||
BuildingPartList = {
|
|
||||||
"BROTHEL_DOOR_A_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({
|
BrothelSystemMod:register({
|
||||||
DataType = "UNLOCKABLE_BUILDING",
|
DataType = "UNLOCKABLE_BUILDING",
|
||||||
Id = "UNLOCKABLE_BROTHEL",
|
Id = "UNLOCKABLE_BROTHEL",
|
|
@ -1,106 +1,55 @@
|
||||||
local BrothelSystemMod = ...
|
local BrothelSystemMod = ...
|
||||||
|
|
||||||
|
|
||||||
------------------------------BROTHEL---------------------------------
|
------------------------------BROTHEL WORKPLACE---------------------------------
|
||||||
|
|
||||||
|
-----------------------------------MODEL----------------------------------------
|
||||||
-- Register core prefab nodes
|
-- Register core prefab nodes
|
||||||
BrothelSystemMod:registerAssetId("models/brothel.fbx/Prefab/Brothel/Core/RootPart", "BROTHEL_CORE_ROOT_PREFAB")
|
BrothelSystemMod:registerAssetId("models/brothel.fbx/Prefab/Brothel", "BROTHEL_CORE_PREFAB")
|
||||||
BrothelSystemMod:registerAssetId("models/brothel.fbx/Prefab/Brothel/Core/TopPart", "BROTHEL_CORE_TOP_PREFAB")
|
BrothelSystemMod:registerPrefabComponent("models/brothel.fbx/Prefab/Brothel",
|
||||||
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")
|
DataType = "COMP_BUILDING_PART",
|
||||||
BrothelSystemMod:registerAssetId("models/brothel.fbx/Prefab/Brothel/Core/Tiling3Part", "BROTHEL_CORE_TILING3_PREFAB")
|
HasBuildingZone = true,
|
||||||
|
BuildingZone = { 3, 3 }
|
||||||
|
})
|
||||||
|
|
||||||
-- Register door prefab nodes
|
-- Register the brothel workplace part
|
||||||
BrothelSystemMod:registerAssetId("models/brothel.fbx/Prefab/Brothel/DoorAPart", "BROTHEL_DOOR_A_PREFAB")
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
-- Create default building part registering function
|
|
||||||
function registerDefaultBuildingPart(_nodePrefix)
|
|
||||||
BrothelSystemMod:register({
|
BrothelSystemMod:register({
|
||||||
DataType = "BUILDING_PART",
|
DataType = "BUILDING_PART",
|
||||||
Id = _nodePrefix .. "_PART",
|
Id = "BROTHEL_WORKPLACE_PART",
|
||||||
Mover = { DataType = "BUILDING_PART_MOVER" },
|
ConstructorData = {
|
||||||
ConstructorData = { DataType = "BUILDING_CONSTRUCTOR_DEFAULT", CoreObjectPrefab = _nodePrefix .. "_PREFAB" }
|
DataType = "BUILDING_CONSTRUCTOR_DEFAULT",
|
||||||
})
|
CoreObjectPrefab = "BROTHEL_CORE_PREFAB"
|
||||||
end
|
},
|
||||||
|
--Ca c'est pour déclarer le visuel de construction si il y en a un !
|
||||||
local defaultNodePrefixList = {
|
ConstructionVisual = "BROTHEL_CORE_PREFAB",
|
||||||
"BROTHEL_CORE_TOP",
|
Cost = {
|
||||||
"BROTHEL_CORE_TILING1",
|
UpkeepCost = {
|
||||||
"BROTHEL_CORE_TILING2",
|
{ Resource = "GOLD", Quantity = 1 }
|
||||||
"BROTHEL_CORE_TILING3"
|
},
|
||||||
|
RessourcesNeeded = {
|
||||||
|
{ Resource = "WOOD", Quantity = 5 }
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
AssetBuildingFunction = "BROTHEL_FUNCTION"
|
||||||
|
})
|
||||||
|
|
||||||
-- Register simple building part assets
|
-----------------------------------FUNCTION----------------------------------------
|
||||||
for i, nodePrefix in ipairs(defaultNodePrefixList) do
|
|
||||||
registerDefaultBuildingPart(nodePrefix)
|
|
||||||
end
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BrothelSystemMod:register({
|
BrothelSystemMod:register({
|
||||||
DataType = "BUILDING_FUNCTION_WORKPLACE",
|
DataType = "BUILDING_FUNCTION_WORKPLACE",
|
||||||
Id = "BROTHEL_CORE_FUNCTION",
|
Id = "BROTHEL_FUNCTION",
|
||||||
WorkerCapacity = 4,
|
WorkerCapacity = 5,
|
||||||
RelatedJob = { Job = "TRANSPORTER", Behavior = "WORK_BEHAVIOR" },
|
RelatedJob = {
|
||||||
ResourceProduced = { -- Necessarily a list of 'RESOURCE_QUANTITY_PAIR', no need to specify the DataType
|
Job = "HOOKER", Behavior = "WORK_BEHAVIOR"
|
||||||
{ Resource = "BARREL", Quantity = 5 }
|
},
|
||||||
|
InputInventoryCapacity = {
|
||||||
|
{ Resource = "WOOLEN_CLOTH", Quantity = 50 }
|
||||||
|
},
|
||||||
|
ResourceListNeeded = {
|
||||||
|
{ Resource = "WOOLEN_CLOTH", Quantity = 1 }
|
||||||
|
},
|
||||||
|
ResourceProduced = {
|
||||||
|
{ Resource = "BARREL", Quantity = 1 }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Register the brothel core 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" },
|
|
||||||
ConstructorData = {
|
|
||||||
DataType = "BUILDING_CONSTRUCTOR_DEFAULT",
|
|
||||||
CoreObjectPrefab = "BROTHEL_DOOR_A_PREFAB"
|
|
||||||
},
|
|
||||||
Cost = {
|
|
||||||
RessourcesNeeded = { -- List of RESOURCE_QUANTITY_PAIR
|
|
||||||
{ Resource = "WOOD", Quantity = 5 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,13 @@
|
||||||
local mod = ...
|
local BrothelSystemMod = ...
|
||||||
|
|
||||||
-- Register mithril miner job
|
-- Register mithril miner job
|
||||||
mod:register({
|
BrothelSystemMod:register({
|
||||||
DataType = "JOB",
|
DataType = "JOB",
|
||||||
Id = "MITHRIL_MINER",
|
Id = "HOOKER",
|
||||||
JobName = "MITHRIL_MINER_NAME",
|
JobName = "HOOKER_NAME",
|
||||||
JobDescription = "MITHRIL_MINER_DESC",
|
JobDescription = "HOOKER_DESC",
|
||||||
CharacterSetup = {
|
CharacterSetup = {
|
||||||
WorkAnimation = AGENT_ANIMATION.MINE,
|
WorkAnimation = AGENT_ANIMATION.IDLE,
|
||||||
},
|
|
||||||
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,
|
|
||||||
},
|
},
|
||||||
IsLockedByDefault = true,
|
IsLockedByDefault = true,
|
||||||
UseWorkplaceBehavior = true,
|
UseWorkplaceBehavior = true,
|
||||||
|
|
Loading…
Reference in a new issue