diff --git a/debian/changelog b/debian/changelog index ace0d01..15349a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ instead (1.4.6) unstable; urgency=low * bug fix in gamefile; * bug fix in lifes output; + * bug fix in PLAYER_MOVED and lifes; -- Peter Kosyh Mon, 09 Aug 2011 12:24:00 +0400 diff --git a/doc/writing_games-en.txt b/doc/writing_games-en.txt index b4b9023..3e19451 100644 --- a/doc/writing_games-en.txt +++ b/doc/writing_games-en.txt @@ -42,7 +42,7 @@ Without this line STEAD API will stay in compatible(legacy) mode. //Game initialization// should be defined as init function. For example: - + function init() me()._know_truth = false take(knife); @@ -56,18 +56,18 @@ From version 1.2.0 Windows and Unix standalone builds looks into ''./appdata/gam ===== 1. Scene ===== -A scene is a game unit. Within it a player can examine all the scene objects and interact with them. A game should contain at least one scene with the name “main”. +A scene is a game unit. Within it a player can examine all the scene objects and interact with them. A game should contain at least one scene with the name ''main''. main = room { nam = 'main room', dsc = 'You are in a large room.', }; -The record means creation of an object “main” of a type “room”. Every object has attributes and handlers. For example the attribute “nam” (name) is obligatory for every object. +The record means creation of an object ''main'' of a type ''room''. Every object has attributes and handlers. For example the attribute ''nam'' (name) is obligatory for every object. -The “nam” attribute for a scene will be the scene name when it is played. The name of a scene is also used to identify it when passing between scenes. +The ''nam'' attribute for a scene will be the scene name when it is played. The name of a scene is also used to identify it when passing between scenes. -The “dsc” attribute is a description of a static part of the scene. It is shown once when entering the scene or after the explicit “look” command. +The ''dsc'' attribute is a description of a static part of the scene. It is shown once when entering the scene or after the explicit ''look'' command. Attention!!! You may use symbol “;” instead of “,”. For example: @@ -79,12 +79,12 @@ main = room { Attention!!! If your creative design requires the static part description to be shown every time, you may define the “forcedsc” parameter for your game (at the start). game.forcedsc = true; - + Or similarly set the “forcedsc” for particular scenes. For long descriptions the following format is convenient: -dsc = [[ Very long description... ]], +dsc = [[ Very long description... ]], In this format line breaks are ignored. If you need paragraph breaks in the description, use the “^” symbol. diff --git a/stead/stead.lua b/stead/stead.lua index 812e371..478b308 100644 --- a/stead/stead.lua +++ b/stead/stead.lua @@ -1467,6 +1467,7 @@ end function game_life(self) local i,o local av,v + local was_moved stead.in_life_call = true; stead.lifes_off = list {}; -- lifes to off stead.PLAYER_MOVED = PLAYER_MOVED @@ -1480,6 +1481,7 @@ function game_life(self) if PLAYER_MOVED then -- clear life output, but not current av = nil v = nil + was_moved = true end if pre or (PLAYER_MOVED and pre ~= false) then av = stead.par(' ', av, vv); @@ -1488,6 +1490,7 @@ function game_life(self) end end end + PLAYER_MOVED = was_moved if not PLAYER_MOVED then PLAYER_MOVED = stead.PLAYER_MOVED end stead.PLAYER_MOVED = nil stead.in_life_call = false;