Skip to content

Commit ce5de7c

Browse files
committed
Removing more options.
IRE-specific features removed: 1. ✓ Wormholes - mmp.wormholesfix() emptied 2. ✓ Ferries - mmp.ferriesfix() emptied, ferry_rooms removed 3. ✓ Movement modes - dash, sprint, gallop, runaway removed 4. ✓ Wings & travel devices - All IRE wings and special items removed 5. ✓ Shackle - All shackle references removed 6. ✓ Waterwalk - Setting removed 7. ✓ Sewers & Pebble - Locking functions removed 8. ✓ Enter grate - Function emptied 9. ✓ Orbs - Orb references removed 10. ✓ Indoor/Outdoor - wentOutside() emptied (GoMud has no outside definition) 11. ✓ Continents - All continent functions return empty/error (GoMud has no continents)
1 parent cfe2d6d commit ce5de7c

15 files changed

+53
-421
lines changed

src/aliases/GoMud-Mapper/GoMud Mapper/Load_a_map.lua

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@ local function s(loc)
1414
if not allok then
1515
mmp.echo("Couldn't load the map :(")
1616
else
17-
mmp.lockWormholes();
18-
mmp.lockSewers();
19-
mmp.lockPebble();
20-
if mmp.settings.waterwalk then
21-
mmp.enableWaterWalk()
22-
else
23-
mmp.disableWaterWalk()
17+
-- Apply any GoMud-specific map settings here
18+
if mmp.settings.lockspecials then
19+
mmp.lockSpecials()
2420
end
2521
if loc ~= "" then
2622
mmp.echo("Map loaded.")
Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,2 @@
1-
-- aca continent [optional area]
2-
3-
local continent = matches[2]:title()
4-
local area
5-
if not matches[3] then area = getRoomArea(mmp.currentroom)
6-
elseif tonumber(matches[3]) then
7-
area = tonumber(matches[3])
8-
if getRoomAreaName(area) == -1 then area = nil end
9-
else
10-
local areas = getAreaTable()
11-
12-
for karea, id in pairs(areas) do if karea:lower():find(matches[3]:lower(), 1, true) then area = id break end end
13-
end
14-
15-
if not area then mmp.echo(matches[3].." isn't a known area. Which one do you want to set?") return end
16-
17-
local res, error = mmp.addcontinent(area, continent)
18-
if res then
19-
mmp.echo("Recorded that "..getRoomAreaName(area).." is on the "..continent.." continent.")
20-
else
21-
mmp.echo(error)
22-
end
1+
-- Continents are not used in GoMud
2+
mmp.echo("Continents are not used in GoMud.")
Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
1-
if not mmp.wipingcontinents then
2-
mmp.wipingcontinents = true
3-
mmp.echo("Are you sure you want to wipe all continent data? If yes, do this again.")
4-
return
5-
end
6-
mmp.wipingcontinents = nil
7-
8-
local toserialize = yajl.to_string{}
9-
setRoomUserData(1, "areaContinents", toserialize)
10-
mmp.echo("Wiped all continents data.")
1+
-- Continents are not used in GoMud
2+
mmp.echo("Continents are not used in GoMud.")
Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,2 @@
1-
local continents = mmp.getcontinents()
2-
3-
if not next(continents) then mmp.echo("No continents known.")
4-
else
5-
for continent, areadata in pairs(continents) do
6-
mmp.echo(continent.." continent:")
7-
8-
for _, areaid in ipairs(areadata) do
9-
cecho(" "..getRoomAreaName(areaid).."\n")
10-
end
11-
end
12-
end
1+
-- Continents are not used in GoMud
2+
mmp.echo("Continents are not used in GoMud.")
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
mmp.echo("Ferry rooms available:")
2-
if not next(mmp.ferry_rooms) then mmp.echo("(none)") return end
3-
4-
for k, _ in pairs(mmp.ferry_rooms) do
5-
mmp.echo(string.format(" (%d) - %s\n", k, getRoomName(k)))
6-
end
1+
-- Ferry rooms are not used in GoMud
2+
mmp.echo("Ferry rooms are not used in GoMud.")
Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,3 @@
1-
local ferryCommands = {
2-
-- GoMud-specific ferry commands can be added here
3-
-- Example: ["ferry to"] = {"gomud"},
4-
}
5-
local c = 0
6-
local weight = 200
7-
for area in pairs(mmp.areatabler) do
8-
local rooms = getAreaRooms(area) or {}
9-
for i = 0, #rooms do
10-
local exits = getSpecialExits(rooms[i] or 0)
11-
if exits and next(exits) then
12-
for exit, cmd in pairs(exits) do
13-
if type(cmd) == "table" then
14-
cmd = next(cmd)
15-
end
16-
local lowerCommand = cmd:lower()
17-
local found = false
18-
for ferryCommand, games in pairs(ferryCommands) do
19-
if table.contains(games, mmp.game) and lowerCommand:find(ferryCommand, 1, true) then
20-
found = true
21-
break
22-
end
23-
end
24-
if found then
25-
setExitWeight(rooms[i], cmd, weight)
26-
mmp.echo(
27-
"Weighted " .. cmd .. " going to " .. rooms[i] .. " (" .. getRoomName(rooms[i]) .. ")."
28-
)
29-
c = c + 1
30-
end
31-
end
32-
end
33-
end
34-
end
35-
mmp.echo(
36-
string.format(
37-
"%s ferry exits weighted to %s (so we don't take them over too short distances).", c, weight
38-
)
39-
)
1+
-- Ferry weighting is not needed for GoMud
2+
-- This alias is kept for compatibility but does nothing
3+
mmp.echo("Ferry weighting is not used in GoMud.")
Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,2 @@
1-
-- acr continent [optional area]
2-
3-
local continent = matches[2]:title()
4-
local area
5-
if not matches[3] then area = getRoomArea(mmp.currentroom)
6-
elseif tonumber(matches[3]) then
7-
area = tonumber(matches[3])
8-
if getRoomAreaName(area) == -1 then area = nil end
9-
else
10-
local areas = getAreaTable()
11-
12-
for karea, id in pairs(areas) do if karea:lower():find(matches[3]:lower(), 1, true) then area = id break end end
13-
end
14-
15-
if not area then mmp.echo(matches[3].." isn't a known area. Which one do you want to set?") return end
16-
17-
local res, error = mmp.removecontinent(area, continent)
18-
if res then
19-
mmp.echo("Recorded that "..getRoomAreaName(area).." is not on the "..continent.." continent.")
20-
else
21-
mmp.echo(error)
22-
end
1+
-- Continents are not used in GoMud
2+
mmp.echo("Continents are not used in GoMud.")

src/scripts/GoMud Mapper/API.lua

Lines changed: 10 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -142,39 +142,19 @@ function mmp.roomexists(num)
142142
end
143143

144144
function mmp.getcontinents()
145-
local tmp = getRoomUserData(1, "areaContinents")
146-
if tmp == "" then return {} end
147-
148-
return yajl.to_value(tmp)
145+
-- Continents are not used in GoMud
146+
return {}
149147
end
150148

151149
-- patches welcome to finish this function.
152150
function mmp.removecontinent(area, continent)
153-
local continents = mmp.getcontinents()
154-
155-
if not next(continents) then return nil, "no continents are known" end
156-
if not continents[continent] then return nil, "no such continent is recorded" end
157-
158-
local index = mmp.indexof_valueonly(continents[continent], area)
159-
if not index then return nil, "this area is not on that continent" end
160-
table.remove(continents[continent], index)
161-
local tmp = yajl.to_string(continents)
162-
setRoomUserData(1, "areaContinents", tmp)
163-
return true
151+
-- Continents are not used in GoMud
152+
return nil, "continents are not used in GoMud"
164153
end
165154

166155
function mmp.addcontinent(areaid, continent)
167-
local continents = mmp.getcontinents()
168-
169-
if not next(continents) then return nil, "no continents are known" end
170-
if not continents[continent] then continents[continent] = {} end
171-
172-
local index = mmp.indexof_valueonly(continents[continent], areaid)
173-
if index then return nil, "this area is already on that continent" end
174-
continents[continent][#continents[continent] + 1] = areaid
175-
local tmp = yajl.to_string(continents)
176-
setRoomUserData(1, "areaContinents", tmp)
177-
return true
156+
-- Continents are not used in GoMud
157+
return nil, "continents are not used in GoMud"
178158
end
179159

180160
function mmp.indexof_valueonly(data, value)
@@ -187,20 +167,13 @@ end
187167

188168
-- checks if given area ID is on the given continent. Returns true only if certainly knows
189169
function mmp.oncontinent(areaid, continent)
190-
local continents = mmp.getcontinents()
191-
if not continents[continent] then return nil, "no such continent is recorded" end
192-
193-
return mmp.indexof_valueonly(continents[continent], areaid)
170+
-- Continents are not used in GoMud
171+
return false
194172
end
195173

196174
function mmp.getareacontinents(areaid)
197-
local areaContinents = {}
198-
for continentName, areas in pairs(mmp.getcontinents()) do
199-
if mmp.indexof_valueonly(areas, areaid) then
200-
areaContinents[#areaContinents + 1] = continentName
201-
end
202-
end
203-
return areaContinents
175+
-- Continents are not used in GoMud
176+
return {}
204177
end
205178

206179
-- accepts areaname or ID

src/scripts/GoMud Mapper/Aliases.lua

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,9 @@ function mmp.roomFind(query, lines)
7878
end
7979
cecho("<DarkSlateGrey>You know the following relevant rooms:\n")
8080

81-
local function showmeropis(roomid)
82-
if mmp.game ~= "achaea" then
83-
return ''
84-
end
85-
return mmp.oncontinent(getRoomArea(roomid), "Main") and '' or ' (Meropis)'
81+
local function showcontinent(roomid)
82+
-- GoMud continent display can be added here
83+
return ''
8684
end
8785

8886
local i = 1
@@ -106,7 +104,7 @@ function mmp.roomFind(query, lines)
106104
string.format(
107105
"<DarkSlateGrey>%s%s<DarkSlateGrey>\n",
108106
mmp.cleanAreaName(tostring(mmp.areatabler[getRoomArea(roomid)])),
109-
showmeropis(roomid)
107+
showcontinent(roomid)
110108
),
111109
[[mmp.echoPath(mmp.currentroom, ]] .. roomid .. [[)]],
112110
"Display directions from here to " .. roomname,
@@ -131,7 +129,7 @@ function mmp.roomFind(query, lines)
131129
string.format(
132130
"<DarkSlateGrey>) in <LightSlateGray>%s%s<DarkSlateGrey>.",
133131
mmp.cleanAreaName(tostring(mmp.areatabler[getRoomArea(roomid)])),
134-
showmeropis(roomid)
132+
showcontinent(roomid)
135133
)
136134
)
137135
fg("DarkSlateGrey")

0 commit comments

Comments
 (0)