paperwork mini update, also ASS_BLAST_USA

This commit is contained in:
Letter N
2021-03-06 19:28:29 +08:00
parent 709aaa5006
commit 4463fd9513
24 changed files with 353 additions and 157 deletions
+12 -9
View File
@@ -5,6 +5,7 @@
name = "ticket machine"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "ticketmachine"
// base_icon_state = "ticketmachine"
desc = "A marvel of bureaucratic engineering encased in an efficient plastic shell. It can be refilled with a hand labeler refill roll and linked to buttons with a multitool."
density = FALSE
maptext_height = 26
@@ -22,11 +23,10 @@
var/list/obj/item/ticket_machine_ticket/tickets = list()
/obj/machinery/ticket_machine/multitool_act(mob/living/user, obj/item/I)
if(!I.tool_behaviour == TOOL_MULTITOOL)
return
if(!multitool_check_buffer(user, I)) //make sure it has a data buffer
return
I.buffer = src
var/obj/item/multitool/M = I
M.buffer = src
to_chat(user, "<span class='notice'>You store linkage information in [I]'s buffer.</span>")
return TRUE
@@ -78,10 +78,11 @@
/obj/machinery/button/ticket_machine/multitool_act(mob/living/user, obj/item/I)
. = ..()
if(I.tool_behaviour == TOOL_MULTITOOL)
if(I.buffer && !istype(I.buffer, /obj/machinery/ticket_machine))
var/obj/item/multitool/M = I
if(M.buffer && !istype(M.buffer, /obj/machinery/ticket_machine))
return
var/obj/item/assembly/control/ticket_machine/controller = device
controller.linked = I.buffer
controller.linked = M.buffer
id = null
controller.id = null
to_chat(user, "<span class='warning'>You've linked [src] to [controller.linked].</span>")
@@ -117,6 +118,10 @@
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 10)
/obj/machinery/ticket_machine/update_icon()
. = ..()
handle_maptext()
/obj/machinery/ticket_machine/update_icon_state()
switch(ticket_number) //Gives you an idea of how many tickets are left
if(0 to 49)
icon_state = "ticketmachine_100"
@@ -124,7 +129,7 @@
icon_state = "ticketmachine_50"
if(100)
icon_state = "ticketmachine_0"
handle_maptext()
return ..()
/obj/machinery/ticket_machine/proc/handle_maptext()
switch(ticket_number) //This is here to handle maptext offsets so that the numbers align.
@@ -161,9 +166,7 @@
ready = TRUE
/obj/machinery/ticket_machine/on_attack_hand(mob/living/carbon/user)
INVOKE_ASYNC(src, .proc/attempt_ticket, user)
/obj/machinery/ticket_machine/proc/attempt_ticket(mob/living/carbon/user)
// . = ..()
if(!ready)
to_chat(user,"<span class='warning'>You press the button, but nothing happens...</span>")
return