[SOLVED] How can we make TAKE ALL include scenery but not objects flagged "not_all"?

Hello.

Yeah...

I want TAKE ALL to have scenery in scope.

I found the bit of code in ResolveNextName, but when I get rid of the part that filters by the attribute "scenery", it only returns scenery and nothing else.

scope = FilterByAttribute(GetScope("object", "", "object"), "scenery", false)

When I change that to: scope = GetScope("object", "", "object"), I only end up trying to take scenery with GET ALL.

What am I missing? How am I ignorant?

scope = GetScope("object", "", "object") is everything in the room. I don't understand how this is working...


          if (GetBoolean(game.pov.currentcommandpattern, "allow_all")) {
            scope = FilterByAttribute(GetScope("object", "", "object"), "scenery", false)
            game.pov.currentcommandpendingobjectscope = ListExclude(scope, FilterByAttribute(scope, "not_all", true))
            game.pov.currentcommandpendingvariable = var
            ResolveNameList (value, "object")
            resolvinglist = true
          }

Never mind.

I knew I was missing something.

I had another function doing things which I was blaming on this code.

This includes scenery but not "not_all":

          if (GetBoolean(game.pov.currentcommandpattern, "allow_all")) {
            scope = (GetScope("object", "", "object")
            game.pov.currentcommandpendingobjectscope = ListExclude(scope, FilterByAttribute(scope, "not_all", true))
            game.pov.currentcommandpendingvariable = var
            ResolveNameList (value, "object")
            resolvinglist = true
          }

...that's bad practice, though. Don't do that. ^^^

If I want something which can be taken to be scenery (so I can describe it in the room description, if applicable -- or give it an in-room description) but still be included as part of ALL, I give that object an all_ok boolean attribute set to true.

Here's my modified bit of code from ResolveNextName:

          if (GetBoolean(game.pov.currentcommandpattern, "allow_all")) {
            scope = FilterByAttribute(GetScope("object", "", "object"), "scenery", false)
            allok = FilterByAttribute(FilterByAttribute(GetScope("object", "", "object"), "scenery", true), "all_ok", true)
            newlist = ListCombine (scope, allok)
            game.pov.currentcommandpendingobjectscope = ListExclude(newlist, FilterByAttribute(scope, "not_all", true))
            game.pov.currentcommandpendingvariable = var
            ResolveNameList (value, "object")
            resolvinglist = true
          }

EDIT

Now, what have I overlooked (if anything)?


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums