Types/EffectTypeLimitation: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (typo)
(Updated styling of prototype doc migration note)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/EffectTypeLimitation.html https://lua-api.factorio.com/latest/types/EffectTypeLimitation.html]
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
A [[Types/table|list]] of module effects or just one module effect as a string. Modules with other effects cannot be used on the machine. This means that both effects from modules and from surrounding beacons are restricted to the listed effects.
A [[Types/table|list]] of module effects or just one module effect as a string. Modules with other effects cannot be used on the machine. This means that both effects from modules and from surrounding beacons are restricted to the listed effects.


Line 26: Line 32:
allowed_effects = "speed"
allowed_effects = "speed"
</pre>
</pre>
Note: If the time to complete a recipe is shorter than one tick, only one craft can be completed per tick, but productivity bonus is applied to the non-limited ''completable'' work. For a simple example, if a recipe were to take half a tick, only one recipe would be completed, but twice the productivity bonus would occur. The surplus production from productivity is '''not''' limited to one craft per tick.


{{Prototype property type usage|{{FULLPAGENAME}}}}
{{Prototype property type usage|{{FULLPAGENAME}}}}

Latest revision as of 10:42, 21 September 2023

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/types/EffectTypeLimitation.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.


A list of module effects or just one module effect as a string. Modules with other effects cannot be used on the machine. This means that both effects from modules and from surrounding beacons are restricted to the listed effects.

Value Module type
speed Modules that increase or decrease the machine's speed.
productivity Modules that make the machine produce bonus items.
consumption Modules that increase or decrease the machine's energy consumption.
pollution Modules that make the machine produce more or less pollution.

Example: (allows all module types)

allowed_effects = {"speed", "productivity", "consumption", "pollution"}

Allows only speed affecting modules:

allowed_effects = "speed"

Prototype properties that use this type