Skip to content

Commit

Permalink
Add installedObject to block
Browse files Browse the repository at this point in the history
Along with the associated block.objectCapacity for container objects.
  • Loading branch information
windmillium committed Dec 31, 2011
1 parent 52340a9 commit 58dc2bc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/scala/Block.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ extends Attackable
var plant: Plant = _
var mobiles = new ListBuffer[Mobile]
var selected = false
var installedObject:Object = _
var objects = new ListBuffer[Object]
import scala.collection.mutable.Set

Expand Down Expand Up @@ -67,6 +68,14 @@ extends Attackable


tclasses

}

def objectCapacity = {
installedObject match {
case null => 0
case _ => installedObject.capacity
}
}

def cost:Int = 1
Expand Down

0 comments on commit 58dc2bc

Please sign in to comment.