Gammon Forum
See www.mushclient.com/spam for dealing with forum spam.
Please read the MUSHclient FAQ!
Entire forum
MUSHclient
Plugins
Learning Mapper - Area Name for new rooms
|
Learning Mapper - Area Name for new rooms
|
It is now over 60 days since the last post. This thread is closed.
 
Refresh page
| Posted by |
Mewtiny
(1 post) bio
|
| Date |
Sun 25 Oct 2020 10:11 AM (UTC) |
| Message |
It's possible I missed an option or setting somewhere but no matter what I did, new rooms always were set with an Area Name of the World Name. I updated the code below to always try and carry over the Area Name from the previous room so that once you've entered a new area, you only need to update the first room and then it will continue using that -- rinse/repeat. Obviously only really works 1 if you actually know what the Area is which sometimes requires WIZ/IMM status but still better than all rooms being set to the same area. Anyways, here's what I added/changed (in bold)
-- add room to rooms table if not already known
if not rooms [uid] then
INFO ("Mapper adding room " .. fixuid (uid))
local last_area
if rooms [from_room] then
last_area = rooms [from_room].area
else
last_area = area_name or WorldName ()
end
rooms [uid] = {
desc = description,
exits = exits,
area = last_area,
name = room_name or fixuid (uid),
duplicate = duplicate, -- which UID, if any, this is a duplicate of
} -- end of new room table
| top |
|
| Posted by |
Nick Gammon
Australia (22,556 posts) bio
Forum Administrator |
| Date |
Reply #1 on Sun 25 Oct 2020 10:48 AM (UTC) Amended on Sun 25 Oct 2020 10:49 AM (UTC) by Nick Gammon
|
| Message |
There is a function call mentioned in the documentation for changing the area name:
set_area_name (name) --> set the name of this area (optional, use if known) - shown at the bottom of the map
For example:
check (CallPlugin ("99c74b2685e425d3b6ed6a7d", "set_area_name", "Main city"))
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
822 views.
It is now over 60 days since the last post. This thread is closed.
 
Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.