Skip to content

Commit

Permalink
Area lists use CompositeChat to provide goto command.
Browse files Browse the repository at this point in the history
Ref.: #39.
  • Loading branch information
madmaxoft committed Apr 13, 2014
1 parent 243e467 commit 28809a3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions CmdHandlers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ function ListPlayerAreasInWorld(a_Player)

-- Send list:
for idx, area in ipairs(Areas) do
a_Player:SendMessage(" " .. DescribeArea(area));
a_Player:SendMessage(cCompositeChat(" " .. DescribeArea(area) .. " (", mtInfo)
:AddRunCommandPart("goto", "/gal goto " .. area.Name, "@bu")
:AddTextPart(")")
)
end
end

Expand Down Expand Up @@ -77,7 +80,10 @@ function ListPlayerAreasInGallery(a_Player, a_GalleryName)

-- Send list:
for idx, area in ipairs(Areas) do
a_Player:SendMessage(" " .. DescribeArea(area));
a_Player:SendMessage(cCompositeChat(" " .. DescribeArea(area) .. " (", mtInfo)
:AddRunCommandPart("goto", "/gal goto " .. area.Name, "@bu")
:AddTextPart(")")
)
end
end

Expand Down Expand Up @@ -118,7 +124,10 @@ local function ListOtherPlayerAreas(a_Player, a_OwnerName, a_GalleryName)

-- Send list:
for idx, area in ipairs(Areas) do
a_Player:SendMessage(" " .. DescribeArea(area));
a_Player:SendMessage(cCompositeChat(" " .. DescribeArea(area) .. " (", mtInfo)
:AddRunCommandPart("goto", "/gal goto @" .. a_OwnerName .. " " .. area.Name, "@bu")
:AddTextPart(")")
)
end
end

Expand Down

0 comments on commit 28809a3

Please sign in to comment.