diff options
author | Lars Müller <34514239+appgurueu@users.noreply.github.com> | 2022-02-04 20:28:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 20:28:43 +0100 |
commit | 1ee37148a8072fe6350124cd51c812c3d3fb069a (patch) | |
tree | 06e2d9153e7998ade54764a00788b5bcec6798b3 /src/script/common/c_content.cpp | |
parent | 1c73902005bb5c7a40be5571bff9c232d8c69536 (diff) | |
download | dragonfireclient-1ee37148a8072fe6350124cd51c812c3d3fb069a.tar.xz |
Fix types of get_mapgen_setting_noiseparams (#12025)
Diffstat (limited to 'src/script/common/c_content.cpp')
-rw-r--r-- | src/script/common/c_content.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index 8a5a3fe71..b6eaa6b13 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -1697,24 +1697,19 @@ bool read_noiseparams(lua_State *L, int index, NoiseParams *np) void push_noiseparams(lua_State *L, NoiseParams *np) { lua_newtable(L); - push_float_string(L, np->offset); - lua_setfield(L, -2, "offset"); - push_float_string(L, np->scale); - lua_setfield(L, -2, "scale"); - push_float_string(L, np->persist); - lua_setfield(L, -2, "persistence"); - push_float_string(L, np->lacunarity); - lua_setfield(L, -2, "lacunarity"); - lua_pushnumber(L, np->seed); - lua_setfield(L, -2, "seed"); - lua_pushnumber(L, np->octaves); - lua_setfield(L, -2, "octaves"); + setfloatfield(L, -1, "offset", np->offset); + setfloatfield(L, -1, "scale", np->scale); + setfloatfield(L, -1, "persist", np->persist); + setfloatfield(L, -1, "persistence", np->persist); + setfloatfield(L, -1, "lacunarity", np->lacunarity); + setintfield( L, -1, "seed", np->seed); + setintfield( L, -1, "octaves", np->octaves); push_flags_string(L, flagdesc_noiseparams, np->flags, np->flags); lua_setfield(L, -2, "flags"); - push_v3_float_string(L, np->spread); + push_v3f(L, np->spread); lua_setfield(L, -2, "spread"); } |