Merchant offers: preserve required potion components

Co-Authored-By: OpenAI Codex GPT-6.1 Sol <noreply@openai.com>
This commit is contained in:
rdbtCVS
2026-10-26 10:38:26 +00:00
parent c0171fa6bc
commit d25d0f025b
6 changed files with 207 additions and 22 deletions
+2 -2
View File
@@ -163,7 +163,7 @@ pub struct Profile {
pub properties: Vec<(String, String, Option<String>)>,
}
impl Component {
fn read(kind: i32, r: &mut Reader) -> Result<Self> {
pub(crate) fn read(kind: i32, r: &mut Reader) -> Result<Self> {
use component::*;
Ok(match kind {
MAX_STACK_SIZE | MAX_DAMAGE | DAMAGE | RARITY | REPAIR_COST | MAP_ID
@@ -337,7 +337,7 @@ impl Component {
}
})
}
fn write(&self, kind: i32, w: &mut Writer) {
pub(crate) fn write(&self, kind: i32, w: &mut Writer) {
match self {
Self::Raw(bytes) => w.bytes(bytes),
Self::Trim { material, pattern } => {