mirror of
https://codeberg.org/icewind/vbsp.git
synced 2026-06-03 10:44:07 +02:00
more entity types
This commit is contained in:
parent
6ced393424
commit
f808d67303
1 changed files with 180 additions and 5 deletions
|
|
@ -120,6 +120,7 @@ trait FromStrProp: FromStr {}
|
|||
impl FromStrProp for u8 {}
|
||||
impl FromStrProp for f32 {}
|
||||
impl FromStrProp for u32 {}
|
||||
impl FromStrProp for i32 {}
|
||||
impl FromStrProp for Vector {}
|
||||
|
||||
impl<T: FromStrProp> EntityProp<'_> for T
|
||||
|
|
@ -168,10 +169,14 @@ impl<'a, T: EntityProp<'a>> EntityProp<'a> for Option<T> {
|
|||
pub enum Entity<'a> {
|
||||
#[entity(name = "point_spotlight")]
|
||||
SpotLight(SpotLight),
|
||||
#[entity(name = "light")]
|
||||
Light(Light),
|
||||
#[entity(name = "light_spot")]
|
||||
LightSpot(LightSpot),
|
||||
#[entity(name = "prop_dynamic")]
|
||||
PropDynamic(PropDynamic<'a>),
|
||||
#[entity(name = "prop_dynamic_override")]
|
||||
PropDynamicOverride(PropDynamicOverride<'a>),
|
||||
#[entity(name = "prop_physics_multiplayer")]
|
||||
PropPhysics(PropDynamic<'a>),
|
||||
#[entity(name = "env_sprite")]
|
||||
|
|
@ -190,18 +195,43 @@ pub enum Entity<'a> {
|
|||
AmmoPackSmall(AmmoPack),
|
||||
#[entity(name = "item_ammopack_medium")]
|
||||
AmmoPackMedium(AmmoPack),
|
||||
#[entity(name = "item_ammopack_large")]
|
||||
HealthPackLarge(HealthPack),
|
||||
#[entity(name = "item_ammopack_full")]
|
||||
HealthPackFull(HealthPack),
|
||||
#[entity(name = "item_healthkit_small")]
|
||||
HealthPackSmall(HealthPack),
|
||||
#[entity(name = "item_healthkit_medium")]
|
||||
HealthPackMedium(HealthPack),
|
||||
#[entity(name = "item_healthkit_large")]
|
||||
AmmoPackLarge(AmmoPack),
|
||||
#[entity(name = "item_healthkit_full")]
|
||||
AmmoPackFull(AmmoPack),
|
||||
#[entity(name = "env_lightglow")]
|
||||
LightGlow(LightGlow),
|
||||
#[entity(name = "trigger_multiple")]
|
||||
TriggerMultiple(TriggerMultiple<'a>),
|
||||
#[entity(name = "logic_relay")]
|
||||
LogicRelay(LogicRelay<'a>),
|
||||
#[entity(name = "logic_auto")]
|
||||
LogicAuto(LogicAuto<'a>),
|
||||
#[entity(name = "func_dustmotes")]
|
||||
DustMotes(DustMotes<'a>),
|
||||
#[entity(name = "sky_camera")]
|
||||
SkyCamera(SkyCamera),
|
||||
#[entity(name = "path_track")]
|
||||
PathTrack(PathTrack<'a>),
|
||||
#[entity(name = "env_soundscape_proxy")]
|
||||
SoundScapeProxy(SoundScapeProxy<'a>),
|
||||
#[entity(name = "func_respawnroomvisualizer")]
|
||||
RespawnVisualizer(RespawnVisualizer<'a>),
|
||||
#[entity(default)]
|
||||
Unknown(RawEntity<'a>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Entity)]
|
||||
pub struct Light {
|
||||
pub origin: Vector,
|
||||
#[entity(name = "_light")]
|
||||
pub light: [u32; 4],
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Entity)]
|
||||
pub struct SpotLight {
|
||||
pub origin: Vector,
|
||||
|
|
@ -217,7 +247,7 @@ pub struct LightSpot {
|
|||
pub origin: Vector,
|
||||
pub angles: [f32; 3],
|
||||
#[entity(name = "_light")]
|
||||
pub color: [u8; 3],
|
||||
pub light: [u32; 4],
|
||||
#[entity(name = "_cone")]
|
||||
pub cone: u8,
|
||||
}
|
||||
|
|
@ -241,6 +271,25 @@ pub struct PropDynamic<'a> {
|
|||
pub parent: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Entity)]
|
||||
pub struct PropDynamicOverride<'a> {
|
||||
pub angles: [f32; 3],
|
||||
#[entity(name = "disablereceiveshadows", default)]
|
||||
pub disable_receive_shadows: bool,
|
||||
#[entity(name = "disableshadows", default)]
|
||||
pub disable_shadows: bool,
|
||||
#[entity(name = "modelscale")]
|
||||
pub scale: f32,
|
||||
pub model: &'a str,
|
||||
pub origin: Vector,
|
||||
#[entity(name = "rendercolor")]
|
||||
pub color: [u8; 3],
|
||||
#[entity(name = "targetname", default)]
|
||||
pub name: Option<&'a str>,
|
||||
#[entity(name = "parentname", default)]
|
||||
pub parent: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Entity)]
|
||||
pub struct EnvSprite<'a> {
|
||||
pub origin: Vector,
|
||||
|
|
@ -326,3 +375,129 @@ pub struct BrushEntity<'a> {
|
|||
#[entity(name = "rendercolor")]
|
||||
pub color: [f32; 3],
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Entity)]
|
||||
pub struct LightGlow {
|
||||
pub origin: Vector,
|
||||
#[entity(name = "VerticalGlowSize")]
|
||||
pub vertical_size: u32,
|
||||
#[entity(name = "HorizontalGlowSize")]
|
||||
pub horizontal_size: u32,
|
||||
#[entity(name = "StartDisabled", default)]
|
||||
pub start_disabled: bool,
|
||||
#[entity(name = "rendercolor")]
|
||||
pub color: [f32; 3],
|
||||
#[entity(name = "MinDist")]
|
||||
pub min_distance: u32,
|
||||
#[entity(name = "MaxDist")]
|
||||
pub max_distance: u32,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Entity)]
|
||||
pub struct TriggerMultiple<'a> {
|
||||
pub model: &'a str,
|
||||
pub origin: Vector,
|
||||
#[entity(name = "OnStartTouch", default)]
|
||||
pub start_touch: Option<&'a str>,
|
||||
#[entity(name = "OnStartTouchAll", default)]
|
||||
pub start_touch_all: Option<&'a str>,
|
||||
#[entity(name = "OnEndTouch", default)]
|
||||
pub end_touch: Option<&'a str>,
|
||||
#[entity(name = "OnEndTouchAll", default)]
|
||||
pub end_touch_all: Option<&'a str>,
|
||||
#[entity(name = "OnNotTouching", default)]
|
||||
pub not_touching: Option<&'a str>,
|
||||
#[entity(name = "targetname", default)]
|
||||
pub target_name: Option<&'a str>,
|
||||
#[entity(name = "filtername", default)]
|
||||
pub filter: Option<&'a str>,
|
||||
pub wait: Option<u32>,
|
||||
#[entity(name = "StartDisabled", default)]
|
||||
pub start_disabled: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Entity)]
|
||||
pub struct LogicRelay<'a> {
|
||||
pub origin: Vector,
|
||||
#[entity(name = "targetname", default)]
|
||||
pub target_name: Option<&'a str>,
|
||||
#[entity(name = "OnTrigger", default)]
|
||||
pub on_trigger: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Entity)]
|
||||
pub struct LogicAuto<'a> {
|
||||
pub origin: Vector,
|
||||
#[entity(name = "OnMapSpawn", default)]
|
||||
pub on_map_spawn: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Entity)]
|
||||
pub struct DustMotes<'a> {
|
||||
pub model: &'a str,
|
||||
pub origin: Vector,
|
||||
#[entity(name = "StartDisabled", default)]
|
||||
pub start_disabled: bool,
|
||||
#[entity(name = "Color")]
|
||||
pub color: [f32; 3],
|
||||
#[entity(name = "SpawnRate")]
|
||||
pub spawn_rate: u32,
|
||||
#[entity(name = "SizeMin")]
|
||||
pub size_min: u32,
|
||||
#[entity(name = "SizeMax")]
|
||||
pub size_max: u32,
|
||||
#[entity(name = "Alpha")]
|
||||
pub alpha: u8,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Entity)]
|
||||
pub struct SkyCamera {
|
||||
pub origin: Vector,
|
||||
#[entity(name = "fogenable")]
|
||||
pub fog: bool,
|
||||
pub use_angles: bool,
|
||||
#[entity(name = "fogstart")]
|
||||
pub fog_start: f32,
|
||||
#[entity(name = "fogend")]
|
||||
pub fog_end: f32,
|
||||
pub angles: [u32; 3],
|
||||
#[entity(name = "fogdir")]
|
||||
pub direction: [u8; 3],
|
||||
pub scale: u32,
|
||||
#[entity(name = "fogcolor")]
|
||||
pub color: [u8; 3],
|
||||
#[entity(name = "fogcolor2", default)]
|
||||
pub color2: Option<[u8; 3]>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Entity)]
|
||||
pub struct PathTrack<'a> {
|
||||
pub origin: Vector,
|
||||
#[entity(default)]
|
||||
pub target: Option<&'a str>,
|
||||
#[entity(name = "targetname", default)]
|
||||
pub target_name: Option<&'a str>,
|
||||
#[entity(name = "orientationtype", default)]
|
||||
pub orientation_type: u8,
|
||||
pub angles: [u32; 3],
|
||||
pub radius: f32,
|
||||
pub speed: f32,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Entity)]
|
||||
pub struct SoundScapeProxy<'a> {
|
||||
pub origin: Vector,
|
||||
pub radius: f32,
|
||||
#[entity(name = "MainSoundscapeName")]
|
||||
pub main_name: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Entity)]
|
||||
pub struct RespawnVisualizer<'a> {
|
||||
pub origin: Vector,
|
||||
#[entity(name = "respawnroomname")]
|
||||
pub room_name: &'a str,
|
||||
#[entity(name = "rendercolor")]
|
||||
pub color: [f32; 3],
|
||||
pub solid_to_enemies: bool,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue