mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
prefer imbris syntax proposal, documentation and changelog
This commit is contained in:
parent
1f976f9f1c
commit
b555d619fb
@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Camera zoom can now be locked, to prevent accidental zooming while rolling in combat. It comes
|
||||
with a keybind to enable/disable the setting, and an Auto/Toggle behavior setting. Auto behavior
|
||||
will only lock the camera zoom while movement and combat inputs are also being pressed.
|
||||
- Custom spots can be added without recompilation (only ron and vox files)
|
||||
|
||||
### Changed
|
||||
- Bats move slower and use a simple proportional controller to maintain altitude
|
||||
|
@ -1,8 +1,13 @@
|
||||
[
|
||||
// (
|
||||
// base_structures: "spots_general.mage_tower",
|
||||
// freq: 100.0,
|
||||
// condition: And3((Typical, MaxGradient(0.2), Biome([Forest, Taiga]))),
|
||||
// spawn: false,
|
||||
// ),
|
||||
// example entry, increase freq to activate
|
||||
(
|
||||
// ron file pointing to voxel model and defining special colors
|
||||
base_structures: "spots_general.mage_tower",
|
||||
// maximum occurance per each 1000km^2 world area
|
||||
freq: 0.0,
|
||||
// placement requirements
|
||||
condition: All([Typical, MaxGradient(0.2), Biome([Forest, Taiga])]),
|
||||
// whether to prevent trees etc. around this spot
|
||||
spawn: false,
|
||||
),
|
||||
]
|
||||
|
@ -851,8 +851,8 @@ enum SpotCondition {
|
||||
MinWaterDepth(f32),
|
||||
|
||||
Not(Box<SpotCondition>),
|
||||
And(Box<(SpotCondition, SpotCondition)>),
|
||||
And3(Box<(SpotCondition, SpotCondition, SpotCondition)>),
|
||||
All(Vec<SpotCondition>),
|
||||
Any(Vec<SpotCondition>),
|
||||
}
|
||||
|
||||
impl SpotCondition {
|
||||
@ -872,13 +872,21 @@ impl SpotCondition {
|
||||
SpotCondition::IsUnderwater.is_valid(g, c) && c.water_alt > c.alt + depth
|
||||
},
|
||||
SpotCondition::Not(condition) => !condition.is_valid(g, c),
|
||||
SpotCondition::And(conditions) => {
|
||||
conditions.0.is_valid(g, c) && conditions.1.is_valid(g, c)
|
||||
SpotCondition::All(conditions) => 'outer: {
|
||||
for cond in conditions.iter() {
|
||||
if !cond.is_valid(g, c) {
|
||||
break 'outer false;
|
||||
}
|
||||
}
|
||||
true
|
||||
},
|
||||
SpotCondition::And3(conditions) => {
|
||||
conditions.0.is_valid(g, c)
|
||||
&& conditions.1.is_valid(g, c)
|
||||
&& conditions.2.is_valid(g, c)
|
||||
SpotCondition::Any(conditions) => 'outer: {
|
||||
for cond in conditions.iter() {
|
||||
if cond.is_valid(g, c) {
|
||||
break 'outer true;
|
||||
}
|
||||
}
|
||||
false
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user