Ammo Alerts

by Wyrrrd

Adds map alerts for players when a gun turret, vehicle or artillery is either out of ammo or has low ammo.

Utilities
7 days ago
0.18 - 2.0
42.1K

Changelog

Version: 2.0.8
Date: 2024-12-19
  Changes:
Version: 2.0.7
Date: 2024-11-10
  Optimizations:
    - Add cleanup of empty global tables
    - Move global table creation from on_surface_created to on_built_entity to save on event
      listeners
    - Review force rename/removal handling
    - Code cleanup and comments
Version: 2.0.6
Date: 2024-11-10
  Features:
    - Add support to enable alerts for other surfaces (before, alerts were only generated for the
      current surface)
  Bugfixes:
    - Fix additional surface handling (when a new surface was created, from then on entities were
      not added to the global list until all players of a force leave and join again, which is
      technically impossible in single player)
Version: 2.0.5
Date: 2024-11-09
  Bugfixes:
    - Really fix the crash on surface deletion
Version: 2.0.4
Date: 2024-11-09
  Bugfixes:
    - Fix another crash on surface deletion
Version: 2.0.3
Date: 2024-11-08
  Bugfixes:
    - Fixed crash on invalid entity
Version: 2.0.2
Date: 2024-11-08
  Changes:
    - Cleanup tracking table on surface rename/deletion
  Bugfixes:
    - Quick fix setting for manual turret fill
Version: 2.0.1
Date: 2024-11-06
  Locale:
    - Added ukranian locale (thanks to Met_en_Bouldry)
    - Added russian locale (thanks to eugenikus8)
Version: 2.0.0
Date: 2024-10-27
  Changes:
    - Migration to base game 2.0
  Locale:
    - Renamed car group to vehicle group in all languages
  Features:
    - Added spidertrons to vehicle group
Version: 1.1.11
Date: 2023-03-12
  Bugfixes:
    - Added static script event listeners to fix missing alerts for script built entities
Version: 1.1.10
Date: 2022-08-07
  Features:
    - Added artillery as third alert group (off by default)
Version: 1.1.9
Date: 2021-08-07
  Locale:
    - Fixed modes not being translated
Version: 1.1.8
Date: 2021-08-06
  Locale:
    - Addedd french locale (thanks to d0ob)
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:
    - Defaulting multislot mode "selected" to first slot, if no slot selected. Defaulting to
      "added" mode caused a crash.
  Scripting:
    - Simplified some boolean logic misusing it as ternary
Version: 1.1.5
Date: 2021-04-21
  Features:
    - Added config option to change behaviour on multiple ammo slots (mainly for cars)
  Bugfixes:
    - Fixed only checking first ammo slot in cars
    - Fixed modded cars without guns causing ammo empty alerts (AAI)
  Optimisations:
    - Only scanning surfaces for forces with connected players
    - Only scanning surfaces on init now, updating by single entities as they are build or removed
    - Only scanning surfaces once instead of twice (once for turrets and once for cars)
Version: 1.1.4
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
Version: 1.1.3
Date: 2021-03-29
  Changes:
    - Icon and message overhaul (by snouz)
Version: 1.1.2
Date: 2021-03-28
  Bugfixes:
    - Added migration to add car index to existing saves
Version: 1.1.1
Date: 2021-03-28
  Changes:
    - Added car ammo alerts, if car has guns (this should apply to modded cars and tanks)
    - Added config options to display/hide car and/or turret ammo alerts
    - Added german locale
    - Mod display name is now less focused on turrets
Version: 1.1.0
Date: 2020-12-02
  Changes:
    - Version bump for base game 1.1
Version: 0.18.3
Date: 2020-03-21
  Changes:
    - Migrated on_event to on_nth_tick for performance
  Bugfixes:
    - Added missing initialization of turret index
Version: 0.18.2
Date: 2020-03-20
  Changes:
    - Redesigned surface handling again to be more performant
Version: 0.18.1
Date: 2020-03-19
  Changes:
    - Added changelog file
    - Changed dependency to base 0.18
  Bugfixes:
    - Redesigned surface handling to ensure compatibility with other planets and Blueprint Lab
Version: 0.18.0
Date: 2020-02-20
  Changes:
    - Ported to 0.18
    - Renamed mod for upload in mod portal
    - Matched versioning to Factorio versions

  Graphics:
    - Added thumbnail