mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 13:09:11 +01:00
tgui usr to ui.user
This commit is contained in:
@@ -107,7 +107,7 @@
|
||||
/**
|
||||
* This is tgui's replacement for Topic(). It handles any user input from the UI.
|
||||
*/
|
||||
/datum/computer_file/program/game/tgui_act(action, list/params)
|
||||
/datum/computer_file/program/game/tgui_act(action, list/params, datum/tgui/ui)
|
||||
if(..()) // Always call parent in tgui_act, it handles making sure the user is allowed to interact with the UI.
|
||||
return TRUE
|
||||
|
||||
@@ -115,8 +115,8 @@
|
||||
if(computer)
|
||||
printer = computer.nano_printer
|
||||
|
||||
// var/gamerSkillLevel = usr.mind?.get_skill_level(/datum/skill/gaming)
|
||||
// var/gamerSkill = usr.mind?.get_skill_modifier(/datum/skill/gaming, SKILL_RANDS_MODIFIER)
|
||||
// var/gamerSkillLevel = ui.user.mind?.get_skill_level(/datum/skill/gaming)
|
||||
// var/gamerSkill = ui.user.mind?.get_skill_modifier(/datum/skill/gaming, SKILL_RANDS_MODIFIER)
|
||||
switch(action)
|
||||
if("Attack")
|
||||
var/attackamt = 0 //Spam prevention.
|
||||
@@ -162,20 +162,20 @@
|
||||
return TRUE
|
||||
if("Dispense_Tickets")
|
||||
if(!printer)
|
||||
to_chat(usr, span_notice("Hardware error: A printer is required to redeem tickets."))
|
||||
to_chat(ui.user, span_notice("Hardware error: A printer is required to redeem tickets."))
|
||||
return
|
||||
if(printer.stored_paper <= 0)
|
||||
to_chat(usr, span_notice("Hardware error: Printer is out of paper."))
|
||||
to_chat(ui.user, span_notice("Hardware error: Printer is out of paper."))
|
||||
return
|
||||
else
|
||||
computer.visible_message(span_infoplain(span_bold("\The [computer]") + " prints out paper."))
|
||||
if(ticket_count >= 1)
|
||||
new /obj/item/stack/arcadeticket((get_turf(computer)), 1)
|
||||
to_chat(usr, span_notice("[src] dispenses a ticket!"))
|
||||
to_chat(ui.user, span_notice("[src] dispenses a ticket!"))
|
||||
ticket_count -= 1
|
||||
printer.stored_paper -= 1
|
||||
else
|
||||
to_chat(usr, span_notice("You don't have any stored tickets!"))
|
||||
to_chat(ui.user, span_notice("You don't have any stored tickets!"))
|
||||
return TRUE
|
||||
if("Start_Game")
|
||||
game_active = TRUE
|
||||
|
||||
Reference in New Issue
Block a user