diff --git a/ARES/hardware/controller/raycaster-screen.lsl b/ARES/hardware/controller/raycaster-screen.lsl index ceaeee8..668e9ac 100644 --- a/ARES/hardware/controller/raycaster-screen.lsl +++ b/ARES/hardware/controller/raycaster-screen.lsl @@ -39,6 +39,7 @@ #define SND_BUTTON "e4174b28-6011-4b99-040b-b4ae58064f05" #define TX_SCREEN_DEFAULT "27409425-2804-5be0-5b83-9ccb3fa1888b" #define TX_SCREEN_INSTRUCTIONS "befc210f-0198-ffba-6948-f201431300be" +#define TX_SCREEN_VIDEO "106f37cf-81e0-0770-4119-4bab951c1c8d" #define SND_OPEN "6ce74082-6781-fec8-76fc-a7b80f4993d1" #define SND_CLOSE "08a7ec6b-ab2d-687f-b639-a2b222f74c56" @@ -48,7 +49,8 @@ list screens = [ TX_SCREEN_DEFAULT, - TX_SCREEN_INSTRUCTIONS + TX_SCREEN_INSTRUCTIONS, + TX_SCREEN_VIDEO ]; #define B_POWER 36 @@ -64,6 +66,10 @@ list screens = [ #define LID_3 43 #define SCREEN 2 +vector screen_color = <1, 1, 1>; +integer screen_color_slot = -1; +list colors = [ONES, ONES, ONES, ONES]; + list buttons = [B_POWER, B_B, B_A, B_PREV, B_NEXT, B_ANTENNAE]; list b_names = ["power", "b", "a", "prev", "next", "antennae"]; list commands = [ @@ -242,8 +248,9 @@ antennae(integer extended) { shutdown() { setp(SCREEN, [ - PRIM_COLOR, ALL_SIDES, ZV, 0, - PRIM_GLOW, ALL_SIDES, 0 + PRIM_COLOR, 1, ZV, 0, + PRIM_GLOW, 1, 0, + PRIM_TYPE, PRIM_TYPE_SPHERE, PRIM_HOLE_DEFAULT, <0.25, 0.75, 0>, 0.95, ZV, <0, 0, 0> ]); // antennae are always retracted when powered down: @@ -256,8 +263,9 @@ shutdown() { boot() { setp(SCREEN, [ - PRIM_COLOR, ALL_SIDES, ONES, 1, - PRIM_GLOW, ALL_SIDES, 0.125 + PRIM_COLOR, 1, screen_color, 1, + PRIM_GLOW, 1, 0.125, + PRIM_TYPE, PRIM_TYPE_SPHERE, PRIM_HOLE_DEFAULT, <0.25, 0.75, 0>, 0.95, ZV, <0, 1, 0> ]); // restore user preference: @@ -278,6 +286,7 @@ default { CL = 105 - (integer)("0x" + substr(avatar = llGetOwner(), 29, 35)); system = ""; tell(avatar, CL, "ping"); + echo("Free memory: " + (string)llGetFreeMemory()); /* echo(llGetLinkName(LID_1)); echo(llGetLinkName(LID_2)); echo(llGetLinkName(LID_3)); */ @@ -295,7 +304,7 @@ default { } setp(SCREEN, [ - PRIM_TEXTURE, ALL_SIDES, gets(screens, image_index), <2, 1, 0>, ZV, PI_BY_TWO + PRIM_TEXTURE, 1, gets(screens, image_index), <2, 1, 0>, ZV, PI_BY_TWO ]); } @@ -360,7 +369,7 @@ default { if(n == 0) { if(m == "add-confirm" || ((m == "on" || m == "off"))) { - if(m == "add-confirm" || system == "") { + if(m == "add-confirm" || system == "" || llGetOwnerKey(system) != llGetOwner()) { // register special commands here: system = id; @@ -388,15 +397,52 @@ default { + "\n next: Cycle to next image" + "\n prev: Cycle to previous image" + "\n auto : Automatically cycle images every seconds (0 = off)" - + "\n reset: Restore default images" + + "\n reset: Restore default image rotation" + + "\n show : Show a specific texture until canceled (or auto-cycled)" + + "\n video : Plays a YouTube video from the embed link (silent, no loop)" + + "\n web : Shows any web page" + + "\n cancel: Cancels 'show', 'video', or 'web'" + "\n add [...]: Add a new image" + "\n remove: Remove current image" - + "\n screens: List current screen images" + + "\n color : Make screen color match system light channel N (1-4 = A-D)" + + "\n white: Make screen color always white" + + "\n screens: List images in rotation" + "\n command