mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
add plants
This commit is contained in:
parent
6efc942a1d
commit
5bdabaea42
5 changed files with 101 additions and 10 deletions
|
|
@ -610,6 +610,17 @@ namespace lua {
|
|||
return def;
|
||||
}
|
||||
|
||||
inline Number get_number_field(
|
||||
lua::State* L, const std::string& name, Number def, int idx=-1
|
||||
) {
|
||||
if (getfield(L, name, idx)) {
|
||||
auto value = tonumber(L, -1);
|
||||
pop(L);
|
||||
return value;
|
||||
}
|
||||
return def;
|
||||
}
|
||||
|
||||
inline Integer get_integer_field(
|
||||
lua::State* L, const std::string& name,
|
||||
Integer def, Integer min, Integer max, int idx=-1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue