[crossfire] Extending apply commands
Kevin Rudat
krudat at iinet.net.au
Thu Apr 28 18:06:07 CDT 2005
Some old discussions suggest
* moving the apply command (text-command, not
protocol-command) to the client,
* adding an apply_below to search only the floor,
* adding some more verbs, e.g. 'eat' to search only food.
Questions:
* Did someone write an apply_below already?
* What if I wrote a patch for adding client_types for a number of
applyable things that don't have one?
Moving these things to the client:
* Does anyone know why (who decided) when you've got a lot of things on the floor,
you can only see fifty of them?
Makes it impossible to search the entire floor (not important enough to
worry about? Have any script authors run into this?)
(The limits are implemented in socket/item.c::esrv_draw_look();
scrolling's in socket/item.c::ApplyCmd().)
* common/arch.c::item_matched_string checks against a number of things that
aren't sent to the client (in the same way that the client doesn't get a
shop inventory, just a bunch of lines).
Strings to be sent:
* material, where applicable (#ifdef NEW_MATERIAL_CODE, possibly)
* op->name, op->name_pl,
* the flags, title, level, et cetera generated by query_*_name()
* The '* (open)' status string added by query_name()
(The client can generate this for itself, though.)
* op->custom_name.
Alternately, not moving these things to the client:
* I haven't thought this through completely, but what about a very general apply
protocol command:
apply_specific <environments><tag><tag2>...
<client types><type><type2>...
<search string>
player types apply: apply_specific 1 <floor> 0 ''
player types apply foo: apply_specific 1 <player> 0 'foo'
apply_below foo: apply_specific 1 <floor> 0 'foo'
sleep: apply_specific 1 <floor> 1 <savebed> ''
drink power: apply_specific 1 <player> 2 <drink> <potion> 'power'
More information about the crossfire
mailing list