Now on another doubt:
I'm trying to disable research and influence foci on non-capital, non-exobot species when the owner has adopted a policy. I think the coding must be done in species/common/focus.macros, something like this:
HAS_RESEARCH_FOCUS
Code: Select all
Focus
name = "FOCUS_RESEARCH"
description = "FOCUS_RESEARCH_DESC"
location = And [
Planet
Or [
Not EmpireHasAdoptedPolicy empire = Source.Owner name = "PLC_RACIAL_PURITY"
Species name = Source.Species
]
]
graphic = "icons/focus/research.png"
I've been browsing the effects in the code base but can't find how to ask for the capital species name. Capital.Species didn't work
I finally did it doing this:
Code: Select all
location = And [
Planet
Or [
Not EmpireHasAdoptedPolicy empire = Source.Owner name = "PLC_RACIAL_PURITY"
Number low = 1 condition = And [
Planet
OwnedBy empire = Source.Owner
Species name = Source.Species
Contains Building name = "BLD_IMPERIAL_PALACE"
]
]
]
Is there a better way to check out if a given planet is of the same species than owner's capital?