Skip to content

Commit

Permalink
Just tweak to be able to use trace logging at all parts of blizzard.eai
Browse files Browse the repository at this point in the history
  • Loading branch information
SMUnlimited committed Nov 6, 2024
1 parent 070cc3e commit 43e6d5f
Showing 1 changed file with 27 additions and 24 deletions.
51 changes: 27 additions & 24 deletions Blizzard.eai
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,30 @@ endfunction
//*
//***************************************************************************

function DisplayToTP takes string msg returns nothing
call DisplayTimedTextToPlayer(GetTriggerPlayer(), 0, 0, 5, msg )
endfunction

function TraceToTP takes string msg returns nothing
if debugging then
call DisplayToTP(msg)
endif
endfunction

function DisplayToPlayer takes player p, string msg returns nothing
call DisplayTimedTextToPlayer(p, 0, 0, 5, msg )
endfunction

function DisplayToAll takes string msg returns nothing
call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 7, msg )
endfunction

function TraceToAll takes string msg returns nothing
if debugging then
call DisplayToAll(msg)
endif
endfunction

//===========================================================================
// The Parser (Takes a String, Seperates words, puts in string array)
//===========================================================================
Expand All @@ -197,6 +221,8 @@ function Parser takes string ChatMsg returns nothing
local integer A = 1
local integer I = 0
local integer Length = StringLength(ChatMsg)

call TraceToAll("Parser run:" + ChatMsg)

//Pulls Words and places them each in their own Variable
loop
Expand Down Expand Up @@ -292,30 +318,6 @@ function c2s takes player p returns string
return cs2s(GetPlayerName(p), GetPlayerColor(p)) + ": "
endfunction

function DisplayToTP takes string msg returns nothing
call DisplayTimedTextToPlayer(GetTriggerPlayer(), 0, 0, 5, msg )
endfunction

function TraceToTP takes string msg returns nothing
if debugging then
call DisplayToTP(msg)
endif
endfunction

function DisplayToPlayer takes player p, string msg returns nothing
call DisplayTimedTextToPlayer(p, 0, 0, 5, msg )
endfunction

function DisplayToAll takes string msg returns nothing
call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 7, msg )
endfunction

function TraceToAll takes string msg returns nothing
if debugging then
call DisplayToAll(msg)
endif
endfunction

function DisplayFromPlayer takes player p, string msg returns nothing
call DisplayToTP(c2s(p) + msg)
endfunction
Expand Down Expand Up @@ -565,6 +567,7 @@ endfunction
function ZoomSet takes nothing returns nothing
local real Zoom = 0
local integer i = GetPlayerId(GetTriggerPlayer())
call TraceToAll("ZOOM SET Triggered")
if SubStringBJ(GetEventPlayerChatString(), 6, 6) != "k" then
if SubStringBJ(GetEventPlayerChatString(), 6, 6) != " " then
set Zoom = S2R(SubStringBJ(GetEventPlayerChatString(), 6, 10))
Expand Down

0 comments on commit 43e6d5f

Please sign in to comment.