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
|
-
|
|
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 =
|
|
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 =
|
|
164
|
+
local subTypeString = xmlEntity["$"].subtype
|
|
161
165
|
local subType = tonumber(subTypeString)
|
|
162
166
|
if subType == nil then
|
|
163
167
|
error(
|