|
|
@@ -87,8 +87,9 @@ namespace GamecraftModdingAPI.Tests |
|
|
|
GamecraftModdingAPI.Utility.Logging.CommandLogError("Blocks can only be moved in Build mode!"); |
|
|
|
} |
|
|
|
}, "MoveLastBlock", "Move the most-recently-placed block, and any connected blocks by the given offset")); |
|
|
|
/*CommandManager.AddCommand(new SimpleCustomCommandEngine(() => { FMODUnity.RuntimeManager.PlayOneShot("event:/ModEvents/KillDashNine2D"); }, |
|
|
|
"Monzy", "Rap"));*/ |
|
|
|
CommandManager.AddCommand(new SimpleCustomCommandEngine<float, float, float>( |
|
|
|
(x,y,z) => { Blocks.Placement.PlaceBlock(Blocks.BlockIDs.AluminiumCube, new Unity.Mathematics.float3(x, y, z)); }, |
|
|
|
"PlaceAluminium", "Place a block of aluminium at the given coordinates")); |
|
|
|
} |
|
|
|
|
|
|
|
public void OnFixedUpdate() { } |
|
|
@@ -99,27 +100,6 @@ namespace GamecraftModdingAPI.Tests |
|
|
|
|
|
|
|
public void OnLevelWasLoaded(int level) { } |
|
|
|
|
|
|
|
public void OnUpdate() |
|
|
|
{ |
|
|
|
/* |
|
|
|
if (db != null && signalStrength != 0.0f && db.QueryUniqueEntity<SimulationModeStateEntityStruct>(SimulationModeStateExclusiveGroups.GAME_STATE_GROUP).simulationMode == SimulationMode.Simulation) |
|
|
|
{ |
|
|
|
//GamecraftModdingAPI.Utility.Logging.MetaDebugLog("Simulation frame update"); |
|
|
|
foreach (ref ElectricityEntityStruct powah in db.QueryEntities<ElectricityEntityStruct>(CommonExclusiveGroups.FUNCTIONAL_CUBES_IN_BOTH_SIM_AND_BUILD)) |
|
|
|
{ |
|
|
|
ref ConductiveClusterID clusterId = ref db.QueryEntity<ConductiveClusterIdStruct>(powah.ID).clusterId; |
|
|
|
GamecraftModdingAPI.Utility.Logging.MetaDebugLog($"ID {powah.ID.entityID} unmodded values: Power* {powah.powerMultiplier} Conductivity* {powah.conductivityMultiplier} Output* {powah.outputSignalMultiplier}"); |
|
|
|
uint operatingChannel = db.QueryEntity<SignalOperatingChannelStruct>(powah.ID).operatingChannel; |
|
|
|
if (operatingChannel != 0) |
|
|
|
{ |
|
|
|
EGID eGID = new EGID(operatingChannel, CommonExclusiveGroups.CHANNEL_OUTPUT_SIGNAL_GROUPS + clusterId.ID); |
|
|
|
if (db.Exists<ChannelOutputSignalDataStruct>(eGID)) |
|
|
|
{ |
|
|
|
db.QueryEntity<ChannelOutputSignalDataStruct>(eGID).outputSignal = signalStrength; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}*/ |
|
|
|
} |
|
|
|
public void OnUpdate() { } |
|
|
|
} |
|
|
|
} |