17 个版本
0.6.0 | 2022 年 10 月 1 日 |
---|---|
0.5.2 | 2021 年 11 月 10 日 |
0.5.1 | 2021 年 2 月 25 日 |
0.5.0 | 2020 年 11 月 19 日 |
#237 在 游戏
每月 48 次下载
24KB
450 代码行
Pactorio
Factorio 模组打包工具
安装
最新预编译的二进制文件可在 GitHub 上找到。
或者您可以使用 cargo 从 crates.io 安装 pactorio。
cargo install pactorio
从源代码构建
cargo build --release
用法
pactorio [FLAGS] [OPTIONS]
选项 | 描述 |
---|---|
-c, --compact | 紧凑地输出 info.json |
-z, --zip | 输出一个 zip 文件 |
--compression <method> | 指定压缩方法,没有 -z 标志时将被忽略 默认: stored 可能的值:stored, bzip2, deflate, zstd |
-d, --dir <directory> | 设置工作目录 |
-i, --input <file> | 指定要使用的配置文件 默认: pactorio.toml |
-o, --output <directory> | 指定输出目录 默认: release |
-u, --upload [<api-key>] | 上传到模组门户 需要 API 密钥,可以在 https://factorio.com/profile 上创建 |
-h, --help | 打印帮助信息(使用 -h 查看摘要) |
-V, --version | 打印版本信息 |
配置
默认情况下,pactorio 使用 pactorio.toml
作为其配置文件。
它与 info.json
文件类似,并使用 TOML 语法。
以下是一个 pactorio 配置文件的示例。
# Information about your package, similar to info.json
# https://wiki.factorio.com/Tutorial:Mod_structure#info.json
[package]
# Mandatory, internal name of your mod
name = "example_mod"
# Mandatory, version of your mod, "main.major.minor"
version = "0.1.0"
# Mandatory, display name of your mod
title = "Example mod"
# Mandatory, author of your mod, You
author = "You"
# Optional, for example your email address
contact = "[email protected]"
# Optional, link to the homepage of your mod
homepage = "https://you.example.com"
# Optional, short description of your mod
description = "Example mod. Does something and some other things. "
# Optional, default: "0.12", usually needs to be added
factorio_version = "1.0"
# Dependencies are separated into four parts, All four of them are optional
# They are under a table named "deps", you can also use "dependencies"
# Required dependencies
[deps.required]
# Same as "base >= 1.0" in info.json
base = ">= 1.0"
# Conflict or incompatible dependencies
[deps.conflict] # or [deps.incompatible]
# Same as "! bad_mod" in info.json
bad_mod = ""
# Same as "! incomp < 3" in info.json
incomp = "< 3"
# Optional dependencies
[deps.optional]
# Same as "opt_dep = 0.2.1" in info.json
opt_dep = "= 0.2.1"
# Hidden optional dependencies
[deps.hidden]
# Same as "hidden_dep > 2.0" in info.json
hidden_dep = "> 2.0"
# Optional, source directory
[source]
# Pactorio will use all the files under this directory
# Optional, default: "src"
dir = "src"
# A list of glob patterns to represent the files to include
# Relative to your source directory
# Optional, default: ["**/**"]
include = ["**/**"]
# A list of glob patterns to represent the files to ignore
# Relative to your source directory
# Optional, default: []
ignore = []
更新日志
依赖关系
~13–25MB
~390K SLoC