Add Ruin, Bush, GraviPlant, and Crystal categories in CBOT

pyro-refactor
Fiftytwo 2020-07-17 03:37:13 +02:00
parent 0a3cdd342b
commit ac32e40003
2 changed files with 36 additions and 1 deletions

View File

@ -303,7 +303,7 @@ std::vector<CObject*> CObjectManager::RadarAll(CObject* pThis, Math::Vector this
oType == OBJECT_RUINmobiler1 || oType == OBJECT_RUINmobiler1 ||
oType == OBJECT_RUINmobiler2 ) oType == OBJECT_RUINmobiler2 )
{ {
oType = OBJECT_RUINmobilew1; // any ruin oType = OBJECT_RUINmobilew1; // any wreck
} }
if ( oType == OBJECT_BARRIER2 || if ( oType == OBJECT_BARRIER2 ||
@ -313,6 +313,33 @@ std::vector<CObject*> CObjectManager::RadarAll(CObject* pThis, Math::Vector this
{ {
oType = OBJECT_BARRIER1; // any barrier oType = OBJECT_BARRIER1; // any barrier
} }
if ( oType == OBJECT_RUINdoor ||
oType == OBJECT_RUINsupport ||
oType == OBJECT_RUINradar ||
oType == OBJECT_RUINconvert ) // ruins?
{
oType = OBJECT_RUINfactory; // any ruin
}
if ( oType == OBJECT_PLANT1 ||
oType == OBJECT_PLANT2 ||
oType == OBJECT_PLANT3 ||
oType == OBJECT_PLANT4 ||
oType == OBJECT_PLANT15 ||
oType == OBJECT_PLANT16 ||
oType == OBJECT_PLANT17 ||
oType == OBJECT_PLANT18 ) // bushes?
{
oType = OBJECT_PLANT0; // any bush
}
if ( oType == OBJECT_QUARTZ1 ||
oType == OBJECT_QUARTZ2 ||
oType == OBJECT_QUARTZ3 ) // crystals?
{
oType = OBJECT_QUARTZ0; // any crystal
}
// END OF TODO // END OF TODO
} }

View File

@ -125,6 +125,10 @@ const char* GetObjectName(ObjectType type)
if ( type == OBJECT_BEE ) return "AlienWasp"; if ( type == OBJECT_BEE ) return "AlienWasp";
if ( type == OBJECT_WORM ) return "AlienWorm"; if ( type == OBJECT_WORM ) return "AlienWorm";
if ( type == OBJECT_RUINmobilew1) return "Wreck"; if ( type == OBJECT_RUINmobilew1) return "Wreck";
if ( type == OBJECT_RUINfactory ) return "Ruin";
if ( type == OBJECT_PLANT0 ) return "Bush";
if ( type == OBJECT_ROOT5 ) return "GraviPlant";
if ( type == OBJECT_QUARTZ0 ) return "Crystal";
return ""; return "";
} }
@ -233,6 +237,10 @@ std::string GetHelpFilename(ObjectType type)
if ( type == OBJECT_BEE ) helpfile = "object/wasp"; if ( type == OBJECT_BEE ) helpfile = "object/wasp";
if ( type == OBJECT_WORM ) helpfile = "object/worm"; if ( type == OBJECT_WORM ) helpfile = "object/worm";
if ( type == OBJECT_RUINmobilew1) helpfile = "object/wreck"; if ( type == OBJECT_RUINmobilew1) helpfile = "object/wreck";
if ( type == OBJECT_RUINfactory ) helpfile = "object/ruin";
if ( type == OBJECT_PLANT0 ) helpfile = "object/bush";
if ( type == OBJECT_ROOT5 ) helpfile = "object/gravi";
if ( type == OBJECT_QUARTZ0 ) helpfile = "object/crystal";
if (helpfile.empty()) if (helpfile.empty())
return ""; return "";