Code Monkey home page Code Monkey logo

Comments (8)

Neceros avatar Neceros commented on September 24, 2024

Thank you for this.

from srts-expanded.

thetianshuhuang avatar thetianshuhuang commented on September 24, 2024

No problem! I'm just trying to get all my mods to work together.

Even if your code isn't very clean, I do have to commend you on making it open source (unlike some major mod authors). Keep up the good work!

from srts-expanded.

SmashPhil avatar SmashPhil commented on September 24, 2024

what do you mean by "isn't very clean" ?

from srts-expanded.

thetianshuhuang avatar thetianshuhuang commented on September 24, 2024

Lack of documentation. For example, for .Split('_')[0], the "_Active" thing is my best guess as to why that is there, but I wouldn't be able to say that for sure without reading a lot more code (which I haven't bothered to do).

from srts-expanded.

SmashPhil avatar SmashPhil commented on September 24, 2024

I'll admit, it's not very commented, which is something I need to get back on... but I'm the only one touching the patches and I understand what is going on which is why I haven't really been hard pressed to do so. Your "best guess" is only half correct, and your assumption that SRTS is the sole factor in the contents disappearing is also incorrect. Save Our Ship 2 has some fairly good patches, and some fairly not so good patches. So i'll explain what's going on.

For starters.. .Split('_')[0] is for the _Active variant of transport pods, which is how the original mod was made. An easier solution would be to transfer references to the corresponding def via a Mod Extension, but I'm pressed on time and it's in working condition so I would rather focus on bugs and new content.

Also, that line is not what is causing your contents to disappear. In fact... your contents are not disappearing at all! Toggle hover mode off you dingus :) your shuttle is in hover mode.

Lastly... the error is simply an oversight since it's set to throw an error if it cannot locate the item in the def database. I've just set it to silent fail so the error will no longer trigger. It'll be pushed in the next update.

Last comments / thoughts before I close this issue?

from srts-expanded.

thetianshuhuang avatar thetianshuhuang commented on September 24, 2024

The contents are disappearing. When the game tries to load the shuttle into the map, it errors, which immediately exits the loading procedure. Therefore, both the shuttle and its contents disappear.

For the fix, you can try the explicit removal version (... t.def.defName.Substring(0, t.def.defName.LastIndexOf("_Active")) ...)

from srts-expanded.

SmashPhil avatar SmashPhil commented on September 24, 2024

I just tested both from orbit and on land, shuttle contents are fine and dropped properly.

using Substring would not resolve the issue you think it has. The error showing the logs is not related to your contents disappearing, it's related to the database not locating an item, which does not terminate the method.

edit: I should point out that you said the contents within the shuttle were disappearing, not the shuttle itself. Which is why I assumed the shuttle was landing correctly (which for me, it is).

from srts-expanded.

SmashPhil avatar SmashPhil commented on September 24, 2024

If you're still having issues, message us on discord, leave a comment on steam, or reopen the issue.. but after doing multiple tests and digging into SoS2 there doesn't seem to be any problems whatsoever. But from what you've given, and including the fact that you seem to think that string parsing has something to do with destroying objects, you either encountered a separate bug (such as something similar to when drop pods are destroyed upon a building spawning such as a infinite chemfuel or psychic emantor building), or you really didn't notice that the shuttle was in hover mode. For future reference, constructive criticism is better than soft insults.

Even if your code isn't very clean, I do have to commend you on making it open source

from srts-expanded.

Related Issues (8)

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.