UI Improvements, prep work for adding in Errata Items to repository #164

Closed
wants to merge 12 commits into from

3 participants

@curttasker
Anathema member

New Feature - Toolbar button for launching Equipment Database.
New Feature - Equipment Database: Copy Item button added
Improvement - Equipment Database: Added tooltips to the New Item, Copy Item, Save Item, and Delete Item buttons
Improvement - Equipment Database: The delete item popup dialog box now shows the name of the item being deleted.
Improvement - Changed the toolbar buttons to be less greyed out all the time.

The JSON bootjob no longer overwrites items if they already exist as JSON objects in the system. This is necessary if I'm going to add the Errata Items to the repository, so they don't get overwritten by someone's old Equipment.yap version.

curttasker added some commits Apr 14, 2012
@curttasker curttasker Modifies the yap -> JSON conversion boot job to not overwrite existin…
…g JSON items.
024ad71
@curttasker curttasker Cleaned this up, and decided the try…catch block wasn't needed here, …
…as its not used around exists() calls anywhere else in anathema.
3f73185
@curttasker curttasker Updated .gitignore to allow JSON items in the /repository/equipment f…
…older.

Testing to be sure it accepts them
3f46de2
@curttasker curttasker Got rid of the old .cvsignore files. Copied their contents to .gitign…
…ore, but even then a lot of them are outdated.

Fixed the .gitignore for the repository stored in version control.  It will now properly ignore characters, items, and such, unless they're explicitly added to git for tracking.

Got rid of FilenameCleaner, made it a private function inside GsonEquipmentDatabase.  Was creating a new object per item in the equipment database just to do a string replace.
Fixed my saveTemplateNoOverwrite() function after rebasing the changes on the newest version.
ccebc8c
@curttasker curttasker Equipment Database - New Feature: Copy Item button
Equipment Database - Bug fix: Resources type and cost does not reset when hitting the new item button
Equipment Database - Added tooltips for New Item, Copy Item, Save Item, Delete Item
a86b55f
@curttasker curttasker New Feature: Added a toolbar button to launch the Equipment Database. e43717b
@curttasker curttasker Added confirmation message for discarding changes when you hit the co…
…py button.
a980eb7
@curttasker curttasker Changed the alpha compositing of the toolbar button icon to be a litt…
…le less transparent. It has always been hard to tell if an icon is active or not, without rolling over it. This makes it much more apparent, while maintaining a very subtle rollover effect.
e415da0
@curttasker curttasker commented on the diff Apr 16, 2012
.gitignore
+*.zip
+Thumbs.db
+
+# Repository
+repository.version
+*.item
+*.ecg
+*.yap
+*.xml
+
+# Copied from /Development_Code/.cvsignore
+/Development_Code/*.java
+/Development_Code/*.pdf
+/Development_Code/*.jasper
@curttasker
Anathema member

Keep in mind that .gitignore just keeps stuff from getting picked up by git status or your gui tool. You can still explicitly add anything ignored here into git by using git add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@curttasker curttasker commented on the diff Apr 16, 2012
Anathema/repository/equipment/Chopping_Sword.item
+ "tags": [],
+ "minimumDamage": 1,
+ "name": "Close",
+ "type": "Melee Weapon"
+ }
+ ]
+ },
+ "description": "2E Core p366, 2.5 Errata p15",
+ "name": "Chopping Sword",
+ "collectionFactory": {},
+ "composition": "None",
+ "cost": {
+ "costType": "Resources",
+ "costValue": 2
+ }
+}
@curttasker
Anathema member

A single sample JSON item. I have the rest of the Errata items done, I just need to alter the build system to take them into account, then I'll add them into git.

@UrsKR
Anathema member
UrsKR added a note Apr 16, 2012

This and your (now removed) comment in the changelog, made me think:
How about adding a new bootjob that leverages the existing Database structure to write those items you want written?
That would take care of distribution and us inadvertently overwriting modified items in a single stroke.

@curttasker
Anathema member

That would be one way to handle distribution. I was envisioning just rolling them into the deployment process, so they'd just naturally appear in the repository/equipment folder on install. I admit, I did have a few lingering questions like: "What do we do when we want to update a "built in" item. Do we overwrite the item in the repository? What if the user has made customizations to the item?

I'm open to adding in the items if and only if the user has no existing database, but the only problem I see is that we still don't have an ordering system in place for bootjobs. So we can't rely on the Equipment.yap file already having been converted by the Databse bootjob. This new bootjob would have to know how to both check for JSON items in the repository, but also have to check for the Equipment.yap file. If neither of those items existed, it could extract the "default items".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@curttasker curttasker commented on the diff Apr 16, 2012
...acter/equipment/item/CopyEquipmentTemplateAction.java
+
+ @Override
+ protected void execute(Component parentComponent) {
+ DiscardChangesVetor vetor = new DiscardChangesVetor(resources, new ICondition() {
+ public boolean isFulfilled() {
+ return model.getTemplateEditModel().isDirty();
+ }
+ }, parentComponent);
+ if (vetor.vetos()) {
+ return;
+ }
+ model.getTemplateEditModel().copyNewTemplate();
+ setEnabled(false);
+ }
+
+}
@curttasker
Anathema member

New button to allow copying of an item in the equipment database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@curttasker curttasker commented on the diff Apr 16, 2012
...ter/equipment/item/RemoveEquipmentTemplateAction.java
@@ -38,7 +39,7 @@ private void updateEnabled(String string) {
@Override
protected void execute(Component parentComponent) {
- String messageText = resources.getString("Equipment.Creation.DeleteMessage.Text"); //$NON-NLS-1$
+ String messageText = model.getTemplateEditModel().getEditTemplateId() + " - " + resources.getString("Equipment.Creation.DeleteMessage.Text"); //$NON-NLS-1$
@curttasker
Anathema member

Added the name of the item you're deleting to the text in the popup box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@curttasker curttasker commented on the diff Apr 16, 2012
...data/language/equipment/Equipment_Database.properties
@@ -13,6 +13,11 @@ Equipment.Creation.Stats=Stats
Equipment.Creation.Stats.AddActionTooltip=Add new stats
Equipment.Creation.Stats.EditActionTooltip=Edit selected stats
+Equipment.Creation.Item.NewActionTooltip=Create new item
+Equipment.Creation.Item.CopyActionTooltip=Copy this item
+Equipment.Creation.Item.SaveActionTooltip=Save this item
+Equipment.Creation.Item.RemoveActionTooltip=Delete this item
@curttasker
Anathema member

New tooltips!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@curttasker curttasker and 1 other commented on an outdated diff Apr 16, 2012
...r/equipment/impl/item/model/gson/FilenameCleaner.java
@@ -1,7 +0,0 @@
-package net.sf.anathema.character.equipment.impl.item.model.gson;
-
-public class FilenameCleaner {
- public String clean(String input) {
- return input.replaceAll("\\W", "_");
- }
-}
@curttasker
Anathema member

This just seemed like a waste of a class. Either make it static, or make it a private method in the JSON area (this is what i did).

@UrsKR
Anathema member
UrsKR added a note Apr 16, 2012

If those are the options you are dealing with, please make it either static or refactor the test so it keeps running.
I think the only way to improve coverage without major pain is by extracting these things and testing them in isolation.

@curttasker
Anathema member

I was more concerned that java was creating a new object for each and every item loaded into the database, only to basically call a simple replaceAll() funciton a String.
I'm not up to speed on how the JVM optimizes that sort of thing lately; as they are essentially identical objects, either java's being smart and re-using a single FilenameCleaner object for every call, or its actually creating a unique FilenameCleaner for every item.

Static works, but it seems a bit hollow since there's only really 1 line of code here. Which do you prefer?
1) Reinstate FilenameCleaner as a static class.
2) Changing GsonEquipmentDatabase.cleanFilename() to be protected and change the unit test to call that function.
3) Rolling the FilenameCleaner unit test into a full blown unit test for GsonEquipmentDatabase.

@UrsKR
Anathema member
UrsKR added a note Apr 16, 2012

If free choice is mine, 3) by all means.
Else 1).

@curttasker
Anathema member

Honestly though, I'm not sure this needs to be tested, period. String.replaceAll() is a core java function, and we're guaranteed its going to work as advertised. The filename cleaner simply does String.replaceAll( \\W", "_"), which amounts to doing a regex search and replace on anything that matches this pattern: [^A-Za-z0-9_] and converting it to an underscore.

Code doesn't get much simpler than this. Every one of the test cases in FilenameCleanerTest are 100% going to pass, unless a core Java String library function breaks.

@UrsKR
Anathema member
UrsKR added a note Apr 16, 2012

I'm not that comfortable with patterns that I would have known that off hand, and the test gives me a good impression of the intention behind it. I wrote the tests to make sure I got that right.

@curttasker
Anathema member

I'm leaning towards 1) for now, as its a very quick fix. I'd like to do 3) down the road, but i think that's going to require some serious work to do right :)

@curttasker
Anathema member

1) was implemented for now, test passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@curttasker curttasker commented on the diff Apr 16, 2012
...pment/impl/item/model/gson/GsonEquipmentDatabase.java
@@ -73,6 +73,12 @@ public void saveTemplate(IEquipmentTemplate template) {
availableTemplatesChangeControl.fireChangedEvent();
}
+ public void saveTemplateNoOverwrite(IEquipmentTemplate template) {
+ if( loadTemplate( template.getName() ) == null ) {
+ saveTemplate( template );
+ }
+ }
+
@curttasker
Anathema member

Used only by the JSON conversion bootjob, just makes sure not to overwrite an existing item.

@UrsKR
Anathema member
UrsKR added a note Apr 16, 2012

This is so the bootjob doesn't overwrite extracted-and-modified items when the user puts another .yap database into the folder, while the bootjob still relies on the version stored in the database file?

@curttasker
Anathema member

The intent is that during the bootjob process, after its loaded Equipment.yap into memory and is writing the items to file as JSON objects, it will check for an existing JSON Item_Name.item in the repository/equipment folder. If such an item exists, it won't save the version from Equipment.yap.

The idea was to add in all the 2.5 Errata items into git, and into the build process, so they'd extract during install to the repository/equipment folder.

See my comment at the end for more discussion on how to handle these 2.5 items.

@curttasker
Anathema member

While this is no longer necessary for handling overwriting of "default" items, I'd keep this in here simply because it handles an edge case: The user drops in somebody's Equipment.yap file in with their JSON items. With this in place, it will preserve their JSON items if they're the same name as the ones in the yap file. Without this, the yap contents would overwrite the JSON ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@curttasker curttasker commented on an outdated diff Apr 16, 2012
...pment/impl/item/model/gson/GsonEquipmentDatabase.java
String json = gson.toJson(template);
access.write(id, json);
}
+
+ private String cleanFilename(String input) {
+ return input.replaceAll("\\W", "_");
+ }
}
@curttasker
Anathema member

My replacement for the FilenameCleaner class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@curttasker curttasker commented on the diff Apr 16, 2012
...equipment/impl/module/StartEquipmentDatabaseTool.java
+import net.sf.anathema.framework.IAnathemaModel;
+import net.sf.anathema.framework.presenter.toolbar.IAnathemaTool;
+import net.sf.anathema.framework.view.toolbar.IAnathemaToolbar;
+import net.sf.anathema.initialization.Tool;
+import net.sf.anathema.lib.resources.IResources;
+import net.sf.anathema.platform.database.StartDatabaseAction;
+
+@Tool
+public class StartEquipmentDatabaseTool implements IAnathemaTool {
+
+ public void add(IResources resources, IAnathemaModel model, IAnathemaToolbar toolbar) {
+ toolbar.addSeparator();
+ EquipmentDatabaseActionProperties properties = new EquipmentDatabaseActionProperties(resources, model);
+ toolbar.addTools(StartDatabaseAction.createToolAction(resources, model, properties));
+ }
+}
@curttasker
Anathema member

I'm honestly not sure why nobody ever wrote this class. The backend work was mostly good to go, it just needed a tool action to add the Equipment Database to the toolbar.

@smattox
Anathema member
smattox added a note Apr 16, 2012

I had tried to do so once before, but was thrown off when the resulting button appeared to the left of new/load/save functions, which looks a bit unnatural. We'd briefly discussed adding some means of determining sorting or priority, which I'd planned to look at eventually.

I suppose it doesn't really hurt to do now, though. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@curttasker curttasker commented on the diff Apr 16, 2012
...sf/anathema/framework/view/toolbar/ToolBarButton.java
@@ -34,7 +34,7 @@ private void configureActionIcons(Action action) {
Image image = new BufferedImage(width, height, Transparency.TRANSLUCENT);
Graphics2D graphics = (Graphics2D) image.getGraphics();
- Composite alpha = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .5f);
+ Composite alpha = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .8f);
@curttasker
Anathema member

This makes the toolbar so much more readable. I got really tired of mousing over toolbar icons to be able to figure out what's greyed out and what's actually usable.

@UrsKR
Anathema member
UrsKR added a note Apr 16, 2012

Agreed, the more brilliant look helps a long way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@curttasker
Anathema member

On a side note, I put my inline comments up inside the pull request, rather than in the code in my fork before submitting the pull request. I just wanted to see what'd happen. Do you guys have any preference between the two?

@UrsKR
Anathema member

@curttasker, I like this version far better, 'cause I can see what you're commenting on.

@smattox smattox was assigned Apr 16, 2012
@smattox
Anathema member

Er, this issue is assigned to me, not sure why. Is the review over?

@UrsKR
Anathema member

My bad. I meant to assign #153, to help my personal filter along, and picked the wrong one.

@UrsKR
Anathema member

As for reviewing,
@JMobius, what's your current take on the equipment-in-the-toolbar-situation? In or out?
@curttasker, the "copy item" functions seems shallow to me. What's the point of just modifying the item's name?

@curttasker
Anathema member

@UrsKR, The code for the copy item function is deceptive. Although it looks like its "only" changing the item's name, it actually effectively creates an entirely new item in the edit template screen with the same attributes as the old one. The real magic is that pushing the save button now creates a new item, rather than just updating the stats of the old item.

Use Case:
You want to take an item and make an exceptional version of it. You don't want to overwrite the normal version of the item in the database. You want an exact duplicate, so you can tweak some stats, then re-save this new version to the database with a new name. Without using the copy button, there is just no easy way to do this. If you make changes to an item (even its name), and press the save button, it overwrites the old item in the database. Your options are:

  • Manually make a copy of the JSON item in the file system, change the name field with a text editor, reload the equipment database.
  • Write down the stats for the existing item, push the new button, and create an entirely new item with those same stats entered by hand.
@curttasker
Anathema member

My main reason for adding the Equipment Database toolbar button is that the equipment database is a feature I use a lot, and having to launch it from the menubar rather than the toolbar is just annoying. Especially if you're testing new functionality to the equipment database and have to do this a few hundred times in an hour. Eventually I'd love a menubar hotkey to run it, but for now, the toolbar icon suffices.

@UrsKR @JMobius On the equipment as toolbar option, I did notice that there's no way to control the order in which the toolbar items get added. I figured I'd add such a feature in a future build.

Currently, its already reeling its head. If I run 4.0.0 from the packaged Anathema.app, the toolbar looks like this:

New | Open | Save | Save All | Charm Cascade | Music

If I run the current build from a jar file, the toolbar looks like this:

Charm Cascade | New | Open | Save | Save All | Music

The system definitely needs some ordering code, and it didn't look like a difficult problem to solve.

@smattox
Anathema member

@UrsKR @curttasker -- I'd say go ahead and add it. Some jumbled ordering for the time being is a small price to pay for making the equipment editor more obvious. I spent months before I found the editor in the menu, and not a release thread seems to go by where someone asks us to kindly add such a handy feature. :)

@curttasker
Anathema member

@UrsKR On the subject of adding in the Errata Equipment, we need to clarify how this is handled.

1) Do we intend this "default" equipment to be a one time install for new users with an empty repository, or should it be open to all users?
2) Do we intend to maintain these "default" items going forward? If we update an item, should it overwrite any user made changes?
3) If we install the equipment for all users, do we ensure that any items with the same name from the user's Equipment.yap file do not overwrite ours?
4) For existing users, should we instead distribute the items inside a zip file, so that savvy users can choose to add the items manually and selectively after the Equipment.yap conversion has happened on first launch?

Can anybody think of any other scenarios we should handle? I'll poke at the problem later today, and see what I come up with.

@smattox
Anathema member

I'm not sure I really like the idea of forcibly adding pre-populated data to equipment. Providing a ZIP seems fine, but I wouldn't assume to impose it on anyone.

@UrsKR
Anathema member

@curttasker, re:copy. I know. It just feels a little off. I think it would feel better if you directly persist the copy (so it shows up in the master list) and load it for editing.

Re: Including the items: There seems to be stuff to discuss.
How about doing it here, and come back when we have a decision?

@curttasker
Anathema member

@UrsKR Before making any decisions on the usefulness of the copy button, I'd highly advise trying to do some mass data entry of similar items (lets say dailklave, grand daiklave, reaver daiklave, reaper daiklave) into the your database. Then check out my branch and do it again, but use the copy button.

Currently, if you press the New Item button, it doesn't show a new empty item in the master list. Only the Save button adds an item to this list. I feel like adding the new copy to the list immediately would confuse the user, who has been trained through years of using Anathema that only the Save button updates that list.

I do see what you're getting at, that there's a lack of visual feedback to the user that the copy button actually did anything but change the name. I made sure that the save button will enable itself when you hit copy, indicating that you can now save this new item. I also made the copy button disable itself so that the user can't click copy multiple times in a row without first making some changes to the item. Its subtle, but its there.

@UrsKR
Anathema member

@curttasker, I don't doubt the general usefulness. I was just wondering about the behaviour you chose to give it, as opposed to what I had expected. Seems changing the way it works to what I proposed above detrimental to you?

@curttasker
Anathema member

@UrsKR I'll implement the change and do some data entry later tonight, and see how it works out.

@curttasker
Anathema member

Handling Default Equipment

From our discussion thread, on Code vs Stored Form:
@UrsKR " If we do it, I'd rather include the data as code rather than in stored form, because could leverage existing structures and would keep it refactoring-safe."

I'm hesitant to do this. It seems akin to suggesting storing charms as code rather than as XML. We have this nice GUI for editing items, which produces JSON item files. If we had to update the base items in the future (Errata 3.0), we could load them up in the gui, make edits there, then just check the new items into the database. Seems a bit more intuitive and safer than searching through code for the right properties and editing the values there.

I'm currently leaning towards the following:

  • Check the JSON items into git here: Anathema/repository/equipment
  • Change the build process to zip up all the *.item files in this folder, archive them as Equipment_v4.1.0.zip
  • Include this zip file the list of dependencies for the build process, so it gets included into buildZip, buildWindowsExecutable, buildWindowsInstaller, and buildMacApplication.
  • Add a bootjob that will move the Equipment_v4.1.0.zip file to repository.
  • Add a bootjob that will extract the zip file's contents into repository/equipment if the user has no files in that folder.

Anyways, I'm not final on any of this, just tossing out my current ideas. I'll poke around with it this afternoon and see how it works out.

curttasker added some commits Apr 16, 2012
@curttasker curttasker Re-added FilenameCleaner. Changed its clean method to static, and mad…
…e GsonGquipmentDatabase call it rather than a private function.

Net effect should be the same, and will still use far less object creation than the initial implementation.
5956c27
@curttasker curttasker Equipment Database: Improved the Copy Item button
Now automatically saves the new copy when the button is pressed, and it appears on the master list to the left.
Necessitating this was additional code to handle what happens if the copy button is pressed and the auto generated new name is the same as an item that already exists.
Rather than creating a dialog box asking if you want to overwrite the existing item, it simply keeps generating new names until it finds one that isn't taken, and uses that as the name of the copy.
Improved the copy mechanism to properly fail the isDirty() test, which ensures you aren't bothered with "Discard Changes" dialog boxes when switching away from the edit view.
62dc5de
@curttasker curttasker commented on the diff Apr 17, 2012
...pment/impl/item/model/EquipmentTemplateEditModel.java
statses.clear();
fireStatsChangedEvent();
}
+
+ @Override
+ public void copyNewTemplate( String salt ) {
+ editTemplateId += salt;
+ getDescription().getName().setText(editTemplateId);
+ editedTemplate = createTemplate();
@curttasker
Anathema member

Setting the editedTemplate to be a copy of the current template ensures that the isDirty() routine properly fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@curttasker curttasker commented on the diff Apr 17, 2012
...pment/impl/item/model/gson/GsonEquipmentDatabase.java
String json = access.read(id);
return gson.fromJson(json);
}
private void save(IEquipmentTemplate template) {
- String id = new FilenameCleaner().clean(template.getName());
+ String id = FilenameCleaner.clean(template.getName());
String json = gson.toJson(template);
@curttasker
Anathema member

These are static to avoid excess object creation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@curttasker curttasker Increased the amount of memory used by the unix variant of the gradle…
…w script.

I started bumping up against the java heap limit running the test target.  Now, compiling is *much* faster, and it doesn't run out of memory.

**./gradlew test - Default 256m Max Heap Size:**
BUILD FAILED
Total time: 14 mins 48.394 secs

**./gradlew test - 512m Max Heap Size**
BUILD SUCCESSFUL

Total time: 1 mins 39.443 secs

**./gradlew test - 1024m Max Heap Size**
BUILD SUCCESSFUL

Total time: 1 mins 27.968 secs
21c00e9
@curttasker curttasker commented on the diff Apr 17, 2012
gradlew.bat
@@ -9,8 +9,8 @@
if "%OS%"=="Windows_NT" setlocal
@rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
-set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512m
-set JAVA_OPTS=%JAVA_OPTS% -Xmx512m
+set GRADLE_OPTS=%GRADLE_OPTS% -Xmx1024m
+set JAVA_OPTS=%JAVA_OPTS% -Xmx1024m
@curttasker
Anathema member

Upped these to 1024 for conformity, and a little extra compile speed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@curttasker curttasker commented on the diff Apr 17, 2012
@@ -7,8 +7,8 @@
##############################################################################
# Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
-# GRADLE_OPTS="$GRADLE_OPTS -Xmx512m"
-# JAVA_OPTS="$JAVA_OPTS -Xmx512m"
+GRADLE_OPTS="$GRADLE_OPTS -Xmx1024m"
+JAVA_OPTS="$JAVA_OPTS -Xmx1024m"
@curttasker
Anathema member

Oh god, why were these commented out?

@UrsKR
Anathema member
UrsKR added a note Apr 17, 2012

They are auto-generated and we had no Linux-users to worry about them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@curttasker
Anathema member

Update:
The copy button has been updated to work as you suggested, and the change to FilenameCleaner was done to enable the unit test to pass.

The branch is good to pull in anytime, I can make a new branch for the actual Ettata items and any build changes / bootjobs that it takes to get them going.

I will say I'm not quite as dismissive about putting the items into code, after dealing with moving and extracting the JSON files around with the deployment process such that it works on all 3 platforms. We'll see what solution I come up with tomorrow with regards to this. I expect to have it working within a day or two.

@UrsKR UrsKR was assigned Apr 17, 2012
@UrsKR UrsKR added a commit that closed this pull request Apr 17, 2012
@UrsKR UrsKR Merge remote-tracking branch 'curtis/addingErrataItems' with minor ch…
…anges. Fixes #164.

Conflicts:
	Development_Documentation/Distribution/English/versions.txt
d219665
@UrsKR UrsKR closed this in d219665 Apr 17, 2012
@UrsKR
Anathema member

Copying feels "right" now, thank you.

Regarding the items, I get a feeling that the separation of data and code is important to you. Is that correct?

If so, we could take the middle ground and distribute the items as JSON, but pack them as a jar and load them via a bootjob from the classpath: We create two instances of the equipment DB, one that's fed from the classpath and one that can write to the repo, read the items from the one and write them into the other - once, at first boot.
To me, it seems more adequate than doing ZIP handling and changing the distribution process itself, and thus it could cover your wishes as well as mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment