angel-125 / sandcastle Goto Github PK
View Code? Open in Web Editor NEWBase building with KSP stock EVA Construction
Base building with KSP stock EVA Construction
Sandcastle: 3D Printed Bases Real-world references https://www.youtube.com/watch?v=yp_Xz6r2Aso https://room.eu.com/article/How_to_3Dprint_a_habitat_on_Mars https://www.nasa.gov/directorates/spacetech/centennial_challenges/3DPHab/index.html ---INSTALLATION--- Simply copy all the files into your GameData folder. When done, it should look like: GameData WildBlueIndustries Sandcastle WildBlueCore Changes - The Sandcaster 3D Printer can now recycle vessels, just like the Konstruction Manipulator. - Fixed issue where Sandcastle wouldn't show parts in the print shop window when Sandcastle was added to Pathfinder templates. - Fixed issue where the game would crash when deploying the Survey Cone from the Survey Cone Dispenser. - Fixed odd coloration on deployed survey cones. - Fixed issue where resources were pulled from the entire vessel instead of stage priority flow. ---LICENSE--- Near Future Props by Nertea, licensed under CC-BY-NC-SA-4.0 Art Assets, including .mu, .png, and .dds files are copyright 2021 by Michael Billard, All Rights Reserved. Wild Blue Industries is trademarked by Michael Billard. All rights reserved. Note that Wild Blue Industries is a ficticious entity created for entertainment purposes. It is in no way meant to represent a real entity. Any similarity to a real entity is purely coincidental. Source code copyright 2021 by Michael Billard (Angel-125) This source code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Hi,
I was trying to replace EPL with SimpleConstruction in my current game but found that it had issues working with SandCastle based on the errors coming from B9PartSwitch. I notice others have had this issue.
I worked out a patch that seems to fix the issues and at least passes a smoke test.
I'm sort of new at his but that patch appears to be okay. I don't know what would happed if you switched EPL to SimpleConsrtuction while having the Smelter or the SandCastle RocketParts container being used within the game.
Please feel free to include it if you find it appropriate.
SimpleConstruction.cfg.txt
(BTW this was against the SimpleConstruction-4.0.99.7-prerelease)
Also, sorry I wasn't paying attention and missed seeing the same issue as issue#3
[EXC 00:14:05.093] NullReferenceException: Object reference not set to an instance of an object
Sandcastle.Inventory.InventoryUtils.AddItem (Vessel vessel, AvailablePart availablePart, System.Int32 variantIndex, ModuleInventoryPart preferredInventory, System.Boolean removeResources) (at :0)
Sandcastle.PrintShop.WBIPrintShop.handlePrintJob (System.Double elapsedTime) (at :0)
Sandcastle.PrintShop.WBIPrintShop.processPrintQueue () (at :0)
Sandcastle.PrintShop.WBIPrintShop.FixedUpdate () (at :0)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
While testing Sandcastle together with the stock inventory mod I'm putting together, I noticed a few things, and I figured that would be useful for you :
InventoryUtils.AddItem()
The InventoryUtils.AddItem()
method is doing something very wrong, it calls StoreCargoPartAtSlot()
with a reference to the part prefab. You simply can't do that. First, this mean you're calling Save()/OnSave()
on the prefab, which mean you're executing some code that might alter the pristine prefab state, potentially having wide side effects on the entire game. Second, this will fail to produce a valid persisted state, as saving a non-initialized part is an unsupported scenario. There are multiple stock modules that simply throw an exception while doing so, and the situation will likely be even worse with modules from various plugins. You need to rework that method to first instantiate the part, then call StoreCargoPartAtSlot()
with that instance. For the same reason, the StoreCargoPartAtSlot()
overload that takes a part name shouldn't be used (and is actually unused by the stock code).
In various InventoryUtils
methods, you're relying on the part prefab mass / resource mass to check against the inventory available mass capacity. There is no guarantee that these values will be in line with the part instance real mass due to modules dynamically altering resources and IPartMassModifier modules. I guess this isn't much of an issue in practice since only Kerbal inventories have mass limits, and I guess you're not allowing storing parts there.
In the context of the stock inventory "extension" mod I'm putting together, the same issue would happen with cargo volume, as I'm implementing support for variable volume for mesh switchable / procedural parts.
In both cases, this is a tricky issue to fix, as there is no way to reliably get mass/volume without an actual part instance. My suggestion would be to rework how you're handling things, by creating the cargo part when its construction is requested instead of creating it when it is completed. Then you could have some special handling that "lock" the cargo part in the inventory (preventing it from being removed or interacted with) until its construction is done. But this would be a major rewrite and quite some work to implement.
An easier workaround would be to instantiate a dummy part every time you need to check mass volume, but this would be quite inefficient.
There's definitely some general weirdness going on with the cone deployer:
https://user-images.githubusercontent.com/2611674/178139678-fc087a82-239e-4941-bd4f-cc4ed86f8751.mp4
The deployer's volume used doesn't get updated, the craft starts sliding around, and then deploying the 2nd cone just crashes.
this log is from a different instance, but same thing happens (see at 13:19:28):
https://gist.github.com/Rodg88/b54e5ad013bf117263e28becdef57d00
I wonder if it's to do with the stuff gotmachine mentioned in #5 ?
The temperature ranges for the two electric smelters that are enabled when Extraplanetary Launchpads is installed differ wildly. While some difference might make sense given the different sizes, it seems unlikely that one is supposed to operate in the -136.575°C to -39.025°C range and the other is supposed to operate in the 0°C to 1599.85°C range.
This seems like a mistake with one of the configs, likely the MiniSmelter one, as EL uses the same temperatures as the large electric Smelter for its non-electric smelters.
Smelter modes for both:
Recycler modes for both:
It looks like the transforms for EL vessel spawning got messed up somehow.
The Construction marker spawns vessels 180 degrees from the intended direction, clipping it through the existing vessel:
And the Construction Manipulator spawns crafts 90 degrees from vertical and clipped into the part, causing them to be launched away when released:
Clancythecat on the KSP Forums says this started happening when the new EL update was released.
Whenever I reload a Sandcastle module the print shop and recyclers quit functioning. More specifically, the UI all remains completely functional, but it will only ever idle and not fabricate/recycle cargo. This only happens on reload, they work fine when first launching the modules.
see PR.
I noticed that I couldn't manipulate the Printshops or the Cargo containers while in EVA contruction mode. It looks like this was intended as there is a ModuleCargoPaart with packedVolume = -1 but it comes after the ModuleInventoryPart which is stopping it from working.
I've swapped the order of the modules and tested and am trying to submit a pull request. The affects the two printshops and the three cargo containers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.