Releases: johanberntsson/PunyInform
Releases · johanberntsson/PunyInform
v6.1.1
v6.1
Important to note when upgrading:
- Nothing
New/changed functionality:
- Debug verb 'rooms' now takes an optional substring to search for in room names, e.g. "rooms way" will show rooms like "Hallway Junction"
- Changed debug verb 'goto' to perform matching exactly like 'rooms', ignoring any asterisks at start or end of string, e.g. "goto way" moves the player to the first room that has "way" anywhere in its name.
- Added entry point for DEBUG mode only: DebugIsARoom(obj, verdict). Library will call it when the player uses debug verbs 'goto' or 'rooms', to decide if an object is a room. The verdict parameter is 0 if the library thinks it's not a room, 1 if it thinks it's a room. Return: 0 to accept the library's decision, 1 to say it's a room, 2 to say it's not a room.
Optimizations:
- Optimized grammar for 'consult' verb.
- Optimized MoveFloatingObjects
Bug fixes:
- Fixed parser bug, where "e.n" could be parsed as "n.n"
v6.0.2
Important to note when upgrading:
- Requires Inform compiler version 6.44
New/changed functionality:
- Added Mini-Cluedo demonstration game as statusline_teleport.inf to howto folder.
Optimizations:
- Optimized scope routines. (Issue #155)
Bug fixes:
- Updated Testbench, Microphone object, to reflect that ##AskFor action is transformed to an order to ##Give by the parser.
v6.0.1
Important to note when upgrading:
- Nothing
Optimizations:
- Made WordValue routine faster.
Bug fixes:
- Bugfix: Set scope_routine=0 in parser before performing action, or scope can get messed up
- If the ##Restart action was performed, while a transcript was being output, the library forgot that it had an active transcript, and would print a warning if the player tried to enter a comment with '*'.
- Fixed minor problems and cleaned up howto/talk_menu.inf
v6.0
Important to note when upgrading:
- PunyInform now uses Grammar Version 3, which requires Inform 6.43. If you're using an older compiler version, you have to upgrade now.
- If you invoke an action in Initalise, e.g.
<Take Ball>;and real_location hasn't been set yet, before- and after-routines are now skipped. If you relied on any such routines getting run in this scenario, you can place the player first using PlayerTo, but then you'll also need to call Banner and<Look>manually before exitingInitialisewith return code 2. - From now on, the (usually empty) message MSG_LOOK_BEFORE_ROOMNAME is only called if the player typed LOOK, or they moved into the location using a go command (e.g. "GO NORTH" or "W"), or entered a door, which gets translated into a go-command. If you use this message to print an extra newline before room descriptions, and you use PlayerTo to move the player, or you issue a
<Look>action in your code, you'll now need to print a newline manually, or print the message explicitly, before the Look happens. - If you had a custom message for MSG_REMOVE_CLOSED, you can drop it, as this message doesn't exist anymore.
New/changed functionality:
- PunyInform now handles setting the meta-flag on individual actions (requires Inform v6.43). (Issue #133)
- New print rule: ObjIs, prints e.g. "the ball is" or "the barrels are".
- Changed RemoveSub, so "get me from [obj]" is transformed to <<Exit [obj]>>
- Added new optional feature OPTIONAL_GUESS_KEY which, if OPTIONAL_GUESS_MISSING_NOUN is defined, lets the parser automatically pick out the right key for a lock. (Issue #149)
- Updated Game Author's Guide, fixing some advice that hadn't aged well, and adding more tips on optimizing for size.
- New feature: The short_name routine of an object can decide how to print the name based on if the name printing is done in the context of a (The) print rule. The short_name routine does this by checking if caps_mode == true.
- The default player object is now printed as "You" when printed with a (The) print rule. (Issues #139, #145)
- Changed so MSG_LOOK_BEFORE_ROOMNAME (doesn't normally print anything, typically used to print a newline for authors who want that) is only printed in two scenarios: (A) when the player typed something that was translated to a ##Look action, and (B) when the player moved using the ##Go action (Entering a door is transformed into a ##Go action). From now on, calls to in code don't cause this message to be printed.
- New function: OzmooColoursAvailable(), returns true if Ozmoo's eight extra colours are available.
- Added constants for the eight extra colours supported by Ozmoo: CLR_OZMOO_ORANGE, CLR_OZMOO_BROWN, CLR_OZMOO_LIGHT_RED, CLR_OZMOO_DARK_GREY, CLR_OZMOO_MEDIUM_GREY, CLR_OZMOO_LIGHT_GREEN, CLR_OZMOO_LIGHT_BLUE, CLR_OZMOO_LIGHT_GREY.
- Added a global clr_talk_menu to ext_talk_menu.h, to let game programmer set the menu colour.
- Updated howto/colours.inf and howto/talk_menu.inf, to use Ozmoo colours if available, and to avoid a bug in some interpreters, where default background colour is not restored on restart.
- Debug verb GOTO will now only consider target objects which seem to be rooms, i.e. don't have attributes or properties which aren't meaningful for rooms.
- Debug verb GOTO will now accept an '' character at the end as a wildcard, e.g. "GOTO HALL" can be used to go to the first room that starts with "HALL"
- Fixed: If you invoke an action in Initalise, and compile with Strict mode, you would get a message for a programming error, since real_location wasn't set, and BeforeRoutines() and AfterRoutines() would try to access properties of this object. Now these routines will be skipped if real_location isn't set.
- Changed _UpdateDarkness so a newline is printed before is called, when a lamp is switched on. (Issue #148)
- When listing objects with PrintContents, extend the rule that we don't show a container/supporter which the player is in, to we don't show a container/supporter which indirectly contains the player.
- Changed so actions Empty/EmptyT don't abort the processing if one object can't be removed from the source container, or it can't be put in the target.
- Removed message MSG_REMOVE_CLOSED and the code in RemoveSub that called it, since the check was superfluous. (Issue #147)
Optimizations:
- Changed to use Grammar Version 3, a more compact way of storing grammar (requires Inform v6.43). (Issue #132)
- Dropped global newline_flag and made Look routine shorter, simpler and faster.
- Moved arrays _InsertMessages and _PutOnMessages to static memory, to reduce dynamic memory.
- Made code to print the banner shorter.
- Micro-optimization for speed in MoveFloatingObjects for z5.
- Optimized _ParseAndPerformAction, putting multiple_objects-->0 in a local.
Bug fixes:
- Messages MSG_SHOW_DEFAULT, MSG_GIVE_DEFAULT (e.g. "John doesn't seem interested.") has been adapted to actors having pluralname.
- Messages MSG_ASKFOR_DEFAULT, MSG_ASKTO_DEFAULT, MSG_ORDERS_WONT (e.g. "John has better things to do.") have been adapted to actors having pluralname.
- Messages MSG_LOCK_KEY_DOESNT_FIT, MSG_UNLOCK_KEY_DOESNT_FIT (e.g. "The silver key doesn't seem to fit the lock.") has been adapted to handle attempted keys having pluralname.
- Message MSG_REMOVE_NOT_HERE (e.g. "But the fork isn't there now.") has been adapted to handle objects having pluralname.
- Fixed too long statusline when screen width was 55+ and OPTIONAL_SL_NO_MOVES was defined (Issue #144).
- Fixed: If inside a closed container, with no inside_description, we lacked a newline before listing the contents. (Issue #150).
- Fixed: If the player asks to empty the SACK_OBJECT, and the player is at max capacity, an object is placed in the sack object, and is subsequently removed along with everything else. (Issue #146)
- Changed the way talk_menu detects if it's used with PunyInform or the standard library, as old way broke if flags extensions was also used.
- Fixed incorrect usage of @get_char in ext_talk_menu and ext_quote_box, which made them fail on Infocom's Apple II v5 interpreter. (Issue #152)
- Fixed bug in cheap_scenery: If the cheap scenery object was addressed by an action without first having been matched by any words (should not normally happen, but there are ways), the before routine would typically crash. (Issue #153)
- Fixed: The cheap scenery object didn't have the reactive attribute in games with OPTIONAL_MANUAL_REACTIVE, which made it not reset itobj and themobj when the player changed rooms.
v5.14.1
Important to note when upgrading:
- Nothing
Bugfixes:
- Fixed: The message MSG_TAKE_BELONGS (e.g. "The staff seems to belong to Gandalf.") was missing a line break at the end.
- Fixed: The message MSG_TAKE_PART_OF (e.g. "The button seems to be part of the machine.") was missing a line break at the end.
- Fixed issue #143 (comma instead of full stop in Library of Horror)
v5.14
Important to note when upgrading:
- If your code replaces the DrawStatusLine routine, note that this routine has a new requirement - when called with an argument, and this argument is true, i.e. DrawStatusLine(true), the routine must not draw a statusline, but instead it must print the correct number of newline characters needed at the start of the game to make sure the first text isn't accidentally covered by the statusline. For more information, see manual.
- If your code calls _UpdateDarkness, note that the way to call this routine has changed. It used to be _UpdateDarkness(p_look), where you'd set p_look to true if you wanted the procedure to print a room description if a transition from darkness to light was made. The call is now _UpdateDarkness(p_silent), and you set p_silent to true if you want to routine to not print anything. If you set it to false, or don't give it a value, the routine performs a Look if going from dark to light, and prints a message if going from light to dark.
New/changed functionality
- Added a task to the DrawStatusLine routine - DrawStatusLine(true) must print the correct number of newline characters needed at the start of the game to make sure the first text isn't accidentally covered by the statusline (Issue #141). For more information, see manual.
- New print rule: SingularS, which prints an "s" if the argument is a singular object and not the player. I.e. print (The) obj, " contain", (SingularS) obj, " some wine.";
- The way to call the _UpdateDarkness procedure has changed. It used to be _UpdateDarkness(p_look), where you'd set p_look to true if you wanted the procedure to print a room description if a transition from darkness to light was made. The call is now _UpdateDarkness(p_silent), and you set p_silent to true if you want to routine to not print anything. If you set it to false, or don't give it a value, the routine performs a Look if going from dark to light, and prints a message if going from light to dark.
- howto/change_player.inf has been changed to call _UpdateDarkness in the new way.
- New message: The message MSG_NOW_DARK is now printed when the player's location suddenly goes dark (Issue #142).
Optimizations:
- Improved the default abbreviations
Bugfixes:
- Fixed: Game name and version info was printed with no newline or space between, if constant Headline was undefined (Issue #140).
- Fixed: Message MSG_SEARCH_IN_IT_ISARE used when searching ("The sofa contains a photo.") didn't consider the pluralname attribute of the container. (Issue #138)
- Fixed: Object lists didn't consider the pluralname attribute in extra information like "(which is closed)" (Issue #138).
- Fixed: The message MSG_TAKE_BELONGS (e.g. "The staff seems to belong to Gandalf.") didn't adapt the sentence properly if the first object was an object with pluralname set (Issue #137).
- Fixed: The message MSG_TAKE_PART_OF (e.g. "The button seems to be part of the machine.") didn't adapt the sentence properly if the first object was an object with pluralname set (Issue #137).
- Fixed: howto/change_player.inf lacked a call to MoveFloatingObjects.