MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / getNeededWorkshopPointsPerTrap

Method getNeededWorkshopPointsPerTrap

source/traps/TrapManager.cpp:780–800  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

778}
779
780int32_t TrapManager::getNeededWorkshopPointsPerTrap(TrapType trapType)
781{
782 switch(trapType)
783 {
784 case TrapType::nullTrapType:
785 return 0;
786 case TrapType::cannon:
787 return ConfigManager::getSingleton().getTrapConfigInt32("CannonWorkshopPointsPerTile");
788 case TrapType::spike:
789 return ConfigManager::getSingleton().getTrapConfigInt32("SpikeWorkshopPointsPerTile");
790 case TrapType::boulder:
791 return ConfigManager::getSingleton().getTrapConfigInt32("BoulderWorkshopPointsPerTile");
792 case TrapType::doorWooden:
793 return ConfigManager::getSingleton().getTrapConfigInt32("WoodenDoorPointsPerTile");
794 default:
795 OD_LOG_ERR("Asked for wrong trap type=" + getTrapNameFromTrapType(trapType));
796 break;
797 }
798 // We shouldn't go here
799 return 0;
800}

Callers

nothing calls this directly

Calls 1

getTrapConfigInt32Method · 0.80

Tested by

no test coverage detected