This repository has been archived by the owner on Mar 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # .gitignore # ProvinceMapper/Changelog.txt # ProvinceMapper/DefinitionReader.cs # ProvinceMapper/Form1.Designer.cs # ProvinceMapper/Form1.cs # ProvinceMapper/Form1.resx # ProvinceMapper/LocalizationReader.cs # ProvinceMapper/Mapping.cs # ProvinceMapper/MappingReader.cs # ProvinceMapper/Properties/Resources.Designer.cs # ProvinceMapper/Properties/Settings.Designer.cs # ProvinceMapper/Province.cs # ProvinceMapper/ProvinceMapper.csproj # ProvinceMapper/ProvinceMapper.sln
- Loading branch information
Showing
13 changed files
with
1,996 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
ProvinceMapper Change Log | ||
|
||
0.9H | ||
- Read YML province names from EU4 localization. | ||
- Handle being given a fresh province mappings file. | ||
- Preserve initial lines as initial lines. | ||
|
||
0.9G | ||
- Skip over unused and RNW provinces in the definition file instead of throwing out errors. | ||
- Handle reading mapping files with multiple sections. | ||
- Display and interact with mapping files with multiple sections. | ||
- Keep 'resettable' information in the file. | ||
|
||
0.9F | ||
- Add keyboard shortcuts: | ||
- F2: Change comment text | ||
- F3: Insert new comment above selected | ||
- F4: Insert new mapping above selected | ||
- Ctrl+Plus: Move selected up | ||
- Ctrl+Minus: Move selected down | ||
- Fix memory leak associated with map zoom | ||
|
||
0.9E | ||
- Allow one-sided province mappings | ||
- Mark one-sided and many-to-many province mappings in the output comments | ||
|
||
0.9D | ||
- Make map inversion optional (CK2 doesn't need it) | ||
- Throw a more useful error when a province is mapped but doesn't exist in game data | ||
|
||
0.9C | ||
- Optionally read province names from localization instead of map data | ||
|
||
0.9B | ||
- Preserve comment lines and allow new comments to be added | ||
- Fix boundary conditions for move up/move down | ||
- Fix handling of input files containing whitespace at BOL | ||
|
||
0.9A | ||
- Save settings from launch dialog | ||
- Support map zoom | ||
|
||
0.9 | ||
- initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.IO; | ||
|
||
namespace ProvinceMapper | ||
{ | ||
class DefinitionReader | ||
{ | ||
public DefinitionReader(string path, StatusUpdate su) | ||
{ | ||
StreamReader sr = new StreamReader(path, Encoding.GetEncoding(1252)); | ||
sr.ReadLine(); // discard first line | ||
while (!sr.EndOfStream) | ||
{ | ||
string province = sr.ReadLine(); | ||
string[] provinceTokens = province.Split(';'); | ||
if ( (provinceTokens[4] == "RNW") || ((provinceTokens[4].Length > 5) && (provinceTokens[4].Substring(0, 6) == "Unused")) ) | ||
{ | ||
continue; | ||
} | ||
try | ||
{ | ||
Province p = new Province(provinceTokens); | ||
provinces.Add(p); | ||
} | ||
catch | ||
{ | ||
} | ||
su(100.0 * sr.BaseStream.Position / sr.BaseStream.Length); | ||
} | ||
sr.Close(); | ||
} | ||
|
||
public List<Province> provinces = new List<Province>(); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.