You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10
+
11
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
+
13
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
All current and past versions of this mod can be downloaded from [GitHub](https://github.com/FluffierThanThou/WorkTab/releases).
36
36
37
37
# License
38
-
This mod is licensed under the Creative Commons [by-nc-sa 4.0 Int](http://creativecommons.org/licenses/by-nc-sa/4.0/) license.
38
+
All original code in this mod is licensed under the [MIT license](https://opensource.org/licenses/MIT). Do what you want, but give me credit.
39
+
All original content (e.g. text, imagery, sounds) in this mod is licensed under the [CC-BY-SA 4.0 license](http://creativecommons.org/licenses/by-sa/4.0/).
40
+
41
+
Parts of the code in this mod, and some content may be licensed by their original authors. If this is the case, the original author & license will either be given in the source code, or be in a LICENSE file next to the content. Please do not decompile my mods, but use the original source code available on [GitHub](https://github.com/FluffierThanThou/WorkTab/), so license information in the source code is preserved.
@@ -96,13 +166,13 @@ public int GetPriority( WorkGiverDef workgiver, int hour )
96
166
97
167
// force priority back to 0.
98
168
priority=0;
99
-
SetPriority(workgiver,0,hour);
169
+
SetPriority(workgiver,priority,hour);
100
170
}
101
171
returnpriority;
102
172
}
103
173
catch(ArgumentOutOfRangeException)
104
174
{
105
-
// workgiver-priority defmap is really just and ordered list indexed by a dynamically generated workgiver index int
175
+
// workgiver-priority defmap is really just an ordered list indexed by a dynamically generated workgiver index int
106
176
// if the number of workgivers increases, this means errors.
107
177
Messages.Message("WorkGiver database corrupted, resetting priorities for "+pawn.NameStringShort+". Did you add mods during the game?",MessageSound.SeriousAlert);
108
178
priorities=newList<DefMap<WorkGiverDef,int>>();
@@ -115,7 +185,7 @@ public int GetPriority( WorkGiverDef workgiver, int hour )
0 commit comments