mirror of
https://github.com/HybridDog/pdisc.git
synced 2025-01-10 09:30:17 +01:00
update readme
M README.md M faden.lua
This commit is contained in:
parent
b3ce57c5b4
commit
479885a80f
34
README.md
34
README.md
@ -8,3 +8,37 @@ true/false: boolean (immediate)
|
|||||||
12.6: number (immediate)
|
12.6: number (immediate)
|
||||||
$hello nwae: string (immediate)
|
$hello nwae: string (immediate)
|
||||||
nodolla: either a label is called so (immediate) or it's a variable
|
nodolla: either a label is called so (immediate) or it's a variable
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
How to use this mod:
|
||||||
|
|
||||||
|
```
|
||||||
|
local mylog = print
|
||||||
|
|
||||||
|
local parsed_code = pdisc.parse(code_text)
|
||||||
|
|
||||||
|
local function mystart(parsed_code)
|
||||||
|
local thread = pdisc.create_thread(function(thread)
|
||||||
|
thread.flush = function(self)
|
||||||
|
mylog(self.log)
|
||||||
|
self.log = ""
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end, parsed_code)
|
||||||
|
mykeepalive()
|
||||||
|
end
|
||||||
|
|
||||||
|
mystart(parsed_code)
|
||||||
|
|
||||||
|
local function mykeepalive()
|
||||||
|
thread:suscitate()
|
||||||
|
if not thread.stopped then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
thread:try_rebirth()
|
||||||
|
minetest.after(0.1, function()
|
||||||
|
mykeepalive()
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
```
|
||||||
|
@ -54,7 +54,7 @@ local function programm_ausfuhren(faden)
|
|||||||
return not faden.stopped and programm_ausfuhren(faden)
|
return not faden.stopped and programm_ausfuhren(faden)
|
||||||
end
|
end
|
||||||
|
|
||||||
return function (faden_manip, parsed)
|
return function(faden_manip, parsed)
|
||||||
local faden = {
|
local faden = {
|
||||||
log = "",
|
log = "",
|
||||||
ip = 1,
|
ip = 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user