Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Port

Pages: 1 ... 235 236 237 238 239 [240] 241 242 243 244 245 ... 1041
3586
I'm sure Glass is gonna love this add-on

3587
Modification Help / Re: Datablock method inheritance is broken
« on: June 29, 2013, 09:42:19 AM »
Example:

Code: [Select]
function FirstScope::method1(%this)
{
echo("hello");
}

function FirstScope::method2(%this)
{
echo("world");
}

function SecondScope::method2(%this)
{
echo("foo");
}

==>%object = new Anything();
==>%object.addChildLayer(SecondScope);
==>%object.addChildLayer(FirstScope);
==>%object.callChildLayer(method1);
hello
==>%object.callChildLayer(method2);
world
foo

3588
Modification Help / Re: Datablock method inheritance is broken
« on: June 29, 2013, 09:33:49 AM »
I've created a (slightly hacky) system to replace this, for now: childLayer.cs (163 LOC)
Full function list:

void SimObject::addChildLayer(scope)
Adds a new namespace (x::) to the list of child layers on the object.
If the namespace is already a child layer, it is pushed to the top.

void SimObject::removeChildLayer(scope)
Removes a namespace (x::) from the list of child layers on the object.
If the namespace is not a child layer, no errors occur.

bool SimObject::hasChildLayer(scope)
Checks whether or not the object has the given scope as a child layer.

@any SimObject::callChildLayer(method[, *args:40])
Calls the given method on every child layer consecutively from the top.
Returns the first return value that is not "".

@any SimObject::terminalCallChildLayer(method[, *args:40])
Calls the given method on every child layer consecutively from the top.
Returns the first return value that is not "". The difference to ::callChildLayer,
is that this method stops when it reaches a layer that gives a return value that is not "".

3589
Modification Help / Re: Datablock method inheritance is broken
« on: June 29, 2013, 09:05:32 AM »
I tested it shortly after v21 was released and it worked.

3590
Code: [Select]
datablock PlayerData(Test1 : PlayerStandardArmor)
{
attribute1 = "hello";
attribute2 = "world";
};

function Test1::method1(%this)
{
echo("hello");
}

function Test1::method2(%this)
{
echo("world");
}

datablock PlayerData(Test2 : Test1)
{
attribute2 = "foo";
};

function Test2::method2(%this)
{
parent::method2(%this);
echo("foo");
}

I ran this code from `config/test.cs` on a Blockland installation with literally no Add-Ons (deleted all files including default in Add-Ons folder, bypassed launcher temporarily to prevent them from coming back), and this is the result.

==>echo(test2.attribute1);
hello
==>echo(test2.attribute2);
foo


Attribute inheritance and overwriting still works fine, however for functions, it doesn't work anymore.

==>test2.method1();
<input> (0): Unknown command method1.
  Object Test2(428) Test2 -> armor -> PlayerData -> ShapeBaseData -> GameBaseData -> SimDataBlock -> SimObject
==>test2.method2();
config/test.cs (24): Unknown command method2.
foo

3591
Off Topic / Re: In Tokyo! (Loads better than America)
« on: June 29, 2013, 08:50:37 AM »
Make sure you go to Akihabara and buy lots of figurines and hentai doujinshi.


3592
Off Topic / Re: The Port topic.
« on: June 29, 2013, 08:45:27 AM »


suk me dik

yeah well I'm gonna buy a new SSD and HDD in ~a month so go away

Ports get to win the cutest former award! Everyone, vote now!

I vote for not Port

3593
Anyone?

3594
Off Topic / Re: Post Your Desktop 2 / Desktop Megathread
« on: June 28, 2013, 02:31:32 PM »
Since there's been so much phone stuff going on anyway:



Google Galaxy Nexus (GSM), CyanogenMod 10.1-RC5 (Android 4.2.2), Action Launcher Pro, DashClock, stock wallpaper, stock icons.

3595
why am I in the poll
why am I in the last final
why do I have more than one vote

come on you guys
look at this handsome bastard


3596
Greek2me, what about the length limit on networked strings?

3597
Modification Help / Re: Endless Mining 2 (r358)
« on: June 28, 2013, 02:57:46 AM »
Are the revision numbers repo commit indexes?

3598
Off Topic / Re: Is page-stretching your own profile bannable?
« on: June 27, 2013, 03:14:24 PM »
The lorem ipsum "▬" character is the widest if you want.

Actually no, Uppercase W is wider

Any full-width character is the widest, IIRC: abcdefghijklmnopqrstuvwxyz

3599
Code: [Select]
%r = _compToHex( 255 * getWord( %rgb, 0 ) );
%g = _compToHex( 255 * getWord( %rgb, 0 ) );
%b = _compToHex( 255 * getWord( %rgb, 0 ) );

3600
Off Topic / Re: Skype video calling is free?
« on: June 27, 2013, 08:47:58 AM »
One-on-one video calls have always been "free and unlimited" on all devices. I can't imagine they made group video calling free.

Pages: 1 ... 235 236 237 238 239 [240] 241 242 243 244 245 ... 1041