Skip to content

Commit 73590f0

Browse files
committed
FIXES amethyst#120 - Do not include auto-generated magic items on vendor list.
1 parent d79772a commit 73590f0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

book/src/chapter_69.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ fn append_magic_template(items_to_build : &mut Vec<NewMagicItem>, item : &super:
623623
fn build_base_magic_item(&self, nmw : &NewMagicItem) -> super::Item {
624624
let base_item_index = self.item_index[&nmw.name];
625625
let mut base_item_copy = self.raws.items[base_item_index].clone();
626+
base_item_copy.vendor_category = None; // Don't sell magic items!
626627

627628
if nmw.bonus == -1 {
628629
base_item_copy.name = format!("{} -1", nmw.name);

chapter-69-mushrooms2/src/raws/rawmaster.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ impl RawMaster {
9797
fn build_base_magic_item(&self, nmw : &NewMagicItem) -> super::Item {
9898
let base_item_index = self.item_index[&nmw.name];
9999
let mut base_item_copy = self.raws.items[base_item_index].clone();
100+
base_item_copy.vendor_category = None;
100101

101102
if nmw.bonus == -1 {
102103
base_item_copy.name = format!("{} -1", nmw.name);
@@ -151,7 +152,7 @@ impl RawMaster {
151152
weight : 10 - i32::abs(nmw.bonus),
152153
min_depth : 1 + i32::abs((nmw.bonus-1)*3),
153154
max_depth : 100,
154-
add_map_depth_to_weight : None
155+
add_map_depth_to_weight : None,
155156
});
156157
}
157158
}

0 commit comments

Comments
 (0)