Skip to content

Commit

Permalink
minesweeper (#1071)
Browse files Browse the repository at this point in the history
## Что этот PR делает

Добавляет сапёр в пда. Емаг будет взрывать вас при проигрыше. В бд будут
сохраняться результаты побед.
## Почему это хорошо для игры


![{DC5D7E08-B1DE-415F-A654-E66524F3E8D6}](https://github.com/user-attachments/assets/747e5a7c-a2cc-4d29-b15b-b5d6a405922b)
## Изображения изменений


![{09FED18B-CB10-439D-834D-83D7FE4872D0}](https://github.com/user-attachments/assets/09afaaed-97fc-45d2-b69d-03db40dda205)


![{2D10A433-4B2D-42A1-A5CA-D735BC5DBD75}](https://github.com/user-attachments/assets/f154212c-0aef-40f0-a1f3-af6ec82b56a1)


![{006EE856-9440-47A9-AC4F-67BA57DAFF5A}](https://github.com/user-attachments/assets/edfb9e4c-fb39-497e-be11-1d86336f627f)

## Тестирование


![image](https://github.com/user-attachments/assets/974ea9df-6809-4f27-99a3-74d8e3fa5f11)
## Changelog

:cl:
add: Сапёр в пда
/:cl:

## Summary by Sourcery

Add Minesweeper to PDAs. Emagged PDAs will explode upon losing the game.
Game results are saved to the database.

New Features:
- A Minesweeper game has been added to PDAs.

Tests:
- Added playtesting screenshots.

---------

Co-authored-by: Aylong <alexanderkitsa@gmail.com>
Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com>
Co-authored-by: gaxeer <gax1998@gmail.com>
  • Loading branch information
4 people authored Feb 4, 2025
1 parent 8be7c55 commit c1dda0d
Show file tree
Hide file tree
Showing 10 changed files with 911 additions and 4 deletions.
18 changes: 18 additions & 0 deletions SQL/bandastation/bandastation_update.sql
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,21 @@ CREATE TABLE `budget` (
`discord_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) COLLATE='utf8mb4_general_ci' ENGINE=InnoDB;

--
-- Table structure for table `minesweeper`
--
DROP TABLE IF EXISTS `minesweeper`;
CREATE TABLE `minesweeper` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`date` DATETIME NOT NULL DEFAULT current_timestamp(),
`ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`nickname` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`time` INT(10) UNSIGNED NOT NULL,
`points` INT(10) UNSIGNED NOT NULL,
`points_per_sec` FLOAT(10) UNSIGNED NOT NULL,
`width` TINYINT(3) UNSIGNED NOT NULL,
`height` TINYINT(3) UNSIGNED NOT NULL,
`bombs` TINYINT(3) UNSIGNED NOT NULL,
PRIMARY KEY (`id`)
) COLLATE='utf8mb4_general_ci' ENGINE=InnoDB;
25 changes: 22 additions & 3 deletions SQL/bandastation/database_changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,36 @@ Any time you make a change to the schema files, remember to increment the databa

Make sure to also update `DB_MAJOR_VERSION_220` and `DB_MINOR_VERSION_220`, which can be found in `code/modular_bandastation/_defines220/code/defines/subsystems.dm`.

The latest database version is 1.2; The query to update the schema revision table is:
The latest database version is 1.3; The query to update the schema revision table is:

```sql
INSERT INTO `schema_revision_220` (`major`, `minor`) VALUES (1, 2);
INSERT INTO `schema_revision_220` (`major`, `minor`) VALUES (1, 3);
```
or

```sql
INSERT INTO `SS13_schema_revision_220` (`major`, `minor`) VALUES (1, 2);
INSERT INTO `SS13_schema_revision_220` (`major`, `minor`) VALUES (1, 3);
```

-----------------------------------------------------
Version 1.3, 29 January 2024, by ROdenFL
Created the table: minesweeper

```sql
CREATE TABLE `minesweeper` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`date` DATETIME NOT NULL DEFAULT current_timestamp(),
`ckey` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`nickname` VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`time` INT(10) UNSIGNED NOT NULL,
`points` INT(10) UNSIGNED NOT NULL,
`points_per_sec` FLOAT(10) UNSIGNED NOT NULL,
`width` TINYINT(3) UNSIGNED NOT NULL,
`height` TINYINT(3) UNSIGNED NOT NULL,
`bombs` TINYINT(3) UNSIGNED NOT NULL,
PRIMARY KEY (`id`)
) COLLATE='utf8mb4_general_ci' ENGINE=InnoDB;
```
-----------------------------------------------------
Version 1.2, 22 July 2024, by larentoun
Created the table: budget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
*
* make sure you add an update to the schema_version stable in the db changelog
*/
#define DB_MINOR_VERSION_220 2
#define DB_MINOR_VERSION_220 3
4 changes: 4 additions & 0 deletions modular_bandastation/minesweeper/_minesweeper.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/datum/modpack/example
name = "Minesweeper"
desc = "Добавляет сапер"
author = "ROdenFL"
3 changes: 3 additions & 0 deletions modular_bandastation/minesweeper/_minesweeper.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "_minesweeper.dm"

#include "code/minesweeper.dm"
Loading

0 comments on commit c1dda0d

Please sign in to comment.