Li-Module-Fix

by lost-in

Function: -- All devices support all module -- Cancel module limitation -- Cancel productivity limitation -- More module slots available -- beacon Efficiency -- beacon Range -- Basic equipment production capacity -- Add Salted Fish module (pure speed, capacity, energy saving) -- Quality adjustment 功能: -- 所有设备支持所有插件 -- 取消插件限制 -- 取消产能限制 -- 更多插件槽数量 -- 分享塔效率 -- 分享塔范围 -- 设备基础产能 -- 添加咸鱼插件(纯速度,产能,节能) -- 质量调整

Content
2 hours ago
1.1 - 2.1
2.43K
Manufacturing

Changelog

Version: 0.0.19
Date: 07. 09. 2026
  Fix:
    - Critical: Fixed crash when "All devices support all modules" is disabled
      Error: "Module inventory size is > 0 but no effects are allowed"
      Root cause: more-slots code added module_slots to entities with empty allowed_effects (empty table is truthy in Lua)
      Now checks #allowed_effects > 0 before adding slots
    - Added safety check: entities with module_slots > 0 but empty/nil allowed_effects now get default effects
    - Removed icon_mipmaps = 0.2 from 3 icon definitions (field removed in Factorio 2.0, auto-inferred now)
  Added:
    - New setting: li-disable-quality-bonus (default OFF)
      When enabled: disables quality bonuses on entity range and module slots
      Sets quality_affects_supply_area_distance=false on beacons
      Sets quality_affects_mining_radius=false on mining drills
      Sets quality_affects_module_slots=false on beacons/mining drills/crafting machines/rocket silos/labs
      Sets distribution_effectivity_bonus_per_quality_level=0 on beacons
      Sets electric_pole_supply_area_distance_bonus=0 on all quality tiers
      Prevents CPU/memory issues from N-fold range growth on high-quality entities
    - Per-type module slots settings: li-extra-module-slots-{beacon,mining-drill,assembling-machine,furnace,lab,rocket-silo}
      Default -1 = use global value. Set >= 0 to override per device type
      Addresses player feedback requesting per-type control
    - Built-in default blacklist for special entities:
      captive-biter-spawner (Space Age: should not have modules)
    - Mod compatibility auto-detection blacklist:
      se-spaceship-engine, se-spaceship-clamp, se-space-telescope (Space Exploration)
      py-gas-vent, py-void-vent (Pyanodon)
      Reduces manual blacklist configuration for players
  Compatibility:
    - Space Age DLC: verified compatibility with all new device types
      Biochamber/Foundry/Electromagnetic plant/Cryogenic plant/Crusher (assembling-machine) - already covered
      Recycler (furnace) - already covered
      Biolab (lab) - already covered
      Big mining drill (mining-drill) - already covered
      Agricultural tower/Asteroid collector/Thruster/Heating tower/Lightning collector - no module fields, no action needed
  Changed:
    - allowed_effects now created as independent table per entity (was shared reference)
    - Beacon/corpse animation scaling now uses safe iteration instead of hardcoded indices
    - Refactored: extracted make_allowed_effects() and for_each_entity() helpers
    - Refactored: merged 6 separate quality-bonus loops into for_each_entity calls
Version: 0.0.18
Date: 13. 07. 2026
  Refactor:
    - Flattened base productivity 5-layer nested if, added else branch for nil/0 productivity
    - Merged duplicate recipe table traversal (remove_recipe_limits + remove_prod_cap)
    - Moved quality allowed_effects insertion before main loop (fixes reference timing)
    - Extracted fish module definitions into config table in item.lua (eliminates repeated code)
    - Removed hardcoded quality-module-3 icon path; now reads from data.raw at runtime
  Added:
    - New setting: li-beacon-fish-energy (Beacon Fish power consumption, 1-1000 MW)
    - New setting: li-divine-quality-multiplier (Divine quality attribute multiplier)
  Removed:
    - li-recipe-category setting (no category = both hand & machine craftable by default)
    - Per-module multiplier settings (speed/productivity/quality, merged into global multiplier)
  Changed:
    - All English locale descriptions rewritten for natural language
  Fix:
    - li-beacon-fish auto-blacklisted in main loop to prevent double attribute stacking
    - li-beacon-fish allowed_effects now conditionally includes "quality" when quality mod is active
    - li-raw-fish recipe now has allow_decomposition = false
    - Base productivity: fixed effect_receiver nil-overwrite bug (was replacing entire receiver)
Version: 0.0.17
Date: 03. 07. 2026
  Major:
    - All prototype names now prefixed with "li-" to prevent conflicts with other mods
    - All setting names now prefixed with "li_" to prevent conflicts with other mods
    - Renamed li-raw-fish from "Fresh fish" to "Salted fish" (咸鱼)
  Added:
    - New setting: li_fish_required (toggle fish ingredient requirement for recipes)
    - New setting: li_fish_craft_time (craft time multiplier, 1x=10s, default 5x)
    - New setting: li_raw_fish_craft_time (salted fish craft time multiplier)
    - New setting: li_fish_material_mult (fish material amount multiplier)
    - New setting: li_entity_blacklist (comma-separated entity names to skip)
    - New setting: li_entity_range_divisor (divide range/radius of sensitive entity types)
    - New quality tier: Divine (level 6, 5x all attributes, deep red icon)
  Changed:
    - Quality blacklist replaced with entity range divisor (traverses entity types, not names)
    - Quality range divisor only affects 5 sensitive types: radar, electric-pole, asteroid-collector, lightning-attractor, cargo-landing-pad
    - li-raw-fish uses tinted fish icon (tan/salted color), placed in raw-resource subgroup next to vanilla fish
    - li-raw-fish recipe: forbid hand-crafting and auto-intermediate (prevent exploit via cancel-fish trick)
    - Salt fish recipes: forbid hand-crafting when ingredients are free (prevent 4G+ overflow)
    - Recipe files refactored to config-table + loop pattern for maintainability
    - Module slots now strictly additive (original slots + set value)
  Fix:
    - Fix: remove redefinition of base "module" item-subgroup (conflict with Holographic Signs)
    - Fix: quality-module-fish recipe now produces quality-module-fish instead of quality-module-3
    - Fix: remove debug serpent.log statement in entities.lua
    - Fix: remove duplicate allow_productivity assignment in recipe loop
    - Fix: b_fish extra parentheses syntax error in entities.lua
    - Fix: deepcopy nil protection for beacon/corpse in entities.lua
    - Fix: quality-module-fish effect range (0.05*multiplier), hard cap at 500%
    - Fix: divine quality level computed as max_level+1 to always sort after legendary
    - Update: factorio_version changed from 2.0 to 2.1
  Migration:
    - ⚠️ Breaking: all setting names changed (old settings reset to defaults on update)
Version: 0.0.16
Date: 17. 10. 2025
  Update:
    - The major modification will delete all previous items. Please pay attention before updating.
    - Merge consumption and pollution modules
    - Modifying the modules again requires fish, adding a new recipe for making fish
  Added:
    - Add a new building: Beacon Fish
Version: 0.0.15
Date: 30. 08. 2025
  Update:
    - Modify some bugs
    - Cancel the need for fish to create module, you can directly create module
    - The time for making modules can be set, default: 30s
Version: 0.0.14
Date: 01. 03. 2025
  Update:
    - Allow setting whether to prohibit certain devices from using quality to prevent excessive device attributes from increasing UPS
Version: 0.0.13
Date: 22. 02. 2025
  FiX:
    - Fix the issue of ineffective quality of prohibited items in the previous version
  Update:
    - Newly added prohibited quality items: electric pole,Asteroid collector,Cargo pod
Version: 0.0.12
Date: 20. 02. 2025
  Update:
    - Repairing without DLC will result in an error
Version: 0.0.11
Date: 19. 02. 2025
  Update:
    - All devices with designated areas are prohibited from using quality module to prevent high quality and large areas from occupying high memory and CPU. All devices include: Roboport, Cargo landing pad, Radar
Version: 0.0.10
Date: 19. 02. 2025
  Added:
    - Cancel the maximum 300% production capacity limit
Version: 0.0.9
Date: 15. 02. 2025
  Added:
    - Modify equipment quality
Version: 0.0.8
  FiX:
    - Fix mining machine does not support module slot modification
Version: 0.0.7
  Function:
    - Fix the issue where the module inventory is greater than 0 but there are no module effects
    - Fixed the issue where players did not enable DLC series mod reporting errors
Version: 0.0.6
  Function:
    - Repair formula and equipment do not support capacity module
Version: 0.0.5
  Update:
    - Update compatibility to Game 2.0
  Added:
    - Quality Fish module
  Remove:
    - Remove the Salted Fish Reduction module
Version: 0.0.4
  Function:
    - Modify beacon Range
    - Modify Basic equipment production capacity
    - Add Salted Fish module
    - Modify Salted fish module multiplier
Version: 0.0.3
  Function:
    - All devices support all module
    - Number of module slots
    - Cancel module limitation
    - beacon Efficiency