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

Set large_image via web #27

Merged
merged 16 commits into from
Jul 17, 2023
Merged

Set large_image via web #27

merged 16 commits into from
Jul 17, 2023

Conversation

Wolfmyths
Copy link
Contributor

This is for Issue #12

Added a dictionary that includes every country in the game

Added a __str__ method to the country class

The image links are either from imgur or the hoi4 wiki

I don't know if .gif files are supported, so "KHA" needs to be tested

Details of this PR is found in commits starting at "Made switch statement into dict, added str()"

Wolfmyths and others added 16 commits July 9, 2023 16:27
Moved countries.json to src/discordRPC

Deleted requestflag.py and integrated getFlag() into countries.py
Made the switch statement in getCountry() into a dictionary

If a country isn't in the dictionary, it will create a new entry to prevent crashing.

Changed a country variable to countryName as it would cause a traceback when accessing the countries dict

Added a __str__ method to the Country class for debugging
Added every single country and most links to their respective flag images

Some countries did not have wiki pages, these links will be added in a later commit

The countries are ordered in the same order as they are on the wiki's list of countries

Countries that have irregular data are put at the top of the dict
getCountry() now checks if the img string is empty, and will then set the country to HOI_ICON

Changed single quotes to double

[D##][0] is now civil war country

Added comments about missing images and images that are really small

Found flag links for most of the remaining countries
(The ones with a imgur link may be a modern img of the flag)

Renamed some misleading country names
All links for every country is now added

Adjusted CIN country name

Images that were labeled small now have higher res versions

USB uses the US flag img
BAS uses the UK flag img
Both of these countries I could not find an image for anywhere
Removed trailing whitespace on line 5

Changed fr string to a r string
@ThiaudioTT ThiaudioTT self-requested a review July 15, 2023 21:27
Copy link
Owner

@ThiaudioTT ThiaudioTT left a comment

Choose a reason for hiding this comment

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

All good, thank you.

@ThiaudioTT ThiaudioTT merged commit 5f705b9 into ThiaudioTT:main Jul 17, 2023
@ThiaudioTT ThiaudioTT linked an issue Jul 17, 2023 that may be closed by this pull request
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.

Set the large_image via web
2 participants