public inbox for xconq7@sourceware.org
 help / color / mirror / Atom feed
* Material extraction no longer works?
@ 2003-12-06 13:35 Lincoln Peters
  2003-12-06 17:39 ` Hans Ronne
  0 siblings, 1 reply; 2+ messages in thread
From: Lincoln Peters @ 2003-12-06 13:35 UTC (permalink / raw)
  To: Xconq list

I was just working on a new module (actually a test module), and noticed
that the code for extracting materials from independent units no longer
seems to work.  In ancient-days.g, for example, if I select a villager,
then click on an adjacent unit that produces some material (e.g. a berry
bush), nothing happens.  Until recently, the selected unit would extract
whatever materials it could from the unit I clicked on, then would
unload them at the nearest supply point (in ancient-days.g, a village).

bolodd2.g also uses the extraction code, but only when the centipede (a
level 5 unit) collects scrap metal from wrecks.  Since that game tends
to run a while before reaching that level, I have not yet been able to
see if it still works there.


Could this have something to do with the recent changes to the supply
code?


Lincoln Peters <sampln@sbcglobal.net>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Material extraction no longer works?
  2003-12-06 13:35 Material extraction no longer works? Lincoln Peters
@ 2003-12-06 17:39 ` Hans Ronne
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Ronne @ 2003-12-06 17:39 UTC (permalink / raw)
  To: Lincoln Peters; +Cc: xconq7

>I was just working on a new module (actually a test module), and noticed
>that the code for extracting materials from independent units no longer
>seems to work.  In ancient-days.g, for example, if I select a villager,
>then click on an adjacent unit that produces some material (e.g. a berry
>bush), nothing happens.  Until recently, the selected unit would extract
>whatever materials it could from the unit I clicked on, then would
>unload them at the nearest supply point (in ancient-days.g, a village).
>
>bolodd2.g also uses the extraction code, but only when the centipede (a
>level 5 unit) collects scrap metal from wrecks.  Since that game tends
>to run a while before reaching that level, I have not yet been able to
>see if it still works there.
>
>
>Could this have something to do with the recent changes to the supply
>code?

Indeed. This is something I did on purpose. From check_extract_action:

    /* Then look for extraction from independent unit provided that there
    is no independent side that owns these units. This breaks the one game
    that uses explicit extraction, ancient-days, but prevents the absurd
    case where a unit is using units belonging to another side (indepside)
    to resupply itself. Possible fix for ancient-days: let berry bushes etc.
    be independent, set no-indepside-ingame to true, and let live animals
    belong to a third side. */
    if (g_no_indepside_ingame()) {
	    for_all_stack(x, y, stack_unit) {
		if (in_play(stack_unit)
		    && indep(stack_unit)
		    && stack_unit->supply[m] > 0) {
    			found += stack_unit->supply[m];
		}
	    }
    }

Perhaps you could try the solution I had in mind for the ancient-days game,
i.e. to let your berry bushes (or whatever) be independent, set
no-indepside-ingame to true, and let a third side run other independent
units, if necessary.

Hans


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-12-06 13:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-06 13:35 Material extraction no longer works? Lincoln Peters
2003-12-06 17:39 ` Hans Ronne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).