[Ohrrpgce] SVN: james/8784 Begin cleanup of hero position. Remove catx() caty() catz() catd() array
Bob at hamsterrepublic.com
Wed May 31 06:09:32 PDT 2017
I'll check out properties. Do they need to be on a TYPE? It can they exist
in the global scope?
On Wednesday, May 31, 2017, Ralph Versteegen <teeemcee at gmail.com> wrote:
> (Changing herocount() is the first step of raising the reserve party limit)
> "count" is clear, but I find "size" a bit ambiguous. If I change the name,
> I might rename some of the other new functions like active_party_size and
> is_active_party_slot too is I can figure out something consistent.
> I frequently find when I search for something (often FB related), that if
> I've mentioned it on this mailinglist, then Google shows my own post
> near/at the top of the results. I don't know what their actual rank is;
> Google results are very personalised... well, it works! It's funny that
> gmail search is not so useful, I have to search the whole web to find the
> email I want :)
> As an alternative to returning byref, you might be interested in
> properties too. They are syntactic sugar for getters/setters, like
> @property in python. Properties are very similar to byref-return functions,
> except that you can't pass any extra arguments to them, you need to write
> the getter and setter separately, and their setters can be much more
> For example, I'd like to turn the x/y/z members of NPCInst into properties
> which return/set the position of its walkabout slice, so that you can move
> an NPC slice, without us having to update any other code. And obviously the
> same for heroes too, although I see now that will be more complicated.
> (Obviously, with both NPCs & heroes there are complications to work
> through, since the slice may not exist)
> On 1 June 2017 at 00:05, James Paige <Bob at hamsterrepublic.com
>> That doesn't look like it will conflict with what I am working on.
>> I probably would have named active_hero_count()
>> count_of_heroes_in_active_party() which is silly long :)
>> Hopefully I'll have the patch that replaces most direct access of cats()
>> with wrapper functions ready later today
>> By the way, I love functions that return byref!
>> I went googling for the correct syntax for disambiguating assignment to a
>> byref return value from comparison, and the test-cases you wrote for byref
>> functions was ranked higher than the actual docs :)
>> On Wednesday, May 31, 2017, Ralph Versteegen <teeemcee at gmail.com
>>> On 31 May 2017 at 09:20, <subversion at hamsterrepublic.com> wrote:
>>>> 2017-05-30 14:20:42 -0700 (Tue, 30 May 2017)
>>>> Begin cleanup of hero position. Remove catx() caty() catz() catd()
>>>> arrays and replace them with cats() array of type CaterpillarHistory
>>>> (More cleanup to follow)
>>>> U wip/game.bas
>>>> U wip/game_udts.bi
>>>> U wip/gglobals.bi
>>>> U wip/moresubs.rbas
>>>> U wip/savegame.rbas
>>>> U wip/scriptcommands.bas
>>>> U wip/walkabouts.bas
>>>> U wip/walkabouts.bi
>>>> U wip/yetmore2.bas
>>> I was going to say that any "fix" to the caterpillar hero speed problem
>>> would be largely a rewrite, but you really are doing it!
>>> I was concerned that this might clash with my herocount() work, but so
>>> far it's fine, and probably the rest of the change won't conflict either.
>>> I'll try to commit that soon (turns out there are various unrelated
>>> (The main reason I didn't finish was that I didn't like the name
>> Ohrrpgce mailing list
>> ohrrpgce at lists.motherhamster.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ohrrpgce