1 QuestHelper_File
["collect_warp.lua"] = "Development Version"
2 QuestHelper_Loadtime
["collect_warp.lua"] = GetTime()
4 local debug_output
= false
5 if QuestHelper_File
["collect_warp.lua"] == "Development Version" then debug_output
= true end
16 local function OnUpdate()
17 local bolus
, tab
= GetLoc(), {RawLocation()}
18 if lastloc_table
and lastloc_table
[2] and tab
[2] and lastloc_table
[3] and tab
[3] and not lastloc_table
[1] and not tab
[1] then
20 if lastloc_table
[2] ~= tab
[2] or lastloc_table
[3] ~= tab
[3] then
23 local dx
, dy
= lastloc_table
[4] - tab
[4], lastloc_table
[5] - tab
[5]
24 dx
, dy
= dx
* dx
, dy
* dy
25 if dx
+ dy
> 25 * 25 then -- Blink is 20, so we need to do more than that.
31 Merger
.Add(QHCW
, lastloc_bolus
.. bolus
)
32 if debug_output
then QuestHelper
:TextOut("Warpy!") end
40 function QH_Collect_Warp_Init(QHCData
, API
)
41 if not QHCData
.warp
then QHCData
.warp
= {} end
44 API
.Registrar_OnUpdateHook(OnUpdate
)
46 GetLoc
= API
.Callback_LocationBolusCurrent
47 QuestHelper
: Assert(GetLoc
)
49 RawLocation
= API
.Callback_Location_Raw
50 QuestHelper
: Assert(RawLocation
)
52 Merger
= API
.Utility_Merger
53 QuestHelper
: Assert(Merger
)