From 160a4e1a76802ca1e7da450b3c18fb2560e70601 Mon Sep 17 00:00:00 2001 From: Arkatos1 <43862960+Arkatos1@users.noreply.github.com> Date: Tue, 30 Jun 2020 21:09:07 +0200 Subject: [PATCH] tgui: Abductors (#51920) * Gland Dispenser * ProbingConsole and Abductor theme * State tweaks, Abductor Console DM side, Abductor Uplink, Abductor orderable gear datum * Line endings * Finished UIs --- .../abductor/equipment/orderable_gear.dm | 79 ++++++++ .../antagonists/abductor/machinery/console.dm | 186 ++++++++++-------- .../abductor/machinery/dispenser.dm | 76 ++++--- .../abductor/machinery/experiment.dm | 186 +++++++----------- tgstation.dme | 1 + tgui/packages/tgui/index.js | 1 + .../tgui/interfaces/AbductorConsole.js | 155 +++++++++++++++ .../tgui/interfaces/GlandDispenser.js | 34 ++++ .../tgui/interfaces/ProbingConsole.js | 80 ++++++++ tgui/packages/tgui/public/tgui.bundle.css | 2 +- tgui/packages/tgui/public/tgui.bundle.js | 2 +- .../packages/tgui/styles/themes/abductor.scss | 59 ++++++ 12 files changed, 620 insertions(+), 241 deletions(-) create mode 100644 code/modules/antagonists/abductor/equipment/orderable_gear.dm create mode 100644 tgui/packages/tgui/interfaces/AbductorConsole.js create mode 100644 tgui/packages/tgui/interfaces/GlandDispenser.js create mode 100644 tgui/packages/tgui/interfaces/ProbingConsole.js create mode 100644 tgui/packages/tgui/styles/themes/abductor.scss diff --git a/code/modules/antagonists/abductor/equipment/orderable_gear.dm b/code/modules/antagonists/abductor/equipment/orderable_gear.dm new file mode 100644 index 00000000000..0cc04fa68da --- /dev/null +++ b/code/modules/antagonists/abductor/equipment/orderable_gear.dm @@ -0,0 +1,79 @@ +GLOBAL_LIST_INIT(abductor_gear, subtypesof(/datum/abductor_gear)) + +/datum/abductor_gear + /// Name of the gear + var/name = "Generic Abductor Gear" + /// Description of the gear + var/description = "Generic description." + /// Unique ID of the gear + var/id = "abductor_generic" + /// Credit cost of the gear + var/cost = 1 + /// Build path of the gear itself + var/build_path = null + /// Category of the gear + var/category = "Basic Gear" + +/datum/abductor_gear/agent_helmet + name = "Agent Helmet" + description = "Abduct with style - spiky style. Prevents digital tracking." + id = "agent_helmet" + build_path = /obj/item/clothing/head/helmet/abductor + +/datum/abductor_gear/agent_vest + name = "Agent Vest" + description = "A vest outfitted with advanced stealth technology. It has two modes - combat and stealth." + id = "agent_vest" + build_path = /obj/item/clothing/suit/armor/abductor/vest + +/datum/abductor_gear/radio_silencer + name = "Radio Silencer" + description = "A compact device used to shut down communications equipment." + id = "radio_silencer" + build_path = /obj/item/abductor/silencer + +/datum/abductor_gear/science_tool + name = "Science Tool" + description = "A dual-mode tool for retrieving specimens and scanning appearances. Scanning can be done through cameras." + id = "science_tool" + build_path = /obj/item/abductor/gizmo + +/datum/abductor_gear/advanced_baton + name = "Advanced Baton" + description = "A quad-mode baton used for incapacitation and restraining of specimens." + id = "advanced_baton" + cost = 2 + build_path = /obj/item/melee/baton/abductor + +/datum/abductor_gear/superlingual_matrix + name = "Superlingual Matrix" + description = "A mysterious structure that allows for instant communication between users. Pretty impressive until you need to eat something." + id = "superlingual_matrix" + build_path = /obj/item/organ/tongue/abductor + category = "Advanced Gear" + +/datum/abductor_gear/mental_interface + name = "Mental Interface Device" + description = "A dual-mode tool for directly communicating with sentient brains. It can be used to send a direct message to a target, \ + or to send a command to a test subject with a charged gland." + id = "mental_interface" + cost = 2 + build_path = /obj/item/abductor/mind_device + category = "Advanced Gear" + +/datum/abductor_gear/reagent_synthesizer + name = "Reagent Synthesizer" + description = "Synthesizes a variety of reagents using proto-matter." + id = "reagent_synthesizer" + cost = 2 + build_path = /obj/item/abductor_machine_beacon/chem_dispenser + category = "Advanced Gear" + +/datum/abductor_gear/shrink_ray + name = "Shrink Ray Blaster" + description = "This is a piece of frightening alien tech that enhances the magnetic pull of atoms in a localized space to temporarily make an object shrink. \ + That or it's just space magic. Either way, it shrinks stuff." + id = "shrink_ray" + cost = 2 + build_path = /obj/item/gun/energy/shrink_ray + category = "Advanced Gear" diff --git a/code/modules/antagonists/abductor/machinery/console.dm b/code/modules/antagonists/abductor/machinery/console.dm index e2f0534203f..9573380f085 100644 --- a/code/modules/antagonists/abductor/machinery/console.dm +++ b/code/modules/antagonists/abductor/machinery/console.dm @@ -17,12 +17,36 @@ icon = 'icons/obj/abductor.dmi' icon_state = "console" density = TRUE + ui_x = 600 + ui_y = 532 var/obj/item/abductor/gizmo/gizmo var/obj/item/clothing/suit/armor/abductor/vest/vest var/obj/machinery/abductor/experiment/experiment var/obj/machinery/abductor/pad/pad var/obj/machinery/computer/camera_advanced/abductor/camera var/list/datum/icon_snapshot/disguises = list() + /// Currently selected gear category + var/selected_cat + /// Dictates if the compact mode of the interface is on or off + var/compact_mode = FALSE + /// Possible gear to be dispensed + var/list/possible_gear + +/obj/machinery/abductor/console/Initialize(mapload) + . = ..() + possible_gear = get_abductor_gear() + +/** + * get_abductor_gear: Returns a list of a filtered abductor gear sorted by categories + */ +/obj/machinery/abductor/console/proc/get_abductor_gear() + var/list/filtered_modules = list() + for(var/path in GLOB.abductor_gear) + var/datum/abductor_gear/AG = new path + if(!filtered_modules[AG.category]) + filtered_modules[AG.category] = list() + filtered_modules[AG.category][AG] = AG + return filtered_modules /obj/machinery/abductor/console/attack_hand(mob/user) . = ..() @@ -32,96 +56,91 @@ to_chat(user, "You start mashing alien buttons at random!") if(do_after(user,100, target = src)) TeleporterSend() - return - user.set_machine(src) - var/dat = "" - dat += "
| "
- dat += " | "
- dat += "Probe " - dat += "Dissect " - dat += "Analyze " - dat += " |
'+(n?e:H(e,!0))+"\n":""+(n?e:H(e,!0))+"\n"},t.blockquote=function(e){return"\n"+e+"\n"},t.html=function(e){return e},t.heading=function(e,t,n,o){return this.options.headerIds?"
"+e+"
\n"},t.table=function(e,t){return t&&(t=""+t+""),""+e+""},t.br=function(){return this.options.xhtml?""+Z(l.message+"",!0)+"";throw l}}return ne.options=ne.setOptions=function(e){return X(ne.defaults,e),ee(ne.defaults),ne},ne.getDefaults=J,ne.defaults=te,ne.use=function(e){var t=X({},e);if(e.renderer&&function(){var n=ne.defaults.renderer||new U,o=function(t){var o=n[t];n[t]=function(){for(var r=arguments.length,a=new Array(r),i=0;i
'+(n?e:H(e,!0))+"\n":""+(n?e:H(e,!0))+"\n"},t.blockquote=function(e){return"\n"+e+"\n"},t.html=function(e){return e},t.heading=function(e,t,n,o){return this.options.headerIds?"
"+e+"
\n"},t.table=function(e,t){return t&&(t=""+t+""),""+e+""},t.br=function(){return this.options.xhtml?""+Z(l.message+"",!0)+"";throw l}}return ne.options=ne.setOptions=function(e){return X(ne.defaults,e),ee(ne.defaults),ne},ne.getDefaults=J,ne.defaults=te,ne.use=function(e){var t=X({},e);if(e.renderer&&function(){var n=ne.defaults.renderer||new U,o=function(t){var o=n[t];n[t]=function(){for(var r=arguments.length,a=new Array(r),i=0;i