This commit is contained in:
Joshua Barretto 2021-07-29 10:22:14 +01:00
parent 4064872b9a
commit 76ba3496a1
5 changed files with 23 additions and 11 deletions

View File

@ -1,12 +1,9 @@
EntityConfig (
name: Some("Saurok Bandit"),
body: Some(RandomWith("saurok_mighty")),
name: Name("Saurok Bandit"),
body: RandomWith("saurok_mighty"),
alignment: Alignment(Enemy),
loot: Some(LootTable("common.loot_tables.creature.biped_large.saurok")),
loot: LootTable("common.loot_tables.creature.biped_large.saurok"),
main_tool: Some(Item("common.items.npc_weapons.bow.saurok_bow")),
second_tool: None,
loadout_asset: None,
skillset_asset: None,
hands: TwoHanded(Item("common.items.npc_weapons.bow.saurok_bow")),
)

View File

@ -593,7 +593,7 @@ impl<const AVERAGE_PALETTE: bool> VoxelImageDecoding for TriPngEncoding<AVERAGE_
} else {
use BlockKind::*;
match kind {
Air | Water | Lava | GlowingRock => Rgb { r: 0, g: 0, b: 0 },
Air | Water | Lava => Rgb { r: 0, g: 0, b: 0 },
Rock => Rgb {
r: 93,
g: 110,

View File

@ -33,6 +33,10 @@ enum AlignmentMark {
Uninit,
}
impl Default for AlignmentMark {
fn default() -> Self { Self::Alignment(Alignment::Wild) }
}
#[derive(Debug, Deserialize, Clone)]
enum LootKind {
Item(String),
@ -40,6 +44,10 @@ enum LootKind {
Uninit,
}
impl Default for LootKind {
fn default() -> Self { Self::Uninit }
}
#[derive(Debug, Deserialize, Clone)]
enum Hands {
TwoHanded(ItemSpec),
@ -51,6 +59,10 @@ enum Hands {
Uninit,
}
impl Default for Hands {
fn default() -> Self { Self::Uninit }
}
#[derive(Debug, Deserialize, Clone)]
enum Meta {
LoadoutAsset(String),
@ -124,6 +136,7 @@ pub struct EntityConfig {
/// Possible fields:
/// LoadoutAsset(String) with asset_specifier for loadout
/// SkillSetAsset(String) with asset_specifier for skillset
#[serde(default)]
meta: Vec<Meta>,
}

View File

@ -110,9 +110,11 @@ impl<'a> CanvasInfo<'a> {
cave: Default::default(),
cliff_height: 0.0,
contains_waypoint: false,
spot: None,
};
f(&CanvasInfo {
wpos: Vec2::broadcast(0),
chunk_pos: Vec2::zero(),
wpos: Vec2::zero(),
column_grid: &zcache_grid,
column_grid_border: 0,
chunks: sim,

View File

@ -88,7 +88,7 @@ pub fn apply_spots_to(canvas: &mut Canvas, dynamic_rng: &mut impl Rng) {
);
},
Spot::BanditCamp => {
let structures = Structure::load_group("dungeon_entrances").read();
let structures = Structure::load_group("dungeon_entrances.grassland").read();
let structure = structures.choose(&mut rng).unwrap();
let origin = spot_wpos.with_z(
canvas