User Tools

Site Tools


mod-management-functions

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
mod-management-functions [2021/11/12 13:33]
maxime
mod-management-functions [2021/12/09 10:45]
maxime
Line 211: Line 211:
 <code lua> <code lua>
 myMod:​registerEnumValue ("​BUILDING_PART_TYPE",​ "​DECORATION"​) myMod:​registerEnumValue ("​BUILDING_PART_TYPE",​ "​DECORATION"​)
-</​code>​ 
- 
----- 
- 
-===== createData ===== 
- 
-Creates a new instance of a data type 
- 
-''​void **myMod:​createData**(//​instanceData//​)''​ 
- 
-^ Name ^ Type ^ Description ^ 
-| //''​instanceData''//​ | ''​table''​ or ''​nil''​ | the data defining the new instance. If not ''​nil'',​ the table must contain at least the instance'​s type (''​DataType'',​ see [[api|API]] for the complete list) | 
- 
-==== Example ==== 
- 
-<code lua> 
-local instanceData = { 
-    DataType = "​DATA_TYPE",​ 
-    ... 
-} 
-myMod:​createData(instanceData ) 
 </​code>​ </​code>​
  
mod-management-functions.txt ยท Last modified: 2021/12/09 10:45 by maxime