summaryrefslogtreecommitdiff
path: root/src/cave_type.hpp
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2019-02-15 19:20:25 +0100
committerBardur Arantsson <bardur@scientician.net>2019-02-15 19:20:25 +0100
commita478b9be4e52f6a374d521565c55988cbf80c015 (patch)
tree461775d691ab2380acfed2e6c2ee63467a7ce423 /src/cave_type.hpp
parent23d4052eb88176ceb3cb3d769b09aa46a56e79cc (diff)
Move 'effects' global into Game struct
We change the type to std::vector<> while we're at it and make cave_type::effect to a boost::optional<>
Diffstat (limited to 'src/cave_type.hpp')
-rw-r--r--src/cave_type.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cave_type.hpp b/src/cave_type.hpp
index 08e6002f..97bb83e2 100644
--- a/src/cave_type.hpp
+++ b/src/cave_type.hpp
@@ -2,6 +2,7 @@
#include "h-basic.h"
+#include <boost/optional.hpp>
#include <cassert>
#include <vector>
@@ -50,7 +51,7 @@ struct cave_type
byte cost = 0; /* Hack -- cost of flowing */
byte when = 0; /* Hack -- when cost was computed */
- s16b effect = 0; /* The lasting effects */
+ boost::optional<s16b> maybe_effect { }; /* The lasting effects */
/**
* @brief wipe the object's state