-
Notifications
You must be signed in to change notification settings - Fork 221
Fixing Ferries in Mhaura #411
Changes from 28 commits
c7a7895
0019348
3be45bb
585d2ae
04bfdac
420b712
176b48a
6383e19
dc7aeac
4c2364f
87ff007
33f80cd
af56ca2
63a666c
436807c
d4ba7d1
3db4d22
3cf80f8
ecbeb84
b1a0c20
9587080
b55281e
d99c2d5
0ef21b6
31114b4
0f99f63
e7e95e9
898fe2c
91d0a71
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,33 @@ tpz.transport.messageTime = | |
SILVER_SEA = 480 | ||
} | ||
|
||
tpz.transport.dockPorterMhauraTrigger = | ||
{ | ||
FERRY_ARRIVING_FROM_ALZAHBI = 0, | ||
FERRY_DEPARTING_TO_ALZAHBI = 1, | ||
FERRY_ARRIVING_FROM_SELBINA = 2, | ||
FERRY_DEPARTING_TO_SELBINA = 3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Picky ibm: Could you make sure the |
||
} | ||
|
||
tpz.transport.dockPorterMhauraOffset = | ||
{ | ||
FERRY_ARRIVING_FROM_ALZAHBI = 159, | ||
FERRY_DEPARTING_TO_ALZAHBI = 239, | ||
FERRY_ARRIVING_FROM_SELBINA = 399, | ||
FERRY_DEPARTING_TO_SELBINA = 479 | ||
} | ||
|
||
tpz.transport.dockPorterMhauraInterval = | ||
{ | ||
FROM_TO_ALZAHBI = 480, | ||
FROM_TO_SELBINA = 480 | ||
} | ||
|
||
tpz.transport.dockPorterMhauraPos = | ||
{ | ||
ARRIVING = {7.06, -1.36, 2.49}, | ||
DEPARTING = {8.26, -1.36, 2.20} | ||
} | ||
------------------------------------------------- | ||
-- public functions | ||
------------------------------------------------- | ||
|
@@ -33,4 +60,15 @@ tpz.transport.captainMessage = function(npc, triggerID, messages) | |
for _, player in pairs(playersInZone) do | ||
player:showText(player, messages[triggerID]) | ||
end | ||
end | ||
|
||
tpz.transport.dockPorterMhauraMessages = function(npc, triggerID, messages) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not going to force you to globalize this juuusstt yet, but you can save yourself a little effort later by: tpz.transport.messages = {}
tpz.transport.messages.mhaura = function(npc, triggerID, messages) (Later we can extend this to instead be just one function which takes a |
||
npc:showText(npc, messages[triggerID]) | ||
if triggerID == tpz.transport.dockPorterMhauraTrigger.FERRY_ARRIVING_FROM_ALZAHBI or | ||
triggerID == tpz.transport.dockPorterMhauraTrigger.FERRY_ARRIVING_FROM_SELBINA then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's a trick you could do to save some lines and space, since your "arriving" and "departing" are all even/odd: if (triggerID % 2) == 0 then
npc:pathThrough(-- arriving)
else
npc:pathThrough(-- departing)
end |
||
npc:pathThrough(tpz.transport.dockPorterMhauraPos.ARRIVING, PATHFLAG_WALLHACK) | ||
elseif triggerID == tpz.transport.dockPorterMhauraTrigger.FERRY_DEPARTING_TO_ALZAHBI or | ||
triggerID == tpz.transport.dockPorterMhauraTrigger.FERRY_DEPARTING_TO_SELBINA then | ||
npc:pathThrough(tpz.transport.dockPorterMhauraPos.DEPARTING, PATHFLAG_WALLHACK) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably shorten these; they're already in the
tpz.transport
namespace, soPorter
is already implied. 😉