Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bc8ba0dc3 | ||
|
|
dd3a71884c | ||
|
|
4e95706226 | ||
|
|
4add77c4e0 |
Generated
+1
-1
@@ -1332,7 +1332,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "gta-tools"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"catppuccin-egui",
|
||||
"eframe",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "gta-tools"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
more spaghetti than the nation of italy
|
||||
|
||||

|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::gui::App;
|
||||
use crate::{features, gui::App, util::Countdown};
|
||||
use std::time::{Duration, Instant};
|
||||
use sysinfo::System;
|
||||
use windows::Win32::{
|
||||
@@ -13,6 +13,7 @@ const LEGACY: &str = "GTA5.exe";
|
||||
pub struct EmptySession {
|
||||
pub enabled: bool,
|
||||
pub interval: Instant,
|
||||
pub countdown: Countdown,
|
||||
}
|
||||
|
||||
impl Default for EmptySession {
|
||||
@@ -20,6 +21,7 @@ impl Default for EmptySession {
|
||||
Self {
|
||||
enabled: true,
|
||||
interval: Instant::now(),
|
||||
countdown: Countdown::new(features::empty_session::INTERVAL.as_secs() as usize),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ pub fn launch(platform: &Platform) {
|
||||
Platform::Rockstar => {
|
||||
let hklm = RegKey::predef(HKEY_LOCAL_MACHINE);
|
||||
let Ok(gta_v_enhanced) =
|
||||
hklm.open_subkey(r"SOFTWARE\WOW6432Node\Rockstar Games\GTA V Enhanced")
|
||||
hklm.open_subkey(r"SOFTWARE\WOW6432Node\Rockstar Games\GTAV Enhanced")
|
||||
else {
|
||||
return;
|
||||
};
|
||||
|
||||
+4
-11
@@ -1,12 +1,9 @@
|
||||
use crate::{
|
||||
features::{
|
||||
use crate::features::{
|
||||
self,
|
||||
anti_afk::AntiAfk,
|
||||
empty_session::EmptySession,
|
||||
force_close::ForceClose,
|
||||
launch::{Launch, Platform},
|
||||
},
|
||||
util::Countdown,
|
||||
};
|
||||
use eframe::egui;
|
||||
use std::time::{Duration, Instant};
|
||||
@@ -20,7 +17,6 @@ pub struct App {
|
||||
pub launch: Launch,
|
||||
pub force_close: ForceClose,
|
||||
pub empty_session: EmptySession,
|
||||
pub empty_session_countdown: Countdown,
|
||||
pub anti_afk: AntiAfk,
|
||||
}
|
||||
|
||||
@@ -32,9 +28,6 @@ impl Default for App {
|
||||
game_handle: HANDLE::default(),
|
||||
launch: Launch::default(),
|
||||
force_close: ForceClose::default(),
|
||||
empty_session_countdown: Countdown::new(
|
||||
features::empty_session::INTERVAL.as_secs() as usize
|
||||
),
|
||||
empty_session: EmptySession::default(),
|
||||
anti_afk: AntiAfk::default(),
|
||||
}
|
||||
@@ -107,15 +100,15 @@ impl eframe::App for App {
|
||||
features::empty_session::activate(self);
|
||||
}
|
||||
if !self.empty_session.enabled {
|
||||
self.empty_session_countdown.count();
|
||||
self.empty_session.countdown.count();
|
||||
} else {
|
||||
self.empty_session_countdown.reset();
|
||||
self.empty_session.countdown.reset();
|
||||
}
|
||||
if self.empty_session.interval.elapsed() >= features::empty_session::INTERVAL {
|
||||
features::empty_session::deactivate(self);
|
||||
self.empty_session.enabled = true;
|
||||
}
|
||||
ui.label(&self.empty_session_countdown.i_string);
|
||||
ui.label(&self.empty_session.countdown.i_string);
|
||||
});
|
||||
});
|
||||
ui.checkbox(&mut self.anti_afk.enabled, "Anti AFK")
|
||||
|
||||
Reference in New Issue
Block a user