Utilitarian backdrops, plural v. singular

My game has a big house. Some windows have an important view and so they get a mention in the room description to tip the player that they should be examined. Some rooms have opposing windows with different views and some rooms have only one window with one view. I had written the below code to deal with the rooms that contain multiple windows. I created them as a backdrop since multiple rooms share the same view.

A window is a kind of backdrop. Understand "window" or "windows" as a window. Understand "examine windows" as a mistake ("[italic type]There are many windows here. Please be more specific with a command containing a cardinal direction such as, 'examine eastern windows'.[roman type]").

I’ve now reached a room in my writing that only has one window and when you “x window” it gives that mistake message. It’s not the end of the world to require the window’s adjective when examining that solo window, but ideally in a room with only one of these backdrops, that would not be necessary.

I’m not sure how to make that work in the code. I guess I could drop the whole backdrop idea and just individually program each window, and not worry about a shareable description across all windows, but I’d rather refrain from even more code. Any advice?

You can create a default text for kinds with “usually”.

Study is a room.

A window is a kind of thing. A window can be scenery. A window has a text called view. The view of a window is usually "You can see outside, but there's nothing unusual visible through the window."

Instead of examining or searching a window:
	say "[view of the noun][line break]".
	
Understand "look out [something]" as searching.

The garden window is a window in Study. The view of garden window is "So that's where the Labyrinth is, outside the garden window!"

A nondescript window is a window in Study. It is scenery.
1 Like

You don’t need to say that, since any thing can already be scenery. It only needs mention if you want to say that a window is usually scenery.

1 Like

I can never remember what the defaults are when I use I7, so I probably have a good deal of redundant statements in my code. Luckily it doesn’t seem to punish me for that.

1 Like

Index -> Kinds will tell you what the defaults for everything are. :grin:

You can make the “mistake” statement conditional: Just add when the player is not enclosed by Single-Window-Room or whatever will effectively exclude that situation.

1 Like