fix: broken list

This commit is contained in:
2025-03-17 02:26:17 +00:00
parent af4929a5b3
commit fe1a32f31b
7 changed files with 23 additions and 20 deletions

View File

@ -3,7 +3,7 @@ use derive_more::Display;
use serde::{Deserialize, Serialize};
use std::{collections::BTreeSet, path::{Path, PathBuf}};
use tokio::fs;
use enumflags2::{bitflags, BitFlags};
use enumflags2::{bitflags, make_bitflags, BitFlags};
use crate::{model::{local::{self, PackageManifest}, rainy}, util};
// {namespace}-{name}
@ -36,6 +36,7 @@ pub enum Status {
#[repr(u8)]
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum Feature {
Mod,
Hook,
GameIO,
Aime,
@ -185,11 +186,11 @@ impl Package {
fn parse_status(mft: &PackageManifest) -> Status {
if mft.installers.len() == 0 {
return Status::OK(BitFlags::default());//Unchecked
return Status::OK(make_bitflags!(Feature::Mod));//Unchecked
} else if mft.installers.len() == 1 {
if let Some(serde_json::Value::String(id)) = &mft.installers[0].get("identifier") {
if id == "rainycolor" {
return Status::OK(BitFlags::default());
return Status::OK(make_bitflags!(Feature::Mod));
} else if id == "segatools" {
// Multiple features in the same dll (yubideck etc.) should be supported at some point
let mut flags = BitFlags::default();