mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-31 04:31:41 +00:00
* 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>
32 lines
693 B
Plaintext
32 lines
693 B
Plaintext
// 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())
|