1
0
mirror of https://github.com/Wyrrrd/Gun_Turret_Alerts.git synced 2026-06-02 23:42:27 +02:00

Adaptive threshold based on automated ammo count

-Threshold for alert comes is never higher than then number of ammo loaded by an inserter.
-This fixes annoying alerts in Space Exploration's meteor defence, where the default ammo loaded is 4, and fixes the problem for any other mod.
This commit is contained in:
snouz
2021-06-21 15:06:34 +02:00
parent 9545d088eb
commit ad4ae53c97
3 changed files with 11 additions and 1 deletions
+5
View File
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 1.1.7
Date: 2021-06-21
Compatibility:
- Added compatibility to Space Exploration's Meteor defence and other mods (no longer displays alert when ammo is dynamically loaded) (by snouz)
---------------------------------------------------------------------------------------------------
Version: 1.1.6
Date: 2021-04-22
Bugfixes:
+5
View File
@@ -166,6 +166,11 @@ local function generate_alerts()
if inventory and get_ammo_flag[mode] then
if entity.type == "ammo-turret" then
ammo_flag = get_ammo_flag[mode](inventory, player_threshold)
if entity.prototype.automated_ammo_count then
if entity.prototype.automated_ammo_count < player_threshold then
ammo_flag = get_ammo_flag[mode](inventory, entity.prototype.automated_ammo_count)
end
end
elseif entity.type == "car" then
ammo_flag = get_ammo_flag[mode](inventory, player_threshold, entity.selected_gun_index)
end
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "Gun_Turret_Alerts",
"version": "1.1.6",
"version": "1.1.7",
"title": "Ammo Alerts",
"author": "Wyrrrd",
"factorio_version": "1.1",