Re: [crossfire] Player file corruption

2006-12-26 Thread Nicolas Weeger (Laposte)
Hello.

Attached is a Python script that will reset spell's last_eat / last_gr / 
last_sp for players when they connect. Value is archetype's one.
Logfile is created, named fix_spells_1569017.log, in datafiles directory. Also 
avoids resetting 2 times.

Just put the .py file in the python/events/login subdirectory of the maps 
directory.

Note that I did *not* check whether there were maps with customized spells 
modifying those values. IMO there shouldn't be, but you can never be sure :)


Disclaimer: this script shouldn't mess with players, but since we never know 
make sure you got backups :)

Nicolas


fix_spells_1569017.py
Description: application/python
___
crossfire mailing list
crossfire@metalforge.org
http://mailman.metalforge.org/mailman/listinfo/crossfire


Re: [crossfire] Player file corruption

2006-12-26 Thread Nicolas Weeger (Laposte)
I just changed Archetype.Clone from a method to a property (for coherence), so 
attached is an updated script that'll work if you updated your server before 
running it :)

Nicolas

Le Mardi 26 Décembre 2006 18:35, Nicolas Weeger (Laposte) a écrit :
 Hello.

 Attached is a Python script that will reset spell's last_eat / last_gr /
 last_sp for players when they connect. Value is archetype's one.
 Logfile is created, named fix_spells_1569017.log, in datafiles directory.
 Also avoids resetting 2 times.

 Just put the .py file in the python/events/login subdirectory of the maps
 directory.

 Note that I did *not* check whether there were maps with customized spells
 modifying those values. IMO there shouldn't be, but you can never be sure
 :)


 Disclaimer: this script shouldn't mess with players, but since we never
 know make sure you got backups :)

 Nicolas


fix_spells_1569017.py
Description: application/python
___
crossfire mailing list
crossfire@metalforge.org
http://mailman.metalforge.org/mailman/listinfo/crossfire


Re: [crossfire] Code Doxygenification

2006-12-26 Thread Mark Wedel

  I think that the proposed changes are fine.

  Updating the functions as they are changed or other nearby functions are 
changed works, but the end result is that it means it can take a very long time 
for all the functions to be documented.

  And if the goal/hope is to have some coherent documentation available, 
getting 
it done sooner vs later is probably good.

  We can sort of look at the other various code cleanups going on - fixing 
indentation has been going on for quite a while, and still not done.  Some 
functions really are not changing much (the arch.c file gets occasional new 
function added, but I don't think some of the functions in there have been 
modified for years), so it could be a very long wait for change to happen.

  OTOH, doing this cleanup or indentation fixes is something that can be done 
in 
small doses.  I know that for myself, if I only have 30 minutes to spend, I may 
not going on a coding project, knowing I will be unable to finish it in that 
time.  However, I could certainly document several functions in that time 
period, etc.

  Also, do we have any plans for putting this doxygenification online anyplace? 
  I imagine this could be done automatically (have a cron job that generates 
the 
documents and then upload them to some server nightly or something).  One nice 
thing about doing something like that is that then the results are more visible

___
crossfire mailing list
crossfire@metalforge.org
http://mailman.metalforge.org/mailman/listinfo/crossfire


Re: [crossfire] Code Doxygenification

2006-12-26 Thread Alex Schultz
Mark Wedel wrote:
   OTOH, doing this cleanup or indentation fixes is something that can be done 
 in 
 small doses.  I know that for myself, if I only have 30 minutes to spend, I 
 may 
 not going on a coding project, knowing I will be unable to finish it in that 
 time.  However, I could certainly document several functions in that time 
 period, etc.
   
This sort of thing is part of the reason I was thinking about
doxygenification myself, as I was finding I had numerous short periods
of time that I wouldn't be able to get code done it but could do a
little documentation or something in. :-)

   Also, do we have any plans for putting this doxygenification online 
 anyplace? 
   I imagine this could be done automatically (have a cron job that generates 
 the 
 documents and then upload them to some server nightly or something).  One 
 nice 
 thing about doing something like that is that then the results are more 
 visible
Agreed. One thing we should perhaps check is if the terms of use for the
sf.net compile farm/shell server allows us to run doxygen on it, not
really sure it would but it would be nice if we could.
If nobody else is able to, I could run a nightly cron job (which won't
run unless the doxygen config or a code file changes in the 24 hour
period) for it around 10:00 UTC or so, however I wouldn't be able to
host it myself so I would need to upload it somewhere else.
Anyone have any suggestions for options for this?


Alex Schultz

___
crossfire mailing list
crossfire@metalforge.org
http://mailman.metalforge.org/mailman/listinfo/crossfire