From ca4198d2c59592702268c15552a08b9892b02ebc Mon Sep 17 00:00:00 2001 From: IonutParau Date: Wed, 25 Oct 2023 15:30:11 +0200 Subject: [PATCH] A bit of work on sentry --- assets/images/destroyers/bullet.png | Bin 0 -> 174 bytes assets/images/destroyers/bullet.png~ | Bin 0 -> 99 bytes assets/images/destroyers/pistol.png | Bin 0 -> 242 bytes assets/images/destroyers/pistol.png~ | Bin 0 -> 254 bytes assets/images/destroyers/sentry.png | Bin 0 -> 249 bytes assets/images/destroyers/sentry.png~ | Bin 0 -> 251 bytes lib/layout/other/multiplayer.dart | 7 ++++++- lib/layout/other/version.dart | 1 + lib/logic/cell_data.dart | 26 ++++++++++++++++++++++++++ 9 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 assets/images/destroyers/bullet.png create mode 100644 assets/images/destroyers/bullet.png~ create mode 100644 assets/images/destroyers/pistol.png create mode 100644 assets/images/destroyers/pistol.png~ create mode 100644 assets/images/destroyers/sentry.png create mode 100644 assets/images/destroyers/sentry.png~ diff --git a/assets/images/destroyers/bullet.png b/assets/images/destroyers/bullet.png new file mode 100644 index 0000000000000000000000000000000000000000..5ce011af043d53a8642bcff64213ff95af9f461e GIT binary patch literal 174 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{D45{s z;uvD#pPV4U+H<36!IAmz?RQn2Kjt5CHHqVp$!jg{#WM(UbifOST11BQ`ivR;-(NbZM0tQc4KbLh*2~7Y`^%A21 literal 0 HcmV?d00001 diff --git a/assets/images/destroyers/pistol.png b/assets/images/destroyers/pistol.png new file mode 100644 index 0000000000000000000000000000000000000000..b0b4b90d96c4b3e3b4a4ca26fe1b3b4ca3bebf41 GIT binary patch literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GGLLkg|>2BR0px_cu z7sn6_|EcG*tO5yHyG6~x^ n&b#$s^`3t-Jigw4Uc)fun#CROV+oZ&_cD08`njxgN@xNA-FRF` literal 0 HcmV?d00001 diff --git a/assets/images/destroyers/pistol.png~ b/assets/images/destroyers/pistol.png~ new file mode 100644 index 0000000000000000000000000000000000000000..8a267ef0b2e04534ebd901564fc561d08fd5ca39 GIT binary patch literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GGLLkg|>2BR0px_2i z7sn6_|E0mZ`Ir@Xv_s9^%Jwn;t8aLpke>4HWT338dX>93n_OUyy5f%G$Ai4`=Y@ZZ zTJ1bXhoxPB<#zS-zwh{j(huINX1sS(!r66RNEEBG+{QD09A!Qn5uf#4j_gTWaP8Ka zwfiI%&ueY?8WEzI>NTlY%--Nc(r)%ij5E%yXHZRZ44r)`l|MlFx5I|Dw}oEHoZ;HX zv^oEBIKxfzqnjt3V?0)T^^L~+dbL&me$VC4RR})f;%gWVbUTBmtDnm{r-UW|NpoLO literal 0 HcmV?d00001 diff --git a/assets/images/destroyers/sentry.png b/assets/images/destroyers/sentry.png new file mode 100644 index 0000000000000000000000000000000000000000..f5c89a3b2e75840708a3dd88b2b69bbb4b46081c GIT binary patch literal 249 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GGLLkg|>2BR0px|mx z7sn6_|E2zS#@LH(ve*KTicc>X6bo?aZ6GZ@x#?tbCu` z-wR_t%Q_ppIL+QDe=c*wS?gnW*o6)sJQpSE=(BRdorZ=@Vm)Q%C9KozmIA>fIVxrkpssUTeETUxVaJdx06}&vNp)TQE0!lr(hP vx~}W9u|ANOY`gVf_|AWZ6JK3@zK7|UyJhm3E%Gyg&Svm*^>bP0l+XkK*u`V^ literal 0 HcmV?d00001 diff --git a/assets/images/destroyers/sentry.png~ b/assets/images/destroyers/sentry.png~ new file mode 100644 index 0000000000000000000000000000000000000000..e4cb8a46d0ff7052c18beb84f402cf825738d450 GIT binary patch literal 251 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GGLLkg|>2BR0px|0h z7sn6_|Kya0rk#fl{ZGtEdhuj?zNF);11vt9CoE7ftdhL9x1K+Y-Ka${aTUv6C5LA873V_Ro?Vg w!R!X>f-SsW^Nuh*S>jWf)^yV=uZ)f1^aso25S`iwK!-DUy85}Sb4q9e0EjeR8UO$Q literal 0 HcmV?d00001 diff --git a/lib/layout/other/multiplayer.dart b/lib/layout/other/multiplayer.dart index fe9dcf0..144edef 100755 --- a/lib/layout/other/multiplayer.dart +++ b/lib/layout/other/multiplayer.dart @@ -33,6 +33,9 @@ class _MultiplayerPageState extends State { pingIp += '/'; } + final stopwatch = Stopwatch(); + stopwatch.start(); + return Container( padding: EdgeInsets.all(0.5.w), decoration: BoxDecoration( @@ -46,17 +49,19 @@ class _MultiplayerPageState extends State { future: http.post(Uri.parse(pingIp)), builder: (ctx, snap) { if (snap.hasError) { + stopwatch.stop(); print(snap.error); return Icon(Icons.error, color: Colors.red["light"]); } if (snap.hasData) { + stopwatch.stop(); final response = snap.data!; if (response.statusCode != 200) { return Icon(Icons.error, color: Colors.red["light"]); } return Icon( Icons.check_box_rounded, - color: Colors.green["light"], + color: stopwatch.elapsedMilliseconds > 30 ? Colors.yellow["light"] : Colors.green["light"], ); } return Icon(FluentIcons.clock, color: Colors.blue); diff --git a/lib/layout/other/version.dart b/lib/layout/other/version.dart index 131a071..dd0bd63 100755 --- a/lib/layout/other/version.dart +++ b/lib/layout/other/version.dart @@ -9,6 +9,7 @@ String currentVersion = '2.3.1.0 Configurable'; final List changes = [ "Reworked how TPC puzzle movement are computed", "Fixed VX implementation being bugged and made it more up-to-date", + "Added Favorite cells", ]; IconData getTrailing(String change) { diff --git a/lib/logic/cell_data.dart b/lib/logic/cell_data.dart index 33fbf7a..34b4502 100755 --- a/lib/logic/cell_data.dart +++ b/lib/logic/cell_data.dart @@ -392,6 +392,8 @@ final cells = { "stable_o", "anvil", "flipped_puzzle", + "bullet", + "sentry", }.toList(); final modded = []; @@ -401,6 +403,8 @@ final cursorTextures = ["cursor", ...cells, "invis_tool", "trick_tool"]..removeW final textureMapBackup = HashMap.from(textureMap); HashMap textureMap = HashMap.from({ + "sentry.png": "destroyers/sentry.png", + "bullet.png": "destroyers/bullet.png", "anvil.png": "movers/anvil.png", "electric_puller.png": "electrical/electric_puller.png", "stable_a.png": "stableton/stable_a.png", @@ -1014,6 +1018,7 @@ final categories = [ "liner", ), "anvil", + "bullet", ], "mover", ), @@ -1282,6 +1287,7 @@ final categories = [ "fire", ), "antigen", + "sentry", ], "trash", ), @@ -1580,6 +1586,7 @@ final categories = [ "electric_battery", "electric_mover", "electric_puller", + "sentry", ], "electric_wire", ), @@ -3290,6 +3297,14 @@ final cellInfo = { "Flipped Puzzle", "A flipped puzzle cell. Movements on one axis (left-right or up-down) will be inverted." ), + "bullet": CellProfile( + "Bullet", + "I have yet to meet someone who can outsmart bullet", + ), + "sentry": CellProfile( + "Sentry", + "Will kill enemies or players.", + ), }; enum CellPropertyType { @@ -3560,4 +3575,15 @@ Map> props = { CellProperty("Loss Upon Lethal Impact", "How much velocity is lost upon breaking a cell. 0 is no change, 0.3 (default) is 30%, 1 is all velocity lost.", "impact_loss", CellPropertyType.number, 0.3), CellProperty("Terminal Velocity", "The limit of how fast it can fall downwards.", "speed_limit", CellPropertyType.number, 5), ], + "bullet": [ + CellProperty("Speed", "How fast the bullet is", "speed", CellPropertyType.integer, 1), + ], + "sentry": [ + CellProperty("Shoot Interval", "The interval at which it shoots", "gun_interval", CellPropertyType.number, 2), + CellProperty("Bullet Speed", "The speed of the bullet it shoots", "bullet_speed", CellPropertyType.integer, 1), + CellProperty("Friendly", "If true, it will kill enemies. If not, it will kill puzzle cells and keys. There are also common targets it will kill either way.", "friendly", CellPropertyType.boolean, true), + CellProperty("Power Cost", "The amount of electric power the sentry consumes passively", "passive_cost", CellPropertyType.number, 1), + CellProperty("Shoot Cost", "The amount of electric power the sentry consumes when shooting", "gun_cost", CellPropertyType.number, 5), + CellProperty("Power", "The amount of electric power in the sentry gun", "electric_power", CellPropertyType.number, 500), + ], };