[Ohrrpgce] SVN: james/8911 Add mouse.hero_move node to general.reld

Ralph Versteegen teeemcee at gmail.com
Fri Jun 30 20:47:50 PDT 2017


Yes, it's too bad that we haven't been really been using NodeByPath; I
agree it's the way to go. If we were in a Python mindset, we would be using
it nearly exclusively.
Actually, we should add some convenience methods for getting and setting by
path, so that we can write:
  get_general_reld->create("/foo/bar/qux").set("none")
(two methods, 'find' and 'create' differing in whether they create or not),
or as a property:
  get_general_reld->create("/foo/bar/qux").str = "none"
And creating an integer is even easier:
  get_general_reld->create("/foo/bar[2]/qux[42]")
get_general_reld() could also be shortened to general_reld.

On 1 July 2017 at 02:38, James Paige <Bob at hamsterrepublic.com> wrote:

> Now that I look at the code again, what I think I really need to do is
> make some wrappers for getting and setting nodes from general.reld using
> NodeByPath syntax. That will probably be the least work in the long run.
>
> On Thu, Jun 29, 2017 at 7:34 PM, James Paige <Bob at hamsterrepublic.com>
> wrote:
>
>> Ah, thank you! I keep forgetting about reloadbasic features. For some
>> reason I find GetChildNodeInt easy to remember.
>>
>> I ought to put comments in reload.bi showing reloadbasic equivalents to
>> those commands
>>
>>
>> On Thursday, June 29, 2017, Ralph Versteegen <teeemcee at gmail.com> wrote:
>>
>>>
>>>
>>> On 30 June 2017 at 08:59, <subversion at hamsterrepublic.com> wrote:
>>>
>>>> james
>>>> 2017-06-29 13:59:27 -0700 (Thu, 29 Jun 2017)
>>>> 187
>>>> Add mouse.hero_move node to general.reld
>>>> It can be toggled on and off in a hidden "Mouse Options" menu in the
>>>> "spam" menu,
>>>> or from the F8 debug menu.
>>>> It does not actually DO anything yet
>>>> ---
>>>> U   wip/common.bi
>>>> U   wip/common.rbas
>>>> U   wip/custom.bas
>>>> U   wip/customsubs.bi
>>>> U   wip/customsubs.rbas
>>>> U   wip/game.bas
>>>> _______________________________________________
>>>> Ohrrpgce mailing list
>>>> ohrrpgce at lists.motherhamster.org
>>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>
>>>
>>> IIF(GetChildNodeInt(mousenode, "move_hero", 0) <> 0, YES, NO)
>>> is equivalent to
>>> mousenode."move_hero".bool
>>> And for that matter, the IIF does nothing, because relational operators
>>> return 0 or -1
>>>
>>
>
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20170701/1335feae/attachment.htm>


More information about the Ohrrpgce mailing list