From 7696ec27e2e2abd764bc955a32928c58b7deed7f Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 6 Feb 2008 23:57:42 +0100 Subject: [PATCH] rnd-20080206-2-src * added optional initial inventory for players (pre-collected elements) * added change page actions "set player inventory" and "set CE artwork" * added recognition of "player" parameter on change pages when player actions are defined, but no trigger player in corresponding condition (this resulted in actions that only affected the first player before) * fixed bug with change actions being executed for newly created custom elements resulting from custom element changes, when the intention was only to check for change actions for the previous custom element --- ChangeLog | 10 ++++++++++ src/conftime.h | 2 +- src/game.c | 5 ++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2ac47ff..18a8053c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-02-05 + * added optional initial inventory for players (pre-collected elements) + * added change page actions "set player inventory" and "set CE artwork" + * added recognition of "player" parameter on change pages when player + actions are defined, but no trigger player in corresponding condition + (this resulted in actions that only affected the first player before) + * fixed bug with change actions being executed for newly created custom + elements resulting from custom element changes, when the intention was + only to check for change actions for the previous custom element + 2008-02-03 * changed design and size of element drawing area in level editor * added "element used as action parameter" to element change actions diff --git a/src/conftime.h b/src/conftime.h index 15700967..163f51b6 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2008-02-06 02:04" +#define COMPILE_DATE_STRING "2008-02-06 23:42" diff --git a/src/game.c b/src/game.c index 057c8dd2..f99a7627 100644 --- a/src/game.c +++ b/src/game.c @@ -10174,6 +10174,9 @@ static void ExecuteCustomElementAction(int x, int y, int element, int page) action_arg == CA_ARG_ELEMENT_TRIGGER ? change->actual_trigger_element : action_arg == CA_ARG_ELEMENT_TARGET ? change->target_element : action_arg == CA_ARG_ELEMENT_ACTION ? change->action_element : + action_arg == CA_ARG_INVENTORY_RM_TRIGGER ? change->actual_trigger_element: + action_arg == CA_ARG_INVENTORY_RM_TARGET ? change->target_element : + action_arg == CA_ARG_INVENTORY_RM_ACTION ? change->action_element : EL_EMPTY); int action_arg_element = GetElementFromGroupElement(action_arg_element_raw); @@ -10619,7 +10622,7 @@ static void ExecuteCustomElementAction(int x, int y, int element, int page) player->inventory_infinite_element = EL_UNDEFINED; player->inventory_size = 0; } - else if (action_arg == CA_ARG_ELEMENT_RESET) + else if (action_arg == CA_ARG_INVENTORY_RESET) { player->inventory_infinite_element = EL_UNDEFINED; player->inventory_size = 0; -- 2.34.1