Skip to content

Commit

Permalink
Fixed missing methods in game patch 1.047.016
Browse files Browse the repository at this point in the history
  • Loading branch information
Moustachauve committed Sep 13, 2014
1 parent 13a4db5 commit 903150c
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 32 deletions.
6 changes: 3 additions & 3 deletions SEModAPIInternal/API/Common/WorldManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,20 @@ public bool IsWorldSaving
}
}

public MySessionSettings SessionSettings
public MyObjectBuilder_SessionSettings SessionSettings
{
get
{
try
{
MySessionSettings sessionSettings = (MySessionSettings)BaseObject.GetEntityFieldValue(BackingObject, WorldManagerSessionSettingsField);
MyObjectBuilder_SessionSettings sessionSettings = (MyObjectBuilder_SessionSettings)BaseObject.GetEntityFieldValue(BackingObject, WorldManagerSessionSettingsField);

return sessionSettings;
}
catch (Exception ex)
{
LogManager.ErrorLog.WriteLine(ex);
return new MySessionSettings();
return new MyObjectBuilder_SessionSettings();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion SEModAPIInternal/API/Entity/BaseEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ public class BaseEntityNetworkManager
public static string BaseEntityNetworkManagerNamespace = "5F381EA9388E0A32A8C817841E192BE8";
public static string BaseEntityNetworkManagerClass = "48D79F8E3C8922F14D85F6D98237314C";

public static string BaseEntityBroadcastRemovalMethod = "70ED7CE650C61018FB30DBB0720365EF";
public static string BaseEntityBroadcastRemovalMethod = "37605E21446C66A02114219BC7F64197";

//Packets
//10 - ??
Expand Down
3 changes: 2 additions & 1 deletion SEModAPIInternal/API/Entity/BaseObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

using Sandbox.Common.ObjectBuilders;
using Sandbox.Common.ObjectBuilders.Definitions;
using Sandbox.Common.ObjectBuilders.Serializer;

using SEModAPI.API;

Expand Down Expand Up @@ -1390,7 +1391,7 @@ public T NewEntry<T>() where T : BaseObject
{
if (!IsMutable) return default(T);

MyObjectBuilder_Base newBase = MyObjectBuilder_Base.CreateNewObject(typeof(MyObjectBuilder_EntityBase));
MyObjectBuilder_Base newBase = MyObjectBuilderSerializer.CreateNewObject(typeof(MyObjectBuilder_EntityBase));
var newEntry = (T)Activator.CreateInstance(typeof(T), new object[] { newBase });
GetInternalData().Add(m_definitions.Count, newEntry);
m_changed = true;
Expand Down
3 changes: 2 additions & 1 deletion SEModAPIInternal/API/Entity/InventoryEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

using Sandbox.Common.ObjectBuilders;
using Sandbox.Common.ObjectBuilders.Definitions;
using Sandbox.Common.ObjectBuilders.Serializer;

using SEModAPI.API;
using SEModAPI.API.Definitions;
Expand Down Expand Up @@ -197,7 +198,7 @@ public InventoryItemEntity NewEntry()
{
MyObjectBuilder_InventoryItem defaults = new MyObjectBuilder_InventoryItem();
SerializableDefinitionId itemTypeId = new SerializableDefinitionId(typeof(MyObjectBuilder_Ore), "Stone");
defaults.PhysicalContent = (MyObjectBuilder_PhysicalObject)MyObjectBuilder_PhysicalObject.CreateNewObject(itemTypeId);
defaults.PhysicalContent = (MyObjectBuilder_PhysicalObject)MyObjectBuilderSerializer.CreateNewObject(itemTypeId);
defaults.Amount = 1;

InventoryItemEntity newItem = new InventoryItemEntity(defaults);
Expand Down
6 changes: 3 additions & 3 deletions SEModAPIInternal/API/Entity/PowerProducer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public class PowerProducer
public static string PowerProducerNamespace = "FB8C11741B7126BD9C97FE76747E087F";
public static string PowerProducerClass = "7E69388ED0DB47818FB7AFF9F16C6EDA";

public static string PowerProducerGetMaxPowerOutputMethod = "0F6AA335BDAB95C90E78246F838B4231";
public static string PowerProducerGetCurrentOutputMethod = "CCAF8565B95D64B8D013728451D46F86";
public static string PowerProducerSetCurrentOutputMethod = "EB0371410DF191F3A5528D684F498095";
public static string PowerProducerGetMaxPowerOutputMethod = "C28C116B5B44725B378E65F4CABF4FA0";
public static string PowerProducerGetCurrentOutputMethod = "A5430E8F21C664BA9C247FF1C2D056CB";
public static string PowerProducerSetCurrentOutputMethod = "9FBD89B1710744E648542AB8EFA18FB7";

#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class CharacterEntity : BaseEntity
public static string CharacterClass = "3B71F31E6039CAE9D8706B5F32FE468D";

public static string CharacterGetHealthMethod = "7047AFF5D44FC8A44572E92DBAD13011";
public static string CharacterDamageCharacterMethod = "DoDamage";
public static string CharacterDamageCharacterMethod = "CF6EEF37B5AE4047E65CA4A0BB43F774";
public static string CharacterSetHealthMethod = "92A0500FD8772AB1AC3A6F79FD2A1C72";
public static string CharacterGetBatteryMethod = "CF72A89940254CB8F535F177150FC743";
public static string CharacterGetInventoryMethod = "GetInventory";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ public class BatteryBlockNetworkManager

public static string BatteryBlockNetManagerCurrentStoredPowerPacketClass = "59DE66D2ECADE0929A1C776D7FA907E2";

public static string BatteryBlockNetManagerCurrentStoredPowerPacketGetIdMethod = "BB64D4385310CACE0C4AB2810898C4CE";
public static string BatteryBlockNetManagerCurrentStoredPowerPacketGetIdMethod = "4E5FB782782D9D0A3F1B2D984232F9D0";

public static string BatteryBlockNetManagerCurrentStoredPowerPacketValueField = "ADC3AB91A03B31875821D57B8B718AF5";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ public class ButtonPanelEntity : ShipControllerEntity
public ButtonPanelEntity(CubeGridEntity parent, MyObjectBuilder_RemoteControl definition)
: base(parent, definition)
{
m_currentPlayerId = definition.CurrentPlayerId.GetValueOrDefault(0);
m_currentPlayerId = definition.PreviousControlledEntityId.GetValueOrDefault(0);
}

public ButtonPanelEntity(CubeGridEntity parent, MyObjectBuilder_RemoteControl definition, Object backingObject)
: base(parent, definition, backingObject)
{
m_currentPlayerId = definition.CurrentPlayerId.GetValueOrDefault(0);
m_currentPlayerId = definition.PreviousControlledEntityId.GetValueOrDefault(0);
}

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public class FunctionalBlockEntity : TerminalBlockEntity
public static string FunctionalBlockNamespace = "6DDCED906C852CFDABA0B56B84D0BD74";
public static string FunctionalBlockClass = "7085736D64DCC58ED5DCA05FFEEA9664";

public static string FunctionalBlockGetEnabledMethod = "89B34B01DCC6C8596E80023078BB9541";
public static string FunctionalBlockGetEnabledMethod = "get_Enabled";
public static string FunctionalBlockSetEnabledMethod = "97EC0047E8B562F4590B905BD8571F51";
public static string FunctionalBlockBroadcastEnabledMethod = "D979DB9AA474782929587EC7DE5E53AA";
public static string FunctionalBlockBroadcastEnabledMethod = "RequestEnable";
public static string FunctionalBlockGetPowerReceiverMethod = "get_PowerReceiver";

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class LandingGearEntity : FunctionalBlockEntity
public static string LandingGearNamespace = "6DDCED906C852CFDABA0B56B84D0BD74";
public static string LandingGearClass = "5C73AAF1736F3AA9956574C6D9A2EEBE";

public static string LandingGearGetAutoLockMethod = "763E2D37AD44E6CA8DDAC82B83A0BC87";
public static string LandingGearGetAutoLockMethod = "7C88AC26AE0A543E4AD1742FC9C1B70A";
public static string LandingGearSetAutoLockMethod = "F542ACDC0D61EB46F733A5527CFFBE14";
public static string LandingGearGetBrakeForceMethod = "A84CC3FC7B1C4CA0A631E34D2F024163";
public static string LandingGearSetBrakeForceMethod = "013F45FD594F8A80D5952A7AC22A931E";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ShipControllerEntity : TerminalBlockEntity
public static string ShipControllerEntityClass = "12BACAB3471C8707CE7420AE0465548C";

public static string ShipControllerEntityGetNetworkManager = "4D19E6CD06284069B97E08353C984ABB";
public static string ShipControllerEntityGetPilotEntityMethod = "19CFD162A750443F856D37B6C946BFB0";
public static string ShipControllerEntityGetPilotEntityMethod = "7214F843D41AA5091768E08C1801E5FC";
public static string ShipControllerEntitySetPilotEntityMethod = "AC280CA879823319A66F3C71D6478297";

#endregion
Expand Down Expand Up @@ -91,7 +91,7 @@ private set
//Do nothing!
}
}

/*
[IgnoreDataMember]
[Category("Ship Controller")]
[ReadOnly(true)]
Expand All @@ -116,7 +116,7 @@ private set
{
//Do nothing!
}
}
}*/

[IgnoreDataMember]
[Category("Ship Controller")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class CubeBlockEntity : BaseObject
public static string CubeBlockDamageBlockMethod = "165EAAEA972A8C5D69F391D030C48869";
public static string CubeBlockGetBuildValueMethod = "547DF8386C799EEBC0203BE5C6AE0870";
public static string CubeBlockGetBuildPercentMethod = "BE3EB9D9351E3CB273327FB522FD60E1";
public static string CubeBlockGetIntegrityValueMethod = "get_Integrity";
public static string CubeBlockGetIntegrityValueMethod = "2B57AE0A5065C0DFD03BBEF90B665ABD";
public static string CubeBlockGetMaxIntegrityValueMethod = "4D4887346D2D13A2C6B46A258BAD29DD";
public static string CubeBlockUpdateWeldProgressMethod = "A8DDA0AEB3B67EA1E62B927C9D831279";

Expand All @@ -59,7 +59,7 @@ public class CubeBlockEntity : BaseObject
public static string ActualCubeBlockGetFactionsObjectMethod = "3E8AC70E5FAAA9C8C4992B71E12CDE28";
public static string ActualCubeBlockSetFactionsDataMethod = "7161368A8164DF15904DC82476F7EBBA";
public static string ActualCubeBlockGetMatrixMethod = "FD50436D896ACC794550210055349FE0";
public static string ActualCubeBlockGetOwnerMethod = "5CE075E5E73578252A4A030502881491";
public static string ActualCubeBlockGetOwnerMethod = "get_OwnerId";

/////////////////////////////////////////////////////

Expand Down
6 changes: 3 additions & 3 deletions SEModAPIInternal/API/Entity/Sector/SectorObject/VoxelMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class VoxelMap : BaseEntity
public static string VoxelMapClass = "6EC806B54BA319767DA878841A56ECD8";

public static string VoxelMapGetSizeMethod = "F7FC06F8DAF6ECC3F74F1D863DD65A36";
public static string VoxelMapGetVoxelMaterialManagerMethod = "53CA3BCCF58223EC592958B481349BB5";
public static string VoxelMapGetVoxelMaterialManagerMethod = "1543B7CCAB7538E6877BA8CCC513A070";
public static string VoxelMapGetMaterialAtPositionMethod = "5F7E3213E519961F42617BC410B19346";

#endregion
Expand Down Expand Up @@ -254,7 +254,7 @@ public class VoxelMapMaterialManager
public static string VoxelMapMaterialManagerNamespace = "DC3F8F35BD18173B1D075139B475AD8E";
public static string VoxelMapMaterialManagerClass = "119B0A83D4E9B352826763AD3746A162";

public static string VoxelMapMaterialManagerGetVoxelsDictionaryMethod = "3B4214480FDA5B1811A72EEBB55B543C";
//public static string VoxelMapMaterialManagerGetVoxelsDictionaryMethod = "473DE42B0B661DE27A29562438E87943";

public static string VoxelMapMaterialManagerVoxelsField = "4E39EA62F3374F5CCE29BA40FE62818C";

Expand Down Expand Up @@ -355,7 +355,7 @@ public static bool ReflectionUnitTest()
if (type == null)
throw new Exception("Could not find internal type for VoxelMapMaterialManager");

result &= BaseObject.HasMethod(type, VoxelMapMaterialManagerGetVoxelsDictionaryMethod);
//result &= BaseObject.HasMethod(type, VoxelMapMaterialManagerGetVoxelsDictionaryMethod);

result &= BaseObject.HasField(type, VoxelMapMaterialManagerVoxelsField);

Expand Down
4 changes: 2 additions & 2 deletions SEModAPIInternal/API/Server/ServerNetworkManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public class ServerNetworkManager : NetworkManager
public static string ServerNetworkManagerClass = "3B0B7A338600A7B9313DE1C3723DAD14";

public static string ServerNetworkManagerDisconnectPlayerMethod = "09FDD2D9700A7E602BE8722F81A55AC6";
public static string ServerNetworkManagerSetPlayerBannedMethod = "7CA93D8ABE639F6C5D94D9ADC94B820C";
public static string ServerNetworkManagerKickPlayerMethod = "AF5A3E9A568B4F7321D6E347AAC5C899";
public static string ServerNetworkManagerSetPlayerBannedMethod = "D8507C079F9959AD7F06F37BFDC7712C";
public static string ServerNetworkManagerKickPlayerMethod = "B0CA1C2C2E07E744FC44C43547A8BDDB";

public static string ServerNetworkManagerConnectedPlayersField = "89E92B070228A8BC746EFB57A3F6D2E5";

Expand Down
5 changes: 3 additions & 2 deletions SEServerExtender/InventoryItemDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

using Sandbox.Common.ObjectBuilders;
using Sandbox.Common.ObjectBuilders.Definitions;
using Sandbox.Common.ObjectBuilders.Serializer;
using Sandbox.Definitions;

using SEModAPIInternal.API.Entity;
Expand Down Expand Up @@ -106,8 +107,8 @@ private void BTN_InventoryItem_Add_Click(object sender, EventArgs e)

try
{
MyObjectBuilder_InventoryItem objectBuilder = MyObjectBuilder_Base.CreateNewObject<MyObjectBuilder_InventoryItem>();
objectBuilder.Content = MyObjectBuilder_Base.CreateNewObject(SelectedType.TypeId, SelectedType.SubtypeId.ToString());
MyObjectBuilder_InventoryItem objectBuilder = MyObjectBuilderSerializer.CreateNewObject<MyObjectBuilder_InventoryItem>();
objectBuilder.Content = MyObjectBuilderSerializer.CreateNewObject(SelectedType.TypeId, SelectedType.SubtypeId.ToString());
objectBuilder.Amount = (MyFixedPoint)Amount;
InventoryItemEntity newItem = new InventoryItemEntity(objectBuilder);

Expand Down
8 changes: 4 additions & 4 deletions SEServerGUI/Service References/ServiceReference/Reference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1617,8 +1617,8 @@ public ulong SteamId {
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.Gui.MyObjectBuilder_GuiScreen))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.Audio.MyObjectBuilder_CueDefinition))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.Audio.MyObjectBuilder_CueDefinitions))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.Voxels.MyObjectBuilder_VoxelMap_MergeContent))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.Voxels.MyObjectBuilder_VoxelMap_MergeMaterial))]
//[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.Voxels.MyObjectBuilder_VoxelMap_MergeContent))]
//[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.Voxels.MyObjectBuilder_VoxelMap_MergeMaterial))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.MyObjectBuilder_EntityBase))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.MyObjectBuilder_AngleGrinder))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.MyObjectBuilder_AutomaticRifle))]
Expand Down Expand Up @@ -1928,8 +1928,8 @@ public bool IsStatic {
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.Gui.MyObjectBuilder_GuiScreen))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.Audio.MyObjectBuilder_CueDefinition))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.Audio.MyObjectBuilder_CueDefinitions))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.Voxels.MyObjectBuilder_VoxelMap_MergeContent))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.Voxels.MyObjectBuilder_VoxelMap_MergeMaterial))]
//[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.Voxels.MyObjectBuilder_VoxelMap_MergeContent))]
//[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.Voxels.MyObjectBuilder_VoxelMap_MergeMaterial))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.MyObjectBuilder_EntityBase))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.MyObjectBuilder_AngleGrinder))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Sandbox.Common.ObjectBuilders.MyObjectBuilder_AutomaticRifle))]
Expand Down

0 comments on commit 903150c

Please sign in to comment.