mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
Renamed LibClasses * VLC
to GameLibrary * LIBRARY
This commit is contained in:
@ -245,12 +245,12 @@ bool WaterProxy::placeBoat(Zone & land, const Lake & lake, bool createRoad, Rout
|
||||
if(!manager)
|
||||
return false;
|
||||
|
||||
auto subObjects = VLC->objtypeh->knownSubObjects(Obj::BOAT);
|
||||
auto subObjects = LIBRARY->objtypeh->knownSubObjects(Obj::BOAT);
|
||||
std::set<si32> sailingBoatTypes; //RMG shall place only sailing boats on water
|
||||
for(auto subObj : subObjects)
|
||||
{
|
||||
//making a temporary object
|
||||
std::unique_ptr<CGObjectInstance> obj(VLC->objtypeh->getHandlerFor(Obj::BOAT, subObj)->create(map.mapInstance->cb, nullptr));
|
||||
std::unique_ptr<CGObjectInstance> obj(LIBRARY->objtypeh->getHandlerFor(Obj::BOAT, subObj)->create(map.mapInstance->cb, nullptr));
|
||||
if(auto * testBoat = dynamic_cast<CGBoat *>(obj.get()))
|
||||
{
|
||||
if(testBoat->layer == EPathfindingLayer::SAIL)
|
||||
@ -261,7 +261,7 @@ bool WaterProxy::placeBoat(Zone & land, const Lake & lake, bool createRoad, Rout
|
||||
if(sailingBoatTypes.empty())
|
||||
return false;
|
||||
|
||||
auto * boat = dynamic_cast<CGBoat *>(VLC->objtypeh->getHandlerFor(Obj::BOAT, *RandomGeneratorUtil::nextItem(sailingBoatTypes, zone.getRand()))->create(map.mapInstance->cb, nullptr));
|
||||
auto * boat = dynamic_cast<CGBoat *>(LIBRARY->objtypeh->getHandlerFor(Obj::BOAT, *RandomGeneratorUtil::nextItem(sailingBoatTypes, zone.getRand()))->create(map.mapInstance->cb, nullptr));
|
||||
|
||||
rmg::Object rmgObject(*boat);
|
||||
rmgObject.setTemplate(zone.getTerrainType(), zone.getRand());
|
||||
@ -325,7 +325,7 @@ bool WaterProxy::placeShipyard(Zone & land, const Lake & lake, si32 guard, bool
|
||||
return false;
|
||||
|
||||
int subtype = chooseRandomAppearance(zone.getRand(), Obj::SHIPYARD, land.getTerrainType());
|
||||
auto * shipyard = dynamic_cast<CGShipyard *>(VLC->objtypeh->getHandlerFor(Obj::SHIPYARD, subtype)->create(map.mapInstance->cb, nullptr));
|
||||
auto * shipyard = dynamic_cast<CGShipyard *>(LIBRARY->objtypeh->getHandlerFor(Obj::SHIPYARD, subtype)->create(map.mapInstance->cb, nullptr));
|
||||
shipyard->tempOwner = PlayerColor::NEUTRAL;
|
||||
|
||||
rmg::Object rmgObject(*shipyard);
|
||||
|
Reference in New Issue
Block a user