mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 11:58:39 +01:00
22e1d93b39
## About PR Adds an industrial themed away site for Odyssey scenarios. The map starts with a shuttle, broken by a randomized destruction feature. Actors or the crew may choose to repair it to make it fly once more ### Detailed Changelog <details><summary>Details</summary> <p> - Added a new map_effect, randomized destruction. It comes with two varieties and different impact ranges. The way it work is the effect chooses a random amount of turfs in the area it's placed on, and calls `ex_act` on applicable contents in the turf. - Added unused sprites for low railing and documented relevant functions in the existing code. - Made it so when a railing has an open end that doesn't connect to anywhere, it'll apply an end cap, making it look more smooth. - Added ceiling lattices. - Adjusted unit tests to avoid conflicts that may occur with ceiling lattices. - Fixed a bug where the Odyssey subsystem repeatedly added lastly loaded z-level to the scenario z-levels, instead of all relevant levels to the site. This was causing issues in Odyssey maps with shuttles. - Fixed hydrogen tank not using its sprite. Also recoloured the tank to match modern hydrogen canister colour. - Fixed `/obj/machinery/door/airlock/maintenance` not using its intended appearance. </p> </details> ## Images <img width="4128" height="2528" alt="StrongDMM-2025-11-10 21 33 47" src="https://github.com/user-attachments/assets/09d8b671-457c-4ec5-88ac-e503641a0531" /> <img width="3424" height="2016" alt="StrongDMM-2025-11-10 21 34 27" src="https://github.com/user-attachments/assets/943b8529-7f2a-41db-a7be-e57d5d30ead7" /> <img width="1312" height="800" alt="StrongDMM-2025-11-10 21 34 52" src="https://github.com/user-attachments/assets/f665800a-367b-466e-a16e-a6f0b122e3bd" /> <img width="997" height="999" alt="Screenshot_54" src="https://github.com/user-attachments/assets/c06667c6-0dfc-4dc4-af67-821f36ad2933" /> <img width="997" height="1001" alt="Screenshot_55" src="https://github.com/user-attachments/assets/848a2847-9eb0-450a-87e9-08c371aaf78a" /> <img width="998" height="992" alt="Screenshot_61" src="https://github.com/user-attachments/assets/e6174cb5-d4d6-4afc-82ab-bbf412eda607" /> <img width="998" height="990" alt="Screenshot_63" src="https://github.com/user-attachments/assets/cc838bdc-9e22-4aed-ad16-0f8722442b8a" />
237 lines
8.8 KiB
Plaintext
237 lines
8.8 KiB
Plaintext
/obj/effect/overmap
|
|
name = "map object"
|
|
icon = 'icons/obj/overmap/overmap_effects.dmi'
|
|
icon_state = "object"
|
|
color = "#fffffe"
|
|
mouse_opacity = MOUSE_OPACITY_ICON
|
|
layer = OVERMAP_SECTOR_LAYER
|
|
set_dir_on_move = FALSE
|
|
|
|
//RP fluff details to appear on scan readouts for any object we want to include these details with
|
|
var/scanimage = "no_data.png"
|
|
/// The shipyard or designer of the object if applicable.
|
|
var/designer = "Unknown"
|
|
/// Length height width of the object in tiles ingame.
|
|
var/volume = "Unestimated"
|
|
/// The expected armament or scale of armament that the design comes with if applicable. Can vary in visibility for obvious reasons.
|
|
var/weapons = "Not apparent"
|
|
/// The class of the design if applicable. Not a prefix. Should be things like battlestations or corvettes.
|
|
var/sizeclass = "Unknown"
|
|
/// The designated purpose of the design. Should briefly describe whether it's a combatant or study vessel for example.
|
|
var/shiptype = "Unknown"
|
|
|
|
/// For landing sites. Allows the crew to know if they're landing somewhere bad or not.
|
|
var/alignment = "Unknown"
|
|
|
|
///Used to give basic scan descriptions of every generic overmap object that excludes noteworthy locations, ships and exoplanets.
|
|
var/generic_object = TRUE
|
|
/// Used to expand scan details for visible space stations.
|
|
var/static_vessel = FALSE
|
|
/// Used for unique landing sites that occupy the same overmap tile as another - for example, the implementation of Point Verdant and Konyang.
|
|
var/landing_site = FALSE
|
|
|
|
var/list/map_z = list()
|
|
|
|
var/known = 0 //shows up on nav computers automatically
|
|
var/scannable //if set to TRUE will show up on ship sensors for detailed scans
|
|
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
|
|
|
|
var/image/targeted_overlay
|
|
|
|
//Overlay of how this object should look on other skyboxes
|
|
/obj/effect/overmap/proc/get_skybox_representation()
|
|
return
|
|
|
|
/obj/effect/overmap/proc/get_scan_data(mob/user)
|
|
if(static_vessel == TRUE)
|
|
if(instant_contact)
|
|
. += "<br>It is broadcasting a distress signal."
|
|
. += "<hr>"
|
|
. += "<br><center><large><b>Scan Details</b></large>"
|
|
. += "<br><large><b>[name]</b></large></center>"
|
|
. += "<br><small><b>Estimated Mass:</b> [vessel_mass]"
|
|
. += "<br><b>Projected Volume:</b> [volume]"
|
|
. += "<hr>"
|
|
. += "<br><center><b>Native Database Specifications</b>"
|
|
. += "<br><img src = [scanimage]></center>"
|
|
. += "<br><small><b>Manufacturer:</b> [designer]"
|
|
. += "<br><b>Class Designation:</b> [sizeclass]"
|
|
. += "<br><b>Weapons Estimation:</b> [weapons]</small>"
|
|
. += "<hr>"
|
|
. += "<br><center><b>Native Database Notes</b></center>"
|
|
. += "<br><small>[desc]</small>"
|
|
return
|
|
else if(landing_site == TRUE)
|
|
. += "<hr>"
|
|
. += "<br><center><large><b>Designated Landing Zone Details</b></large>"
|
|
. += "<br><large><b>[name]</b></large></center>"
|
|
. += "<hr>"
|
|
. += "<br><center><b>Native Database Specifications</b>"
|
|
. += "<br><img src = [scanimage]></center>"
|
|
. += "<br><small><b>Governing Body:</b> [alignment]</small>"
|
|
. += "<hr>"
|
|
. += "<br><center><b>Native Database Notes</b></center>"
|
|
. += "<br><small>[desc]</small>"
|
|
else if(generic_object == TRUE)
|
|
return desc
|
|
|
|
/// Returns the direction the overmap object is moving in, rather than just the way it's facing
|
|
/obj/effect/overmap/proc/get_heading()
|
|
return dir
|
|
|
|
/obj/effect/overmap/proc/handle_wraparound()
|
|
var/nx = x
|
|
var/ny = y
|
|
var/low_edge = 1
|
|
var/high_edge = SSatlas.current_map.overmap_size - 1
|
|
|
|
var/heading = get_heading()
|
|
|
|
if((heading & WEST) && x == low_edge)
|
|
nx = high_edge
|
|
else if((heading & EAST) && x == high_edge)
|
|
nx = low_edge
|
|
if((heading & SOUTH) && y == low_edge)
|
|
ny = high_edge
|
|
else if((heading & NORTH) && y == high_edge)
|
|
ny = low_edge
|
|
if((x == nx) && (y == ny))
|
|
return //we're not flying off anywhere
|
|
|
|
var/turf/T = locate(nx,ny,z)
|
|
if(T)
|
|
forceMove(T)
|
|
|
|
/obj/effect/overmap/Initialize()
|
|
. = ..()
|
|
if(!SSatlas.current_map.use_overmap)
|
|
return INITIALIZE_HINT_QDEL
|
|
|
|
if(known)
|
|
plane = ABOVE_LIGHTING_PLANE
|
|
for(var/obj/machinery/computer/ship/helm/H in SSmachinery.machinery)
|
|
H.get_known_sectors()
|
|
update_icon()
|
|
|
|
if(requires_contact)
|
|
set_invisibility(INVISIBILITY_OVERMAP)// Effects that require identification have their images cast to the client via sensors.
|
|
|
|
var/static/list/loc_connections = list(
|
|
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
|
|
COMSIG_ATOM_EXITED = PROC_REF(on_exit),
|
|
)
|
|
|
|
AddElement(/datum/element/connect_loc, loc_connections)
|
|
|
|
/obj/effect/overmap/proc/on_entered(datum/source, atom/movable/arrived, atom/old_loc, list/atom/old_locs)
|
|
SIGNAL_HANDLER
|
|
|
|
if(istype(arrived, /obj/effect/overmap/visitable))
|
|
for(var/obj/effect/overmap/visitable/O in loc)
|
|
SSskybox.rebuild_skyboxes(O.map_z)
|
|
|
|
/obj/effect/overmap/proc/on_exit(atom/movable/gone, direction)
|
|
SIGNAL_HANDLER
|
|
|
|
if(istype(gone, /obj/effect/overmap/visitable))
|
|
var/obj/effect/overmap/visitable/V = gone
|
|
SSskybox.rebuild_skyboxes(V.map_z)
|
|
for(var/obj/effect/overmap/visitable/O in loc)
|
|
SSskybox.rebuild_skyboxes(O.map_z)
|
|
|
|
/obj/effect/overmap/proc/signal_hit(var/list/hit_data)
|
|
return
|
|
|
|
/obj/effect/overmap/Click(location, control, params)
|
|
. = ..()
|
|
if(ishuman(usr))
|
|
var/mob/living/carbon/human/H = usr
|
|
var/client/C = H.client
|
|
if(H.machine && istype(H.machine, /obj/machinery/computer/ship/targeting) && istype(C.eye, /obj/effect/overmap))
|
|
var/obj/machinery/computer/ship/targeting/GS = H.machine
|
|
if(GS.targeting)
|
|
return
|
|
if(!istype(GS.linked.loc, /turf/unsimulated/map))
|
|
to_chat(H, SPAN_WARNING("The safeties won't let you target while you're not on the Overmap!"))
|
|
return
|
|
var/my_sector = GLOB.map_sectors["[H.z]"]
|
|
if(istype(my_sector, /obj/effect/overmap/visitable))
|
|
var/obj/effect/overmap/visitable/V = my_sector
|
|
if(V != src && length(V.ship_weapons)) //no guns, no lockon
|
|
if(!V.targeting)
|
|
V.target(src, H.machine)
|
|
else
|
|
if(V.targeting == src)
|
|
V.detarget(src, H.machine)
|
|
else
|
|
V.detarget(V.targeting, C)
|
|
V.target(src, H.machine)
|
|
GS.targeting = FALSE //Extra safety.
|
|
|
|
/obj/effect/overmap/MouseEntered(location, control, params)
|
|
. = ..()
|
|
var/list/modifiers = params2list(params)
|
|
if(modifiers["shift"])
|
|
params = replacetext(params, "shift=1;", "") // tooltip doesn't appear unless this is stripped
|
|
var/description = get_tooltip_description()
|
|
openToolTip(usr, src, params, name, description)
|
|
|
|
/obj/effect/overmap/proc/get_tooltip_description()
|
|
if(!desc)
|
|
return ""
|
|
var/description = "<ul>"
|
|
description += "<li>[desc]</li>"
|
|
description += "</ul>"
|
|
return description
|
|
|
|
/obj/effect/overmap/MouseExited(location, control, params)
|
|
. = ..()
|
|
closeToolTip(usr)
|
|
|
|
/obj/effect/overmap/visitable/proc/target(var/obj/effect/overmap/O, var/obj/machinery/computer/ship/C)
|
|
C.targeting = TRUE
|
|
usr.visible_message(SPAN_WARNING("[usr] starts calibrating the targeting systems, swiping around the holographic screen..."), SPAN_WARNING("You start calibrating the targeting systems, swiping around the screen as you focus..."))
|
|
if(do_after(usr, 5 SECONDS))
|
|
C.targeting = FALSE
|
|
targeting = O
|
|
O.targeted_overlay = icon('icons/obj/overmap/overmap_effects.dmi', "lock")
|
|
O.AddOverlays(O.targeted_overlay)
|
|
if(designation && class && !obfuscated)
|
|
if(!O.maptext)
|
|
O.maptext = SMALL_FONTS(6, "[class] [designation]")
|
|
else
|
|
O.maptext += SMALL_FONTS(6, " [class] [designation]")
|
|
else
|
|
if(!O.maptext)
|
|
O.maptext = SMALL_FONTS(6, "[capitalize_first_letters(name)]")
|
|
else
|
|
O.maptext = SMALL_FONTS(6, " [capitalize_first_letters(name)]")
|
|
O.maptext_y = 32
|
|
O.maptext_x = -10
|
|
O.maptext_width = 72
|
|
O.maptext_height = 32
|
|
playsound(C, 'sound/items/goggles_charge.ogg', 70)
|
|
C.visible_message(SPAN_DANGER("[usr] engages the targeting systems, acquiring a lock on the target!"))
|
|
if(istype(O, /obj/effect/overmap/visitable/ship))
|
|
var/obj/effect/overmap/visitable/ship/S = O
|
|
for(var/obj/machinery/computer/ship/SH in S.consoles)
|
|
if(istype(SH, /obj/machinery/computer/ship/sensors))
|
|
playsound(SH, 'sound/effects/ship_weapons/locked_on.ogg', 70)
|
|
SH.visible_message(SPAN_DANGER("<font size=4>\The [SH] beeps alarmingly, signaling an enemy lock-on!</font>"))
|
|
else
|
|
C.targeting = FALSE
|
|
|
|
/obj/effect/overmap/visitable/proc/detarget(var/obj/effect/overmap/O, var/obj/machinery/computer/C)
|
|
if(C)
|
|
playsound(C, 'sound/items/rfd_interrupt.ogg', 70)
|
|
if(O)
|
|
O.CutOverlays(O.targeted_overlay)
|
|
O.maptext = null
|
|
targeting = null
|