mirror of
https://github.com/HybridDog/pdisc.git
synced 2025-07-03 00:30:39 +02:00
update readme
M README.md M faden.lua
This commit is contained in:
34
README.md
34
README.md
@ -8,3 +8,37 @@ true/false: boolean (immediate)
|
||||
12.6: number (immediate)
|
||||
$hello nwae: string (immediate)
|
||||
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)
|
||||
end
|
||||
|
||||
return function (faden_manip, parsed)
|
||||
return function(faden_manip, parsed)
|
||||
local faden = {
|
||||
log = "",
|
||||
ip = 1,
|
||||
|
Reference in New Issue
Block a user