-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathlightCopy.v1-1-0.lua.json
More file actions
1 lines (1 loc) · 1.89 KB
/
lightCopy.v1-1-0.lua.json
File metadata and controls
1 lines (1 loc) · 1.89 KB
1
{"events":[],"handlers":[{"code":"---sof---\nsystem.print(\"LightCopy Starting...\")\n\nlocal possibleLights = {copyTo_1, copyTo_2, copyTo_3, copyTo_4, copyTo_5, copyTo_6, copyTo_7, copyTo_8, copyTo_9}\nLightsList = {}\n\nfor i = 1, 9, 1 do\n if possibleLights[i] then\n table.insert(LightsList, possibleLights[i])\n possibleLights[i].deactivate()\n end\nend\n\ncopyFrom.activate()\n\nfor i = 1, #LightsList, 1 do\n system.print(\"... processing light #\" .. i .. \"...\")\n local thisLight = LightsList[i]\n rgb_color = copyFrom.getColor()\n thisLight.setColor(rgb_color[1], rgb_color[2], rgb_color[3])\n thisLight.setBlinkingState(copyFrom.isBlinking())\n thisLight.setOnBlinkingDuration(copyFrom.getOnBlinkingDuration())\n thisLight.setOffBlinkingDuration(copyFrom.getOffBlinkingDuration())\n thisLight.setBlinkingTimeShift(copyFrom.getBlinkingTimeShift())\n\n thisLight.activate()\nend\n\nsystem.print(\"... *LightCopy Done!!\")\nunit.exit()\n---eof---","filter":{"args":[],"signature":"onStart()","slotKey":"-1"},"key":"0"}],"methods":[],"slots":{"0":{"name":"copyFrom","type":{"events":[],"methods":[]}},"1":{"name":"copyTo_1","type":{"events":[],"methods":[]}},"2":{"name":"copyTo_2","type":{"events":[],"methods":[]}},"3":{"name":"copyTo_3","type":{"events":[],"methods":[]}},"4":{"name":"copyTo_4","type":{"events":[],"methods":[]}},"5":{"name":"copyTo_5","type":{"events":[],"methods":[]}},"6":{"name":"copyTo_6","type":{"events":[],"methods":[]}},"7":{"name":"copyTo_7","type":{"events":[],"methods":[]}},"8":{"name":"copyTo_8","type":{"events":[],"methods":[]}},"9":{"name":"copyTo_9","type":{"events":[],"methods":[]}},"-5":{"name":"library","type":{"events":[],"methods":[]}},"-4":{"name":"system","type":{"events":[],"methods":[]}},"-3":{"name":"player","type":{"events":[],"methods":[]}},"-2":{"name":"construct","type":{"events":[],"methods":[]}},"-1":{"name":"unit","type":{"events":[],"methods":[]}}}}