| 3025 | |
| 3026 | |
| 3027 | cRedstoneSimulator * 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 |
nothing calls this directly
no test coverage detected