modde_games/cyberpunk/
manifest.rs1use serde::Deserialize;
4
5#[derive(Debug, Clone, Deserialize)]
7pub struct RedModManifest {
8 pub name: String,
9 pub version: Option<String>,
10 #[serde(default)]
11 pub custom_sounds: Vec<CustomSound>,
12 #[serde(default)]
13 pub scripts: Vec<ScriptEntry>,
14}
15
16#[derive(Debug, Clone, Deserialize)]
18pub struct CustomSound {
19 pub name: String,
20 #[serde(rename = "type")]
21 pub sound_type: Option<String>,
22 pub file: String,
23}
24
25#[derive(Debug, Clone, Deserialize)]
27pub struct ScriptEntry {
28 pub name: String,
29 pub path: Option<String>,
30}
31
32impl RedModManifest {
33 pub fn parse(json: &str) -> anyhow::Result<Self> {
35 Ok(serde_json::from_str(json)?)
36 }
37}