function Chunky::loadChunk(%this, %id)
{
announce("calling load" SPC %id);
%file = strreplace(%id, " ", "/");
%id = strreplace(%id, " ", "_");
%id = strreplace(%id, "-", "_");
if(%id $= "")
{
return false;
}
%seed = $Blockscape::Perlin.seed;
if(%seed $= "")
{
BS_createPerlin();
%seed = $Blockscape::Perlin.seed;
if(%seed $= "")
{
error("Chunky::loadChunk(int id): Unable to fetch perlin seed");
return;
}
}
announce("seed is" SPC %seed);
%file = "base/server/blockscape/chunky/" @ %seed @ "/" @ %file @ ".cs";
if(!isFile(%file))
{
return false;
}
announce("file is" SPC %file);
exec(%file);
%obj = "Chunky_Chunk_" @ %id;
announce("obj is" SPC %obj);
if(isObject(%obj))
{
%obj.chainMethodCall("setTrusted", 1);
%obj.chainMethodCall("plant");
announce("yep, it's defo an object mang");
return true;
}
return false;
}
The file executed is a standard output of .save()
//--- OBJECT WRITE BEGIN ---
new ScriptGroup(Chunky_Chunk_2_1) {
chain_schedule = "61235";
new fxDTSBrick() {
position = "64 32 20000";
rotation = "1 0 0 0";
scale = "1 1 1";
dataBlock = "BrickBlockscapeData";
angleID = "0";
colorID = "49";
printID = "0";
colorFxID = "0";
shapeFxID = "0";
isBasePlate = "0";
isPlanted = "1";
client = "-1";
stackBL_ID = "888888";
maxDamage = "10";
blockType = "Cobblestone";
};
...
Everything in the .loadChunk() code is announced as supposed to.
SimGroup::chainMethodCall() is by Greek2Me.
The bricks created seem to have failing collision hat only works like 3% of the time. The rest of the time you just slip through.