$location = $thingy->get_location( $l );
####
$building = $location->get_building( $b );
####
$building = $thingy->get_location( $l )->get_building( $b );
#or
$building = $thingy->get_building_by_location( $l, $b );
####
$cost = $thingy->get_location( $l )->get_building( $b )->cost;
$totals = $location->get_totals;
$upkeep = $building->get_upkeep;
####
foreach my $l ( $thingy->all_locations )
{
foreacn my $b ( $b->all_buildings )
{
$b->set_cost( $b->cost + 1 );
}
}
####
while( my $location = $thingy->next_location )
{
...
}