Skip to content

Commit

Permalink
Make Machine.signal less picky about the types of maps it accepts.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnuecke committed Dec 17, 2016
1 parent 1d5c699 commit 0148ccf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/scala/li/cil/oc/server/machine/Machine.scala
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ class Machine(val host: MachineHost) extends prefab.ManagedEnvironment with mach
case arg: java.lang.String => arg
case arg: Array[Byte] => arg
case arg: Map[_, _] if arg.isEmpty || arg.head._1.isInstanceOf[String] && arg.head._2.isInstanceOf[String] => arg
case arg: mutable.Map[_, _] if arg.isEmpty || arg.head._1.isInstanceOf[String] && arg.head._2.isInstanceOf[String] => arg.toMap
case arg: java.util.Map[_, _] if arg.isEmpty || arg.head._1.isInstanceOf[String] && arg.head._2.isInstanceOf[String] => arg.toMap
case arg: NBTTagCompound => arg
case arg =>
OpenComputers.log.warn("Trying to push signal with an unsupported argument of type " + arg.getClass.getName)
Expand Down

0 comments on commit 0148ccf

Please sign in to comment.