Skip to content

Commit 031b67f

Browse files
committed
Updated formatting on all files
1 parent 2c07e71 commit 031b67f

File tree

123 files changed

+4611
-4278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+4611
-4278
lines changed

src/aliases/aliases.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
2-
{
3-
"name": "gomud_mapper",
4-
"isActive": "yes",
5-
"script": "",
6-
"isFolder": "yes"
7-
}
8-
]
2+
{
3+
"name": "gomud_mapper",
4+
"isActive": "yes",
5+
"script": "",
6+
"isFolder": "yes"
7+
}
8+
]
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
[
2-
{
3-
"name": "display",
4-
"isActive": "yes",
5-
"script": "",
6-
"isFolder": "yes"
7-
},
8-
{
9-
"name": "mapping",
10-
"isActive": "yes",
11-
"script": "",
12-
"isFolder": "yes"
13-
},
14-
{
15-
"name": "navigation",
16-
"isActive": "yes",
17-
"script": "",
18-
"isFolder": "yes"
19-
},
20-
{
21-
"name": "utility",
22-
"isActive": "yes",
23-
"script": "",
24-
"isFolder": "yes"
25-
}
26-
]
2+
{
3+
"name": "display",
4+
"isActive": "yes",
5+
"script": "",
6+
"isFolder": "yes"
7+
},
8+
{
9+
"name": "mapping",
10+
"isActive": "yes",
11+
"script": "",
12+
"isFolder": "yes"
13+
},
14+
{
15+
"name": "navigation",
16+
"isActive": "yes",
17+
"script": "",
18+
"isFolder": "yes"
19+
},
20+
{
21+
"name": "utility",
22+
"isActive": "yes",
23+
"script": "",
24+
"isFolder": "yes"
25+
}
26+
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
mmp.roomLabel(matches[2])
1+
mmp.roomLabel(matches[2])

src/aliases/gomud_mapper/display/add_room_mark.lua

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,33 @@ local tmp = getRoomUserData(1, "gotoMapping")
22
local maptable = {}
33

44
if tmp ~= "" then
5-
maptable = yajl.to_value(tmp)
5+
maptable = yajl.to_value(tmp)
66
end
77

88
local location, markname
99
if not matches[3] then
10-
markname = matches[2]
11-
location = mmp.currentroom
10+
markname = matches[2]
11+
location = mmp.currentroom
1212
elseif tonumber(matches[2]) then
13-
location = matches[2]; markname = matches[3]
13+
location = matches[2]
14+
markname = matches[3]
1415
else
15-
location = matches[3]; markname = matches[2]
16+
location = matches[3]
17+
markname = matches[2]
1618
end
1719

1820
-- can't allow mark name to ne a number - yajl then generates a giant table of null's
1921
if tonumber(markname) then
20-
mmp.echo("The mark name can't be a number.") return
22+
mmp.echo("The mark name can't be a number.")
23+
return
2124
end
2225

2326
maptable[markname] = location
2427
local tmp2 = yajl.to_string(maptable)
2528

2629
if not mmp.roomexists(1) then
27-
addRoom(1)
30+
addRoom(1)
2831
end
2932

3033
setRoomUserData(1, "gotoMapping", tmp2)
31-
mmp.echo(string.format("Room mark for '%s' set to room %s.", markname, location))
34+
mmp.echo(string.format("Room mark for '%s' set to room %s.", markname, location))
Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,72 @@
11
[
2-
{
3-
"name": "add_a_room_label",
4-
"isActive": "yes",
5-
"regex": "^room label (.+)$",
6-
"script": "",
7-
"isFolder": "no"
8-
},
9-
{
10-
"name": "View/delete area labels",
11-
"isActive": "yes",
12-
"regex": "^area labels ?(.+)?$",
13-
"script": "mmp.areaLabels(matches[2])",
14-
"isFolder": "no"
15-
},
16-
{
17-
"name": "add_room_mark",
18-
"isActive": "yes",
19-
"regex": "^room mark (\\w+)(?: (\\w+))?$",
20-
"script": "",
21-
"isFolder": "no"
22-
},
23-
{
24-
"name": "remove_room_mark",
25-
"isActive": "yes",
26-
"regex": "^room unmark (\\w+)$",
27-
"script": "",
28-
"isFolder": "no"
29-
},
30-
{
31-
"name": "display_room_marks",
32-
"isActive": "yes",
33-
"regex": "^room marks$",
34-
"script": "",
35-
"isFolder": "no"
36-
},
37-
{
38-
"name": "room_look",
39-
"isActive": "yes",
40-
"regex": "^(?:rl|room look)(?: (.+))?$",
41-
"script": "",
42-
"isFolder": "no"
43-
},
44-
{
45-
"name": "show_char_marks",
46-
"isActive": "yes",
47-
"regex": "^show char marks$",
48-
"script": "",
49-
"isFolder": "no"
50-
},
51-
{
52-
"name": "show_ferry_rooms",
53-
"isActive": "yes",
54-
"regex": "^fr show$",
55-
"script": "",
56-
"isFolder": "no"
57-
},
58-
{
59-
"name": "toggle_map_sizes",
60-
"isActive": "yes",
61-
"regex": "^(small|big|biggest)map(?: (\\d+))?$",
62-
"script": "",
63-
"isFolder": "no"
64-
},
65-
{
66-
"name": "view_roomid_or_area",
67-
"isActive": "yes",
68-
"regex": "^mmap ?(.+)?$",
69-
"script": "",
70-
"isFolder": "no"
71-
}
72-
]
2+
{
3+
"name": "add_a_room_label",
4+
"isActive": "yes",
5+
"regex": "^room label (.+)$",
6+
"script": "",
7+
"isFolder": "no"
8+
},
9+
{
10+
"name": "View/delete area labels",
11+
"isActive": "yes",
12+
"regex": "^area labels ?(.+)?$",
13+
"script": "mmp.areaLabels(matches[2])",
14+
"isFolder": "no"
15+
},
16+
{
17+
"name": "add_room_mark",
18+
"isActive": "yes",
19+
"regex": "^room mark (\\w+)(?: (\\w+))?$",
20+
"script": "",
21+
"isFolder": "no"
22+
},
23+
{
24+
"name": "remove_room_mark",
25+
"isActive": "yes",
26+
"regex": "^room unmark (\\w+)$",
27+
"script": "",
28+
"isFolder": "no"
29+
},
30+
{
31+
"name": "display_room_marks",
32+
"isActive": "yes",
33+
"regex": "^room marks$",
34+
"script": "",
35+
"isFolder": "no"
36+
},
37+
{
38+
"name": "room_look",
39+
"isActive": "yes",
40+
"regex": "^(?:rl|room look)(?: (.+))?$",
41+
"script": "",
42+
"isFolder": "no"
43+
},
44+
{
45+
"name": "show_char_marks",
46+
"isActive": "yes",
47+
"regex": "^show char marks$",
48+
"script": "",
49+
"isFolder": "no"
50+
},
51+
{
52+
"name": "show_ferry_rooms",
53+
"isActive": "yes",
54+
"regex": "^fr show$",
55+
"script": "",
56+
"isFolder": "no"
57+
},
58+
{
59+
"name": "toggle_map_sizes",
60+
"isActive": "yes",
61+
"regex": "^(small|big|biggest)map(?: (\\d+))?$",
62+
"script": "",
63+
"isFolder": "no"
64+
},
65+
{
66+
"name": "view_roomid_or_area",
67+
"isActive": "yes",
68+
"regex": "^mmap ?(.+)?$",
69+
"script": "",
70+
"isFolder": "no"
71+
}
72+
]
Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
local tmp= getRoomUserData(1, "gotoMapping")
2-
if tmp~="" then
1+
local tmp = getRoomUserData(1, "gotoMapping")
2+
if tmp ~= "" then
33
local maptable = yajl.to_value(tmp) or {}
4-
local sortedkeys = {}
5-
for k in pairs(maptable) do sortedkeys[#sortedkeys+1] = k end
6-
table.sort(sortedkeys)
4+
local sortedkeys = {}
5+
for k in pairs(maptable) do
6+
sortedkeys[#sortedkeys + 1] = k
7+
end
8+
table.sort(sortedkeys)
79

8-
mmp.echo("Known marks in this map:")
9-
if next(maptable) then
10-
for i = 1, #sortedkeys do echo(string.format(" %-21s %s\n", tostring(sortedkeys[i]), tostring(maptable[sortedkeys[i]]))) end
11-
else
12-
echo(" (none)\n")
13-
end
10+
mmp.echo("Known marks in this map:")
11+
if next(maptable) then
12+
for i = 1, #sortedkeys do
13+
echo(string.format(" %-21s %s\n", tostring(sortedkeys[i]), tostring(maptable[sortedkeys[i]])))
14+
end
15+
else
16+
echo(" (none)\n")
17+
end
1418
else
1519
mmp.echo("No marks are recorded in this map.")
16-
end
20+
end
Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
local tmp= getRoomUserData(1, "gotoMapping")
2-
if tmp~="" then
3-
local maptable=yajl.to_value(tmp)
4-
if not maptable[matches[2]] then mmp.echo("Don't have such a mark in the db.") return end
1+
local tmp = getRoomUserData(1, "gotoMapping")
2+
if tmp ~= "" then
3+
local maptable = yajl.to_value(tmp)
4+
if not maptable[matches[2]] then
5+
mmp.echo("Don't have such a mark in the db.")
6+
return
7+
end
58

6-
maptable[matches[2]]=nil
7-
local tmp2=yajl.to_string(maptable)
8-
setRoomUserData(1, "gotoMapping", tmp2)
9-
mmp.echo("Removed the "..matches[2].." mark.")
9+
maptable[matches[2]] = nil
10+
local tmp2 = yajl.to_string(maptable)
11+
setRoomUserData(1, "gotoMapping", tmp2)
12+
mmp.echo("Removed the " .. matches[2] .. " mark.")
1013
else
11-
mmp.echo("We don't have any marks stored anyway.")
12-
end
14+
mmp.echo("We don't have any marks stored anyway.")
15+
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
mmp.roomlook(matches[2])
1+
mmp.roomlook(matches[2])

src/aliases/gomud_mapper/display/show_char_marks.lua

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,35 @@ local areas = getAreaTable()
44
local show_area = table.size(areas) > 1 and true or false
55

66
for area, id in pairs(areas) do
7-
for _, roomid in pairs(getAreaRooms(id)) do
8-
local c = getRoomChar(roomid)
9-
if c ~= '' and c ~= ' ' then
10-
m[c] = m[c] or {}
11-
m[c][#m[c]+1] = roomid
12-
end
13-
end
7+
for _, roomid in pairs(getAreaRooms(id)) do
8+
local c = getRoomChar(roomid)
9+
if c ~= "" and c ~= " " then
10+
m[c] = m[c] or {}
11+
m[c][#m[c] + 1] = roomid
12+
end
13+
end
1414
end
1515

16-
if not next(m) then mmp.echo("This map has no char marks on it. Do mc on and rcc <mark> in a room to add them!") return end
16+
if not next(m) then
17+
mmp.echo("This map has no char marks on it. Do mc on and rcc <mark> in a room to add them!")
18+
return
19+
end
1720

1821
for letter, rooms in pairs(m) do
19-
table.sort(rooms)
20-
mmp.echo("Rooms with the <"..mmp.settings.echocolour..">"..letter.."<reset> character on them:")
21-
for i = 1, #rooms do
22-
if not show_area then
23-
cecho(string.format(" <sea_green>%-5s<reset> %s\n", rooms[i], getRoomName(rooms[i])))
24-
else
25-
cecho(string.format(" <sea_green>%-5s<reset> %-35s <dim_grey>(in<reset> %s<dim_grey>)\n", rooms[i], getRoomName(rooms[i]), mmp.areatabler[getRoomArea(rooms[i])]))
26-
end
27-
end
28-
end
22+
table.sort(rooms)
23+
mmp.echo("Rooms with the <" .. mmp.settings.echocolour .. ">" .. letter .. "<reset> character on them:")
24+
for i = 1, #rooms do
25+
if not show_area then
26+
cecho(string.format(" <sea_green>%-5s<reset> %s\n", rooms[i], getRoomName(rooms[i])))
27+
else
28+
cecho(
29+
string.format(
30+
" <sea_green>%-5s<reset> %-35s <dim_grey>(in<reset> %s<dim_grey>)\n",
31+
rooms[i],
32+
getRoomName(rooms[i]),
33+
mmp.areatabler[getRoomArea(rooms[i])]
34+
)
35+
)
36+
end
37+
end
38+
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
-- Ferry rooms are not used in GoMud
2-
mmp.echo("Ferry rooms are not used in GoMud.")
2+
mmp.echo("Ferry rooms are not used in GoMud.")

0 commit comments

Comments
 (0)