[crossfire] Container dropping behaviour

Mark Wedel mwedel at sonic.net
Thu Sep 30 01:18:39 CDT 2010


On 09/29/10 09:38 AM, Nicolas Weeger wrote:
>>    I don't think any protocol changes would really be needed here - whild
>> not most efficient, on the issue of an empty command, the client could
>> just do something like:
>>
>>    for object in sack
>>      C->S move 0 object_tag 0
>>     done
>>
>>    That isn't totally efficient, but for the number of objects typically in
>> a container, still isn't very data.
>
> *cough*
> You never had any container with some hundred of items? :)

  Yes, but each of those commands is 8 or 10 bytes or something?  So 200 items 
is 2K of data?  Still not huge.

>
> Also, the client does not necessarily know what is a container, or even if
> something is a container.

  Yes and no.  Once the container has been opened, the client does know, because 
it gets an inventory of that container, because the location objects for it will 
have that container.


>
>
>
>>    I guess I'm more in favor of having the client do this type of work
>> instead of the server - arguably, the drop command itself should get
>> removed from the server, and the client do that processing.
>
> Actually 'drop' is nice for players because you can restrict what to drop.
> 'empty' too.

  Nothing really prevents that if that is handled in the client - the client has 
pretty much all the information that the player should know that the server has 
- magic, cursed, name, etc.  So the client could easily implement a 'drop sword' 
and do appropriate name matching.

  In some ways this is better, because in theory, the client should not get 
information it does not know.  I know there have been bugs in the past where 
pickup/drop was using information that the player (client) does not know - if 
these are client side, you remove some of that - as long as the enforcement is 
proper at the protocol level, the client can't do anything it shouldn't do.

> So I'd rather make them coherent - drop drops the container, empty empties it.
> And same thing through eg mouse, with right-click and ctrl-right-click maybe.

  I'm more in favor of re-doing all the mouse operations.

  singe left click = select (by itself, may not mean much)
  double click == apply (mor standard behavior)
  right click = bring up context menu of item actions (drop, lock, examine, etc)

  Now one could allow other mousebindings as shortcuts, but I think right now 
some of the control/shift/left click vs right click vs whatever is really not a 
simple solution.

  I'm also thinking that at least for the gtk client, have a window like the 
spell or other windows that can be brought up that provides much more detailed 
(and easier to control actions) for objects could be nice - if I'm in the shop, 
I don't really care about the map that much and care much more objects objects 
in my inventory and being able to more easily see all relevant information would 
be nice.

>
>
> Nicolas
>
>
>
> _______________________________________________
> crossfire mailing list
> crossfire at metalforge.org
> http://mailman.metalforge.org/mailman/listinfo/crossfire




More information about the crossfire mailing list