mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-15 09:56:47 +01:00
Repath obj/machinery to obj/structure/machinery [MDB Ignore] (#22500)
Repaths obj/machinery to obj/structure/machinery. **Note for reviewers:** the only meaningful changed code exists within **code/game/objects/structures.dm** and **code/game/objects/structures/_machinery.dm**, largely concerning damage procs. With the exception of moving airlock defines to their own file, ALL OTHER CHANGES ARE STRICTLY PATH CHANGES. Objects, _categorically_, are largely divided between those you can hold in your hand/inventory and those you can't. Machinery objects are already subtypes of Structures behaviorally, this PR just makes their pathing reflect that, and allows for future work (tool actions, more health/destruction functionality) to be developed without unnecessary code duplication. I have tested this PR by loading up the Horizon and dismantling various machines and structures with tools, shooting guns of various types throughout the ship, and detonating a bunch of explosions throughout the ship.
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
color = LIGHT_COLOR_ORANGE
|
||||
usage_flags = PROGRAM_CONSOLE | PROGRAM_LAPTOP
|
||||
tgui_id = "CameraMonitoring"
|
||||
var/obj/machinery/camera/current_camera
|
||||
var/obj/structure/machinery/camera/current_camera
|
||||
var/current_network
|
||||
/// Used for camera monitor consoles from which this interface can be launched. If it exists, only provide that console's "console_networks" networks.
|
||||
var/list/monitored_networks = list()
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
switch(action)
|
||||
if("switch_camera")
|
||||
var/obj/machinery/camera/C = locate(params["switch_camera"]) in GLOB.cameranet.cameras
|
||||
var/obj/structure/machinery/camera/C = locate(params["switch_camera"]) in GLOB.cameranet.cameras
|
||||
if(!C)
|
||||
return
|
||||
if(!(current_network in C.network))
|
||||
@@ -145,7 +145,7 @@
|
||||
usr.reset_view(current_camera)
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/camera_monitor/proc/switch_to_camera(var/mob/user, var/obj/machinery/camera/C)
|
||||
/datum/computer_file/program/camera_monitor/proc/switch_to_camera(var/mob/user, var/obj/structure/machinery/camera/C)
|
||||
//don't need to check if the camera works for AI because the AI jumps to the camera location and doesn't actually look through cameras.
|
||||
if(isAI(user))
|
||||
var/mob/living/silicon/ai/A = user
|
||||
@@ -172,7 +172,7 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/camera_monitor/proc/set_current(var/obj/machinery/camera/C)
|
||||
/datum/computer_file/program/camera_monitor/proc/set_current(var/obj/structure/machinery/camera/C)
|
||||
if(current_camera == C)
|
||||
return
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
color = LIGHT_COLOR_ORANGE
|
||||
tgui_id = "PenalMechs"
|
||||
|
||||
var/obj/machinery/camera/current_camera
|
||||
var/obj/structure/machinery/camera/current_camera
|
||||
|
||||
/datum/computer_file/program/penal_mechs/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
@@ -82,7 +82,7 @@
|
||||
var/mob/living/heavy_vehicle/M = locate(params["track_mech"]) in GLOB.mob_list
|
||||
if(!istype(M))
|
||||
return FALSE
|
||||
var/obj/machinery/camera/C = M.camera
|
||||
var/obj/structure/machinery/camera/C = M.camera
|
||||
if(C)
|
||||
switch_to_camera(usr, C)
|
||||
return TRUE
|
||||
@@ -109,7 +109,7 @@
|
||||
to_chat(M, SPAN_WARNING("Remote Penal Monitoring: [message]"))
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/penal_mechs/proc/switch_to_camera(var/mob/user, var/obj/machinery/camera/C)
|
||||
/datum/computer_file/program/penal_mechs/proc/switch_to_camera(var/mob/user, var/obj/structure/machinery/camera/C)
|
||||
//don't need to check if the camera works for AI because the AI jumps to the camera location and doesn't actually look through cameras.
|
||||
if(isAI(user))
|
||||
var/mob/living/silicon/ai/A = user
|
||||
@@ -131,7 +131,7 @@
|
||||
check_eye(user)
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/penal_mechs/proc/set_current(var/obj/machinery/camera/C)
|
||||
/datum/computer_file/program/penal_mechs/proc/set_current(var/obj/structure/machinery/camera/C)
|
||||
if(current_camera == C)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user