Skip to content

Commit 06d26df

Browse files
committed
Added support for game engine commands. Removed old mapper script. Added new logo.
1 parent e1839a9 commit 06d26df

File tree

11 files changed

+38
-18
lines changed

11 files changed

+38
-18
lines changed

src/.DS_Store

-8 KB
Binary file not shown.

src/aliases/GoMudUI/ui_main_alias.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ elseif command == "update" then
5959
end
6060

6161
elseif command == "check" then
62-
ui.manualUpdate = true
63-
ui.checkForUpdate()
64-
62+
ui.manualUpdateCheck()
6563

6664
elseif command =="color" then
6765
cecho("\n <YellowGreen>Choose which item you want to change color on, \n then click on a color name to change to\n\n")

src/resources/gomud.png

-20.2 KB
Loading

src/scripts/GoMudUI/Core Functions/Autoupdater.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ function ui.fileDownloadedSuccess(_, filename)
6262
ui.fetchChangeLog()
6363
ui.displayUIMessage("Use the in game command <ui install> to update")
6464
elseif ui.manualUpdate then
65-
ui.displayUIMessage("\n<magenta>No update found. You are on version: <sky_blue>"..ui.version.."\n")
65+
echo("\n")
66+
ui.displayUIMessage("<magenta>No update found. You are on version: <sky_blue>"..ui.version.."\n")
6667
ui.manualUpdate = false
6768
end
6869

src/scripts/GoMudUI/Install-Login-Exit.lua

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ function ui.postInstallHandling(_, package)
101101
end
102102

103103
-- Install IRE mapping script
104-
if not table.contains(getPackages(),"GoMud-Mapper") then
104+
if not table.contains(getPackages(),"GoMudMapper") then
105105
ui.displayUIMessage("Now installing custom GoMud mapper script")
106-
tempTimer(1, function() installPackage("https://github.com/GoMudEngine/MudletUI/releases/latest/download/GoMud-Mapper.mpackage") end)
106+
tempTimer(1, function() installPackage("https://github.com/GoMudEngine/MudletMapper/releases/latest/download/GoMudMapper.mpackage") end)
107107
end
108108

109109
ui.postInstallDone = true
@@ -116,6 +116,19 @@ function ui.postInstallHandling(_, package)
116116

117117
end
118118

119+
function ui.gameEngineCommand()
120+
local command = gmcp.Client.GUI.gomudui
121+
echo(command)
122+
if command == "update" then
123+
ui.manualUpdate = true
124+
ui.checkForUpdate()
125+
end
126+
if command == "remove" then
127+
ui.displayUIMessage("Now removing UI package from Mudlet")
128+
uninstallPackage("GoMudUI")
129+
end
130+
end
131+
119132
function ui.unInstall(_, package)
120133

121134
if package == "GoMudUI" and not ui.isUpdating then

src/scripts/GoMudUI/UI Containers/Container_Functions.lua

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
function ui.getContainerPositions()
22
ui.containerPositions = {}
33
Adjustable.Container:doAll(
4-
function(self)
5-
local name = self.name
6-
7-
if string.match(self.name, "container") then
8-
display(self.windowList[windowName])
9-
ui.containerPositions[name] = {}
10-
ui.containerPositions[name].x = self:get_x()
11-
ui.containerPositions[name].y = self:get_y()
12-
ui.containerPositions[name].height = self:get_height()
13-
ui.containerPositions[name].width = self:get_width()
4+
function(self)
5+
local name = self.name
6+
7+
if string.match(self.name, "container") then
8+
-- Remove or fix the display line
9+
-- display(self.windowList[windowName]) <- This line has an undefined variable
10+
11+
ui.containerPositions[name] = {}
12+
ui.containerPositions[name].x = self:get_x()
13+
ui.containerPositions[name].y = self:get_y()
14+
ui.containerPositions[name].height = self:get_height()
15+
ui.containerPositions[name].width = self:get_width()
16+
end
1417
end
15-
end
1618
)
19+
20+
-- Add a return statement to return the populated table
21+
return ui.containerPositions
1722
end
1823

1924

src/scripts/GoMudUI/UI_Settings.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ sysMapDownloadEvent = {"ui.mapDownloaded"},
5151
["mmapper updated map"] = {"ui.updateTopBar"},
5252
["gmcp.Game.Who"] = {"ui.updateWhoDisplay"},
5353
["gmcp.Game.Info"] = {"ui.justLoggedIn"},
54+
["gmcp.Client.GUI"] = {"ui.gameEngineCommand"}
55+
5456
}
5557
-- Run this to define the event handlers above
5658
ui.defineEventHandlers()

src/scripts/GoMudUI/Update Container Info/Channels.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function ui.updateChannelDisplay(eventName, ...)
66

77
local senderColor
88

9-
if gmcp.Char.Info and gmcp.Comm.Channel.sender == gmcp.Char.Info.name then
9+
if gmcp.Char and gmcp.Char.Info and gmcp.Comm.Channel.sender == gmcp.Char.Info.name then
1010
senderColor = "<gold>"
1111
else
1212
senderColor = "<sea_green>"

src/scripts/GoMudUI/Update Container Info/Update_all_displays.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ function ui.updateDisplays(args)
1616
ui.updateTopBar()
1717
ui.updateCombatDisplay()
1818
ui.resizeEvent()
19+
raiseWindow("mapper")
1920
end

updater/GoMud-Mapper.mpackage

-45.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)