Skip to content

Commit

Permalink
ready for test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuyidiwow committed Nov 9, 2016
1 parent 8f4d6a0 commit 26ba2f5
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 43 deletions.
79 changes: 40 additions & 39 deletions .consulo/workspace.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<file path="/ComponentInfoManager.cs" changelist="dfe1d667-23ce-44ae-a412-173e440bc9ee" time="1478607219021" ignored="false" />
<file path="/ComponentInfo.cs" changelist="dfe1d667-23ce-44ae-a412-173e440bc9ee" time="1478608667157" ignored="false" />
<file path="/MyComponent.cs" changelist="dfe1d667-23ce-44ae-a412-173e440bc9ee" time="1478604978308" ignored="false" />
<file path="/Day.cs" changelist="dfe1d667-23ce-44ae-a412-173e440bc9ee" time="1478694754756" ignored="false" />
<file path="/ProgressManager.cs" changelist="dfe1d667-23ce-44ae-a412-173e440bc9ee" time="1478694090656" ignored="false" />
<file path="/Day.cs" changelist="dfe1d667-23ce-44ae-a412-173e440bc9ee" time="1478714983723" ignored="false" />
<file path="/ProgressManager.cs" changelist="dfe1d667-23ce-44ae-a412-173e440bc9ee" time="1478714870588" ignored="false" />
<file path="/Weather.cs" changelist="dfe1d667-23ce-44ae-a412-173e440bc9ee" time="1478690654342" ignored="false" />
<file path="/SpecialWeather.cs" changelist="dfe1d667-23ce-44ae-a412-173e440bc9ee" time="1478691529149" ignored="false" />
<file path="/BComponent.cs" changelist="dfe1d667-23ce-44ae-a412-173e440bc9ee" time="1478614252764" ignored="false" />
Expand Down Expand Up @@ -53,8 +53,8 @@
<file leaf-file-name="ProgressManager.cs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Assets/Scripts/Progress/ProgressManager.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="5899">
<caret line="779" column="39" selection-start-line="779" selection-start-column="39" selection-end-line="779" selection-end-column="39" />
<state relative-caret-position="272">
<caret line="162" column="32" selection-start-line="162" selection-start-column="32" selection-end-line="162" selection-end-column="32" />
<folding>
<element signature="e#0#25#0" expanded="true" />
<element signature="n#!!block;n#InitializeDays#0;n#ProgressManager#0" expanded="false" />
Expand Down Expand Up @@ -95,21 +95,21 @@
</provider>
</entry>
</file>
<file leaf-file-name="SpecialWeather.cs" pinned="false" current-in-tab="false">
<file leaf-file-name="SpecialWeather.cs" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/Assets/Scripts/Progress/SpecialWeather.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1054">
<state relative-caret-position="630">
<caret line="62" column="21" selection-start-line="62" selection-start-column="21" selection-end-line="62" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Day.cs" pinned="false" current-in-tab="true">
<file leaf-file-name="Day.cs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Assets/Scripts/Progress/Day.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="289">
<caret line="45" column="45" selection-start-line="45" selection-start-column="45" selection-end-line="45" selection-end-column="45" />
<state relative-caret-position="340">
<caret line="20" column="0" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
<folding />
</state>
</provider>
Expand Down Expand Up @@ -186,9 +186,9 @@
<option value="$PROJECT_DIR$/Assets/Scripts/GetterUtility.cs" />
<option value="$PROJECT_DIR$/Assets/Scripts/GameManager.cs" />
<option value="$PROJECT_DIR$/Assets/Scripts/Progress/Weather.cs" />
<option value="$PROJECT_DIR$/Assets/Scripts/Progress/SpecialWeather.cs" />
<option value="$PROJECT_DIR$/Assets/Scripts/Progress/ProgressManager.cs" />
<option value="$PROJECT_DIR$/Assets/Scripts/Progress/Day.cs" />
<option value="$PROJECT_DIR$/Assets/Scripts/Progress/SpecialWeather.cs" />
</list>
</option>
</component>
Expand Down Expand Up @@ -240,6 +240,7 @@
</navigator>
<panes>
<pane id="Scope" />
<pane id="PackagesPane" />
<pane id="ProjectPane">
<subPane>
<PATH>
Expand Down Expand Up @@ -314,7 +315,6 @@
</PATH>
</subPane>
</pane>
<pane id="PackagesPane" />
</panes>
</component>
<component name="PropertiesComponent">
Expand Down Expand Up @@ -422,11 +422,12 @@
<workItem from="1478677233427" duration="6865000" />
<workItem from="1478686101974" duration="7588000" />
<workItem from="1478699164776" duration="130000" />
<workItem from="1478709319119" duration="2643000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="52563000" />
<option name="totallyTimeSpent" value="55206000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1440" height="873" extended-state="6" />
Expand Down Expand Up @@ -850,14 +851,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Scripts/Progress/SpecialWeather.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1054">
<caret line="62" column="21" selection-start-line="62" selection-start-column="21" selection-end-line="62" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Scripts/Progress/Weather.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
Expand All @@ -876,17 +869,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Scripts/Progress/ProgressManager.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="5899">
<caret line="779" column="39" selection-start-line="779" selection-start-column="39" selection-end-line="779" selection-end-column="39" />
<folding>
<element signature="e#0#25#0" expanded="true" />
<element signature="n#!!block;n#InitializeDays#0;n#ProgressManager#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Scripts/Progress/ModifierManager.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
Expand All @@ -895,14 +877,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Scripts/Progress/Day.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="289">
<caret line="45" column="45" selection-start-line="45" selection-start-column="45" selection-end-line="45" selection-end-column="45" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Scripts/ComponentInfoManager.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="357">
Expand All @@ -927,6 +901,33 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Scripts/Progress/ProgressManager.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="272">
<caret line="162" column="32" selection-start-line="162" selection-start-column="32" selection-end-line="162" selection-end-column="32" />
<folding>
<element signature="e#0#25#0" expanded="true" />
<element signature="n#!!block;n#InitializeDays#0;n#ProgressManager#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Scripts/Progress/Day.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="20" column="0" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/Scripts/Progress/SpecialWeather.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="630">
<caret line="62" column="21" selection-start-line="62" selection-start-column="21" selection-end-line="62" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
Expand Down
12 changes: 9 additions & 3 deletions Assets/Scripts/Progress/Day.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ public class Day{
if (actualLabor > expectedLabor) {
if (actualLabor - expectedLabor > 2) {
modifierManager.motivationModifier -= (actualLabor - expectedLabor) * 0.02f;
if (modifierManager.motivationModifier <= 0.5f) {
modifierManager.motivationModifier = 0.5f;
}
}
}

Expand Down Expand Up @@ -118,7 +121,7 @@ public class Day{
if (actualLabor > expectedLabor) {
if (actualLabor - expectedLabor > 2) {
// decrease productivity to base when too crowded
modifier = (float) expectedLabor / (float) actualLabor;
modifier = (float) expectedLabor / (float) actualLabor + 0.1f;
}
}
return modifier;
Expand Down Expand Up @@ -176,7 +179,10 @@ public class Day{
comments += GetSkillComment();
comments += GetWeatherComment();
if (comments == "\n<b>Comments:</b>\n") {
comments += "The project progressed normally.\n";
comments += " The project progressed normally.\n";
}
if (actualProgress >= expectedProgress) {
comments += " + You're ahead schedule! Good job!\n";
}
str += comments;

Expand Down Expand Up @@ -204,7 +210,7 @@ public class Day{
if (actualLabor < expectedLabor) {
comments += " - Undermanning may delay project.\n";
if (expectedLabor - actualLabor <= 2) {
comments += " - Slight undermanning increased motivation.\n";
comments += " + Slight undermanning increased motivation.\n";
}
}

Expand Down
1 change: 1 addition & 0 deletions Assets/Scripts/Progress/ProgressManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public class ProgressManager : MonoBehaviour {
dayNumberText.SetActive(false);
changeDayButton.SetActive(false);
endDayButton.SetActive(false);
nextDayButton.SetActive(false);

skilledLaborInput.SetActive(true);
generalLaborInput.SetActive(true);
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Progress/SpecialWeather.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class SpecialWeather {
comments += "Very hot weather, ";
}
else if (i == conditions.Length - 1) {
comments += "Very hot decreased productivity.\n";
comments += "Very hot weather decreased productivity.\n";
}
}
if (conditions[i] == SpecialWeatherCondition.Rain) {
Expand Down

0 comments on commit 26ba2f5

Please sign in to comment.