Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Jul 28, 2024
1 parent 1f0d58a commit 67a2ac4
Show file tree
Hide file tree
Showing 4 changed files with 320 additions and 12 deletions.
293 changes: 293 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,18 @@ version = "0.1.0"
edition = "2021"

[dependencies]
#rivets = { path = "C:/Users/zacha/Documents/factorio/bin/rivets"}
retour = { version = "0.3", features = ["static-detour"] }
tracing = "0.1.40"
anyhow = "1.0.86"

[lib]
crate-type = ["dylib"]
path = "src/lib.rs"

[lints.clippy]
nursery = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
unwrap_used = "warn"
expect_used = "allow"
trivial_regex = "allow"
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "[internal-mod-name]",
"name": "achievement-enabler",
"version": "0.0.0",
"title": "[MOD DISPLAY NAME]",
"author": "[YOUR MODS.FACTORIO.COM USERNAME]",
Expand Down
22 changes: 11 additions & 11 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;
use tracing::info;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
#[no_mangle]
pub extern "C" fn main_detour() -> extern "C" fn() -> bool {
extern "C" fn a() ->bool {
false
}
a
}

#[no_mangle]
pub extern "C" fn mangled_name() -> String {
"?valid@LuaSurface@@UEBA_NXZ".to_string()
}

0 comments on commit 67a2ac4

Please sign in to comment.