-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completely reworked how priorities are stored. Instead of using defmaps where only the priorities are stored and the workgiverdefs are assumed to stay constant, we now store a list of workgiverdefs with the priorities to ascertain ordering, and match priorities to current workgiverdefs upon loading. In addition, we no longer use a list of lists for storing priorities, but a much more compressed block of digits per pawn, where each line is an hour and each column a workgiver. Migrating from the old to new format is done by setting a 'newFormat' flag in the save game, and should work out-of-the-box.
- Loading branch information
1 parent
144abd4
commit b7cf412
Showing
9 changed files
with
223 additions
and
43 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
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
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,20 @@ | ||
// Karel Kroeze | ||
// DefMap_Extensions.cs | ||
// 2017-02-07 | ||
|
||
using Verse; | ||
|
||
namespace Fluffy_Tabs | ||
{ | ||
public static class DefMap_Extensions | ||
{ | ||
public static string GetIntString<T>( this DefMap<T, int> defMap ) where T : Def, new() | ||
{ | ||
string[] msg = new string[defMap.Count]; | ||
for ( var i = 0; i < defMap.Count; i++ ) | ||
msg[i] = defMap[i].ToString(); | ||
|
||
return string.Join( "", msg ); | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.