mirror of
https://github.com/cave-story-randomizer/cave-story-randomizer
synced 2025-12-03 01:48:19 +00:00
commits the numahachi hint change properly lol
This commit is contained in:
parent
063f2ce0a9
commit
6ffe9b3a84
|
|
@ -495,7 +495,8 @@ function C:unplacedString()
|
||||||
return s
|
return s
|
||||||
end
|
end
|
||||||
|
|
||||||
local function _hint(message, l)
|
local function _hint(message, l, ending)
|
||||||
|
ending = ending or "<END"
|
||||||
local MSGBOXLIMIT = 35
|
local MSGBOXLIMIT = 35
|
||||||
local PATTERN = " [^ ]*$"
|
local PATTERN = " [^ ]*$"
|
||||||
local line1, line2, line3 = "", "", ""
|
local line1, line2, line3 = "", "", ""
|
||||||
|
|
@ -517,7 +518,7 @@ local function _hint(message, l)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local s = "<PRI<MSG<TUR" .. line1 .. line2 .. line3 .. "<NOD<END"
|
local s = "<PRI<MSG<TUR" .. line1 .. line2 .. line3 .. "<NOD" .. ending
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name = ("%q [%s] [%s]"):format(message, l.item.name, l.name),
|
name = ("%q [%s] [%s]"):format(message, l.item.name, l.name),
|
||||||
|
|
@ -527,7 +528,7 @@ local function _hint(message, l)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
function C:createHint(l)
|
function C:createHint(l, ending)
|
||||||
local function pick(t) return t[love.math.random(#t)] end
|
local function pick(t) return t[love.math.random(#t)] end
|
||||||
|
|
||||||
local location, item = l:getHint()
|
local location, item = l:getHint()
|
||||||
|
|
@ -535,11 +536,11 @@ function C:createHint(l)
|
||||||
local mids = {" can be found ", " is ", " is hidden "}
|
local mids = {" can be found ", " is ", " is hidden "}
|
||||||
local message = (pick(starts) or "") .. (pick(item) or "") .. (pick(mids) or "") .. (pick(location) or "") .. "."
|
local message = (pick(starts) or "") .. (pick(item) or "") .. (pick(mids) or "") .. (pick(location) or "") .. "."
|
||||||
|
|
||||||
return _hint(message, l)
|
return _hint(message, l, ending)
|
||||||
end
|
end
|
||||||
|
|
||||||
function C:prebuiltHint(l)
|
function C:prebuiltHint(l, ending)
|
||||||
return _hint(l:getPrebuiltHint(), l)
|
return _hint(l:getPrebuiltHint(), l, ending)
|
||||||
end
|
end
|
||||||
|
|
||||||
return C
|
return C
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue