User Tools

Site Tools


mod-management-functions

Differences

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

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
mod-management-functions [2020/05/06 16:49] – created maximemod-management-functions [2020/07/07 17:16] maxime
Line 1: Line 1:
 ====== Mod management functions ====== ====== Mod management functions ======
 +
 +All these functions are available on your mod object
  
 ===== dofile ===== ===== dofile =====
Line 127: Line 129:
  
 <code lua> <code lua>
-local flagArray = { "BRIDGE", "PLATEFORM" }+local flagArray = { "BRIDGE", "PLATFORM" }
 myMod:configurePrefabFlagList(prefabPath, flagArray) myMod:configurePrefabFlagList(prefabPath, flagArray)
 +</code>
 +
 +----
 +
 +===== registerEnumValue =====
 +
 +Registers a new dynamic enumeration value
 +
 +''void **myMod:registerEnumValue **(//enumeration//, //stringValue//)''
 +
 +^ Name ^ Type ^ Description ^
 +| //''enumeration''// | ''string'' | the enumeration type |
 +| //''stringValue''// | ''string'' | the new value to add |
 +
 +==== Example ====
 +
 +<code lua>
 +myMod:registerEnumValue ("BUILDING_PART_TYPE", "DECORATION")
 </code> </code>
  
mod-management-functions.txt · Last modified: 2022/10/07 11:18 by maxime

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki