Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Тенек при посадке #2893

Merged
merged 4 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion mods/utility_items/code/advanced_landing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@
/area/bluespaceriver,
)

var/list/shadow_images = list()
var/list/saved_landmarks= list()


/obj/machinery/computer/shuttle_control/explore/proc/oko_enter()
oko = new /mob/observer/eye/landeye
oko.name_sufix = "Landing Eye"
Expand Down Expand Up @@ -216,7 +220,7 @@
landmarky_off = shuttle_landmark.y - origin.y

/obj/machinery/computer/shuttle_control/explore/proc/check_zone()

shadow_images = list()
var/turf/eyeturf = get_turf(oko)
var/list/image_cache = oko.placement_images
var/landable = TRUE
Expand All @@ -227,6 +231,7 @@
var/area/A = get_area(T)
var/zone_good = FALSE
I.loc = T
shadow_images += I
if(!(T.density))
for(var/type in accesible_areas)
if(A.type in typesof(type))
Expand Down Expand Up @@ -270,6 +275,8 @@
src.Destroy()
SetName(initial(name))

/obj/shuttle_landmark
var/list/image_shadow

/obj/shuttle_landmark/ship/advancedlandmark/Initialize(mapload, obj/shuttle_landmark/ship/master, _name)
landmark_tag = "_[shuttle_name] [rand(1,99999)]"
Expand All @@ -285,11 +292,20 @@
var/datum/shuttle/shuttle_datum = SSshuttle.shuttles[shuttle_name]
if(temp in shuttle_datum.shuttle_area)
for(var/obj/machinery/computer/shuttle_control/explore/c in temp)
for(var/obj/shuttle_landmark/ship/advancedlandmark/l in c.saved_landmarks)
var/area/landmarkarea = get_area(l)
if(landmarkarea in shuttle_datum.shuttle_area)
continue
else
c.saved_landmarks -= l
qdel(l)
if(c.check_zone())
var/turf/eyeturf = get_turf(c.oko)
var/turf/T = locate(eyeturf.x + c.landmarkx_off, eyeturf.y + c.landmarky_off , eyeturf.z)
landmark = new (T, src)
c.saved_landmarks += landmark
c.shuttle_type.set_destination(landmark)
c.shuttle_type.next_location.image_shadow = c.shadow_images

/turf
var/prev_type
Expand All @@ -298,3 +314,19 @@
.=..()
var/old_prev_type = prev_type
prev_type = old_prev_type


/datum/shuttle/autodock/process_launch()
.=..()
for(var/i in 1 to LAZYLEN(next_location.image_shadow))
var/image/I = next_location.image_shadow[i]
var/turf/T = locate(I.loc.x, I.loc.y, I.loc.z)
I = image('mods/utility_items/icons/alphacolors.dmi', T, "dither50")
T.AddOverlays(I)

/datum/shuttle/autodock/process_arrived()
.=..()
for(var/i in 1 to LAZYLEN(next_location.image_shadow))
var/image/I = next_location.image_shadow[i]
var/turf/T = locate(I.loc.x, I.loc.y, I.loc.z)
T.ClearOverlays(I)
Binary file modified mods/utility_items/icons/alphacolors.dmi
Binary file not shown.