Skip to content

Commit

Permalink
Added Recognition to Local Interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
bleonheart committed Aug 30, 2024
1 parent c543077 commit a5b71c9
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions lilia/modules/characters/recognition/pim/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,40 @@ PIM:AddOption("Recognize With Fake Name", {
local tarChar = target:getChar()
if CLIENT then Derma_StringRequest(L"recogMenuOptionFakeWhisper", L"recogFakeNamePrompt", tarChar:getName(), function(text) if text then netstream.Start("rgnDirect", target, text) end end) end
end
})

MODULE:AddLocalOption("Allow Recognition by Recognize in Whisper Range", {
shouldShow = function(client) return client:getChar() and client:Alive() end,
onRun = function(client) MODULE:CharRecognize(2) end,
runServer = false
})

MODULE:AddLocalOption("Allow Recognition by Recognize in Talk Range", {
shouldShow = function(client) return client:getChar() and client:Alive() end,
onRun = function(client) MODULE:CharRecognize(3) end,
runServer = false
})

MODULE:AddLocalOption("Allow Recognition by Recognize in Yell Range", {
shouldShow = function(client) return client:getChar() and client:Alive() end,
onRun = function(client) MODULE:CharRecognize(4) end,
runServer = false
})

MODULE:AddLocalOption("Allow Recognition by Fake Name in Whisper Range", {
shouldShow = function(client) return client:getChar() and client:Alive() end,
onRun = function(client) if CLIENT then Derma_StringRequest(recogMenuOptionFakeWhisper, recogFakeNamePrompt, default or "", function(text) if text then MODULE:CharRecognize(2, text) end end) end end,
runServer = false
})

MODULE:AddLocalOption("Allow Recognition by Fake Name in Talk Range", {
shouldShow = function(client) return client:getChar() and client:Alive() end,
onRun = function(client) if CLIENT then Derma_StringRequest(recogMenuOptionFakeTalk, recogFakeNamePrompt, default or "", function(text) if text then MODULE:CharRecognize(3, text) end end) end end,
runServer = false
})

MODULE:AddLocalOption("Allow Recognition by Fake Name in Yell Range", {
shouldShow = function(client) return client:getChar() and client:Alive() end,
onRun = function(client) if CLIENT then Derma_StringRequest(recogMenuOptionFakeYell, recogFakeNamePrompt, default or "", function(text) if text then MODULE:CharRecognize(4, text) end end) end end,
runServer = false
})

0 comments on commit a5b71c9

Please sign in to comment.