Skip to content

Commit

Permalink
코드에디터 버그수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Buizz committed Feb 26, 2023
1 parent 1ace87a commit 4d95e14
Show file tree
Hide file tree
Showing 10 changed files with 404 additions and 26 deletions.
2 changes: 1 addition & 1 deletion EUD Editor 3/Class/LuaManager.vb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Imports NLua
Imports LuaInterface

Public Class LuaManager
Public Shared ReadOnly Property LuaFloderPath As String
Expand Down
11 changes: 7 additions & 4 deletions EUD Editor 3/Class/MacroFunc/MacroManager.vb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Imports System.IO
Imports System.Text.RegularExpressions
Imports NLua
Imports LuaInterface

Public Class MacroManager
Private lua As Lua
Expand Down Expand Up @@ -32,8 +32,6 @@ Public Class MacroManager
End Property
Public Sub New()
lua = New Lua()


FunctionList = New List(Of LuaFunction)


Expand Down Expand Up @@ -353,7 +351,12 @@ Public Class MacroManager
Try
lua.DoString(mstr)
Catch ex As Exception
Dim line As Integer = rstr.Substring(0, matches(i).Index).Replace(vbLf, vbCrLf).Replace(vbCr, vbCrLf).Split(vbCrLf).Count - 2
Dim line As Integer = -1
Try
line = rstr.Substring(0, matches(i).Index).Replace(vbLf, vbCrLf).Replace(vbCr, vbCrLf).Split(vbCrLf).Count - 2
Catch ttt As Exception

End Try

ErrorMsg = ex.ToString
If filename <> "" Then
Expand Down
8 changes: 4 additions & 4 deletions EUD Editor 3/Data/Lua/TriggerEditor/CompletedUnitCount.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ end
대상 플레이어입니다.
]================================]
function GetCompletedUnitCount(Unit, Player)
Player = ParsePlayer(Player) .. ""
Unit = ParseUnit(Unit) .. ""
Player = ParsePlayer(Player)
Unit = ParseUnit(Unit)
OffsetEPD = CompletedUnitCountEPD(Unit, Player)

echo(string.format("dwread_epd(%s)", OffsetEPD))
Expand All @@ -87,8 +87,8 @@ end
@param.Player.TrgPlayer
]================================]
function CompletedUnitCountEPD(Unit, Player) --일반/TrgUnit,TrgPlayer/[Player]의 [Unit]의 완료된 유닛보유수의 주소를 반환합니다.
Player = ParsePlayer(Player) .. ""
Unit = ParseUnit(Unit) .. ""
Player = ParsePlayer(Player)
Unit = ParseUnit(Unit)
Offset = 0x584DE4
if IsNumber(Player) and IsNumber(Unit) then
Offset = Offset + (Unit * 12 + Player) * 4
Expand Down
16 changes: 8 additions & 8 deletions EUD Editor 3/Data/Lua/TriggerEditor/SetDat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ DatFile
]================================]
function SetUnitsDat(DatType, Index, Value, Modifier) --DatFile/UnitsDat,TrgUnit,Number,TrgModifier/[Index]의 [DatType]의 값을 [Value]로 [Modifier]합니다.
Unit = ParseUnit(Index)
Modifier = ParseModifier(Modifier) .. ""
Modifier = ParseModifier(Modifier)
str = SetDatFile("units", DatType, Unit, Value, Modifier)
echo(str)
end
Expand Down Expand Up @@ -51,7 +51,7 @@ DatFile
]================================]
function SetWeaponsDat(DatType, Index, Value, Modifier) --DatFile/WeaponsDat,Weapon,Number,TrgModifier/[Index]의 [DatType]의 값을 [Value]로 [Modifier]합니다.
Weapon = ParseWeapon(Index)
Modifier = ParseModifier(Modifier) .. ""
Modifier = ParseModifier(Modifier)
str = SetDatFile("weapons", DatType, Weapon, Value, Modifier)
echo(str)
end
Expand Down Expand Up @@ -80,7 +80,7 @@ DatFile
]================================]
function SetFlingyDat(DatType, Index, Value, Modifier) --DatFile/FlingyDat,Flingy,Number,TrgModifier/[Index]의 [DatType]의 값을 [Value]로 [Modifier]합니다.
Flingy = ParseFlingy(Index)
Modifier = ParseModifier(Modifier) .. ""
Modifier = ParseModifier(Modifier)
str = SetDatFile("flingy", DatType, Flingy, Value, Modifier)
echo(str)
end
Expand Down Expand Up @@ -109,7 +109,7 @@ DatFile
]================================]
function SetSpritesDat(DatType, Index, Value, Modifier) --DatFile/SpritesDat,Sprite,Number,TrgModifier/[Index]의 [DatType]의 값을 [Value]로 [Modifier]합니다.
Sprite = ParseSprites(Index)
Modifier = ParseModifier(Modifier) .. ""
Modifier = ParseModifier(Modifier)
str = SetDatFile("sprites", DatType, Sprite, Value, Modifier)
echo(str)
end
Expand Down Expand Up @@ -138,7 +138,7 @@ DatFile
]================================]
function SetImagesDat(DatType, Index, Value, Modifier) --DatFile/ImagesDat,Image,Number,TrgModifier/[Index]의 [DatType]의 값을 [Value]로 [Modifier]합니다.
Image = ParseImages(Index)
Modifier = ParseModifier(Modifier) .. ""
Modifier = ParseModifier(Modifier)
str = SetDatFile("images", DatType, Image, Value, Modifier)
echo(str)
end
Expand Down Expand Up @@ -167,7 +167,7 @@ DatFile
]================================]
function SetUpgradesDat(DatType, Index, Value, Modifier) --DatFile/UpgradesDat,Upgrade,Number,TrgModifier/[Index]의 [DatType]의 값을 [Value]로 [Modifier]합니다.
Upgrade = ParseUpgrades(Index)
Modifier = ParseModifier(Modifier) .. ""
Modifier = ParseModifier(Modifier)
str = SetDatFile("upgrades", DatType, Upgrade, Value, Modifier)
echo(str)
end
Expand Down Expand Up @@ -196,7 +196,7 @@ DatFile
]================================]
function SetTechdataDat(DatType, Index, Value, Modifier) --DatFile/TechdataDat,Tech,Number,TrgModifier/[Index]의 [DatType]의 값을 [Value]로 [Modifier]합니다.
Tech = ParseTech(Index)
Modifier = ParseModifier(Modifier) .. ""
Modifier = ParseModifier(Modifier)
str = SetDatFile("techdata", DatType, Tech, Value, Modifier)
echo(str)
end
Expand Down Expand Up @@ -225,7 +225,7 @@ DatFile
]================================]
function SetOrdersDat(DatType, Index, Value, Modifier) --DatFile/OrdersDat,Order,Number,TrgModifier/[Index]의 [DatType]의 값을 [Value]로 [Modifier]합니다.
Order = ParseOrder(Index)
Modifier = ParseModifier(Modifier) .. ""
Modifier = ParseModifier(Modifier)
str = SetDatFile("orders", DatType, Order, Value, Modifier)
echo(str)
end
Loading

0 comments on commit 4d95e14

Please sign in to comment.