mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
Research and Lathes resprite emissives + tcomms emmisives (#20398)
Title. 'nuff seid. Also fixes the fucked up material insertion animations to use flick_overlay_view so it isn't laggy as fuck. And adds emissives to machines that have lights so they glow in the dark epically. <img width="138" alt="dreamseeker_N6egRW6Yz3" src="https://github.com/user-attachments/assets/a17f12ba-b768-4ad6-a35f-baf33aaae658" />
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
/obj/machinery/weapons_analyzer
|
||||
/obj/machinery/r_n_d/weapons_analyzer
|
||||
name = "weapons analyzer"
|
||||
desc = "A research device which can be used to put together modular energy weapons, or to gain knowledge about the effectiveness of various objects as weaponry."
|
||||
icon = 'icons/obj/machinery/research.dmi'
|
||||
icon_state = "weapon_analyzer"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
idle_power_usage = 60
|
||||
active_power_usage = 2000
|
||||
|
||||
var/obj/item/item = null
|
||||
var/process = FALSE
|
||||
|
||||
@@ -17,11 +13,11 @@
|
||||
/obj/item/stock_parts/console_screen = 1
|
||||
)
|
||||
|
||||
/obj/machinery/weapons_analyzer/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
/obj/machinery/r_n_d/weapons_analyzer/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
. += SPAN_NOTICE("It has [item ? "[item.name]" : "nothing"] attached.")
|
||||
|
||||
/obj/machinery/weapons_analyzer/attackby(obj/item/attacking_item, mob/user)
|
||||
/obj/machinery/r_n_d/weapons_analyzer/attackby(obj/item/attacking_item, mob/user)
|
||||
if(!attacking_item || !user || !ishuman(user))
|
||||
return
|
||||
|
||||
@@ -66,15 +62,15 @@
|
||||
attacking_item.forceMove(src)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/weapons_analyzer/attack_hand(mob/user)
|
||||
/obj/machinery/r_n_d/weapons_analyzer/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/weapons_analyzer/proc/reset()
|
||||
/obj/machinery/r_n_d/weapons_analyzer/proc/reset()
|
||||
process = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/weapons_analyzer/proc/check_swap(var/mob/user, var/obj/I)
|
||||
/obj/machinery/r_n_d/weapons_analyzer/proc/check_swap(var/mob/user, var/obj/I)
|
||||
if(item)
|
||||
to_chat(user, SPAN_NOTICE("You swap \the [item] out for \the [I]."))
|
||||
if(istype(item, /obj/item/device/laser_assembly))
|
||||
@@ -86,7 +82,7 @@
|
||||
item = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/weapons_analyzer/verb/eject()
|
||||
/obj/machinery/r_n_d/weapons_analyzer/verb/eject()
|
||||
set name = "Eject Inserted Item"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
@@ -110,7 +106,7 @@
|
||||
else
|
||||
to_chat(usr, SPAN_WARNING("There is nothing in \the [src]."))
|
||||
|
||||
/obj/machinery/weapons_analyzer/update_icon()
|
||||
/obj/machinery/r_n_d/weapons_analyzer/update_icon()
|
||||
icon_state = initial(icon_state)
|
||||
ClearOverlays()
|
||||
|
||||
@@ -129,11 +125,11 @@
|
||||
// Making gun sprite smaller and centering it where we want, cause dang they are thicc
|
||||
Icon_used.Scale(round(Icon_used.Width() * 0.75), round(Icon_used.Height() * 0.75))
|
||||
var/image/gun_overlay = image(Icon_used)
|
||||
gun_overlay.pixel_x += 7
|
||||
gun_overlay.pixel_y += 8
|
||||
gun_overlay.pixel_x += 4
|
||||
gun_overlay.pixel_y += 12
|
||||
AddOverlays(gun_overlay)
|
||||
|
||||
/obj/machinery/weapons_analyzer/ui_data(mob/user)
|
||||
/obj/machinery/r_n_d/weapons_analyzer/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
if(istype(item, /obj/item/device/laser_assembly))
|
||||
@@ -253,7 +249,7 @@
|
||||
data["item"]["shield_power"] = E_item.shield_power
|
||||
return data
|
||||
|
||||
/obj/machinery/weapons_analyzer/ui_interact(mob/user, var/datum/tgui/ui)
|
||||
/obj/machinery/r_n_d/weapons_analyzer/ui_interact(mob/user, var/datum/tgui/ui)
|
||||
var/height = item ? 600: 300
|
||||
var/width = item ? 500 : 300
|
||||
if(istype(item, /obj/item/gun/energy/laser/prototype) || istype(item, /obj/item/device/laser_assembly))
|
||||
@@ -266,7 +262,7 @@
|
||||
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/weapons_analyzer/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
||||
/obj/machinery/r_n_d/weapons_analyzer/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -275,13 +271,13 @@
|
||||
do_print()
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/weapons_analyzer/proc/do_print()
|
||||
/obj/machinery/r_n_d/weapons_analyzer/proc/do_print()
|
||||
var/obj/item/paper/R = new /obj/item/paper(get_turf(src))
|
||||
R.color = "#fef8ff"
|
||||
R.set_content_unsafe("Weapon Analysis ([item.name])", get_print_info(item))
|
||||
print(R, message = "\The [src] beeps, printing \the [R] after a moment.", user = usr)
|
||||
|
||||
/obj/machinery/weapons_analyzer/proc/get_print_info(var/obj/item/device)
|
||||
/obj/machinery/r_n_d/weapons_analyzer/proc/get_print_info(var/obj/item/device)
|
||||
var/dat = "<span class='notice'><b>Analysis performed at [worldtime2text()]</b></span><br>"
|
||||
dat += "<span class='notice'><b>Analyzer Item: [device.name]</b></span><br><br>"
|
||||
dat += device.get_print_info()
|
||||
|
||||
Reference in New Issue
Block a user