mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-29 16:03:14 -04:00
Merge branch 'master' of github.com:MightyPirates/OpenComputers into MC1.7
This commit is contained in:
commit
3a9c6d2b14
@ -5,7 +5,7 @@ include file("hardmode.recipes")
|
|||||||
|
|
||||||
analyzer {
|
analyzer {
|
||||||
input: [["oc:craftingTransistor", torchRedstoneActive, "oc:craftingTransistor"]
|
input: [["oc:craftingTransistor", torchRedstoneActive, "oc:craftingTransistor"]
|
||||||
["oc:circuitTier2", "item.GT_Scanner", "oc:circuitTier2"]
|
["oc:circuitTier2",{item="item.GT_Scanner", subID=any}, "oc:circuitTier2"]
|
||||||
[screwAluminium, craftingToolScrewdriver, screwAluminium]]
|
[screwAluminium, craftingToolScrewdriver, screwAluminium]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,10 +20,12 @@ object SaveHandler {
|
|||||||
def scheduleSave(dimension: Int, chunk: ChunkCoordIntPair, name: String, data: Array[Byte]) = saveData.synchronized {
|
def scheduleSave(dimension: Int, chunk: ChunkCoordIntPair, name: String, data: Array[Byte]) = saveData.synchronized {
|
||||||
if (chunk == null) throw new IllegalArgumentException("chunk is null")
|
if (chunk == null) throw new IllegalArgumentException("chunk is null")
|
||||||
else {
|
else {
|
||||||
val chunks = saveData.getOrElseUpdate(dimension, mutable.Map.empty)
|
|
||||||
// Make sure we get rid of old versions (e.g. left over by other mods
|
// Make sure we get rid of old versions (e.g. left over by other mods
|
||||||
// triggering a save - this is mostly used for RiM compatibility).
|
// triggering a save - this is mostly used for RiM compatibility). We
|
||||||
chunks.values.foreach(_ -= name)
|
// need to do this for *each* dimension, in case computers are teleported
|
||||||
|
// across dimensions.
|
||||||
|
for (chunks <- saveData.values) chunks.values.foreach(_ -= name)
|
||||||
|
val chunks = saveData.getOrElseUpdate(dimension, mutable.Map.empty)
|
||||||
chunks.getOrElseUpdate(chunk, mutable.Map.empty) += name -> data
|
chunks.getOrElseUpdate(chunk, mutable.Map.empty) += name -> data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user