isaacscript-common 1.0.468 → 1.0.469

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -145,19 +145,23 @@ function spawnAllEntities(self, jsonRoom, seed)
145
145
  if y == nil then
146
146
  error("Failed to convert the following y coordinate to a number (for a spawn): " .. yString)
147
147
  end
148
- local entityTypeString = spawn.entity["$"].type
148
+ if #spawn.entity > 1 then
149
+ error("Stacked entities are not implemented for JSON rooms.")
150
+ end
151
+ local xmlEntity = spawn.entity[1]
152
+ local entityTypeString = xmlEntity["$"].type
149
153
  local entityType = tonumber(entityTypeString)
150
154
  if entityType == nil then
151
155
  error("Failed to convert the entity type to a number: " .. entityTypeString)
152
156
  end
153
- local variantString = spawn.entity["$"].variant
157
+ local variantString = xmlEntity["$"].variant
154
158
  local variant = tonumber(variantString)
155
159
  if variant == nil then
156
160
  error(
157
161
  "Failed to convert the entity variant to a number: " .. tostring(variant)
158
162
  )
159
163
  end
160
- local subTypeString = spawn.entity["$"].subtype
164
+ local subTypeString = xmlEntity["$"].subtype
161
165
  local subType = tonumber(subTypeString)
162
166
  if subType == nil then
163
167
  error(
@@ -6,5 +6,5 @@ export interface JSONSpawn {
6
6
  /** Needs to be converted to an int. */
7
7
  y: string;
8
8
  };
9
- entity: JSONEntity;
9
+ entity: JSONEntity[];
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.0.468",
3
+ "version": "1.0.469",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",