View Issue Details

IDProjectCategoryLast Update
0021800AI War 2GUIOct 18, 2019 4:41 pm
ReporterOzoneGrif Assigned To 
Status newResolutionopen 
Product Version0.900 Custom Fleets With Empty Slots 
Summary0021800: Metal outflow tooltip lies about the cost of repairing a shield
DescriptionI noticed that repairing shields was costing metal, based on the metal tooltip outflow.
After a discussion on Discord about the cost of repairing shields, we found this code:
if ( hadAnyBubbleForcefields )
{
  this.StoredMetal -= costOfRepair;
  metalSpent += costOfRepair;
}

So, repairing shields is apparently free (given back directly to the store), but the game thinks it isn't, and that translate to an erroneous information in the metal outflow tooltip.
TagsNo tags attached.

Activities

BadgerBadger

Oct 14, 2019 12:42 am

manager   ~0053638

Last edited: Oct 18, 2019 4:41 pm

The logic concerning cost of shield repairs is a bit hacky; there is an XML to theoretically control it, but we're not using it. The code just says "Oh, if this isn't a bubble shield repair, don't actually spend any metal".

I'm not sure off the top of my head how to check whether it's a bubble shield repair from the vis code; the Faction.cs code handles it by checking all the gameentities in question to see whethe the shield radius > 0

Also worth noting that this is a pretty minor issue. The code is working fine, the game just says you're spending a bit more money than you actually are.

Issue History

Date Modified Username Field Change
Oct 13, 2019 4:48 pm OzoneGrif New Issue
Oct 14, 2019 12:42 am BadgerBadger Note Added: 0053638
Oct 18, 2019 4:41 pm BadgerBadger Note Edited: 0053638