-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Load map spawns by lua #4527
Conversation
src/spawn.cpp
Dismissed
@@ -22,12 +22,8 @@ | |||
static constexpr int32_t MINSPAWN_INTERVAL = 10 * 1000; // 10 seconds to match RME | |||
static constexpr int32_t MAXSPAWN_INTERVAL = 24 * 60 * 60 * 1000; // 1 day | |||
|
|||
bool Spawns::loadFromXml(const std::string& filename) | |||
bool Spawns::loadFromXml(const std::string& filename, bool isCalledByLua) |
Check warning
Code scanning / CodeQL
Poorly documented large function Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DSpeichert delet this
issue: #1209 |
src/spawn.h
Outdated
@@ -67,7 +67,7 @@ class Spawns | |||
public: | |||
static bool isInZone(const Position& centerPos, int32_t radius, const Position& pos); | |||
|
|||
bool loadFromXml(const std::string& filename); | |||
bool loadFromXml(const std::string& filename, bool isLuaLoad = false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool loadFromXml(const std::string& filename, bool isLuaLoad = false); | |
bool loadFromXml(const std::string& filename, bool isCalledByLua = false); |
Pull Request Prelude
Changes Proposed
Addd possibility to load spawns by calling Game.loadMap()
example script:
Fixes #1209