Skip to content

Commit

Permalink
2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexanx committed Jan 5, 2025
1 parent a025e48 commit 63d261b
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 22 deletions.
19 changes: 10 additions & 9 deletions code/modules/detectivework/microscope/dnascanner.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//DNA machine
/obj/machinery/dnaforensics
//[SIERRA-EDIT] - Complete path refactoring /obj/machinery/dnaforensics originally
/obj/machinery/computer/dnaforensics
name = "DNA analyzer"
desc = "A high tech machine that is designed to read DNA samples properly."
icon = 'icons/obj/machines/forensics/dna_scanner.dmi'
Expand All @@ -15,7 +16,7 @@
var/last_process_worldtime = 0
var/report_num = 0

/obj/machinery/dnaforensics/use_tool(obj/item/W, mob/living/user, list/click_params)
/obj/machinery/computer/dnaforensics/use_tool(obj/item/W, mob/living/user, list/click_params)
if(!istype(W, /obj/item/forensics/swab))
return .. ()

Expand All @@ -38,7 +39,7 @@
to_chat(user, SPAN_WARNING("\The [src] only accepts used swabs."))
return TRUE

/obj/machinery/dnaforensics/ui_interact(mob/user, ui_key = "main",datum/nanoui/ui = null)
/obj/machinery/computer/dnaforensics/ui_interact(mob/user, ui_key = "main",datum/nanoui/ui = null)
if(!is_powered()) return
if(user.stat || user.restrained()) return
var/list/data = list()
Expand All @@ -55,7 +56,7 @@
ui.open()
ui.set_auto_update(1)

/obj/machinery/dnaforensics/Topic(href, href_list)
/obj/machinery/computer/dnaforensics/Topic(href, href_list)

if(..()) return 1

Expand Down Expand Up @@ -87,7 +88,7 @@

return 1

/obj/machinery/dnaforensics/Process()
/obj/machinery/computer/dnaforensics/Process()
if(scanning)
if(!bloodsamp || bloodsamp.loc != src)
bloodsamp = null
Expand All @@ -101,7 +102,7 @@
scanner_progress = min(100, scanner_progress + scanner_rate * deltaT)
last_process_worldtime = world.time

/obj/machinery/dnaforensics/proc/complete_scan()
/obj/machinery/computer/dnaforensics/proc/complete_scan()
src.visible_message(SPAN_NOTICE("[icon2html(src, viewers(get_turf(src)))] makes an insistent chime."), 2)
update_icon()
if(bloodsamp)
Expand All @@ -125,11 +126,11 @@
update_icon()
return

/obj/machinery/dnaforensics/interface_interact(mob/user)
/obj/machinery/computer/dnaforensics/interface_interact(mob/user)
ui_interact(user)
return TRUE

/obj/machinery/dnaforensics/verb/toggle_lid()
/obj/machinery/computer/dnaforensics/verb/toggle_lid()
set category = "Object"
set name = "Toggle Lid"
set src in oview(1)
Expand All @@ -144,7 +145,7 @@
closed = !closed
src.update_icon()

/obj/machinery/dnaforensics/on_update_icon()
/obj/machinery/computer/dnaforensics/on_update_icon()
ClearOverlays()
if(panel_open)
AddOverlays("[icon_state]_panel")
Expand Down
22 changes: 14 additions & 8 deletions code/modules/detectivework/microscope/microscope.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//microscope code itself
/obj/machinery/microscope
//[SIERRA-EDIT] - Complete path refactoring /obj/machinery/microscope originally
/obj/machinery/computer/microscope
name = "high powered electron microscope"
desc = "A highly advanced microscope capable of zooming up to 3000x."
icon = 'icons/obj/machines/forensics/microscope.dmi'
Expand All @@ -10,12 +11,17 @@
var/obj/item/sample = null
var/report_num = 0

/obj/machinery/microscope/Destroy()
/obj/machinery/computer/microscope/Destroy()
if(sample)
sample.dropInto(loc)
..()

/obj/machinery/microscope/use_tool(obj/item/W, mob/living/user, list/click_params)
/obj/machinery/computer/microscope/use_tool(obj/item/W, mob/living/user, list/click_params)
if(isScrewdriver(W) || isCrowbar(W))
var/choice = alert("Do you want to use \the [W] on \the [src]?", "Use Tool ", "Yes", "No")
if(choice == "Yes")
return .=..()

if(sample)
if (istype(W, /obj/item/evidencebag))
var/obj/item/evidencebag/bag = W
Expand Down Expand Up @@ -61,7 +67,7 @@
update_icon()
return TRUE

/obj/machinery/microscope/physical_attack_hand(mob/user)
/obj/machinery/computer/microscope/physical_attack_hand(mob/user)
. = TRUE
if(!sample)
to_chat(user, SPAN_WARNING("The microscope has no sample to examine."))
Expand Down Expand Up @@ -141,7 +147,7 @@
to_chat(user, report.info)
return

/obj/machinery/microscope/proc/remove_sample(mob/living/remover)
/obj/machinery/computer/microscope/proc/remove_sample(mob/living/remover)
if(!istype(remover) || remover.incapacitated() || !Adjacent(remover))
return
if(!sample)
Expand All @@ -152,17 +158,17 @@
sample = null
update_icon()

/obj/machinery/microscope/AltClick()
/obj/machinery/computer/microscope/AltClick()
remove_sample(usr)
return TRUE

/obj/machinery/microscope/MouseDrop(atom/other)
/obj/machinery/computer/microscope/MouseDrop(atom/other)
if(usr == other)
remove_sample(usr)
else
return ..()

/obj/machinery/microscope/on_update_icon()
/obj/machinery/computer/microscope/on_update_icon()
ClearOverlays()
if(panel_open)
AddOverlays("[icon_state]_panel")
Expand Down
4 changes: 2 additions & 2 deletions code/modules/item_worth/worths_list.dm
Original file line number Diff line number Diff line change
Expand Up @@ -708,8 +708,8 @@ var/global/list/worths = list(
/obj/machinery/telecomms/broadcaster = -10000,
/obj/machinery/telecomms = -7000,
/obj/machinery/acting/changer = -3000,
/obj/machinery/dnaforensics = -1200,
/obj/machinery/microscope = -550,
/obj/machinery/computer/dnaforensics = -1200, //[SIERRA-EDIT] /obj/machinery/microscope
/obj/machinery/computer/microscope = -550,//[SIERRA-EDIT] /obj/machinery/microscope
/obj/machinery/computer/account_database = -3000,
/obj/machinery/atm = -4500,
/obj/machinery/readybutton = -0,
Expand Down
4 changes: 2 additions & 2 deletions maps/sierra/z1-z5_sierra.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -21853,7 +21853,7 @@
/area/crew_quarters/heads/office/ce/cobed)
"diN" = (
/obj/structure/table/glass,
/obj/machinery/microscope,
/obj/machinery/computer/microscope,
/obj/floor_decal/borderfloorwhite{
dir = 1
},
Expand Down Expand Up @@ -128293,7 +128293,7 @@
/area/crew_quarters/sleep/cryo/south)
"sOJ" = (
/obj/structure/table/glass,
/obj/machinery/dnaforensics,
/obj/machinery/computer/dnaforensics,
/obj/machinery/recharger/wallcharger{
dir = 4;
pixel_x = -22
Expand Down
28 changes: 28 additions & 0 deletions mods/RnD/code/design.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,31 @@
req_tech = list(TECH_DATA = 2)
build_path = /obj/item/stock_parts/circuitboard/area_atmos
sort_string = "KCAAR"


/datum/design/circuit/dnaforensics

name = "DNA analyzer"
desc = "A high tech machine that is designed to read DNA samples properly."
id = "dnaforensics"
req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 4)
build_path = /obj/item/stock_parts/circuitboard/dnaforensics
sort_string = "VBGAM"

/obj/item/stock_parts/circuitboard/dnaforensics
name = "circuit board (DNA analyzer)"
build_path = /obj/machinery/computer/dnaforensics
origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 4)

/datum/design/circuit/microscope
name = "high powered electron microscope"
desc = "A highly advanced microscope capable of zooming up to 3000x."
id = "microscope"
req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 4)
build_path = /obj/item/stock_parts/circuitboard/microscope
sort_string = "VBGAN"

/obj/item/stock_parts/circuitboard/microscope
name = "circuit board (microscope)"
build_path = /obj/machinery/computer/microscope
origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 4)
2 changes: 1 addition & 1 deletion mods/RnD/code/tech_biotech.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
required_tech_levels = list()
cost = 1500

unlocks_designs = list("cryo_cell", "sleeper", "bodyscanner", "bodyscannerconsole", "bodyscannerdisplay","reagent_grinder","chemheater", "reagsubl","noreactsyringe")
unlocks_designs = list("cryo_cell", "sleeper", "bodyscanner", "bodyscannerconsole", "bodyscannerdisplay","reagent_grinder","chemheater", "reagsubl","noreactsyringe","microscope", "dnaforensics")

/datum/technology/bio/add_med_tools
name = "Additional Medical Tools"
Expand Down

0 comments on commit 63d261b

Please sign in to comment.