Comparing version 0.3.1 to 0.4.0
@@ -39,2 +39,7 @@ const generator = require('./src/generator') | ||
const manifest = { | ||
title: options.areaTitle || 'Generated Area', | ||
info: typeof areaInfo === 'object' ? areaInfo : null | ||
} | ||
const { | ||
@@ -47,3 +52,3 @@ writeToFile = false | ||
if (giveCallback) { | ||
return {graphic, rooms, buildCallback} | ||
return {graphic, rooms, buildCallback, manifest} | ||
} | ||
@@ -58,3 +63,3 @@ | ||
} | ||
return { graphic, rooms, yaml } | ||
return { graphic, rooms, yaml, manifest } | ||
} | ||
@@ -61,0 +66,0 @@ }, |
{ | ||
"name": "axolemma", | ||
"version": "0.3.1", | ||
"version": "0.4.0", | ||
"description": "A tool to procedurally generate areas compatible with the Ranvier MUD engine.", | ||
@@ -32,4 +32,3 @@ "main": "index.js", | ||
"requires-node-version": "^1.0.0", | ||
"rot-js": "^0.6.5", | ||
"rxjs": "^5.5.6" | ||
"rot-js": "^0.6.5" | ||
}, | ||
@@ -36,0 +35,0 @@ "devDependencies": { |
@@ -28,3 +28,3 @@ Axolemma | ||
const {graphic, rooms, yaml} = Axolemma.generate({ // Programmatically pass in options | ||
const {manifest, graphic, rooms, yaml} = Axolemma.generate({ // Programmatically pass in options | ||
type: 'Digger' // Uses ROT-js well-documented map generation algorithms. | ||
@@ -40,2 +40,5 @@ writeToFile: true // Can write YAML definitions to file for static persistence | ||
// Returns area manifest as JS object. | ||
console.log(manifest) | ||
// Returns Ranvier-compatible room definitions. | ||
@@ -50,3 +53,3 @@ const newRooms = rooms.map( | ||
When using Axolemma programmatically (or eventually through the CLI), you can customize the default options using either a `.axolemmaconfig` file or by adding an "axolemma" field in your package.json. | ||
When using Axolemma programmatically, you can customize the default options using either a `.axolemmaconfig` file or by adding an "axolemma" field in your package.json. | ||
@@ -75,3 +78,2 @@ Your `.axolemmaconfig` can be either a JavaScript module or a JSON file. Axolemma will crawl up the directory tree to find the file so it can be in the root directory of your Ranvier bundle, the root of your fork of Ranvier, or even in your user home directory. It will use the 'nearest' config it finds, so you can have multiple configurations at different nesting levels. | ||
* @property {string} [type] The 'type' of map creator to use. This must be the name of a ROT-js Map constructor. Defaults to 'Uniform'. | ||
* @property {number} [roomDugPercentage] Percentage in decimal of map coordinates to be turned into rooms. Defaults to 0.25 (25%). | ||
* @property {timeLimit} [number] Amount of ms to wait for the ROT-js map generator algorithms to complete before giving up. Defaults to 60,000 (one minute). | ||
@@ -81,2 +83,4 @@ */ | ||
Also, check out the ROT-js documentation for the mapper 'type' that you are using, for additional options. | ||
## Misc. | ||
@@ -86,4 +90,8 @@ | ||
The areas it generates are incredibly generic in this iteration so much hand-editing is still required. | ||
The areas it generates are fairly generic in this iteration so much hand-editing is still required. | ||
If you're using this in your Ranvier server to dynamically generate content on the fly, consider using a Cluster or similar to avoid blocking the main process with Axolemma. | ||
If you're using this in your Ranvier server to dynamically generate large amounts content on the fly, consider using a Cluster or similar to avoid blocking the main process with Axolemma. | ||
In testing on a machine with 8GB RAM, Axolemma can generate a 20x20 area in a matter of milliseconds. | ||
See the `examples` directory for code snippets that can be used to make Axolemma play nice with Ranvier. |
@@ -72,3 +72,3 @@ const ROT = require('rot-js') | ||
graphic: map.draw(), | ||
rooms: map.getAllRooms() | ||
rooms: map.getAllRooms().map(room => room.serialize()) | ||
} | ||
@@ -75,0 +75,0 @@ } else { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
228600
8
19
2468
91
1
- Removedrxjs@^5.5.6
- Removedrxjs@5.5.12(transitive)
- Removedsymbol-observable@1.0.1(transitive)