public inbox for xconq7@sourceware.org
 help / color / mirror / Atom feed
From: Hans Ronne <hronne@comhem.se>
To: Lincoln Peters <sampln@sbcglobal.net>
Cc: xconq7@sources.redhat.com
Subject: Re: Material extraction no longer works?
Date: Sat, 06 Dec 2003 17:39:00 -0000	[thread overview]
Message-ID: <l03130300bbf78ab07397@[212.181.162.155]> (raw)
In-Reply-To: <1070686611.21645.58.camel@odysseus>

>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


      reply	other threads:[~2003-12-06 13:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-06 13:35 Lincoln Peters
2003-12-06 17:39 ` Hans Ronne [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='l03130300bbf78ab07397@[212.181.162.155]' \
    --to=hronne@comhem.se \
    --cc=sampln@sbcglobal.net \
    --cc=xconq7@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).