PennMUSH Community

Ticket #5546 (closed suggested feature: fixed)

Opened 6 years ago

Last modified 1 year ago

%# and %! in the TPORT attribute

Reported by: anonymous Assigned to: devteam
Priority: minor Milestone: 1.8.3p6
Keywords: Cc:
Visibility: Public

Description (Last modified by raevnos)

PennMUSH Version: 1.7.7p0
OS: Windows XP

Recently, I was experimenting with the @tport command on objects. 
However, I discovered that both %! and %# evaluate to the dbref of the 
object being teleported - %# does not point to the enactor, which one 
would think is the enactor. An example:

@tport foo = [pemit(%#,Bar)]
@set foo=b
@set foo=v
@tel foo=#0
#8811! [pemit(%#,Bar)] :
#8811!  pemit(%#,Bar) :
#8811!   %# => #8811
#8811!  pemit(%#,Bar) =>
#8811! [pemit(%#,Bar)] =>
Teleported.

I'm not sure if this is a bug or not, but it seems to me that it is.

Intrevis@M*U*S*H


Change History

12/02/02 18:11:29 changed by Alan Schwartz <dunemush@pennmush.org>

Quoting zetafunction@hey.nu (zetafunction@hey.nu):
> PennMUSH Version: 1.7.7p0
> OS: Windows XP
> 
> Recently, I was experimenting with the @tport command on objects. 
> However, I discovered that both %! and %# evaluate to the dbref of the 
> object being teleported - %# does not point to the enactor, which one 
> would think is the enactor. An example:
> 
> @tport foo = [pemit(%#,Bar)]
> @set foo=b
> @set foo=v
> @tel foo=#0
> #8811! [pemit(%#,Bar)] :
> #8811!  pemit(%#,Bar) :
> #8811!   %# => #8811
> #8811!  pemit(%#,Bar) =>
> #8811! [pemit(%#,Bar)] =>
> Teleported.
> 
> I'm not sure if this is a bug or not, but it seems to me that it is.


This one is interesting. Because @tport is shown to the object,
and not the enactor, we use did_it(thing,thing,....)

That means %# gets set to the thing, which is really calling
the message on itself.

We have traditionally handled situations like this by passing
in the extra stuff as %0 (as per GIVE, RECEIVE). We can do that.

Or we can munge real_did_it to accept another dbref that, if valid,
is passed to process_expression as the enactor.

What do you think, folks?

 - Javelin


-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Javelin@M*U*S*H (mush.pennmush.org 4201) |           Alan Schwartz
                                         |       dunemush@pennmush.org
Paul@DuneMUSH, and Javelin elsewhere     |     PennMUSH Server Maintainer
=-------------------------------------------------------------------------=
   PennMUSH God's Guide: http://www.pennmush.org/~alansz/guide.html
        PennMUSH Source: http://ftp.pennmush.org/Source
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

11/16/07 07:41:49 changed by raevnos

  • status changed from new to closed.
  • resolution set to fixed.
  • description changed.
  • milestone set to 1.8.3p6.

Teleporting object passed as %0, old location as %1.