7 months ago
0.17 - 1.1
2.40K
Owner:
Hermios
Source:
https://github.com/Hermios/HermiosLibs
Homepage:
https://forums.factorio.com/viewtopic...
License:
MIT
Created:
5 years ago
Latest Version:
1.0.15 (7 months ago)
Factorio version:
0.17 - 1.1
Downloaded by:
2.40K users

Please send any request to Github (See Source URL!)

This mod provides a list of tools that can be used for other mods as well.
In the Prototype Stage:
- createdata(type,name_to_clone,new_name, specific_data_to_update,is_invisible):
Create a new data (item,prototype etc.) based on existing data. In the new data, some specific elements (like name, replaced by, icons etc.) are automatically udpated
- type: type of the cloned data, and of the new data
- name_to_clone: name of the cloned data
- new_name: name of the new data
- specific_data_to_update (optional): table that contains all elements to update specifically (for example, a new length of wire for poles)
- is_invisible (optional): if true, specific parameters of the new data are hardcoded to ensure that the element is not visible. Can apply to items or to prototypes.

In the Runtime Stage:
- calculate distance between 2 objects
- compare data when comparator is string (>,<,=...)
- Connect all wires (copper, green, red) between 2 entities
- Get unitid of element (entity or train)

Lua optimizations:
- has_value(array, value): Check if array has specified value
- get_first_key(dictionary): Get first index from a dictionary
- get_index(dictionary,value): Find the index for this value in the dictionary
- remove_value(dictionary,value): Remove element from a table based on its value
- string.starts(str,startstr): Check if this str starts with startsstring
- string.ends(str,endstr): Check if this str ends with endstr
- string.split(str,sep): Split the str based on separator sep