Skip to content

Commit

Permalink
fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
IonutParau committed Feb 18, 2024
1 parent d702e94 commit 6a5fb8b
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 5 deletions.
Binary file added assets/images/quantum/neutrino.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/quantum/quantum_tomato.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/puzzles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ P6;A Real Mess;Friendly Sentries are great at killing large amounts of enemies.
P6;Overpowered;The sentry is strong, but the sentry buster is stronger;L;<;eJytUstuwjAQ/Jc9W8i0RajcCJz6CwhZJmzSiMWx/AAF0n/vhnIAxVUQ7XFnZ2bHu4bys/ahlS3ubWjaeZuBgKMmuoGWDD1AW/wrjaE3AT5adIU2941xiv2SmsRMG08nwp5z3wAK0uXQoMVFvMPm2USvf1nSb4792ZMUk+UeTXCN2kQf0A1eoO+SPXw9oDrfDbMSZsnsU7G6hgchBVw6LJ+DOEMZjaoMP+igCWbjEfc3kQiD8hZxyxBbFq5Cs6UGZoUmj/wxtPfVAVXOAa6qzuinnHQlEubBVbmy9REdg1KO5Fc3PoN1+nO8P7uxjyTtG0s1R9o=;
P6;Autonomous Defenses;The sentries got you covered, but are they themselves safe?;P;<;eJzNV1FvmzAQ/i27Z1QBCc3GW9Nu2st+wTRZDhzBqjHMNq2Ssf8+A5kIwTRIrQJv4c6++77vzmcH9mmudOVWmBX6UD1UW3B+QkIjncsDOK4DjQMceADnD0TIOYRQlMcjR7IrlUb5yTVeJsyvF2qc/p3ZRONY5hrChHKFDhTpQbGo9p4Mv0sqNDtifLL8rTNt4ZcDr5TzMzjfTWwLxMtlX6cta8idCN2c2saBhNP9BIQZ1SkRZbZDacGZl8Kk9133zu1ka7Z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HEykC4CUzEY+QpliIFK+I7OMcg3YT6o120CUYP8xpkqrKh2Gk2oIHBKjWBIVcgsKQd+vYIFF9RGri31WnBbkrZeaYdeyw24nuPrbeCH+VTc76y4HeqENTpGW3e85nMOBo0DHah2hTuEVTZnVqB3iWYZaoZwCtG4Uj3eFkqlNUM5D3oOPmQlTieVUffsglzHj8GMLDTaViopU5pfy3oUFe1qgreFL0+z3gsuK1k00XIMw6u46fjuWHffb/s2xYvX66lX0b2dci8wfr5DxDclySe/ZwXnaez/3kWXAI+QLBYED2A==;eJyrVgpXsiopKk2tBQARvgOO;
2 changes: 1 addition & 1 deletion lib/layout/tools/saving.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ class P6 {
),
) as Map<String, dynamic>;

grid.wrap = gridData["W"] == 1;
grid.wrap = gridData["W"] == true;
if (gridData["M"] != null) {
final memMap = gridData["M"] as Map<String, dynamic>;

Expand Down
4 changes: 2 additions & 2 deletions lib/logic/cell_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ final cursorTextures = [...cells, ...extraCursors];
final textureMapBackup = HashMap<String, String>.from(textureMap);

HashMap<String, String> textureMap = HashMap.from({
"neutrino.png": "missing.png",
"quantum_tomato.png": "missing.png",
"neutrino.png": "quantum/neutrino.png",
"quantum_tomato.png": "quantum/quantum_tomato.png",
"sentry_buster.png": "destroyers/sentry_buster.png",
"puzzle_buster.png": "destroyers/puzzle_buster.png",
"sentry.png": "destroyers/sentry.png",
Expand Down
4 changes: 2 additions & 2 deletions lib/logic/move.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ void doExplosive(Cell destroyer, int x, int y, [bool silent = false, Map<String,

for (var cx = x - radius; cx <= x + radius; cx++) {
for (var cy = y - radius; cy <= y + radius; cy++) {
if (!grid.inside(cx.toInt(), cy.toInt())) return;
if (!grid.inside(cx.toInt(), cy.toInt())) continue;

final d = pow(cx - x, 2) + pow(cy - y, 2);
final ox = cx - x;
Expand All @@ -1185,7 +1185,7 @@ void doExplosive(Cell destroyer, int x, int y, [bool silent = false, Map<String,
final c = grid.at(cx.toInt(), cy.toInt());

if (!breakable(c, cx.toInt(), cy.toInt(), dirFromOff(ox.toInt(), oy.toInt()), BreakType.explode)) {
return;
continue;
}
if ((circular && d <= radius) || !circular || (cx == x && cy == y)) {
grid.addBroken(c, x, y, "shrinking");
Expand Down
3 changes: 3 additions & 0 deletions lib/logic/update/weapons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ void doSentry(Cell cell, int x, int y) {
cell.data['time'] = (cell.data['time'] ?? 0.0) + 1.0;
if(cell.data['time'] >= interval) {
for(var rot in rotOrder) {
if(!grid.inside(frontX(x, rot), frontY(y, rot))) {
continue;
}
if(grid.at(frontX(x, rot), frontY(y, rot)).id != "empty") {
continue;
}
Expand Down

0 comments on commit 6a5fb8b

Please sign in to comment.