examples: Games: RobotFindsKitten: reading localized nkis.txt if exists

This commit is contained in:
glixx 2019-05-22 06:12:28 +03:00
parent b7b5cbfe31
commit 3b563c1f64

View file

@ -94,12 +94,18 @@ Public Sub Form_Open()
Dim nkitext As String[]
NKIs = New Object[]
nkitext = New String[]
Dim sLanguage As String
Randomize
origheight = Me.height
origwidth = Me.width
origfontsize = 12
Try nkistring = File.load("nkis.txt")
sLanguage = Left$(System.Language, 2)
Try nkistring = File.load("nkis_" & sLanguage & ".txt")
If Error Then
Try nkistring = File.load("nkis.txt")
Endif
nkitext = Split(nkistring, "\n")
KittenisFound = False
numnkis = 20