public MissileWeaponModule(CategoryFlags ammoCategoryFlags) : base(ammoCategoryFlags) { _propertyExplosionRadius = new ExplosionRadiusProperty(this); AddProperty(_propertyExplosionRadius); MissileRangeModifier = new ModuleProperty(this, AggregateField.module_missile_range_modifier); MissileRangeModifier.AddEffectModifier(AggregateField.effect_missile_range_modifier); AddProperty(MissileRangeModifier); }
public ShieldGeneratorModule() { _shieldRadius = new ModuleProperty(this, AggregateField.shield_radius); AddProperty(_shieldRadius); _shieldAbsorbtion = new ModuleProperty(this, AggregateField.shield_absorbtion); _shieldAbsorbtion.AddEffectModifier(AggregateField.effect_shield_absorbtion_modifier); AddProperty(_shieldAbsorbtion); }
public WeaponModule(CategoryFlags ammoCategoryFlags) : base(ammoCategoryFlags, true) { _action = new ModuleAction(this); _damageModifier = new ModuleProperty(this, AggregateField.damage_modifier); AddProperty(_damageModifier); _accuracy = new ModuleProperty(this, AggregateField.accuracy); AddProperty(_accuracy); cycleTime.AddEffectModifier(AggregateField.effect_weapon_cycle_time_modifier); }
private void AddModuleProperty( IDictionary<ModuleProperty, object> moduleProperties, ModuleProperty key, object value) { if (value == null) { return; } moduleProperties.Put(key, value); }
private void ShowProp(int index) { MacroManager mm = MacroPlugin.Instance.MacroManager; MacroModule mod = mm.GetModule(index); /* Keys key = Keys.None; IDictionaryEnumerator ie = _keyToModule.GetEnumerator(); while (ie.MoveNext()) { if (ie.Value == mod) { key = (Keys)(ie.Key); break; } } */ ModuleProperty dlg = new ModuleProperty(this, mod); if (dlg.ShowDialog(this) == DialogResult.OK) { mm.ReplaceModule(mm.GetModule(index), dlg.Module); ListViewItem li = _list.Items[index]; li.Text = dlg.Module.Title; li.SubItems[1].Text = dlg.Module.Path; //li.SubItems[2].Text = UILibUtil.KeyString(dlg.ShortCut); li.SubItems[2].Text = GetInfoString(dlg.Module); AdjustUI(); } }
private void OnAddButtonClicked(object sender, EventArgs args) { ModuleProperty dlg = new ModuleProperty(this, null); MacroManager mm = MacroPlugin.Instance.MacroManager; if (dlg.ShowDialog(this) == DialogResult.OK) { AddListItem(dlg.Module); mm.AddModule(dlg.Module); //if(dlg.ShortCut!=Keys.None) _keyToModule.Add(dlg.ShortCut, dlg.Module); AdjustUI(); } }
private static CodegenExpression MakeModulePropKey(ModuleProperty key) { return EnumValue(typeof(ModuleProperty), key.GetName()); }