removed useless _ folders

This commit is contained in:
Fred Beckhusen
2015-08-09 16:54:31 -05:00
parent fde850293c
commit 948a44dfba
5204 changed files with 2425579 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
<Project name="Configuration_Notecard_Reader" guid="D8A393AA-6C00-1014-B904-200204C60A89">
<Object name="Object" guid="D8A39498-6C00-1014-B904-200204C60A89">
<Script name="Configuration_Notecard_Reader_1.lsl" guid="D8A3C8A2-6C00-1014-B904-200204C60A89">
</Script>
<Script name="Configuration_Notecard_Reader_2.lsl" guid="D8A3DEAA-6C00-1014-B904-200204C60A89">
</Script>
</Object>
</Project>

View File

@@ -0,0 +1,25 @@
// :CATEGORY:Notecard Reader
// :NAME:Configuration_Notecard_Reader
// :AUTHOR:Dedric Mauriac
// :CREATED:2011-01-22 12:16:49.847
// :EDITED:2013-09-18 15:38:51
// :ID:201
// :NUM:274
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
// * Create a script
// * Read each line of a note card
// * Skip over comments
// * Skip blank lines
// * Notify the owner of the lines with unknown settings
// o Unknown setting name
// o Missing delimiter (equal sign)
// * Notify the owner of missing configuration note card
// * Detect when the notecard has been changed
// * Offer case-insensitive settings
// * Trim white-space from name/value settings
// * Initialize with default values
// * Detect that the name of the configuration file is a notecard
// * Detect that you have reached the end of the file
// :CODE:

View File

@@ -0,0 +1,130 @@
// :CATEGORY:Notecard Reader
// :NAME:Configuration_Notecard_Reader
// :AUTHOR:Dedric Mauriac
// :CREATED:2011-01-22 12:16:49.847
// :EDITED:2013-09-18 15:38:51
// :ID:201
// :NUM:275
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
// The script.
// :CODE:
integer line;
string configurationFile = "Application.Config";
key readLineId;
string AvatarName;
string FavoriteColor;
init()
{
// reset configuration values to default
AvatarName = "Unknown";
FavoriteColor = "None";
// make sure the file exists and is a notecard
if(llGetInventoryType(configurationFile) != INVENTORY_NOTECARD)
{
// notify owner of missing file
llOwnerSay("Missing inventory notecard: " + configurationFile);
return; // don't do anything else
}
// initialize to start reading from first line
line = 0;
// read the first line
readLineId = llGetNotecardLine(configurationFile, line++);
}
processConfiguration(string data)
{
// if we are at the end of the file
if(data == EOF)
{
// notify the owner
llOwnerSay("We are done reading the configuration");
// notify what was read
llOwnerSay("The avatar name is: " + AvatarName);
llOwnerSay("The favorite color is: " + FavoriteColor);
// do not do anything else
return;
}
// if we are not working with a blank line
if(data != "")
{
// if the line does not begin with a comment
if(llSubStringIndex(data, "#") != 0)
{
// find first equal sign
integer i = llSubStringIndex(data, "=");
// if line contains equal sign
if(i != -1)
{
// get name of name/value pair
string name = llGetSubString(data, 0, i - 1);
// get value of name/value pair