Life of A Librarian - The Next CoD

This is a game called Life of a Librarian, the first game I have submitted to the IFA. This is supposed to be the next Cloak of Darkness, hosted right here on the forums! All critique welcome.

Current Status:
The Inform 7 version: In beta stage, will soon be in if-archive/unproccessed/librarianinform7, and then later at if-archive/games/z-code. Gamename stays same.
The TADS version: Currently W.I.P.

More on the game:
You are a librarian in the library. You need to take the fiction book from the bookdrop, and scan it (scan book or put it in the scanner), then you need to put in the fiction shelf.

Inform7
Description: Inform 7 is basically the Zeus of programming. Inform7 is recommended (by the community) for new IFers, because of it’s large support and ease of learning. I’ll let you decide through.[/b]
Source:

[spoiler]“Life of A Librarian” by Timewalker

The Library is a room. “A dimly lighted room, with books lying all over the floor. It has very few people around. There is the sound of another librarian hushing up the kids, many page turnings, and the occasional chair scrapings. The carpet under you is just as silent as this place - a recently-cleaned for that too. The shelves are grouped into many categories: Fiction, Non-Fiction, Adventure, Sci-Fiction, Mystery, Thriller, Adult, Romance and Comics.”

The maximum score is 5.

Some books are scenery in the Library.

Some shelves are scenery in the Library. The shelves are containers.The description of the shelves is “Many wooden ‘shelves’, grouped into Fiction, Nonfiction, Adventure, Sci-Fiction, Mystery, Thriller, Adult, Romance and Comics. There are three levels in every shelf: and since you are a good librarian, each shelf is listed from smallest to largest.”

A thing can be scanned or unscanned. A thing is usually unscanned.

Scanning is an action applying to one thing. Understand “scan [something]” as scanning.

Carry out scanning:
say “This book cannot be scanned.”

Instead of scanning the fiction book when the fiction book is scanned:
say “That’ll unscan it!”

Instead of scanning the fiction book:
say “You scan the book.”;
now the book is scanned;
award 5 points

Release along with the source text.

Understand “nonfiction shelf” as the shelves.
Understand “non-fiction shelf” as the shelves. Understand “nonfiction” as the shelves.
Understand “non-fiction” as the shelves.
Understand “adventure shelf” as the shelves.
Understand “adventure” as the shelves.
Understand “sci-fiction shelf” as the shelves.
Understand “science fiction shelf” as the shelves.
Understand “scifiction shelf” as the shelves.
Understand “science-fiction shelf” as the shelves.
Understand “sci-fic shelf” as the shelves.
Understand “science-fic shelf” as the shelves.
Understand “mystery shelf” as the shelves.
Understand “mystery” as the shelves.
Understand “thriller shelf” as the shelves.
Understand “thriller” as the shelves.
Understand “adult shelf” as the shelves.
Understand “adult” as the shelves.
Understand “romance shelf” as the shelves.
Understand “romance” as the shelves.
Understand “comics shelf” as the shelves.
Understand “comic shelf” as the shelves.
Understand “comics” and “comic” as the shelves.

The Fiction shelf is scenery in the Library. The shelf is a container. The description of the shelf is “Many wooden ‘shelves’, grouped into Fiction, Nonfiction, Adventure, Sci-Fiction, Mystery, Thriller, Adult, Romance and Comics. There are three levels in every shelf: and since you are a good librarian, each shelf is listed from smallest to largest.”

The bookdrop is a container in the library. The description of the bookdrop is “A small window like thing invented by this library. A book is dropped and it falls into the inside part of the bookdrop. Not as innovative as the auto-scan ones, but still, there is that certain feeling when your group invents something.” The bookdrop is fixed in place.

There is a fiction book in the bookdrop. The description of the fiction book is “A Tale of Two Cities is the book. It is a hardcover edition, and some pages are written on. Page 36 has also been ripped off. There should be a rule punishing these things.”

Understand “book” as the fiction book.

The scanner is a thing in the Library. The printed name of the scanner is “book scanner”. The description of the scanner is “A red device lying here. It has a voice over who says ‘This book has been issued’ or ‘This book has been returned’ in the scanner. There is also a red light that is supposed to scan the book’s ISBN.” The scanner is fixed in place.
Understand “book scanner” as the scanner.

Instead of inserting something into the scanner:
say “This book cannot be scanned.”

Instead of inserting the fiction book into the scanner:
say “You scan the book.”;
now the fiction book is scanned;
award 5 points

Instead of inserting the fiction book into the scanner when the book is scanned:
say “That’ll unscan it!”

Instead of inserting the fiction book into the shelf when the book is scanned:
say “You put the book into the fiction book. After some time you go home to lead a quiet life.”;
end the game saying “YOU WIN THE GAME!”

Instead of inserting the fiction book into the shelf when the book is unscanned:
say “You need to scan the book first.”

Instead of inserting the fiction book into the shelves:
say “Wrong shelf! Put it in the fiction shelf.”[/spoiler]

So that’s it (currently)!

I might be missing something here. Is there a request for a new Cloak of Darkness, or was this just a way to describe the simplicity of the game?

There was some discussion several months ago (https://intfiction.org/t/cloak-of-darkness-2/4586/1) but it didn’t really resolve into a single goal.

From the title I thought you meant Life of a Librarian was the next Call of Duty…

Cloak of Darkness: Black Operas. :slight_smile:

Just for the fun of it, I went for a version in ALAN3, I hope you don’t mind. It might be a bit shorter than the one in I7, but still…

(Also, I don’t seem to get the tabs work so everything starts in the left margin. )

[spoiler]-- Life Of A Librarian by Timewalker
– implemented in ALAN3 by Anssi Räisänen

IMPORT ‘library.i’. – (the ALAN Standard Library)

ADD TO EVERY OBJECT
IS NOT scanned.
END ADD TO.

SYNTAX scan = scan (obj)
WHERE obj ISA OBJECT
ELSE “That’s not something you can scan.”

ADD TO EVERY OBJECT
VERB scan
DOES “This book cannot be scanned.”
END VERB.
END ADD TO.

THE library ISA ROOM
DESCRIPTION “A dimly lighted room, with books lying all over the floor. It has very few people around. There is
the sound of another librarian hushing up the kids, many page turnings, and the occasional chair
scrapings. The carpet under you is just as silent as this place - a recently-cleaned for that too. The
shelves are grouped into many categories: Fiction, Non-Fiction, Adventure, Sci-Fiction, Mystery, Thriller,
Adult, Romance and Comics.”
END THE library.

THE books ISA SCENERY AT library
END THE books.

THE shelves ISA SCENERY AT library
IS NOT takeable.
NAME nonfiction shelf NAME nonfiction NAME adventure shelf NAME adventure NAME science fiction shelf
NAME scifiction shelf NAME science fiction NAME scifi NAME sci fic shelf NAME science fic shelf NAME mystery shelf
NAME mystery NAME thriller shelf NAME thriller NAME adult shelf NAME adult NAME romance shelf NAME romance
NAME comics shelf NAME comic shelf NAME comics NAME comic NAME shelves
CONTAINER
DESCRIPTION “”
VERB examine
DOES ONLY “Many wooden ‘shelves’, grouped into Fiction, Nonfiction, Adventure, Sci-Fiction, Mystery, Thriller, Adult,
Romance and Comics. There are three levels in every shelf: and since you are a good librarian, each shelf
is listed from smallest to largest.”
END VERB.
END THE shelves.

THE fiction_shelf ISA SCENERY AT library
NAME fiction shelf
IS NOT takeable.
CONTAINER
DESCRIPTION “”
VERB examine
DOES ONLY
“Many wooden ‘shelves’, grouped into Fiction, Nonfiction, Adventure, Sci-Fiction, Mystery, Thriller, Adult,
Romance, and Comics. There are three levels in every shelf: and since you are a good librarian, each shelf
is listed from smallest to largest.”
END VERB.
END THE fiction_shelf.

THE bookdrop ISA OBJECT AT library
CONTAINER
IS NOT takeable.
DESCRIPTION “A small window like thing invented by this library. A book is dropped and it falls into the inside part of the
bookdrop. Not as innovative as the auto-scan ones, but still, there is that certain feeling when your group
invents something.”
END THE bookdrop.

THE fiction_book ISA OBJECT IN bookdrop
NAME fiction book
DESCRIPTION “A Tale of Two Cities is the book. It is a hardcover edition, and some pages are written on. Page 36 has
also been off. There should be a rule punishing these things.”

 VERB put_in
     WHEN obj
         DOES ONLY
              IF cont = fiction_shelf
                    THEN 
                          IF THIS IS scanned
                                 THEN "You put the book into the fiction shelf. After some time you go home to lead a quiet life."
                                              "$pYOU WIN THE GAME!"
                                                QUIT.
                                 ELSE "You need to scan the book first."
                         END IF.
              ELSIF cont = shelves
                       THEN "Wrong shelf! Put it in the fiction shelf."
              END IF.
END VERB.

VERB scan
	DOES ONLY
		IF fiction_book IS scanned
			THEN "That'll unscan it!"
			ELSE "You scan the book." MAKE fiction_book scanned. SCORE 5.
		END IF.
END VERB.

END THE fiction_book.

THE scanner ISA OBJECT AT library
CONTAINER
NAME book scanner
IS NOT takeable.
DESCRIPTION “A red device lying here. It has a voice over who says ‘This book has been issued’ or ‘This book has been
returned’ in the scanner. There is also a red light that is supposed to scan the book’s ISBN.”

VERB put_in       (= "insert in")
     WHEN cont
        DOES ONLY 
		IF obj = fiction_book
			THEN 
				IF fiction_book IS NOT scanned 
					THEN "You scan the book." MAKE fiction_book scanned. SCORE 5.
					ELSE "That'll unscan it!"
				END IF.
			ELSE "This book cannot be scanned."
            END IF.
END VERB.

END THE scanner.[/spoiler]