Merge remote-tracking branch 'origin/master' into rustsql

This commit is contained in:
Letter N
2021-01-20 15:40:41 +08:00
606 changed files with 9932 additions and 4818 deletions
+18 -4
View File
@@ -11,6 +11,7 @@
var/list/jumpto_ports = list() //hashset of ports to jump to and ignore for collision purposes
var/obj/docking_port/stationary/my_port //the custom docking port placed by this console
var/obj/docking_port/mobile/shuttle_port //the mobile docking port of the connected shuttle
var/list/locked_traits = list(ZTRAIT_RESERVED, ZTRAIT_CENTCOM, ZTRAIT_AWAY, ZTRAIT_REEBE) //traits forbided for custom docking
var/view_range = 0
var/x_offset = 0
var/y_offset = 0
@@ -186,7 +187,7 @@
var/turf/eyeturf = get_turf(the_eye)
if(!eyeturf)
return SHUTTLE_DOCKER_BLOCKED
if(z_lock.len && !(eyeturf.z in z_lock))
if(!eyeturf.z || SSmapping.level_has_any_trait(eyeturf.z, locked_traits))
return SHUTTLE_DOCKER_BLOCKED
. = SHUTTLE_DOCKER_LANDING_CLEAR
@@ -224,9 +225,9 @@
if(hidden_turf_info)
. = SHUTTLE_DOCKER_BLOCKED_BY_HIDDEN_PORT
if(space_turfs_only)
if(length(whitelist_turfs))
var/turf_type = hidden_turf_info ? hidden_turf_info[2] : T.type
if(!ispath(turf_type, /turf/open/space))
if(!is_type_in_typecache(turf_type, whitelist_turfs))
return SHUTTLE_DOCKER_BLOCKED
if(length(whitelist_turfs))
@@ -324,12 +325,25 @@
var/list/L = list()
for(var/V in SSshuttle.stationary)
if(!V)
stack_trace("SSshuttle.stationary have null entry!")
continue
var/obj/docking_port/stationary/S = V
if(console.z_lock.len && !(S.z in console.z_lock))
continue
if(console.jumpto_ports[S.id])
L[S.name] = S
L["([L.len])[S.name]"] = S
for(var/V in SSshuttle.beacons)
if(!V)
stack_trace("SSshuttle.beacons have null entry!")
continue
var/obj/machinery/spaceship_navigation_beacon/nav_beacon = V
if(!nav_beacon.z || SSmapping.level_has_any_trait(nav_beacon.z, console.locked_traits))
break
if(!nav_beacon.locked)
L["([L.len]) [nav_beacon.name] located: [nav_beacon.x] [nav_beacon.y] [nav_beacon.z]"] = nav_beacon
else
L["([L.len]) [nav_beacon.name] locked"] = null
playsound(console, 'sound/machines/terminal_prompt.ogg', 25, 0)
var/selected = input("Choose location to jump to", "Locations", null) as null|anything in L
+2 -2
View File
@@ -807,7 +807,7 @@
for(var/mob/M in SSmobs.clients_by_zlevel[z])
var/dist_far = get_dist(M, distant_source)
if(dist_far <= long_range && dist_far > range)
M.playsound_local(distant_source, "sound/effects/[selected_sound]_distance.ogg", 100, falloff = 20)
M.playsound_local(distant_source, "sound/effects/[selected_sound]_distance.ogg", 100)
else if(dist_far <= range)
var/source
if(engine_list.len == 0)
@@ -819,7 +819,7 @@
if(dist_near < closest_dist)
source = O
closest_dist = dist_near
M.playsound_local(source, "sound/effects/[selected_sound].ogg", 100, falloff = range / 2)
M.playsound_local(source, "sound/effects/[selected_sound].ogg", 100)
// Losing all initial engines should get you 2
// Adding another set of engines at 0.5 time
@@ -0,0 +1,63 @@
/obj/item/circuitboard/machine/spaceship_navigation_beacon
name = "Bluespace Navigation Gigabeacon (Machine Board)"
build_path = /obj/machinery/spaceship_navigation_beacon
req_components = list()
/obj/machinery/spaceship_navigation_beacon
name = "Bluespace Navigation Gigabeacon"
desc = "A device that creates a bluespace anchor that allow ships jump near to it."
icon = 'icons/obj/abductor.dmi'
icon_state = "core"
use_power = IDLE_POWER_USE
idle_power_usage = 0
density = TRUE
circuit = /obj/item/circuitboard/machine/spaceship_navigation_beacon
var/locked = FALSE //Locked beacons don't allow to jump to it.
/obj/machinery/spaceship_navigation_beacon/Initialize()
. = ..()
SSshuttle.beacons |= src
obj/machinery/spaceship_navigation_beacon/emp_act()
locked = TRUE
/obj/machinery/spaceship_navigation_beacon/Destroy()
SSshuttle.beacons -= src
return ..()
// update the icon_state
/obj/machinery/spaceship_navigation_beacon/update_icon()
if(powered())
icon_state = "core"
else
icon_state = "core-open"
/obj/machinery/spaceship_navigation_beacon/power_change()
. = ..()
update_icon()
/obj/machinery/spaceship_navigation_beacon/multitool_act(mob/living/user, obj/item/multitool/I)
if(panel_open)
var/new_name = "Beacon_[input("Enter the custom name for this beacon", "It be Beacon ..your input..") as text]"
if(new_name && Adjacent(user))
name = new_name
to_chat(user, "<span class='notice'>You change beacon name to [name].</span>")
else
locked =!locked
to_chat(user, "<span class='notice'>You [locked ? "" : "un"]lock [src].</span>")
return TRUE
/obj/machinery/spaceship_navigation_beacon/examine()
.=..()
. += "<span class='[locked ? "warning" : "nicegreen"]'>Status: [locked ? "LOCKED" : "Stable"] </span>"
/obj/machinery/spaceship_navigation_beacon/attackby(obj/item/W, mob/user, params)
if(default_deconstruction_screwdriver(user, "core-open", "core", W))
return
if(default_deconstruction_crowbar(W))
return
return ..()