Adress review

- Added comments on why Waypoint branch of NpcData is unreachable.
- Added comments on signature of get_adhoc_loadout.
This commit is contained in:
juliancoffee 2021-09-26 20:34:54 +03:00
parent 9c2fc0d962
commit 7576f632a8
2 changed files with 6 additions and 0 deletions

View File

@ -96,6 +96,9 @@ impl Entity {
}
}
/// Escape hatch for runtime creation of loadout not covered by entity config.
// NOTE: Signature is part of interface of EntityInfo, and site information
// is not used for RtSim as of now.
pub fn get_adhoc_loadout(
&self,
) -> fn(LoadoutBuilder, Option<&trade::SiteInformation>) -> LoadoutBuilder {

View File

@ -166,6 +166,9 @@ impl<'a> System<'a> for Sys {
rtsim_entity,
projectile: None,
},
// EntityConfig can't represent Waypoints at all
// as of now, and if someone will try to spawn
// rtsim waypoint it is definitely error.
NpcData::Waypoint(_) => unimplemented!(),
}
};