Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified scienceworld/scienceworld.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class Generator(val displayOnOff:Boolean = true) extends PolarizedElectricalComp
override def tick(): Boolean = {
// If this generator is activated, then generate a voltage potential at the terminals.
if (this.propDevice.get.isActivated) {
this.anode.voltage = Some(VOLTAGE_GENERATOR)
this.cathode.voltage = Some(VOLTAGE_GROUND)
this.anode.voltage = Some(VOLTAGE_GROUND)
this.cathode.voltage = Some(VOLTAGE_GENERATOR)
} else {
this.anode.voltage = None
this.cathode.voltage = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ class TaskElectricCircuit(val mode:String = MODE_POWER_COMPONENT) extends TaskPa
// This should never happen?
}
}
runAction("connect " + PathFinder.getObjUniqueReferent(wire1, getCurrentAgentLocation(runner)).get + " terminal 2 to " + cathodeReferent, runner) // to device cathode
runAction("connect " + PathFinder.getObjUniqueReferent(wire2, getCurrentAgentLocation(runner)).get + " terminal 2 to " + anodeReferent, runner) // to device anode
runAction("connect " + PathFinder.getObjUniqueReferent(wire1, getCurrentAgentLocation(runner)).get + " terminal 2 to " + anodeReferent, runner) // to device anode
runAction("connect " + PathFinder.getObjUniqueReferent(wire2, getCurrentAgentLocation(runner)).get + " terminal 2 to " + cathodeReferent, runner) // to device cathode


// Wait one moment, for the power to cycle
Expand Down Expand Up @@ -421,8 +421,8 @@ class TaskElectricCircuit(val mode:String = MODE_POWER_COMPONENT) extends TaskPa
// This should never happen?
}
}
runAction("connect " + PathFinder.getObjUniqueReferent(wire1, getCurrentAgentLocation(runner)).get + " terminal 2 to " + cathodeReferent, runner) // to device cathode
runAction("connect " + PathFinder.getObjUniqueReferent(wire2, getCurrentAgentLocation(runner)).get + " terminal 2 to " + anodeReferent, runner) // to device anode
runAction("connect " + PathFinder.getObjUniqueReferent(wire1, getCurrentAgentLocation(runner)).get + " terminal 2 to " + anodeReferent, runner) // to device anode
runAction("connect " + PathFinder.getObjUniqueReferent(wire2, getCurrentAgentLocation(runner)).get + " terminal 2 to " + cathodeReferent, runner) // to device cathode

// If power source is non-renewable, we need to turn it on
if (powerSourceDescription == "nonrenewable") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,8 @@ class TaskElectricalConductivity(val mode:String = MODE_TEST_CONDUCTIVITY) exten
// This should never happen?
}
}
runAction("connect " + PathFinder.getObjUniqueReferent(wire1, getCurrentAgentLocation(runner)).get + " terminal 2 to " + cathodeReferent, runner) // to device cathode
runAction("connect " + PathFinder.getObjUniqueReferent(wire3, getCurrentAgentLocation(runner)).get + " terminal 2 to " + anodeReferent, runner) // to device anode
runAction("connect " + PathFinder.getObjUniqueReferent(wire1, getCurrentAgentLocation(runner)).get + " terminal 2 to " + anodeReferent, runner) // to device anode
runAction("connect " + PathFinder.getObjUniqueReferent(wire3, getCurrentAgentLocation(runner)).get + " terminal 2 to " + cathodeReferent, runner) // to device cathode

// Connect substance to test
if ((substance.get.propMaterial.isEmpty) || (substance.get.propMaterial.get.stateOfMatter == "solid")) {
Expand Down Expand Up @@ -673,8 +673,8 @@ class TaskElectricalConductivity(val mode:String = MODE_TEST_CONDUCTIVITY) exten
// This should never happen?
}
}
runAction("connect " + PathFinder.getObjUniqueReferent(wire1, getCurrentAgentLocation(runner)).get + " terminal 2 to " + cathodeReferent, runner) // to device cathode
runAction("connect " + PathFinder.getObjUniqueReferent(wire2, getCurrentAgentLocation(runner)).get + " terminal 2 to " + anodeReferent, runner) // to device anode
runAction("connect " + PathFinder.getObjUniqueReferent(wire1, getCurrentAgentLocation(runner)).get + " terminal 2 to " + anodeReferent, runner) // to device anode
runAction("connect " + PathFinder.getObjUniqueReferent(wire2, getCurrentAgentLocation(runner)).get + " terminal 2 to " + cathodeReferent, runner) // to device cathode

// If power source is non-renewable, we need to turn it on
if (powerSourceDescription == "nonrenewable") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,8 @@ class TaskElectricalConductivity2(val mode:String = MODE_TEST_CONDUCTIVITY_UNKNO
// This should never happen?
}
}
runAction("connect " + PathFinder.getObjUniqueReferent(wire1, getCurrentAgentLocation(runner)).get + " terminal 2 to " + cathodeReferent, runner) // to device cathode
runAction("connect " + PathFinder.getObjUniqueReferent(wire3, getCurrentAgentLocation(runner)).get + " terminal 2 to " + anodeReferent, runner) // to device anode
runAction("connect " + PathFinder.getObjUniqueReferent(wire1, getCurrentAgentLocation(runner)).get + " terminal 2 to " + anodeReferent, runner) // to device anode
runAction("connect " + PathFinder.getObjUniqueReferent(wire3, getCurrentAgentLocation(runner)).get + " terminal 2 to " + cathodeReferent, runner) // to device cathode

// Connect substance to test
runAction("connect " + substance.get.name + " terminal 1 to " + PathFinder.getObjUniqueReferent(wire2, getCurrentAgentLocation(runner)).get + " terminal 2", runner)
Expand Down