Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Date: ???
- Added annotations to farming scripts and prototypes
- Changed custom recipe UI to use pyanodons mod data
- Localized a global variable in the caravan copy interrupt script. Resolves https://github.com/pyanodon/pybugreports/issues/1536
- Enforce reproductive complex to need at least two modules to run
---------------------------------------------------------------------------------------------------
Version: 3.1.2
Date: 2026-07-09
Expand Down
2 changes: 1 addition & 1 deletion locale/de/extras.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ instruction-to-deselect-spiders=__1__ und ziehen, um Kreaturen von der Auswahl z

[entity-status]
requires-module=Benötigt Modul [img=item.__1__] __2__
requires-module-reproductive-complex=Benötigt beliebiges Tiermodul
requires-module-reproductive-complex=Benötigt mindestens zwei Tiermodule
requires-module-botanical-nursery=Benötigt beliebiges Pflanzenmodul
2 changes: 1 addition & 1 deletion locale/en/extras.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ instruction-to-deselect-spiders=__1__ and drag to remove from selected mounts.

[entity-status]
requires-module=Requires module [img=item.__1__] __2__
requires-module-reproductive-complex=Requires any animal module
requires-module-reproductive-complex=Requires at least two animal modules
requires-module-botanical-nursery=Requires any plant module
2 changes: 1 addition & 1 deletion locale/es-ES/extras.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ instruction-to-deselect-spiders=__1__ y arrastrar para eliminar de los monturas

[entity-status]
requires-module=Requiere módulo [img=item.__1__] __2__
requires-module-reproductive-complex=Requiere cualquier módulo animal
requires-module-reproductive-complex=Requiere al menos dos módulos de animales
requires-module-botanical-nursery=Requiere cualquier módulo de planta
2 changes: 1 addition & 1 deletion locale/nl/extras.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ instruction-to-deselect-spiders=__1__ en sleep om te verwijderen van geselecteer

[entity-status]
requires-module=Vereist module [img=item.__1__] __2__
requires-module-reproductive-complex=Vereist enige dierenmodule
requires-module-reproductive-complex=Vereist ten minste twee dierenmodules
requires-module-botanical-nursery=Vereist enige dierenmodule
2 changes: 1 addition & 1 deletion locale/pl/extras.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ instruction-to-deselect-spiders=__1__ i przeciągnij, aby usunąć z wybranych w

[entity-status]
requires-module=Wymaga modułu [img=item.__1__] __2__
requires-module-reproductive-complex=Wymaga dowolnego modułu zwierzęcego
requires-module-reproductive-complex=Wymaga co najmniej dwóch modułów zwierzęcych
requires-module-botanical-nursery=Wymaga dowolnego modułu roślinnego
2 changes: 1 addition & 1 deletion locale/ru/extras.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ instruction-to-deselect-spiders=__1__ и перетащите для удале

[entity-status]
requires-module=Требуется модуль [img=item.__1__] __2__
requires-module-reproductive-complex=Требуется модуль любого животного
requires-module-reproductive-complex=Требуется как минимум два модуля животных
requires-module-botanical-nursery=Требуется модуль любого растения
2 changes: 1 addition & 1 deletion locale/uk/extras.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ instruction-to-deselect-spiders=__1__ і перетягніть, щоб вида

[entity-status]
requires-module=Потрібен модуль [img=item.__1__] __2__
requires-module-reproductive-complex=Потрібен будь-який тваринний модуль
requires-module-reproductive-complex=Потрібно щонайменше два модулі тварин
requires-module-botanical-nursery=Потрібен будь-який рослинний модуль
6 changes: 5 additions & 1 deletion scripts/farming/farming.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ function Farming.process(farm_data)
local entity = farm_data.entity
local kingdom = Farming.get_kingdom(entity)
if not kingdom then return end
if entity.get_module_inventory().is_empty() then
local is_rc = not not entity.name:find("^rc%-mk")
local module_inv = entity.get_module_inventory()
if not module_inv or module_inv.get_item_count() < (is_rc and 2 or 1) then
-- update render, otherwise it will destroy itself
-- it lasts just longer than once cycle so it will always stick around even when timing and ordering gets weird
local default_module = Farming.get_default_module(entity)
Expand All @@ -33,9 +35,11 @@ function Farming.process(farm_data)
diode = defines.entity_status_diode.red,
label = message
}
if is_rc then entity.disabled_by_script = true end
else
py.clear_alert(farm_data.alert_id)
entity.custom_status = nil
if is_rc then entity.disabled_by_script = false end
end
end

Expand Down
Loading