Description
[v3.3.4 (67b9)] AI bio-reactors self-destruct because they create a food expense
Game Version
Libra v3.3.4 (67b9)
What version do you use?
Steam
What expansions do you have installed?
Synthetic Dawn, Utopia, Leviathans Story Pack, Apocalypse, Megacorp, Distant Stars, Ancient Relics, Lithoids, Federations, Nemesis, Aquatics
Do you have mods enabled?
No
Please explain your issue is in as much detail as possible.
When an AI empire gets a bio-reactor, at the beginning of the next month the building's own upkeep gives them a food resource expense. This causes the country_uses_food scripted trigger to return true, which causes the bio-reactor's potential block to return false, which causes the bio-reactor to be destroyed.
from buidings/03_resource_buildings.txt:
from scripted_triggers/00_scripted_triggers_buildings_ai.txt:
Steps to reproduce the issue.
Noticed logic issue while browsing code. Haven't caught it happening in-game though.
Upload Attachment
File(s) attached
[v3.3.4 (67b9)] AI bio-reactors self-destruct because they create a food expense
Game Version
Libra v3.3.4 (67b9)
What version do you use?
Steam
What expansions do you have installed?
Synthetic Dawn, Utopia, Leviathans Story Pack, Apocalypse, Megacorp, Distant Stars, Ancient Relics, Lithoids, Federations, Nemesis, Aquatics
Do you have mods enabled?
No
Please explain your issue is in as much detail as possible.
When an AI empire gets a bio-reactor, at the beginning of the next month the building's own upkeep gives them a food resource expense. This causes the country_uses_food scripted trigger to return true, which causes the bio-reactor's potential block to return false, which causes the bio-reactor to be destroyed.
from buidings/03_resource_buildings.txt:
Code:
building_bio_reactor = {
base_buildtime = 240
category = resource
potential = {
exists = owner
owner = {
OR = {
is_machine_empire = yes
is_mechanical_empire = yes
is_lithoid_empire = yes
}
OR = {
owner = { is_ai = no }
owner = { country_uses_food = no }
}
}
}
from scripted_triggers/00_scripted_triggers_buildings_ai.txt:
Code:
country_uses_food = {
resource_expenses_compare = {
resource = food
value > 0
}
}
Steps to reproduce the issue.
Noticed logic issue while browsing code. Haven't caught it happening in-game though.
Upload Attachment
File(s) attached