mirror of
https://github.com/Wyrrrd/Gun_Turret_Alerts.git
synced 2026-06-05 08:40:20 +02:00
Merge pull request #3 from snouz/master
Adaptive threshold based on automated ammo count
This commit is contained in:
@@ -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
|
Version: 1.1.6
|
||||||
Date: 2021-04-22
|
Date: 2021-04-22
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
|||||||
@@ -166,6 +166,11 @@ local function generate_alerts()
|
|||||||
if inventory and get_ammo_flag[mode] then
|
if inventory and get_ammo_flag[mode] then
|
||||||
if entity.type == "ammo-turret" then
|
if entity.type == "ammo-turret" then
|
||||||
ammo_flag = get_ammo_flag[mode](inventory, player_threshold)
|
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
|
elseif entity.type == "car" then
|
||||||
ammo_flag = get_ammo_flag[mode](inventory, player_threshold, entity.selected_gun_index)
|
ammo_flag = get_ammo_flag[mode](inventory, player_threshold, entity.selected_gun_index)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Gun_Turret_Alerts",
|
"name": "Gun_Turret_Alerts",
|
||||||
"version": "1.1.6",
|
"version": "1.1.7",
|
||||||
"title": "Ammo Alerts",
|
"title": "Ammo Alerts",
|
||||||
"author": "Wyrrrd",
|
"author": "Wyrrrd",
|
||||||
"factorio_version": "1.1",
|
"factorio_version": "1.1",
|
||||||
|
|||||||
@@ -17,4 +17,8 @@ autofilter_mode-selected=Auswahl
|
|||||||
|
|
||||||
[gun-turret-alerts]
|
[gun-turret-alerts]
|
||||||
message-empty=__1__ hat keine Munition
|
message-empty=__1__ hat keine Munition
|
||||||
message-low=__1__ hat wenig Munition
|
message-low=__1__ hat wenig Munition
|
||||||
|
|
||||||
|
[virtual-signal-name]
|
||||||
|
ammo-icon-red=Hat keine Munition
|
||||||
|
ammo-icon-yellow=Hat wenig Munition
|
||||||
@@ -17,4 +17,8 @@ autofilter_mode-selected=Selected
|
|||||||
|
|
||||||
[gun-turret-alerts]
|
[gun-turret-alerts]
|
||||||
message-empty=__1__ out of ammo
|
message-empty=__1__ out of ammo
|
||||||
message-low=__1__ ammo low
|
message-low=__1__ low ammo
|
||||||
|
|
||||||
|
[virtual-signal-name]
|
||||||
|
ammo-icon-red=Out of ammo signal
|
||||||
|
ammo-icon-yellow=Low ammo signal
|
||||||
Reference in New Issue
Block a user