diff --git a/changelog.txt b/changelog.txt index 8fd0335..fc453ea 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,8 @@ --------------------------------------------------------------------------------------------------- Version: 1.1.4 -Date: 2021-03-29 +Date: 2021-04-02 + Bugfixes: + - Fix multiplayer incompatibility by clearing index on game version/mod version/config change Locale: - Added alerts to locale - Customized alerts with localised name of entities diff --git a/control.lua b/control.lua index 7349015..beba8a5 100644 --- a/control.lua +++ b/control.lua @@ -2,7 +2,13 @@ --This mod scans the map for cars and gun-turrets and places alerts when they are low. script.on_init(function (event) - -- car and turret index init + -- index init + global.turret_entities = {} + global.car_entities = {} +end) + +script.on_configuration_changed(function (event) + -- index init fix global.turret_entities = {} global.car_entities = {} end) diff --git a/migrations/1.1.2.lua b/migrations/1.1.2.lua deleted file mode 100644 index a3f6041..0000000 --- a/migrations/1.1.2.lua +++ /dev/null @@ -1,4 +0,0 @@ -script.on_configuration_changed(function (event) - -- car index init fix - global.car_entities = {} -end) \ No newline at end of file