[crossfire] Extending apply commands

Kevin Rudat krudat at iinet.net.au
Sat Apr 30 03:22:06 CDT 2005


<KER-SNIP>

Thanks for your replies so far, Mark and Preston. :)

Hmm. So that's:

Submit a patch adding client_type to apply-able things without client_type. 
----------------------------------------------------------------------------

   It'd also put this extra bit in doc/Developers/objects:

     25000-25999 Non-inventory items that can be applied.
     25001       Magic portals (66)
     25002       Exits, doors, buildings (66)
     25011       Ordinary signs (98)
     25012       Shop menu (150)
     25021       Postbox 
     25031       Slot machines
     25032       Trigger (27), levers (93)
     25091       Bed to reality (106)

   (I tweaked the server to find such archetypes. ... cheeseburger. :) )

Implement apply_below and item-type-specific commands as a client-script.
--------------------------------------------------------------------------

  Particularly, as Mark mentioned, automatically apply the 'scrolling items' 
  when searching the floor.  


Mental note: look up what apply_below was supposed to do before thinking
about implementing it. (The item-verbs come from Adam Ashenfelter, but I
can't remember who suggest an apply_below.)

If apply_below sticks to what's on the floor,

 apply_below with no argument is equivalent to apply with no argument,

 so it's only interesting *with* an argument,

so searching through items by name is important.

Also, Adam's 'sleep', which took no arguments, can just scroll through the
50-item groups until it finds a client_type 25901.  'eat' with an argument
needs to check names.

Client-side item name matching
-------------------------------
   
Looking at the code of common/arch.c::item_matched_string(), I'm not sure
the client can imitate it completely with the available information.

The flags are easy, and the client can guess at op->name by chopping at
the first 'of' or '(', and knowing material names (and not to take away
mithril from mithril chainmail). 

However, if an item has been given a custom name, the client doesn't get
the ordinary information; esrv_draw_look() and friends send only the
custom_name.

... If I propose a protocol extension to send finer-grained item names, 
should I also add a persistent client-set object tag? ;) [1]

Thanks for your time, and any critiquing
  -- Kevin

[1] 
     
     http://shadowknight.real-time.com/pipermail/crossfire/2004-September/002743.html
     
     
Last quote-comment pair.

    
    


More information about the crossfire mailing list