mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 02:56:14 +01:00
Merge branch 'master' into 8330-fix
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
/obj/effect/overmap/visitable/sector/Crossed(var/obj/effect/overmap/visitable/ship/enterer)
|
||||
. = ..()
|
||||
if(istype(enterer))
|
||||
for(var/mob/potential_mob as anything in player_list)
|
||||
if(potential_mob.z in enterer.map_z)
|
||||
SEND_SOUND(potential_mob, 'sound/ambience/approaching_planet.ogg')
|
||||
@@ -23,7 +23,7 @@
|
||||
/// For showing to the pilot of the ship, so they see the 'real' appearance, despite others seeing the unknown ones
|
||||
var/image/real_appearance
|
||||
|
||||
light_system = MOVABLE_LIGHT
|
||||
//light_system = MOVABLE_LIGHT
|
||||
light_on = FALSE
|
||||
|
||||
/obj/effect/overmap/Initialize()
|
||||
|
||||
@@ -53,7 +53,8 @@
|
||||
|
||||
forceMove(locate(start_x, start_y, global.using_map.overmap_z))
|
||||
|
||||
docking_codes = "[ascii2text(rand(65,90))][ascii2text(rand(65,90))][ascii2text(rand(65,90))][ascii2text(rand(65,90))]"
|
||||
if(!docking_codes)
|
||||
docking_codes = "[ascii2text(rand(65,90))][ascii2text(rand(65,90))][ascii2text(rand(65,90))][ascii2text(rand(65,90))]"
|
||||
|
||||
testing("Located sector \"[name]\" at [start_x],[start_y], containing Z [english_list(map_z)]")
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
else
|
||||
data["status"] = "OK"
|
||||
var/list/contacts = list()
|
||||
for(var/obj/effect/overmap/O in view(7,linked))
|
||||
for(var/obj/effect/overmap/O in range(7,linked))
|
||||
if(linked == O)
|
||||
continue
|
||||
if(!O.scannable)
|
||||
@@ -125,10 +125,9 @@
|
||||
return
|
||||
if(sensors && sensors.use_power && sensors.powered())
|
||||
var/sensor_range = round(sensors.range*1.5) + 1
|
||||
linked.set_light_range(sensor_range + 0.5)
|
||||
linked.set_light_on(TRUE)
|
||||
linked.set_light(sensor_range + 0.5)
|
||||
else
|
||||
linked.set_light_on(FALSE)
|
||||
linked.set_light(0)
|
||||
|
||||
/obj/machinery/shipsensors
|
||||
name = "sensors suite"
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
var/glass = TRUE
|
||||
var/launched = FALSE
|
||||
|
||||
/obj/structure/panic_button/small
|
||||
icon_state = "smallpanicbutton"
|
||||
|
||||
// In case we're annihilated by a meteor
|
||||
/obj/structure/panic_button/Destroy()
|
||||
if(!launched)
|
||||
@@ -26,10 +29,10 @@
|
||||
/obj/structure/panic_button/attack_hand(mob/living/user)
|
||||
if(!istype(user))
|
||||
return ..()
|
||||
|
||||
|
||||
if(user.incapacitated())
|
||||
return
|
||||
|
||||
|
||||
// Already launched
|
||||
if(launched)
|
||||
to_chat(user, "<span class='warning'>The button is already depressed; the beacon has been launched already.</span>")
|
||||
@@ -61,10 +64,10 @@
|
||||
S.distress(user)
|
||||
//Kind of pricey, but this is a one-time thing that can't be reused, so I'm not too worried.
|
||||
var/list/hear_z = GetConnectedZlevels(z) // multiz 'physical' connections only, not crazy overmap connections
|
||||
|
||||
|
||||
var/mapsize = (world.maxx+world.maxy)*0.5
|
||||
var/turf/us = get_turf(src)
|
||||
|
||||
|
||||
for(var/hz in hear_z)
|
||||
for(var/mob/M as anything in GLOB.players_by_zlevel[hz])
|
||||
var/sound/SND = sound('sound/misc/emergency_beacon_launched.ogg') // Inside the loop because playsound_local modifies it for each person, so, need separate instances
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
var/halted = 0 //admin halt or other stop.
|
||||
var/skill_needed = SKILL_ADEPT //piloting skill needed to steer it without going in random dir
|
||||
var/operator_skill
|
||||
//VOREStation add
|
||||
var/last_sound = 0 //The last time a ship sound was played //VOREStation add
|
||||
var/sound_cooldown = 10 SECONDS //VOREStation add
|
||||
|
||||
/// Vis contents overlay holding the ship's vector when in motion
|
||||
var/obj/effect/overlay/vis/vector
|
||||
@@ -124,17 +127,37 @@
|
||||
CHANGE_SPEED_BY(speed[2], n_y)
|
||||
update_icon()
|
||||
var/still = is_still()
|
||||
// If nothing changed
|
||||
if(still == old_still)
|
||||
return
|
||||
// If it is now still, stopped moving
|
||||
else if(still)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
for(var/zz in map_z)
|
||||
toggle_move_stars(zz)
|
||||
if(last_sound + sound_cooldown >= world.time)
|
||||
return
|
||||
//VOREStation Add Start
|
||||
last_sound = world.time
|
||||
for(var/mob/potential_mob as anything in player_list)
|
||||
if(potential_mob.z in map_z)
|
||||
SEND_SOUND(potential_mob, 'sound/ambience/shutdown.ogg')
|
||||
//VOREStation Add End
|
||||
|
||||
// If it started moving
|
||||
else
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
glide_size = WORLD_ICON_SIZE/max(DS2TICKS(SSprocessing.wait), 1) //Down to whatever decimal
|
||||
for(var/zz in map_z)
|
||||
toggle_move_stars(zz, fore_dir)
|
||||
if(last_sound + sound_cooldown >= world.time)
|
||||
return
|
||||
//VOREStation Add Start
|
||||
last_sound = world.time
|
||||
for(var/mob/potential_mob as anything in player_list)
|
||||
if(potential_mob.z in map_z)
|
||||
SEND_SOUND(potential_mob, 'sound/ambience/startup.ogg')
|
||||
//VOREStation Add End
|
||||
|
||||
/obj/effect/overmap/visitable/ship/proc/get_brake_path()
|
||||
if(!get_acceleration())
|
||||
|
||||
@@ -5,15 +5,16 @@
|
||||
known = FALSE
|
||||
in_space = TRUE
|
||||
|
||||
/obj/effect/overmap/visitable/sector/temporary/Initialize(var/nx, var/ny)
|
||||
/obj/effect/overmap/visitable/sector/temporary/Initialize()
|
||||
if(!istype(loc, /turf/unsimulated/map))
|
||||
CRASH("Attempt to create deepspace which is not on overmap: [log_info_line(loc)]")
|
||||
// Tell sector initializer where are is where we want to be.
|
||||
start_x = loc.x
|
||||
start_y = loc.y
|
||||
// But pick an empty z level to use
|
||||
map_z += global.using_map.get_empty_zlevel()
|
||||
. = ..()
|
||||
loc = locate(nx, ny, global.using_map.overmap_z)
|
||||
x = nx
|
||||
y = ny
|
||||
var/emptyz = global.using_map.get_empty_zlevel()
|
||||
map_z += emptyz
|
||||
map_sectors["[emptyz]"] = src
|
||||
testing("Temporary sector at [x],[y] was created, corresponding zlevel is [emptyz].")
|
||||
testing("Temporary sector at [x],[y],[z] was created, corresponding zlevel is [english_list(map_z)].")
|
||||
|
||||
/obj/effect/overmap/visitable/sector/temporary/Destroy()
|
||||
for(var/zlevel in map_z)
|
||||
@@ -43,7 +44,7 @@
|
||||
var/obj/effect/overmap/visitable/sector/temporary/res = locate() in overmap_turf
|
||||
if(istype(res))
|
||||
return res
|
||||
return new /obj/effect/overmap/visitable/sector/temporary(x, y)
|
||||
return new /obj/effect/overmap/visitable/sector/temporary(overmap_turf)
|
||||
|
||||
/atom/movable/proc/lost_in_space()
|
||||
for(var/atom/movable/AM in contents)
|
||||
@@ -133,6 +134,8 @@
|
||||
TM = get_deepspace(M.x,M.y)
|
||||
nz = pick(TM.get_space_zlevels())
|
||||
|
||||
testing("spacetravel chose [nz],[ny],[nz] in sector [TM] @ ([TM.x],[TM.y],[TM.z])")
|
||||
|
||||
var/turf/dest = locate(nx,ny,nz)
|
||||
if(istype(dest))
|
||||
A.forceMove(dest)
|
||||
|
||||
Reference in New Issue
Block a user