mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 12:02:31 +01:00
Buildable Overmap Machinery (#18974)
Sensors, IFF beacons, and thrusters can now be built with circuit boards. Ship sensors consoles will no longer throw an error if their sensors are deleted or destroyed. Thrusters and other unary atmos machines now take their initial dir from the machine frame like other machines rather than requiring modification of the circuit board item.
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
icon_keyboard = "cyan_key"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
extra_view = 4
|
||||
var/obj/machinery/shipsensors/sensors
|
||||
var/obj/machinery/iff_beacon/identification
|
||||
circuit = /obj/item/circuitboard/ship/sensors
|
||||
linked_type = /obj/effect/overmap/visitable
|
||||
@@ -38,6 +37,9 @@
|
||||
light_power_on = 1
|
||||
|
||||
/obj/machinery/computer/ship/sensors/proc/get_sensors()
|
||||
var/obj/machinery/shipsensors/sensors = sensor_ref?.resolve()
|
||||
if(!istype(sensors) || QDELETED(sensors))
|
||||
sensor_ref = null
|
||||
return sensors
|
||||
|
||||
/obj/machinery/computer/ship/sensors/attempt_hook_up(var/obj/effect/overmap/visitable/sector)
|
||||
@@ -54,7 +56,7 @@
|
||||
return
|
||||
for(var/obj/machinery/shipsensors/S in SSmachinery.machinery)
|
||||
if(linked.check_ownership(S))
|
||||
sensors = S
|
||||
sensor_ref = WEAKREF(S)
|
||||
break
|
||||
for(var/obj/machinery/iff_beacon/IB in SSmachinery.machinery)
|
||||
if(linked.check_ownership(IB))
|
||||
@@ -91,7 +93,7 @@
|
||||
/obj/machinery/computer/ship/sensors/ui_data(mob/user)
|
||||
|
||||
simple_asset_ensure_is_sent(user, /datum/asset/simple/paper)
|
||||
|
||||
var/obj/machinery/shipsensors/sensors = get_sensors()
|
||||
var/data = list()
|
||||
|
||||
data["viewing"] = viewing_overmap(user)
|
||||
@@ -229,7 +231,7 @@
|
||||
if(contact_details)
|
||||
data["contact_details"] = contact_details
|
||||
else
|
||||
data["id_status"] = "NOBEACON" //Should not really happen.
|
||||
data["id_status"] = "MISSING"
|
||||
|
||||
return data
|
||||
|
||||
@@ -248,7 +250,7 @@
|
||||
if (action == "link")
|
||||
find_sensors_and_iff()
|
||||
return TRUE
|
||||
|
||||
var/obj/machinery/shipsensors/sensors = get_sensors()
|
||||
if(sensors)
|
||||
if (action == "range")
|
||||
var/nrange = tgui_input_number("Set new sensors range", "Sensor range", sensors.range, sensors.max_range, 1)
|
||||
@@ -398,6 +400,15 @@
|
||||
var/deep_scan_toggled = FALSE //When TRUE, this sensor is using long range sensors.
|
||||
var/deep_scan_sensor_name = "High-Power Sensor Array"
|
||||
idle_power_usage = 5000
|
||||
component_types = list(
|
||||
/obj/item/circuitboard/shipsensors,
|
||||
/obj/item/stock_parts/subspace/ansible,
|
||||
/obj/item/stock_parts/subspace/filter,
|
||||
/obj/item/stock_parts/subspace/treatment,
|
||||
/obj/item/stock_parts/subspace/analyzer,
|
||||
/obj/item/stock_parts/scanning_module = 2,
|
||||
/obj/item/stock_parts/manipulator = 3
|
||||
)
|
||||
|
||||
var/base_icon_state
|
||||
|
||||
@@ -406,6 +417,12 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/shipsensors/attackby(obj/item/attacking_item, mob/user)
|
||||
if(default_deconstruction_screwdriver(user, attacking_item))
|
||||
return TRUE
|
||||
if(default_deconstruction_crowbar(user, attacking_item))
|
||||
return TRUE
|
||||
if(default_part_replacement(user, attacking_item))
|
||||
return TRUE
|
||||
var/damage = max_health - health
|
||||
if(damage && attacking_item.iswelder())
|
||||
|
||||
@@ -550,10 +567,26 @@
|
||||
max_range = 7
|
||||
desc = "Miniturized gravity scanner with various other sensors, used to detect irregularities in surrounding space. Can only run in vacuum to protect delicate quantum BS elements."
|
||||
deep_scan_range = 0
|
||||
component_types = list(
|
||||
/obj/item/circuitboard/shipsensors/weak,
|
||||
/obj/item/stock_parts/subspace/ansible,
|
||||
/obj/item/stock_parts/subspace/filter,
|
||||
/obj/item/stock_parts/subspace/treatment,
|
||||
/obj/item/stock_parts/scanning_module,
|
||||
/obj/item/stock_parts/manipulator = 3
|
||||
)
|
||||
|
||||
/obj/machinery/shipsensors/weak/scc_shuttle
|
||||
icon_state = "sensors"
|
||||
icon = 'icons/obj/spaceship/scc/helm_pieces.dmi'
|
||||
component_types = list(
|
||||
/obj/item/circuitboard/shipsensors/weak/scc,
|
||||
/obj/item/stock_parts/subspace/ansible,
|
||||
/obj/item/stock_parts/subspace/filter,
|
||||
/obj/item/stock_parts/subspace/treatment,
|
||||
/obj/item/stock_parts/scanning_module,
|
||||
/obj/item/stock_parts/manipulator = 3
|
||||
)
|
||||
|
||||
/obj/machinery/shipsensors/strong
|
||||
desc = "An upgrade to the standard ship-mounted sensor array, this beast has massive cooling systems running beneath it, allowing it to run hotter for much longer. Can only run in vacuum to protect delicate quantum BS elements."
|
||||
@@ -561,10 +594,30 @@
|
||||
max_range = 14
|
||||
deep_scan_range = 6
|
||||
deep_scan_sensor_name = "High-Power Sensor Array"
|
||||
component_types = list(
|
||||
/obj/item/circuitboard/shipsensors/strong,
|
||||
/obj/item/stock_parts/subspace/ansible,
|
||||
/obj/item/stock_parts/subspace/filter,
|
||||
/obj/item/stock_parts/subspace/treatment,
|
||||
/obj/item/stock_parts/subspace/analyzer,
|
||||
/obj/item/stock_parts/manipulator/pico = 3,
|
||||
/obj/item/stock_parts/scanning_module/phasic,
|
||||
/obj/item/stack/cable_coil = 30
|
||||
)
|
||||
|
||||
/obj/machinery/shipsensors/strong/scc_shuttle //Exclusively for the Horizon scout shuttle.
|
||||
icon_state = "sensors"
|
||||
icon = 'icons/obj/spaceship/scc/shuttle_sensors.dmi'
|
||||
component_types = list(
|
||||
/obj/item/circuitboard/shipsensors/strong/scc,
|
||||
/obj/item/stock_parts/subspace/ansible,
|
||||
/obj/item/stock_parts/subspace/filter,
|
||||
/obj/item/stock_parts/subspace/treatment,
|
||||
/obj/item/stock_parts/subspace/analyzer,
|
||||
/obj/item/stock_parts/manipulator/pico = 3,
|
||||
/obj/item/stock_parts/scanning_module/phasic,
|
||||
/obj/item/stack/cable_coil = 30
|
||||
)
|
||||
|
||||
/obj/machinery/shipsensors/strong/venator
|
||||
name = "venator-class quantum sensor array"
|
||||
@@ -575,3 +628,15 @@
|
||||
layer = ABOVE_HUMAN_LAYER
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
component_types = list(
|
||||
/obj/item/circuitboard/shipsensors/venator,
|
||||
/obj/item/stock_parts/subspace/ansible,
|
||||
/obj/item/stock_parts/subspace/filter,
|
||||
/obj/item/stock_parts/subspace/treatment,
|
||||
/obj/item/stock_parts/subspace/analyzer,
|
||||
/obj/item/stock_parts/subspace/amplifier,
|
||||
/obj/item/stock_parts/manipulator/pico = 4,
|
||||
/obj/item/stock_parts/scanning_module/phasic = 3,
|
||||
/obj/item/bluespace_crystal,
|
||||
/obj/item/stack/cable_coil = 30
|
||||
)
|
||||
|
||||
@@ -126,9 +126,9 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/computer/ship/sensors/Destroy()
|
||||
QDEL_NULL(sound_token)
|
||||
sensors = null
|
||||
sensor_ref = null
|
||||
identification = null
|
||||
QDEL_NULL(sound_token)
|
||||
if(LAZYLEN(viewers))
|
||||
for(var/datum/weakref/W in viewers)
|
||||
var/M = W.resolve()
|
||||
|
||||
@@ -66,6 +66,11 @@
|
||||
power_channel = EQUIP
|
||||
idle_power_usage = 21600 //6 Wh per tick for default 2 capacitor. Gives them a reason to turn it off, really to nerf backup battery
|
||||
|
||||
component_types = list(
|
||||
/obj/item/circuitboard/unary_atmos/engine,
|
||||
/obj/item/stack/cable_coil = 30,
|
||||
/obj/item/pipe = 2)
|
||||
|
||||
var/datum/ship_engine/gas_thruster/controller
|
||||
var/thrust_limit = 1 //Value between 1 and 0 to limit the resulting thrust
|
||||
var/volume_per_burn = 15 //20 litres(with bin)
|
||||
@@ -78,6 +83,10 @@
|
||||
|
||||
/obj/machinery/atmospherics/unary/engine/scc_shuttle
|
||||
icon = 'icons/obj/spaceship/scc/ship_engine.dmi'
|
||||
component_types = list(
|
||||
/obj/item/circuitboard/unary_atmos/engine/scc_shuttle,
|
||||
/obj/item/stack/cable_coil = 30,
|
||||
/obj/item/pipe = 2)
|
||||
|
||||
/obj/machinery/atmospherics/unary/engine/scc_ship_engine
|
||||
name = "ship thruster"
|
||||
@@ -86,6 +95,19 @@
|
||||
opacity = FALSE
|
||||
pixel_x = -64
|
||||
exhaust_offset = 3
|
||||
component_types = list(
|
||||
/obj/item/circuitboard/unary_atmos/engine/scc_ship,
|
||||
/obj/item/stack/cable_coil = 30,
|
||||
/obj/item/pipe = 2)
|
||||
|
||||
/obj/machinery/atmospherics/unary/engine/attackby(obj/item/attacking_item, mob/user)
|
||||
. = ..()
|
||||
if(default_deconstruction_screwdriver(user, attacking_item))
|
||||
return TRUE
|
||||
if(default_deconstruction_crowbar(user, attacking_item))
|
||||
return TRUE
|
||||
if(default_part_replacement(user, attacking_item))
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/unary/engine/scc_ship_engine/check_blockage()
|
||||
return 0
|
||||
@@ -231,11 +253,3 @@
|
||||
spawn(20)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/circuitboard/unary_atmos/engine//why don't we move this elsewhere?
|
||||
name = T_BOARD("gas thruster")
|
||||
icon_state = "mcontroller"
|
||||
build_path = /obj/machinery/atmospherics/unary/engine
|
||||
origin_tech = list(TECH_POWER = 1, TECH_ENGINEERING = 2)
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 30,
|
||||
/obj/item/pipe = 2)
|
||||
|
||||
@@ -43,6 +43,12 @@
|
||||
power_channel = ENVIRON
|
||||
idle_power_usage = 19600
|
||||
anchored = TRUE
|
||||
component_types = list(
|
||||
/obj/item/circuitboard/engine/ion,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/matter_bin,
|
||||
/obj/item/stock_parts/capacitor = 2
|
||||
)
|
||||
|
||||
var/datum/ship_engine/ion/controller
|
||||
var/thrust_limit = 1
|
||||
@@ -75,13 +81,11 @@
|
||||
/obj/machinery/ion_engine/proc/get_thrust()
|
||||
return thrust_limit * generated_thrust * on
|
||||
|
||||
/obj/item/circuitboard/engine/ion
|
||||
name = T_BOARD("ion propulsion device")
|
||||
board_type = "machine"
|
||||
icon_state = "mcontroller"
|
||||
build_path = /obj/machinery/ion_engine
|
||||
origin_tech = list(TECH_POWER = 4, TECH_ENGINEERING = 3)
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/capacitor = 2)
|
||||
/obj/machinery/ion_engine/attackby(obj/item/attacking_item, mob/user)
|
||||
. = ..()
|
||||
if(default_deconstruction_screwdriver(user, attacking_item))
|
||||
return TRUE
|
||||
if(default_deconstruction_crowbar(user, attacking_item))
|
||||
return TRUE
|
||||
if(default_part_replacement(user, attacking_item))
|
||||
return TRUE
|
||||
|
||||
@@ -40,6 +40,12 @@
|
||||
icon = 'icons/obj/ship_engine.dmi'
|
||||
icon_state = "nozzle"
|
||||
anchored = TRUE
|
||||
component_types = list(
|
||||
/obj/item/circuitboard/engine/maneuvering,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/matter_bin,
|
||||
/obj/item/stock_parts/capacitor = 2
|
||||
)
|
||||
|
||||
var/datum/ship_engine/maneuvering/controller
|
||||
var/thrust_limit = 1
|
||||
@@ -54,6 +60,15 @@
|
||||
QDEL_NULL(controller)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/maneuvering_engine/attackby(obj/item/attacking_item, mob/user)
|
||||
. = ..()
|
||||
if(default_deconstruction_screwdriver(user, attacking_item))
|
||||
return TRUE
|
||||
if(default_deconstruction_crowbar(user, attacking_item))
|
||||
return TRUE
|
||||
if(default_part_replacement(user, attacking_item))
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/maneuvering_engine/proc/get_status()
|
||||
. = list()
|
||||
.+= "Location: [get_area(src)]."
|
||||
@@ -64,15 +79,3 @@
|
||||
|
||||
/obj/machinery/maneuvering_engine/proc/get_thrust()
|
||||
return thrust_limit * generated_thrust * on
|
||||
|
||||
/obj/item/circuitboard/engine/maneuvering
|
||||
name = T_BOARD("pulse-maneuvering device")
|
||||
board_type = "machine"
|
||||
icon_state = "mcontroller"
|
||||
build_path = /obj/machinery/maneuvering_engine
|
||||
origin_tech = list(TECH_POWER = 4, TECH_ENGINEERING = 3)
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/capacitor = 2
|
||||
)
|
||||
|
||||
@@ -5,6 +5,12 @@
|
||||
icon_state = "iff"
|
||||
anchored = TRUE
|
||||
idle_power_usage = 500
|
||||
component_types = list(
|
||||
/obj/item/circuitboard/iff_beacon,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/subspace/transmitter,
|
||||
/obj/item/stock_parts/capacitor
|
||||
)
|
||||
var/datum/wires/iff/wires
|
||||
var/disabled = FALSE
|
||||
var/obfuscating = FALSE
|
||||
@@ -25,6 +31,10 @@
|
||||
/obj/machinery/iff_beacon/attackby(obj/item/attacking_item, mob/user)
|
||||
if(default_deconstruction_screwdriver(user, attacking_item))
|
||||
return TRUE
|
||||
if(default_deconstruction_crowbar(user, attacking_item))
|
||||
return TRUE
|
||||
if(default_part_replacement(user, attacking_item))
|
||||
return TRUE
|
||||
|
||||
if(panel_open)
|
||||
if(attacking_item.ismultitool() || attacking_item.iswirecutter())
|
||||
|
||||
Reference in New Issue
Block a user