1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Make string to v3f parsing consistent, replace core.setting_get_pos() by core.settings:get_pos() (#15438)

Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
This commit is contained in:
AFCMS 2024-12-04 18:19:46 +01:00 committed by GitHub
parent 18caf3a18d
commit e545e96d2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 162 additions and 45 deletions

View file

@ -150,7 +150,7 @@ public:
float getFloat(const std::string &name) const;
float getFloat(const std::string &name, float min, float max) const;
v2f getV2F(const std::string &name) const;
v3f getV3F(const std::string &name) const;
std::optional<v3f> getV3F(const std::string &name) const;
u32 getFlagStr(const std::string &name, const FlagDesc *flagdesc,
u32 *flagmask) const;
bool getNoiseParams(const std::string &name, NoiseParams &np) const;
@ -179,7 +179,7 @@ public:
bool getU64NoEx(const std::string &name, u64 &val) const;
bool getFloatNoEx(const std::string &name, float &val) const;
bool getV2FNoEx(const std::string &name, v2f &val) const;
bool getV3FNoEx(const std::string &name, v3f &val) const;
bool getV3FNoEx(const std::string &name, std::optional<v3f> &val) const;
// Like other getters, but handling each flag individualy:
// 1) Read default flags (or 0)