12/21 modernizations from TG live (#103)
* sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
|
||||
if(!options.Find(S.id))
|
||||
continue
|
||||
if(M.canDock(S))
|
||||
if(!M.check_dock(S))
|
||||
continue
|
||||
destination_found = 1
|
||||
dat += "<A href='?src=\ref[src];move=[S.id]'>Send to [S.name]</A><br>"
|
||||
@@ -76,5 +76,3 @@
|
||||
emagged = 1
|
||||
user << "<span class='notice'>You fried the consoles ID checking system.</span>"
|
||||
|
||||
/obj/machinery/computer/shuttle/fluff/New()
|
||||
take_damage(100)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#define TIME_LEFT (SSshuttle.emergency.timeLeft())
|
||||
#define ENGINES_START_TIME 10
|
||||
#define ENGINES_STARTED (TIME_LEFT <= ENGINES_START_TIME)
|
||||
#define IS_DOCKED (SSshuttle.emergency.mode == SHUTTLE_DOCKED)
|
||||
#define ENGINES_START_TIME 100
|
||||
#define ENGINES_STARTED (SSshuttle.emergency.mode == SHUTTLE_IGNITING)
|
||||
#define IS_DOCKED (SSshuttle.emergency.mode == SHUTTLE_DOCKED || (ENGINES_STARTED))
|
||||
|
||||
/obj/machinery/computer/emergency_shuttle
|
||||
name = "emergency shuttle console"
|
||||
@@ -86,8 +86,9 @@
|
||||
|
||||
if((old_len != authorized.len) && !ENGINES_STARTED)
|
||||
var/alert = (authorized.len > old_len)
|
||||
if(authorized.len)
|
||||
minor_announce("[auth_need - authorized.len] authorizations \
|
||||
var/remaining = auth_need - authorized.len
|
||||
if(authorized.len && remaining)
|
||||
minor_announce("[remaining] authorizations \
|
||||
needed until shuttle is launched early", null, alert)
|
||||
else
|
||||
minor_announce("All authorizations to launch the shuttle \
|
||||
@@ -125,10 +126,10 @@
|
||||
// Check to see if we've reached criteria for early launch
|
||||
if((authorized.len >= auth_need) || emagged)
|
||||
// shuttle timers use 1/10th seconds internally
|
||||
SSshuttle.emergency.setTimer(ENGINES_START_TIME * 10)
|
||||
SSshuttle.emergency.setTimer(ENGINES_START_TIME)
|
||||
var/system_error = emagged ? "SYSTEM ERROR:" : null
|
||||
minor_announce("The emergency shuttle will launch in \
|
||||
[ENGINES_START_TIME] seconds", system_error, alert=TRUE)
|
||||
[TIME_LEFT] seconds", system_error, alert=TRUE)
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/computer/emergency_shuttle/emag_act(mob/user)
|
||||
@@ -136,13 +137,17 @@
|
||||
if(!IS_DOCKED)
|
||||
return
|
||||
|
||||
if(emagged || ENGINES_STARTED) //SYSTEM ERROR: THE SHUTTLE WILL LA-SYSTEM ERROR: THE SHUTTLE WILL LA-SYSTEM ERROR: THE SHUTTLE WILL LAUNCH IN 10 SECONDS
|
||||
user << "<span class='warning'>The shuttle is already about to launch!</span>"
|
||||
return
|
||||
|
||||
var/time = TIME_LEFT
|
||||
message_admins("[key_name_admin(user.client)] \
|
||||
(<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) \
|
||||
(<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) \
|
||||
has emagged the emergency shuttle [time] seconds before launch.", 0, 1)
|
||||
log_game("[key_name(user)] has emagged the emergency shuttle in \
|
||||
([x],[y],[z]) [time] seconds before launch.")
|
||||
[COORD(src)] [time] seconds before launch.")
|
||||
emagged = TRUE
|
||||
var/datum/species/S = new
|
||||
for(var/i in 1 to 10)
|
||||
@@ -155,12 +160,7 @@
|
||||
|
||||
authorized += ID
|
||||
|
||||
if(ENGINES_STARTED)
|
||||
// Give them a message anyway
|
||||
user << "<span class='warning'>The shuttle is already \
|
||||
about to launch!</span>"
|
||||
else
|
||||
process()
|
||||
process()
|
||||
|
||||
/obj/machinery/computer/emergency_shuttle/Destroy()
|
||||
// Our fake IDs that the emag generated are just there for colour
|
||||
@@ -168,6 +168,9 @@
|
||||
|
||||
for(var/obj/item/weapon/card/id/ID in src)
|
||||
qdel(ID)
|
||||
if(authorized && authorized.len)
|
||||
authorized.Cut()
|
||||
authorized = null
|
||||
|
||||
. = ..()
|
||||
|
||||
@@ -179,10 +182,12 @@
|
||||
width = 22
|
||||
height = 11
|
||||
dir = EAST
|
||||
travelDir = -90
|
||||
port_angle = -90
|
||||
roundstart_move = "emergency_away"
|
||||
var/sound_played = 0 //If the launch sound has been sent to all players on the shuttle itself
|
||||
var/end_sound_played = 0 //so it doesn't loop annoyingly
|
||||
|
||||
/obj/docking_port/mobile/emergency/canDock(obj/docking_port/stationary/S)
|
||||
return SHUTTLE_CAN_DOCK //If the emergency shuttle can't move, the whole game breaks, so it will force itself to land even if it has to crush a few departments in the process
|
||||
|
||||
/obj/docking_port/mobile/emergency/register()
|
||||
. = ..()
|
||||
@@ -197,34 +202,14 @@
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/docking_port/mobile/emergency/timeLeft(divisor)
|
||||
if(divisor <= 0)
|
||||
divisor = 10
|
||||
if(!timer)
|
||||
return round(SSshuttle.emergencyCallTime/divisor, 1)
|
||||
|
||||
var/dtime = world.time - timer
|
||||
switch(mode)
|
||||
if(SHUTTLE_ESCAPE)
|
||||
dtime = max(SSshuttle.emergencyEscapeTime - dtime, 0)
|
||||
if(SHUTTLE_DOCKED)
|
||||
dtime = max(SSshuttle.emergencyDockTime - dtime, 0)
|
||||
else
|
||||
dtime = max(SSshuttle.emergencyCallTime - dtime, 0)
|
||||
return round(dtime/divisor, 1)
|
||||
|
||||
/obj/docking_port/mobile/emergency/request(obj/docking_port/stationary/S, coefficient=1, area/signalOrigin, reason, redAlert)
|
||||
SSshuttle.emergencyCallTime = initial(SSshuttle.emergencyCallTime) * coefficient
|
||||
var/call_time = SSshuttle.emergencyCallTime * coefficient
|
||||
switch(mode)
|
||||
if(SHUTTLE_RECALL)
|
||||
// The shuttle can not normally be called while "recalling", so
|
||||
// if this proc is called, it's via admin fiat
|
||||
if(SHUTTLE_RECALL, SHUTTLE_IDLE, SHUTTLE_CALL)
|
||||
mode = SHUTTLE_CALL
|
||||
timer = world.time - timeLeft(1)
|
||||
if(SHUTTLE_IDLE)
|
||||
mode = SHUTTLE_CALL
|
||||
timer = world.time
|
||||
if(SHUTTLE_CALL)
|
||||
if(world.time < timer) //this is just failsafe
|
||||
timer = world.time
|
||||
setTimer(call_time)
|
||||
else
|
||||
return
|
||||
|
||||
@@ -239,7 +224,7 @@
|
||||
if(mode != SHUTTLE_CALL)
|
||||
return
|
||||
|
||||
timer = world.time - timeLeft(1)
|
||||
invertTimer()
|
||||
mode = SHUTTLE_RECALL
|
||||
|
||||
if(prob(70))
|
||||
@@ -248,14 +233,25 @@
|
||||
SSshuttle.emergencyLastCallLoc = null
|
||||
priority_announce("The emergency shuttle has been recalled.[SSshuttle.emergencyLastCallLoc ? " Recall signal traced. Results can be viewed on any communications console." : "" ]", null, 'sound/AI/shuttlerecalled.ogg', "Priority")
|
||||
|
||||
/*
|
||||
/obj/docking_port/mobile/emergency/findTransitDock()
|
||||
. = SSshuttle.getDock("emergency_transit")
|
||||
if(.)
|
||||
return .
|
||||
return ..()
|
||||
*/
|
||||
/obj/docking_port/mobile/emergency/proc/is_hijacked()
|
||||
var/has_people = FALSE
|
||||
|
||||
for(var/mob/living/player in player_list)
|
||||
if(player.mind)
|
||||
if(player.stat != DEAD)
|
||||
if(issilicon(player)) //Borgs are technically dead anyways
|
||||
continue
|
||||
if(isanimal(player)) //animals don't count
|
||||
continue
|
||||
if(isbrain(player)) //also technically dead
|
||||
continue
|
||||
if(get_area(player) == areaInstance)
|
||||
has_people = TRUE
|
||||
var/location = get_turf(player.mind.current)
|
||||
if(!(player.mind.special_role == "traitor" || player.mind.special_role == "Syndicate") && !istype(location, /turf/open/floor/plasteel/shuttle/red) && !istype(location, /turf/open/floor/mineral/plastitanium/brig))
|
||||
return FALSE
|
||||
|
||||
return has_people
|
||||
|
||||
/obj/docking_port/mobile/emergency/check()
|
||||
if(!timer)
|
||||
@@ -284,7 +280,7 @@
|
||||
setTimer(20)
|
||||
return
|
||||
mode = SHUTTLE_DOCKED
|
||||
timer = world.time
|
||||
setTimer(SSshuttle.emergencyDockTime)
|
||||
send2irc("Server", "The Emergency Shuttle has docked with the station.")
|
||||
priority_announce("The Emergency Shuttle has docked with the station. You have [timeLeft(600)] minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
|
||||
feedback_add_details("emergency_shuttle", src.name)
|
||||
@@ -298,18 +294,37 @@
|
||||
else
|
||||
G.dom_attempts = min(1,G.dom_attempts)
|
||||
|
||||
if(SHUTTLE_DOCKED)
|
||||
|
||||
if(time_left <= 60 && !sound_played) //4 seconds left:REV UP THOSE ENGINES BOYS. - should sync up with the launch
|
||||
if(SHUTTLE_DOCKED)
|
||||
if(time_left <= ENGINES_START_TIME)
|
||||
mode = SHUTTLE_IGNITING
|
||||
SSshuttle.checkHostileEnvironment()
|
||||
if(mode == SHUTTLE_STRANDED)
|
||||
return
|
||||
for(var/A in SSshuttle.mobile)
|
||||
var/obj/docking_port/mobile/M = A
|
||||
if(M.launch_status == UNLAUNCHED) //Pods will not launch from the mine/planet, and other ships won't launch unless we tell them to.
|
||||
M.check_transit_zone()
|
||||
|
||||
if(SHUTTLE_IGNITING)
|
||||
var/success = TRUE
|
||||
SSshuttle.checkHostileEnvironment()
|
||||
if(mode == SHUTTLE_STRANDED)
|
||||
return
|
||||
|
||||
success &= (check_transit_zone() == TRANSIT_READY)
|
||||
for(var/A in SSshuttle.mobile)
|
||||
var/obj/docking_port/mobile/M = A
|
||||
if(M.launch_status == UNLAUNCHED)
|
||||
success &= (M.check_transit_zone() == TRANSIT_READY)
|
||||
if(!success)
|
||||
setTimer(ENGINES_START_TIME)
|
||||
|
||||
if(time_left <= 50 && !sound_played) //4 seconds left:REV UP THOSE ENGINES BOYS. - should sync up with the launch
|
||||
sound_played = 1 //Only rev them up once.
|
||||
for(var/area/shuttle/escape/E in world)
|
||||
E << 'sound/effects/hyperspace_begin.ogg'
|
||||
|
||||
if(time_left <= 0 && SSshuttle.emergencyNoEscape)
|
||||
priority_announce("Hostile environment detected. Departure has been postponed indefinitely pending conflict resolution.", null, 'sound/misc/notice1.ogg', "Priority")
|
||||
sound_played = 0 //Since we didn't launch, we will need to rev up the engines again next pass.
|
||||
mode = SHUTTLE_STRANDED
|
||||
|
||||
if(time_left <= 0 && !SSshuttle.emergencyNoEscape)
|
||||
//move each escape pod (or applicable spaceship) to its corresponding transit dock
|
||||
for(var/A in SSshuttle.mobile)
|
||||
@@ -324,22 +339,22 @@
|
||||
enterTransit()
|
||||
mode = SHUTTLE_ESCAPE
|
||||
launch_status = ENDGAME_LAUNCHED
|
||||
timer = world.time
|
||||
setTimer(SSshuttle.emergencyEscapeTime)
|
||||
priority_announce("The Emergency Shuttle has left the station. Estimate [timeLeft(600)] minutes until the shuttle docks at Central Command.", null, null, "Priority")
|
||||
for(var/mob/Player in mob_list)
|
||||
if(!istype(Player,/mob/living/silicon || /mob/living/simple_animal))
|
||||
if(Player.mind)
|
||||
if(Player.stat != DEAD && !isbrain(Player))
|
||||
if(Player.z != 2)
|
||||
Player << sound('sound/ambience/deserted.ogg', repeat = 0, wait = 0, volume = 50, channel = 1)
|
||||
|
||||
if(SHUTTLE_STRANDED)
|
||||
SSshuttle.checkHostileEnvironment()
|
||||
|
||||
if(SHUTTLE_ESCAPE)
|
||||
|
||||
|
||||
if(time_left <= 50 && !end_sound_played) //4 seconds left:Hyperspace trip completed. - should sync up with the landing
|
||||
end_sound_played = 1 //Only rev them up once.
|
||||
if(areaInstance.parallax_movedir && time_left <= PARALLAX_LOOP_TIME)
|
||||
parallax_slowdown()
|
||||
for(var/area/shuttle/escape/E in world)
|
||||
E << 'sound/effects/hyperspace_end.ogg'
|
||||
for(var/A in SSshuttle.mobile)
|
||||
var/obj/docking_port/mobile/M = A
|
||||
if(M.launch_status == ENDGAME_LAUNCHED)
|
||||
if(istype(M, /obj/docking_port/mobile/pod))
|
||||
M.parallax_slowdown()
|
||||
|
||||
if(time_left <= 0)
|
||||
//move each escape pod to its corresponding escape dock
|
||||
@@ -351,20 +366,18 @@
|
||||
else
|
||||
continue //Mapping a new docking point for each ship mappers could potentially want docking with centcomm would take up lots of space, just let them keep flying off into the sunset for their greentext
|
||||
|
||||
//now move the actual emergency shuttle to centcomm
|
||||
// for(var/area/shuttle/escape/E in world)
|
||||
// E << 'sound/effects/hyperspace_end.ogg'
|
||||
dock(SSshuttle.getDock("emergency_away"))
|
||||
// now move the actual emergency shuttle to centcomm
|
||||
// unless the shuttle is "hijacked"
|
||||
var/destination_dock = "emergency_away"
|
||||
if(is_hijacked())
|
||||
destination_dock = "emergency_syndicate"
|
||||
minor_announce("Corruption detected in \
|
||||
shuttle navigation protocols. Please contact your \
|
||||
supervisor.", "SYSTEM ERROR:", alert=TRUE)
|
||||
|
||||
dock_id(destination_dock)
|
||||
mode = SHUTTLE_ENDGAME
|
||||
timer = 0
|
||||
open_dock()
|
||||
|
||||
/obj/docking_port/mobile/emergency/proc/open_dock()
|
||||
for(var/obj/machinery/door/poddoor/shuttledock/D in airlocks)
|
||||
var/turf/T = get_step(D, D.checkdir)
|
||||
if(!istype(T,/turf/open/space))
|
||||
spawn(0)
|
||||
D.open()
|
||||
|
||||
/obj/docking_port/mobile/pod
|
||||
name = "escape pod"
|
||||
@@ -459,13 +472,14 @@
|
||||
|
||||
/obj/item/weapon/storage/pod/MouseDrop(over_object, src_location, over_location)
|
||||
if(security_level == SEC_LEVEL_RED || security_level == SEC_LEVEL_DELTA)
|
||||
return ..()
|
||||
. = ..()
|
||||
else
|
||||
usr << "The storage unit will only unlock during a Red or Delta security alert."
|
||||
|
||||
/obj/item/weapon/storage/pod/attack_hand(mob/user)
|
||||
return
|
||||
|
||||
|
||||
/obj/docking_port/mobile/emergency/backup
|
||||
name = "backup shuttle"
|
||||
id = "backup"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
var/cooldown = 600
|
||||
possible_destinations = "ferry_home"
|
||||
admin_controlled = 1
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/machinery/computer/shuttle/ferry/request/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
icon = 'icons/obj/machines/shuttle_manipulator.dmi'
|
||||
icon_state = "holograph_on"
|
||||
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
|
||||
// UI state variables
|
||||
var/datum/map_template/shuttle/selected
|
||||
|
||||
@@ -30,9 +33,6 @@
|
||||
add_overlay(hologram_projection)
|
||||
add_overlay(hologram_ship)
|
||||
|
||||
/obj/machinery/shuttle_manipulator/process()
|
||||
return
|
||||
|
||||
/obj/machinery/shuttle_manipulator/ui_interact(mob/user, ui_key = "main", \
|
||||
datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, \
|
||||
datum/ui_state/state = admin_state)
|
||||
@@ -47,6 +47,8 @@
|
||||
switch(mode)
|
||||
if(SHUTTLE_IDLE)
|
||||
. = "idle"
|
||||
if(SHUTTLE_IGNITING)
|
||||
. = "engines charging"
|
||||
if(SHUTTLE_RECALL)
|
||||
. = "recalled"
|
||||
if(SHUTTLE_CALL)
|
||||
@@ -217,7 +219,7 @@
|
||||
// truthy value means that it cannot dock for some reason
|
||||
// but we can ignore the someone else docked error because we'll
|
||||
// be moving into their place shortly
|
||||
if(result && (result != SHUTTLE_SOMEONE_ELSE_DOCKED))
|
||||
if((result != SHUTTLE_CAN_DOCK) && (result != SHUTTLE_SOMEONE_ELSE_DOCKED))
|
||||
var/m = "Unsuccessful dock of [preview_shuttle] ([result])."
|
||||
WARNING(m)
|
||||
return
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/atom/movable/proc/onShuttleMove(turf/T1, rotation)
|
||||
if(rotation)
|
||||
shuttleRotate(rotation)
|
||||
loc = T1
|
||||
if (length(client_mobs_in_contents))
|
||||
update_parallax_contents()
|
||||
return 1
|
||||
|
||||
/obj/onShuttleMove()
|
||||
if(invisibility >= INVISIBILITY_ABSTRACT)
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/atom/movable/light/onShuttleMove()
|
||||
return 0
|
||||
|
||||
/obj/machinery/door/onShuttleMove()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
addtimer(src, "close", 0, TIMER_UNIQUE)
|
||||
// Close any attached airlocks as well
|
||||
for(var/obj/machinery/door/D in orange(1, src))
|
||||
addtimer(src, "close", 0, TIMER_UNIQUE)
|
||||
|
||||
/obj/machinery/door/airlock/onShuttleMove()
|
||||
shuttledocked = 0
|
||||
for(var/obj/machinery/door/airlock/A in orange(1, src))
|
||||
A.shuttledocked = 0
|
||||
. = ..()
|
||||
shuttledocked = 1
|
||||
for(var/obj/machinery/door/airlock/A in orange(1, src))
|
||||
A.shuttledocked = 1
|
||||
/mob/onShuttleMove()
|
||||
if(!move_on_shuttle)
|
||||
return 0
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(client)
|
||||
if(buckled)
|
||||
shake_camera(src, 2, 1) // turn it down a bit come on
|
||||
else
|
||||
shake_camera(src, 7, 1)
|
||||
|
||||
/mob/living/carbon/onShuttleMove()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(!buckled)
|
||||
Weaken(3)
|
||||
|
||||
// Shuttle Rotation //
|
||||
|
||||
/atom/proc/shuttleRotate(rotation)
|
||||
//rotate our direction
|
||||
setDir(angle2dir(rotation+dir2angle(dir)))
|
||||
|
||||
//resmooth if need be.
|
||||
if(smooth)
|
||||
queue_smooth(src)
|
||||
|
||||
//rotate the pixel offsets too.
|
||||
if (pixel_x || pixel_y)
|
||||
if (rotation < 0)
|
||||
rotation += 360
|
||||
for (var/turntimes=rotation/90;turntimes>0;turntimes--)
|
||||
var/oldPX = pixel_x
|
||||
var/oldPY = pixel_y
|
||||
pixel_x = oldPY
|
||||
pixel_y = (oldPX*(-1))
|
||||
+214
-244
@@ -8,17 +8,18 @@
|
||||
//icon = 'icons/dirsquare.dmi'
|
||||
icon_state = "pinonfar"
|
||||
|
||||
unacidable = 1
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
anchored = 1
|
||||
|
||||
var/id
|
||||
dir = NORTH//this should point -away- from the dockingport door, ie towards the ship
|
||||
// this should point -away- from the dockingport door, ie towards the ship
|
||||
dir = NORTH
|
||||
var/width = 0 //size of covered area, perpendicular to dir
|
||||
var/height = 0 //size of covered area, paralell to dir
|
||||
var/height = 0 //size of covered area, parallel to dir
|
||||
var/dwidth = 0 //position relative to covered area, perpendicular to dir
|
||||
var/dheight = 0 //position relative to covered area, parallel to dir
|
||||
|
||||
//these objects are indestructable
|
||||
//these objects are indestructible
|
||||
/obj/docking_port/Destroy(force)
|
||||
// unless you assert that you know what you're doing. Horrible things
|
||||
// may result.
|
||||
@@ -28,19 +29,23 @@
|
||||
else
|
||||
return QDEL_HINT_LETMELIVE
|
||||
|
||||
/obj/docking_port/take_damage()
|
||||
return
|
||||
|
||||
/obj/docking_port/singularity_pull()
|
||||
return
|
||||
/obj/docking_port/singularity_act()
|
||||
return 0
|
||||
/obj/docking_port/shuttleRotate()
|
||||
return //we don't rotate with shuttles via this code.
|
||||
|
||||
//returns a list(x0,y0, x1,y1) where points 0 and 1 are bounding corners of the projected rectangle
|
||||
/obj/docking_port/proc/return_coords(_x, _y, _dir)
|
||||
if(!_dir)
|
||||
if(_dir == null)
|
||||
_dir = dir
|
||||
if(!_x)
|
||||
if(_x == null)
|
||||
_x = x
|
||||
if(!_y)
|
||||
if(_y == null)
|
||||
_y = y
|
||||
|
||||
//byond's sin and cos functions are inaccurate. This is faster and perfectly accurate
|
||||
@@ -135,6 +140,7 @@
|
||||
|
||||
var/turf_type = /turf/open/space
|
||||
var/area_type = /area/space
|
||||
var/last_dock_time
|
||||
|
||||
/obj/docking_port/stationary/New()
|
||||
..()
|
||||
@@ -151,38 +157,61 @@
|
||||
//returns first-found touching shuttleport
|
||||
/obj/docking_port/stationary/get_docked()
|
||||
. = locate(/obj/docking_port/mobile) in loc
|
||||
/*
|
||||
for(var/turf/T in return_ordered_turfs())
|
||||
. = locate(/obj/docking_port/mobile) in loc
|
||||
if(.)
|
||||
return .
|
||||
*/
|
||||
|
||||
/obj/docking_port/stationary/transit
|
||||
name = "In Transit"
|
||||
turf_type = /turf/open/space/transit
|
||||
var/list/turf/assigned_turfs = list()
|
||||
var/area/shuttle/transit/assigned_area
|
||||
var/obj/docking_port/mobile/owner
|
||||
|
||||
/obj/docking_port/stationary/transit/New()
|
||||
..()
|
||||
SSshuttle.transit += src
|
||||
|
||||
/obj/docking_port/stationary/transit/proc/dezone()
|
||||
for(var/i in assigned_turfs)
|
||||
var/turf/T = i
|
||||
if(T.type == turf_type)
|
||||
T.ChangeTurf(/turf/open/space)
|
||||
T.flags |= UNUSED_TRANSIT_TURF
|
||||
|
||||
/obj/docking_port/stationary/transit/Destroy(force=FALSE)
|
||||
if(force)
|
||||
SSshuttle.transit -= src
|
||||
if(owner)
|
||||
owner = null
|
||||
if(assigned_turfs)
|
||||
dezone()
|
||||
assigned_turfs.Cut()
|
||||
assigned_turfs = null
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/docking_port/mobile
|
||||
icon_state = "mobile"
|
||||
name = "shuttle"
|
||||
icon_state = "pinonclose"
|
||||
|
||||
var/area/shuttle/areaInstance
|
||||
|
||||
var/timer //used as a timer (if you want time left to complete move, use timeLeft proc)
|
||||
var/mode = SHUTTLE_IDLE //current shuttle mode (see /__DEFINES/stat.dm)
|
||||
var/callTime = 150 //time spent in transit (deciseconds)
|
||||
var/last_timer_length
|
||||
|
||||
var/mode = SHUTTLE_IDLE //current shuttle mode
|
||||
var/callTime = 100 //time spent in transit (deciseconds). Should not be lower then 10 seconds without editing the animation of the hyperspace ripples.
|
||||
var/ignitionTime = 55 // time spent "starting the engines". Also rate limits how often we try to reserve transit space if its ever full of transiting shuttles.
|
||||
var/roundstart_move //id of port to send shuttle to at roundstart
|
||||
var/travelDir = 0 //direction the shuttle would travel in
|
||||
|
||||
// The direction the shuttle prefers to travel in
|
||||
var/preferred_direction = NORTH
|
||||
// And the angle from the front of the shuttle to the port
|
||||
var/port_angle = 0 // used to be travelDir
|
||||
|
||||
var/obj/docking_port/stationary/destination
|
||||
var/obj/docking_port/stationary/previous
|
||||
|
||||
var/obj/docking_port/stationary/transit/assigned_transit
|
||||
|
||||
var/launch_status = NOLAUNCH
|
||||
|
||||
// A timid shuttle will not register itself with the shuttle subsystem
|
||||
@@ -202,6 +231,10 @@
|
||||
/obj/docking_port/mobile/Destroy(force)
|
||||
if(force)
|
||||
SSshuttle.mobile -= src
|
||||
destination = null
|
||||
previous = null
|
||||
assigned_transit = null
|
||||
areaInstance = null
|
||||
. = ..()
|
||||
|
||||
/obj/docking_port/mobile/initialize()
|
||||
@@ -225,7 +258,7 @@
|
||||
|
||||
//this is a hook for custom behaviour. Maybe at some point we could add checks to see if engines are intact
|
||||
/obj/docking_port/mobile/proc/canMove()
|
||||
return 0 //0 means we can move
|
||||
return TRUE
|
||||
|
||||
//this is to check if this shuttle can physically dock at dock S
|
||||
/obj/docking_port/mobile/proc/canDock(obj/docking_port/stationary/S)
|
||||
@@ -233,7 +266,7 @@
|
||||
return SHUTTLE_NOT_A_DOCKING_PORT
|
||||
|
||||
if(istype(S, /obj/docking_port/stationary/transit))
|
||||
return FALSE
|
||||
return SHUTTLE_CAN_DOCK
|
||||
|
||||
if(dwidth > S.dwidth)
|
||||
return SHUTTLE_DWIDTH_TOO_LARGE
|
||||
@@ -258,41 +291,45 @@
|
||||
// attempt to move us where we currently are, it will get weird.
|
||||
return SHUTTLE_ALREADY_DOCKED
|
||||
|
||||
return FALSE
|
||||
return SHUTTLE_CAN_DOCK
|
||||
|
||||
/obj/docking_port/mobile/proc/check_dock(obj/docking_port/stationary/S)
|
||||
var/status = canDock(S)
|
||||
if(status == SHUTTLE_CAN_DOCK)
|
||||
return TRUE
|
||||
else if(status == SHUTTLE_ALREADY_DOCKED)
|
||||
// We're already docked there, don't need to do anything.
|
||||
// Triggering shuttle movement code in place is weird
|
||||
return FALSE
|
||||
else
|
||||
var/msg = "Shuttle [src] cannot dock at [S], error: [status]"
|
||||
message_admins(msg)
|
||||
return FALSE
|
||||
|
||||
//call the shuttle to destination S
|
||||
/obj/docking_port/mobile/proc/request(obj/docking_port/stationary/S)
|
||||
var/status = canDock(S)
|
||||
if(status == SHUTTLE_ALREADY_DOCKED)
|
||||
// We're already docked there, don't need to do anything.
|
||||
// Triggering shuttle movement code in place is weird
|
||||
if(!check_dock(S))
|
||||
return
|
||||
else if(status)
|
||||
var/msg = "request(): shuttle [src] cannot dock at [S], \
|
||||
error: [status]"
|
||||
message_admins(msg)
|
||||
throw EXCEPTION(msg)
|
||||
|
||||
switch(mode)
|
||||
if(SHUTTLE_CALL)
|
||||
if(S == destination)
|
||||
if(world.time <= timer)
|
||||
timer = world.time
|
||||
if(timeLeft(1) < callTime)
|
||||
setTimer(callTime)
|
||||
else
|
||||
destination = S
|
||||
timer = world.time
|
||||
setTimer(callTime)
|
||||
if(SHUTTLE_RECALL)
|
||||
if(S == destination)
|
||||
timer = world.time - timeLeft(1)
|
||||
setTimer(callTime - timeLeft(1))
|
||||
else
|
||||
destination = S
|
||||
timer = world.time
|
||||
setTimer(callTime)
|
||||
mode = SHUTTLE_CALL
|
||||
else
|
||||
if(SHUTTLE_IDLE, SHUTTLE_IGNITING)
|
||||
destination = S
|
||||
mode = SHUTTLE_CALL
|
||||
timer = world.time
|
||||
enterTransit() //hyperspace
|
||||
mode = SHUTTLE_IGNITING
|
||||
setTimer(ignitionTime)
|
||||
|
||||
//recall the shuttle to where it was previously
|
||||
/obj/docking_port/mobile/proc/cancel()
|
||||
@@ -301,7 +338,7 @@
|
||||
|
||||
remove_ripples()
|
||||
|
||||
timer = world.time - timeLeft(1)
|
||||
invertTimer()
|
||||
mode = SHUTTLE_RECALL
|
||||
|
||||
/obj/docking_port/mobile/proc/enterTransit()
|
||||
@@ -309,7 +346,7 @@
|
||||
// if(!destination)
|
||||
// return
|
||||
var/obj/docking_port/stationary/S0 = get_docked()
|
||||
var/obj/docking_port/stationary/S1 = findTransitDock()
|
||||
var/obj/docking_port/stationary/S1 = assigned_transit
|
||||
if(S1)
|
||||
if(dock(S1))
|
||||
WARNING("shuttle \"[id]\" could not enter transit space. Docked at [S0 ? S0.id : "null"]. Transit dock [S1 ? S1.id : "null"].")
|
||||
@@ -318,24 +355,6 @@
|
||||
else
|
||||
WARNING("shuttle \"[id]\" could not enter transit space. S0=[S0 ? S0.id : "null"] S1=[S1 ? S1.id : "null"]")
|
||||
|
||||
//default shuttleRotate
|
||||
/atom/proc/shuttleRotate(rotation)
|
||||
//rotate our direction
|
||||
setDir(angle2dir(rotation+dir2angle(dir)))
|
||||
|
||||
//resmooth if need be.
|
||||
if(smooth)
|
||||
queue_smooth(src)
|
||||
|
||||
//rotate the pixel offsets too.
|
||||
if (pixel_x || pixel_y)
|
||||
if (rotation < 0)
|
||||
rotation += 360
|
||||
for (var/turntimes=rotation/90;turntimes>0;turntimes--)
|
||||
var/oldPX = pixel_x
|
||||
var/oldPY = pixel_y
|
||||
pixel_x = oldPY
|
||||
pixel_y = (oldPX*(-1))
|
||||
|
||||
/obj/docking_port/mobile/proc/jumpToNullSpace()
|
||||
// Destroys the docking port and the shuttle contents.
|
||||
@@ -396,28 +415,23 @@
|
||||
ripple_turfs += T1
|
||||
|
||||
return ripple_turfs
|
||||
|
||||
/obj/docking_port/mobile/proc/check_poddoors()
|
||||
for(var/obj/machinery/door/poddoor/shuttledock/pod in airlocks)
|
||||
pod.check()
|
||||
|
||||
//this is the main proc. It instantly moves our mobile port to stationary port S1
|
||||
//it handles all the generic behaviour, such as sanity checks, closing doors on the shuttle, stunning mobs, etc
|
||||
/obj/docking_port/mobile/proc/dock(obj/docking_port/stationary/S1, force=FALSE)
|
||||
if(S1.get_docked() == src)
|
||||
remove_ripples()
|
||||
return
|
||||
// Crashing this ship with NO SURVIVORS
|
||||
if(!force)
|
||||
var/status = canDock(S1)
|
||||
if(status == SHUTTLE_ALREADY_DOCKED)
|
||||
return status
|
||||
else if(status)
|
||||
var/msg = "dock(): shuttle [src] cannot dock at [S1], \
|
||||
error: [status]"
|
||||
message_admins(msg)
|
||||
return status
|
||||
|
||||
if(canMove())
|
||||
if(!check_dock(S1))
|
||||
return -1
|
||||
if(!canMove())
|
||||
return -1
|
||||
|
||||
closePortDoors()
|
||||
|
||||
// //rotate transit docking ports, so we don't need zillions of variants
|
||||
// if(istype(S1, /obj/docking_port/stationary/transit))
|
||||
// S1.setDir(turn(NORTH, -travelDir))
|
||||
|
||||
var/obj/docking_port/stationary/S0 = get_docked()
|
||||
var/turf_type = /turf/open/space
|
||||
@@ -428,6 +442,8 @@
|
||||
if(S0.area_type)
|
||||
area_type = S0.area_type
|
||||
|
||||
var/destination_turf_type = S1.turf_type
|
||||
|
||||
var/list/L0 = return_ordered_turfs(x, y, z, dir, areaInstance)
|
||||
var/list/L1 = return_ordered_turfs(S1.x, S1.y, S1.z, S1.dir)
|
||||
|
||||
@@ -442,11 +458,11 @@
|
||||
if(!A0)
|
||||
A0 = new area_type(null)
|
||||
for(var/turf/T0 in L0)
|
||||
var/area/old = T0.loc
|
||||
A0.contents += T0
|
||||
T0.change_area(old, A0)
|
||||
|
||||
|
||||
if (istype(S1, /obj/docking_port/stationary/transit))
|
||||
areaInstance.parallax_movedir = preferred_direction
|
||||
else
|
||||
areaInstance.parallax_movedir = FALSE
|
||||
remove_ripples()
|
||||
|
||||
//move or squish anything in the way ship at destination
|
||||
@@ -461,12 +477,11 @@
|
||||
continue
|
||||
if(T0.type != T0.baseturf) //So if there is a hole in the shuttle we don't drag along the space/asteroid/etc to wherever we are going next
|
||||
T0.copyTurf(T1)
|
||||
var/area/old = T1.loc
|
||||
T1.baseturf = destination_turf_type
|
||||
areaInstance.contents += T1
|
||||
T1.change_area(old, areaInstance)
|
||||
|
||||
//copy over air
|
||||
if(istype(T1, /turf/open))
|
||||
if(isopenturf(T1))
|
||||
var/turf/open/Ts1 = T1
|
||||
Ts1.copy_air_with_tile(T0)
|
||||
|
||||
@@ -477,110 +492,42 @@
|
||||
if(rotation)
|
||||
T1.shuttleRotate(rotation)
|
||||
|
||||
//lighting stuff
|
||||
T1.redraw_lighting()
|
||||
SSair.remove_from_active(T1)
|
||||
T1.CalculateAdjacentTurfs()
|
||||
SSair.add_to_active(T1,1)
|
||||
|
||||
T0.ChangeTurf(turf_type)
|
||||
|
||||
T0.redraw_lighting()
|
||||
SSair.remove_from_active(T0)
|
||||
T0.CalculateAdjacentTurfs()
|
||||
SSair.add_to_active(T0,1)
|
||||
|
||||
check_poddoors()
|
||||
S1.last_dock_time = world.time
|
||||
|
||||
loc = S1.loc
|
||||
setDir(S1.dir)
|
||||
|
||||
/atom/movable/proc/onShuttleMove(turf/T1, rotation)
|
||||
if(rotation)
|
||||
shuttleRotate(rotation)
|
||||
loc = T1
|
||||
return 1
|
||||
|
||||
/obj/onShuttleMove()
|
||||
if(invisibility >= INVISIBILITY_ABSTRACT)
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/atom/movable/light/onShuttleMove()
|
||||
return 0
|
||||
|
||||
/obj/machinery/door/onShuttleMove()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
addtimer(src, "close", 0)
|
||||
|
||||
/mob/onShuttleMove()
|
||||
if(!move_on_shuttle)
|
||||
return 0
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(client)
|
||||
if(buckled)
|
||||
shake_camera(src, 2, 1) // turn it down a bit come on
|
||||
else
|
||||
shake_camera(src, 7, 1)
|
||||
|
||||
/mob/living/carbon/onShuttleMove()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(!buckled)
|
||||
Weaken(3)
|
||||
|
||||
/*
|
||||
if(istype(S1, /obj/docking_port/stationary/transit))
|
||||
var/d = turn(dir, 180 + travelDir)
|
||||
for(var/turf/open/space/transit/T in S1.return_ordered_turfs())
|
||||
T.pushdirection = d
|
||||
T.update_icon()
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/obj/docking_port/mobile/proc/findTransitDock()
|
||||
var/obj/docking_port/stationary/transit/T = SSshuttle.getDock("[id]_transit")
|
||||
if(T && !canDock(T))
|
||||
return T
|
||||
|
||||
/obj/docking_port/mobile/proc/findRoundstartDock()
|
||||
var/obj/docking_port/stationary/D
|
||||
D = SSshuttle.getDock(roundstart_move)
|
||||
|
||||
if(D)
|
||||
return D
|
||||
return SSshuttle.getDock(roundstart_move)
|
||||
|
||||
/obj/docking_port/mobile/proc/dockRoundstart()
|
||||
// Instead of spending a lot of time trying to work out where to place
|
||||
// our shuttle, just create it somewhere empty and send it to where
|
||||
// it should go
|
||||
var/obj/docking_port/stationary/D = findRoundstartDock()
|
||||
return dock(D)
|
||||
. = dock_id(roundstart_move)
|
||||
|
||||
/obj/docking_port/mobile/proc/dock_id(id)
|
||||
var/port = SSshuttle.getDock(id)
|
||||
if(port)
|
||||
. = dock(port)
|
||||
else
|
||||
. = null
|
||||
|
||||
/obj/effect/landmark/shuttle_import
|
||||
name = "Shuttle Import"
|
||||
|
||||
/* commented out due to issues with rotation
|
||||
for(var/obj/docking_port/stationary/transit/S in SSshuttle.transit)
|
||||
if(S.id)
|
||||
continue
|
||||
if(!canDock(S))
|
||||
return S
|
||||
*/
|
||||
|
||||
|
||||
//shuttle-door closing is handled in the dock() proc whilst looping through turfs
|
||||
//this one closes the door where we are docked at, if there is one there.
|
||||
/obj/docking_port/mobile/proc/closePortDoors()
|
||||
var/turf/T = get_step(loc, turn(dir,180))
|
||||
if(T)
|
||||
var/obj/machinery/door/Door = locate() in T
|
||||
if(Door)
|
||||
addtimer(Door, "close", 0)
|
||||
|
||||
/obj/docking_port/mobile/proc/roadkill(list/L0, list/L1, dir)
|
||||
var/list/hurt_mobs = list()
|
||||
for(var/i in 1 to L0.len)
|
||||
var/turf/T0 = L0[i]
|
||||
var/turf/T1 = L1[i]
|
||||
@@ -591,85 +538,128 @@
|
||||
// The corresponding tile will not be changed, so no roadkill
|
||||
|
||||
for(var/atom/movable/AM in T1)
|
||||
if(isliving(AM) && (!(AM in hurt_mobs)))
|
||||
hurt_mobs |= AM
|
||||
var/mob/living/M = AM
|
||||
if(M.buckled)
|
||||
M.buckled.unbuckle_mob(M, 1)
|
||||
if(M.pulledby)
|
||||
M.pulledby.stop_pulling()
|
||||
M.stop_pulling()
|
||||
M.visible_message("<span class='warning'>[M] is hit by \
|
||||
a hyperspace ripple[M.anchored ? "":" and is thrown clear"]!</span>",
|
||||
"<span class='userdanger'>You feel an immense \
|
||||
crushing pressure as the space around you ripples.</span>")
|
||||
if(M.anchored)
|
||||
if(ismob(AM))
|
||||
if(isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
if(M.buckled)
|
||||
M.buckled.unbuckle_mob(M, 1)
|
||||
if(M.pulledby)
|
||||
M.pulledby.stop_pulling()
|
||||
M.stop_pulling()
|
||||
M.visible_message("<span class='warning'>[M] is hit by \
|
||||
a hyperspace ripple!</span>",
|
||||
"<span class='userdanger'>You feel an immense \
|
||||
crushing pressure as the space around you ripples.</span>")
|
||||
M.gib()
|
||||
|
||||
else //non-living mobs shouldn't be affected by shuttles, which is why this is an else
|
||||
if(istype(AM, /obj/singularity) && !istype(AM, /obj/singularity/narsie)) //it's a singularity but not a god, ignore it.
|
||||
continue
|
||||
if(!AM.anchored)
|
||||
step(AM, dir)
|
||||
else
|
||||
M.Paralyse(10)
|
||||
M.ex_act(2)
|
||||
step(M, dir)
|
||||
continue
|
||||
qdel(AM)
|
||||
|
||||
if(!AM.anchored)
|
||||
step(AM, dir)
|
||||
else
|
||||
qdel(AM)
|
||||
/*
|
||||
//used to check if atom/A is within the shuttle's bounding box
|
||||
/obj/docking_port/mobile/proc/onShuttleCheck(atom/A)
|
||||
var/turf/T = get_turf(A)
|
||||
if(!T)
|
||||
return 0
|
||||
|
||||
var/list/L = return_coords()
|
||||
if(L[1] > L[3])
|
||||
L.Swap(1,3)
|
||||
if(L[2] > L[4])
|
||||
L.Swap(2,4)
|
||||
|
||||
if(L[1] <= T.x && T.x <= L[3])
|
||||
if(L[2] <= T.y && T.y <= L[4])
|
||||
return 1
|
||||
return 0
|
||||
*/
|
||||
//used by shuttle subsystem to check timers
|
||||
/obj/docking_port/mobile/proc/check()
|
||||
var/timeLeft = timeLeft(1)
|
||||
if(!ripples.len && (timeLeft <= SHUTTLE_RIPPLE_TIME) && ((mode == SHUTTLE_CALL) || (mode == SHUTTLE_RECALL)))
|
||||
create_ripples(destination)
|
||||
check_effects()
|
||||
|
||||
if(timeLeft <= 0)
|
||||
switch(mode)
|
||||
if(SHUTTLE_CALL)
|
||||
if(dock(destination))
|
||||
setTimer(20) //can't dock for some reason, try again in 2 seconds
|
||||
return
|
||||
if(SHUTTLE_RECALL)
|
||||
if(dock(previous))
|
||||
setTimer(20) //can't dock for some reason, try again in 2 seconds
|
||||
return
|
||||
mode = SHUTTLE_IDLE
|
||||
timer = 0
|
||||
destination = null
|
||||
if(mode == SHUTTLE_IGNITING)
|
||||
check_transit_zone()
|
||||
|
||||
if(timeLeft(1) > 0)
|
||||
return
|
||||
// If we can't dock or we don't have a transit slot, wait for 20 ds,
|
||||
// then try again
|
||||
switch(mode)
|
||||
if(SHUTTLE_CALL)
|
||||
if(dock(destination))
|
||||
setTimer(20)
|
||||
return
|
||||
if(SHUTTLE_RECALL)
|
||||
if(dock(previous))
|
||||
setTimer(20)
|
||||
return
|
||||
if(SHUTTLE_IGNITING)
|
||||
if(check_transit_zone() != TRANSIT_READY)
|
||||
setTimer(20)
|
||||
return
|
||||
else
|
||||
mode = SHUTTLE_CALL
|
||||
setTimer(callTime)
|
||||
enterTransit()
|
||||
return
|
||||
|
||||
mode = SHUTTLE_IDLE
|
||||
timer = 0
|
||||
destination = null
|
||||
|
||||
/obj/docking_port/mobile/proc/check_effects()
|
||||
if(!ripples.len)
|
||||
if((mode == SHUTTLE_CALL) || (mode == SHUTTLE_RECALL))
|
||||
if(timeLeft(1) <= SHUTTLE_RIPPLE_TIME)
|
||||
create_ripples(destination)
|
||||
|
||||
var/obj/docking_port/stationary/S0 = get_docked()
|
||||
if(areaInstance.parallax_movedir && istype(S0, /obj/docking_port/stationary/transit) && timeLeft(1) <= PARALLAX_LOOP_TIME)
|
||||
parallax_slowdown()
|
||||
|
||||
/obj/docking_port/mobile/proc/parallax_slowdown()
|
||||
areaInstance.parallax_movedir = FALSE
|
||||
if(assigned_transit && assigned_transit.assigned_area)
|
||||
assigned_transit.assigned_area.parallax_movedir = FALSE
|
||||
var/list/L0 = return_ordered_turfs(x, y, z, dir, areaInstance)
|
||||
for (var/thing in L0)
|
||||
var/turf/T = thing
|
||||
for (var/thing2 in T)
|
||||
var/atom/movable/AM = thing2
|
||||
if (length(AM.client_mobs_in_contents))
|
||||
AM.update_parallax_contents()
|
||||
|
||||
/obj/docking_port/mobile/proc/check_transit_zone()
|
||||
if(assigned_transit)
|
||||
return TRANSIT_READY
|
||||
else
|
||||
SSshuttle.request_transit_dock(src)
|
||||
|
||||
/obj/docking_port/mobile/proc/setTimer(wait)
|
||||
if(timer <= 0)
|
||||
timer = world.time
|
||||
timer += wait - timeLeft(1)
|
||||
timer = world.time + wait
|
||||
last_timer_length = wait
|
||||
|
||||
/obj/docking_port/mobile/proc/modTimer(multiple)
|
||||
var/time_remaining = timer - world.time
|
||||
if(time_remaining < 0 || !last_timer_length)
|
||||
return
|
||||
time_remaining *= multiple
|
||||
last_timer_length *= multiple
|
||||
setTimer(time_remaining)
|
||||
|
||||
/obj/docking_port/mobile/proc/invertTimer()
|
||||
if(!last_timer_length)
|
||||
return
|
||||
var/time_remaining = timer - world.time
|
||||
if(time_remaining > 0)
|
||||
var/time_passed = last_timer_length - time_remaining
|
||||
setTimer(time_passed)
|
||||
|
||||
//returns timeLeft
|
||||
/obj/docking_port/mobile/proc/timeLeft(divisor)
|
||||
if(divisor <= 0)
|
||||
divisor = 10
|
||||
|
||||
var/ds_remaining
|
||||
if(!timer)
|
||||
return round(callTime/divisor, 1)
|
||||
return max( round((timer+callTime-world.time)/divisor,1), 0 )
|
||||
ds_remaining = callTime
|
||||
else
|
||||
ds_remaining = max(0, timer - world.time)
|
||||
|
||||
. = round(ds_remaining / divisor, 1)
|
||||
|
||||
// returns 3-letter mode string, used by status screens and mob status panel
|
||||
/obj/docking_port/mobile/proc/getModeStr()
|
||||
switch(mode)
|
||||
if(SHUTTLE_IGNITING)
|
||||
return "IGN"
|
||||
if(SHUTTLE_RECALL)
|
||||
return "RCL"
|
||||
if(SHUTTLE_CALL)
|
||||
@@ -705,23 +695,3 @@
|
||||
dst = destination
|
||||
. += " towards [dst ? dst.name : "unknown location"] ([timeLeft(600)] minutes)"
|
||||
#undef DOCKING_PORT_HIGHLIGHT
|
||||
|
||||
|
||||
/turf/proc/copyTurf(turf/T)
|
||||
if(T.type != type)
|
||||
var/obj/O
|
||||
if(underlays.len) //we have underlays, which implies some sort of transparency, so we want to a snapshot of the previous turf as an underlay
|
||||
O = new()
|
||||
O.underlays.Add(T)
|
||||
T.ChangeTurf(type)
|
||||
if(underlays.len)
|
||||
T.underlays = O.underlays
|
||||
if(T.icon_state != icon_state)
|
||||
T.icon_state = icon_state
|
||||
if(T.icon != icon)
|
||||
T.icon = icon
|
||||
if(T.color != color)
|
||||
T.color = color
|
||||
if(T.dir != dir)
|
||||
T.setDir(dir)
|
||||
return T
|
||||
|
||||
@@ -57,7 +57,8 @@
|
||||
name = "wabbajack altar"
|
||||
desc = "Whether you're sleeping or waking, it's going to be \
|
||||
quite chaotic."
|
||||
health = 1000
|
||||
obj_integrity = 1000
|
||||
max_integrity = 1000
|
||||
verb_say = "chants"
|
||||
var/obj/machinery/power/emitter/energycannon/magical/our_statue
|
||||
var/list/mob/living/sleepers = list()
|
||||
@@ -94,12 +95,11 @@
|
||||
// New sleepers
|
||||
for(var/i in found - sleepers)
|
||||
var/mob/living/L = i
|
||||
L.color = "#800080"
|
||||
L.visible_message("<span class='revennotice'>A strange purple glow \
|
||||
wraps itself around [L] as they suddenly fall unconcious.</span>",
|
||||
L.add_atom_colour("#800080", TEMPORARY_COLOUR_PRIORITY)
|
||||
L.visible_message("<span class='revennotice'>A strange purple glow wraps itself around [L] as [L.p_they()] suddenly fall[L.p_s()] unconscious.</span>",
|
||||
"<span class='revendanger'>[desc]</span>")
|
||||
// Don't let them sit suround unconscious forever
|
||||
addtimer(src, "sleeper_dreams", 100, FALSE, L)
|
||||
addtimer(src, "sleeper_dreams", 100, TIMER_NORMAL, L)
|
||||
|
||||
// Existing sleepers
|
||||
for(var/i in found)
|
||||
@@ -109,7 +109,7 @@
|
||||
// Missing sleepers
|
||||
for(var/i in sleepers - found)
|
||||
var/mob/living/L = i
|
||||
L.color = initial(L.color)
|
||||
L.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#800080")
|
||||
L.visible_message("<span class='revennotice'>The glow from [L] fades \
|
||||
away.</span>")
|
||||
L.grab_ghost()
|
||||
@@ -185,9 +185,10 @@
|
||||
// with CENTCOM_BARSTAFF)
|
||||
|
||||
/obj/structure/table/wood/bar
|
||||
burn_state = LAVA_PROOF
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
flags = NODECONSTRUCT
|
||||
health = 1000
|
||||
obj_integrity = 1000
|
||||
max_integrity = 1000
|
||||
var/boot_dir = 1
|
||||
|
||||
/obj/structure/table/wood/bar/Crossed(atom/movable/AM)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
var/list/blacklisted_cargo_types = typecacheof(list(
|
||||
/mob/living,
|
||||
/obj/effect/blob,
|
||||
/obj/structure/blob,
|
||||
/obj/effect/rune,
|
||||
/obj/effect/spider/spiderling,
|
||||
/obj/structure/spider/spiderling,
|
||||
/obj/item/weapon/disk/nuclear,
|
||||
/obj/machinery/nuclearbomb,
|
||||
/obj/item/device/radio/beacon,
|
||||
@@ -10,6 +10,7 @@ var/list/blacklisted_cargo_types = typecacheof(list(
|
||||
/obj/machinery/teleport/station,
|
||||
/obj/machinery/teleport/hub,
|
||||
/obj/machinery/telepad,
|
||||
/obj/machinery/quantumpad,
|
||||
/obj/machinery/clonepod,
|
||||
/obj/effect/mob_spawn
|
||||
))
|
||||
@@ -20,7 +21,7 @@ var/list/blacklisted_cargo_types = typecacheof(list(
|
||||
callTime = 600
|
||||
|
||||
dir = WEST
|
||||
travelDir = 90
|
||||
port_angle = 90
|
||||
width = 12
|
||||
dwidth = 5
|
||||
height = 7
|
||||
@@ -44,8 +45,8 @@ var/list/blacklisted_cargo_types = typecacheof(list(
|
||||
var/turf/T = trf
|
||||
for(var/a in T.GetAllContents())
|
||||
if(is_type_in_typecache(a, blacklisted_cargo_types))
|
||||
return TRUE
|
||||
return FALSE
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/docking_port/mobile/supply/request()
|
||||
if(mode != SHUTTLE_IDLE)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
req_access = list(access_syndicate)
|
||||
shuttleId = "syndicate"
|
||||
possible_destinations = "syndicate_away;syndicate_z5;syndicate_ne;syndicate_nw;syndicate_n;syndicate_se;syndicate_sw;syndicate_s"
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/recall
|
||||
name = "syndicate shuttle recall terminal"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/obj/effect/landmark/transit
|
||||
name = "transit space marker"
|
||||
desc = "This indicates where transit space begins and ends."
|
||||
invisibility = FALSE
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "at_shield1"
|
||||
|
||||
/obj/effect/landmark/transit/New()
|
||||
. = ..()
|
||||
transit_markers += src
|
||||
|
||||
/obj/effect/landmark/transit/Destroy()
|
||||
transit_markers -= src
|
||||
. = ..()
|
||||
Reference in New Issue
Block a user