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

Fixed tools/json_tools/table.py and this get clean csv file for tools/gfx_tools/tileset_coverage.py #74284

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

mdtrooper
Copy link
Contributor

@mdtrooper mdtrooper commented Jun 3, 2024

#74282

The tools/json_tools/table.py output bad csv:

$ less all_game_ids.csv
b'type',b'id',b'name',b'description',b'color',b'looks_like',b'copy-from',b'longest_side'
b'SPELL',b'dragon_inflatable',b'Inflatable Dragon',b'Creates a short-lived inflatable.',b'',b'',b'',b''
b'SPELL',b'ghost_inflatable',b'Inflatable Ghost',b'Creates a short-lived inflatable.',b'',b'',b'',b''
b'SPELL',b'fog_machine',b'Fog Ex Machina',b'You see fog bubbling out of the device.',b'',b'',b'',b''
b'SPELL',b'debug_kill_spell',b'Debug Kill Creature',"b""Deal damage equal to 100% of monster's HP.""",b'',b'',b'',b''
b'field_type',b'fd_ammo_loot_zone',b'',b'',b'',b'',b'',b''
b'field_type',b'fd_armor_loot_zone',b'',b'',b'',b'',b'',b''
b'field_type',b'fd_artifacts_loot_zone',b'',b'',b'',b'',b'',b''
b'field_type',b'fd_auto_drink_zone',b'',b'',b'',b'',b'',b''
b'field_type',b'fd_auto_eat_zone',b'',b'',b'',b'',b'',b''
b'field_type',b'fd_basecamp_food_zone',b'',b'',b'',b'',b'',b''
b'field_type',b'fd_basecamp_storage_zone',b'',b'',b'',b'',b'',b''
....

And tools/gfx_tools/tileset_coverage.py fails.

But with the change, the python script removed the doubled encoded, the string prefix b' :

$ less all_game_ids.csv
type,id,name,description,color,looks_like,copy-from,longest_side
SPELL,dragon_inflatable,Inflatable Dragon,Creates a short-lived inflatable.,,,,
SPELL,ghost_inflatable,Inflatable Ghost,Creates a short-lived inflatable.,,,,
SPELL,fog_machine,Fog Ex Machina,You see fog bubbling out of the device.,,,,
SPELL,debug_kill_spell,Debug Kill Creature,Deal damage equal to 100% of monster's HP.,,,,
field_type,fd_ammo_loot_zone,,,,,,
field_type,fd_armor_loot_zone,,,,,,
field_type,fd_artifacts_loot_zone,,,,,,
field_type,fd_auto_drink_zone,,,,,,
field_type,fd_auto_eat_zone,,,,,,
field_type,fd_basecamp_food_zone,,,,,,
field_type,fd_basecamp_storage_zone,,,,,,
field_type,fd_bionics_loot_zone,,,,,,
field_type,fd_books_loot_zone,,,,,,
field_type,fd_chemical_loot_zone,,,,,,
field_type,fd_chop_trees_zone,,,,,,
field_type,fd_clothing_loot_zone,,,,,,
field_type,fd_construction_blueprint_zone,,,,,,

I checked the github actions script and other script because the fix could break something, but not. It is only use the table.py for the tools/gfx_tools/tileset_coverage.py .

Summary

None

Purpose of change

Fix the get csv file from tileset_coverage.py.

Describe the solution

Only, I removed the double encode utf8.

Describe alternatives you've considered

None.

Testing

Check the steps from header in the file tools/gfx_tools/tileset_coverage.py .

Additional context

None.

@github-actions github-actions bot added [Python] Code made in Python Code: Tooling Tooling that is not part of the main game but is part of the repo. labels Jun 3, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Auto-requesting reviews from non-collaborators: @jbytheway

@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jun 3, 2024
@Maleclypse Maleclypse merged commit 43be6b6 into CleverRaven:master Jun 4, 2024
22 of 25 checks passed
@mdtrooper mdtrooper deleted the issues/#74282 branch June 4, 2024 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Code: Tooling Tooling that is not part of the main game but is part of the repo. json-styled JSON lint passed, label assigned by github actions [Python] Code made in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants