Skip to Content.
Sympa Menu

sm-discuss - [SM-Discuss] libstate changes

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Andrew <afrayedknot AT thefrayedknot.armory.com>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: [SM-Discuss] libstate changes
  • Date: Thu, 13 May 2004 12:15:52 -0700

Currently in libstate we have a number of functions for interacting with
the /var/state/sorcery/depends file (DEPENDS_STATUS). Unfortunatly all
these functions have hardcoded the use of DEPENDS_STATUS.

Why do I care? Im trying to make it so that when you cast a bunch of
spells, the depends file doesn't get updated until /after/ the spell
successfully casts. Currently what happens is whenever you answer a
depends question, it adjust the file regardless of whether or not you
even go through with casting the spell, or if the spell succeeds, this can
the be the cause of a lot of lint and other strangeness with this file.

So what I need to do is store all the answers in a temporary file, then after
the spell succeeds update depends. Uncommited answers can be kept in some
special place so if a cast fails the same options can be preserved (etc. etc.)

But all this boils down to being able to work with arbitrary files rather
than DEPENDS_STATUS.

Theres a couple of ways I can do this:
1) modify every function to have an extra argument somewhere, then fix
all the callers to do the right thing.
2) like 1 but rename the functions, and keep the existing functions as
wrappers that use DEPENDS_STATUS
3) change the value of DEPENDS_STATUS before calling the function

Comments? Ideas?

-Andrew

--
__________________________________________________________________________
|Andrew D. Stitt | astitt at sourcemage.org |
|irc: afrayedknot | afrayedknot at t.armory.com |
|aim: thefrayedknot or iteratorplusplus | |
|Sorcery Team Lead, Porting Team Lead | |
|Grimoire Guru ham/smgl | ftp://t.armory.com |
|Author and Maintainer of Prometheus | |
--------------------------------------------------------------------------




Archive powered by MHonArc 2.6.24.

Top of Page