Description:
Add random park names.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
|
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -1131,6 +1131,16 | |||||
|
1131 | "Bend", "Rock", "Spring", "Whitting"], |
|
1131 | "Bend", "Rock", "Spring", "Whitting"], |
|
1132 | "town_name_adjectives": ["Little", "Big", "Royal", "Green", "Windy", |
|
1132 | "town_name_adjectives": ["Little", "Big", "Royal", "Green", "Windy", |
|
1133 | "Rocky", "Red", "Violet", "Wild"], |
|
1133 | "Rocky", "Red", "Violet", "Wild"], |
|
|
1134 | "park_name_adjectives": ["Little", "Big", "Green", "Windy", "Rolling", | ||
|
|
1135 | "Meandering", "Red", "Violet", "Wild", "Emerald", "Whispering"], | ||
|
|
1136 | "park_name_nouns": ["Hill", "Mound", "Wood", "Morraine", "Ridge", "Creek", "Meadow", "Willow", | ||
|
|
1137 | "Peak", "Valley"], | ||
|
|
1138 | "park_name_number": ["1000", "100", "20", "7", "10,000"], | ||
|
|
1139 | "park_name": ["#park_name_adjectives# #park_name_nouns# State Park", | ||
|
|
1140 | "#park_name_adjectives# #park_name_nouns.s# State Park", | ||
|
|
1141 | "#park_name_number# #park_name_nouns.s# State Park", | ||
|
|
1142 | "#park_name_adjectives# #park_name_nouns# Park", | ||
|
|
1143 | "#park_name_adjectives# #park_name_nouns# State Forest"], | ||
|
1134 | "occupation": ["shift supervisor", "towtruck operator", |
|
1144 | "occupation": ["shift supervisor", "towtruck operator", |
|
1135 | "truck driver", "truck driver", "truck driver", |
|
1145 | "truck driver", "truck driver", "truck driver", |
|
1136 | "server", "server", "server", "telemarketer", |
|
1146 | "server", "server", "server", "telemarketer", |
@@ -1138,8 +1148,9 | |||||
|
1138 | "librarian", "professor", "marketer", "fishmonger", |
|
1148 | "librarian", "professor", "marketer", "fishmonger", |
|
1139 | "programmer", "union organizer", "filmmaker", "medium", |
|
1149 | "programmer", "union organizer", "filmmaker", "medium", |
|
1140 | "drag performer", "lineman for the county", "steelworker", |
|
1150 | "drag performer", "lineman for the county", "steelworker", |
|
1141 |
"caddy", "sex worker", "baker", "line cook" |
|
1151 | "caddy", "sex worker", "baker", "line cook", "nurse", "nurse", "welder", |
|
1142 | "book_descriptor": ["history", "travelogue", "story", "saga", "tale", "reminiscings"], |
|
1152 | "bookbinder"], |
|
|
1153 | "book_descriptor": ["history", "anthology", "travelogue", "story", "saga", "tale", "reminiscings"], | ||
|
1143 | "noun": [ |
|
1154 | "noun": [ |
|
1144 | "Armour", "Barrymore", "Cabot", "Catholicism", "Chihuahua", |
|
1155 | "Armour", "Barrymore", "Cabot", "Catholicism", "Chihuahua", |
|
1145 | "Christianity", "Easter", "Frenchman", "Lowry", "Mayer", |
|
1156 | "Christianity", "Easter", "Frenchman", "Lowry", "Mayer", |
@@ -14,24 +14,24 | |||||
|
14 | [Receives(typeof(SetTextVariableMessage))] |
|
14 | [Receives(typeof(SetTextVariableMessage))] |
|
15 | public class TraceryBridgeEngine : Engine |
|
15 | public class TraceryBridgeEngine : Engine |
|
16 | { |
|
16 | { |
|
17 |
|
|
17 | public Grammar grammar; |
|
18 |
|
18 | ||
|
19 | public TraceryBridgeEngine(Grammar grammar) |
|
19 | public TraceryBridgeEngine(Grammar grammar) |
|
20 | { |
|
20 | { |
|
21 |
|
|
21 | this.grammar = grammar; |
|
22 | } |
|
22 | } |
|
23 |
|
23 | ||
|
24 |
|
24 | ||
|
25 | public override void Update(double dt) |
|
25 | public override void Update(double dt) |
|
26 | { |
|
26 | { |
|
27 |
|
|
27 | foreach (ref readonly var message in ReadMessages<SetTextVariableMessage>()) |
|
28 | { |
|
28 | { |
|
29 |
|
|
29 | string variableString = "#"; |
|
30 |
|
|
30 | variableString += String.Format("[{0}:{1}]", message.variable, message.value); |
|
31 |
|
|
31 | variableString += "vars# "; |
|
32 |
|
|
32 | Logging.Spy(new {var_string = variableString}); |
|
33 |
|
|
33 | var result = grammar.Flatten(variableString); |
|
34 | } |
|
34 | } |
|
35 | } |
|
35 | } |
|
36 |
|
36 | ||
|
37 | } |
|
37 | } |
@@ -194,7 +194,6 | |||||
|
194 | Logging.Success("Initialized Quad texture."); |
|
194 | Logging.Success("Initialized Quad texture."); |
|
195 | ContractWindow.LoadContent(this._imGuiRenderer, this.imageMap); |
|
195 | ContractWindow.LoadContent(this._imGuiRenderer, this.imageMap); |
|
196 | OptionsWindow.Initialize(new Vector2(FNAGame.width, FNAGame.height), gdm.IsFullScreen); |
|
196 | OptionsWindow.Initialize(new Vector2(FNAGame.width, FNAGame.height), gdm.IsFullScreen); |
|
197 | NewGameWindow.Initialize(); |
|
||
|
198 |
|
197 | ||
|
199 | //Must be done before SetFontMessage is sent |
|
198 | //Must be done before SetFontMessage is sent |
|
200 | var bakedMono = TtfFontBaker.Bake(File.OpenRead(@"Content/iosevka-term-extendedmedium.ttf"), |
|
199 | var bakedMono = TtfFontBaker.Bake(File.OpenRead(@"Content/iosevka-term-extendedmedium.ttf"), |
@@ -237,6 +236,8 | |||||
|
237 |
|
236 | ||
|
238 | this.grammar = new TraceryNet.Grammar(json2); |
|
237 | this.grammar = new TraceryNet.Grammar(json2); |
|
239 |
|
238 | ||
|
|
239 | //Has to happen after Grammar initialization. | ||
|
|
240 | NewGameWindow.Initialize(this.grammar); | ||
|
240 |
|
241 | ||
|
241 | WorldBuilder.AddEngine(new InputEngine(Menu.MENU_BAR_HEIGHT, this.camera, gdm)); |
|
242 | WorldBuilder.AddEngine(new InputEngine(Menu.MENU_BAR_HEIGHT, this.camera, gdm)); |
|
242 | WorldBuilder.AddEngine(new UIEngine()); |
|
243 | WorldBuilder.AddEngine(new UIEngine()); |
@@ -1,10 +1,11 | |||||
|
1 |
|
1 | ||
|
2 | using System; |
|
2 | using System; |
|
3 | using ImGuiNET; |
|
3 | using System.Text; |
|
4 |
|
|||
|
5 | using Num = System.Numerics; |
|
4 | using Num = System.Numerics; |
|
|
5 | using Microsoft.Xna.Framework; | ||
|
6 |
|
6 | ||
|
7 | using Microsoft.Xna.Framework; |
|
7 | using ImGuiNET; |
|
|
8 | using TraceryNet; | ||
|
8 |
|
9 | ||
|
9 | using isometricparkfna.Engines; |
|
10 | using isometricparkfna.Engines; |
|
10 | using isometricparkfna.Messages; |
|
11 | using isometricparkfna.Messages; |
@@ -15,6 +16,7 | |||||
|
15 | public static class NewGameWindow |
|
16 | public static class NewGameWindow |
|
16 | { |
|
17 | { |
|
17 |
|
18 | ||
|
|
19 | private static Grammar grammar; | ||
|
18 |
|
20 | ||
|
19 | public static bool had_focus = false; |
|
21 | public static bool had_focus = false; |
|
20 |
|
22 | ||
@@ -38,16 +40,19 | |||||
|
38 |
|
40 | ||
|
39 | public const int BUFFER_SIZE = 32; |
|
41 | public const int BUFFER_SIZE = 32; |
|
40 |
|
42 | ||
|
41 | public static void Initialize() |
|
43 | public static void Initialize(Grammar grammar) |
|
42 | { |
|
44 | { |
|
|
45 | NewGameWindow.grammar = grammar; | ||
|
|
46 | showModal = true; | ||
|
|
47 | |||
|
43 | NewGameWindow.Reset(); |
|
48 | NewGameWindow.Reset(); |
|
44 |
|
49 | ||
|
45 | showModal = true; |
|
||
|
46 |
|
50 | ||
|
47 | } |
|
51 | } |
|
48 |
|
52 | ||
|
49 | public static void Reset() { |
|
53 | public static void Reset() { |
|
50 | parkNameBuffer = new byte[BUFFER_SIZE]; |
|
54 | // parkNameBuffer = new byte[BUFFER_SIZE]; |
|
|
55 | parkNameBuffer = Encoding.UTF8.GetBytes(NewGameWindow.grammar.Flatten("#park_name#")); | ||
|
51 | pos = 0; |
|
56 | pos = 0; |
|
52 |
|
57 | ||
|
53 | playerNameBuffer = new byte[BUFFER_SIZE]; |
|
58 | playerNameBuffer = new byte[BUFFER_SIZE]; |
@@ -96,6 +101,12 | |||||
|
96 | } |
|
101 | } |
|
97 | NewGameWindow.pos = newPos; |
|
102 | NewGameWindow.pos = newPos; |
|
98 |
|
103 | ||
|
|
104 | ImGui.SameLine(); | ||
|
|
105 | if (ImGui.Button("Random")) | ||
|
|
106 | { | ||
|
|
107 | parkNameBuffer = Encoding.UTF8.GetBytes(NewGameWindow.grammar.Flatten("#park_name#")); | ||
|
|
108 | } | ||
|
|
109 | |||
|
99 | ImGui.Text("Formal Name: "); |
|
110 | ImGui.Text("Formal Name: "); |
|
100 | ImGui.SameLine(); |
|
111 | ImGui.SameLine(); |
|
101 |
|
112 | ||
@@ -177,7 +188,7 | |||||
|
177 |
|
188 | ||
|
178 | //God this sucks: |
|
189 | //God this sucks: |
|
179 | unsafe { |
|
190 | unsafe { |
|
180 | ImGui.InputTextWithHint("##playerName2", "Leave blank to use full name", ref playerName2Buffer, 32, ImGuiInputTextFlags.AutoSelectAll, null, (IntPtr)(&newPlayerName2Pos)); |
|
191 | ImGui.InputTextWithHint("##playerName2", "Leave blank to use full name", /*ref*/ playerName2Buffer, 32, ImGuiInputTextFlags.AutoSelectAll, null, (IntPtr)(&newPlayerName2Pos)); |
|
181 | } |
|
192 | } |
|
182 |
|
193 | ||
|
183 | NewGameWindow.playerName2Pos = newPlayerName2Pos; |
|
194 | NewGameWindow.playerName2Pos = newPlayerName2Pos; |
You need to be logged in to leave comments.
Login now