mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 06:27:26 +01:00
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:
co-authored by
Henri215
Burzah
parent
f56c5dfbdf
commit
59dd3a645d
@@ -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())
|
||||
Reference in New Issue
Block a user