diff --git a/tutorials/digilines.html b/tutorials/digilines.html index b194c56..0605de6 100644 --- a/tutorials/digilines.html +++ b/tutorials/digilines.html @@ -93,9 +93,12 @@ Code:
  1. Slave:
       
         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 =""
    @@ -206,74 +209,74 @@ end 
  2. A node (Default:stone99):
     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
    +    }
     }
     
  3. A Technic node with charge (Blue energy Crystal)
     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
    +    }
     }
     
  4. A book with Titile "my book" of content: hello world
     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
    +    }
     }
     
@@ -340,44 +343,44 @@ event ={ type = "digiline", 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 = "", - -- here the node will be a valid upgrade node - wear = 0 - }, - upgrade2 = { - meta = { + }, + metadata = "", + count = 1, + name = "", + -- 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\"] = }", count = 1, name = "technic:", wear = (integervalue) - } } + } }

6.4 Interfacing Technic and Digiline