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

Added deconstruction function and other fixes #118

Merged
merged 7 commits into from
Aug 27, 2021
Merged

Added deconstruction function and other fixes #118

merged 7 commits into from
Aug 27, 2021

Conversation

brodo97
Copy link
Contributor

@brodo97 brodo97 commented Aug 24, 2021

Added deconstruct function. Now you can deconstruct buildings level by level.
I found that useful on my mines upgrade schedule. Once the planet produce a good amount of deuterium then it can convert the energy production from solar to fusion and therefore consume less spaces

Fixed spyreports' ugliness. More elegant, compact and smart
Fixed stuff like missing spaces and quotation marks

#117
Fixed friendly_fleet and hostile_fleet crash on id casting
Can this fix the problem and also do not destroy all running bots?

Added deconstruct function. Now you can deconstruct buildings level by level
Fixed spyreports' ugliness. More elegant, compact and smart
Fixed stuff like missing spaces and quotation marks

Fixed friendly_fleet and hostile_fleet crash on id casting
Added deconstruct test
Added deconstruct explanation
Copy link
Collaborator

@PiecePaperCode PiecePaperCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job i loke your effort alot. i have some small changes i would love to see. il aprove them right away

ogame/__init__.py Outdated Show resolved Hide resolved
ogame/__init__.py Show resolved Hide resolved
ogame/__init__.py Show resolved Hide resolved
ogame/test.py Show resolved Hide resolved
Added cancel_building function to cancel construction/deconstruction of buildings and cancel_research to cancel the ongoing research. (Didn't test with commander)
Fixed celestial function temperature extraction. Instead of trying a list of possible regex we can extract the two numbers in the textContent[3] var using another regex.
Should I also add the research test?
@PiecePaperCode PiecePaperCode self-requested a review August 27, 2021 12:23
Copy link
Collaborator

@PiecePaperCode PiecePaperCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small issues left that dont need to be adressed.

good job love the work you put in

'type': type}
)

def cancel_building(self, id):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are only used by cancel you could nest them instead of making them visible by the user. but its fine also as is

).metal_mine
self.assertTrue(before.level > after.level or after.in_construction)

def check_cancel(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the test framework dosent run in a row usualy. if one start before the other the cancel test will fail. ether you combine the two or you implement them to eachother. not really a problem as it can be changed easy

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the best option is to test both simultaneously.

@PiecePaperCode PiecePaperCode merged commit 7fd7eef into alaingilbert:develop Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants