Giter VIP home page Giter VIP logo

Comments (12)

KennethGF avatar KennethGF commented on June 18, 2024

Got a crash in CombatEngine.cs at the last line of code see here, line 88 in my version. Might be something to do with surviving assets count?

_public bool IsCombatOver
{
get
{
if (_allSidesStandDown)
return true;
//if (_assets.Count(assets => assets.CombatShips.);
return (assets.Count(assets => assets.HasSurvivingAssets) <= 1);
}
}

from botf2.

ExultantMonkey avatar ExultantMonkey commented on June 18, 2024

That one has been reported at #6

from botf2.

KennethGF avatar KennethGF commented on June 18, 2024

Getting an error out of Borg combat from PerformAssimilation() and PerformRetreat() in CombatEngine.cs?

Looking like the OnwerID is still null at some point?

System.Collections.Generic.KeyNotFoundException
HResult=0x80131577
Message=The given key was not present in the dictionary.
Source=SupremacyCore
StackTrace:
at Supremacy.Collections.KeyedCollectionBase`2.get_Item(TKey key) in C:\Users\Kenneth Flanagan\Documents\1A_20180415_BOTF2\BotF2\SupremacyCore\Collections\ObservableKeyedCollection.cs:line 107
at Supremacy.Orbitals.Fleet.OnLocationChanged() in C:\Users\Kenneth Flanagan\Documents\1A_20180415_BOTF2\BotF2\SupremacyCore\Orbitals\Fleet.cs:line 623
at Supremacy.Universe.UniverseObject.set_Location(MapLocation value) in C:\Users\Kenneth Flanagan\Documents\1A_20180415_BOTF2\BotF2\SupremacyCore\Universe\UniverseObject.cs:line 257
at Supremacy.Combat.CombatEngine.PerformRetreat() in C:\Users\Kenneth Flanagan\Documents\1A_20180415_BOTF2\BotF2\SupremacyCore\Combat\CombatEngine.cs:line 435
at Supremacy.Combat.CombatEngine.ResolveCombatRound() in C:\Users\Kenneth Flanagan\Documents\1A_20180415_BOTF2\BotF2\SupremacyCore\Combat\CombatEngine.cs:line 169
at Supremacy.WCF.SupremacyService.TryResumeCombat(CombatEngine engine) in C:\Users\Kenneth Flanagan\Documents\1A_20180415_BOTF2\BotF2\SupremacyService\SupremacyService.cs:line 1232

from botf2.

KennethGF avatar KennethGF commented on June 18, 2024

KeyedCollectionBase<GameObjectID, Civiliation> is read only

So cannot be updated on assimilation? Workaround with remove and replace with a Borg game object?

from botf2.

ExultantMonkey avatar ExultantMonkey commented on June 18, 2024

I've had a quick look at it and the problem is that the OwnerID is null like you said, the read only has nothing to do with it.

The owner is set in CombatEngine:PerformAssimilation() with the line _ship.Fleet.OwnerID = 7;

Need to figure out how this value propogates, or even if this is the right thing to do. Surely we should be applying it to the individual ship and then transferring that ship to the Borg fleet.

Now that I know where to look I'll start working on it slowly. My time will be freeing up in the next few weeks

from botf2.

bote-reginald avatar bote-reginald commented on June 18, 2024

Oh God, sorry. When we unskilled coders coded this -> Borg was 7. Meanwhile we throw out "INTRO"-race we implemented for some -resolved now- UI problems. Now Borg are 6, (Fed = 0)

from botf2.

ExultantMonkey avatar ExultantMonkey commented on June 18, 2024

Ah, that's a nice easy fix then

from botf2.

KennethGF avatar KennethGF commented on June 18, 2024

from botf2.

ExultantMonkey avatar ExultantMonkey commented on June 18, 2024

Since your doing a lot in the combat code I'll let you make the change, otherwise things might get conflicted when it goes in to master

from botf2.

KennethGF avatar KennethGF commented on June 18, 2024

from botf2.

KennethGF avatar KennethGF commented on June 18, 2024

Not crashing but working on combat with assimilated ships now

from botf2.

KennethGF avatar KennethGF commented on June 18, 2024

Appears to be working

from botf2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.