yogarine / crayta-stub-generator

此包已废弃,不再维护。未建议替代包。

Crayta 的 Lua stubs

v2.1.1 2021-08-30 16:15 UTC

This package is auto-updated.

Last update: 2024-02-14 21:30:26 UTC


README

Crayta API 文档的 Lua stub 生成器。

Crayta 是一款免费的游戏创作游戏。您可以在这里查看:(https://www.crayta.com)

要求

安装

通过运行 composer require yogarine/crayta-stub-generator 将此包添加到您的项目中,或使用 composer global require yogarine/crayta-stub-generator 进行全局安装。

用法

从您的项目目录运行 vendor/bin/create-crayta-stubs,或如果已全局安装,则运行 create-crayta-stubs 以生成 stubs。它们将被放置在当前工作目录的 stubs 子目录中。

开发

使用 Legendary 更新 LuaDocs xml 文件

  1. 安装并配置 Legendary(见 https://github.com/derrod/legendary#how-to-runinstall

    • 在 macOS 上的安装
      1. brew install python3.9
      2. pip3 install legendary-gl
    • 配置
      1. legendary auth
  2. 运行 legendary list-games 以获取正确的 app name

    legendary list-games

    app name 可能是一个 32 位的哈希值,如 a0a49d82e3f64c1b81873397a6e92f09

  3. 使用给定的 app name 安装应用程序

    legendary install a0a49d82e3f64c1b81873397a6e92f09
  4. 复制 LuaDocs。

    cp -af ~/legendary/Crayta/Crayta/Content/LuaDocs/* LuaDocs/

免责声明

此项目与 Crayta、其开发者 Unit 2 Games 没有任何官方关联。Crayta 是一个注册商标,Crayta stubs 及其包含的文档版权属于 Unit 2 Games。根据 Unit 2 Games 的服务条款,stub 可以仅用于 Crayta 的推广。