-
Notifications
You must be signed in to change notification settings - Fork 35
out-of-the-box support for Astaria's hashing and colorisation of the mapper #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
araskal
wants to merge
7
commits into
IRE-Mudlet-Mapping:master
Choose a base branch
from
Astaria-Mud:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3f79019
added astaria to script
NathanMArgenti 66657f8
vadi updating hash
NathanMArgenti 204c450
Merge pull request #2 from IRE-Mudlet-Mapping/master
araskal 91bfa74
Added support for Astaria's game env and colorisation
araskal 1c6aba2
Merge pull request #3 from Astaria-Mud/astaria-mapenv
araskal 177c472
Merge branch 'master' of https://github.com/Astaria-Mud/ire-mapping-s…
araskal 40b99df
cylis's changes to the mapper
araskal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2023,6 +2023,7 @@ raiseEvent("mmapper updated pdb")</script> | |
| <name>Login</name> | ||
| <script>raiseEvent("mmp logged in", "ashyria") | ||
| mmp.game = "ashyria" | ||
| mmp.echo("We're connected to Ashyria.")</script> | ||
| <triggerType>0</triggerType> | ||
| <conditonLineDelta>0</conditonLineDelta> | ||
| <mStayOpen>0</mStayOpen> | ||
|
|
@@ -2103,6 +2104,43 @@ end</script> | |
| </regexCodePropertyList> | ||
| </Trigger> | ||
| </TriggerGroup> | ||
| <TriggerGroup isActive="yes" isFolder="yes" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no"> | ||
| <name>Astaria</name> | ||
| <script></script> | ||
| <triggerType>0</triggerType> | ||
| <conditonLineDelta>0</conditonLineDelta> | ||
| <mStayOpen>0</mStayOpen> | ||
| <mCommand></mCommand> | ||
| <packageName></packageName> | ||
| <mFgColor>#ff0000</mFgColor> | ||
| <mBgColor>#ffff00</mBgColor> | ||
| <mSoundFile></mSoundFile> | ||
| <colorTriggerFgColor>#000000</colorTriggerFgColor> | ||
| <colorTriggerBgColor>#000000</colorTriggerBgColor> | ||
| <regexCodeList /> | ||
| <regexCodePropertyList /> | ||
| <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no"> | ||
| <name>Login</name> | ||
| <script>raiseEvent("mmp logged in", "Astaria") | ||
| mmp.game = "astaria"</script> | ||
| <triggerType>0</triggerType> | ||
| <conditonLineDelta>0</conditonLineDelta> | ||
| <mStayOpen>0</mStayOpen> | ||
| <mCommand></mCommand> | ||
| <packageName></packageName> | ||
| <mFgColor>#ff0000</mFgColor> | ||
| <mBgColor>#ffff00</mBgColor> | ||
| <mSoundFile></mSoundFile> | ||
| <colorTriggerFgColor>#000000</colorTriggerFgColor> | ||
| <colorTriggerBgColor>#000000</colorTriggerBgColor> | ||
| <regexCodeList> | ||
| <string> The Kingdom of Astaria</string> | ||
| </regexCodeList> | ||
| <regexCodePropertyList> | ||
| <integer>3</integer> | ||
| </regexCodePropertyList> | ||
| </Trigger> | ||
| </TriggerGroup> | ||
| <TriggerGroup isActive="yes" isFolder="yes" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no"> | ||
| <name>Asteria</name> | ||
| <script></script> | ||
|
|
@@ -7094,7 +7132,7 @@ function mmp.gotoFeature(partialFeatureName, dashtype) | |
| return | ||
| end | ||
| raiseEvent("mmp clear externals") | ||
| mmp.gotoRoom(closestFeature, dashtype, "room") | ||
| mmp.gotoRoom(closestFeature, dashtype, "area") | ||
| end</script> | ||
| <eventHandlerList> | ||
| <string>RoomNum</string> | ||
|
|
@@ -10379,6 +10417,7 @@ end | |
| if gmcp.Room.Info.num then | ||
| centerview(gmcp.Room.Info.num) | ||
| elseif gmcp.Room.Info.roomhash then | ||
| print(tostring(mmp.roomidFromHash(gmcp.Room.Info.roomhash))) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Debug? |
||
| centerview(mmp.roomidFromHash(gmcp.Room.Info.roomhash)) | ||
| end | ||
| end | ||
|
|
@@ -10415,7 +10454,7 @@ local function makeroom(oldid, newid, x, y, z) | |
| local fgr, fgg, fgb = unpack(color_table.red) | ||
| local bgr, bgg, bgb = unpack(color_table.blue) | ||
| highlightRoom(newid, fgr, fgg, fgb, bgr, bgg, bgb, 1, 100, 100) | ||
| if mmp.envids[gmcp.Room.Info.environment] then | ||
| if mmp.game ~= "astaria" and mmp.envids[gmcp.Room.Info.environment] then | ||
| setRoomEnv(newid, mmp.envids[gmcp.Room.Info.environment]) | ||
| else | ||
| setRoomEnv(newid, getRoomEnv(oldid)) | ||
|
|
@@ -10479,13 +10518,28 @@ local function getshiftedcoords(original, ox, oy, oz) | |
| y = (y or oy) | ||
| z = (z or oz) + 1 | ||
| else | ||
| -- Astaria has a lot of non-standard exits that the mapper doesn't like in hash based games | ||
| -- so I have sent them into the sky, they can be manually moved by the person mapping. | ||
| if game ~= "Astaria" then | ||
| mmp.echo( | ||
| "Don't know where to shift the coordinates for a " .. | ||
| tostring(w) .. | ||
| " (" .. | ||
| tostring(original) .. | ||
| ") exit. Setting to z+40" | ||
| ) | ||
| x = (x or ox) | ||
| y = (y or oy) | ||
| z = (z or oz) + 40 | ||
| else | ||
| mmp.echo( | ||
| "Don't know where to shift the coordinates for a " .. | ||
| tostring(w) .. | ||
| " (" .. | ||
| tostring(original) .. | ||
| ") exit." | ||
| ) | ||
| end | ||
| end | ||
| return x, y, z | ||
| end | ||
|
|
@@ -10714,9 +10768,14 @@ function mmp.mappingNewroom(_, num) | |
| gmcp.Room.Info.environment .. | ||
| "." | ||
| end | ||
| -- check indoors status | ||
|
|
||
| -- check indoors status | ||
| if mmp.game ~= "asteria" or mmp.game ~= "ashyria" then | ||
| local indoors = table.contains(gmcp.Room.Info.details, "indoors") | ||
| local indoors | ||
| if mmp.game ~= "astaria" then | ||
| indoors = table.contains(gmcp.Room.Info.details, "indoors") | ||
| else indoors = (gmcp.Room.Info.environment == "indoors") | ||
| end | ||
| if indoors and (getRoomUserData(num, "indoors") == '' or getRoomUserData(num,"outdoors") ~= '') then | ||
| setRoomUserData(num, "indoors", "y") | ||
| clearRoomUserDataItem(num, "outdoors") | ||
|
|
@@ -10728,8 +10787,8 @@ function mmp.mappingNewroom(_, num) | |
| end | ||
| end | ||
|
|
||
| -- check server area name (Achaea only for now) | ||
| if mmp.game == "achaea" then | ||
| -- check server area name (Achaea only for now, and Astaria now too) | ||
| if mmp.game == "astaria" or mmp.game == achaea then | ||
| local serverArea = gmcp.Room.Info.area | ||
| if serverArea ~= getRoomUserData(num, "Game Area") then | ||
| setRoomUserData(num, "Game Area", serverArea) | ||
|
|
@@ -12148,85 +12207,70 @@ end</script> | |
| if game ~= "Astaria" then return end | ||
| mmp.envids = | ||
| { | ||
| ["field"] = 3, | ||
| -- old ones below | ||
| ["a sheltered dell"] = 68, | ||
| ["Arcane Temple"] = 66, | ||
| ["Blackened Lands"] = 58, | ||
| ["Blackstone Dungeon"] = 65, | ||
| ["Blackstone Keep"] = 62, | ||
| ["Constructed underground"] = 2, | ||
| ["Dark Forest"] = 1, | ||
| ["Deep Ocean"] = 24, | ||
| ["Desert Ruins"] = 38, | ||
| ["Dwarven city"] = 18, | ||
| ["Forestal Council"] = 44, | ||
| ["Frozen Bog"] = 76, | ||
| ["Lake of Fire"] = 56, | ||
| ["Natural underground"] = 3, | ||
| ["Noble Bar"] = 53, | ||
| ["Noble Chambers"] = 51, | ||
| ["Rocky Shore"] = 77, | ||
| ["Sylayan city"] = 19, | ||
| ["Tainted Underground"] = 35, | ||
| ["Tainted Water"] = 39, | ||
| ["Underground Lake"] = 36, | ||
| ["Vast Ocean"] = 26, | ||
| ["Wetlands Village"] = 64, | ||
| ["within a tent"] = 69, | ||
| Academia = 42, | ||
| Acropolis = 33, | ||
| Beach = 5, | ||
| Blighted = 74, | ||
| bog = 73, | ||
| Catacombs = 63, | ||
| Church = 54, | ||
| Cliffs = 67, | ||
| Crags = 32, | ||
| Desert = 6, | ||
| Docks = 30, | ||
| Farmland = 41, | ||
| Forest = 4, | ||
| Freshwater = 22, | ||
| Garden = 21, | ||
| garrison = 71, | ||
| Grasslands = 7, | ||
| Graveyard = 46, | ||
| Hills = 9, | ||
| Jungle = 17, | ||
| Mountains = 14, | ||
| Nobility = 50, | ||
| Ocean = 20, | ||
| Path = 11, | ||
| Polar = 27, | ||
| Pond = 49, | ||
| pyramid = 72, | ||
| quarry = 70, | ||
| River = 10, | ||
| Road = 12, | ||
| Ruins = 37, | ||
| Scrublands = 78, | ||
| Sewer = 23, | ||
| Swamp = 15, | ||
| Temple = 57, | ||
| Tower = 79, | ||
| transportation = 48, | ||
| Tundra = 16, | ||
| Underworld = 28, | ||
| Urban = 8, | ||
| Valley = 13, | ||
| Villa = 75, | ||
| Village = 47, | ||
| Volcano = 59, | ||
| Warrens = 31, | ||
| } | ||
|
|
||
| indoors = 272, | ||
| road = 259, | ||
| shallow = 262, | ||
| lake = 268, | ||
| river = 268, | ||
| deepriver = 260, | ||
| sea = 260, | ||
| waterline = 268, | ||
| swells = 268, | ||
| shallows = 268, | ||
| surf = 268, | ||
| undertoe = 268, | ||
| waves = 268, | ||
| seaswell = 268, | ||
| breakers = 268, | ||
| deepswells = 268, | ||
| reef = 268, | ||
| channel = 268, | ||
| shelf = 268, | ||
| opensea = 268, | ||
| bridge = 259, | ||
| sewer = 272, | ||
| desert = 267, | ||
| field = 258, | ||
| rocky = 259, | ||
| highlands = 259, | ||
| plain = 259, | ||
| shore = 262, | ||
| valley = 258, | ||
| forest = 258, | ||
| hills = 259, | ||
| moor = 258, | ||
| cave = 259, | ||
| badlands = 259, | ||
| deepforest = 258, | ||
| beach = 267, | ||
| jungle = 258, | ||
| swamp = 258, | ||
| mountain = 259, | ||
| peak = 259, | ||
| volcano = 257, | ||
| ud_street = 263, | ||
| ud_path = 272, | ||
| ud_rough = 272, | ||
| ud_indoors = 272, | ||
| ud_tough = 272, | ||
| dunes = 267, | ||
| sands = 267, | ||
| } | ||
| mmp.waterenvs = {} | ||
| local waterids = { "River", "Ocean", "Deep Ocean", "Vast Ocean", "Underground Lake", "Tainted Water", "Lake of Fire" } | ||
| for i = 1, #waterids do mmp.waterenvs[mmp.envids[waterids[i]]] = true end | ||
| mmp.envidsr = {} | ||
| for name, id in pairs(mmp.envids) do | ||
| mmp.envidsr[id] = name | ||
| end | ||
|
|
||
| mmp.colorcodes = {} | ||
| mmp.colorcodes[258] = {176, 224, 230, 255} | ||
| mmp.colorcodes[259] = {160, 82, 45, 255} | ||
|
|
||
| mmp.envidsr = {}; | ||
| for name, id in pairs(mmp.envids) do mmp.envidsr[id] = name end | ||
| function mmp.setAstariaColorcodes() | ||
| for id, rgba in pairs(mmp.colorcodes) do | ||
| setCustomEnvColor(id, rgba[1], rgba[2], rgba[3], rgba[4]) | ||
| end | ||
| end | ||
| end</script> | ||
| <eventHandlerList> | ||
| <string>mmp logged in</string> | ||
|
|
@@ -13002,7 +13046,7 @@ end</script> | |
| </ScriptGroup> | ||
| </ScriptPackage> | ||
| <KeyPackage /> | ||
| <VariablePackage> | ||
| <HiddenVariables /> | ||
| </VariablePackage> | ||
| <HelpPackage> | ||
| <helpURL></helpURL> | ||
| </HelpPackage> | ||
| </MudletPackage> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this change do?