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

Some quick fixes

This commit is contained in:
Wyrrrd
2021-04-19 23:42:11 +02:00
parent 0d7676d71e
commit 15a8590a76
2 changed files with 4 additions and 3 deletions
+3 -3
View File
@@ -87,13 +87,13 @@ script.on_nth_tick(600, function (event)
if entity.valid and entity.force == player.force then
local inventory
if entity.type == "ammo-turret" and turret_enabled then
if turret_enabled and entity.type == "ammo-turret" then
inventory = entity.get_inventory(defines.inventory.turret_ammo)
elseif entity.type == "car" and car_enabled then
elseif car_enabled and entity.type == "car" and entity.prototype.guns then
inventory = entity.get_inventory(defines.inventory.car_ammo)
end
local no, low
local no, low = false
if inventory and get_ammo_flags[mode] then
if entity.type == "ammo-turret" then
no, low = get_ammo_flags[mode](inventory)