mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 10:02:28 +00:00
Removes ERT from standard gameplay. The Horizon now sends distress beacons for other Overmap vessels instead. Barricades and crew armoury buff. (#14371)
This commit is contained in:
@@ -21,7 +21,8 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
|
||||
var/base = 0 //starting sector, counts as station_levels
|
||||
var/in_space = 1 //can be accessed via lucky EVA
|
||||
|
||||
var/has_distress_beacon
|
||||
var/has_called_distress_beacon = FALSE
|
||||
var/image/applied_distress_overlay
|
||||
|
||||
/obj/effect/overmap/visitable/Initialize()
|
||||
. = ..()
|
||||
@@ -111,6 +112,17 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
|
||||
/obj/effect/overmap/visitable/proc/generate_skybox()
|
||||
return
|
||||
|
||||
/obj/effect/overmap/visitable/proc/toggle_distress_status()
|
||||
has_called_distress_beacon = !has_called_distress_beacon
|
||||
if(has_called_distress_beacon)
|
||||
var/image/distress_overlay = image('icons/obj/overmap.dmi', "distress")
|
||||
applied_distress_overlay = distress_overlay
|
||||
add_overlay(applied_distress_overlay)
|
||||
filters = filter(type = "outline", size = 2, color = COLOR_RED)
|
||||
else
|
||||
cut_overlay(applied_distress_overlay)
|
||||
filters = null
|
||||
|
||||
/obj/effect/overmap/visitable/sector
|
||||
name = "generic sector"
|
||||
desc = "Sector with some stuff in it."
|
||||
|
||||
@@ -44,6 +44,18 @@
|
||||
data["status"] = "VACUUM SEAL BROKEN"
|
||||
else
|
||||
data["status"] = "OK"
|
||||
var/list/distress_beacons = list()
|
||||
for(var/caller in SSdistress.active_distress_beacons)
|
||||
var/datum/distress_beacon/beacon = SSdistress.active_distress_beacons[caller]
|
||||
var/obj/effect/overmap/vessel = beacon.caller
|
||||
var/mob/living/carbon/human/H = beacon.user
|
||||
var/job_string = H.job ? "[H.job] " : ""
|
||||
var/bearing = round(90 - Atan2(vessel.x - linked.x, vessel.y - linked.y),5)
|
||||
if(bearing < 0)
|
||||
bearing += 360
|
||||
distress_beacons.Add(list(list("caller" = vessel.name, "sender" = "[job_string][H.name]", "bearing" = bearing)))
|
||||
if(length(distress_beacons))
|
||||
data["distress_beacons"] = distress_beacons
|
||||
var/list/contacts = list()
|
||||
for(var/obj/effect/overmap/O in view(7,linked))
|
||||
if(linked == O)
|
||||
@@ -54,7 +66,7 @@
|
||||
if(bearing < 0)
|
||||
bearing += 360
|
||||
contacts.Add(list(list("name"=O.name, "ref"="\ref[O]", "bearing"=bearing)))
|
||||
if(contacts.len)
|
||||
if(length(contacts))
|
||||
data["contacts"] = contacts
|
||||
else
|
||||
data["status"] = "MISSING"
|
||||
@@ -63,7 +75,7 @@
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "shipsensors.tmpl", "[linked.name] Sensors Control", 420, 530, src)
|
||||
ui = new(user, src, ui_key, "shipsensors.tmpl", "[linked.name] Sensors Control", 600, 530, src)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
@@ -103,6 +115,17 @@
|
||||
new/obj/item/paper/(get_turf(src), O.get_scan_data(usr), "paper (Sensor Scan - [O])")
|
||||
return TOPIC_HANDLED
|
||||
|
||||
if (href_list["play_message"])
|
||||
var/caller = href_list["play_message"]
|
||||
var/datum/distress_beacon/beacon = SSdistress.active_distress_beacons[caller]
|
||||
var/mob/living/carbon/human/sender = beacon.user
|
||||
var/user_name = beacon.user_name
|
||||
var/accent_icon = sender.get_accent_icon()
|
||||
visible_message(SPAN_NOTICE("\The [src] beeps a few times as it replays the distress message."))
|
||||
playsound(src, 'sound/machines/compbeep5.ogg')
|
||||
visible_message(SPAN_ITALIC("[accent_icon] <b>[user_name]</b> explains, \"[beacon.distress_message]\""))
|
||||
return TOPIC_HANDLED
|
||||
|
||||
/obj/machinery/computer/ship/sensors/process()
|
||||
..()
|
||||
if(!linked)
|
||||
|
||||
Reference in New Issue
Block a user