← Back to team overview

mudlet-makers team mailing list archive

[Bug 1407705] [NEW] No getter for "player location"

 

Public bug reported:

Whilst contributing to the forums
http://forums.mudlet.org/viewtopic.php?f=9&t=4680 I noted that although
we have a lua command to set the map viewing point a.k.a. "player room"
with centerview(<roomID>) there is NO way for lua scripts to find out
what the room currently is.  This forces scripts to maintain their own
local copy and to push that out in order to ensure things are in sync.
This leads to the potential for confusion for the user if not done
correctly, especially on start up.

I propose that we should have a lua getCenterView() {note usage of
CamelCase compared to "centerview"} that returns the current value {of
(Host *)->(TMap *)->mRoomId} or the signal value of either 0 which is
what this variable will have if not previously set or nil if there is no
map loaded (with a secondary diagnostic about that as per current Mudlet
Lua "guidelines"!)

Thoughts anyone?

** Affects: mudlet
     Importance: Undecided
     Assignee: Stephen Lyons (slysven)
         Status: New

-- 
You received this bug notification because you are a member of Mudlet
Makers, which is subscribed to Mudlet.
https://bugs.launchpad.net/bugs/1407705

Title:
  No getter for "player location"

Status in Mudlet the MUD client:
  New

Bug description:
  Whilst contributing to the forums
  http://forums.mudlet.org/viewtopic.php?f=9&t=4680 I noted that
  although we have a lua command to set the map viewing point a.k.a.
  "player room" with centerview(<roomID>) there is NO way for lua
  scripts to find out what the room currently is.  This forces scripts
  to maintain their own local copy and to push that out in order to
  ensure things are in sync.  This leads to the potential for confusion
  for the user if not done correctly, especially on start up.

  I propose that we should have a lua getCenterView() {note usage of
  CamelCase compared to "centerview"} that returns the current value {of
  (Host *)->(TMap *)->mRoomId} or the signal value of either 0 which is
  what this variable will have if not previously set or nil if there is
  no map loaded (with a secondary diagnostic about that as per current
  Mudlet Lua "guidelines"!)

  Thoughts anyone?

To manage notifications about this bug go to:
https://bugs.launchpad.net/mudlet/+bug/1407705/+subscriptions


Follow ups

References