Use act() in reactor scripts where possible, provide empty act() otherwise
"function hit()" has triggered on each reactor hit, while "function act()" is only triggered once it's destroyed or reached an end state
This commit is contained in:
@@ -27,3 +27,5 @@ function hit() {
|
|||||||
var map = rm.getMap();
|
var map = rm.getMap();
|
||||||
map.moveEnvironment("trap" + rm.getReactor().getName()[5], 1);
|
map.moveEnvironment("trap" + rm.getReactor().getName()[5], 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function act() {}
|
||||||
@@ -25,6 +25,6 @@
|
|||||||
* Neo City Trash Can
|
* Neo City Trash Can
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function hit() {
|
function act() {
|
||||||
rm.dropItems(true, 2, 5, 10, 1);
|
rm.dropItems(true, 2, 5, 10, 1);
|
||||||
}
|
}
|
||||||
@@ -25,6 +25,6 @@
|
|||||||
* Neo City Trash Can
|
* Neo City Trash Can
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function hit() {
|
function act() {
|
||||||
rm.dropItems(true, 2, 5, 10, 1);
|
rm.dropItems(true, 2, 5, 10, 1);
|
||||||
}
|
}
|
||||||
@@ -27,3 +27,5 @@
|
|||||||
function hit() {
|
function hit() {
|
||||||
rm.sprayItems();
|
rm.sprayItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function act() {}
|
||||||
@@ -2,8 +2,6 @@
|
|||||||
Yulete's Lab: Making the Reagent
|
Yulete's Lab: Making the Reagent
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function hit() {
|
function act() {
|
||||||
if (rm.getReactor().getState() == 4) {
|
|
||||||
rm.dropItems();
|
rm.dropItems();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -41,3 +41,5 @@ function hit() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function act() {}
|
||||||
@@ -20,11 +20,11 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*2618000.js - MagatiaPQ Beaker
|
/*2618001.js - MagatiaPQ Door
|
||||||
*@author Ronan
|
*@author Ronan
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function hit() {
|
function act() {
|
||||||
var eim = rm.getEventInstance();
|
var eim = rm.getEventInstance();
|
||||||
|
|
||||||
var isAlcadno = eim.getIntProperty("isAlcadno");
|
var isAlcadno = eim.getIntProperty("isAlcadno");
|
||||||
|
|||||||
@@ -20,11 +20,11 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*2618000.js - MagatiaPQ Beaker
|
/*2618002.js - MagatiaPQ Door
|
||||||
*@author Ronan
|
*@author Ronan
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function hit() {
|
function act() {
|
||||||
var eim = rm.getEventInstance();
|
var eim = rm.getEventInstance();
|
||||||
|
|
||||||
var isAlcadno = eim.getIntProperty("isAlcadno");
|
var isAlcadno = eim.getIntProperty("isAlcadno");
|
||||||
|
|||||||
@@ -27,3 +27,8 @@
|
|||||||
function hit() {
|
function hit() {
|
||||||
rm.dropItems();
|
rm.dropItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function act() {
|
||||||
|
// There's a timeout of 3 seconds to revert back from state 1 to 0.
|
||||||
|
// Reactor is destroyed (state 2) and triggers this if dropping two Magic Devices at once, which shouldn't really happen.
|
||||||
|
}
|
||||||
@@ -40,3 +40,5 @@ function hit() {
|
|||||||
|
|
||||||
mapObj.killMonster(8820000);
|
mapObj.killMonster(8820000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function act() {}
|
||||||
Reference in New Issue
Block a user