Next deprecation question: Entity.setPosition

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Next deprecation question: Entity.setPosition

Post by Lestradae »

OK, so this is deprecated.

I have the line:

Code: Select all

this.ship.setPosition(newPosition);
... how does this have to be written for the trunk?

Thanks in advance 8)

L

Edit: Oh, and "newPosition" is defined before that in the script.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

this.ship.position = newPosition;

Or if you want 1.72/1.73 cross-compatibility, you need to use a function snippet like the one in Planetfall.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

Thargoid wrote:
Or if you want 1.72/1.73 cross-compatibility, you need to use a function snippet like the one in Planetfall.
Thanks T, will use your solution. The snippet is nescessary for OSE as you can assume, for the OSE escorts derived from yours.

And no, I don't give you-know-what for backwards compatibility before 1.73. Reason being that OSE needs at least two commands that are not in Oolite core before 1.73 to work at all ...

Cheers

L
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

It's actually Kak's original solution that he PM'd be ages ago, but I've just got around to using now I've got a working portable trunk install. But it's nothing too complex anyway that any number of variants will pop up in peoples scripting.
Post Reply