From d5d3fa9d1109071d19bfec8f32e9b2157b31c060 Mon Sep 17 00:00:00 2001 From: Alexey Chubukov Date: Tue, 14 Nov 2023 15:29:45 +0400 Subject: [PATCH] fix on issue #2 --- dodo.py | 12 +++--------- src/patches/history_countries_ISR.patch | 17 ++++++++++++++--- .../russian/victory_points2_l_russian.yml | 4 ++-- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/dodo.py b/dodo.py index ff7f20c..88423f9 100644 --- a/dodo.py +++ b/dodo.py @@ -84,11 +84,11 @@ def task_patch_history_states_scripted(): target.parent.mkdir(parents=True, exist_ok=True) seen_history = False wrote_history = False - with target.open('w') as outfile: - with source.open() as infile: + with source.open(newline='') as infile: + with target.open('w') as outfile: for line_in in infile: outfile.write(line_in) - seen_history = 'history' in line_in + seen_history = seen_history or ( 'history' in line_in ) if not wrote_history and seen_history and '{' in line_in: for province_id, province_info in provinces.items(): outfile.write( @@ -117,12 +117,6 @@ def task_patch(): 'actions' : patch, 'clean' : True } - # return { - # 'file_dep' : list(patchwork.prerequisites(dir_vanilla)), - # 'targets' : list(patchwork.targets()), - # 'actions' : list(patchwork.actions(dir_vanilla)), - # 'clean' : True - # } def task_image(): filelist = dir_src_raw_files + list(patchwork.targets()) diff --git a/src/patches/history_countries_ISR.patch b/src/patches/history_countries_ISR.patch index d6e35f6..6c88848 100644 --- a/src/patches/history_countries_ISR.patch +++ b/src/patches/history_countries_ISR.patch @@ -1,6 +1,17 @@ ---- "../vanilla/history/countries/ISR - Israel.txt" 2023-11-11 18:15:37.409356975 +0400 -+++ "src/history/countries/ISR - Israel.txt" 2023-11-08 21:39:45.261768497 +0400 -@@ -83,7 +82,7 @@ +--- "../vanilla/v1.13.4/history/countries/ISR - Israel.txt" 2023-11-12 00:08:12.317582292 +0400 ++++ "build/patched/history/countries/ISR - Israel.txt" 2023-11-12 23:53:25.565864688 +0400 +@@ -71,8 +71,8 @@ + + set_politics = { + ruling_party = democratic +- last_election = "1936.1.1" +- election_frequency = 48 ++ last_election = "1930.1.7" ++ election_frequency = 84 + elections_allowed = yes + } + set_popularities = { +@@ -83,7 +83,7 @@ create_country_leader = { name = "David Ben-Gurion" desc = "" diff --git a/src/raw/localisation/russian/victory_points2_l_russian.yml b/src/raw/localisation/russian/victory_points2_l_russian.yml index e41472d..bb37245 100644 --- a/src/raw/localisation/russian/victory_points2_l_russian.yml +++ b/src/raw/localisation/russian/victory_points2_l_russian.yml @@ -103,7 +103,7 @@ VICTORY_POINTS_12657:0 "Благовещенск" VICTORY_POINTS_4725:0 "Амурск" VICTORY_POINTS_4246:0 "Биробиджан" - VICTORY_POINTS_12559:0 "Николаевск-на-Амур" + VICTORY_POINTS_12559:0 "Николаевск-на-Амуре" VICTORY_POINTS_855:0 "Оха" VICTORY_POINTS_12551:0 "Охотск" VICTORY_POINTS_7878:0 "Петропавловск-Камчатский" @@ -113,7 +113,7 @@ VICTORY_POINTS_11940:0 "Бени-Валид" VICTORY_POINTS_2012:0 "Кениеба" VICTORY_POINTS_7954:0 "Гао" - VICTORY_POINTS_8034:0 "Порт=Харкорт" + VICTORY_POINTS_8034:0 "Порт-Харкорт" VICTORY_POINTS_4972:0 "Хадеджиа" VICTORY_POINTS_4997:0 "Майдугури" VICTORY_POINTS_2046:0 "Бербер"