add: minesweeper PDA game (#26860)

* minesweeper with no style

* less string operations

* review and aylongo tgui changes

* bundle

* minesweeper with no style

* less string operations

* review and aylongo tgui changes

* bundle

* bundle

* bundle

* silent. pda is booming

* codestyle

* review

* revert

* Apply suggestions from code review

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com>

* adjusts the name of a proc

---------

Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
ROdenFL
2024-11-20 16:40:57 +00:00
committed by GitHub
co-authored by Henri215 Burzah
parent f56c5dfbdf
commit 59dd3a645d
10 changed files with 575 additions and 59 deletions
+31
View File
@@ -0,0 +1,31 @@
// Games Hub
/datum/data/pda/app/games
name = "Games"
icon = "gamepad"
template = "pda_games"
/datum/data/pda/app/games/update_ui(mob/user, list/data)
var/list/games = list()
for(var/datum/data/pda/app/game/game in pda.programs)
games += list(game.get_game_info())
data["games"] = games
/datum/data/pda/app/games/ui_act(action, params)
if(..())
return
switch(action)
if("play")
var/datum/data/pda/app/game/game = locate(params["id"]) in pda.programs
pda.start_program(game)
// Game-type App
/datum/data/pda/app/game
name = "base game"
icon = "gamepad"
hidden = TRUE
/datum/data/pda/app/game/proc/get_game_info()
return list(name = name, icon = icon, id = UID())