Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CF: Patch: 'alias
On Jan 9, 5:35pm, Rauli Ruohonen wrote:
> Subject: Re: CF: Patch: 'alias
> In voimax.lists.crossfire, Christian Stieber wrote:
> >1) a new command, 'alias, to give new names to objects
>
> It seems that you set the name of the object to the alias and store the
> original to a new variable, "real_name". Are you sure that altars don't
> use this normal "name" you overwrote with the alias? Usually altars want
> something with a specific name, and if you can change a name of e.g.
> food...
Yeah - I can see a problem with the alias command as is, as anything internal
which checks the name field can get confused.
I believe that some altars do use the name field to determine what is
sacrificed. Also, I believe the improved weapon code likewise uses the name
field.
For an alias command, it probable makes more sense to add an 'alias' field to
the new object, and add the aliased name to that. Then in the few places that
player actually interacts with the object, use that name (ie, display code,
pickup/drop/apply).
That is certainly less likely to reveal obscure bugs that depend on name. It
will probably also involve fewer changes in the code.
>
> [to unsubscribe etc., send mail to crossfire-request@ifi.uio.no]
>-- End of excerpt from Rauli Ruohonen
--
-- Mark Wedel
mark@pyramid.com
[to unsubscribe etc., send mail to crossfire-request@ifi.uio.no]
Follow-Ups:
References: