Skip to content

Commit

Permalink
v0.702
Browse files Browse the repository at this point in the history
  • Loading branch information
ozonexo3 committed Mar 18, 2021
1 parent e3fcac7 commit 10fe3fa
Show file tree
Hide file tree
Showing 19 changed files with 607 additions and 345 deletions.
377 changes: 187 additions & 190 deletions Assembly-CSharp-Editor-firstpass.csproj

Large diffs are not rendered by default.

76 changes: 39 additions & 37 deletions Assets/MapEditor.unity
Original file line number Diff line number Diff line change
Expand Up @@ -46475,7 +46475,7 @@ Camera:
serializedVersion: 2
m_Bits: 2560
m_RenderingPath: 1
m_TargetTexture: {fileID: 554479264}
m_TargetTexture: {fileID: 1315184174}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
Expand Down Expand Up @@ -48275,41 +48275,6 @@ RectTransform:
type: 3}
m_PrefabInstance: {fileID: 554446698}
m_PrefabAsset: {fileID: 0}
--- !u!84 &554479264
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 3
m_Width: 256
m_Height: 256
m_AntiAliasing: 1
m_MipCount: -1
m_DepthFormat: 1
m_ColorFormat: 8
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
--- !u!1 &556835170
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -78562,6 +78527,8 @@ MonoBehaviour:
m_Image: {fileID: 0}
- m_Text: Island
m_Image: {fileID: 0}
- m_Text: Effect
m_Image: {fileID: 0}
- m_Text: WeatherGenerator
m_Image: {fileID: 0}
- m_Text: WeatherDefinition
Expand Down Expand Up @@ -113293,6 +113260,41 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1314836769}
m_CullTransparentMesh: 0
--- !u!84 &1315184174
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 3
m_Width: 256
m_Height: 256
m_AntiAliasing: 1
m_MipCount: -1
m_DepthFormat: 1
m_ColorFormat: 8
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
--- !u!1 &1315528963
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -139565,7 +139567,7 @@ PrefabInstance:
- target: {fileID: 114572867960888294, guid: 42ecef83ed2fc73438f171b60a7ecf23,
type: 3}
propertyPath: m_Text
value: Clound Count Range
value: Cloud Count Range
objectReference: {fileID: 0}
- target: {fileID: 224650603028264108, guid: 42ecef83ed2fc73438f171b60a7ecf23,
type: 3}
Expand Down
39 changes: 38 additions & 1 deletion Assets/Plugins/DotNetOpenAuth.dll.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/Scripts/Common/EditorVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
public class EditorVersion : MonoBehaviour
{

public const string EditorBuildVersion = "v0.701-Alpha";
public const string EditorBuildVersion = "v0.702-Alpha";

#if PRERELEASE
// Prerelease
Expand Down
9 changes: 6 additions & 3 deletions Assets/Scripts/HazardX SCMAP Code/Prop_Instance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ public void Bake()
MassMath.QuaternionToRotationMatrix(Obj.Tr.localRotation, ref RotationX, ref RotationY, ref RotationZ);

Scale = Obj.Tr.localScale;
Scale.x /= Group.PropObject.BP.LocalScale.x;
Scale.y /= Group.PropObject.BP.LocalScale.y;
Scale.z /= Group.PropObject.BP.LocalScale.z;
if (Group.PropObject.BP != null)
{
Scale.x /= Group.PropObject.BP.LocalScale.x;
Scale.y /= Group.PropObject.BP.LocalScale.y;
Scale.z /= Group.PropObject.BP.LocalScale.z;
}
}

public void CreateObject(Vector3 WorldPosition, Quaternion WorldRotation, Vector3 WorldScale, bool AllowFarLod = true)
Expand Down
19 changes: 5 additions & 14 deletions Assets/Scripts/Ozone SCMAP Code/GetGamedataFile/GetGamedataFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public static Texture2D LoadTexture2D(string LocalPath, bool NormalMap = false,

if (IsDxt3)
{
texture = DDS.DDSReader.LoadDDSTexture(new MemoryStream(FinalTextureData2), false).ToTexture2D();
texture = DDS.DDSReader.LoadDDSTexture2D(new MemoryStream(FinalTextureData2));
}
else
{
Expand All @@ -143,23 +143,13 @@ public static Texture2D LoadTexture2D(string LocalPath, bool NormalMap = false,
catch (System.Exception e)
{
Debug.Log("Texture load fallback: " + LocalPath + "\n" + e);

try
{
texture = DDS.DDSReader.LoadDDSTexture(new MemoryStream(FinalTextureData2), false).ToTexture2D();
}
catch (System.Exception e2)
{
Debug.Log("Fallback failed!\n" + e2);
return Texture2D.whiteTexture;
}
texture = DDS.DDSReader.LoadDDSTexture2D(new MemoryStream(FinalTextureData2));
}
}

if (FlipBlueRed)
if (FlipBlueRed && texture.isReadable)
{
texture = CannelFlip(texture);

}

FinalTextureData2 = null;
Expand All @@ -168,7 +158,8 @@ public static Texture2D LoadTexture2D(string LocalPath, bool NormalMap = false,
texture.mipMapBias = MipmapBias;
texture.filterMode = FilterMode.Bilinear;
texture.anisoLevel = AnisoLevel;
texture.Apply(false, SetUnreadable);
if(texture.isReadable)
texture.Apply(false, SetUnreadable);

if (StoreInMemory)
texture = AddToMemory(TextureKey, ref texture);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public class PropObject

public PropGameObject CreatePropGameObject(Vector3 position, Quaternion rotation, Vector3 scale, bool AllowFarLod = true)
{

if (IsTemp)
{
IsTemp = false;
if(BP != null)
for(int i = 0; i < BP.LODs.Length; i++)
{
if (BP.LODs[i].Albedo != null)
Expand Down Expand Up @@ -72,6 +72,9 @@ public PropGameObject CreatePropGameObject(Vector3 position, Quaternion rotation
else
{
PropGameObject NewProp = GameObject.Instantiate(PropsInfo.Current.PropObjectPrefab, PropsInfo.Current.PropsParent).GetComponent<PropGameObject>();
if (BP == null)
return NewProp;

NewProp.gameObject.name = BP.Name;

StoredPrefab = NewProp;
Expand Down
20 changes: 20 additions & 0 deletions Assets/Scripts/Ozone SCMAP Code/Lua/SaveLua_Marker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,26 @@ public static string GetLowestName(Marker.MarkerTypes Type)
return prefix + ID.ToString("00");
}

public static string GetLowestName(string oldName)
{
string prefix = oldName;
while(prefix.Length > 0 && char.IsDigit(prefix[prefix.Length - 1]))
{
prefix = prefix.Remove(prefix.Length - 1);
}

if(prefix.Length <= 0)
{
prefix = "Marker_";
}

int ID = 0;
while (MarkerExist(prefix + ID.ToString("00")))
ID++;

return prefix + ID.ToString("00");
}

private void ConnectAdjacentMarkers()
{
int mc = 0;
Expand Down
7 changes: 0 additions & 7 deletions Assets/Scripts/Ozone SCMAP Code/MapLuaParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,6 @@ IEnumerator LoadingFile()
else
EditMenu.MapInfoMenu.SaveAsSc.isOn = true;

//EditMenu.MapInfoMenu.SaveAsFa.isOn = HeightmapControler.map.VersionMinor >= 60;
//EditMenu.MapInfoMenu.SaveAsSc.isOn = !EditMenu.MapInfoMenu.SaveAsFa.isOn;

InfoPopup.Show(true, "Loading map...\n(" + ScenarioLuaFile.Data.save + ")");
yield return null;

Expand Down Expand Up @@ -520,10 +517,6 @@ public IEnumerator SaveMapProcess()
SaveLuaFile.Save(SaveFilePath);
yield return null;

//SaveScenarioLua();
//SaveSaveLua();
//SaveScriptLua(ScriptId);

SaveScmap();
yield return null;

Expand Down
Loading

0 comments on commit 10fe3fa

Please sign in to comment.