/*
* Building.cs
* Authors: August Zinsser
*
* Copyright Matthew Belmonte 2007
*/
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Storage;
using tAC_Engine;
using Pina3D;
namespace Astropolis.ColonySimulator
{
///
/// A structure that may input and output commodities.
///
public abstract class Building : Structure
{
public abstract Dictionary InputInventory { get; }
public abstract Dictionary OutputInventory { get; }
///
/// Attempts to add some quantity of a commodity to this building's appropriate inventory
///
/// True if successfully added, false otherwise
public abstract bool Deliver(string commodity, int quantity);
///
/// Attempts to subtract the specified quantity of the specified commodity from this building's appropriate inventory
///
/// True if successfully removed, false otherwise
public abstract bool Ship(string commodity, int quantity);
}
public abstract class BuildingType : StructureType
{
///
/// The type and quantity of commodities this building inputs
///
public Dictionary Inputs;
///
/// The type and quantity of commodities this building outputs
///
public Dictionary Outputs;
public BuildingType(
PinaModel model,
int footprintWidth,
int footprintHeight,
Dictionary inputs,
Dictionary outputs)
: base(model, footprintWidth, footprintHeight)
{
this.Inputs = inputs;
this.Outputs = outputs;
}
}
}