Code Monkey home page Code Monkey logo

Comments (8)

ForLoveOfCats avatar ForLoveOfCats commented on May 21, 2024

This is now becoming a high priority as 0.1 has shipped.

Please comment suggestions and requests below as to what features are wished from the mod api.

from skyofsteel.

RedstoneParadox avatar RedstoneParadox commented on May 21, 2024

A few things I'd like to see/work on:

  • Functions to place and remove platforms.
  • Functions to save and load custom data to and from the save file.
  • The ability to expose custom functions to the console (by passing in a high-order function and a name).

from skyofsteel.

ForLoveOfCats avatar ForLoveOfCats commented on May 21, 2024

Yes I was meaning to mention that I need to add a JS type for structures. Save and load should be easy, however the custom functions to the console will be tricky. I have pondered it before and the main issue is that the console engine is never and should never be restarted as that would clear all user defined variables and functions. However when a mod is unloaded all functions it created in the console must be removed.

from skyofsteel.

ForLoveOfCats avatar ForLoveOfCats commented on May 21, 2024

One way this could be achieved is by storing a list of all functions that the current gamemode has exposed to the console and setting them all to undefined when the gamemode is unloaded. (One cannot delete functions in JS)

from skyofsteel.

ForLoveOfCats avatar ForLoveOfCats commented on May 21, 2024

We need a system to execute JS code in the target engine when exposing a type to said engine. Some features the these types must be implemented directly in JS itself (like overriding .toString) so this would allow for that.

from skyofsteel.

ForLoveOfCats avatar ForLoveOfCats commented on May 21, 2024

So the new plan is unsandboxed IronPython scripts with explicit manual installation instead of autodownload from server and execute.

Work has begun in the IronPython branch https://github.com/ForLoveOfCats/SkyOfSteel/tree/IronPython

from skyofsteel.

ForLoveOfCats avatar ForLoveOfCats commented on May 21, 2024

Exposing custom functions to the console will be possible now with IronPython as when the gamemode is unloaded we can delete the functions it exposed to the console. (Python allows deleting functions whereas JS does not)

from skyofsteel.

ForLoveOfCats avatar ForLoveOfCats commented on May 21, 2024

Closing this as the game's entire internal API is now exposed with the new C# gamemode scripting

from skyofsteel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.