summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-25 14:37:37 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-25 14:37:37 -0500
commitc6c0c1a5a553c66796418b07077465c0c7a89069 (patch)
treef1b4bc860ce8761a7632e16ee511cf026b8e5ab5 /src
parent941eb33f0dd787c891c55c2d798b310a8469b1fa (diff)
downloadtanetane-c6c0c1a5a553c66796418b07077465c0c7a89069.tar.gz
tanetane-c6c0c1a5a553c66796418b07077465c0c7a89069.tar.bz2
tanetane-c6c0c1a5a553c66796418b07077465c0c7a89069.zip
Ionia randomly appears in the water
Diffstat (limited to 'src')
-rw-r--r--src/script_system.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/script_system.cpp b/src/script_system.cpp index d700738..e890dfc 100644 --- a/src/script_system.cpp +++ b/src/script_system.cpp
@@ -187,6 +187,12 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) {
187 return game_.getMap().getWarpPoint(warp); 187 return game_.getMap().getWarpPoint(warp);
188 }); 188 });
189 189
190 engine_.set_function(
191 "randomChance",
192 [&] (double p) {
193 return std::bernoulli_distribution(p)(game_.getRng());
194 });
195
190 engine_.script_file("../res/scripts/common.lua"); 196 engine_.script_file("../res/scripts/common.lua");
191} 197}
192 198