Skip to content

Commit b9d8f3d

Browse files
committed
Factorio API version 2.0.55
1 parent 103d584 commit b9d8f3d

File tree

9 files changed

+38
-17
lines changed

9 files changed

+38
-17
lines changed

dist/classes.d.ts

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.54
5+
// Factorio version 2.0.55
66
// API version 6
77

88
declare namespace runtime {
@@ -11707,19 +11707,30 @@ interface LuaHeatEnergySourcePrototype {
1170711707
readonly valid: boolean;
1170811708
}
1170911709
/**
11710-
* Provides various helper and utility functions. It is accessible through the global object named `helpers`.
11710+
* Provides various helper and utility functions. It is accessible through the global object named `helpers` in all stages (settings, prototype and runtime).
1171111711
*/
1171211712
interface LuaHelpers {
1171311713
/**
1171411714
* Goes over all items, entities, tiles, recipes, technologies among other things and logs if the locale is incorrect.
1171511715
*
1171611716
* Also prints true/false if called from the console.
11717+
*
11718+
* Not available in settings and prototype stages.
1171711719
*/
1171811720
check_prototype_translations(this: void): void;
11721+
/**
11722+
* Compares 2 version strings.
11723+
* @param first First version string to compare.
11724+
* @param second Second version string to compare.
11725+
* @returns -1 if first is smaller than second, 0 if first equal second, 1 if first is greater than second.
11726+
*/
11727+
compare_versions(this: void, first: string, second: string): int;
1171911728
/**
1172011729
* Creates a {@link LuaProfiler | runtime:LuaProfiler}, which is used for measuring script performance.
1172111730
*
1172211731
* LuaProfiler cannot be serialized.
11732+
*
11733+
* Not available in settings and prototype stages.
1172311734
* @param stopped Create the timer stopped
1172411735
*/
1172511736
create_profiler(this: void, stopped?: boolean): LuaProfiler;
@@ -11752,11 +11763,15 @@ interface LuaHelpers {
1175211763
evaluate_expression(this: void, expression: MathExpression, variables?: Record<string, double>): double;
1175311764
/**
1175411765
* Checks if the given SoundPath is valid.
11766+
*
11767+
* Not available in settings and prototype stages.
1175511768
* @param sound_path Path to the sound.
1175611769
*/
1175711770
is_valid_sound_path(this: void, sound_path: SoundPath): boolean;
1175811771
/**
1175911772
* Checks if the given SpritePath is valid and contains a loaded sprite. The existence of the image is not checked for paths of type `file`.
11773+
*
11774+
* Not available in settings and prototype stages.
1176011775
* @param sprite_path Path to the image.
1176111776
*/
1176211777
is_valid_sprite_path(this: void, sprite_path: SpritePath): boolean;
@@ -11768,6 +11783,8 @@ interface LuaHelpers {
1176811783
json_to_table(this: void, json: string): AnyBasic | null;
1176911784
/**
1177011785
* Convert a map exchange string to map gen settings and map settings.
11786+
*
11787+
* Not available in settings and prototype stages.
1177111788
*/
1177211789
parse_map_exchange_string(this: void, map_exchange_string: string): MapExchangeStringData;
1177311790
/**
@@ -11784,9 +11801,13 @@ interface LuaHelpers {
1178411801
* @param filename The name of the file. Providing a directory path (ex. `"save/here/example.txt"`) will create the necessary folder structure in `script-output`.
1178511802
* @param data The content to write to the file.
1178611803
* @param append If `true`, `data` will be appended to the end of the file. Defaults to `false`, which will overwrite any pre-existing file with the new `data`.
11787-
* @param for_player If given, the file will only be written for this `player_index`. Providing `0` will only write to the server's output if present.
11804+
* @param for_player If given, the file will only be written for this `player_index`. Providing `0` will only write to the server's output if present. `for_player` cannot be used in settings and prototype stages.
1178811805
*/
1178911806
write_file(this: void, filename: string, data: LocalisedString, append?: boolean, for_player?: uint): void;
11807+
/**
11808+
* Current version of game
11809+
*/
11810+
readonly game_version: string;
1179011811
/**
1179111812
* The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
1179211813
*/

dist/concepts.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.54
5+
// Factorio version 2.0.55
66
// API version 6
77

88
declare namespace runtime {

dist/datacollection.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.54
5+
// Factorio version 2.0.55
66
// API version 6
77

88
declare namespace prototype {

dist/defines.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.54
5+
// Factorio version 2.0.55
66
// API version 6
77

88
declare namespace defines {

dist/events.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.54
5+
// Factorio version 2.0.55
66
// API version 6
77

88
declare namespace runtime {

dist/global.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/runtime-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.54
5+
// Factorio version 2.0.55
66
// API version 6
77

88
/**

dist/prototypes.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.54
5+
// Factorio version 2.0.55
66
// API version 6
77

88
declare namespace prototype {
@@ -5146,7 +5146,7 @@ interface LandMinePrototype extends EntityWithOwnerPrototype {
51465146
trigger_collision_mask?: CollisionMaskConnector;
51475147
trigger_force?: ForceCondition;
51485148
/**
5149-
* Time between checks to detonate due to nearby enemies. A larger time will be more performant.
5149+
* Time between checks to detonate due to nearby enemies, in ticks. A larger time will be more performant.
51505150
*/
51515151
trigger_interval?: uint32;
51525152
trigger_radius: double;

dist/types.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Factorio API reference https://lua-api.factorio.com/latest/index.html
33
// Generated from JSON source https://lua-api.factorio.com/latest/prototype-api.json
44
// Definition source https://github.com/sguest/factorio-types
5-
// Factorio version 2.0.54
5+
// Factorio version 2.0.55
66
// API version 6
77

88
declare namespace prototype {
@@ -4462,7 +4462,7 @@ interface FastReplaceTipTrigger extends CountBasedTipTrigger {
44624462
type: 'fast-replace';
44634463
}
44644464
/**
4465-
* A dictionary of feature flags and their status. It can be used to adjust prototypes based on whether the feature flags are enabled.
4465+
* A dictionary of feature flags and their status. It can be used to adjust prototypes based on whether the feature flags are enabled. It is accessible through the global object named `feature_flags`.
44664466
* @example ```
44674467
-- sets coal to spoil only when the spoiling feature flag is enabled
44684468
if feature_flags["spoiling"] then
@@ -6657,10 +6657,10 @@ if mods["pizza"] then
66576657
end
66586658
```
66596659
* @example ```
6660-
-- when the only active mod is the space-age mod with version 1.2.0
6660+
-- when the only active mod is the space-age mod with version 2.0.7
66616661
-- then this logs
66626662
for name, version in pairs(mods) do
6663-
log(name .. " version " .. version) -- => space-age version 1.2.0
6663+
log(name .. " version " .. version) -- => space-age version 2.0.7
66646664
end
66656665
```
66666666
*/
@@ -8886,7 +8886,7 @@ interface SetTileTriggerEffectItem extends TriggerEffectItem {
88868886
type: 'set-tile';
88878887
}
88888888
/**
8889-
* A struct that provides access to the user-set values of startup {@link mod settings | https://wiki.factorio.com/Tutorial:Mod_settings}.
8889+
* A struct that provides access to the user-set values of startup {@link mod settings | https://wiki.factorio.com/Tutorial:Mod_settings}. It is accessible through the global object named `settings`.
88908890
* @example ```
88918891
-- Accessing the value of a mod setting
88928892
local val = settings.startup["my-mod-setting-name"].value

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "factorio-types",
3-
"version": "1.2.38",
3+
"version": "1.2.39",
44
"description": "Typescript declarations for the Factorio mod API",
55
"main": "index.d.ts",
66
"repository": "https://github.com/sguest/factorio-types.git",
@@ -23,7 +23,7 @@
2323
"src/**/*.d.ts",
2424
"dist/**/*.d.ts"
2525
],
26-
"factorioVersion": "2.0.54",
26+
"factorioVersion": "2.0.55",
2727
"dependencies": {
2828
"lua-types": "^2.13.1"
2929
},

0 commit comments

Comments
 (0)