1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Machine Factory and Refugee Camp can't be owned

This commit is contained in:
Ivan Savenko 2024-09-04 19:46:58 +00:00
parent dae9e1e316
commit 44fdb71933

View File

@ -536,8 +536,15 @@ void CGDwelling::serializeJsonOptions(JsonSerializeFormat & handler)
const IOwnableObject * CGDwelling::asOwnable() const const IOwnableObject * CGDwelling::asOwnable() const
{ {
switch (ID.toEnum())
{
case Obj::WAR_MACHINE_FACTORY:
case Obj::REFUGEE_CAMP:
return nullptr; // can't be owned
default:
return this; return this;
} }
}
ResourceSet CGDwelling::dailyIncome() const ResourceSet CGDwelling::dailyIncome() const
{ {