Opened 9 years ago

Closed 9 years ago

#2945 closed defect (fixed)

Aura doesn't work when there is a '.' in the xml scheme

Reported by: Niek Owned by: sanderd17
Priority: Must Have Milestone: Alpha 18
Component: UI & Simulation Keywords:
Cc: Patch:

Description

This is for example the case with 'food.grain':

  <Auras>
    <AuraFood>
      <Type>range</Type>
      <Radius>50</Radius>
      <Affects>Gatherer</Affects>
      <Modifications>
        <ResourceGatherer.Rates.food.grain>
	  <Multiply>1.20</Multiply>
	</ResourceGatherer.Rates.food.grain>
      </Modifications>
      <AuraName>"Rotary Mill" Aura</AuraName>
      <AuraDescription>Gatherers +20% Food Gather Rate within 50 meters.</AuraDescription>
    </AuraFood>
  </Auras>

The problem lies with Line 81 in Auras.js with the '.' from the Aura scheme gets replaced with a '/'. This means that while it should get ResourceGatherer/Rates/food.grain it gets ResourceGatherer/Rates/food/grain.

Change History (2)

comment:1 by leper, 9 years ago

We could just switch out . for some other character (eg _) in the templates and be done with it. (Using : might be a nicer choice than _, but that could cause issues with badly named elements and namespaces). Should also update Aura_Templates in that case.

Input?

comment:2 by sanderd17, 9 years ago

Owner: set to sanderd17
Resolution: fixed
Status: newclosed

In 16010:

Add support to escape dots (.) by using double dots (..) for aura keys. Fixes #2945 (I think)

Note: See TracTickets for help on using tickets.