-
Notifications
You must be signed in to change notification settings - Fork 1
Data Stage Functions
Optera edited this page Apr 12, 2020
·
6 revisions
Copies prototypes and assigns new name to properties like minable.result.
- Parameters:
- prototype -> LuaPrototype
- new_name -> string
- remove_icon -> bool (optional)
- Returns:
- copied prototype -> LuaPrototype
Adds new icon layers to a prototype icon or icons.
- Parameters:
- prototype -> LuaPrototype
- new_layers -> array of icon_layer { icon, icon_size, tint (optional) }
- Returns:
- created layered icons -> array of icon_layer { icon, icon_size, tint (optional) }
- nil on error
Returns energy strings as base unit value + suffix.
Example get_energy_value('12kW') -> {12000, 'W'}
- Parameters:
- energy -> string
- Returns:
- value -> float
- unit -> string
Multiplies energy string.
Example multiply_energy_value('12kW', 2) -> '24000W'
- Parameters:
- energy -> string
- multiplicator -> double
- Returns:
- energy -> string