rlane / rlane-oni-mods

Oxygen Not Included mods
5 stars 2 forks source link

Meteor Defence Laser Crashes on FireAt (TypeLoadException) #13

Closed outseeker- closed 3 years ago

outseeker- commented 3 years ago

Hi, I love the idea of this mod! Sadly when it fires at a meteor, it crashes the game. It targets ok, and I can see the pewpew lazor beam is drawn, but then it crashes.

Maybe the method used to "destroy" the meteors has to change because of something they did to the core game?

TypeLoadException: Could not resolve type with token 01000034 (from typeref, class/assembly FMOD.Studio.EventInstance, Assembly-CSharp-firstpass

some kinda stack infos it gave me: rlane.MeteorDefenceLaser.FireAt(Comet, comet, System.Single dt)(at <5613c42f4f344bc29f8db49a36278619>:0) rlane.MeteorDefenceLaser.Sim33ms SimAndRenderScheduler+Sim33msUpdater.Update

If I read it right, these were executed bottom to top and crashed at FireAt- pls let me know if I can help :)

outseeker- commented 3 years ago

I manually transcribed that stuff before I noticed a Copy To Clipboard button lol

TypeLoadException: Could not resolve type with token 01000034 (from typeref, class/assembly FMOD.Studio.EventInstance, Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)

rlane.MeteorDefenseLaser.FireAt (Comet comet, System.Single dt) (at <5613c42f4f344bc29f8bd49a36278619>:0) rlane.MeteorDefenseLaser.Sim33ms (System.Single dt) (at <5613c42f4f344bc29f8bd49a36278619>:0) SimAndRenderScheduler+Sim33msUpdater.Update (ISim33ms updater, System.Single dt) (at <823c73e1dded498b9eec52a50d2e15ee>:0) UpdateBucketWithUpdater`1[DataType].Update (System.Single dt) (at <823c73e1dded498b9eec52a50d2e15ee>:0) StateMachineUpdater+BucketGroup.AdvanceOneSubTick (System.Single dt) (at <823c73e1dded498b9eec52a50d2e15ee>:0) StateMachineUpdater.AdvanceOneSimSubTick () (at <823c73e1dded498b9eec52a50d2e15ee>:0) Game.SimEveryTick (System.Single dt) (at <11c39c590d2042eda80ba0afaad84878>:0) Game.Update () (at <11c39c590d2042eda80ba0afaad84878>:0)

outseeker- commented 3 years ago

I notice from the sauce we're doing a bunch of stuff relating to heat and deciding whether to call destroy on the comet or not. I've never seen the mod working so I'm not certain, but no resources drop from a shot down meteor, yeah? So there's no real need to do anything except destroy the meteor object when we Fire, and call it a day? Regardless of meteor type and mass, etc?

outseeker- commented 3 years ago

So I forked your code and stuff, tried to get it to build and it kept throwing an error on Line 455 of MeteorDefenseLaser.cs It says that setParameterValue isn't a thing.. I have no idea how it compiled in the first place if that's the case lol

I changed it to setParameterByName and it compiles and runs fine (in sandbox mode at least). I can spawn meteors on it and they are fired upon :) thanks for your fine work in creating this mod!

outseeker- commented 3 years ago

Pull Request created, I think.. Though I can't link it to this Issue, idk how that's supposed to work.. If that's even what I need to do XD Sorry and thanks in advance <3

outseeker- commented 3 years ago

Fix merged :>