On Thu, 12 Oct 2023 at 02:59, James Paige <b...@hamsterrepublic.com> wrote:
> A command to append extra arrays sounds great. > > The argument to append the path also affects whether or not the extra > array is erased beforehand. > Yes, without that arg you would need a second temporary array (slice). Hamster speak would really benefit from some kind of python-style keyword > argument support, which would make lots of optional arguments less painful > Yes, I would love that! Luckily we still have = available for that purpose. Well, I guess that's a suitable alternative solution. > I was also thinking about adding script commands to wrap inserting to > extra, and deleting a slice from extra. I know those can be slow because > they are doing a memcopy, but that could be mentioned in the docs, and it > is still way better than doing the same operation by moving elements in a > for loop > Definitely. > > On Wed, Oct 11, 2023, 9:30 AM Ralph Versteegen via Ohrrpgce < > ohrrpgce@lists.motherhamster.org> wrote: > >> A very useful command that's been sorely lacking! >> The number of arguments is really unfortunate though, and it seems likely >> that we'd want to add even more in future! I wanted to add a command to >> concatenate one array of extras onto another. If we add such a command >> (even reusing some of the code you wrote) then the 'append' and 'skip >> first' args would be redundant and could be removed. While having to use a >> separate command to get the same effect is more work it's also more >> readable. >> >> On Tue, 10 Oct 2023 at 09:27, subversion--- via Ohrrpgce < >> ohrrpgce@lists.motherhamster.org> wrote: >> >>> james >>> 2023-10-09 13:27:36 -0700 (Mon, 09 Oct 2023) >>> 113 >>> Add argument to "pathfind into extra as npc/hero" to optionally exclude >>> the first (starting) position in the path >>> --- >>> U wip/plotscr.hsd >>> U wip/scriptcommands.bas >>> >>> _______________________________________________ >>> Ohrrpgce mailing list >>> ohrrpgce@lists.motherhamster.org >>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org >>> >> _______________________________________________ >> Ohrrpgce mailing list >> ohrrpgce@lists.motherhamster.org >> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org >> >
_______________________________________________ Ohrrpgce mailing list ohrrpgce@lists.motherhamster.org http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org