From 4e786422733383a1d17c090b6054fea61b52a701 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Thu, 26 Jul 2018 20:05:36 +0300 Subject: [PATCH] [Client] Add getModifiableStore() to MWWorld --- apps/openmw/mwbase/world.hpp | 10 ++++++++++ apps/openmw/mwworld/worldimp.cpp | 13 +++++++++++++ apps/openmw/mwworld/worldimp.hpp | 10 ++++++++++ 3 files changed, 33 insertions(+) diff --git a/apps/openmw/mwbase/world.hpp b/apps/openmw/mwbase/world.hpp index 9ed5e64fe..fc99aa91a 100644 --- a/apps/openmw/mwbase/world.hpp +++ b/apps/openmw/mwbase/world.hpp @@ -132,6 +132,16 @@ namespace MWBase virtual const MWWorld::ESMStore& getStore() const = 0; + /* + Start of tes3mp addition + + Make it possible to get the World's ESMStore as a non-const + */ + virtual MWWorld::ESMStore& getModifiableStore() = 0; + /* + End of tes3mp addition + */ + virtual std::vector& getEsmReader() = 0; virtual MWWorld::LocalScripts& getLocalScripts() = 0; diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index ec6624478..3d7143a60 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -595,6 +595,19 @@ namespace MWWorld return mStore; } + /* + Start of tes3mp addition + + Make it possible to get the World's ESMStore as a non-const + */ + MWWorld::ESMStore& World::getModifiableStore() + { + return mStore; + } + /* + End of tes3mp addition + */ + std::vector& World::getEsmReader() { return mEsm; diff --git a/apps/openmw/mwworld/worldimp.hpp b/apps/openmw/mwworld/worldimp.hpp index 6a55c1be1..7af5ff33a 100644 --- a/apps/openmw/mwworld/worldimp.hpp +++ b/apps/openmw/mwworld/worldimp.hpp @@ -239,6 +239,16 @@ namespace MWWorld const MWWorld::ESMStore& getStore() const override; + /* + Start of tes3mp addition + + Make it possible to get the World's ESMStore as a non-const + */ + MWWorld::ESMStore& getModifiableStore() override; + /* + End of tes3mp addition + */ + std::vector& getEsmReader() override; LocalScripts& getLocalScripts() override;