User Tools

Site Tools


guides:options_for_workplace

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
guides:options_for_workplace [2020/04/23 18:20] – [Basics] vjraymonguides:options_for_workplace [2020/04/23 18:27] – [Same building for producing and selling] vjraymon
Line 35: Line 35:
 ===== Same building for producing and selling ===== ===== Same building for producing and selling =====
  
-This is an example of a simple workplace "MY_BUILDINGwith a worker of job "MY_BUILDING_JOBproducing and selling "MY_BUILDING_OUTPUT_RESOURCEof type "MY_RESOURCE_TYPE(see [[api:resource_type|RESOURCE_TYPE]]) from "MY_BUILDING_INPUT_RESOURCE":+This is an example of a simple workplace ''MY_BUILDING'' with a worker of job ''MY_BUILDING_JOB'' producing and selling ''MY_BUILDING_OUTPUT_RESOURCE'' of type ''MY_RESOURCE_TYPE'' (see [[api:resource_type|RESOURCE_TYPE]]) from ''MY_BUILDING_INPUT_RESOURCE'':
  
 <code lua> <code lua>
     myMod:register({     myMod:register({
- DataType = "BUILDING_PART", +        DataType = "BUILDING_PART", 
- Id = "MY_BUILDING_PART", +        Id = "MY_BUILDING_PART", 
- Mover = { DataType = "BUILDING_PART_MOVER_INSTANCE" }, +        Mover = { DataType = "BUILDING_PART_MOVER_INSTANCE" }, 
- ConstructorData = { +        ConstructorData = { 
- DataType = "BUILDING_CONSTRUCTOR_DEFAULT", +            DataType = "BUILDING_CONSTRUCTOR_DEFAULT", 
- CoreObjectPrefab = "MY_BUILDING_PREFAB" +            CoreObjectPrefab = "MY_BUILDING_PREFAB" 
- }, +        }, 
- AssetBuildingFunction = "MY_BUILDING_FUNCTION"+        AssetBuildingFunction = "MY_BUILDING_FUNCTION"
     })     })
  
     myMod:register({     myMod:register({
- DataType = "BUILDING_FUNCTION_MARKET", +        DataType = "BUILDING_FUNCTION_MARKET", 
-                Id = "MY_BUILDING_FUNCTION", +        Id = "MY_BUILDING_FUNCTION", 
-                TypeList = { "MY_RESOURCE_TYPE" }, +        TypeList = { "MY_RESOURCE_TYPE" }, 
- WorkerCapacity = 1, +        WorkerCapacity = 1, 
-                RelatedJob = { Job = "MY_BUILDING_JOB", Behavior = "WORK_BEHAVIOR" }, +        RelatedJob = { Job = "MY_BUILDING_JOB", Behavior = "WORK_BEHAVIOR" }, 
-                InputInventoryCapacity = { +        InputInventoryCapacity = { 
- { Resource = "MY_BUILDING_INPUT_RESOURCE", Quantity = 10 } +            { Resource = "MY_BUILDING_INPUT_RESOURCE", Quantity = 10 } 
-                }, +        }, 
-                ResourceListNeeded = { +        ResourceListNeeded = { 
- { Resource = "MY_BUILDING_INPUT_RESOURCE", Quantity = 1 } +            { Resource = "MY_BUILDING_INPUT_RESOURCE", Quantity = 1 } 
-                }, +        }, 
-                ResourceProduced = { +        ResourceProduced = { 
- { Resource = "MY_BUILDING_OUTPUT_RESOURCE", Quantity = 1 } +            { Resource = "MY_BUILDING_OUTPUT_RESOURCE", Quantity = 1 } 
-                }+        }
     })     })
 </code> </code>
guides/options_for_workplace.txt · Last modified: 2021/02/23 11:56 by minotorious

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki