Skip to content

Commit

Permalink
attempting to debug auto marker randomness and random crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
chompy committed Nov 17, 2021
1 parent 4eef581 commit aca3af0
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 14 deletions.
9 changes: 7 additions & 2 deletions FFTools_ACT_Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
using Advanced_Combat_Tracker;

[assembly: AssemblyTitle("FFTools")]
[assembly: AssemblyDescription("Extends FFXIV parsing with Lua scripts that support TTS callouts, web views, and more.")]
[assembly: AssemblyDescription("Extends FFXIV parsing with Lua scripts that support TTS callouts, web UI, and more.")]
[assembly: AssemblyCompany("Chompy#3436")]
[assembly: AssemblyVersion("0.03")]

Expand All @@ -53,7 +53,7 @@ public class FFTools : UserControl, IActPluginV1
const byte DATA_TYPE_PLAYER = 205; // Data type, request to send last player log line
const byte DATA_TYPE_ACT_SAY = 206; // Data type, speak with TTS
const byte DATA_TYPE_ACT_END = 207; // Data type, flag to end encounter
const byte DATA_TYPE_ACT_ERR = 208; // Data type, flag that an error has occured
const byte DATA_TYPE_ACT_UPDATE = 208; // Data type, flag that an update is ready

const long TTS_TIMEOUT = 500; // Time in miliseconds to timeout TTS

Expand Down Expand Up @@ -406,6 +406,11 @@ void udpListen()
}
break;
}
case DATA_TYPE_ACT_UPDATE:
{
DialogResult result = MessageBox.Show("An updated version of the FFTools plugin is ready. Please restart ACT for the changes to take effect.", "New Version", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
break;
}
}

} catch (SocketException) {
Expand Down
4 changes: 3 additions & 1 deletion config/_app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@

# enable proxy to allow sharing of web views with other people
# this will make all your web views available at https://proxy.fftools.net/[your id]/[script name]/
enable_proxy: true
enable_proxy: false

# port to run web server on for web views, most users should not need to change this
web_port: 31594

# port to transmit data on from ACT to the fftools daemon, most users should not need to change this
port_data: 31593

enable_key_press: false
1 change: 1 addition & 0 deletions scripts/uwu_jails/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ local function on_log(l)
if #jail_list == 3 and not has_called then
table.sort(jail_list, jail_sort)
for n, v in ipairs(jail_list) do
fft_log_info("Jail #" .. n .. " is " .. v .. ".")
fft_say_if(n, {name=v})
fft_event_dispatch("am:mark", v)
end
Expand Down
4 changes: 0 additions & 4 deletions src/daemon/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,3 @@ func logLuaWarn(L *lua.LState, msg string, args ...interface{}) {
func logLuaDebug(L *lua.LState, msg string, data interface{}) {
//logLua(L, "[DEBUG] "+msg+" %s", data)
}

/*func logFile(msg string) error {
}*/
3 changes: 3 additions & 0 deletions src/daemon/lua_func_act_say.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ func luaFuncActSayIf(L *lua.LState) int {
(id != 0 && localPlayerID != id) {
return 0
}
if name == "" && role == "" && job == "" && id == 0 {
return 0
}
return luaFuncActSay(L)
}

Expand Down
2 changes: 1 addition & 1 deletion src/daemon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"gopkg.in/natefinch/lumberjack.v2"
)

const version = "0.03"
const version = "0.02"

func main() {
// set log output
Expand Down
17 changes: 11 additions & 6 deletions src/daemon/tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,19 @@ func testerParse(data io.Reader) []LogLine {
func testerReplay(logLines []LogLine) {
logInfo("Replay %d log lines.", len(logLines))
// generate encounter
newEnc := Encounter{
ID: logLines[0].EncounterID,
StartTime: time.Now(),
Active: true,
Zone: "Test Area",
}
eventListenerDispatch(
"act:encounter",
Encounter{
ID: logLines[0].EncounterID,
StartTime: time.Now(),
Active: true,
Zone: "Test Area",
},
newEnc,
)
eventListenerDispatch(
"act:encounter:change",
newEnc,
)
// read combatants
combatants := make([]Combatant, 0)
Expand Down

0 comments on commit aca3af0

Please sign in to comment.