@@ -111,43 +111,61 @@ function PANEL:Init()
111
111
self .responsesForm :SetPadding (4 );
112
112
self .responsesForm :SetName (" Responses" );
113
113
self .settingsForm :AddItem (self .responsesForm );
114
+
115
+ self .startText = self .responsesForm :TextEntry (" When the player starts trading." );
116
+ self .startSound = self .responsesForm :TextEntry (" The sound to play for the above phrase." );
117
+ self .startHideName = self .responsesForm :CheckBox (" Hide the salesman's name for the above phrase." );
114
118
115
119
self .noSaleText = self .responsesForm :TextEntry (" When the player cannot trade with them." );
120
+ self .noSaleSound = self .responsesForm :TextEntry (" The sound to play for the above phrase." );
121
+ self .noSaleHideName = self .responsesForm :CheckBox (" Hide the salesman's name for the above phrase." );
122
+
116
123
self .noStockText = self .responsesForm :TextEntry (" When the salesman does not have an item in stock." );
124
+ self .noStockSound = self .responsesForm :TextEntry (" The sound to play for the above phrase." );
125
+ self .noStockHideName = self .responsesForm :CheckBox (" Hide the salesman's name for the above phrase." );
126
+
117
127
self .needMoreText = self .responsesForm :TextEntry (" When the player cannot afford the item." );
128
+ self .needMoreSound = self .responsesForm :TextEntry (" The sound to play for the above phrase." );
129
+ self .needMoreHideName = self .responsesForm :CheckBox (" Hide the salesman's name for the above phrase." );
130
+
118
131
self .cannotAffordText = self .responsesForm :TextEntry (" When the salesman cannot afford the item." );
132
+ self .cannotAffordSound = self .responsesForm :TextEntry (" The sound to play for the above phrase." );
133
+ self .cannotAffordHideName = self .responsesForm :CheckBox (" Hide the salesman's name for the above phrase." )
134
+
119
135
self .doneBusinessText = self .responsesForm :TextEntry (" When the player is done doing trading." );
136
+ self .doneBusinessSound = self .responsesForm :TextEntry (" The sound to play for the above phrase." );
137
+ self .doneBusinessHideName = self .responsesForm :CheckBox (" Hide the salesman's name for the above phrase." )
120
138
121
- if (!Clockwork .salesman .text .noSale ) then
122
- self .noSaleText :SetValue (" I cannot trade my inventory with you!" );
123
- else
124
- self .noSaleText :SetValue (Clockwork .salesman .text .noSale );
125
- end ;
126
-
127
- if (!Clockwork .salesman .text .noStock ) then
128
- self .noStockText :SetValue (" I do not have that item in stock!" );
129
- else
130
- self .noStockText :SetValue (Clockwork .salesman .text .noStock );
131
- end ;
132
-
133
- if (!Clockwork .salesman .text .needMore ) then
134
- self .needMoreText :SetValue (" You cannot afford to buy that from me!" );
135
- else
136
- self .needMoreText :SetValue (Clockwork .salesman .text .needMore );
137
- end ;
138
-
139
- if (!Clockwork .salesman .text .cannotAfford ) then
140
- self .cannotAffordText :SetValue (" I cannot afford to buy that item from you!" );
141
- else
142
- self .cannotAffordText :SetValue (Clockwork .salesman .text .cannotAfford );
143
- end ;
144
-
145
- if (!Clockwork .salesman .text .doneBusiness ) then
146
- self .doneBusinessText :SetValue (" Thanks for doing business, see you soon!" );
147
- else
148
- self .doneBusinessText :SetValue (Clockwork .salesman .text .doneBusiness );
149
- end ;
139
+ self .startText :SetValue (Clockwork .salesman .text .start .text or " How can I help you today?" );
140
+ self .startSound :SetValue (Clockwork .salesman .text .start .sound or " " );
141
+
142
+ self .startHideName :SetValue (Clockwork .salesman .text .start .bHideName == true );
143
+
144
+ self .noSaleText :SetValue (Clockwork .salesman .text .noSale .text or " I cannot trade my inventory with you!" );
145
+ self .noSaleSound :SetValue (Clockwork .salesman .text .noSale .sound or " " );
146
+
147
+ self .noSaleHideName :SetValue (Clockwork .salesman .text .noSale .bHideName == true );
148
+
149
+ self .noStockText :SetValue (Clockwork .salesman .text .noStock .text or " I do not have that item in stock!" );
150
+ self .noStockSound :SetValue (Clockwork .salesman .text .noStock .sound or " " );
151
+
152
+ self .noStockHideName :SetValue (Clockwork .salesman .text .noStock .bHideName == true );
150
153
154
+ self .needMoreText :SetValue (Clockwork .salesman .text .needMore .text or " You cannot afford to buy that from me!" );
155
+ self .needMoreSound :SetValue (Clockwork .salesman .text .needMore .sound or " " );
156
+
157
+ self .needMoreHideName :SetValue (Clockwork .salesman .text .needMore .bHideName == true );
158
+
159
+ self .cannotAffordText :SetValue (Clockwork .salesman .text .cannotAfford .text or " I cannot afford to buy that item from you!" );
160
+ self .cannotAffordSound :SetValue (Clockwork .salesman .text .cannotAfford .sound or " " );
161
+
162
+ self .cannotAffordHideName :SetValue (Clockwork .salesman .text .cannotAfford .bHideName == true );
163
+
164
+ self .doneBusinessText :SetValue (Clockwork .salesman .text .doneBusiness .text or " Thanks for doing business, see you soon!" );
165
+ self .doneBusinessSound :SetValue (Clockwork .salesman .text .doneBusiness .sound or " " );
166
+
167
+ self .doneBusinessHideName :SetValue (Clockwork .salesman .text .doneBusiness .bHideName == true );
168
+
151
169
self .factionsForm = vgui .Create (" DForm" );
152
170
self .factionsForm :SetPadding (4 );
153
171
self .factionsForm :SetName (" Factions" );
@@ -285,11 +303,36 @@ function PANEL:Think()
285
303
self :SetSize (ScrW () * 0.5 , ScrH () * 0.75 );
286
304
self :SetPos ((ScrW () / 2 ) - (self :GetWide () / 2 ), (ScrH () / 2 ) - (self :GetTall () / 2 ));
287
305
288
- Clockwork .salesman .text .doneBusiness = self .doneBusinessText :GetValue ();
289
- Clockwork .salesman .text .cannotAfford = self .cannotAffordText :GetValue ();
290
- Clockwork .salesman .text .needMore = self .needMoreText :GetValue ();
291
- Clockwork .salesman .text .noStock = self .noStockText :GetValue ();
292
- Clockwork .salesman .text .noSale = self .noSaleText :GetValue ();
306
+ Clockwork .salesman .text .doneBusiness = {
307
+ text = self .doneBusinessText :GetValue (),
308
+ bHideName = (self .doneBusinessHideName :GetChecked () == true ),
309
+ sound = self .doneBusinessSound :GetValue ()
310
+ };
311
+ Clockwork .salesman .text .cannotAfford = {
312
+ text = self .cannotAffordText :GetValue (),
313
+ bHideName = (self .cannotAffordHideName :GetChecked () == true ),
314
+ sound = self .cannotAffordSound :GetValue ()
315
+ };
316
+ Clockwork .salesman .text .needMore = {
317
+ text = self .needMoreText :GetValue (),
318
+ bHideName = (self .needMoreHideName :GetChecked () == true ),
319
+ sound = self .needMoreSound :GetValue ()
320
+ };
321
+ Clockwork .salesman .text .noStock = {
322
+ text = self .noStockText :GetValue (),
323
+ bHideName = (self .noStockHideName :GetChecked () == true ),
324
+ sound = self .noStockSound :GetValue ()
325
+ };
326
+ Clockwork .salesman .text .noSale = {
327
+ text = self .noSaleText :GetValue (),
328
+ bHideName = (self .noSaleHideName :GetChecked () == true ),
329
+ sound = self .noSaleSound :GetValue ()
330
+ };
331
+ Clockwork .salesman .text .start = {
332
+ text = self .startText :GetValue (),
333
+ bHideName = (self .startHideName :GetChecked () == true ),
334
+ sound = self .startSound :GetValue ()
335
+ };
293
336
Clockwork .salesman .showChatBubble = (self .showChatBubble :GetChecked () == true );
294
337
Clockwork .salesman .buyInShipments = (self .buyInShipments :GetChecked () == true );
295
338
Clockwork .salesman .physDesc = self .physDesc :GetValue ();
0 commit comments