Adds a Horizon roundstart report with overmap bearings, sensor tweaks. (#15765)

This commit is contained in:
Matt Atlas
2023-02-14 22:52:47 +01:00
committed by GitHub
parent 745ab328e6
commit 4a0466972d
18 changed files with 196 additions and 24 deletions
@@ -81,12 +81,12 @@
// Handle datalinked view
datalink_process()
for(var/obj/effect/overmap/contact in view(sensor_range, linked))
if(contact == linked)
continue
if(!contact.requires_contact) // Only some effects require contact for visibility.
continue
objects_in_current_view[contact] = TRUE
if(contact.instant_contact) // Instantly identify the object in range.
@@ -94,6 +94,22 @@
else if(!(contact in objects_in_view))
objects_in_view[contact] = 0
if(sensors.deep_scan_toggled)
for(var/obj/effect/overmap/contact in range(sensors.deep_scan_range, linked))
if(!contact.sensor_range_override)
continue
if(contact == linked)
continue
if(!contact.requires_contact) // Only some effects require contact for visibility.
continue
objects_in_current_view[contact] = TRUE
if(contact.instant_contact) // Instantly identify the object in range.
objects_in_view[contact] = 100
else if(!(contact in objects_in_view))
objects_in_view[contact] = 0
for(var/obj/effect/overmap/contact in objects_in_view) //Update everything.
// Are we already aware of this object?
@@ -279,7 +295,7 @@
// Recurse the function on the other ship's instance
sensor_console.datalink_remove_ship_datalink(src.connected)
visible_message(SPAN_NOTICE("<b>\The [src]</b> states, \"A datalink contact was sewered! Recalibration...\""))
visible_message(SPAN_NOTICE("<b>\The [src]</b> states, \"A datalink contact was severed! Recalibrating...\""))
/obj/machinery/computer/ship/sensors/proc/datalink_remove_all_ships_datalink()
+1
View File
@@ -11,6 +11,7 @@
var/unknown_id // A unique identifier used when this entity is scanned. Assigned in Initialize().
var/requires_contact = TRUE //whether or not the effect must be identified by ship sensors before being seen.
var/instant_contact = FALSE //do we instantly identify ourselves to any ship in sensors range?
var/sensor_range_override = FALSE //When true, this overmap object will be scanned with range instead of view.
var/sensor_visibility = 10 //how likely it is to increase identification process each scan.
var/vessel_mass = 10000 // metric tonnes, very rough number, affects acceleration provided by engines
+2
View File
@@ -6,6 +6,7 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
/obj/effect/overmap/visitable
name = "map object"
scannable = TRUE
sensor_range_override = TRUE
var/designation //Actual name of the object.
var/class //Imagine a ship or station's class. "NTCC" Odin, "SCCV" Horizon, ...
unknown_id = "Bogey"
@@ -51,6 +52,7 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
var/list/place_near_main
var/invisible_until_ghostrole_spawn = FALSE
var/hide_from_reports = FALSE
/obj/effect/overmap/visitable/Initialize()
. = ..()
@@ -66,6 +66,9 @@
data["range"] = sensors.range
data["health"] = sensors.health
data["max_health"] = sensors.max_health
data["deep_scan_name"] = sensors.deep_scan_sensor_name
data["deep_scan_range"] = sensors.deep_scan_range
data["deep_scan_toggled"] = sensors.deep_scan_toggled
data["heat"] = sensors.heat
data["critical_heat"] = sensors.critical_heat
if(sensors.health == 0)
@@ -96,7 +99,7 @@
var/list/contacts = list()
var/list/potential_contacts = list()
for(var/obj/effect/overmap/nearby in view(7,linked))
for(var/obj/effect/overmap/nearby in view(7, linked))
if(nearby.requires_contact) // Some ships require.
continue
potential_contacts |= nearby
@@ -194,6 +197,10 @@
sensors.toggle()
return TOPIC_REFRESH
if(href_list["deep_scan_toggle"])
sensors.deep_scan_toggled = !sensors.deep_scan_toggled
return TOPIC_REFRESH
if(identification)
if(href_list["toggle_id"])
identification.toggle()
@@ -303,6 +310,9 @@
var/range = 1
var/max_range = 10
var/sensor_strength = 5//used for detecting ships via contacts
var/deep_scan_range = 4 //Maximum range for the range() check in sensors. Basically a way to use range instead of view in this radius.
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
var/base_icon_state
@@ -401,7 +411,9 @@
take_damage(rand(10,50))
toggle()
heat += active_power_usage/15000
heat += active_power_usage / 15000
if(deep_scan_toggled)
heat += deep_scan_range / 8
if (heat > 0)
heat = max(0, heat - heat_reduction)
@@ -433,10 +445,18 @@
heat_reduction = 1.7 // Can sustain range 4
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
/obj/machinery/shipsensors/strong
name = "sensors suite"
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."
icon_state = "sensor_suite"
heat_reduction = 3.7 // can sustain range 6
max_range = 14
deep_scan_range = 6
deep_scan_sensor_name = "High-Power Sensor Array"
/obj/machinery/shipsensors/strong/venator
name = "venator-class quantum sensor array"
desc = "An incredibly advanced sensor array, created using top of the line technology in every conceivable area. Not only does it far outperform and outclass every other sensors system, it also boasts revolutionary quantum long-range sensors."
deep_scan_range = 12
deep_scan_sensor_name = "Venator-Class Ultra-High Depth Sensors"
+2
View File
@@ -17,6 +17,8 @@ var/const/OVERMAP_SPEED_CONSTANT = (1 SECOND)
icon_state = "generic"
requires_contact = TRUE
obfuscated_name = "unidentified vessel"
sensor_range_override = FALSE
hide_from_reports = TRUE
var/moving_state = "ship_moving"
var/list/known_ships = list() //List of ships known at roundstart - put types here.