Commit graph

505 commits

Author SHA1 Message Date
jason@long.name
dc412a71b6 cleanup: remove no-longer-used isRadioactive()
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@849 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-06 12:49:59 +00:00
jason@long.name
a3696e01ba cleanup: remove no-longer-used isFire()
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@848 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-06 12:49:31 +00:00
jason@long.name
90149dc9c0 evalLog road test: let road/rail crossing count as road
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@847 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-06 12:49:10 +00:00
jason@long.name
36035942af copyright: add copyright notice to tiles.rc
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@846 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-05 11:23:36 +00:00
jason@long.name
d86c9f6b65 cleanup: remove a bunch of unused tile constants
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@845 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-05 11:23:28 +00:00
jason@long.name
c3e677047a strictness: getZoneSizeFor must be called on a zone-center tile
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@844 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-05 11:23:07 +00:00
jason@long.name
94e9892731 refactor: make getZoneSizeFor return CityDimension (width AND height)
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@843 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-05 11:22:56 +00:00
jason@long.name
2af5cf14a7 refactor: introduce new CityDimension class to encapsulate width/height
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@842 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-05 11:22:40 +00:00
jason@long.name
b22263b4b6 applyZone: rewrite to use tiles.rc annotations
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@841 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-05 11:22:09 +00:00
jason@long.name
400c2942ee pollution: coal plant animated tiles should emit pollution
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@840 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-04 18:58:31 +00:00
jason@long.name
f6601ac95d pollution: industrial zone animations should emit pollution
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@839 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-04 18:58:19 +00:00
jason@long.name
43455f1903 pollution: airport's radar dish should emit pollution just like rest of airport
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@838 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-04 18:58:06 +00:00
jason@long.name
ed88e75a34 tiles.rc: move pollution values from Java code to tiles.rc
This patch maintains exact values for every tile, even where it
is probably wrong.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@837 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-04 18:57:51 +00:00
jason@long.name
db6f3fb59c doSpecialZone: use annotations to control which special zone processing is done
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@836 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-03 01:07:35 +00:00
jason@long.name
18f00153a3 refactor: doSpecialZone- split up into separate functions for each zone type
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@835 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-03 01:07:25 +00:00
jason@long.name
1932084d22 cleanup: remove erroneous assertion
Usually after powerScan() the powerPlants list will be empty, but
not if powerScan() aborts upon detection of a brown-out condition.

It does not matter anyway; the powerPlants will be cleared and
repopulated in normal course by simulate() in phase 0.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@834 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 21:34:25 +00:00
jason@long.name
1b82d46aeb cleanup: remove two obsolete functions from TileConstants.java
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@833 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 21:34:16 +00:00
jason@long.name
bef75adc90 scanTile: use annotations in tiles.rc to determine behavior of tiles
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@832 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 21:34:06 +00:00
jason@long.name
070cd90727 refactor: move checkZonePower down a level
(This will allow elimination of the doZone() intermediary function)

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@831 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 21:33:56 +00:00
jason@long.name
1e4dd42655 gitignore: prevent VIM swap files from getting caught by repository
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@830 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 21:33:47 +00:00
jason@long.name
0f2c2f4617 refactor: checkZonePower() to set PWR bit and count zones
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@829 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 21:33:38 +00:00
jason@long.name
07bc48c34c cleanup: consolidate all doFire() functionality into doFire() method
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@828 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 21:33:28 +00:00
jason@long.name
821679d841 tile descriptions: consolidate to single string for 'Industrial'
Formerly #23 and #12 were both "Industrial", with #12 being used for
the basic industrial zones, and #23 being used for any animation
appearing for industrial zones.

Now that the tiles using a particular description number don't need
to be contiguous, we will consolidate to just use #12 for "industrial",
and this will free up #23 for some other use in the future.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@827 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:33:21 +00:00
jason@long.name
282cd77b48 tile descriptions: describe the animated zone destruction tiles as "Rubble"
rather than "Industrial"

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@826 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:33:12 +00:00
jason@long.name
f5180e9f9c tile descriptions: smoke on coal power plant should be "Coal Power" not "Industrial"
remove description annotation on the animated tiles of the coal power plant,
so that they inherit the description of the coal power plant, rather than
having a description of "Industrial"

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@825 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:33:04 +00:00
jason@long.name
93bf346065 tile descriptions: consolidate to a single string for 'draw bridge'
formerly, the string "Draw Bridge" was defined separately for
east-west and north-south bridges, simply because they were disjoint
in the tile numbering sequence.

Now both draw bridges use description number 20.
This frees up description number 25 for something else some day.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@824 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:32:55 +00:00
jason@long.name
21f1cff598 tiles.rc: remove 'description' annotation for undefined/unused tiles
The earlier commit that added the description annotations maintained
exact compatibility with the descriptions hardcoded in the source
code. Now we are going back and removing the descriptions that do
not apply.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@823 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:32:46 +00:00
jason@long.name
fb52cfd504 cleanup: remove some debug code left in from a previous commit
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@822 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:32:38 +00:00
jason@long.name
521a41f028 tiles.rc: use description numbers from tiles.rc rather than hardcoded numbers
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@821 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:32:25 +00:00
jason@long.name
52512c8987 tiles.rc: annotate each tile with its description number
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@820 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:32:14 +00:00
jason@long.name
d14121b415 overlay-map: cleanup: use isResidentialZoneAny() instead of manual check
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@819 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:27:23 +00:00
jason@long.name
f09ba76a23 tiles: use new residential-zone/commercial-zone annotations
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@818 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:27:14 +00:00
jason@long.name
c86b9bc03b tiles: annotate commercial and residential zones
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@817 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:27:05 +00:00
jason@long.name
fb6db46fde tiles: remove old isIndustrialZone() function
Note: this old Industrial Zone checking function would erroneously
include the Coal power plant animated smoke.

You could see this bug by selecting "industrial zones" for the
overlay map, and looking closely where your coal power plants are.
You will see that the coal power plant is invisible in the overlay
except for the four tiles containing the smoke.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@816 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:26:44 +00:00
jason@long.name
14944850b7 tiles: annotate industrial zone tiles
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@815 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:26:29 +00:00
jason@long.name
4c66df859f buildings: allow defining anim tiles as belonging to a building
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@814 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:26:16 +00:00
jason@long.name
306058afeb buildings: define building metadata for special buildings
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@813 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:26:07 +00:00
jason@long.name
b9bdf2850c buildings: s/compound/building, auto-determine tile range
auto-determine tiles that make up the building by requiring that
the building always be defined on the 2nd row, 2nd column

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@812 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:25:51 +00:00
jason@long.name
7069c8150c buildings: for component tiles, link back to the owner tile
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@811 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:25:39 +00:00
jason@long.name
3941b35fa4 buildings: rename zonePlopNew() to zonePlop()
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@810 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:25:29 +00:00
jason@long.name
f2069794a8 buildings: remove obsolete zonePlop()
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@809 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:25:21 +00:00
jason@long.name
889b1d968e buildings: replace callers of zonePlop() with calls to zonePlopNew()
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@808 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:25:01 +00:00
jason@long.name
2b126044ed buildings: implement zonePlopNew() to place a zone using info in tiles.rc
Take note that the argument given to this function is not the upper-left
tile value, but rather the "zone" tile for the building.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@807 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:24:49 +00:00
jason@long.name
70383365e6 buildings: define large zone structures in tiles.rc
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@806 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:20:17 +00:00
jason@long.name
220f136848 GraphsPane: fix for graph reaching above 100% (issue #31)
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@805 d9718cc8-9f43-0410-858b-315f434eb58c
2013-08-31 19:15:59 +00:00
jason@long.name
98c60fb878 bump version number
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@804 d9718cc8-9f43-0410-858b-315f434eb58c
2013-08-31 19:15:47 +00:00
jason@long.name
8f7523fd62 demand valves: fix bug in demand valve determination
is supposed to be dependent on tax rate, but due to using the wrong
local variable, it was ignoring the tax rate.
This fix will make the economy a little slower.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@801 d9718cc8-9f43-0410-858b-315f434eb58c
2013-08-25 02:22:30 +00:00
jason@long.name
47963b0011 tiles.rc: let zone population be controlled by tiles.rc
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@800 d9718cc8-9f43-0410-858b-315f434eb58c
2013-08-25 02:22:18 +00:00
jason@long.name
51973f75bd TileConstants: impl isIndestructible2(), slightly different than isIndestructible()
the difference is whether RUBBLE is included or not;
TODO- make a better name

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@799 d9718cc8-9f43-0410-858b-315f434eb58c
2013-08-24 21:04:36 +00:00
jason@long.name
aa40fc8760 TileConstants: make isIndestructible()
continuing the trend of moving tile number logic to centralized location

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@798 d9718cc8-9f43-0410-858b-315f434eb58c
2013-08-24 20:54:23 +00:00