Skip to content

Commit

Permalink
Merge branch 'singularity'
Browse files Browse the repository at this point in the history
  • Loading branch information
blitzmann committed Jul 2, 2016
2 parents b4bd6e7 + 01a0745 commit 2df01c7
Show file tree
Hide file tree
Showing 275 changed files with 300 additions and 62 deletions.
2 changes: 1 addition & 1 deletion eos/effects/elitereconbonusenergyneutamount2.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", ship.getModifiedItemAttr("eliteBonusReconShip2"), skill="Recon Ships")
"energyNeutralizerAmount", ship.getModifiedItemAttr("eliteBonusReconShip2"), skill="Recon Ships")
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# Skill: EM Shield Compensation
type = "passive"
def handler(fit, skill, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Amplifier",
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Resistance Amplifier",
"emDamageResistanceBonus", skill.getModifiedItemAttr("hardeningBonus") * skill.level)
2 changes: 1 addition & 1 deletion eos/effects/energydestabilizationnew.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ def handler(fit, container, context):
if "projected" in context and ((hasattr(container, "state") \
and container.state >= State.ACTIVE) or hasattr(container, "amountActive")):
multiplier = container.amountActive if hasattr(container, "amountActive") else 1
amount = container.getModifiedItemAttr("energyDestabilizationAmount")
amount = container.getModifiedItemAttr("energyNeutralizerAmount")
time = container.getModifiedItemAttr("duration")
fit.addDrain(time, amount * multiplier, 0)
2 changes: 1 addition & 1 deletion eos/effects/energyneutralizerentity.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
def handler(fit, container, context):
if "projected" in context and ((hasattr(container, "state") \
and container.state >= State.ACTIVE) or hasattr(container, "amountActive")):
amount = container.getModifiedItemAttr("energyDestabilizationAmount")
amount = container.getModifiedItemAttr("energyNeutralizerAmount")
time = container.getModifiedItemAttr("duration")
fit.addDrain(time, amount, 0)
2 changes: 1 addition & 1 deletion eos/effects/energyneutralizerfalloff.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
def handler(fit, container, context):
if "projected" in context and ((hasattr(container, "state") \
and container.state >= State.ACTIVE) or hasattr(container, "amountActive")):
amount = container.getModifiedItemAttr("energyDestabilizationAmount")
amount = container.getModifiedItemAttr("energyNeutralizerAmount")
time = container.getModifiedItemAttr("duration")
fit.addDrain(time, amount, 0)
7 changes: 7 additions & 0 deletions eos/effects/entityecmfalloff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type = "projected", "active"
def handler(fit, module, context):
if "projected" in context:
# jam formula: 1 - (1- (jammer str/ship str))^(# of jam mods with same str))
strModifier = 1 - module.getModifiedItemAttr("scan{0}StrengthBonus".format(fit.scanType))/fit.scanStrength

fit.ecmProjectedStr *= strModifier
12 changes: 12 additions & 0 deletions eos/effects/entityenergyneutralizerfalloff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# energyNeutralizerFalloff
#
# Used by:
# Modules from group: Energy Neutralizer (51 of 51)
from eos.types import State
type = "active", "projected"
def handler(fit, container, context):
if "projected" in context and ((hasattr(container, "state") \
and container.state >= State.ACTIVE) or hasattr(container, "amountActive")):
amount = container.getModifiedItemAttr("energyNeutralizerAmount")
time = container.getModifiedItemAttr("energyNeutralizerDuration")
fit.addDrain(time, amount, 0)
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# Skill: Explosive Shield Compensation
type = "passive"
def handler(fit, skill, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Amplifier",
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Resistance Amplifier",
"explosiveDamageResistanceBonus", skill.getModifiedItemAttr("hardeningBonus") * skill.level)
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# Skill: Kinetic Shield Compensation
type = "passive"
def handler(fit, skill, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Amplifier",
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Resistance Amplifier",
"kineticDamageResistanceBonus",
skill.getModifiedItemAttr("hardeningBonus") * skill.level)
2 changes: 1 addition & 1 deletion eos/effects/modifyshieldresonancepostpercent.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# modifyShieldResonancePostPercent
#
# Used by:
# Modules from group: Shield Amplifier (88 of 88)
# Modules from group: Shield Resistance Amplifier (88 of 88)
type = "passive"
def handler(fit, module, context):
for type in ("kinetic", "thermal", "explosive", "em"):
Expand Down
3 changes: 1 addition & 2 deletions eos/effects/modulebonusnetworkedsensorarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
# Module: Networked Sensor Array
type = "active"
def handler(fit, src, context):
fit.ship.increaseItemAttr("maxLockedTargets", src.getModifiedItemAttr("maxLockedTargetsBonus"))
fit.ship.multiplyItemAttr("maxTargetRange", src.getModifiedItemAttr("maxTargetRangeMultiplier"), stackingPenalties=True, penaltyGroup="postMul")
fit.ship.multiplyItemAttr("scanResolution", src.getModifiedItemAttr("scanResolutionMultiplier"), stackingPenalties=True)
fit.ship.boostItemAttr("scanResolution", src.getModifiedItemAttr("scanResolutionBonus"), stackingPenalties=True)

for scanType in ('Magnetometric', 'Ladar', 'Gravimetric', 'Radar'):
fit.ship.boostItemAttr("scan{}Strength".format(scanType),
Expand Down
7 changes: 1 addition & 6 deletions eos/effects/modulebonussiegemodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,9 @@ def handler(fit, src, context):
fit.ship.forceItemAttr("disallowAssistance", src.getModifiedItemAttr("disallowAssistance"))

# new in April 2016 release
for scanType in ('Magnetometric', 'Ladar', 'Gravimetric', 'Radar'):
fit.ship.boostItemAttr("scan{}Strength".format(scanType),
src.getModifiedItemAttr("scan{}StrengthPercent".format(scanType)),
stackingPenalties=True)

# missile ROF bonus
for group in ("Missile Launcher XL Torpedo", "Missile Launcher Rapid Torpedo", "Missile Launcher XL Cruise"):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == group, "speed", src.getModifiedItemAttr("siegeLauncherROFBonus"), stackingPenalties=True)
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == group, "speed", src.getModifiedItemAttr("siegeLauncherROFBonus"))

fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Torpedoes"), "maxVelocity", src.getModifiedItemAttr("siegeTorpedoVelocityBonus"), stackingPenalties=True)

Expand Down
6 changes: 0 additions & 6 deletions eos/effects/modulebonustriagemodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ def handler(fit, src, context):
fit.ship.forceItemAttr("disallowAssistance", src.getModifiedItemAttr("disallowAssistance"))

# new in April 2016 release

for scanType in ('Magnetometric', 'Ladar', 'Gravimetric', 'Radar'):
fit.ship.boostItemAttr("scan{}Strength".format(scanType),
src.getModifiedItemAttr("scan{}StrengthPercent".format(scanType)),
stackingPenalties=True)

fit.drones.filteredItemBoost(lambda mod: mod.item.requiresSkill("Drones"), "damageMultiplier", src.getModifiedItemAttr("droneDamageBonus"), stackingPenalties=True)

fit.ship.increaseItemAttr("warpScrambleStatus", src.getModifiedItemAttr("siegeModeWarpStatus"))
Expand Down
5 changes: 5 additions & 0 deletions eos/effects/rigdrawbackreductionarmor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Armor", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl)
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Resource Processing", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl)
5 changes: 5 additions & 0 deletions eos/effects/rigdrawbackreductionastronautics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Navigation", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl)
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Anchor", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl)
4 changes: 4 additions & 0 deletions eos/effects/rigdrawbackreductiondrones.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Drones", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl)
6 changes: 6 additions & 0 deletions eos/effects/rigdrawbackreductionelectronic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Electronic Systems", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl)
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Scanning", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl)
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Targeting", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl)
4 changes: 4 additions & 0 deletions eos/effects/rigdrawbackreductionenergyweapon.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Energy Weapon", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl)
4 changes: 4 additions & 0 deletions eos/effects/rigdrawbackreductionhybrid.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Hybrid Weapon", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl)
4 changes: 4 additions & 0 deletions eos/effects/rigdrawbackreductionlauncher.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Launcher", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl)
4 changes: 4 additions & 0 deletions eos/effects/rigdrawbackreductionprojectile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Projectile Weapon", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl)
4 changes: 4 additions & 0 deletions eos/effects/rigdrawbackreductionshield.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Rig Shield", "drawback", src.getModifiedItemAttr("rigDrawbackBonus") * lvl)
2 changes: 1 addition & 1 deletion eos/effects/shieldcapacitybonusonline.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# shieldCapacityBonusOnline
#
# Used by:
# Modules from group: Shield Amplifier (88 of 88)
# Modules from group: Shield Resistance Amplifier (88 of 88)
# Modules from group: Shield Extender (33 of 33)
type = "passive"
def handler(fit, module, context):
Expand Down
3 changes: 3 additions & 0 deletions eos/effects/shipbonusdreadnoughtm1webbonus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type = "passive"
def handler(fit, src, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Stasis Web", "speedFactor", src.getModifiedItemAttr("shipBonusDreadnoughtM1"), skill="Minmatar Dreadnought")
3 changes: 3 additions & 0 deletions eos/effects/shipbonussupercarrierm1burstprojectorwebbonus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type = "passive"
def handler(fit, src, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Burst Projector Operation"), "speedFactor", src.getModifiedItemAttr("shipBonusSupercarrierM1"), skill="Minmatar Carrier")
3 changes: 3 additions & 0 deletions eos/effects/shipbonustitanm1webbonus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type = "passive"
def handler(fit, src, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Stasis Web", "speedFactor", src.getModifiedItemAttr("shipBonusTitanM1"), skill="Minmatar Titan")
3 changes: 3 additions & 0 deletions eos/effects/shipbonustitanrole3damagebonus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type = "passive"
def handler(fit, src, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capital Hybrid Turret"), "damageMultiplier", src.getModifiedItemAttr("shipBonusRole3"))
2 changes: 1 addition & 1 deletion eos/effects/shipenergyneutralizertransferamountbonusab.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", ship.getModifiedItemAttr("shipBonusAB"), skill="Amarr Battleship")
"energyNeutralizerAmount", ship.getModifiedItemAttr("shipBonusAB"), skill="Amarr Battleship")
2 changes: 1 addition & 1 deletion eos/effects/shipenergyneutralizertransferamountbonusac.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", ship.getModifiedItemAttr("shipBonusAC"), skill="Amarr Cruiser")
"energyNeutralizerAmount", ship.getModifiedItemAttr("shipBonusAC"), skill="Amarr Cruiser")
2 changes: 1 addition & 1 deletion eos/effects/shipenergyneutralizertransferamountbonusaf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", ship.getModifiedItemAttr("shipBonusAF"), skill="Amarr Frigate")
"energyNeutralizerAmount", ship.getModifiedItemAttr("shipBonusAF"), skill="Amarr Frigate")
2 changes: 1 addition & 1 deletion eos/effects/shipenergyneutralizertransferamountbonusaf2.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", ship.getModifiedItemAttr("shipBonus2AF"), skill="Amarr Frigate")
"energyNeutralizerAmount", ship.getModifiedItemAttr("shipBonus2AF"), skill="Amarr Frigate")
2 changes: 1 addition & 1 deletion eos/effects/shipneutdestabilizationamountbonusrookie.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", ship.getModifiedItemAttr("rookieNeutDrain"))
"energyNeutralizerAmount", ship.getModifiedItemAttr("rookieNeutDrain"))
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", module.getModifiedItemAttr("subsystemBonusAmarrElectronic"), skill="Amarr Electronic Systems")
"energyNeutralizerAmount", module.getModifiedItemAttr("subsystemBonusAmarrElectronic"), skill="Amarr Electronic Systems")
2 changes: 1 addition & 1 deletion eos/effects/systemenergyneutmultiplier.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
type = ("projected", "passive")
def handler(fit, beacon, context):
fit.modules.filteredItemMultiply(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyDestabilizationAmount", beacon.getModifiedItemAttr("energyWarfareStrengthMultiplier"),
"energyNeutralizerAmount", beacon.getModifiedItemAttr("energyWarfareStrengthMultiplier"),
stackingPenalties=True, penaltyGroup="postMul")
2 changes: 1 addition & 1 deletion eos/effects/systemneutbombs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
type = ("projected", "passive")
def handler(fit, beacon, context):
fit.modules.filteredChargeMultiply(lambda mod: mod.charge.requiresSkill("Bomb Deployment"),
"energyDestabilizationAmount", beacon.getModifiedItemAttr("smartbombDamageMultiplier"),
"energyNeutralizerAmount", beacon.getModifiedItemAttr("smartbombDamageMultiplier"),
stackingPenalties=True, penaltyGroup="postMul")
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# Skill: Thermal Shield Compensation
type = "passive"
def handler(fit, skill, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Amplifier",
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Shield Resistance Amplifier",
"thermalDamageResistanceBonus", skill.getModifiedItemAttr("hardeningBonus") * skill.level)
3 changes: 1 addition & 2 deletions eos/graph/fitDps.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,10 @@ def calculateMissileMultiplier(self, mod, data):
targetSigRad = explosionRadius if targetSigRad is None else targetSigRad
explosionVelocity = mod.getModifiedChargeAttr("aoeVelocity")
damageReductionFactor = mod.getModifiedChargeAttr("aoeDamageReductionFactor")
damageReductionSensitivity = mod.getModifiedChargeAttr("aoeDamageReductionSensitivity")

sigRadiusFactor = targetSigRad / explosionRadius
if targetVelocity:
velocityFactor = (explosionVelocity / explosionRadius * targetSigRad / targetVelocity) ** (log(damageReductionFactor) / log(damageReductionSensitivity))
velocityFactor = (explosionVelocity / explosionRadius * targetSigRad / targetVelocity) ** damageReductionFactor
else:
velocityFactor = 1

Expand Down
Binary file modified eve.db
Binary file not shown.
4 changes: 0 additions & 4 deletions gui/builtinStatsViews/resistancesViewFull.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ def refreshPanel(self, fit):
self.showEffective = True
wx.PostEvent(self.mainFrame, EffectiveHpToggled(effective=True))
return
elif fit is not None and fit.ID != self.activeFit and not self.showEffective:
self.showEffective = True
wx.PostEvent(self.mainFrame, EffectiveHpToggled(effective=True))
return

self.stEHPs.SetLabel("EHP" if self.showEffective else "HP")
self.activeFit = fit.ID if fit is not None else None
Expand Down
6 changes: 3 additions & 3 deletions gui/builtinViewColumns/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def __getData(self, stuff):
info.append("{0}{1}".format(n, slot[0].upper()))
return "+ "+", ".join(info), "Slot Modifiers"
elif itemGroup == "Energy Neutralizer":
neutAmount = stuff.getModifiedItemAttr("energyDestabilizationAmount")
neutAmount = stuff.getModifiedItemAttr("energyNeutralizerAmount")
cycleTime = stuff.cycleTime
if not neutAmount or not cycleTime:
return "", None
Expand Down Expand Up @@ -429,8 +429,8 @@ def __getData(self, stuff):
tooltip = "{0} repaired per second".format(formatList(ttEntries)).capitalize()
return text, tooltip
elif itemGroup == "Energy Neutralizer Drone":
neutAmount = stuff.getModifiedItemAttr("energyDestabilizationAmount")
cycleTime = stuff.getModifiedItemAttr("duration")
neutAmount = stuff.getModifiedItemAttr("energyNeutralizerAmount")
cycleTime = stuff.getModifiedItemAttr("energyNeutralizerDuration")
if not neutAmount or not cycleTime:
return "", None
capPerSec = float(-neutAmount) * 1000 / cycleTime
Expand Down
7 changes: 4 additions & 3 deletions gui/builtinViews/entityEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ def OnNew(self, event):
dlg.CenterOnParent()

if dlg.ShowModal() == wx.ID_OK:
new = self.DoNew(dlg.GetValue().strip())
# using dlg.textctrl.GetValue instead of simply dlg.GetValue because the proper way does not work in wxPython 2.8
new = self.DoNew(dlg.txtctrl.GetValue().strip())
self.refreshEntityList(new)
wx.PostEvent(self.entityChoices, wx.CommandEvent(wx.wxEVT_COMMAND_CHOICE_SELECTED))
else:
Expand All @@ -114,7 +115,7 @@ def OnCopy(self, event):
dlg.CenterOnParent()

if dlg.ShowModal() == wx.ID_OK:
copy = self.DoCopy(active, dlg.GetValue().strip())
copy = self.DoCopy(active, dlg.txtctrl.GetValue().strip())
self.refreshEntityList(copy)
wx.PostEvent(self.entityChoices, wx.CommandEvent(wx.wxEVT_COMMAND_CHOICE_SELECTED))

Expand All @@ -128,7 +129,7 @@ def OnRename(self, event):
dlg.CenterOnParent()

if dlg.ShowModal() == wx.ID_OK:
self.DoRename(active, dlg.GetValue().strip())
self.DoRename(active, dlg.txtctrl.GetValue().strip())
self.refreshEntityList(active)
wx.PostEvent(self.entityChoices, wx.CommandEvent(wx.wxEVT_COMMAND_CHOICE_SELECTED))

Expand Down
4 changes: 2 additions & 2 deletions gui/characterEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ def Clone(self):
return CharacterTextValidor()

def Validate(self, win):
profileEditor = win.Parent
entityEditor = win.parent
textCtrl = self.GetWindow()
text = textCtrl.GetValue().strip()

try:
if len(text) == 0:
raise ValueError("You must supply a name for the Character!")
elif text in [x.name for x in profileEditor.entityEditor.choices]:
elif text in [x.name for x in entityEditor.choices]:
raise ValueError("Character name already in use, please choose another.")

return True
Expand Down
Loading

0 comments on commit 2df01c7

Please sign in to comment.