mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
[MIRROR] Fixes a bunch of harddels that are sourced from player action (#6252)
* Fixes a bunch of harddels that are sourced from player action * Mirror! Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: Funce <funce.973@gmail.com>
This commit is contained in:
co-authored by
LemonInTheDark
Funce
parent
cc5595fddf
commit
6f3b151bb8
@@ -746,6 +746,11 @@
|
||||
SSshuttle.emergency = current_emergency
|
||||
SSshuttle.backup_shuttle = src
|
||||
|
||||
/obj/docking_port/mobile/emergency/backup/Destroy(force)
|
||||
if(SSshuttle.backup_shuttle == src)
|
||||
SSshuttle.backup_shuttle = null
|
||||
return ..()
|
||||
|
||||
/obj/docking_port/mobile/emergency/shuttle_build/register()
|
||||
. = ..()
|
||||
initiate_docking(SSshuttle.getDock("emergency_home"))
|
||||
|
||||
@@ -892,8 +892,16 @@
|
||||
var/range = (engine_coeff * max(width, height))
|
||||
var/long_range = range * 2.5
|
||||
var/atom/distant_source
|
||||
if(engine_list[1])
|
||||
distant_source = engine_list[1]
|
||||
var/list/engines = list()
|
||||
for(var/datum/weakref/engine in engine_list)
|
||||
var/obj/structure/shuttle/engine/real_engine = engine.resolve()
|
||||
if(!real_engine)
|
||||
engine_list -= engine
|
||||
continue
|
||||
engines += real_engine
|
||||
|
||||
if(engines[1])
|
||||
distant_source = engines[1]
|
||||
else
|
||||
for(var/A in areas)
|
||||
distant_source = locate(/obj/machinery/door) in A
|
||||
@@ -907,11 +915,11 @@
|
||||
M.playsound_local(distant_source, "sound/runtime/hyperspace/[selected_sound]_distance.ogg", 100)
|
||||
else if(dist_far <= range)
|
||||
var/source
|
||||
if(engine_list.len == 0)
|
||||
if(engines.len == 0)
|
||||
source = distant_source
|
||||
else
|
||||
var/closest_dist = 10000
|
||||
for(var/obj/O in engine_list)
|
||||
for(var/obj/O in engines)
|
||||
var/dist_near = get_dist(M, O)
|
||||
if(dist_near < closest_dist)
|
||||
source = O
|
||||
@@ -936,7 +944,7 @@
|
||||
var/area/shuttle/areaInstance = thing
|
||||
for(var/obj/structure/shuttle/engine/E in areaInstance.contents)
|
||||
if(!QDELETED(E))
|
||||
engine_list += E
|
||||
engine_list += WEAKREF(E)
|
||||
. += E.engine_power
|
||||
|
||||
// Double initial engines to get to 0.5 minimum
|
||||
|
||||
Reference in New Issue
Block a user