Code Monkey home page Code Monkey logo

cc-api's Introduction

Cc::Api

Work-in-progress project to generate LuaLS library files for CC: Tweaked (and some supported mods).

Currently (2024-04-12), all the library files are handwritten, sometimes with some help from generator tools.

Installation

TODO: Replace UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.

Install the gem and add to the application's Gemfile by executing:

$ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG

Usage

LuaLS

Add the path to the api folder in this repo to your Lua settings in VS Code:

{
  "Lua.workspace.library": [
    "/path/to/this/repo/api"
  ]
}

Mod support

  • CC APIs from Mekanism

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Generating Mekanism API files

In-game, in a CC computer, run the dump script in vendor/mekanism/dump.lua to generate the help files for all necessary Mekanism blocks.

Then extract the Lua files it generated by going into the world save folder, finding the folder for the computer you were using, and grabbing the files from the dump folder.

Place them into the vendor/mekanism folder in this repo to update them.

Run bundle exec exe/cc-api to generate new API files to out/mekanism.

Then check if any of the existing mekanism files in api/mekanism need updating.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Sharparam/cc-api.

License

Copyright © 2024 by Adam Hellberg.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

cc-api's People

Contributors

sharparam avatar

Watchers

Bjørn Tore Håvie avatar  avatar

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.