Look around

I have some very fun stuff going on (at least i think it’s very fun and it’s exciting and all that) but there’s a lot and i don’t want people to be all wonk.

so i have two things planned.

  • the LOOK AROUND command
  • the (START/STOP) LOOKING AROUND toggle command

First, the LOOK AROUND.
this command will list “there is [room name] to the [direction]” for all accessible rooms in whichever direction they are.

secondly, based on the similar concept, LOOKING AROUND.
if you input “looking around” it will toggle on or off, depending on the state it was before you inputted the command.
(optional: you can force it on (even if it was already on) with “start looking around” and force it off with “stop looking around”. )
this will automatically, after looking (and thus after moving to a new room) list all the accessible rooms from that spot and the direction you have to go to get there.

why?

… because I don’t want you guys to have to play my next game (if i actually finish it) with a road map, a compass and a snack pack (in case you get lost and there’s nobody around to ask for directions)

[size=85][code]Understand “look [direction]” as facing.

Facing is an action applying to one visible thing.

Carry out facing:
let the viewed item be the room noun from the location;
if the viewed item is not a room, say “You can’t see anything promising that way.” instead;
try looking toward the viewed item.

Understand “look toward [any adjacent room]” as looking toward. Understand “examine [any adjacent room]” and “look at [any adjacent room]” as looking toward.

Looking toward is an action applying to one visible thing.

Carry out looking toward:
let heading be the best route from the location to the noun, using even locked doors;
say “[The noun] is to the [heading].”;

After examining yourself:
if the player is wearing anything:
say “You’re wearing [the list of things worn by the player].”;

Definition: a direction (called thataway) is viable if the room thataway from the location is a room.

Instead of going nowhere:
let count of exits be the number of viable directions;
if the count of exits is 0, say “You appear to be trapped in here.”;
if the count of exits is 1, say “From here, the only way out is [list of viable directions].”;
otherwise say “From here, you can go [list of viable directions].”;

Table of Fancy Status
left central right
" [locationtext in title case]" “” “score: [score]”
" [goingplaces]" “” “”

to say goingplaces:
let count of exits be the number of viable directions;
if the count of exits is 0, say “You appear to be trapped in here.”;
if the count of exits is 1, say “From here, the only way out is [list of viable directions].”;
otherwise say “From here, you can go [list of viable directions].”;

locationtext is text that varies.

Rule for constructing the status line:
now locationtext is “[location]”;
fill status bar with Table of Fancy Status;
rule succeeds.

A thing can be examined or unexamined.

After taking something unexamined:
say “You take [the noun]. [run paragraph on]”;
try examining the noun.

Carry out examining something:
now the noun is examined.

Taking inventory is acting confused. Looking is acting confused. Examining an examined thing is acting confused.

After acting confused for the sixth turn:
say “(If you are feeling lost, you could try the HELP command.)”;

Understand “help” as a mistake (“You’re doing fine! Just keep at what you’re doing now.”).

understand “look behind [something]” and “look under [something]” as searching.

Before searching something:
say “You thoroughly inspect [the noun] … [run paragraph on]”;
if the noun is a container:
if the noun is closed:
try silently opening the noun;
if the noun is open:
say “of course you start by opening [the noun]. [run paragraph on]”;
otherwise:
stop the action;[/code][/size]Okay this is the stuff that works. I have no idea how to do the things in the top post aside from starting with “after looking:”
suggestions are welcome

Step one, new action.

Listing directions is an action applying to nothing. Understand "look around" or "directions" as listing directions.

Step two, viable targets.

Liminality relates a door (called the portal) to a room (called the place) when the front side of the portal is the place or the back side of the portal is the place. The verb to be liminal to means the liminality relation. Definition: a room (called the place) is one-door-away if a door liminal to the location is liminal to the place and the place is not the location. Definition: a room is nearby if it is adjacent or it is one-door-away.

Step three, listing.

[code]To say the connection listing for (the place - a room):
let the way be the best route from the location to the place, using even locked doors;
say “[way] to [the place]”.

Carry out listing directions:
if there is a nearby room:
say “From here you can go:”;
repeat with the place running through nearby rooms:
say “[line break] - [connection listing of the place]”;
say paragraph break;
otherwise:
say “You seem to be trapped.”[/code]

Step four, repeating.

Include Boolean Variables by Daniel Stelzer. Dir-listing is an inactive boolean option. After looking when dir-listing is active: try listing directions.

Daniel, thanks for your time and effort and hard work. I’m sure this will come in handy.

I’m on a new computer right now. A lot (but thankfully not all) of what I had on my old computer (which died spectacularly and is now probably in Sovngarde) has been lost and I’ve yet to dig through what is salvageable.

Even in the best case I don’t know when I can use any of this. ^^; But I totes appreciate it, bruh.