No _vti
This commit is contained in:
@@ -1,162 +0,0 @@
|
||||
// :CATEGORY:Building
|
||||
// :NAME:Open_Table
|
||||
// :AUTHOR:Falados Kapuskas
|
||||
// :CREATED:2011-08-09 01:00:22.220
|
||||
// :EDITED:2013-09-18 15:38:59
|
||||
// :ID:591
|
||||
// :NUM:810
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// Table script. Add to the table this script and a chair. The name should be 1 Prim Chair, or you must change the name in the notecard
|
||||
// :CODE:
|
||||
|
||||
|
||||
// This file is part of Open Round-Table.
|
||||
|
||||
//
|
||||
|
||||
// Open Round-Table is free software: you can redistribute it and/or modify
|
||||
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
|
||||
// (at your option) any later version.
|
||||
|
||||
//
|
||||
|
||||
// Open Round-Table is distributed in the hope that it will be useful,
|
||||
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
|
||||
// GNU General Public License for more details.
|
||||
|
||||
//
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
|
||||
// along with Open Round-Table. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//
|
||||
|
||||
// Author: Falados Kapuskas
|
||||
|
||||
// Version: 1.0
|
||||
|
||||
|
||||
|
||||
integer BROADCAST_CHANNEL;
|
||||
|
||||
integer OCCUPIED=0;
|
||||
|
||||
integer TOTAL_CHAIRS=0;
|
||||
|
||||
integer MIN_CHAIRS=1;
|
||||
|
||||
float Z_OFFSET = 0.0;
|
||||
|
||||
float RADIUS = 4;
|
||||
|
||||
float ANGLE = TWO_PI;
|
||||
|
||||
float ELBOW_ROOM = 1.5;
|
||||
|
||||
string CHAIR_OBJECT;
|
||||
|
||||
key gDataserverRequest;
|
||||
|
||||
integer CHANNEL_MASK = 0xFFFFFF00;
|
||||
|
||||
integer CHAIR_MASK = 0xFF;
|
||||
|
||||
integer MAX_CHAIRS = 0xFF;
|
||||
|
||||
integer gReadLine;
|
||||
|
||||
|
||||
|
||||
check()
|
||||
|
||||
{
|
||||
|
||||
if( OCCUPIED >= TOTAL_CHAIRS || TOTAL_CHAIRS < MIN_CHAIRS )
|
||||
|
||||
{
|
||||
|
||||
if( TOTAL_CHAIRS < MAX_CHAIRS ) //Dont overflow the mask (Max 255 chairs)
|
||||
|
||||
{
|
||||
|
||||
rotation quat = llEuler2Rot(<0, 0, -90> * DEG_TO_RAD );
|
||||
|
||||
llRezObject(CHAIR_OBJECT,llGetPos()+llRot2Fwd(llGetRot())*RADIUS,ZERO_VECTOR,llGetRot() * quat,BROADCAST_CHANNEL | TOTAL_CHAIRS);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
default
|
||||
|
||||
{
|
||||
|
||||
on_rez(integer param)
|
||||
|
||||
{
|
||||
|
||||
llResetScript();
|
||||
|
||||
}
|
||||
|
||||
state_entry()
|
||||
|
||||
{
|
||||
|
||||
if( llGetInventoryType("Config") == INVENTORY_NOTECARD)
|
||||
|
||||
{
|
||||
|
||||
gReadLine = 1;
|
||||
|
||||
gDataserverRequest = llGetNotecardLine("Config",gReadLine);
|
||||
|
||||
} else {
|
||||
|
||||
llOwnerSay("Couldn't Find Notecard: 'Config'");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dataserver(key req, string data)
|
||||
|
||||
{
|
||||
|
||||
if(req == gDataserverRequest)
|
||||
|
||||
{
|
||||
|
||||
if(data == EOF) state active;
|
||||
|
||||
if(gReadLine == 1)
|
||||
|
||||
{
|
||||
|
||||
CHAIR_OBJECT = data;
|
||||
|
||||
if(llGetInventoryType(data) == INVENTORY_NONE) return;
|
||||
|
||||
}
|
||||
|
||||
if(gReadLine == 3) RADIUS = (float)data;
|
||||
|
||||
if(gReadLine == 5) ELBOW_ROOM = (float)data;
|
||||
|
||||
if(gReadLine == 7)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
// :CATEGORY:Building
|
||||
// :NAME:Open_Table
|
||||
// :AUTHOR:Falados Kapuskas
|
||||
// :CREATED:2011-08-09 01:00:22.220
|
||||
// :EDITED:2013-09-18 15:38:59
|
||||
// :ID:591
|
||||
// :NUM:811
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// Add a notecard called 'Config' to the table. Do not change the order or number of lines in this notecard.
|
||||
// :CODE:
|
||||
==== Chair Object Name ====
|
||||
|
||||
1 prim chair
|
||||
|
||||
==== Minimum Distance from Table (In Meters) ====
|
||||
|
||||
1.2
|
||||
|
||||
==== Minimum Distance from surrounding chairs (In Meters) ====
|
||||
|
||||
0.5
|
||||
|
||||
@@ -1,150 +0,0 @@
|
||||
// :CATEGORY:Building
|
||||
// :NAME:Open_Table
|
||||
// :AUTHOR:Falados Kapuskas
|
||||
// :CREATED:2011-08-09 01:00:22.220
|
||||
// :EDITED:2013-09-18 15:38:59
|
||||
// :ID:591
|
||||
// :NUM:812
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// The chair script. Put this in a prim called '1 Prim Chair', or change the notecard to your chair
|
||||
// :CODE:
|
||||
// This file is part of Open Round-Table.
|
||||
|
||||
//
|
||||
|
||||
// Open Round-Table is free software: you can redistribute it and/or modify
|
||||
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
|
||||
// (at your option) any later version.
|
||||
|
||||
//
|
||||
|
||||
// Open Round-Table is distributed in the hope that it will be useful,
|
||||
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
|
||||
// GNU General Public License for more details.
|
||||
|
||||
//
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
|
||||
// along with Open Round-Table. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//
|
||||
|
||||
// Author: Falados Kapuskas
|
||||
|
||||
// Version: 1.0
|
||||
|
||||
|
||||
|
||||
vector wtf = <0,00, 90>;
|
||||
|
||||
|
||||
|
||||
float REFRESH_TIME = 1.0;
|
||||
|
||||
|
||||
|
||||
integer BROADCAST_CHANNEL=-1;
|
||||
|
||||
integer CHAIR_NUM;
|
||||
|
||||
integer MAX_CHAIRS;
|
||||
|
||||
float Z_OFFSET;
|
||||
|
||||
float RADIUS;
|
||||
|
||||
float ANGLE;
|
||||
|
||||
float ELBOW_ROOM;
|
||||
|
||||
|
||||
|
||||
integer CHANNEL_MASK = 0xFFFFFF00;
|
||||
|
||||
integer CHAIR_MASK = 0xFF;
|
||||
|
||||
key gTable;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
apply()
|
||||
|
||||
{
|
||||
|
||||
if(llKey2Name(gTable) == "") llDie();
|
||||
|
||||
list params = llGetObjectDetails(gTable,[OBJECT_POS,OBJECT_ROT]);
|
||||
|
||||
rotation rot = llList2Rot(params,1);
|
||||
|
||||
vector pos = llList2Vector(params,0);
|
||||
|
||||
float t = 0;
|
||||
|
||||
float n = MAX_CHAIRS;
|
||||
|
||||
float theta = ANGLE;
|
||||
|
||||
if(n > 0)
|
||||
|
||||
{
|
||||
|
||||
t = llFabs(CHAIR_NUM/n);
|
||||
|
||||
theta = ANGLE/(n);
|
||||
|
||||
}
|
||||
|
||||
float arc_len = RADIUS * theta;
|
||||
|
||||
if(arc_len < ELBOW_ROOM)
|
||||
|
||||
{
|
||||
|
||||
RADIUS = ELBOW_ROOM / theta;
|
||||
|
||||
}
|
||||
|
||||
float tangle = t*ANGLE;
|
||||
|
||||
vector o = <llCos(tangle),llSin(tangle),0>*RADIUS;
|
||||
|
||||
o.z = Z_OFFSET;
|
||||
|
||||
vector position = pos + o*rot;
|
||||
|
||||
llSetPos(position);
|
||||
|
||||
llSetRot( llEuler2Rot(<0,0,PI/2>) * llEuler2Rot(<0,0,tangle>)*rot );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
default
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
state_entry()
|
||||
|
||||
{
|
||||
|
||||
llSetSitText("Be Seated");
|
||||
|
||||
rotation quat = llEuler2Rot(wtf* DEG_TO_RAD);
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
vti_encoding:SR|utf8-nl
|
||||
vti_timelastmodified:TR|08 Sep 2013 03:49:04 -0000
|
||||
vti_extenderversion:SR|12.0.0.6211
|
||||
vti_backlinkinfo:VX|
|
||||
vti_author:SR|alien\\fred
|
||||
vti_modifiedby:SR|alien\\fred
|
||||
vti_timecreated:TR|18 Sep 2013 20:38:59 -0000
|
||||
@@ -1,7 +0,0 @@
|
||||
vti_encoding:SR|utf8-nl
|
||||
vti_timelastmodified:TR|08 Sep 2013 03:49:04 -0000
|
||||
vti_extenderversion:SR|12.0.0.6211
|
||||
vti_backlinkinfo:VX|
|
||||
vti_author:SR|alien\\fred
|
||||
vti_modifiedby:SR|alien\\fred
|
||||
vti_timecreated:TR|18 Sep 2013 20:38:59 -0000
|
||||
@@ -1,7 +0,0 @@
|
||||
vti_encoding:SR|utf8-nl
|
||||
vti_timelastmodified:TR|08 Sep 2013 03:49:04 -0000
|
||||
vti_extenderversion:SR|12.0.0.6211
|
||||
vti_backlinkinfo:VX|
|
||||
vti_author:SR|alien\\fred
|
||||
vti_modifiedby:SR|alien\\fred
|
||||
vti_timecreated:TR|18 Sep 2013 20:38:59 -0000
|
||||
@@ -1,10 +0,0 @@
|
||||
<Project name="Open_Table" guid="D8B600FD-6C00-1014-B904-200204C60A89">
|
||||
<Object name="Object" guid="D8B60210-6C00-1014-B904-200204C60A89">
|
||||
<Script name="Open_Table_1.lsl" guid="D8B63E75-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
<Script name="Open_Table_2.lsl" guid="D8B65C93-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
<Script name="Open_Table_3.lsl" guid="D8B67818-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
@@ -1,6 +0,0 @@
|
||||
vti_encoding:SR|utf8-nl
|
||||
vti_timelastmodified:TR|17 Aug 2013 23:32:40 -0000
|
||||
vti_extenderversion:SR|12.0.0.0
|
||||
vti_cacheddtm:TX|17 Aug 2013 23:32:40 -0000
|
||||
vti_filesize:IR|445
|
||||
vti_backlinkinfo:VX|
|
||||
Reference in New Issue
Block a user