Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fleshes out the loan system with mechanics for tracking how much one country owes another at any given time which helps with handling bankruptcy events. This is still a WIP but I wanted to see if there was anything I needed to change or if there were any suggestions, particularly for handling things like what happens when a country loans out a pop's savings then that pop goes to withdraw its savings (basically how to handle the reserve requirement of a national bank) and how to track how much of each pop's money is currently being loaned out for the purpose of interest payments. Victoria 2 had a bug where interest payments on national bank debt never made its way to the pops' pockets which meant that that money was vanishing from the simulation so I want to make sure that bug is fixed as well.
Currently implemented is the national bank system, "shadowy financiers" or private investors which Victoria 2 had to make sure there was money available for loans if no other nations had money available to loan, functions to take/repay loans given an amount of money to cover/repay, and bankruptcy turning loan interest off but there's still some interface work to do, more extensive testing, and some sort of AI loan logic would be nice.
I'll see about getting any sort of low-hanging fruit for increased modability into this PR without bloating the scope, I think an easy one would be having a separate interest rate (and modifiers) for national vs foreign debt.