-
Notifications
You must be signed in to change notification settings - Fork 221
Fixing Ferries in Mhaura #411
Fixing Ferries in Mhaura #411
Conversation
Client Version Update (30200217_0)
fix some npcids in commented rows
Fix inaccurate trade behavior
Add set constructor
no longer need mobmod with no xp pull for bcnms
…ts) for later retrieval
when storing dancers attire (M vs F), give correct key item for later retrieval
Sidestream biweekly (2020/02/15 to 2020/02/29)
Force linkage of pthread on linux platforms
* Offset was wrong and time at dock was also wrong. This was fixed. * Issue with docking position for Ferries is still wrong, but pos in table is now retail accurate. * NPC at dock in Mhaura now moves when ferry arrives and departs, also tells you about it, not 100% retail accurate as it needs to rotate when it reaches final location. Leaving it as a TODO for someone else to complete it.
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.
Thanks, kain~!
Mainly just some variable shortening and prettification:
scripts/globals/transport.lua
Outdated
@@ -24,6 +24,33 @@ tpz.transport.messageTime = | |||
SILVER_SEA = 480 | |||
} | |||
|
|||
tpz.transport.dockPorterMhauraTrigger = |
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, so Porter
is already implied. 😉
tpz.transport.trigger.mhaura
tpz.transport.offset.mhaura
tpz.transport.interval.mhaura
tpz.transport.pos.mhaura
scripts/globals/transport.lua
Outdated
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Picky ibm: Could you make sure the =
line up all pretty like~?
scripts/globals/transport.lua
Outdated
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 comment
The 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
scripts/globals/transport.lua
Outdated
|
||
tpz.transport.dockPorterMhauraMessages = function(npc, triggerID, messages) |
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.
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 dock
, and then pulls the appropriate tables based on the dock, but I realize right now that the focus is to fix the ferry)
end | ||
|
||
function onTimeTrigger(npc, triggerID) | ||
tpz.transport.dockPorterMhauraMessages(npc, triggerID, messages) |
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.
And then your function call down here becomes: tpz.transport.messages.mhaura(npc, triggerID, messages)
|
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.
Pushed review changes~!
(And she seems to be working!)
not 100% retail accurate as it needs to rotate when it reaches final location. Leaving it as a TODO
for someone else to complete it.
I affirm: