mirror of
https://github.com/Wyrrrd/Gun_Turret_Alerts.git
synced 2026-06-08 02:00:19 +02:00
Some quick fixes
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
*.zip
|
*.zip
|
||||||
|
.vscode/*
|
||||||
|
|||||||
+3
-3
@@ -87,13 +87,13 @@ script.on_nth_tick(600, function (event)
|
|||||||
if entity.valid and entity.force == player.force then
|
if entity.valid and entity.force == player.force then
|
||||||
|
|
||||||
local inventory
|
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)
|
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)
|
inventory = entity.get_inventory(defines.inventory.car_ammo)
|
||||||
end
|
end
|
||||||
|
|
||||||
local no, low
|
local no, low = false
|
||||||
if inventory and get_ammo_flags[mode] then
|
if inventory and get_ammo_flags[mode] then
|
||||||
if entity.type == "ammo-turret" then
|
if entity.type == "ammo-turret" then
|
||||||
no, low = get_ammo_flags[mode](inventory)
|
no, low = get_ammo_flags[mode](inventory)
|
||||||
|
|||||||
Reference in New Issue
Block a user