From 1e9c4a045031a39274042e15f48463cf50ae2e4f Mon Sep 17 00:00:00 2001 From: Simon Jackson Date: Tue, 10 Aug 2010 22:28:53 +0100 Subject: [PATCH] Added function to get const reference to stored map of labours. Nothing special --- library/DFMemInfo.cpp | 5 +++++ library/include/dfhack/DFMemInfo.h | 1 + 2 files changed, 6 insertions(+) diff --git a/library/DFMemInfo.cpp b/library/DFMemInfo.cpp index e8cee4b0c..a168d7d99 100644 --- a/library/DFMemInfo.cpp +++ b/library/DFMemInfo.cpp @@ -718,6 +718,11 @@ std::vector< std::vector > const& memory_info::getAllTraits() return d->traits; } +std:: map const& memory_info::getAllLabours() +{ + return d->labors; +} + string memory_info::getLabor (const uint32_t laborIdx) { if(d->labors.count(laborIdx)) diff --git a/library/include/dfhack/DFMemInfo.h b/library/include/dfhack/DFMemInfo.h index e40ecbf11..2b9c0985f 100644 --- a/library/include/dfhack/DFMemInfo.h +++ b/library/include/dfhack/DFMemInfo.h @@ -75,6 +75,7 @@ namespace DFHack std::string getTraitName(const uint32_t) const; std::string getLabor (const uint32_t); std::vector< std::vector > const& getAllTraits(); + std:: map const& getAllLabours(); DFHack::t_level getLevelInfo(const uint32_t level) const;