Skip to content

Commit

Permalink
checkpoints now show that theyre enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
IonutParau committed Dec 10, 2023
1 parent 67a34f2 commit 2011a13
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 0 deletions.
Binary file added assets/images/puzzle/checkpoint_on.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/puzzle/checkpoint_on.png~
Binary file not shown.
1 change: 1 addition & 0 deletions lib/layout/other/version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ final List<String> changes = [
"Made boolean properties have the checkbox next to the name in the property editor",
"Used the Cell Search Dialog a lot more to improve cell selecting",
"Added borders to world clearing",
"Added the Nuke and Create All buttons to the Modify Texture Packs dialog",
];

IconData getTrailing(String change) {
Expand Down
1 change: 1 addition & 0 deletions lib/logic/cell_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ HashMap<String, String> textureMap = HashMap.from({
"mover_enemy.png": "movers/movers/mover_enemy.png",
"mobile_enemy.png": "destroyers/enemy/mobile_enemy.png",
"checkpoint.png": "puzzle/checkpoint.png",
"checkpoint_on.png": "puzzle/checkpoint_on.png",
"mech_checkpoint.png": "mechanical/users/mech_checkpoint.png",
"super_redirector.png": "rotators/super_redirector.png",
"factory.png": "recreators/factory.png",
Expand Down
1 change: 1 addition & 0 deletions lib/logic/core/game.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1770,6 +1770,7 @@ class PuzzleGame extends FlameGame with TapDetector, KeyboardEvents {

await Flame.images.load('mechanical/pixel_on.png');
await Flame.images.load('electrical/electric_wire_on.png');
await Flame.images.load('puzzle/checkpoint_on.png');

buttonManager = ButtonManager(this);
syncFavorites();
Expand Down
5 changes: 5 additions & 0 deletions lib/logic/core/rendering.dart
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,11 @@ class GameRendering {
ignoreSafety = true;
}

if (cell.id == "checkpoint" && cell.data['checkpoint_enabled'] == true) {
file = "checkpoint_on";
ignoreSafety = true;
}

if (cell.id == "electric_wire" && electricManager.directlyReadPower(cell) > 0) {
file = 'electric_wire_on';
ignoreSafety = true;
Expand Down

0 comments on commit 2011a13

Please sign in to comment.