From cc4eab2c865c3986bb4530e6540a5a2d289bb794 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 21 Feb 2016 17:05:54 +0100 Subject: [PATCH] Fixed: Add unlearn_brick command for missions (a big thanks to Depyraken for the patch!) --- .../world_editor_classes.xml | 10 +++- .../mission_compiler_lib/step_content.cpp | 60 +++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml b/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml index 813f0acfc..f3500efa8 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml +++ b/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml @@ -688,6 +688,7 @@ + @@ -1026,7 +1027,13 @@ - + + + + + + + @@ -1099,6 +1106,7 @@ + diff --git a/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp b/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp index cda6790ae..4751fbe4c 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp @@ -1139,6 +1139,66 @@ public: }; REGISTER_STEP_CONTENT(CActionLearnBrick, "learn_brick"); + +// --------------------------------------------------------------------------- +class CActionUnlearnBrick : public IStepContent +{ + string _BotGiver; + vector _Bricks; + bool _Group; + + void getPredefParam(uint32 &numEntry, CPhrase::TPredefParams &predef) + { + numEntry = 0; + } +public: + void init(CMissionData &md, IPrimitive *prim) + { + _BotGiver = md.getProperty(prim, "npc_name", true, false); + vector vs; + vs = md.getPropertyArray(prim, "bricks", true, false); + + for (uint i=0; i