From 4954ce8a5af28675d0f0155d0ae5e5d239f29880 Mon Sep 17 00:00:00 2001 From: Stx69 <32230998+Stx69@users.noreply.github.com> Date: Thu, 31 Mar 2022 15:09:50 +0200 Subject: [PATCH 1/2] simple port to v6R5 --- content/productivity/simultaneous-attack/plugin.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/productivity/simultaneous-attack/plugin.js b/content/productivity/simultaneous-attack/plugin.js index e557b0c2..486384c2 100644 --- a/content/productivity/simultaneous-attack/plugin.js +++ b/content/productivity/simultaneous-attack/plugin.js @@ -2,7 +2,8 @@ // // attack thing with many thing at the same time -var pg = df.getProcgenUtils(); +import {getPlanetName} from "https://cdn.skypack.dev/@darkforest_eth/procedural"; +const pg = {getPlanetName: getPlanetName} // removes all the child nodes of an element var removeAllChildNodes = (parent) => { @@ -64,7 +65,7 @@ var simultaneousAttack = (target, sources) => { // maybe somehow show the plugin user this error? if (Math.floor(energyArriving) <= 0) return; - df.move(attacker.locationId, target.locationId, Math.floor(attacker.energy * 0.5), 0); + df.move(attacker.locationId, target.locationId, Math.floor(attacker.energy * 0.5), 0, null, false); // waits for the duration of the longest move - the duration of the move itself to be sent. * 1k is to convert seconds to ms }, (longestMove - planetMove.time) * 1e3)); } @@ -211,4 +212,4 @@ class SimultaneousAttack { } }; -export default SimultaneousAttack; +export default SimultaneousAttack; \ No newline at end of file From 48df4e2eb8b715d09ace0a6393de5236981cb5d9 Mon Sep 17 00:00:00 2001 From: Stx69 <32230998+Stx69@users.noreply.github.com> Date: Sun, 3 Apr 2022 17:20:34 +0200 Subject: [PATCH 2/2] Update plugin.js import pg , and nitpick line. Thanks for your patience. --- content/productivity/simultaneous-attack/plugin.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/content/productivity/simultaneous-attack/plugin.js b/content/productivity/simultaneous-attack/plugin.js index 486384c2..52dfe888 100644 --- a/content/productivity/simultaneous-attack/plugin.js +++ b/content/productivity/simultaneous-attack/plugin.js @@ -2,8 +2,7 @@ // // attack thing with many thing at the same time -import {getPlanetName} from "https://cdn.skypack.dev/@darkforest_eth/procedural"; -const pg = {getPlanetName: getPlanetName} +import * as pg from "https://cdn.skypack.dev/@darkforest_eth/procedural"; // removes all the child nodes of an element var removeAllChildNodes = (parent) => { @@ -212,4 +211,4 @@ class SimultaneousAttack { } }; -export default SimultaneousAttack; \ No newline at end of file +export default SimultaneousAttack;