Skip to content
This repository was archived by the owner on Sep 18, 2023. It is now read-only.

Commit 7e0aeee

Browse files
committed
Screenshot update; minor fixes
1 parent 659d29a commit 7e0aeee

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

Diplomata/Editor/Windows/TalkableMessagesEditor.cs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ public void Main()
856856
if (nextColumn == null)
857857
{
858858
context.columns = ArrayHelper.Add(context.columns, new Column(context.columns.Length, Controller.Instance.Options));
859-
nextColumn = context.columns[context.columns.Length];
859+
nextColumn = context.columns[context.columns.Length - 1];
860860
}
861861

862862
// Create a new message.
@@ -1061,22 +1061,20 @@ private void Sidebar()
10611061
EditorGUILayout.Separator();
10621062
GUILayout.Label("Message attributes (most influence in): ");
10631063

1064-
foreach (string attrName in Controller.Instance.Options.attributes)
1064+
foreach (var attrName in Controller.Instance.Options.attributes)
10651065
{
1066-
for (int i = 0; i < message.attributes.Length; i++)
1066+
for (var i = 0; i < message.attributes.Length; i++)
10671067
{
10681068
if (message.attributes[i].key == attrName)
1069-
{
10701069
break;
1071-
}
1072-
else if (i == message.attributes.Length - 1)
1073-
{
1070+
if (i == message.attributes.Length - 1)
10741071
message.attributes = ArrayHelper.Add(message.attributes, new AttributeDictionary(attrName));
1075-
}
10761072
}
1073+
if (message.attributes.Length == 0)
1074+
message.attributes = ArrayHelper.Add(message.attributes, new AttributeDictionary(attrName));
10771075
}
10781076

1079-
for (int i = 0; i < message.attributes.Length; i++)
1077+
for (var i = 0; i < message.attributes.Length; i++)
10801078
{
10811079
message.attributes[i].value =
10821080
(byte) EditorGUILayout.Slider(message.attributes[i].key, message.attributes[i].value, 0, 100);

Textures/Screenshot.jpg

-336 KB
Loading

0 commit comments

Comments
 (0)