-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Added CubeBlock functionality into CubeGrid interface
-Expanded sector object tree for saved game data to include sub-items on sector objects update #27
- Loading branch information
1 parent
6b6393c
commit 374ec88
Showing
4 changed files
with
135 additions
and
14 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,73 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
using Sandbox.Common.ObjectBuilders; | ||
using Sandbox.Common.ObjectBuilders.Definitions; | ||
using Sandbox.Common.ObjectBuilders.VRageData; | ||
|
||
using SEModAPI.API.Definitions; | ||
|
||
namespace SEModAPI.API.SaveData | ||
{ | ||
class CubeBlock | ||
public class CubeBlock : OverLayerDefinition<MyObjectBuilder_CubeBlock> | ||
{ | ||
#region "Constructors and Initializers" | ||
|
||
public CubeBlock(MyObjectBuilder_CubeBlock definition) | ||
: base(definition) | ||
{} | ||
|
||
#endregion | ||
|
||
#region "Properties" | ||
|
||
new public string Name | ||
{ | ||
get { return this.GetNameFrom(m_baseDefinition); } | ||
} | ||
|
||
public SerializableVector3I Min | ||
{ | ||
get { return m_baseDefinition.Min; } | ||
set | ||
{ | ||
if (m_baseDefinition.Min.Equals(value)) return; | ||
m_baseDefinition.Min = value; | ||
Changed = true; | ||
} | ||
} | ||
|
||
public SerializableBlockOrientation BlockOrientation | ||
{ | ||
get { return m_baseDefinition.BlockOrientation; } | ||
set | ||
{ | ||
if (m_baseDefinition.BlockOrientation.Equals(value)) return; | ||
m_baseDefinition.BlockOrientation = value; | ||
Changed = true; | ||
} | ||
} | ||
|
||
public SerializableVector3 ColorMaskHSV | ||
{ | ||
get { return m_baseDefinition.ColorMaskHSV; } | ||
set | ||
{ | ||
if (m_baseDefinition.ColorMaskHSV.Equals(value)) return; | ||
m_baseDefinition.ColorMaskHSV = value; | ||
Changed = true; | ||
} | ||
} | ||
|
||
#endregion | ||
|
||
#region "Methods" | ||
|
||
protected override string GetNameFrom(MyObjectBuilder_CubeBlock definition) | ||
{ | ||
return m_baseDefinition.SubtypeName; | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters