Commit graph

92 commits

Author SHA1 Message Date
jason@long.name
1aa2e3d30f ToolPreview: a class for holding the effect of a tool
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@629 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:41:57 +00:00
jason@long.name
f6b55fa380 toolstroke: separate class for road-like tools
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@628 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:41:49 +00:00
jason@long.name
0fe2c2fe1d toolstroke: move bulldozer tool code to a separate file
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@627 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:41:40 +00:00
jason@long.name
6e585924a7 toolstroke: start implementing a check() method
This checks the overall result of applying a tool to see if there's
enough money for the whole operating, before applying any of it.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@626 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:41:33 +00:00
jason@long.name
0f0d063957 toolstroke: rename getPreview to getBounds
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@625 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:41:24 +00:00
jason@long.name
86a2f05201 toolstroke: on mouse up, fill the selected area with the tool
also- for roads, rails, and wires, force the selected area to be
single-unit width or height.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@624 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:36:36 +00:00
jason@long.name
67e7792be5 toolstroke: apply at end of mouse click, show drag preview
not completely there yet

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@623 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:36:27 +00:00
jason@long.name
c4fe7f0d34 toolstroke: refactor- do not pass engine variable to every function
since it is a class property

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@622 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:36:19 +00:00
jason@long.name
6438791974 toolstroke: cleanup: rename 'engine' variable to 'city' variable
for consistency

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@621 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:36:11 +00:00
jason@long.name
8901474800 toolstroke: new class to represent the application of a tool
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@620 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:36:00 +00:00
jason@long.name
7d2b2fdda5 cleanup: move autobulldoze-testing functions to TileConstants
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@619 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-08 02:11:35 +00:00
jason@long.name
36f056087e cleanup: make both canAutoBulldoze have same logic
formerly, tiles LASTTINYEXP+1 and LASTTINYEXP+2 were considered
auto-bulldozable only when laying zones. This inconsistency is
not necessary, since LASTTINYEXP+1 and LASTTINYEXP+2 are unused values

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@618 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-05 19:03:04 +00:00
jason@long.name
32d23d16bd cleanup: use new isZoneCenter() check instead of testing for ZONEBIT flag
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@617 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-05 18:52:28 +00:00
jason@long.name
db0a450076 TileConstants: two new helper methods: isDozeable, isZoneCenter
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@616 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-05 18:52:21 +00:00
jason@long.name
e9f06bb1c2 docs: add some notes on various attributes of tiles
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@615 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-05 18:52:13 +00:00
jason@long.name
9c045da206 simspeed: no matter speed, always two animation cycles per sim step
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@614 d9718cc8-9f43-0410-858b-315f434eb58c
2013-04-29 22:02:29 +00:00
jason@long.name
d17084261d simspeed: rescale; each step is now 5x the previous
The scaling used to be 10x each step,
now it is 5x, with the "normal" speed being unchanged.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@613 d9718cc8-9f43-0410-858b-315f434eb58c
2013-04-29 22:02:21 +00:00
jason@long.name
f6fd885d75 simspeed: do not skip crime/fire/power scans when speed is faster
The original Micropolis code has logic where at the faster simulator
speeds, the crime/fire/power/etc. scans are performed less frequently,
presumably to more efficiently use CPU. However, CPUs are faster now
and I would prefer to not have the simulation change behavior based
on the speed setting.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@612 d9718cc8-9f43-0410-858b-315f434eb58c
2013-04-29 22:02:13 +00:00
jason@long.name
9edc542277 bump version number
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@611 d9718cc8-9f43-0410-858b-315f434eb58c
2013-04-29 22:02:05 +00:00
jason@long.name
cafa42e655 TODO- update the TODO file
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@608 d9718cc8-9f43-0410-858b-315f434eb58c
2013-04-27 17:11:08 +00:00
jason@long.name
c4fa905d97 doc: file format
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@607 d9718cc8-9f43-0410-858b-315f434eb58c
2013-04-27 17:11:00 +00:00
jason@long.name
7e52c97246 file-format: fix to load files generated by simcity classic
Warning- loading and then saving such a file will probably cause
the file to be unreadable to simcity classic

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@606 d9718cc8-9f43-0410-858b-315f434eb58c
2013-04-07 00:15:13 +00:00
jason@long.name
1bbc20487f overlay-map: add sanity check for tile value before indexing a tile
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@605 d9718cc8-9f43-0410-858b-315f434eb58c
2013-04-07 00:14:55 +00:00
jason@long.name
19a3fcefd7 game-load: fix bug in speed sanity check
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@604 d9718cc8-9f43-0410-858b-315f434eb58c
2013-04-07 00:14:42 +00:00
jason@long.name
93b5422afb CityBudget: do not change funds when changing difficulty level
Before I had implemented the New City dialog box, the only way
to set the difficulty was via the menu after the game started.
Now that the difficulty level can be set before starting the game,
there is no need to give/take money when the difficulty changes.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@603 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-23 15:46:18 +00:00
jason@long.name
2c69407d47 CityBudget: do not change funds when generating a map
initial funds are now set when player clicks Play button

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@602 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-23 15:46:05 +00:00
jason@long.name
0b8efea513 CityBudget: move in the four escrow-style account balances
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@601 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-23 15:45:52 +00:00
jason@long.name
04534d6273 refactor: move totalFunds property to separate class
this new class (CityBudget) will contain all finance-related balances

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@600 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-23 15:45:37 +00:00
jason@long.name
92f79886ae overlay-map: allow engine to be queried
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@599 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-23 14:08:30 +00:00
jason@long.name
efd0326db2 engine: allow non-default sized maps to be instantiated
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@598 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-23 14:08:09 +00:00
jason@long.name
e80daa30de java: start the GUI the proper way, using the EDT
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@597 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-18 22:29:56 +00:00
jason@long.name
344c34c039 TODO- document a potential bug that needs reviewed some day
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@596 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-18 22:29:45 +00:00
jason@long.name
d7c37b2909 bump version
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@595 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-18 22:29:33 +00:00
jason@long.name
478de9aae5 aboutdlg: include information on how to get the source code
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@594 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-18 22:29:23 +00:00
jason@long.name
4f4f166cca aboutdlg: include version/vendor of Java run-time in About dialog box
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@593 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-15 20:30:06 +00:00
jason@long.name
9c5b1fca33 cleanup: no longer need the autoDoze function
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@592 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-27 01:30:36 +00:00
jason@long.name
21ecd20092 autobulldoze: fix behavior of road and rail tools
now when there's not enough money to build a rail or road,
the auto-bulldoze will not have any effect

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@591 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-27 01:30:30 +00:00
jason@long.name
408d3d44bf autobulldoze- fix behavior of wire tool
now when there's not enough money to build wire, the auto-bulldoze
will not have any effect

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@590 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-27 01:30:23 +00:00
jason@long.name
d10ec8e5b1 cleanup: rename canAutoBulldoze to canAutoBulldozeZ
since this method is only for when a ZONE is being placed (Z=Zone)

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@589 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-27 01:30:17 +00:00
jason@long.name
8b428bfc29 autobulldoze: prepare for movement of auto-bulldoze code
When road/rail/wire tool is used, auto-bulldozing occurs before checking
the cost of the road/rail/wire being placed. This means when the user
is low on funds, the wire tool may end up bulldozing only, even though
there is not enough money for building what they want.

This patch prepares the way for moving where the auto-bulldoze check
is done in the case of the road/rail/wire tool.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@588 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-27 01:30:10 +00:00
jason@long.name
32d5a8db7c BudgetDialog: refactor so components are layed out by separate functions
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@587 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-27 00:38:54 +00:00
jason@long.name
6ee909e10c cleanup: create constants for fire/police station maintenance cost
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@586 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 21:26:17 +00:00
jason@long.name
88669eabb6 BudgetDialog: replace funding spinners with sliders
also- add back in the column that indicates how much money is requested
for the various departments

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@585 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 21:26:11 +00:00
jason@long.name
8e9cd7d94d BudgetDialog: if ESC is pressed, close the dialog
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@584 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 21:26:05 +00:00
jason@long.name
6cfc5ef5ef budget: fix bug that caused budget numbers to occassionally be wrong
when bringing up the budget manually, depending on the exact moment
the road/rail/etc counts might be wrong, leading to wrong numbers being
shown

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@583 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 21:25:59 +00:00
jason@long.name
e98727b601 cleanup: eliminate unused MiscHistory class
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@582 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 21:25:52 +00:00
jason@long.name
6524f9c22a java6-compat: make compat wrapper for J7 method setAutoRequestFocus()
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@577 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 14:01:47 +00:00
jason@long.name
7473c893bd java6-compat: eliminate use of diamond operator (a J7-only feature)
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@576 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 14:01:36 +00:00
jason@long.name
b1a1dea224 query tool: check bounds before attempting query
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@575 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 01:19:17 +00:00
jason@long.name
5219c6f1be bugfix: check map boundry in traffic gen
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@574 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 01:19:11 +00:00