From ec5d6fe44c28e5de7a7a53eb310b4e303a15fe4f Mon Sep 17 00:00:00 2001 From: Leshana Date: Wed, 11 Apr 2018 21:44:08 -0400 Subject: [PATCH] Switch frame construction menu to have a cancel button. Instead of having a whole frame type dedicated to giving a "Cancel" option... lets just tell BYOND to add a cancel button to the menu. --- code/game/machinery/frame.dm | 8 -------- code/game/machinery/wall_frames.dm | 8 ++++---- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm index 3e998e87d6..f1f2ec0834 100644 --- a/code/game/machinery/frame.dm +++ b/code/game/machinery/frame.dm @@ -12,11 +12,6 @@ else construction_frame_floor += type - var/datum/frame/frame_types/cancel/cancel = new /datum/frame/frame_types/cancel - construction_frame_wall += cancel - construction_frame_floor += cancel - - ////////////////////////////// // Frame Type Datum - Describes the frame structures that can be created from a frame item. ////////////////////////////// @@ -180,9 +175,6 @@ x_offset = 24 y_offset = 24 -/datum/frame/frame_types/cancel //used to get out of input dialogue - name = "Cancel" - ////////////////////////////// // Frame Object (Structure) ////////////////////////////// diff --git a/code/game/machinery/wall_frames.dm b/code/game/machinery/wall_frames.dm index 2d0a8bf545..0d3c3bcd2c 100644 --- a/code/game/machinery/wall_frames.dm +++ b/code/game/machinery/wall_frames.dm @@ -29,8 +29,8 @@ update_type_list() var/datum/frame/frame_types/frame_type if(!build_machine_type) - var/datum/frame/frame_types/response = input(user, "What kind of frame would you like to make?", "Frame type request", null) in frame_types_floor - if(!response || response.name == "Cancel") + var/datum/frame/frame_types/response = input(user, "What kind of frame would you like to make?", "Frame type request", null) as null|anything in frame_types_floor + if(!response) return frame_type = response @@ -83,8 +83,8 @@ var/datum/frame/frame_types/frame_type if(!build_machine_type) - var/datum/frame/frame_types/response = input(user, "What kind of frame would you like to make?", "Frame type request", null) in frame_types_wall - if(!response || response.name == "Cancel") + var/datum/frame/frame_types/response = input(user, "What kind of frame would you like to make?", "Frame type request", null) as null|anything in frame_types_wall + if(!response) return frame_type = response