MCPcopy Create free account
hub / github.com/cuberite/cuberite / InitializeRedstoneSimulator

Method InitializeRedstoneSimulator

src/World.cpp:3027–3051  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3025
3026
3027cRedstoneSimulator * cWorld::InitializeRedstoneSimulator(cIniFile & a_IniFile)
3028{
3029 AString SimulatorName = a_IniFile.GetValueSet("Physics", "RedstoneSimulator", "");
3030
3031 if (SimulatorName.empty())
3032 {
3033 LOGWARNING("[Physics] RedstoneSimulator not present or empty in %s, using the default of \"incremental\".", GetIniFileName().c_str());
3034 SimulatorName = "incremental";
3035 }
3036
3037 cRedstoneSimulator * res = NULL;
3038
3039 if (NoCaseCompare(SimulatorName, "incremental") == 0)
3040 {
3041 res = new cIncrementalRedstoneSimulator(*this);
3042 }
3043 else if (NoCaseCompare(SimulatorName, "noop") == 0)
3044 {
3045 res = new cRedstoneNoopSimulator(*this);
3046 }
3047
3048 m_SimulatorManager->RegisterSimulator(res, 1);
3049
3050 return res;
3051}
3052
3053
3054

Callers

nothing calls this directly

Calls 5

NoCaseCompareFunction · 0.85
GetValueSetMethod · 0.80
emptyMethod · 0.80
c_strMethod · 0.80
RegisterSimulatorMethod · 0.80

Tested by

no test coverage detected