Updated 01/25/26: Check Changelog for Details
A successor to Lag Free Lamps by NECEROS and Infinite Torches by okradonkey.
Inspired by Optimization: Meats by SeoHyeon
This is for the people who want to do low tech runs without bogging down their computer with all the ticking light sources. Removes the refuelable comp from low tech light sources (default) or slow down the refuelables comp tick.
Comp Delay:
The vanilla refuelable comp calculates fuel every tick, with harmony, the recalculation can be delayed to every user configured tick. The default is every 10 ticks, which means fuel is calculated 10 less often. Fuel consumption is scaled to tick interval so fuel should still last the same amount of time.
Other tick intervals can be set but I don't know if it will affect the game in any other ways.
This affects all things with the refuelable comp except turrets and things like stoves (i.e. things that have consumeFuelOnlyWhenUsed set to true) since those calculate fuel consumption separately.
Comp Removal:
Removes the refuelable comp from things that fit the following criteria:
[list]
[*] is a building
[*] has the refuelable comp
[*] has the glower comp
[*] if it's a heatpusher, heatPerSecond is below a threshold (which can be changed via mod settings)
[*] isn't a turret
[*] is not a production building
[*] doesn't consume or generate electricity
[*] consumeFuelOnlyWhenUsed is set to false
[/list]
Also features three lists that you can use to exclude things from comp removal and comp delaying
[b]NoRemove[/b] - Any light sources you want to exclude from comp removal
[b]NoFuelConsumptionScaling[/b] - Anything that has the refuelable comp that should not be scaled to tick interval such as turrets or things that reduce fuel per use.
[b]ForceRemove[/b] - Anything you want to force the comp removal on
Safe to add and remove midgame but changing any settings require a restart.
Whitelisting for modders
This mod is a hammer and for hammers, everything looks like nails. Use this patch to [b]exclude[/b] things from comp removal and fuel consumption scaling if they're still falling through the cracks and getting patched when they shouldn't be.
<Patch>
<Operation Class="PatchOperationFindMod">
<mods>
<li>Lagless Lamps - C#</li>
</mods>
<match Class="PatchOperationSequence">
<operations>
<li Class="PatchOperationAdd">
<!--Adding an item that should always keep its refuelable comp-->
<xpath>Defs/LaglessLamps.WhitelistDef[defName = "NoRemove"]/thingDefs</xpath>
<value>
<li MayRequire="Ludeon.RimWorld.Ideology">Autobong</li>
</value>
</li>
<li Class="PatchOperationAdd">
<!--Adding an item that should never have its fuel consumption scaled-->
<xpath>Defs/LaglessLamps.WhitelistDef[defName = "NoFuelConsumptionScaling"]/thingDefs</xpath>
<value>
</value>
</li>
<li Class="PatchOperationAdd">
<!--Adding an item that should always have its refuelable comp removed, regardless of mod logic-->
<xpath>Defs/LaglessLamps.WhitelistDef[defName = "ForceRemove"]/thingDefs</xpath>
<value>
</value>
</li>
</operations>
</match>
</Operation>
</Patch>
A copy of this patch can also be found in the mod folder.
[url=https://steamcommunity.com/linkfilter/?u=https%3A%2F%2Fgithub.com%2FJsin0%2FLagless-Lamps]GitHub[/url][github.com]