Allow chatting without logging to console

This commit is contained in:
Kyle Coburn 2015-04-24 21:04:44 -07:00
parent 7521250a5c
commit ba3f8b780e
4 changed files with 14 additions and 12 deletions

View File

@ -336,7 +336,7 @@ function Control.encounter(battleState)
local zubatCount = Data.increment("encounters_zubat")
Data.run.encounters_zubat = zubatCount
if STREAMING_MODE then
Bridge.chat(Utils.multiplyString("NightBat", zubatCount))
Bridge.chat(Utils.multiplyString("NightBat", zubatCount), true)
end
elseif opponent == "rattata" then
Data.run.encounters_rattata = Data.increment("encounters_rattata")

View File

@ -421,7 +421,7 @@ strategyFunctions.catchNidoran = function()
Bridge.caught("nidoran")
status.canProgress = true
if not gotExperience then
Bridge.chat("is waiting in the grass for a suitable encounter for experience.", Pokemon.getExp())
Bridge.chat("is waiting in the grass for a suitable encounter for experience.")
end
end
if gotExperience then
@ -1040,7 +1040,7 @@ strategyFunctions.potionBeforeMisty = function(data)
message = "is limiting heals to attempt to get closer to red-bar off Misty..."
end
if message then
Bridge.chat(message, potionCount)
Bridge.chat(message, false, potionCount)
end
end
return strategyFunctions.potion({hp=healAmount, chain=data.chain})
@ -1241,7 +1241,7 @@ strategyFunctions.potionBeforeSurge = function()
if Control.yolo then
local curr_hp = Combat.hp()
if curr_hp > yoloHp and curr_hp <= 21 then
Bridge.chat("is attempting to keep red-bar through Surge", curr_hp)
Bridge.chat("is attempting to keep red-bar through Surge")
return true
end
end
@ -1449,7 +1449,7 @@ strategyFunctions.silphRival = function()
if Strategies.initialize() then
if Control.yolo then
status.gyaradosDamage = Combat.healthFor("RivalGyarados")
Bridge.chat("is attempting to red-bar off Silph Rival. Get ready to spaghetti!", status.gyaradosDamage.." "..Combat.redHP())
Bridge.chat("is attempting to red-bar off Silph Rival. Get ready to spaghetti!")
end
end

View File

@ -51,7 +51,7 @@ function Strategies.hardReset(reason, message, extra, wait)
local map, px, py = Memory.value("game", "map"), Player.position()
Data.reset(reason, Control.areaName, map, px, py)
Bridge.chat(message, extra)
Bridge.chat(message, false, extra)
if wait and INTERNAL and not STREAMING_MODE then
strategyFunctions.wait()
else
@ -462,7 +462,7 @@ function Strategies.completeCans()
prefix = "Reset me now"
suffix = " BibleThump"
end
Bridge.chat(" "..prefix..", "..status.tries.." try Trashcans"..suffix, Utils.elapsedTime())
Bridge.chat(" "..prefix..", "..status.tries.." try Trashcans"..suffix)
return true
end
local completePath = {

View File

@ -65,11 +65,13 @@ function Bridge.pollForName()
send("poll_name")
end
function Bridge.chat(message, extra, newLine)
if extra then
p(message.." || "..extra, newLine)
else
p(message, newLine)
function Bridge.chat(message, suppressed, extra, newLine)
if not suppressed then
if extra then
p(message.." || "..extra, newLine)
else
p(message, newLine)
end
end
return send("msg", message)
end