public CityBuilding( BuildingType type, BuildingPlot plot, BuildingFlags flags,
UUID owner, IScene scene, string name )
: base(type,plot,flags,owner,scene,name)
{
// Start the process of constructing a building given the parameters specified. For
// truly random buildings change the following value (6) too another number, this is
// used to allow for the buildings to be fairly fixed during research and development.
BuildingSeed = 6; // TODO FIX ACCESS TO THE CityModule.randomValue(n) code.
BuildingType = type;
BuildingPlot = plot;
BuildingFlags = flags;
// Has a valid owner been specified, if not use the default library owner (i think) of the zero uuid.
if (!owner.Equals(UUID.Zero))
BuildingOwner = owner;
else
BuildingOwner = UUID.Zero;
// Generate a unique value for this building and it's own group if it's part of a complex,
// otherwise use the zero uuid for group (perhaps it should inherit from the city?)
BuildingUUID = UUID.Random();
BuildingGUID = UUID.Random();
BuildingCenter = new Vector3((plot.XPos + plot.Width / 2), 21, (plot.YPos + plot.Depth) / 2);
if (name.Length > 0)
BuildingName = name;
else
BuildingName = "Building" + type.ToString();
// Now that internal variables that are used by other methods have been set construct
// the building based on the type, plot, flags and seed given in the parameters.
switch (type)
{
case BuildingType.BUILDING_GENERAL:
OpenSim.Framework.MainConsole.Instance.Output("Building Type GENERAL", log4net.Core.Level.Info);
createBlocky();
break;
case BuildingType.BUILDING_LOCALE:
/*
switch ( CityModule.randomValue(8) )
{
case 0:
OpenSim.Framework.MainConsole.Instance.Output("Locale general.", log4net.Core.Level.Info);
createSimple();
break;
case 1:
OpenSim.Framework.MainConsole.Instance.Output("locale 1", log4net.Core.Level.Info);
createBlocky();
break;
}
*/
break;
case BuildingType.BUILDING_CIVIL:
createTower();
break;
case BuildingType.BUILDING_MILITARY:
break;
case BuildingType.BUILDING_HEALTHCARE:
break;
case BuildingType.BUILDING_SPORTS:
break;
case BuildingType.BUILDING_ENTERTAINMENT:
break;
case BuildingType.BUILDING_EDUCATION:
break;
case BuildingType.BUILDING_RELIGIOUS:
break;
case BuildingType.BUILDING_MUSEUM:
break;
case BuildingType.BUILDING_POWERSTATION:
break;
case BuildingType.BUILDING_MINEOILGAS:
break;
case BuildingType.BUILDING_ZOOLOGICAL:
break;
case BuildingType.BUILDING_CEMETARY:
break;
case BuildingType.BUILDING_PRISON:
break;
case BuildingType.BUILDING_AGRICULTURAL:
break;
case BuildingType.BUILDING_RECREATION:
break;
default:
createSimple();
break;
}
}