Modding Discussion About lua API

Discussion in 'Starbound Modding' started by etwxr9, Jun 15, 2021.

  1. etwxr9

    etwxr9 Void-Bound Voyager

    Actually it's not a modding question.
    I'm now making an lua API in a java project(a minecraft bukkit plugin) using luaj
    I know a little about Starbound Modding so I took a look.

    And I found that in Starbound you can directly call a global function like animator.setParticleEmitterActive("healing", true) in bed.lua(it's a player effect) , without a entity or bed.lua itself as a parament

    but the animator just know which entity to set the particle. How? Many Starbound lua API functions can do this.

    Because in sth like an effect lua it is difficult and complex to get a player instance, I want to do the same thing in my java project. But I cant figure out a way to call a global function without a player parament.

    So does anyone know how to do that? Or how starbound wrote the lua API?
     
    Last edited: Jun 16, 2021

Share This Page