1
0
mirror of https://github.com/HybridDog/pdisc.git synced 2025-07-03 08:40:39 +02:00

update instructions

M  README.md
M  faden.lua
M  standardbefehlssatz.lua
M  util/standartbefehlssatz_doc.lua
This commit is contained in:
Hybrid Dog
2017-02-03 23:20:22 +01:00
parent f566b8b557
commit c821cafc14
4 changed files with 99 additions and 7 deletions

View File

@ -13,13 +13,19 @@ local types = {
local instr = {
{"mov", "<v to>, <e from>", "Copies from into to."},
{"xchg", "<v a>, <v b>", "Switches a with b."},
{"getvar", "<vs varname>[, <ve exists>]", "Sets varname to the current variable called <varname> if it's set. If exists is passed, it's set to a bool indicating whether the variable was set."},
{"add", "<vn to>, <n from>", "to += from"},
{"add", "<vb to>, <b from>", "to = to and from"},
{"add", "<vb to>[, <b ba>[, <b bb>[…]]]", "to indicates whether at least one of the arguments is true"},
{"add", "<vs to>, <s from>", "to = to .. from"},
{"sub", "<vn num>, <n tosub>", "num -= tosub"},
{"sub", "<vs str>, <n start>[, <n end>]", "str = str:sub(start, end)"},
{"mul", "<vn to>, <n from>", "to *= from"},
{"mul", "<vb to>, <b from>", "to = to or from"},
{"mul", "<vb to>[, <b ba>[, <b bb>[…]]]", "to indicates whether all of the arguments are true"},
{"mul", "<vs str>, <n cnt>", "str = str:rep(from)"},
{"div", "<vn num>, <n todiv>", "num /= todiv"},
{"inc", "<vn num>", "++num"},
{"dec", "<vn num>", "--num"},
{"neg", "<vn num>", "num = -num"},
{"neg", "<vb var>", "var = not var"},
{"neg", "<vs str>", "str = str:rev()"},
@ -33,10 +39,13 @@ local instr = {
{"equal", "<v a>, <e b>", "a = a == b"},
{"less", "<vn a>, <n b>", "a = a < b; after executing, a is a bool"},
{"less", "<vs a>, <s b>", "a = a < b; less also works for strings"},
{"greater", "<v a>, <e b>", "executes less b,a"},
{"usleep", "<n t>", "aborts the program for at least floor(max(0, t)) ms"},
{"sleep", "<n t>", "executes usleep with t * 1000000 as argument"},
{"get_us_time", "<v to>", "stores minetest.get_us_time() into to; can be used to measure time differences"},
{"tostring", "<ve var>", "var = tostring(var)"},
{"tonumber", "<ve var>", "var = tonumber(var)"},
{"toboolean", "<ve var>", "var = var and true or false"},
{"print", "<e a>[, <e b>[, <e c>[…]]]", "adds variables to the log, seperated by \\t, \\n is added at the end"},
{"flush", "", "Output the log, this should vary for every mod."},
}