ManiaScript for Visual Studio Code

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

zocka
Posts: 205
Joined: 15 Jun 2010, 17:56

Re: ManiaScript for Visual Studio Code

Post by zocka »

No, it's from the time of the closed beta and used the MP3 API. (see commit dates https://github.com/MattMcFarland/maniascript-parser)
manialink minigame shatter
my manialink: zockaml
my maniaflash: maniaflash?zocka
reaby
Posts: 1032
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: ManiaScript for Visual Studio Code

Post by reaby »

Hi,

any luck with the language server, still would love to see auto complete and ofc the language updated for maniaplanet4 :)
tonechild
Posts: 12
Joined: 20 Mar 2017, 12:43

Re: ManiaScript for Visual Studio Code

Post by tonechild »

Hi, we just got a new update (big thanks to a contributor named Noomaok!!!) with more support and new features for autocompletion etc. I'm really grateful for Noomaok's contribution to the project, and am proud to announce the release.
Noomaok
Posts: 6
Joined: 15 May 2017, 21:45

Re: ManiaScript for Visual Studio Code

Post by Noomaok »

Hi, new update. I added inheritance in the language so that you get all the methods from inherited classes.
Also added a support for those enum values. I am still working on a better way to do it but it works for now. There is still a lot to do to improve that extension and I am really exited about that. :D
If you have any suggestion about things that can be added or improved, feel free to share :thumbsup:
reaby
Posts: 1032
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: ManiaScript for Visual Studio Code

Post by reaby »

Noomaok wrote: 13 Aug 2018, 16:48 If you have any suggestion about things that can be added or improved, feel free to share :thumbsup:
I would love to see a new update for the lately maniascript changes on ManiaPlanet 4.1 :)
As maniascript is evolved since last update of the vs-code extension (structs added and maybe some other changes as well, which i'm not aware of).
I think I did read there was new methods for accessing arrrays, but can't remember right...

Question: Does the enums autocomplete work?
I tried autocomplete line:
if (Event.Type == CUIConfigEvent::EType::_OnLayerCustomEvent) {
Where I pressed ctrl+space when my caret was on red underscore, but it popped up apparently random stuff + array methods instead of the enum values.

Even though some minor things, this is by far the best tool for maniascript :)
So many many many thanks for creating and if you continue support!
Noomaok
Posts: 6
Joined: 15 May 2017, 21:45

Re: ManiaScript for Visual Studio Code

Post by Noomaok »

reaby wrote: 01 Feb 2019, 13:39 Question: Does the enums autocomplete work?
I tried some implementation of this but I still have some trouble to make it work properly. I am quite new to this stuff so i don't know how to do everything, but I am learning :p
I have some trouble with the ctrl+space shortcut, I am gonna work on that. Also, it's been a while since i didn't look to the changes to maniascript. I think i have to change a lot of things in the extension to make everything work properly. I just finish my exams of the semester so I've got plenty of time to work on it.

I will post some news when I have done some progress.

Thank you for your post :D
reaby
Posts: 1032
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: ManiaScript for Visual Studio Code

Post by reaby »

Cool, many thanks!
Noomaok
Posts: 6
Joined: 15 May 2017, 21:45

Re: ManiaScript for Visual Studio Code

Post by Noomaok »

Hi, the update is here.

Many new features available in this update :
  • Variables are added to the autocompletion field. Also, if the type is specified, completion is provided when using the "." symbol :

    Code: Select all

    #Const MyConst;
    declare MyVar;
    declare CBlockModel MyBlockModel;
    declare persistent MyPersistentVar;
    
  • User-defined structs are supported. A variable declare with the type of struct will access its attributes through the completion field :

    Code: Select all

    #Struct Date {
    	Integer second;
    	Integer minute;
    	Integer hour;
    }
    
    declare Date myDate;
    myDate.hour = 12;
    
  • RequireContext is also supported. If you use #RequiredContext in your script, you can access the differents shortcut to the methods and attributes of the class :

    Code: Select all

    #RequireContext CMapEditorPlugin
    
    ::CardinalDirections::East;
    
  • Enums have a better completion. You should have less issue using the ctrl+space shortcut in vscode

Things that will be added in the future :
- Namespace support (MahtLib, TextLib, ...)
- Check for any bugs and update of the maniascript language

I will try to work on an update of the language syntax highlighting to update it to the last version of maniascript but il will take a while.

If you find any bug or problem using the extension or if you have some ideas for further improvements, you can share it here or post an issue on the github page of the project.

Thank you for your support :thumbsup:
reaby
Posts: 1032
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: ManiaScript for Visual Studio Code

Post by reaby »

Many thanks for the update :thumbsup:
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 2 guests