forked from tgstation/rust-g
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
253 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.dm] | ||
indent_style = tab |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[package] | ||
name = "rust-g" | ||
edition = "2018" | ||
version = "0.4.6" | ||
version = "0.4.7" | ||
authors = ["Bjorn Neergaard <[email protected]>"] | ||
repository = "https://github.com/tgstation/rust-g" | ||
license-file = "LICENSE" | ||
|
@@ -20,6 +20,8 @@ thiserror = "1.0" | |
flume = { version = "0.9", optional = true } | ||
chrono = { version = "0.4", optional = true } | ||
md-5 = { version = "0.9", optional = true } | ||
twox-hash = { version = "1.6.0", optional = true } | ||
const-random = { version = "0.1.13", optional = true } | ||
sha-1 = { version = "0.9", optional = true } | ||
sha2 = { version = "0.9", optional = true } | ||
hex = { version = "0.4", optional = true } | ||
|
@@ -37,18 +39,26 @@ once_cell = { version = "1.4", optional = true } | |
mysql = { version = "20.0", optional = true } | ||
dashmap = { version = "3.11", optional = true } | ||
zip = { version = "0.5.8", optional = true } | ||
rand = {version = "0.7", optional = true} | ||
|
||
|
||
[features] | ||
default = ["dmi", "log", "git", "http", "json", "sql", "noise"] | ||
default = ["cellularnoise", "dmi", "file", "git", "http", "json", "log", "noise", "sql"] | ||
|
||
# default features | ||
cellularnoise = ["rand"] | ||
dmi = ["png", "image"] | ||
file = [] | ||
hash = ["md-5", "sha-1", "sha2", "hex"] | ||
json = ["serde", "serde_json"] | ||
log = ["chrono"] | ||
url = ["url-dep", "percent-encoding"] | ||
git = ["git2", "chrono"] | ||
http = ["reqwest", "serde", "serde_json", "once_cell", "jobs"] | ||
json = ["serde", "serde_json"] | ||
log = ["chrono"] | ||
sql = ["mysql", "serde", "serde_json", "once_cell", "dashmap", "jobs"] | ||
jobs = ["flume"] | ||
|
||
# non-default features | ||
hash = ["md-5", "sha-1", "sha2", "hex", "twox-hash", "const-random"] | ||
url = ["url-dep", "percent-encoding"] | ||
unzip = ["zip", "jobs"] | ||
|
||
# internal feature-like things | ||
jobs = ["flume"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* This proc generates a cellular automata noise grid which can be used in procedural generation methods. | ||
* | ||
* Returns a single string that goes row by row, with values of 1 representing an alive cell, and a value of 0 representing a dead cell. | ||
* | ||
* Arguments: | ||
* * percentage: The chance of a turf starting closed | ||
* * smoothing_iterations: The amount of iterations the cellular automata simulates before returning the results | ||
* * birth_limit: If the number of neighboring cells is higher than this amount, a cell is born | ||
* * death_limit: If the number of neighboring cells is lower than this amount, a cell dies | ||
* * width: The width of the grid. | ||
* * height: The height of the grid. | ||
*/ | ||
#define rustg_cnoise_generate(percentage, smoothing_iterations, birth_limit, death_limit, width, height) \ | ||
call(RUST_G, "cnoise_generate")(percentage, smoothing_iterations, birth_limit, death_limit, width, height) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#define rustg_dmi_strip_metadata(fname) call(RUST_G, "dmi_strip_metadata")(fname) | ||
#define rustg_dmi_create_png(path, width, height, data) call(RUST_G, "dmi_create_png")(path, width, height, data) | ||
#define rustg_dmi_resize_png(path, width, height, resizetype) call(RUST_G, "dmi_resize_png")(path, width, height, resizetype) | ||
#define rustg_dmi_strip_metadata(fname) call(RUST_G, "dmi_strip_metadata")(fname) | ||
#define rustg_dmi_create_png(path, width, height, data) call(RUST_G, "dmi_create_png")(path, width, height, data) | ||
#define rustg_dmi_resize_png(path, width, height, resizetype) call(RUST_G, "dmi_resize_png")(path, width, height, resizetype) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define rustg_git_revparse(rev) call(RUST_G, "rg_git_revparse")(rev) | ||
#define rustg_git_commit_date(rev) call(RUST_G, "rg_git_commit_date")(rev) | ||
#define rustg_git_revparse(rev) call(RUST_G, "rg_git_revparse")(rev) | ||
#define rustg_git_commit_date(rev) call(RUST_G, "rg_git_commit_date")(rev) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#define RUSTG_JOB_NO_RESULTS_YET "NO RESULTS YET" | ||
#define RUSTG_JOB_NO_SUCH_JOB "NO SUCH JOB" | ||
#define RUSTG_JOB_ERROR "JOB PANICKED" | ||
#define RUSTG_JOB_NO_RESULTS_YET "NO RESULTS YET" | ||
#define RUSTG_JOB_NO_SUCH_JOB "NO SUCH JOB" | ||
#define RUSTG_JOB_ERROR "JOB PANICKED" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
#define rustg_json_is_valid(text) (call(RUST_G, "json_is_valid")(text) == "true") | ||
#define rustg_json_is_valid(text) (call(RUST_G, "json_is_valid")(text) == "true") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define rustg_log_write(fname, text, format) call(RUST_G, "log_write")(fname, text, format) | ||
/proc/rustg_log_close_all() return call(RUST_G, "log_close_all")() | ||
#define rustg_log_write(fname, text, format) call(RUST_G, "log_write")(fname, text, format) | ||
/proc/rustg_log_close_all() return call(RUST_G, "log_close_all")() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,4 @@ | |
return __rust_g = "rust_g" | ||
|
||
#define RUST_G (__rust_g || __detect_rust_g()) | ||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
#define rustg_noise_get_at_coordinates(seed, x, y) call(RUST_G, "noise_get_at_coordinates")(seed, x, y) | ||
#define rustg_noise_get_at_coordinates(seed, x, y) call(RUST_G, "noise_get_at_coordinates")(seed, x, y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define rustg_unzip_download_async(url, unzip_directory) call(RUST_G, "unzip_download_async")(url, unzip_directory) | ||
#define rustg_unzip_check(job_id) call(RUST_G, "unzip_check")("[job_id]") | ||
#define rustg_unzip_check(job_id) call(RUST_G, "unzip_check")("[job_id]") |
Oops, something went wrong.