Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@SomeTroglodyte
Copy link
Contributor

In master, you can queue several BLD_FIELD_REPELLOR on different planets, but finish only one. This makes it so you can't queue a second, no matter where. Am a bit unsure this is the correct way to do so, but holds up in my play-testing.

@Cjkjvfnby
Copy link
Contributor

I'm afraid I don't have enough expertise to help here.

@geoffthemedio geoffthemedio added component:content scripting The Issue/PR deals with the FOCS language, turn events or the universe generator. category:tweak The PR contains insignificant code changes, like code style grooming or value tweaking. labels Oct 5, 2025
@geoffthemedio
Copy link
Member

Searching for enqueuelocation in the scripts, there are a few examples that probably will work better. My immediate concern is that this may block enqueuing if any empire has one enqueued, not just yourself. See https://github.com/freeorion/freeorion/blob/master/default/scripting/buildings/STOCKPILING_CENTER.focs.py#L37 :

        & Number(
            low=0,
            high=0,
            condition=(
                Planet() & Enqueued(type=BuildBuilding, name="BLD_STOCKPILING_CENTER", empire=Source.Owner, low=1)
            ),
        )

though I think the low=0 and low=1 are unnecessary there.

@SomeTroglodyte
Copy link
Contributor Author

may block enqueuing if any empire has one enqueued, not just yourself

Sounds 100% likely.

The Imperial Entanglement Center is a bit over the top not only with the low=, but also - how is one supposed to have one enqueued somewhere that's not the capital? Not through losing the home planet by conquest, nor by building the indepencence decree... A mix of quitting, changing the rules, then reloading might do it...

@SomeTroglodyte
Copy link
Contributor Author

Comparing the "why can't I build this" tooltips before and after your suggested change....

Before:
image
... note the double blank between "empire" and "has". And I did sloppily read that as "where the empire has".

After:
image
... better. Good catch.

@geoffthemedio
Copy link
Member

geoffthemedio commented Oct 5, 2025

The where empire has between thing is also a bug in the description generation code for the Enqueued condition. Currently it doesn't handle the case where no empire ID is specified, even though the condition Eval function does.

Probably the behaviour difference is more important that that, though...

@o01eg o01eg added this to the v0.5.2 Release milestone Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:tweak The PR contains insignificant code changes, like code style grooming or value tweaking. component:content scripting The Issue/PR deals with the FOCS language, turn events or the universe generator.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants