Add scripted lightning weapon mods with interpolated anchored effects
This commit is contained in:
1 parent
98465133aa
commit
c0a6fd3431
50 files changed
+3500
-65
No files matched your search
@@ -92,6 +92,8 @@ pub enum WeaponBehavior {
|
||||
Spread,
|
||||
Bomb,
|
||||
EnergyGrab,
|
||||
/// Fire through on_fire only, without an automatic engine projectile.
|
||||
Scripted,
|
||||
}
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
@@ -423,6 +425,11 @@ impl Registry {
|
||||
};
|
||||
for w in self.weapons.values() {
|
||||
label(&w.name, &w.script)?;
|
||||
ensure!(
|
||||
!matches!(w.behavior, WeaponBehavior::Scripted) || w.script.is_some(),
|
||||
"scripted weapon {} requires a script",
|
||||
w.id
|
||||
);
|
||||
ensure!(
|
||||
w.damage > 0
|
||||
&& w.damage <= 100000
|
||||
|
||||
Reference in new issue
Block a user