pyLights

by PyBren

Directional floodlights for Factorio 2.1.

Content
5 hours ago
2.1
0
Environment Power

Changelog

Version: 0.1.15
Date: 2026-12-02

  Changes:
    - Add four independent Floodlighting technologies with balanced standalone and Pyanodon research costs.
    - Preserve previously unlocked floodlights when updating existing saves.
    - Fix Floodlighting technology names and descriptions.
Version: 0.1.14
Date: 2026-12-02

  Balancing:
    - Use 15 electronic circuits instead of 5 advanced circuits for Pyanodon Large floodlights, so the ingredients are available at Electric Energy Distribution 3 in both standard Py and Hard Mode.
    - Use 20 advanced circuits instead of 20 processing units for standalone Huge floodlights, matching the existing Electric Energy Distribution 2 unlock.
    - Keep all other ingredients, technologies, power demand and beam geometry unchanged.

  Info:
    - Add pinned Hard Mode public-source integration testing alongside standard Pyanodon.
    - Verify direct ingredient-producer availability from each recipe's unlock technology and prerequisites.
    - Add the mod thumbnail and a versioned release archive builder; correct misleading item range descriptions.
Version: 0.1.13
Date: 2026-12-02

  Fixes:
    - Declare Pyanodon Post Processing as an optional dependency so all installed Pyanodon item and technology definitions load before pyLights selects recipes and unlocks.
    - Keep the same ingredients, crafting times, power demand and beam geometry.

  Info:
    - Full Pyanodon public source data-stage and fresh-map lifecycle tests passed with placeholder graphics dependencies; all four post-processed recipe unlocks validated.
    - The user confirmed previous in-game testing was performed with Pyanodon Hard Mode; gameplay balance review remains pending.
Version: 0.1.12
Date: 2026-12-02

  Features:
    - Add an enabled-by-default startup setting for extended light rendering distance.
    - When disabled, leave Factorio's global light search distance unchanged.

  Info:
    - Off-screen Huge floodlight visibility confirmed in-game.
    - Extended distance may affect graphical performance; disabling it can restore premature beam culling.
    - A 1,024-lamp graphics benchmark sustained 60 FPS with extended search enabled on the test PC; keep the default enabled with the optional opt-out. See README.md for results and limitations.
Version: 0.1.11
Date: 2026-12-02

  Fixes:
    - Increase the global light renderer search distance to at least 128 tiles so off-screen Huge lamps are not culled while their beam can still reach the viewport.
    - Preserve the existing beam geometry, power handling, click area and runtime architecture.

  Info:
    - Huge ribbon-world coverage confirmed.
    - Off-screen illumination and client rendering performance require verification; the larger search distance affects all lights.
    - Actual space-platform compatibility testing deferred.
Version: 0.1.10
Date: 2026-12-02

  Fixes:
    - Prevent damage to the hidden lamp from extinguishing an otherwise intact floodlight.
    - Discard independently cloned helper lamps; retain exactly one helper per cloned anchor.
    - Preserve Always on when cloning a floodlight.

  Info:
    - Day/night switching, Always on, daylight electricity shutoff and settings persistence passed in-game verification.
    - Headless regression tests passed for area cloning, damage, actual death and deferred object-destruction events.
Version: 0.1.9
Date: 2026-12-02

  Fixes:
    - Centre the north-facing Medium, Large and Huge cones horizontally using their measured offsets.
    - Leave the confirmed Small floodlight and all other directions unchanged.

  Info:
    - All 16 tier/direction beam alignments have been confirmed in-game.
Version: 0.1.8
Date: 2026-12-02

  Fixes:
    - Reduce the cone's forward displacement by 0.5 tiles per unit of cone scale so its visible fade-in overlaps the lamp head.
    - Preserve the existing cone size, direction, artwork, power handling and click area.

  Info:
    - In-game verification of the visible beam-to-lamp connection remains pending.
Version: 0.1.7
Date: 2026-12-02

  Fixes:
    - Move the centre of the oriented cone forward so its narrow end starts at the lamp rather than far behind it.
    - Use the measured lamp-face positions for each tier and direction instead of a universal vertical offset.
    - Preserve the existing cone scales, native power handling, graphics, selection boxes and settings interaction.

  Info:
    - Screenshots and vanilla headlight definitions inform the nominal cone-centre displacement.
    - North-facing lamp-head offsets are estimates; visual alignment and resulting forward reach need client verification.
Version: 0.1.6
Date: 2026-12-02

  Fixes:
    - Position the light source at the lamp-head centre instead of the anchor origin.
    - Convert the rendered pixel offset to tiles and scale it for each tier's artwork.

  Info:
    - Prototype validation checks the source offset for all 16 lamp helpers.
    - In-game visual alignment still requires confirmation.
Version: 0.1.5
Date: 2026-12-02

  Fixes:
    - Use Factorio's built-in Open GUI control for floodlight settings.
    - Restrict settings interaction to the anchor's normal selection box.
    - Remove extended sprite hit-testing and its runtime entity search.
    - Respect the player's configured Open GUI key binding.

  Info:
    - Headless tests cover clicks inside and outside the selection box and clicks over GUIs.
    - The settings click area has been confirmed in-game; Always on behaviour still requires validation.
Version: 0.1.4
Date: 2026-12-02

  Fixes:
    - Open floodlight settings when clicking visible lamp artwork outside the anchor selection box.
    - Ignore settings-input clicks over GUIs without changing the building selection or placement footprint.

  Info:
    - The settings click handler uses a bounded lookup for visible sprite overhang; actual mouse interaction and Always on behaviour still require in-game validation.
Version: 0.1.3
Date: 2026-12-02

  Features:
    - Add a floodlight settings panel opened by left-clicking a placed floodlight.
    - Expose the native lamp Always on setting through the visible building.

  Fixes:
    - Preserve the Always on setting when replacing the internal lamp helper during rotation.

  Info:
    - The beam and physical lamp face the same direction in-game, but the light source still needs positional alignment with the lamp head.
    - The settings GUI and Always on behaviour require in-game validation.
Version: 0.1.2
Date: 2026-12-01

  Features:
    - Replace custom Rotate-key interception with native four-direction building rotation.
    - Separate each floodlight into a visible directional anchor and an internal native lamp helper.
    - Keep the existing four player-facing items, icons, recipes, technology unlocks, and tier settings.
    - Track lamp helpers through build, rotation, flip, clone, blueprint-settings, teleport, mining, and destruction events.
    - Add automated lifecycle tests and a headless entity-overhead benchmark.

  Info:
    - The mod has not been published; no save migration or legacy prototype compatibility is included.
    - Each placed floodlight now uses two Factorio entities instead of one.
    - Headless regression tests pass. At 1,000 Small floodlights, the measured increase was approximately 0.0034 ms per simulation tick on an isolated test map; see README.md. Graphical validation and remaining lifecycle checks are pending.

  Fixes:
    - Remove internal lamp helpers without assuming a player undo item exists.
    - Let Factorio select undo items automatically for helper creation and player-driven replacement.
    - Localise the four visible anchor prototypes so undo/redo notifications display floodlight names instead of unknown prototype keys.
    - Verify placement and rotation undo/redo playback in-game.
    - Verify construction-robot placement from normal and rotated blueprints, and robot deconstruction, in-game.
    - Verify save/reload persistence for all four tiers, including subsequent rotation, mining, and robot deconstruction.
Version: 0.1.1
Date: 2026-11-30

  Features:
    - Add Small, Medium, Large, and Huge floodlight tiers.
    - Use native lamp prototypes for darkness-based switching and power management.
    - Add four fixed beam directions per tier.
    - Link the normal Rotate control to event-driven floodlight direction switching.
    - Add Pyanodon electric-energy-distribution technology integration.
    - Add tier-specific floodlight icons for inventory, recipes, and entity information.
    - Keep rotation event-driven with no per-tick polling or entity scans.

  Info:
    - Light range and balance values require in-game validation.
    - Custom in-world sprites and Blender source models are now included; the lamp prototypes still use vanilla body artwork pending integration.

  Fixes:
    - Correct oriented light size to use Factorio's documented tile radius directly.
    - Move the light source to the front edge of each floodlight footprint.
    - Set directional beam intensity to the maximum supported value.