digiline tutorial: unify indentation and truncate more lines
This commit is contained in:
parent
3a66f79547
commit
01b0dc0a1a
@ -93,9 +93,12 @@ Code:<ol>
|
||||
<li>Slave:
|
||||
<pre>
|
||||
if event.type =="digiline" then
|
||||
digiline_send("TV","channel: "..event.channel.."message: "..event.msg)--TV is channel of LCD
|
||||
--TV is channel of LCD
|
||||
digiline_send("TV","channel: " .. event.channel ..
|
||||
"message: " .. event.msg)
|
||||
end
|
||||
--[[Where: Event is a table generated by the lua controller when a particular event is recoginzed by the LUA controller. It consist of :
|
||||
--[[Where: Event is a table generated by the lua controller when a
|
||||
particular event is recoginzed by the LUA controller. It consist of :
|
||||
|
||||
event ={
|
||||
type ="<eventtype>"
|
||||
@ -206,74 +209,74 @@ end </pre>
|
||||
<li>A node (Default:stone99):
|
||||
<pre>
|
||||
event = {
|
||||
type = "digiline",
|
||||
channel = "d",
|
||||
msg = {
|
||||
stack = {
|
||||
meta = {
|
||||
-- this field contains additonal memory for the node
|
||||
},
|
||||
metadata = "",
|
||||
count = 99,
|
||||
name = "default:stone",
|
||||
--name and count will chage according to the node
|
||||
wear = 0
|
||||
-- this says about the condition of tool
|
||||
},
|
||||
action = "uput",
|
||||
to_slot = 1 --denotes which slot the stuff is
|
||||
}
|
||||
type = "digiline",
|
||||
channel = "d",
|
||||
msg = {
|
||||
stack = {
|
||||
meta = {
|
||||
-- this field contains additonal memory for the node
|
||||
},
|
||||
metadata = "",
|
||||
count = 99,
|
||||
name = "default:stone",
|
||||
--name and count will chage according to the node
|
||||
wear = 0
|
||||
-- this says about the condition of tool
|
||||
},
|
||||
action = "uput",
|
||||
to_slot = 1 --denotes which slot the stuff is
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<li>A Technic node with charge (Blue energy Crystal)
|
||||
<pre>
|
||||
event ={
|
||||
type = "digiline",
|
||||
channel = "d",
|
||||
msg = {
|
||||
stack = {
|
||||
meta = {
|
||||
type = "digiline",
|
||||
channel = "d",
|
||||
msg = {
|
||||
stack = {
|
||||
meta = {
|
||||
|
||||
},
|
||||
metadata = "return {[\"charge\"] = 450000}",
|
||||
-- charge tells the amout of charge that crystal
|
||||
count = 1,
|
||||
name = "technic:blue_energy_crystal",
|
||||
wear = 1
|
||||
},
|
||||
action = "uput",
|
||||
to_slot = 2
|
||||
}
|
||||
},
|
||||
metadata = "return {[\"charge\"] = 450000}",
|
||||
-- charge tells the amout of charge that crystal
|
||||
count = 1,
|
||||
name = "technic:blue_energy_crystal",
|
||||
wear = 1
|
||||
},
|
||||
action = "uput",
|
||||
to_slot = 2
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<li>A book with Titile "my book" of content:
|
||||
hello world
|
||||
<pre>
|
||||
event ={
|
||||
type = "digiline",
|
||||
channel = "d",
|
||||
msg = {
|
||||
stack = {
|
||||
meta = {
|
||||
owner = "sivarajan",
|
||||
title = "my book",
|
||||
page_max = "1",
|
||||
text = "hello \ world",
|
||||
-- \represents a new line in a book
|
||||
page = "1",
|
||||
description = "\27(T@default)\"\27Fmy book\27E\" by \27Fsivarajan\27E\27E"
|
||||
--this is the text shown to other player viewing the book
|
||||
},
|
||||
metadata = "",
|
||||
count = 1,
|
||||
name = "default:book_written",
|
||||
wear = 0
|
||||
},
|
||||
action = "umove",
|
||||
from_slot = 11,
|
||||
-- when moving stuff read the Notes
|
||||
to_slot = 3
|
||||
}
|
||||
type = "digiline",
|
||||
channel = "d",
|
||||
msg = {
|
||||
stack = {
|
||||
meta = {
|
||||
owner = "sivarajan",
|
||||
title = "my book",
|
||||
page_max = "1",
|
||||
text = "hello \ world",
|
||||
-- \represents a new line in a book
|
||||
page = "1",
|
||||
description = "\27(T@default)\"\27Fmy book\27E\" by \27Fsivarajan\27E\27E"
|
||||
--this is the text shown to other player viewing the book
|
||||
},
|
||||
metadata = "",
|
||||
count = 1,
|
||||
name = "default:book_written",
|
||||
wear = 0
|
||||
},
|
||||
action = "umove",
|
||||
from_slot = 11,
|
||||
-- when moving stuff read the Notes
|
||||
to_slot = 3
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</ol>
|
||||
@ -340,44 +343,44 @@ event ={
|
||||
type = "digiline",
|
||||
channel = "<channel>",
|
||||
msg = {
|
||||
input = (integer),
|
||||
--input voltage
|
||||
supply = 40000,-
|
||||
-upgrade 1 and 2 are availabe only for HV tools
|
||||
upgrade1 = {
|
||||
meta = {
|
||||
input = (integer),
|
||||
--input voltage
|
||||
supply = 40000,-
|
||||
--upgrade 1 and 2 are availabe only for HV tools
|
||||
upgrade1 = {
|
||||
meta = {
|
||||
|
||||
},
|
||||
metadata = "",
|
||||
count = 1,
|
||||
name = "<modname:node>",
|
||||
-- here the node will be a valid upgrade node
|
||||
wear = 0
|
||||
},
|
||||
upgrade2 = {
|
||||
meta = {
|
||||
},
|
||||
metadata = "",
|
||||
count = 1,
|
||||
name = "<modname:node>",
|
||||
-- here the node will be a valid upgrade node
|
||||
wear = 0
|
||||
},
|
||||
upgrade2 = {
|
||||
meta = {
|
||||
|
||||
},
|
||||
metadata = "",
|
||||
count = 1,
|
||||
name = "technic:battery",
|
||||
wear = 0
|
||||
},
|
||||
demand = (integervalue)
|
||||
charge = (integer value),
|
||||
-- amount of charge it contains
|
||||
max_charge = (integer),
|
||||
-- maximum charge
|
||||
src = {
|
||||
meta = {
|
||||
},
|
||||
metadata = "",
|
||||
count = 1,
|
||||
name = "technic:battery",
|
||||
wear = 0
|
||||
},
|
||||
demand = (integervalue)
|
||||
charge = (integer value),
|
||||
-- amount of charge it contains
|
||||
max_charge = (integer),
|
||||
-- maximum charge
|
||||
src = {
|
||||
meta = {
|
||||
|
||||
},
|
||||
},
|
||||
metadata = "return {[\"charge\"] = <integer>}",
|
||||
count = 1,
|
||||
name = "technic:<toolname>",
|
||||
wear = (integervalue)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<h3>6.4 Interfacing Technic and Digiline</h3>
|
||||
|
Loading…
x
Reference in New Issue
Block a user