From a5a1c606d41c5bfabe74a63f5c8d2d1090015c08 Mon Sep 17 00:00:00 2001
From: poikilos <7557867+poikilos@users.noreply.github.com>
Date: Mon, 1 Jul 2019 11:58:56 -0400
Subject: [PATCH] add some more Lua tips
---
webapp/views/pages/modding.ejs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/webapp/views/pages/modding.ejs b/webapp/views/pages/modding.ejs
index 353e066..87e5ee8 100644
--- a/webapp/views/pages/modding.ejs
+++ b/webapp/views/pages/modding.ejs
@@ -160,16 +160,17 @@ help you get started:
obj.do_something
. This is helpful for functions used as
object methods, which make use of the self
variable.
+
things = {"something", "something else"}
.#
is the length operator.
if #minetest.find_nodes_in_area(pos0, pos1, "group:flora") > 3 then
is legitimate code: it will cause the case to happen if the count of
flora nodes in the 3D box is greater than 3.local gender = texture_name:find("_female") and "female" or "male"
The code sets gender to either "female" or "male".local radius = (tonumber(minetest.setting_get("protector_radius")) or 5)
The code allows a zero value.for i=-5, 5 do
end