Skip to content

Commit 146860f

Browse files
authored
Merge pull request #112 from iLPdev/release/0.5.0
build: Release v0.5.0-beta
2 parents b0a1f11 + 4595279 commit 146860f

File tree

4 files changed

+86
-66
lines changed

4 files changed

+86
-66
lines changed

.github/semantic.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
1-
# Always validate the PR title AND all the commits
2-
titleAndCommits: true
3-
4-
# Require at least one commit to be valid
5-
# this is only relevant when using commitsOnly: true or titleAndCommits: true,
6-
# which validate all commits by default
7-
anyCommit: true
1+
# Always validate the PR title, and ignore the commits
2+
titleOnly: true

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ The repo started with a [README-first approach](https://tom.preston-werner.com/2
6565
- v0.2.1-beta - Help system and configuration functional
6666
- v0.3.0-beta - Automated updates implemented
6767
- v0.4.0-beta - Room Styling implemented
68+
- v0.5.0-beta - Clean install process and initial default colors
6869

6970
### Vision
7071

@@ -102,7 +103,7 @@ Version numbering approximates the [Semantic Versioning](http://semver.org) appr
102103

103104
- **Project State**: discMapper is under active development. The application can be used, but may be unstable. We are in need of beta testing prior to moving forward with the v1.0.0 release.
104105

105-
- **Current Release**: v0.4.1-beta patches a missing event handler for the room styling feature set (thanks @Vadi2!) and fixes redundant initialization bug when installed as a module.
106+
- **Current Release**: v0.5.0-beta introduces Kefke map matched colors, Street room defaults, cleaner install process, and various minor bugfixes.
106107

107108
**[^Top](#table-of-contents)**
108109

src/discMapper.xml

Lines changed: 81 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,9 @@ end</script>
733733
<Script isActive="yes" isFolder="no">
734734
<name>discMapper</name>
735735
<packageName></packageName>
736-
<script>-- discMapper
736+
<script>-- discMapper
737737

738-
local version = "0.4.1-beta"
738+
local version = "0.5.0-beta"
739739

740740
-- look into options for non-standard door usage for speedwalk
741741
-- come up with aliases to set translations and custom exits, add appropriate help info
@@ -1373,17 +1373,21 @@ local move_queue, lines = {}, {}
13731373
local find_portal, vision_fail, room_detected, random_move, force_portal, find_prompt, downloading, walking, help_shown
13741374
local mt = getmetatable(map) or {}
13751375

1376-
function uninstallGMS(_, name)
1377-
if name ~= "discMapper" then return end
1376+
function initialize(_, name)
1377+
if name ~= "discMapper" then
1378+
return
1379+
end
1380+
map.echo("Initializing discMapper v"..version..".")
13781381
uninstallPackage("generic_mapper")
1379-
map.echo("Uninstalled generic_mapper package")
1382+
map.echo("Uninstalled generic_mapper package.")
1383+
setCustomRoomColors()
13801384
enableGMCP()
1381-
send("look", true)
1385+
send("look", false)
13821386
end
13831387

13841388
function enableGMCP()
13851389
sendGMCP("core.supports.set \[\"char.login\", \"char.info\", \"room.info\", \"room.map\", \"room.writtenmap\", \"Char.Vitals\",\"Window.Frame.map\"\]")
1386-
map.echo("GMCP Core Supports activated")
1390+
map.echo("Activated GMCP Core Supports.")
13871391
end
13881392

13891393
local function config()
@@ -1680,24 +1684,6 @@ local function set_room(roomID)
16801684
raiseEvent("onMoveMap", map.currentRoom)
16811685
end
16821686

1683-
function mapMenu()
1684-
-- addMapEvent("Show Room Info", "showRoomID") -- place holder
1685-
addMapMenu("Style Room")
1686-
addMapEvent("Street", "styleRooms", "Style Room", "Street")
1687-
addMapEvent("Shop", "styleRooms", "Style Room", "Shop")
1688-
addMapEvent("General Store", "styleRooms", "Style Room", "General Store")
1689-
addMapEvent("Services", "styleRooms", "Style Room", "Services")
1690-
addMapEvent("Bank", "styleRooms", "Style Room", "Bank")
1691-
addMapEvent("House", "styleRooms", "Style Room", "House")
1692-
addMapEvent("Temple", "styleRooms", "Style Room", "Temple")
1693-
addMapEvent("Custom", "styleRooms", "Style Room", "Custom")
1694-
addMapEvent("Player House", "styleRooms", "Style Room", "Player House")
1695-
addMapEvent("Player Shop", "styleRooms", "Style Room", "Player Shop")
1696-
addMapEvent("Food", "styleRooms", "Style Room", "Food")
1697-
addMapEvent("T-Shop", "styleRooms", "Style Room", "T-Shop")
1698-
addMapEvent("Park", "styleRooms", "Style Room", "Park")
1699-
end
1700-
17011687
-- Room styling is based on the 2014-09-19 version of Fenton's Discworld Mapper
17021688
-- for faster styling of selected rooms. styleRooms is passed the name of the
17031689
-- mapEvent that called it, as well as the room IDs of the selected rooms. If
@@ -1706,6 +1692,34 @@ end
17061692
-- chosen contains spaces or symbols, you'll need to surround it with brackets
17071693
-- and single quotes.
17081694

1695+
function mapMenu()
1696+
-- addMapEvent("Show Room Info", "showRoomID") -- place holder
1697+
addMapMenu("Style Room")
1698+
addMapEvent("Craft", "styleRooms", "Style Room", "Craft")
1699+
addMapEvent("Custom", "styleRooms", "Style Room", "Custom")
1700+
addMapEvent("Drink", "styleRooms", "Style Room", "Drink")
1701+
addMapEvent("Eat", "styleRooms", "Style Room", "Eat")
1702+
addMapEvent("Garden", "styleRooms", "Style Room", "Garden")
1703+
addMapEvent("Guild", "styleRooms", "Style Room", "Guild")
1704+
addMapMenu("Houses", "Style Room")
1705+
addMapEvent("House", "styleRooms", "Houses", "House")
1706+
addMapEvent("Club House", "styleRooms", "Houses", "Club House")
1707+
addMapEvent("Player House", "styleRooms", "Houses", "Player House")
1708+
addMapEvent("Park", "styleRooms", "Style Room", "Park")
1709+
addMapMenu("Services", "Style Room")
1710+
addMapEvent("Service", "styleRooms", "Services", "Service")
1711+
addMapEvent("Bank", "styleRooms", "Services", "Bank")
1712+
addMapMenu("Shops", "Style Room")
1713+
addMapEvent("Shop", "styleRooms", "Shops", "Shop")
1714+
addMapEvent("General Store", "styleRooms", "Shops", "General Store")
1715+
addMapEvent("Player Shop", "styleRooms", "Shops", "Player Shop")
1716+
addMapEvent("T-Shop", "styleRooms", "Shops", "T-Shop")
1717+
addMapEvent("Street", "styleRooms", "Style Room", "Street")
1718+
addMapEvent("Temple", "styleRooms", "Style Room", "Temple")
1719+
addMapEvent("Water", "styleRooms", "Style Room", "Water")
1720+
map.echo("Installed additional mapper context menus.")
1721+
end
1722+
17091723
function styleRooms (...)
17101724
for i, v in ipairs(arg) do --loop through all of the arguments passed to the function
17111725
if i &gt; 2 then --skip the first two, as those are not room ID's
@@ -1719,50 +1733,59 @@ end
17191733
-- reserved defaults
17201734
function setCustomRoomColors()
17211735
map.echo("Custom room colors initialized")
1722-
setCustomEnvColor(289, 0,132,132,255) -- ['General Store']
1723-
setCustomEnvColor(290, 255,123,33,255) -- Services &amp; Bank
1724-
setCustomEnvColor(291, 132,66,0,255) -- House
1725-
setCustomEnvColor(292, 132,132,198,255) -- Custom
1726-
setCustomEnvColor(293, 0,255,255,255) -- Temple
1727-
setCustomEnvColor(294, 255,0,0,255) -- Food
1728-
setCustomEnvColor(295, 64,64,64,255) -- Street
1736+
setCustomEnvColor(289, 132,132,255,255) -- Custom
1737+
setCustomEnvColor(290, 132,66,0,255) -- Houses
1738+
setCustomEnvColor(291, 255,132,66,255) -- Services
1739+
setCustomEnvColor(292, 64,64,64,255) -- Streets
17291740
end
17301741

17311742
-- Table of colors assigned by room type. The numbers refer to color table in
17321743
-- the "color" menu when you right-click on the map.
17331744
styleEnv =
17341745
{
1735-
['General Store'] = 289,
1736-
Shop = 266,
1737-
Services = 290,
1738-
Bank = 290,
1739-
House = 291,
1740-
Custom = 292,
1741-
Temple = 293,
1742-
Street = 295,
1743-
['Player House'] = 269,
1744-
['Player Shop'] = 269,
1745-
Food = 294,
1746-
['T-Shop'] = 264,
1746+
Craft = 267,
1747+
Custom = 289,
1748+
Drink = 265,
1749+
Eat = 265,
1750+
Garden = 258,
1751+
Guild = 263,
1752+
House = 290,
1753+
['Club House'] = 290,
1754+
['Player House'] = 290,
17471755
Park = 258,
1756+
Service = 291,
1757+
Bank = 291,
1758+
Shop = 266,
1759+
['General Store'] = 262,
1760+
['Player Shop'] = 269,
1761+
['T-Shop'] = 271,
1762+
Street = 292,
1763+
Temple = 270,
1764+
Water = 268,
17481765
}
17491766

17501767
-- a table of characters assigned to rooms.
17511768
styleChar =
17521769
{
1753-
['General Store'] = "",
1754-
Shop = "",
1755-
Services = "",
1756-
Bank = "$",
1757-
House = "",
1770+
Craft = "",
17581771
Custom = "",
1759-
Temple = "",
1760-
Street = "",
1761-
['Player House'] = "",
1762-
['Player Shop'] = "",
1763-
Food = "",
1764-
['T-Shop'] = "T",
1772+
Drink = "",
1773+
Eat = "",
1774+
Garden = "",
1775+
Guild = "",
1776+
House = "",
1777+
['Club House'] = "C",
1778+
['Player House'] = "P",
17651779
Park = "",
1780+
Service = "",
1781+
Bank = "$",
1782+
Shop = "",
1783+
['General Store'] = "",
1784+
['Player Shop'] = "P",
1785+
['T-Shop'] = "T",
1786+
Street = "",
1787+
Temple = "",
1788+
Water = "",
17661789
}
17671790

17681791
local function add_door(roomID, dir, status)
@@ -1953,6 +1976,7 @@ local function create_room(name, exits, dir, coords)
19531976
addRoom(newID)
19541977
setRoomArea(newID, map.currentArea)
19551978
setRoomName(newID, name)
1979+
setRoomEnv(newID, styleEnv["Street"]) -- most new rooms are streets, so style them as such
19561980
for k,v in ipairs(exits) do
19571981
if stubmap[v] then
19581982
if stubmap[v] &lt;= 12 then
@@ -3207,9 +3231,8 @@ function map.eventHandler(event, ...)
32073231
elseif event == "mapOpenEvent" then
32083232
mapMenu()
32093233
if not help_shown and not map.save.prompt_pattern[map.character or ""] then
3210-
setCustomRoomColors()
32113234
map.find_prompt()
3212-
send("look", true)
3235+
send("look", false)
32133236
tempTimer(3, function() map.show_help("quick_start"); help_shown = true end)
32143237
end
32153238
elseif event == "mapStop" then
@@ -3222,7 +3245,7 @@ end
32223245
registerAnonymousEventHandler("sysDownloadDone", "map.eventHandler")
32233246
registerAnonymousEventHandler("sysLoadEvent", "map.eventHandler")
32243247
registerAnonymousEventHandler("sysConnectionEvent", "map.eventHandler")
3225-
registerAnonymousEventHandler("sysInstallPackage", "uninstallGMS")
3248+
registerAnonymousEventHandler("sysInstallPackage", "initialize")
32263249
registerAnonymousEventHandler("sysInstall", "map.eventHandler")
32273250
registerAnonymousEventHandler("sysDataSendRequest", "map.eventHandler")
32283251
registerAnonymousEventHandler("onMoveFail", "map.eventHandler")

src/versions.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ return {
77
[5] = [[0.3.2-beta]],
88
[6] = [[0.4.0-beta]],
99
[7] = [[0.4.1-beta]],
10+
[8] = [[0.5.0-beta]],
1011
}
1112
}

0 commit comments

Comments
 (0)