Commit graph

137 commits

Author SHA1 Message Date
SenseiKiwi
f542941074 Replaced Hashtable with HashMap
Replaced all instances of Hashtable in our code with HashMap. I had
never given that much thought until Steven mentioned it. HashMap is a
better alternative for our code.
2013-06-16 11:06:08 -04:00
SenseiKiwi
63be7fefc1 Tweaked Dungeon Tutorial Copy Code
Tweaked the code that copies the dungeon export tutorial. I'm not sure
it worked all the time before. It didn't seem quite right. I've
confirmed it's working better now. Also cleaned up copyfile a little.
2013-06-16 10:54:03 -04:00
SenseiKiwi
61297c3a3a Improved DungeonHelper
Separated exportDungeon() from registerCustomDungeon() - exporting a
dungeon no longer automatically registers it. Also changed
exportDungeon() so that it returns a boolean indicating success or
failure, instead of an instance of DungeonGenerator that was never being
used. I modified CommandEndDungeonCreation so that it can warn you if
exporting the dungeon failed (if exportDungeon() returned false), and
also, to register the dungeon after it's exported since it's no longer
automatic.
2013-06-16 05:59:53 -04:00
SenseiKiwi
256384b455 Merging upstream changes
Merging upstream changes
2013-06-16 04:56:27 -04:00
StevenRS11
5e107f37f9 a few last tweaks 2013-06-16 03:40:46 -04:00
StevenRS11
cd4679c8fd configurable rift gen and monolith spawn density 2013-06-16 02:59:02 -04:00
SenseiKiwi
1bb8ddc1c4 Merging in upstream changes 2013-06-16 02:46:39 -04:00
StevenRS11
0752c032d3 merged SenseiKiwi changes 2013-06-16 01:50:23 -04:00
StevenRS11
a2eb4cf524 Fixed limbo return, schematic crash 2013-06-16 01:44:05 -04:00
SenseiKiwi
8e200da01b Fixed minor bug
Fixed a bug with an uninitialized variable in DungeonHelper. Oops!
2013-06-16 01:30:13 -04:00
SenseiKiwi
d2259c3f5d Reintegrated initialization code for DungeonHelper
I had previously removed the function calls in mod_pocketDim to migrate
them to DungeonHelper. Completed the migration now.
2013-06-16 01:13:06 -04:00
SenseiKiwi
f56893018d Changed DungeonHelper into a singleton
Changed DungeonHelper into a singleton. Changed code in other classes to
interface with it properly.
2013-06-16 01:00:05 -04:00
SenseiKiwi
9828bd7f40 Fixed duplicate custom dungeon listing
Removed a line in CommandEndDungeonCreation that inserted a new dungeon
directly into DungeonHelper.customDungeons. This had a chance of causing
a duplicate listing. registerCustomDungeon() was already being invoked
before and if reading tags from the file name failed, the dungeon would
get added twice. This could explain some of the buggy dungeon listing
that would appear during testing.
2013-06-15 11:30:05 -04:00
SenseiKiwi
86f0cd7d21 Improved DungeonHelper.registerCustomDungeon()
Changed the function to use a Hashtable mapping dungeon types to their
respective lists so that it wouldn't be necessary to hardcode a
condition for each type. The code is much shorter now and we can add new
types with ease. The next stage will be to remove
weightedDungeonGetList, if possible, so that we don't have to construct
a list with duplicates just to have weights. The loop that repeatedly
inserted dungeons into that list has been removed anyway, but it
shouldn't affect anything since custom dungeon integration was broken
and weights were being ignored.
2013-06-15 11:21:49 -04:00
SenseiKiwi
1e2dedaafe Overhauling DungeonHelper
I changed the name filter for schematic names from
CommandEndDungeonCreation to DungeonHelper, and renamed it to
NamePattern. I also rewrote most of registerCustomDungeon() to be much
more concise. The changes are incomplete but I'm making an intermediate
commit. The aim is to change DungeonHelper into a proper singleton and
to eliminate the clunky sections that manually map dungeon categories to
their corresponding lists. Instead, I'll use data structures to
implement that far more efficiently.
2013-06-15 10:25:50 -04:00
SenseiKiwi
51969793a5 Fixed minor bug and cleaned up DungeonHelper
Set various lists of DungeonGenerators to private - there was no need to
make them public fields. While cleaning up the code before, I
accidentally erased the default constructor, which handled loading a
reference to DDProperties. I've put the code back in so that the class
works correctly.
2013-06-15 08:46:28 -04:00
SenseiKiwi
84e430abfd Improved DungeonHelper
I was able to infer that HashMap schematic should have generic
parameters <String, Tag> and changed the declaration accordingly. All
generic collections in DungeonHelper are now parameterized properly.
2013-06-15 08:13:50 -04:00
SenseiKiwi
172e3e3af1 Cleaned up and tweaked DungeonHelper
Cleaned up the indentation and empty lines in DungeonHelper. Set
metadataFlipList and metadataNextList to have generic type Integer,
since they're used to store block IDs. Whenever possible, we should
always be using parameterized collections instead of leaving their types
unspecified. I'd like to fix up the schematic HashMap in the future -
unless it's necessary, we shouldn't be storing values of various types
in that collection. Strongly typed variables or a class with the
appropriate fields would be much cleaner.
2013-06-15 08:07:33 -04:00
StevenRS11
9c33393d89 release 2013-06-15 05:34:36 -04:00
StevenRS11
7ebcfb6c20 release 2013-06-15 04:19:08 -04:00
StevenRS11
fa4055f198 Fixed monolith spawning 2013-06-15 02:09:17 -04:00
StevenRS11
5f5569e9b9 fixed chest crash and mobelisk spawns 2013-06-14 04:58:48 -04:00
StevenRS11
078ee999be Merging changes 2013-06-14 01:53:30 -04:00
SenseiKiwi
b11354767d Overhauled configuration properties
Moved all configuration variables from mod_pocketDim to DDProperties
(formerly DimDoorsConfig). Changed property names to be clearer in
config file, modified some comments, and generally cleaned up the config
file. Fixed some missing properties and variables that were reading from
the wrong properties. Modified the order in which mod_pocketDim
instantiated some of its static fields so that they would load after
properties are read. Almost all classes load after properties are read.
Fixed indentation across various files and replaced references to
properties in mod_pocketDim with references to DDProperties.
2013-06-13 19:01:54 -04:00
StevenRS11
ebf35a056a Release canidate 2013-06-13 16:44:17 -04:00
StevenRS11
b388a00e05 redid commands, added more rotation support. 2013-06-12 17:59:34 -04:00
StevenRS11
2c09434e4c importing TE 2013-06-12 00:42:24 -04:00
StevenRS11
eee6f11154 working on block rotation 2013-06-11 15:43:27 -04:00
StevenRS11
b4cc959a35 fixed save data 2013-06-11 14:42:11 -04:00
StevenRS11
cfd19d9c88 working on save data 2013-06-11 14:36:42 -04:00
StevenRS11
68d2bde10a fixed save breaker 2013-06-11 13:21:39 -04:00
StevenRS11
43ead374cc fixed instacrash 2013-06-11 00:41:40 -04:00
StevenRS11
bd1c1d0118 finished update, starting testing builds 2013-06-10 17:03:52 -04:00
StevenRS11
4858a69be5 Export function added 2013-06-04 08:52:06 -04:00
StevenRS11
b97eab46b5 rebuilt how rifts get dungeon data assigned to them 2013-06-03 20:56:15 -04:00
StevenRS11
27c073f75d .schematic importer finished 2013-06-01 21:43:56 -04:00
StevenRS11
7c4feff0ea redid orientation handling, works better now.
Vastly improved y level detection for teleports
2013-05-03 19:34:01 -04:00