User Tools

Site Tools


preview:workplaces

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
preview:workplaces [2019/05/02 14:46] – created polymorphgamespreview:workplaces [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== Workplaces ====== 
  
-A workplace is a building containing a [[preview:api:building_function_workplace|BUILDING_FUNCTION_WORKPLACE]]. 
- 
-===== Example of declaring a workplace building function ===== 
- 
-<file lua> 
--- Register the mithril factory extension B part 
-mod:register({ 
- DataType = "BUILDING_PART", 
- Id = "MITHRIL_FACTORY_EXTENSION_B_ROOT_PART", 
- -- [...] 
- BuildingFunction = {  
- DataType = "BUILDING_FUNCTION_WORKPLACE", 
- WorkerCapacity = 1, 
- RelatedJob = { Job = "MITHRIL_ARTISAN", Behavior = "WORK_BEHAVIOR" }, 
- InputInventoryCapacity = {{ Resource = "MITHRIL_ORE", Quantity = 30 }}, 
- ResourceListNeeded = {{ Resource = "MITHRIL_ORE", Quantity = 5 }}, 
- ResourceProduced = {{ Resource = "MITHRIL_NECKLACE", Quantity = 1 }} 
- }, 
- -- [...] 
-}) 
-</file> 
- 
-This example assume the mod already declared a ''MITHRIL_ARTISAN'' [[preview:api:job|job]], a ''MITHRIL_ORE'' and a ''MITHRIL_NECKLACE'' [[preview:api:resource|resources]]. 
- 
-See mod Example 02 for complete examples. 
preview/workplaces.1556822818.txt.gz · Last modified: 2019/05/02 14:46 by polymorphgames

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki