Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert building from Focs to python #4815

Open
6 of 15 tasks
Cjkjvfnby opened this issue Dec 24, 2023 · 10 comments
Open
6 of 15 tasks

Convert building from Focs to python #4815

Cjkjvfnby opened this issue Dec 24, 2023 · 10 comments
Assignees
Labels
category:feature The Issue/PR describes or implements a new game feature. component:content scripting The Issue/PR deals with the FOCS language, turn events or the universe generator. status:work in progress The PR contains some implementation but isn't ready for merging onto the main development branch.

Comments

@Cjkjvfnby
Copy link
Contributor

Cjkjvfnby commented Dec 24, 2023

An issue for requests and questions for the Building conversion. It should be closed when buildings are fully converted.

@Cjkjvfnby Cjkjvfnby added category:feature The Issue/PR describes or implements a new game feature. component:content scripting The Issue/PR deals with the FOCS language, turn events or the universe generator. status:work in progress The PR contains some implementation but isn't ready for merging onto the main development branch. labels Dec 24, 2023
@o01eg
Copy link
Contributor

o01eg commented Dec 25, 2023

Should be fixed in #4816 . Could you try other buildings?

@Cjkjvfnby
Copy link
Contributor Author

So far I worked on 4 buildings and plan to continue today. I'll submit my progress after #4814.

PS. Keep in mind that it xmas in Europe and Geoff and Vezzra might be busy with it. Many people take this and next week as vacations. So maybe we could go ahead and merge these changes now, and get post review.

@Vezzra Vezzra changed the title Conver building from Focs to python Convert building from Focs to python Dec 28, 2023
@o01eg
Copy link
Contributor

o01eg commented Jan 6, 2024

Missed function:

CreateField type = "FLD_SUBSPACE_RIFT" size = 100

https://github.com/freeorion/freeorion/blob/master/default/scripting/buildings/BLACK_HOLE_COLLAPSER.focs.txt#L17

Will be implemented in #4838

@Cjkjvfnby
Copy link
Contributor Author

It looks like RootCandidate could be used in different contexts:

I guess the condition should became IsRootCandidate

@o01eg
Copy link
Contributor

o01eg commented Jan 10, 2024

I guess the condition should became IsRootCandidate

Yes, and it was already implemented.

@Cjkjvfnby
Copy link
Contributor Author

I removed my comments and moved all missed items to the issue body.

Currently, I am not sure what is missing, because all modules import buildings, and buildings have an error with 4 missed functions with a starlane in their name (they are in the list).

@Cjkjvfnby
Copy link
Contributor Author

@o01eg could you please look into this? Because of multiple missed methods, I'm blocked from the conversation.

@o01eg
Copy link
Contributor

o01eg commented Mar 20, 2024

It's a condition IsAnyObject, should looks like location = ~IsAnyObject

@Cjkjvfnby
Copy link
Contributor Author

Thank you, I have updated the issue with recent changes.

Could you prioritize the following functions for the next update?

They are used in building macros, and all modules fail on that.

PythonParser.cpp:434 : Executing module file j:/projects/freeorion/default\scripting\buildings\buildings.py
PythonParser.cpp:400 : Couldn't find file for module spec focs._effects.HasStarlane
PythonParser.cpp:400 : Couldn't find file for module spec focs._effects.StarlaneToWouldBeAngularlyCloseToExistingStarlane
PythonParser.cpp:400 : Couldn't find file for module spec focs._effects.StarlaneToWouldBeCloseToObject
PythonParser.cpp:400 : Couldn't find file for module spec focs._effects.StarlaneToWouldCrossExistingStarlane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:feature The Issue/PR describes or implements a new game feature. component:content scripting The Issue/PR deals with the FOCS language, turn events or the universe generator. status:work in progress The PR contains some implementation but isn't ready for merging onto the main development branch.
Projects
None yet
Development

No branches or pull requests

2 participants