FullCab will show up above steelmill
parent
1501212daa
commit
3c48300bf9
Binary file not shown.
|
@ -1,7 +0,0 @@
|
|||
ManifestFileVersion: 0
|
||||
CRC: 966447639
|
||||
AssetBundleManifest:
|
||||
AssetBundleInfos:
|
||||
Info_0:
|
||||
Name: models.fullcab
|
||||
Dependencies: {}
|
Binary file not shown.
|
@ -1,29 +0,0 @@
|
|||
ManifestFileVersion: 0
|
||||
CRC: 1261696359
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: 1858f3bb33448328d19383b4869ef0d7
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: ae2cf77de671e115b4e55d2b65767202
|
||||
HashAppended: 0
|
||||
ClassTypes:
|
||||
- Class: 1
|
||||
Script: {instanceID: 0}
|
||||
- Class: 4
|
||||
Script: {instanceID: 0}
|
||||
- Class: 21
|
||||
Script: {instanceID: 0}
|
||||
- Class: 23
|
||||
Script: {instanceID: 0}
|
||||
- Class: 33
|
||||
Script: {instanceID: 0}
|
||||
- Class: 43
|
||||
Script: {instanceID: 0}
|
||||
- Class: 48
|
||||
Script: {instanceID: 0}
|
||||
SerializeReferenceClassIdentifiers: []
|
||||
Assets:
|
||||
- Assets/better282/fullcab.prefab
|
||||
Dependencies: []
|
|
@ -8,7 +8,6 @@ using System.Collections.Generic;
|
|||
using DV;
|
||||
using UnityEngine.UI;
|
||||
using System.ComponentModel;
|
||||
using static dumb282tweaks.Main;
|
||||
|
||||
namespace dumb282tweaks;
|
||||
|
||||
|
@ -29,6 +28,8 @@ public static class Main {
|
|||
"German"
|
||||
};
|
||||
|
||||
private static AssetBundle loadedAssetBundle;
|
||||
|
||||
// Load
|
||||
private static bool Load(UnityModManager.ModEntry modEntry) {
|
||||
Harmony? harmony = null;
|
||||
|
@ -43,8 +44,7 @@ public static class Main {
|
|||
harmony = new Harmony(Instance.Info.Id);
|
||||
harmony.PatchAll(Assembly.GetExecutingAssembly());
|
||||
|
||||
//var assets = AssetBundle.LoadFromFile(Path.Combine(modEntry.Path, "model.fullcab"));
|
||||
//var fullcab = assets.LoadAsset<GameObject>("fullcab");
|
||||
WorldStreamingInit.LoadingFinished += GameLoaded;
|
||||
} catch (Exception ex) {
|
||||
Instance.Logger.LogException($"Failed to load {Instance.Info.DisplayName}:", ex);
|
||||
harmony?.UnpatchAll(Instance.Info.Id);
|
||||
|
@ -54,6 +54,29 @@ public static class Main {
|
|||
return true;
|
||||
}
|
||||
|
||||
private static void GameLoaded() {
|
||||
WorldMover worldMoverScript = GameObject.Find("WorldMover").GetComponent<WorldMover>();
|
||||
|
||||
// Asset Loading
|
||||
var modelPath = Path.Combine(Instance.Path.ToString(), "assets\\fullcab");
|
||||
var loadedAssetBundle = AssetBundle.LoadFromFile(modelPath);
|
||||
|
||||
GameObject fullCabLoad = loadedAssetBundle.LoadAsset<GameObject>("Assets/fullcab.prefab");
|
||||
|
||||
//GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
|
||||
GameObject fullCab = GameObject.Instantiate(fullCabLoad);
|
||||
fullCab.transform.position = PlayerManager.GetWorldAbsolutePlayerPosition() + new Vector3(0, 6, 0);
|
||||
fullCab.transform.localScale = new Vector3(1, 1, 1);
|
||||
|
||||
fullCab.transform.position += WorldMover.currentMove;
|
||||
worldMoverScript.AddObjectToMove(fullCab.transform);
|
||||
|
||||
// Find all GameObjects
|
||||
//foreach(GameObject obj in Resources.FindObjectsOfTypeAll<GameObject>()) {
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
// GUI Rendering
|
||||
static void OnGUI(UnityModManager.ModEntry modEntry) {
|
||||
GUILayout.BeginVertical();
|
||||
|
@ -66,9 +89,6 @@ public static class Main {
|
|||
|
||||
GUILayout.Label("Smoke Deflector Type");
|
||||
Settings.smokeDeflectorType = (SmokeDeflectorType) GUILayout.SelectionGrid((int) Settings.smokeDeflectorType, smokeDeflectorTypeTexts, 1, "toggle");
|
||||
GUILayout.Space(2);
|
||||
|
||||
GUILayout.Label("Texture Utility");
|
||||
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
|
|
|
@ -31,6 +31,9 @@
|
|||
<Reference Include="Assembly-CSharp-firstpass">
|
||||
<HintPath>G:\SteamLibrary\steamapps\common\Derail Valley\DerailValley_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DV.Utils">
|
||||
<HintPath>G:\SteamLibrary\steamapps\common\Derail Valley\DerailValley_Data\Managed\DV.Utils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>G:\SteamLibrary\steamapps\common\Derail Valley\DerailValley_Data\Managed\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
|
|
|
@ -21,6 +21,13 @@ $ZipOutDir = "$ZipWorkDir/$modId"
|
|||
New-Item "$ZipOutDir" -ItemType Directory -Force
|
||||
Copy-Item -Force -Path $FilesToInclude -Destination "$ZipOutDir"
|
||||
|
||||
# Get-ChildItem $sourceDir -filter "*" -recurse | `
|
||||
# foreach{
|
||||
# $targetFile = $targetDir + $_.FullName.SubString($sourceDir.Length);
|
||||
# New-Item -ItemType File -Path $targetFile -Force;
|
||||
# Copy-Item $_.FullName -destination $targetFile
|
||||
# }
|
||||
|
||||
if (!$NoArchive)
|
||||
{
|
||||
$FILE_NAME = "$DistDir/${modId}_v$modVersion.zip"
|
||||
|
|
Loading…
Reference in New Issue