Skip to content

Commit

Permalink
Kill the Kitchen module (which was never really a proper module to be…
Browse files Browse the repository at this point in the history
…gin with)
  • Loading branch information
quietust committed Jan 17, 2012
1 parent a9eb555 commit 9d8c67b
Show file tree
Hide file tree
Showing 3 changed files with 213 additions and 266 deletions.
56 changes: 23 additions & 33 deletions library/include/modules/kitchen.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,18 @@ distribution.
#include "Module.h"
#include "Types.h"
#include "VersionInfo.h"
#include "modules/Materials.h"
#include "modules/Items.h"
#include "Core.h"
#include "modules/Items.h"

/**
* \defgroup grp_kitchen Kitchen settings
* @ingroup grp_modules
*/

namespace DFHack
{
namespace Simple
{
namespace Kitchen
{
typedef uint8_t t_exclusionType;
Expand All @@ -52,45 +54,33 @@ const t_itemSubtype limitSubtype = 0; // used to store limit as an entry in the
const t_exclusionType limitExclusion = 4; // used to store limit as an entry in the exclusion list

/**
* Kitchen exclusions manipulator class. Currently geared towards plants and seeds.
* @ingroup grp_kitchen
* Kitchen exclusions manipulator. Currently geared towards plants and seeds.
* \ingroup grp_modules
* \ingroup grp_kitchen
*/
class DFHACK_EXPORT Exclusions
{
public:
/// ctor
Exclusions(DFHack::Core& core_);
/// dtor
~Exclusions();

/// print the exclusion list, with the material index also translated into its token (for organics) - for debug really
void debug_print() const;

/// remove this material from the exclusion list if it is in it
void allowPlantSeedCookery(t_materialIndex materialIndex);
// print the exclusion list, with the material index also translated into its token (for organics) - for debug really
DFHACK_EXPORT void debug_print(Core &);

/// add this material to the exclusion list, if it is not already in it
void denyPlantSeedCookery(t_materialIndex materialIndex);
// remove this material from the exclusion list if it is in it
DFHACK_EXPORT void allowPlantSeedCookery(t_materialIndex materialIndex);

/// fills a map with info from the limit info storage entries in the exclusion list
void fillWatchMap(std::map<t_materialIndex, unsigned int>& watchMap) const;
// add this material to the exclusion list, if it is not already in it
DFHACK_EXPORT void denyPlantSeedCookery(t_materialIndex materialIndex);

/// removes a limit info storage entry from the exclusion list if it's present
void removeLimit(t_materialIndex materialIndex);
// fills a map with info from the limit info storage entries in the exclusion list
DFHACK_EXPORT void fillWatchMap(std::map<t_materialIndex, unsigned int>& watchMap);

/// add a limit info storage item to the exclusion list, or alters an existing one
void setLimit(t_materialIndex materialIndex, unsigned int limit);
// removes a limit info storage entry from the exclusion list if it's present
DFHACK_EXPORT void removeLimit(t_materialIndex materialIndex);

/// clears all limit info storage items from the exclusion list
void clearLimits();
// add a limit info storage item to the exclusion list, or alters an existing one
DFHACK_EXPORT void setLimit(t_materialIndex materialIndex, unsigned int limit);

/// the size of the exclusions vectors (they are all the same size - if not, there is a problem!)
std::size_t size() const;
private:
class Private;
Private* d;

};
// clears all limit info storage items from the exclusion list
DFHACK_EXPORT void clearLimits();

DFHACK_EXPORT std::size_t size();
}
}
}
Loading

0 comments on commit 9d8c67b

Please sign in to comment.