[CF-Devel] Ingame map 'building' / modification: full patch

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Tue Nov 11 00:53:38 CST 2003


  Some general notes:

  Consider using marked objects when determining what 'raw' item to use. 
Otherwise, if the player has multiple raw items of a type (lets suppose 
different styles), there is no way for the player to specify which to use, other 
than to drop the other types.  Using marked objects fix that problem.

  I'm thinking that specific images for the builder types should be used - the 
images selected would seem a bit odd.

  seems to be a bit of redundant code to check to see if the direction is 
buildable - perhaps reduce that redundancy into one function like 
'check_buildability(....)?  That would seem to be useful if additional buildable 
options is added.

  Some notes more stylistically and not functional:

Remember that the error messages are things that players see, so instead of 
saying things like "Invalid map or weird square?!?", just saying something like 
'you can't build there'.

  In terms of block comments, please do:

/*
  * this is
  * a block comment
  */

  instead of
/*
    some block
    comment
  */

  Also, in terms of comparisons in if statements, have the variable first, and 
constant second if that is what the compare is against, eg, instead of

if (4 == a)

  do

if (a == 4)

  This includes comparisons against constants, eg

  if (op->type == WALL)

  not not WALL == op->type



_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list