Add Estate Unlock + Jobs .lua
This commit is contained in:
parent
cf54a845cd
commit
14ed184178
2 changed files with 53 additions and 5 deletions
|
@ -1,8 +1,11 @@
|
||||||
local mod = foundation.createMod();
|
local BrothelSystemMod = foundation.createMod();
|
||||||
|
|
||||||
mod:registerAssetId("models/brothel.fbx/Prefab/Brothel", "PREFAB_BROTHEL")
|
BrothelSystemMod:registerAssetId("models/brothel.fbx/Prefab/Brothel", "PREFAB_BROTHEL")
|
||||||
|
|
||||||
mod:register({
|
-- Jobs
|
||||||
|
BrothelSystemMod:dofile("scripts/jobs.lua")
|
||||||
|
|
||||||
|
BrothelSystemMod:register({
|
||||||
DataType = "BUILDING",
|
DataType = "BUILDING",
|
||||||
Id = "BROTHEL",
|
Id = "BROTHEL",
|
||||||
Name = "BROTHEL_NAME",
|
Name = "BROTHEL_NAME",
|
||||||
|
@ -16,7 +19,7 @@ mod:register({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
mod:register({
|
BrothelSystemMod:register({
|
||||||
DataType = "BUILDING_PART",
|
DataType = "BUILDING_PART",
|
||||||
Id = "BROTHEL",
|
Id = "BROTHEL",
|
||||||
Name = "BROTHEL_NAME",
|
Name = "BROTHEL_NAME",
|
||||||
|
@ -26,4 +29,20 @@ mod:register({
|
||||||
DataType = "BUILDING_CONSTRUCTOR_DEFAULT",
|
DataType = "BUILDING_CONSTRUCTOR_DEFAULT",
|
||||||
CoreObjectPrefab = "PREFAB_BROTHEL"
|
CoreObjectPrefab = "PREFAB_BROTHEL"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Override default Labour estate
|
||||||
|
BrothelSystemMod:override({
|
||||||
|
Id = "LABOUR",
|
||||||
|
EstateProgressList = { -- Add a new estate progress tier
|
||||||
|
Action = "APPEND",
|
||||||
|
{
|
||||||
|
DataType = "ESTATE_PROGRESS_TIER",
|
||||||
|
SplendorRequired = 10,
|
||||||
|
VillagerStatusRequired = { Status = "SERF", Quantity = 20 },
|
||||||
|
UpgradeList = {
|
||||||
|
"UNLOCKABLE_MITHRIL_FACTORY"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
29
BrothelSystem/scripts/jobs.lua
Normal file
29
BrothelSystem/scripts/jobs.lua
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
local mod = ...
|
||||||
|
|
||||||
|
-- Register mithril miner job
|
||||||
|
mod:register({
|
||||||
|
DataType = "JOB",
|
||||||
|
Id = "MITHRIL_MINER",
|
||||||
|
JobName = "MITHRIL_MINER_NAME",
|
||||||
|
JobDescription = "MITHRIL_MINER_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,
|
||||||
|
},
|
||||||
|
IsLockedByDefault = true,
|
||||||
|
UseWorkplaceBehavior = true,
|
||||||
|
AssetJobProgression = "DEFAULT_JOB_PROGRESSION"
|
||||||
|
})
|
Loading…
Reference in a new issue