Description:
Fix style.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r478:810e5ed4c449 -

@@ -135,7 +135,7
135 CurrentSpeaker = speaker.Trim(),
135 CurrentSpeaker = speaker.Trim(),
136 Options = this.Story.currentChoices
136 Options = this.Story.currentChoices
137 .Select(option => BleepAndFlatten(option.text,
137 .Select(option => BleepAndFlatten(option.text,
138 profanity_setting))
138 profanity_setting))
139 .ToList()
139 .ToList()
140 });
140 });
141
141
@@ -187,7 +187,7
187 CurrentSpeaker = speaker.Trim(),
187 CurrentSpeaker = speaker.Trim(),
188 Options = this.Story.currentChoices
188 Options = this.Story.currentChoices
189 .Select(option => BleepAndFlatten(option.text,
189 .Select(option => BleepAndFlatten(option.text,
190 profanity_setting ))
190 profanity_setting ))
191 .ToList()
191 .ToList()
192 });
192 });
193
193
@@ -17,7 +17,7
17 typeof(ToggleVisibilityMessage),
17 typeof(ToggleVisibilityMessage),
18 typeof(SetResolutionMessage),
18 typeof(SetResolutionMessage),
19 typeof(SetFontMessage),
19 typeof(SetFontMessage),
20 typeof(QuitGameMessage))]
20 typeof(QuitGameMessage))]
21 [Reads(typeof(AreaComponent),
21 [Reads(typeof(AreaComponent),
22 typeof(ContractStatusComponent),
22 typeof(ContractStatusComponent),
23 typeof(OptionsComponent))]
23 typeof(OptionsComponent))]
@@ -106,10 +106,10
106 }
106 }
107 }
107 }
108
108
109 foreach (ref readonly var message in ReadMessages<QuitGameMessage>())
109 foreach (ref readonly var message in ReadMessages<QuitGameMessage>())
110 {
110 {
111 this.game.quit = true;
111 this.game.quit = true;
112 }
112 }
113
113
114 }
114 }
115 }
115 }
@@ -27,7 +27,7
27 typeof(SetDialogMessage),
27 typeof(SetDialogMessage),
28 typeof(DialogChoiceMessage),
28 typeof(DialogChoiceMessage),
29 typeof(SetOptionMessage),
29 typeof(SetOptionMessage),
30 typeof(QuitGameMessage))]
30 typeof(QuitGameMessage))]
31 [Reads(typeof(VisibilityComponent),
31 [Reads(typeof(VisibilityComponent),
32 typeof(WindowTypeComponent),
32 typeof(WindowTypeComponent),
33 typeof(TrespassingPolicyComponent),
33 typeof(TrespassingPolicyComponent),
@@ -102,7 +102,7
102 this.dialogChoiceMessages = new List<DialogChoiceMessage>();
102 this.dialogChoiceMessages = new List<DialogChoiceMessage>();
103 this.setOptionMessages = new List<SetOptionMessage>();
103 this.setOptionMessages = new List<SetOptionMessage>();
104 this.gameRateMessages = new List<GameRateMessage>();
104 this.gameRateMessages = new List<GameRateMessage>();
105 this.quitGameMessages = new List<QuitGameMessage>();
105 this.quitGameMessages = new List<QuitGameMessage>();
106
106
107 this.windowStatuses = new Dictionary<Window, bool>();
107 this.windowStatuses = new Dictionary<Window, bool>();
108
108
@@ -205,10 +205,10
205 SendMessage(message);
205 SendMessage(message);
206 }
206 }
207
207
208 foreach (var message in this.quitGameMessages)
208 foreach (var message in this.quitGameMessages)
209 {
209 {
210 SendMessage(message);
210 SendMessage(message);
211 }
211 }
212
212
213 foreach (var message in this.setOptionMessages)
213 foreach (var message in this.setOptionMessages)
214 {
214 {
@@ -22,7 +22,7
22 typeof(TogglePauseMessage),
22 typeof(TogglePauseMessage),
23 typeof(GameRateMessage),
23 typeof(GameRateMessage),
24 typeof(GameStateMessage),
24 typeof(GameStateMessage),
25 typeof(QuitGameMessage))]
25 typeof(QuitGameMessage))]
26 [Reads(typeof(WindowTypeComponent),
26 [Reads(typeof(WindowTypeComponent),
27 typeof(GameStateComponent),
27 typeof(GameStateComponent),
28 typeof(VisibilityComponent))]
28 typeof(VisibilityComponent))]
@@ -203,15 +203,15
203 if (keyboardCur.IsKeyDown(Keys.Q) && keyboardPrev.IsKeyUp(Keys.Q))
203 if (keyboardCur.IsKeyDown(Keys.Q) && keyboardPrev.IsKeyUp(Keys.Q))
204 {
204 {
205 Logging.Info("Quitting");
205 Logging.Info("Quitting");
206 SendMessage(new QuitGameMessage{});
206 SendMessage(new QuitGameMessage {});
207 }
207 }
208 #endif
208 #endif
209 if ((keyboardCur.IsKeyDown(Keys.Q) && keyboardPrev.IsKeyUp(Keys.Q))
209 if ((keyboardCur.IsKeyDown(Keys.Q) && keyboardPrev.IsKeyUp(Keys.Q))
210 && (keyboardCur.IsKeyDown(Keys.LeftControl)
210 && (keyboardCur.IsKeyDown(Keys.LeftControl)
211 || keyboardCur.IsKeyDown(Keys.RightControl)))
211 || keyboardCur.IsKeyDown(Keys.RightControl)))
212 {
212 {
213 Logging.Info("Quitting");
213 Logging.Info("Quitting");
214 SendMessage(new QuitGameMessage{});
214 SendMessage(new QuitGameMessage {});
215 }
215 }
216 #endregion misc_keys
216 #endregion misc_keys
217 #region mouse_movement
217 #region mouse_movement
@@ -68,7 +68,7
68
68
69 decimal new_contract_amount = 0M;
69 decimal new_contract_amount = 0M;
70 decimal new_enforcement_amount = 0M;
70 decimal new_enforcement_amount = 0M;
71 decimal new_misc_amount = 0M;
71 decimal new_misc_amount = 0M;
72 // decimal new_upkeep_amount = 0M;
72 // decimal new_upkeep_amount = 0M;
73
73
74 foreach (ref readonly var entity in ReadEntities<BudgetLineComponent>())
74 foreach (ref readonly var entity in ReadEntities<BudgetLineComponent>())
@@ -89,32 +89,32
89 case "Enforcement":
89 case "Enforcement":
90 new_enforcement_amount += budgetComponent.amount;
90 new_enforcement_amount += budgetComponent.amount;
91 break;
91 break;
92 case "Misc":
92 case "Misc":
93 new_misc_amount += budgetComponent.amount;
93 new_misc_amount += budgetComponent.amount;
94 break;
94 break;
95 }
95 }
96
96
97 }
97 }
98
98
99 #region events
99 #region events
100 if (simulation.latestBudget.DateTime != default)
100 if (simulation.latestBudget.DateTime != default)
101 {
101 {
102
102
103 if (simulation.latestBudget.money < 25_000M)
103 if (simulation.latestBudget.money < 25_000M)
104 {
104 {
105 SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "LowFunds"});
105 SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "LowFunds"});
106 }
106 }
107 if (simulation.latestBudget.money < 10_000M)
107 if (simulation.latestBudget.money < 10_000M)
108 {
108 {
109 SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "VeryLowFunds"});
109 SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "VeryLowFunds"});
110 }
110 }
111 if (simulation.map.tree_count < 400)
111 if (simulation.map.tree_count < 400)
112 {
112 {
113 SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "PoorTreeHealth"});
113 SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "PoorTreeHealth"});
114 }
114 }
115 }
115 }
116
116
117 #endregion
117 #endregion
118
118
119
119
120 if (this.ticksToSend > 0)
120 if (this.ticksToSend > 0)
@@ -186,7 +186,7
186
186
187 simulation.contracts = new_contract_amount;
187 simulation.contracts = new_contract_amount;
188 simulation.enforcement = new_enforcement_amount;
188 simulation.enforcement = new_enforcement_amount;
189 simulation.misc = new_misc_amount;
189 simulation.misc = new_misc_amount;
190
190
191
191
192 //Move this here?
192 //Move this here?
@@ -75,9 +75,9
75 var index = 0;
75 var index = 0;
76 var path = message.Path;
76 var path = message.Path;
77
77
78 var matching_dialog_entites = ReadEntities<DialogComponent>()
78 var matching_dialog_entites = ReadEntities<DialogComponent>()
79 .SelectWhereF(e => GetComponent<DialogComponent>(e),
79 .SelectWhereF(e => GetComponent<DialogComponent>(e),
80 e => e.StartingKnot == path);
80 e => e.StartingKnot == path);
81 //If there are no existing dialog:
81 //If there are no existing dialog:
82 if(ReadEntities<DialogComponent>().Length == 0
82 if(ReadEntities<DialogComponent>().Length == 0
83 && this.Story.currentChoices.Count() == 0
83 && this.Story.currentChoices.Count() == 0
@@ -55,7 +55,7
55 {
55 {
56
56
57 System.Console.WriteLine("Quitting");
57 System.Console.WriteLine("Quitting");
58 bridgeEngine.quitGameMessages.Add(new QuitGameMessage{});
58 bridgeEngine.quitGameMessages.Add(new QuitGameMessage {});
59 }
59 }
60
60
61 ImGui.End();
61 ImGui.End();
@@ -41,7 +41,7
41 if (ImGui.Button("Quit", button_size))
41 if (ImGui.Button("Quit", button_size))
42 {
42 {
43 System.Console.WriteLine("Quitting");
43 System.Console.WriteLine("Quitting");
44 bridgeEngine.quitGameMessages.Add(new QuitGameMessage{});
44 bridgeEngine.quitGameMessages.Add(new QuitGameMessage {});
45 }
45 }
46
46
47 ImGui.End();
47 ImGui.End();
@@ -67,8 +67,9
67 {
67 {
68
68
69 foreach(var (width_option, height_option) in new[] {(1280, 640),
69 foreach(var (width_option, height_option) in new[] {(1280, 640),
70 (640, 320), (960, 480), (1600, 800),
70 (640, 320), (960, 480), (1600, 800),
71 (2560, 1440), (1280, 720), (1920, 1080)})
71 (2560, 1440), (1280, 720), (1920, 1080)
72 })
72 {
73 {
73 if (ImGui.Selectable(string.Format("{0}x{1}", width_option, height_option)))
74 if (ImGui.Selectable(string.Format("{0}x{1}", width_option, height_option)))
74 {
75 {
You need to be logged in to leave comments. Login now