cleaning is an action applying to things?

I’m trying to make a new action of “cleaning” but if I say “clean” it requires a noun. How do I define the current room as a noun? Or is there a better way to do this?

Understand “clean [a room]” as cleaning. Understand “clean” as cleaning.
Rule for supplying a missing noun while cleaning: now the noun is the location.

I actually got this to work:
Cleaning is an action applying to nothing. Understand “clean” as cleaning. Then instead of cleaning:
Say “hahaha. Good one.” New problem, how to jump over a balcony that also functions as a door…will post as seperate topic…

The standard rules define “clean [something]” as rubbing. This definition will remain unless you start off with

Understand the command “clean” as something new.

Hmm. I like yalls solution better than mine but I get the error "you wrote "understand “clean [a room]” as cleaning. But understand as…should be followed by a meaning.
I would copy and paste but I don’t have internet on my laptop so I’m on this forum on my phone.
Edit: I got it to compile but now when I type “clean bedroom” it says “you can’t see any such thing”. I think it doesn’t recognize the location as a thing.

Sorry, my mistake. It should be “rubbing” instead of “cleaning” (replace it in all three instances).

Typing clean on its own works great but saying clean bathroom says you can’t see any such thing. Weird.

By default the player can’t interact with rooms (rooms are not “in scope”). You can change that, though, as needed:

After deciding the scope of the player while rubbing: place the location in scope.

Isn’t the location always in scope (which is why changing the noun to the location doesn’t fail the visibility checks)?

The location is never in scope (by default).

Changing the noun (as is done in the “ambient odour rule”, for example) works because the parser is already past visibility checking at that stage.

It is simpler to define a “bathroom” scenery object and place it in the bathroom. This lets you avoid all the futzing around with scope. It also avoids the weird situation where “clean bathroom” works but “x bathroom” generates a “can’t see any such thing” error.