Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaning and refactoring the data (#12)
* Add civilizations data given a scenario in a lazy approach * Handle civ function with int * Rename civ corefunction * Move civilization function to CoreData * Simplify civilization calling * Add methods for vassality * Simplify civilization calling * Remove duplicates of teams and players * Replace old variables (xml techno) * Replace old variables (xml unit) * Fix typo enum * Replace old variables (xml bonus) * Fix typo enum (goldenbull) * Fix typo enum (promotion) * Fix typo (promotion) * Rename corporation enum * Replace old variables (xml wonder) * Replace old variables (xml building) * Replace old variables (xml leader) * Move religious buildings * Fix settings * Add required dependencies for development * Bump ruff version * Remove remaining civilizations calling for single civ * Fix has_state_religion * Add function for religion identifier * Add method to check if a civilization has a specific state religion * Refactor state_religion calling * Refactor lReformationMatrix * Replace old variable (xml province) * Replace old variables (xml regions) * Fix typo (CASTILE * Fix typo xml * Fix wonder and building * Clean provincemanager * Refacto religious buildings * Refacto regions * Refacto timeline tech modifier * Fix redefinition in imports * Refacto modifiers * Replace old variables (consts visible areas) * Replace old variables (consts broader areas) * Remove remaining call of old variable from Consts.py * Replace old variables (consts areas) * Rollback to hardcoded birthdate for companies * Refacto civilization provinces * Fix typo * Update Tile and Tiles classes * Update maps * Rename province type members * Update maps * Switch maps data from tuple to list * Rename map variables * Add deepcopy where map variables is used * Rename map data file * Refacto AI modifiers * Rename enum * Refacto modifiers * Split ai and human modifiers * Refacto initial buildings * Fix typo * Fix province manager * Fix civilization for cities * Fix typo * Refacto game balance * Rename balance module * Isolate external paths * Refacto event drive provinces modifications * Move and rename province manager * Fix respawn event for provinces * Fix missing members * Fix filename * Fix typo civ attr * Fix area attributes in RFCEMapUtil * Clean barbs * Replace old getScenario refs * Refacto remaining getScenario functions * Remove unused functions * Refacto human ID function * Add is_existing method * Add step for setup dependencies in workflow * Refacto isExisting player method * Refacto getRandomCiv * Remove unused functions * Remove unused PyPlayer * Remove unused functions * Split map data * Refacto map data * Remove unused functions * Rename map utils * Refacto and clean human fct * Refacto in-game random number generations * Refacto getRandomEntry * Add weighted_choice function * Fix formula * Fix typo * Improve choices function * Switch choice to PyUtils choices * Refacto getRandomByWeight * Revert "Switch choice to PyUtils choices" This reverts commit 4b3a66d. * Fix missing imports * Fix city name calling function * Remove coupling between province and riseandfall * Fix typo * Can specify scenario in functions * Rewrite scenario with try except block * Refacto some rise events * Move world width and height to corestructures * Clean the finance advisor * Add city locations * Refacto onSpawn province * Clean province module * Add line lenght in ruff * Rollback cities locations to single tuple * Update import test * Fix province * Rename stored data instance * Switch stored data from dict to attr * Replace old instance of stored data dict * Fix typo * Move company building definition in misc data * Remove unused functions * Refacto getStability * Fix temporary variables in stored data * Fix colony tab * Refacto event manager * Remove unused stored data calls * Refacto minor wars * Add try..except for choices calling * Remove unused variable * Refacto redundant city locations * Refacto getCatholicCivs * Rename province event enum * Fix lCatholicCivs * Add method for specific christian religion civs * Refacto lCatholicCiv * Add more civilization methods * Add more civilizations methods * Refacto lCatholicCiv * Refacto lReformationNeighbours * Refacto initial tech * Remove unused data * Remove unused variable * Refacto lCatholicCivs * Rename set_tech to add_tech * Remove unused call * Handle case where weights are not append * Rename scenario dependent initial conditions * Update README.md * Rename scenario dependent data mapper * Rework initial workers * Fix initial call functions * Rename enum * Fix city tile * Add transform method * Refacto initial units * Refacto additionalUnits * Remove old code * Remove old comments * Move to functions some civilization methods * Refacto main/minor civ with inner functions * Separate Collection class in 2 * Add function for not any * Add shuffle method to collection * Add some functions from RFC DOC * Fix Consts * Fix lithunia victory * Remove old Tile classes * Remove old civ properties * Move the area parser to corefunctions * Rewrite import for corefunctions * Switch back from randint to getSorenRandNum * Rename collection * Add game info classes * Add empty method * Rename functions * Add classes and functions for handle turn * Add try..except for info_types * Add factory for techs * Rename factory * Move turn functions and class * Replace gc.getGame().getGameTurn() with turn function * Replace CyGame().getGameTurn() with turn function * Add classes to handle units * Add classes and functions to handle unit creation * Replace makeUnit functions * Add ability to name units * Rename variable * Replace old makeUnit function calls * Improve random entry functions * Handle case where list is empty * Fix random_entry with collection * Fix reformation * Replace DateTurn with year function in components * Revert "Replace DateTurn with year function in components" This reverts commit 24c22e8. * Add function for showing a message * Replace popup calling with show and text functions * Refactor event_popup * Refacto getText * Move MessageData to consts * Add function for showing a announcement * Add method for check if civ has a specific civic * Refacto getText * Refacto colorText * Fix refacto getText * Fix refacto getColorText * Fix turn * Refacto addMessage * Replace choices [0] * Update vscode settings * Add methods for enrich existing collection * Add function for getting the closest city * Add remaining factories * Add other methods for collections * Fix collections * Fix flipCity * Refacto flipCity * Refacto DateTurn with year * Split call of game balance * Refacto DateTurn with year for tech timeline * Fix city factory * Must call the factory * Remove instance of infos factory * Remove unused constant * Move data mapper classes to BaseStructures.py * Fix location arg * Refacto getWorldPlotsList * Apply formatting * Apply formatting #2 * Bump action versions * Fix list of minor civs * Fix pyright settigns * Fix model * Add comment * Refacto getCityList * Refacto getPlotList and surroundingPlots * Refacto selectRandomCityAll * Fix units() * Fix previousOwner * Fix surrounding * Rename apply method * Remove unused fct * Add function for province map * Fix reuse key * Add pillow * Fix script for map renderer * Refacto usage of CITIES_MAP * Fix undefined variable * Rename DC methods * Remove unused fct
- Loading branch information