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

Commit 78e4926

Browse files
committed
Stop folding item names, restrict text boxes
Apparently, ACE thinks `Laserdesignator` and `laserdesignator` are two differen items, and would show two items in the Arsenal (but both leading to the same in-game item). So we stop folding the case of items from the `assignGear` file. If the MM has tow different case expressions of the same item, they will dupe, but there is not much we can do. Further, restrict the text boxes to plaintext as a defensive measure, and set the font to monospaced, so debug screenshots are more easy to read.
1 parent f939bff commit 78e4926

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

main.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import (
1313
)
1414

1515
const (
16-
VERSION = "0.0.2"
16+
VERSION = "0.0.3"
1717
)
1818

1919
var (
2020
re_comment = regexp.MustCompile("//.*$")
21-
re_loadout = regexp.MustCompile(".*setunitloadout *(\\[[^;]+);.*")
21+
re_loadout = regexp.MustCompile("(?i).*setunitloadout *(\\[[^;]+);.*")
2222
re_brackets = regexp.MustCompile("[][]")
2323
re_qitem = regexp.MustCompile(`.*("[^"]+").*`)
2424

@@ -63,13 +63,17 @@ func main() {
6363
action2 := helpMenu.AddAction("About Qt")
6464
action2.ConnectTriggered(func(checked bool) { app.AboutQt() })
6565

66-
// Create a line edit and add it to the layout
66+
// Create a text edit box and add it to the layout
6767
input := widgets.NewQTextEdit(nil)
6868
input.SetPlaceholderText("Paste simple assignGear contents here")
69+
input.SetAcceptRichText(false)
70+
input.SetFontFamily("Monospace")
6971
layout.AddWidget(input, 0, 0)
7072

7173
output := widgets.NewQTextEdit(nil)
7274
output.SetPlaceholderText("Limited Arsenal SQF will appear here")
75+
input.SetAcceptRichText(false)
76+
input.SetFontFamily("Monospace")
7377
layout.AddWidget(output, 0, 0)
7478

7579
// Create a button and add it to the layout
@@ -96,7 +100,7 @@ func getLAfromLO(s string) string {
96100
items := make(map[string]bool)
97101
for _, line := range strings.Split(s, "\n") {
98102
line = strings.Trim(line, " \n\r\t")
99-
line = strings.ToLower(line)
103+
//line = strings.ToLower(line)
100104
line = re_comment.ReplaceAllString(line, "")
101105
lo := re_loadout.FindStringSubmatch(line)
102106
if len(lo) == 0 {

0 commit comments

Comments
 (0)