diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-02-10 04:07:12 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-02-10 04:07:12 +0800 |
| commit | 275084f025b81da78f2a6c5cb23bc4a846a7b909 (patch) | |
| tree | f8899947ad53534318c7d531f1b0df2506620d9f /built_res/src | |
| parent | ade7980b250d0d679355d9583edd03deed871ff2 (diff) | |
Refactor converter and replace built_res with resource generator
Diffstat (limited to 'built_res/src')
| -rw-r--r-- | built_res/src/lib.rs | 2 | ||||
| -rw-r--r-- | built_res/src/res_sentences.rs | 51 | ||||
| -rw-r--r-- | built_res/src/structs.rs | 1 | ||||
| -rw-r--r-- | built_res/src/structs/sentence.rs | 12 |
4 files changed, 0 insertions, 66 deletions
diff --git a/built_res/src/lib.rs b/built_res/src/lib.rs deleted file mode 100644 index bef5b44..0000000 --- a/built_res/src/lib.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod res_sentences; -pub mod structs; diff --git a/built_res/src/res_sentences.rs b/built_res/src/res_sentences.rs deleted file mode 100644 index 8354ded..0000000 --- a/built_res/src/res_sentences.rs +++ /dev/null @@ -1,51 +0,0 @@ -use crate::structs::sentence::{Sentence, Token}; - -#[derive(Hash, PartialEq, Eq)] -pub enum SentenceId { - // 在此处确认所有跳转点 - Main0, - Main1, - Main2, - Ok1, -} - -pub fn get_sentence(id: SentenceId) -> Option<Sentence<'static>> { - match id { - SentenceId::Main0 => Some(Sentence { - content_tokens: &[ - &Token::Text("你好我是"), - &Token::Command("red"), - &Token::Text("猫尾草"), - &Token::Command("/"), - ], - next_sentence: Some(SentenceId::Main1), - }), - SentenceId::Main1 => Some(Sentence { - content_tokens: &[ - &Token::Text("你好我是"), - &Token::Command("red"), - &Token::Text("猫尾草"), - &Token::Command("/"), - ], - next_sentence: Some(SentenceId::Main2), - }), - SentenceId::Main2 => Some(Sentence { - content_tokens: &[ - &Token::Text("你好我是"), - &Token::Command("red"), - &Token::Text("猫尾草"), - &Token::Command("/"), - ], - next_sentence: Some(SentenceId::Ok1), - }), - SentenceId::Ok1 => Some(Sentence { - content_tokens: &[ - &Token::Text("你好我是"), - &Token::Command("red"), - &Token::Text("猫尾草"), - &Token::Command("/"), - ], - next_sentence: None, - }), - } -} diff --git a/built_res/src/structs.rs b/built_res/src/structs.rs deleted file mode 100644 index b7bb9ef..0000000 --- a/built_res/src/structs.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod sentence; diff --git a/built_res/src/structs/sentence.rs b/built_res/src/structs/sentence.rs deleted file mode 100644 index 270d5f7..0000000 --- a/built_res/src/structs/sentence.rs +++ /dev/null @@ -1,12 +0,0 @@ -pub struct Sentence<'a> { - pub content_tokens: &'a [&'static Token], - pub next_sentence: Option<crate::res_sentences::SentenceId>, -} - -pub enum Token { - Text(&'static str), - BoldText(&'static str), - ItalicText(&'static str), - BoldItalicText(&'static str), - Command(&'static str), -} |
