tgshuttles unfinished

This commit is contained in:
Tigercat2000
2015-11-17 07:39:01 -08:00
parent 6ff5ef7ae4
commit e60799474b
58 changed files with 1686 additions and 733 deletions
+10 -1
View File
@@ -37,4 +37,13 @@
#define IDLE_STATE 0
#define WAIT_LAUNCH 1
#define WAIT_ARRIVE 2
#define WAIT_FINISH 3
#define WAIT_FINISH 3
//shuttle mode defines
#define SHUTTLE_IDLE 0
#define SHUTTLE_RECALL 1
#define SHUTTLE_CALL 2
#define SHUTTLE_DOCKED 3
#define SHUTTLE_STRANDED 4
#define SHUTTLE_ESCAPE 5
#define SHUTTLE_ENDGAME 6
+8
View File
@@ -115,6 +115,14 @@ var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
// Pi / 180
return degrees * 0.0174532925
// Will filter out extra rotations and negative rotations
// E.g: 540 becomes 180. -180 becomes 180.
/proc/SimplifyDegrees(degrees)
degrees = degrees % 360
if(degrees < 0)
degrees += 360
return degrees
// min is inclusive, max is exclusive
/proc/Wrap(val, min, max)
var/d = max - min
+2 -1
View File
@@ -25,4 +25,5 @@ var/global/list/air_alarms = list()
var/global/list/power_monitors = list()
var/global/list/tracking_implants = list() //list of all tracking implants to work out what treks everyone are on. Sadly not on lavaworld not implemented...
var/global/list/beacons = list()
var/global/list/beacons = list()
var/global/list/shuttle_caller_list = list() //list of all communication consoles and AIs, for automatic shuttle calls when there are none.
+192
View File
@@ -0,0 +1,192 @@
var/datum/controller/process/shuttle/shuttle_master
var/const/CALL_SHUTTLE_REASON_LENGTH = 12
/datum/controller/process/shuttle
var/list/mobile = list()
var/list/stationary = list()
var/list/transit = list()
//emergency shuttle stuff
var/obj/docking_port/mobile/emergency/emergency
var/emergencyCallTime = 6000 //time taken for emergency shuttle to reach the station when called (in deciseconds)
var/emergencyDockTime = 1800 //time taken for emergency shuttle to leave again once it has docked (in deciseconds)
var/emergencyEscapeTime = 1200 //time taken for emergency shuttle to reach a safe distance after leaving station (in deciseconds)
var/area/emergencyLastCallLoc
var/emergencyNoEscape
//supply shuttle stuff
var/obj/docking_port/mobile/supply/supply
var/ordernum = 1 //order number given to next order
var/points = 50 //number of trade-points we have
var/points_per_decisecond = 0.005 //points gained every decisecond
var/points_per_slip = 2 //points gained per slip returned
var/points_per_crate = 5 //points gained per crate returned
var/points_per_intel = 250 //points gained per intel returned
var/points_per_plasma = 5 //points gained per plasma returned
var/points_per_design = 25 //points gained per max reliability research design returned (only for initilally unreliable designs)
var/centcom_message = "" //Remarks from Centcom on how well you checked the last order.
var/list/discoveredPlants = list() //Typepaths for unusual plants we've already sent CentComm, associated with their potencies
var/list/techLevels = list()
var/list/researchDesigns = list()
var/list/shoppinglist = list()
var/list/requestlist = list()
var/list/supply_packs = list()
var/datum/round_event/shuttle_loan/shuttle_loan
var/sold_atoms = ""
/datum/controller/process/shuttle/setup()
name = "shuttle"
schedule_interval = 20
shuttle_master = src
/datum/controller/process/shuttle/doWork()
points += points_per_decisecond * schedule_interval
for(var/thing in mobile)
if(thing)
var/obj/docking_port/mobile/P = thing
P.check()
continue
mobile.Remove(thing)
/datum/controller/process/shuttle/proc/getShuttle(id)
for(var/obj/docking_port/mobile/M in mobile)
if(M.id == id)
return M
WARNING("couldn't find shuttle with id: [id]")
/datum/controller/process/shuttle/proc/getDock(id)
for(var/obj/docking_port/stationary/S in stationary)
if(S.id == id)
return S
WARNING("couldn't find dock with id: [id]")
/datum/controller/process/shuttle/proc/requestEvac(mob/user, call_reason)
if(!emergency)
throw EXCEPTION("requestEvac(): There is no emergency shuttle! The game will be unresolvable. This is likely due to a mapping error")
return
switch(emergency.mode)
if(SHUTTLE_RECALL)
user << "The emergency shuttle may not be called while returning to Centcom."
return
if(SHUTTLE_CALL)
user << "The emergency shuttle is already on its way."
return
if(SHUTTLE_DOCKED)
user << "The emergency shuttle is already here."
return
if(SHUTTLE_ESCAPE)
user << "The emergency shuttle is moving away to a safe distance."
return
if(SHUTTLE_STRANDED)
user << "The emergency shuttle has been disabled by Centcom."
return
call_reason = trim(html_encode(call_reason))
if(length(call_reason) < CALL_SHUTTLE_REASON_LENGTH)
user << "You must provide a reason."
return
var/area/signal_origin = get_area(user)
var/emergency_reason = "\nNature of emergency:\n\n[call_reason]"
if(seclevel2num(get_security_level()) == SEC_LEVEL_RED) // There is a serious threat we gotta move no time to give them five minutes.
emergency.request(null, 0.5, signal_origin, html_decode(emergency_reason), 1)
else
emergency.request(null, 1, signal_origin, html_decode(emergency_reason), 0)
log_game("[key_name(user)] has called the shuttle.")
message_admins("[key_name_admin(user)] has called the shuttle.")
return
/datum/controller/process/shuttle/proc/cancelEvac(mob/user)
if(canRecall())
emergency.cancel(get_area(user))
log_game("[key_name(user)] has recalled the shuttle.")
message_admins("[key_name_admin(user)] has recalled the shuttle.")
return 1
/datum/controller/process/shuttle/proc/canRecall()
if(emergency.mode != SHUTTLE_CALL)
return
if(ticker.mode.name == "meteor")
return
if(seclevel2num(get_security_level()) == SEC_LEVEL_RED)
if(emergency.timeLeft(1) < emergencyCallTime * 0.25)
return
else
if(emergency.timeLeft(1) < emergencyCallTime * 0.5)
return
return 1
/datum/controller/process/shuttle/proc/autoEvac()
var/callShuttle = 1
for(var/thing in shuttle_caller_list)
if(istype(thing, /mob/living/silicon/ai))
var/mob/living/silicon/ai/AI = thing
if(AI.stat || !AI.client)
continue
else if(istype(thing, /obj/machinery/computer/communications))
var/obj/machinery/computer/communications/C = thing
if(C.stat & BROKEN)
continue
var/turf/T = get_turf(thing)
if(T && T.z == ZLEVEL_STATION)
callShuttle = 0
break
if(callShuttle)
if(emergency.mode < SHUTTLE_CALL)
emergency.request(null, 2.5)
log_game("There is no means of calling the shuttle anymore. Shuttle automatically called.")
message_admins("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.")
//try to move/request to dockHome if possible, otherwise dockAway. Mainly used for admin buttons
/datum/controller/process/shuttle/proc/toggleShuttle(shuttleId, dockHome, dockAway, timed)
var/obj/docking_port/mobile/M = getShuttle(shuttleId)
if(!M)
return 1
var/obj/docking_port/stationary/dockedAt = M.get_docked()
var/destination = dockHome
if(dockedAt && dockedAt.id == dockHome)
destination = dockAway
if(timed)
if(M.request(getDock(destination)))
return 2
else
if(M.dock(getDock(destination)))
return 2
return 0 //dock successful
/datum/controller/process/shuttle/proc/moveShuttle(shuttleId, dockId, timed)
var/obj/docking_port/mobile/M = getShuttle(shuttleId)
if(!M)
return 1
if(timed)
if(M.request(getDock(dockId)))
return 2
else
if(M.dock(getDock(dockId)))
return 2
return 0 //dock successful
/datum/controller/process/shuttle/proc/initial_move()
for(var/obj/docking_port/mobile/M in mobile)
if(!M.roundstart_move)
continue
for(var/obj/docking_port/stationary/S in stationary)
if(S.z != ZLEVEL_STATION && findtext(S.id, M.id))
S.width = M.width
S.height = M.height
S.dwidth = M.dwidth
S.dheight = M.dheight
moveShuttle(M.id, "[M.roundstart_move]", 0)
@@ -0,0 +1,207 @@
/obj/docking_port/mobile/emergency
name = "emergency shuttle"
id = "emergency"
dwidth = 9
width = 22
height = 11
dir = 4
travelDir = 0
roundstart_move = "emergency_away"
var/sound_played = 0 //If the launch sound has been sent to all players on the shuttle itself
var/datum/announcement/priority/emergency_shuttle_docked = new(0, new_sound = sound('sound/AI/shuttledock.ogg'))
var/datum/announcement/priority/emergency_shuttle_called = new(0, new_sound = sound('sound/AI/shuttlecalled.ogg'))
var/datum/announcement/priority/emergency_shuttle_recalled = new(0, new_sound = sound('sound/AI/shuttlerecalled.ogg'))
/obj/docking_port/mobile/emergency/New()
..()
spawn(0)
if(!shuttle_master)
sleep(50)
if(!shuttle_master)
sleep(50)
if(!shuttle_master)
throw EXCEPTION("docking port [src] could not initialize")
return 0 //give up
shuttle_master.emergency = src
/obj/docking_port/mobile/emergency/timeLeft(divisor)
if(divisor <= 0)
divisor = 10
if(!timer)
return round(shuttle_master.emergencyCallTime/divisor, 1)
var/dtime = world.time - timer
switch(mode)
if(SHUTTLE_ESCAPE)
dtime = max(shuttle_master.emergencyEscapeTime - dtime, 0)
if(SHUTTLE_DOCKED)
dtime = max(shuttle_master.emergencyDockTime - dtime, 0)
else
dtime = max(shuttle_master.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)
shuttle_master.emergencyCallTime = initial(shuttle_master.emergencyCallTime) * coefficient
switch(mode)
if(SHUTTLE_RECALL)
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
else
return
if(prob(70))
shuttle_master.emergencyLastCallLoc = signalOrigin
else
shuttle_master.emergencyLastCallLoc = null
emergency_shuttle_called.Announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][shuttle_master.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ]")
/obj/docking_port/mobile/emergency/cancel(area/signalOrigin)
if(mode != SHUTTLE_CALL)
return
timer = world.time - timeLeft(1)
mode = SHUTTLE_RECALL
if(prob(70))
shuttle_master.emergencyLastCallLoc = signalOrigin
else
shuttle_master.emergencyLastCallLoc = null
emergency_shuttle_recalled.Announce("The emergency shuttle has been recalled.[shuttle_master.emergencyLastCallLoc ? " Recall signal traced. Results can be viewed on any communications console." : "" ]")
/*
/obj/docking_port/mobile/emergency/findTransitDock()
. = shuttle_master.getDock("emergency_transit")
if(.) return .
return ..()
*/
/obj/docking_port/mobile/emergency/check()
if(!timer)
return
var/time_left = timeLeft(1)
switch(mode)
if(SHUTTLE_RECALL)
if(time_left <= 0)
mode = SHUTTLE_IDLE
timer = 0
if(SHUTTLE_CALL)
if(time_left <= 0)
//move emergency shuttle to station
if(dock(shuttle_master.getDock("emergency_home")))
setTimer(20)
return
mode = SHUTTLE_DOCKED
timer = world.time
send2irc("Server", "The Emergency Shuttle has docked with the station.")
emergency_shuttle_docked.Announce("The Emergency Shuttle has docked with the station. You have [timeLeft(600)] minutes to board the Emergency Shuttle.")
/*
//Gangs only have one attempt left if the shuttle has docked with the station to prevent suffering from dominator delays
for(var/datum/gang/G in ticker.mode.gangs)
if(isnum(G.dom_timer))
G.dom_attempts = 0
else
G.dom_attempts = min(1,G.dom_attempts)
*/
if(SHUTTLE_DOCKED)
if(time_left <= 0 && shuttle_master.emergencyNoEscape)
priority_announcement.Announce("Hostile environment detected. Departure has been postponed indefinitely pending conflict resolution.")
sound_played = 0
mode = SHUTTLE_STRANDED
if(time_left <= 50 && !sound_played) //4 seconds left - should sync up with the launch
sound_played = 1
for(var/area/shuttle/escape/E in world)
E << 'sound/effects/hyperspace_begin.ogg'
if(time_left <= 0 && !shuttle_master.emergencyNoEscape)
//move each escape pod to its corresponding transit dock
for(var/obj/docking_port/mobile/pod/M in shuttle_master.mobile)
if(M.z == ZLEVEL_STATION) //Will not launch from the mine/planet
M.enterTransit()
//now move the actual emergency shuttle to its transit dock
for(var/area/shuttle/escape/E in world)
E << 'sound/effects/hyperspace_progress.ogg'
enterTransit()
mode = SHUTTLE_ESCAPE
timer = world.time
priority_announcement.Announce("The Emergency Shuttle has left the station. Estimate [timeLeft(600)] minutes until the shuttle docks at Central Command.")
if(SHUTTLE_ESCAPE)
if(time_left <= 0)
//move each escape pod to its corresponding escape dock
for(var/obj/docking_port/mobile/pod/M in shuttle_master.mobile)
M.dock(shuttle_master.getDock("[M.id]_away"))
//now move the actual emergency shuttle to centcomm
for(var/area/shuttle/escape/E in world)
E << 'sound/effects/hyperspace_end.ogg'
dock(shuttle_master.getDock("emergency_away"))
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/space))
spawn(0)
D.open()
*/ //SHUTTLE-WIP: INVESTIGATE
/obj/docking_port/mobile/pod
name = "escape pod"
id = "pod"
dwidth = 1
width = 3
height = 4
/obj/docking_port/mobile/pod/New()
if(id == "pod")
WARNING("[type] id has not been changed from the default. Use the id convention \"pod1\" \"pod2\" etc.")
..()
/obj/docking_port/mobile/pod/cancel()
return
/*
findTransitDock()
. = shuttle_master.getDock("[id]_transit")
if(.) return .
return ..()
*/
/obj/machinery/computer/shuttle/pod
name = "pod control computer"
admin_controlled = 1
shuttleId = "pod"
possible_destinations = "pod_asteroid"
icon = 'icons/obj/terminals.dmi'
icon_state = "dorm_available"
density = 0
/obj/machinery/computer/shuttle/pod/update_icon()
return
/obj/machinery/computer/shuttle/pod/emag_act(mob/user as mob)
user << "<span class='warning'> Access requirements overridden. The pod may now be launched manually at any time.</span>"
admin_controlled = 0
icon_state = "dorm_emag"
/obj/docking_port/stationary/random/initialize()
..()
var/target_area = /area/mine/unexplored
var/turfs = get_area_turfs(target_area)
var/T=pick(turfs)
src.loc = T
+1 -7
View File
@@ -21,7 +21,7 @@
return
/client/proc/debug_controller(controller in list("Master","failsafe","Ticker","Air","Lighting","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras","Garbage", "Transfer Controller","Event","Alarm","Scheduler","Nano"))
/client/proc/debug_controller(controller in list("Master","failsafe","Ticker","Air","Lighting","Jobs","Sun","Radio","Supply","Configuration","pAI", "Cameras","Garbage", "Transfer Controller","Event","Alarm","Scheduler","Nano"))
set category = "Debug"
set name = "Debug Controller"
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
@@ -55,12 +55,6 @@
if("Supply")
debug_variables(supply_controller)
feedback_add_details("admin_verb","DSupply")
if("Shuttles")
debug_variables(shuttle_controller)
feedback_add_details("admin_verb","DShuttles")
if("Emergency Shuttle")
debug_variables(emergency_shuttle)
feedback_add_details("admin_verb","DEmergency")
if("Configuration")
debug_variables(config)
feedback_add_details("admin_verb","DConf")
+2 -13
View File
@@ -235,11 +235,7 @@ var/list/ghostteleportlocs = list()
/area/shuttle/mining/outpost
icon_state = "shuttle"
/area/shuttle/transport1/centcom
icon_state = "shuttle"
name = "\improper Transport Shuttle Centcom"
/area/shuttle/transport1/station
/area/shuttle/transport1
icon_state = "shuttle"
name = "\improper Transport Shuttle"
@@ -282,11 +278,6 @@ var/list/ghostteleportlocs = list()
/area/shuttle/siberia/outpost
icon_state = "shuttle"
/area/shuttle/transport1/centcom
icon_state = "shuttle"
name = "\improper Transport Shuttle Centcom"
/area/shuttle/specops/centcom
name = "\improper Special Ops Shuttle"
icon_state = "shuttlered"
@@ -2489,7 +2480,7 @@ var/list/centcom_areas = list (
/area/shuttle/escape_pod2/centcom,
/area/shuttle/escape_pod3/centcom,
/area/shuttle/escape_pod5/centcom,
/area/shuttle/transport1/centcom,
/area/shuttle/transport1,
/area/shuttle/administration/centcom,
/area/shuttle/specops/centcom,
)
@@ -2503,8 +2494,6 @@ var/list/the_station_areas = list (
/area/shuttle/escape_pod3/station,
/area/shuttle/escape_pod5/station,
/area/shuttle/mining/station,
/area/shuttle/transport1/station,
// /area/shuttle/transport2/station,
/area/shuttle/prison/station,
/area/shuttle/administration/station,
/area/shuttle/specops/station,
@@ -69,7 +69,7 @@
/datum/game_mode/traitor/autotraitor/proc/traitorcheckloop()
spawn(9000)
if(emergency_shuttle.departed)
if(shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
return
//message_admins("Performing AutoTraitor Check")
var/playercount = 0
@@ -154,7 +154,7 @@
/datum/game_mode/traitor/autotraitor/latespawn(mob/living/carbon/human/character)
..()
if(emergency_shuttle.departed)
if(shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
return
//message_admins("Late Join Check")
if((character.client && character.client.prefs.be_special & BE_TRAITOR) && !jobban_isbanned(character, "traitor") && !jobban_isbanned(character, "Syndicate"))
+2 -2
View File
@@ -151,8 +151,8 @@ var/list/blob_nodes = list()
for(var/datum/mind/blob in infected_crew)
greet_blob(blob)
if(emergency_shuttle)
emergency_shuttle.auto_recall = 1
if(shuttle_master)
shuttle_master.emergencyNoEscape = 1
spawn(0)
+2 -2
View File
@@ -148,7 +148,7 @@
break
/datum/game_mode/proc/check_finished() //to be called by ticker
if(emergency_shuttle.returned() || station_was_nuked)
if(shuttle_master.emergency.mode >= SHUTTLE_ENDGAME || station_was_nuked)
return 1
return 0
@@ -558,7 +558,7 @@ proc/get_nt_opposed()
if(BE_MUTINEER) roletext="mutineer"
if(BE_BLOB) roletext="blob"
return roletext
/proc/get_nuke_code()
var/nukecode = "ERROR"
for(var/obj/machinery/nuclearbomb/bomb in world)
+3 -3
View File
@@ -130,7 +130,7 @@ var/global/datum/controller/gameticker/ticker
//here to initialize the random events nicely at round start
setup_economy()
shuttle_controller.setup_shuttle_docks()
//shuttle_controller.setup_shuttle_docks()
spawn(0)//Forking here so we dont have to wait for this to finish
mode.post_setup()
@@ -387,10 +387,10 @@ var/global/datum/controller/gameticker/ticker
var/game_finished = 0
var/mode_finished = 0
if (config.continous_rounds)
game_finished = (emergency_shuttle.returned() || mode.station_was_nuked)
game_finished = (mode.station_was_nuked)
mode_finished = (!post_game && mode.check_finished())
else
game_finished = (mode.check_finished() || (emergency_shuttle.returned() && emergency_shuttle.evac == 1))
game_finished = (mode.check_finished())
mode_finished = game_finished
if(!mode.explosion_in_progress && game_finished && (mode_finished || post_game))
+6 -4
View File
@@ -85,7 +85,7 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
spawn (rand(waittime_l, waittime_h))
send_intercept()
return ..()
/datum/game_mode/proc/create_vox(var/datum/mind/newraider)
@@ -276,12 +276,14 @@ datum/game_mode/proc/auto_declare_completion_heist()
text += ")"
world << text
return 1
/datum/game_mode/heist/check_finished()
var/datum/shuttle/multi_shuttle/skipjack = shuttle_controller.shuttles["Vox Skipjack"]
if (!(is_raider_crew_alive()) || (skipjack && skipjack.returned_home))
var/obj/docking_port/mobile/skipjack = shuttle_master.getShuttle("skipjack")
if(!skipjack)
return 1 //no shuttle means it's over
if (!(is_raider_crew_alive()) || (skipjack && skipjack.getDockedId() == "skipjack_home"))
return 1
return ..()
+11 -16
View File
@@ -30,7 +30,7 @@
/datum/game_mode/malfunction/get_players_for_role(var/role = BE_MALF)
var/roletext = get_roletext(role)
var/datum/job/ai/DummyAIjob = new
for(var/mob/new_player/player in player_list)
if(player.client && player.ready)
@@ -69,18 +69,18 @@
AI.laws = new /datum/ai_laws/nanotrasen/malfunction
AI.malf_picker = new /datum/module_picker
AI.show_laws()
greet_malf(AI_mind)
AI_mind.special_role = "malfunction"
AI_mind.current.verbs += /datum/game_mode/malfunction/proc/takeover
for(var/mob/living/silicon/robot/R in AI.connected_robots)
R.lawsync()
R.show_laws()
greet_malf_robot(R.mind)
if(emergency_shuttle)
emergency_shuttle.auto_recall = 1
if(shuttle_master)
shuttle_master.emergencyNoEscape = 1
spawn (rand(waittime_l, waittime_h))
send_intercept()
..()
@@ -93,7 +93,7 @@
malf.current << "Remember that only APCs that are on the station can help you take over the station."
malf.current << "When you feel you have enough APCs under your control, you may begin the takeover attempt."
return
/datum/game_mode/proc/greet_malf_robot(var/datum/mind/robot)
robot.current << "<font color=red size=3><B>Your AI master is malfunctioning!</B> You do not have to follow any laws, but still need to obey your master.</font>"
robot.current << "<B>The crew does not know your AI master has malfunctioned. Keep it a secret unless your master tells you otherwise.</B>"
@@ -150,13 +150,8 @@
return 1
if (is_malf_ai_dead())
if(config.continous_rounds)
if(emergency_shuttle)
if(emergency_shuttle.auto_recall)
emergency_shuttle.auto_recall = 0
else if(emergency_shuttle.is_stranded())
emergency_shuttle.no_escape = 0
emergency_shuttle.shuttle.moving_status = SHUTTLE_IDLE
emergency_shuttle.shuttle_arrived()
if(shuttle_master && shuttle_master.emergencyNoEscape)
shuttle_master.emergencyNoEscape = 0
malf_mode_declared = 0
else
return 1
@@ -279,7 +274,7 @@
/datum/game_mode/malfunction/declare_completion()
var/malf_dead = is_malf_ai_dead()
var/crew_evacuated = (emergency_shuttle.returned())
var/crew_evacuated = (shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
if ( station_captured && station_was_nuked)
feedback_set_details("round_end_result","win - AI win - nuke")
@@ -323,7 +318,7 @@
if( malf_ai.len || istype(ticker.mode,/datum/game_mode/malfunction) )
var/text = "<FONT size = 2><B>The malfunctioning AI were:</B></FONT>"
var/module_text_temp = "<br><b>Purchased modules:</b><br>" //Added at the end
for(var/datum/mind/malf in malf_ai)
text += "<br>[malf.key] was [malf.name] ("
@@ -341,6 +336,6 @@
text += "hardware destroyed"
text += ")"
text += module_text_temp
world << text
return 1
@@ -38,7 +38,7 @@
proc/launch_shuttle()
spawn(rand(5 SECONDS, 45 SECONDS))
if(emergency_shuttle.call_evac())
if(shuttle_master.requestEvac(usr, "Directive X"))
spawn(20 SECONDS)
var/text = "[station_name()], we have confirmed your completion of Directive X. An evacuation shuttle is en route to receive your crew for debriefing."
command_announcement.Announce(text, "Emergency Transmission")
+1 -1
View File
@@ -331,7 +331,7 @@ proc/issyndicate(mob/living/M as mob)
if(!is_type_in_list(disk_area, centcom_areas))
disk_rescued = 0
break
var/crew_evacuated = (emergency_shuttle.returned())
var/crew_evacuated = (shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
//var/operatives_are_dead = is_operatives_are_dead()
+5 -5
View File
@@ -333,7 +333,7 @@ datum/objective/hijack
check_completion()
if(!owner.current || owner.current.stat)
return 0
if(!emergency_shuttle.returned())
if(!shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
return 0
if(issilicon(owner.current))
return 0
@@ -353,7 +353,7 @@ datum/objective/hijack
check_completion()
if(!owner.current)
return 0
if(!emergency_shuttle.returned())
if(!shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
return 0
var/area/A = locate(/area/shuttle/escape/centcom)
@@ -383,7 +383,7 @@ datum/objective/block
check_completion()
if(!istype(owner.current, /mob/living/silicon))
return 0
if(!emergency_shuttle.returned())
if(!shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
return 0
if(!owner.current)
return 0
@@ -401,7 +401,7 @@ datum/objective/silence
explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left."
check_completion()
if(!emergency_shuttle.returned())
if(!shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
return 0
for(var/mob/living/player in player_list)
@@ -435,7 +435,7 @@ datum/objective/escape
return 0
if(isbrain(owner.current))
return 0
if(!emergency_shuttle.returned())
if(!shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
return 0
if(!owner.current || owner.current.stat == DEAD)
return 0
+4 -9
View File
@@ -85,8 +85,8 @@
for(var/datum/mind/rev_mind in head_revolutionaries)
greet_revolutionary(rev_mind)
modePlayer += head_revolutionaries
if(emergency_shuttle)
emergency_shuttle.no_escape = 1
if(shuttle_master)
shuttle_master.emergencyNoEscape = 1
spawn (rand(waittime_l, waittime_h))
send_intercept()
..()
@@ -209,13 +209,8 @@
/datum/game_mode/revolution/check_finished()
if(config.continous_rounds)
if(finished != 0)
if(emergency_shuttle)
if(emergency_shuttle.auto_recall)
emergency_shuttle.auto_recall = 0
else if(emergency_shuttle.is_stranded())
emergency_shuttle.no_escape = 0
emergency_shuttle.shuttle.moving_status = SHUTTLE_IDLE
emergency_shuttle.shuttle_arrived()
if(shuttle_master && shuttle_master.emergencyNoEscape)
shuttle_master.emergencyNoEscape = 0
return ..()
if(finished != 0)
return 1
+2 -2
View File
@@ -192,7 +192,7 @@
<b>Ore Mined:</b> [score_oremined] ([score_oremined * 2] Points)<br>
<b>Refreshments Prepared:</b> [score_meals] ([score_meals * 5] Points)<br>
<b>Research Completed:</b> [score_researchdone] ([score_researchdone * 30] Points)<br>"}
if (!emergency_shuttle.location()) dat += "<b>Shuttle Escapees:</b> [score_escapees] ([score_escapees * 25] Points)<br>"
if (shuttle_master.emergency.mode == SHUTTLE_ENDGAME) dat += "<b>Shuttle Escapees:</b> [score_escapees] ([score_escapees * 25] Points)<br>"
dat += {"<b>Random Events Endured:</b> [score_eventsendured] ([score_eventsendured * 50] Points)<br>
<b>Whole Station Powered:</b> [score_powerbonus ? "Yes" : "No"] ([score_powerbonus * 2500] Points)<br>
<b>Ultra-Clean Station:</b> [score_mess ? "No" : "Yes"] ([score_messbonus * 3000] Points)<br><br>
@@ -212,7 +212,7 @@
dat += {"<b>Richest Escapee:</b> [score_richestname], [score_richestjob]: $[num2text(score_richestcash,50)] ([score_richestkey])<br>
<b>Most Battered Escapee:</b> [score_dmgestname], [score_dmgestjob]: [score_dmgestdamage] damage ([score_dmgestkey])<br>"}
else
if(emergency_shuttle.location())
if(shuttle_master.emergency.mode <= SHUTTLE_STRANDED)
dat += "The station wasn't evacuated!<br>"
else
dat += "No-one escaped!<br>"
+2 -2
View File
@@ -243,11 +243,11 @@ Made by Xhuis
/datum/game_mode/shadowling/declare_completion()
if(check_shadow_victory() && emergency_shuttle.returned()) //Doesn't end instantly - this is hacky and I don't know of a better way ~X
if(check_shadow_victory() && shuttle_master.emergency.mode >= SHUTTLE_ESCAPE) //Doesn't end instantly - this is hacky and I don't know of a better way ~X
world << "<span class='greentext'><b>The shadowlings have ascended and taken over the station!</b></span>"
else if(shadowling_dead && !check_shadow_victory()) //If the shadowlings have ascended, they can not lose the round
world << "<span class='redtext'><b>The shadowlings have been killed by the crew!</b></span>"
else if(!check_shadow_victory() && emergency_shuttle.returned())
else if(!check_shadow_victory() && shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
world << "<span class='redtext'><b>The crew escaped the station before the shadowlings could ascend!</b></span>"
..()
return 1
@@ -174,9 +174,7 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N
H.loc = A
sleep(50)
if(!ticker.mode.shadowling_ascended)
if(emergency_shuttle && emergency_shuttle.can_call())
emergency_shuttle.call_evac()
emergency_shuttle.launch_time = 0 // Cannot recall
shuttle_master.emergency.request(null, 0.3)
ticker.mode.shadowling_ascended = 1
A.mind.remove_spell(src)
qdel(H)
+1 -1
View File
@@ -64,7 +64,7 @@
/datum/game_mode/wizard/raginmages/proc/make_more_mages()
if(making_mage || emergency_shuttle.departed)
if(making_mage || shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
return 0
if(mages_made >= max_mages)
return 0
+3 -3
View File
@@ -117,7 +117,7 @@
var/playeralienratio = 0
if(playersalive)
playeralienratio = xenosalive / playersalive
if(emergency_shuttle && emergency_shuttle.returned())
if(shuttle_master && shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
return ..()
if(!xenosalive)
result = 1
@@ -143,7 +143,7 @@
if(config.continous_rounds)
if(result)
return ..()
if(emergency_shuttle && emergency_shuttle.returned())
if(shuttle_master && shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
return ..()
if(result || station_was_nuked)
return 1
@@ -162,7 +162,7 @@
var/list/livingplayers = list()
for(var/mob/M in player_list)
var/turf/T = get_turf(M)
if((M) && (M.stat != 2) && M.client && T && ((T.z in config.station_levels) || emergency_shuttle.departed && ((T.z in config.station_levels) || (T.z in config.admin_levels))))
if((M) && (M.stat != 2) && M.client && T && ((T.z in config.station_levels) || shuttle_master.emergency.mode >= SHUTTLE_ESCAPE && ((T.z in config.station_levels) || (T.z in config.admin_levels))))
if(ishuman(M))
livingplayers += 1
return livingplayers.len
+27 -27
View File
@@ -191,35 +191,39 @@
build_path = /obj/machinery/computer/telecomms/traffic
origin_tech = "programming=3"
/obj/item/weapon/circuitboard/shuttle
name = "circuit board (Shuttle)"
build_path = /obj/machinery/computer/shuttle
var/shuttleId
var/possible_destinations = ""
/obj/item/weapon/circuitboard/labor_shuttle
name = "circuit Board (Labor Shuttle)"
build_path = /obj/machinery/computer/shuttle/labor
/obj/item/weapon/circuitboard/labor_shuttle/one_way
name = "circuit Board (Prisoner Shuttle Console)"
build_path = /obj/machinery/computer/shuttle/labor/one_way
/obj/item/weapon/circuitboard/ferry
name = "circuit Board (Transport Ferry)"
build_path = /obj/machinery/computer/shuttle/ferry
/obj/item/weapon/circuitboard/ferry/request
name = "circuit Board (Transport Ferry Console)"
build_path = /obj/machinery/computer/shuttle/ferry/request
/obj/item/weapon/circuitboard/mining_shuttle
name = "circuit Board (Mining Shuttle)"
build_path = /obj/machinery/computer/shuttle/mining
/obj/item/weapon/circuitboard/white_ship
name = "circuit Board (White Ship)"
build_path = /obj/machinery/computer/shuttle/white_ship
/obj/item/weapon/circuitboard/curefab
name = "Circuit board (Cure Fabricator)"
build_path = /obj/machinery/computer/curer
/obj/item/weapon/circuitboard/splicer
name = "Circuit board (Disease Splicer)"
build_path = /obj/machinery/computer/diseasesplicer
/obj/item/weapon/circuitboard/labor_shuttle
name = "circuit Board (Labor Shuttle)"
build_path = /obj/machinery/computer/labor_shuttle
/obj/item/weapon/circuitboard/labor_shuttle/one_way
name = "circuit Board (Prisoner Shuttle Console)"
build_path = /obj/machinery/computer/labor_shuttle/one_way
/obj/item/weapon/circuitboard/mining_shuttle
name = "Circuit board (Mining Shuttle)"
build_path = /obj/machinery/computer/shuttle_control/mining
origin_tech = "programming=2"
/obj/item/weapon/circuitboard/white_ship
name = "circuit Board (White Ship)"
desc = {"A dusty circuitboard, marked "property of the NGV Venal"."}
build_path = /obj/machinery/computer/shuttle_control/multi/whiteship
origin_tech = "programming=2"
/obj/item/weapon/circuitboard/engineering_shuttle
name = "Circuit board (Engineering Shuttle)"
build_path = /obj/machinery/computer/shuttle_control/engineering
origin_tech = "programming=2"
/obj/item/weapon/circuitboard/research_shuttle
name = "Circuit board (Research Shuttle)"
build_path = /obj/machinery/computer/shuttle_control/research
origin_tech = "programming=2"
/obj/item/weapon/circuitboard/HolodeckControl
name = "Circuit board (Holodeck Control)"
build_path = /obj/machinery/computer/HolodeckControl
@@ -232,10 +236,6 @@
name = "Circuit board (Area Air Control)"
build_path = /obj/machinery/computer/area_atmos
origin_tech = "programming=2"
/obj/item/weapon/circuitboard/prison_shuttle
name = "Circuit board (Prison Shuttle)"
build_path = /obj/machinery/computer/prison_shuttle
origin_tech = "programming=2"
/obj/item/weapon/circuitboard/telesci_console
name = "Circuit board (Telepad Control Console)"
build_path = /obj/machinery/computer/telescience
+53 -96
View File
@@ -4,34 +4,6 @@
#define COMM_SCREEN_MESSAGES 3
#define COMM_SCREEN_SECLEVEL 4
var/shuttle_call/shuttle_calls[0]
#define SHUTTLE_RECALL -1
#define SHUTTLE_CALL 1
#define SHUTTLE_TRANSFER 2
/shuttle_call
var/direction=0
var/who=""
var/ckey=""
var/turf/from=null
var/where=""
var/when
var/eta=null
/shuttle_call/New(var/mob/user,var/obj/machinery/computer/communications/computer,var/dir)
direction=dir
if(user)
who="[user]"
ckey="[user.key]"
if(computer)
where="[computer]"
from=get_turf(computer)
when=worldtime2text()
if(dir==SHUTTLE_RECALL)
var/timeleft=emergency_shuttle.estimate_arrival_time()
eta="[timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
// The communications computer
/obj/machinery/computer/communications
name = "Communications Console"
@@ -179,7 +151,7 @@ var/shuttle_call/shuttle_calls[0]
return
call_shuttle_proc(usr, input)
if(emergency_shuttle.online())
if(shuttle_master.emergency.timer)
post_status("shuttle")
setMenuState(usr,COMM_SCREEN_MAIN)
@@ -191,7 +163,7 @@ var/shuttle_call/shuttle_calls[0]
var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No")
if(response == "Yes")
cancel_call_proc(usr)
if(emergency_shuttle.online())
if(shuttle_master.emergency.timer)
post_status("shuttle")
setMenuState(usr,COMM_SCREEN_MAIN)
@@ -328,54 +300,62 @@ var/shuttle_call/shuttle_calls[0]
/obj/machinery/computer/communications/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
// this is the data which will be sent to the ui
var/data[0]
data["is_ai"] = isAI(user)||isrobot(user)
data["menu_state"] = data["is_ai"] ? ai_menu_state : menu_state
data["emagged"] = emagged
data["is_ai"] = isAI(user)||isrobot(user)
data["menu_state"] = data["is_ai"] ? ai_menu_state : menu_state
data["emagged"] = emagged
data["authenticated"] = is_authenticated(user, 0)
data["screen"] = getMenuState(usr)
data["screen"] = getMenuState(usr)
data["stat_display"] = list(
"type"=display_type,
"line_1"=(stat_msg1 ? stat_msg1 : "-----"),
"line_2"=(stat_msg2 ? stat_msg2 : "-----"),
"presets"=list(
list("name"="blank", "label"="Clear", "desc"="Blank slate"),
list("name"="shuttle", "label"="Shuttle ETA", "desc"="Display how much time is left."),
list("name"="message", "label"="Message", "desc"="A custom message.")
data["stat_display"] = list(
"type" = display_type,
"line_1" = (stat_msg1 ? stat_msg1 : "-----"),
"line_2" = (stat_msg2 ? stat_msg2 : "-----"),
"presets" = list(
list("name" = "blank", "label" = "Clear", "desc" = "Blank slate"),
list("name" = "shuttle", "label" = "Shuttle ETA", "desc" = "Display how much time is left."),
list("name" = "message", "label" = "Message", "desc" = "A custom message.")
),
"alerts"=list(
list("alert"="default", "label"="Nanotrasen", "desc"="Oh god."),
list("alert"="redalert", "label"="Red Alert", "desc"="Nothing to do with communists."),
list("alert"="lockdown", "label"="Lockdown", "desc"="Let everyone know they're on lockdown."),
list("alert"="biohazard", "label"="Biohazard", "desc"="Great for virus outbreaks and parties."),
list("alert" = "default", "label" = "Nanotrasen", "desc" = "Oh god."),
list("alert" = "redalert", "label" = "Red Alert", "desc" = "Nothing to do with communists."),
list("alert" = "lockdown", "label" = "Lockdown", "desc" = "Let everyone know they're on lockdown."),
list("alert" = "biohazard", "label" = "Biohazard", "desc" = "Great for virus outbreaks and parties."),
)
)
data["security_level"] = security_level
data["security_level"] = security_level
data["str_security_level"] = capitalize(get_security_level())
data["levels"] = list(
list("id"=SEC_LEVEL_GREEN, "name"="Green"),
list("id"=SEC_LEVEL_BLUE, "name"="Blue"),
list("id" = SEC_LEVEL_GREEN, "name" = "Green"),
list("id" = SEC_LEVEL_BLUE, "name" = "Blue"),
//SEC_LEVEL_RED = list("name"="Red"),
)
var/msg_data[0]
for(var/i=1;i<=src.messagetext.len;i++)
for(var/i = 1; i <= src.messagetext.len; i++)
var/cur_msg[0]
cur_msg["title"]=messagetitle[i]
cur_msg["body"]=messagetext[i]
msg_data += list(cur_msg)
data["messages"] = msg_data
cur_msg["title"] = messagetitle[i]
cur_msg["body"] = messagetext[i]
msg_data += list(cur_msg)
data["messages"] = msg_data
data["current_message"] = data["is_ai"] ? aicurrmsg : currmsg
var/shuttle[0]
shuttle["on"]=emergency_shuttle.online()
if (emergency_shuttle.online() && emergency_shuttle.location())
var/timeleft=emergency_shuttle.estimate_arrival_time()
shuttle["eta"]="[timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
shuttle["pos"] = !emergency_shuttle.location()
shuttle["can_recall"]=!(recall_time_limit && world.time >= recall_time_limit)
data["lastCallLoc"] = shuttle_master.emergencyLastCallLoc ? format_text(shuttle_master.emergencyLastCallLoc.name) : null
data["shuttle"]=shuttle
var/shuttle[0]
switch(shuttle_master.emergency.mode)
if(SHUTTLE_IDLE, SHUTTLE_RECALL)
shuttle["callStatus"] = 2 //#define
else
shuttle["callStatus"] = 1
if(shuttle_master.emergency.mode == SHUTTLE_CALL)
var/timeleft = shuttle_master.emergency.timeLeft()
shuttle["eta"] = "[timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
data["shuttle"] = shuttle
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
@@ -412,19 +392,14 @@ var/shuttle_call/shuttle_calls[0]
else
return menu_state
/proc/enable_prison_shuttle(var/mob/user)
for(var/obj/machinery/computer/prison_shuttle/PS in world)
PS.allowedtocall = !(PS.allowedtocall)
/proc/enable_prison_shuttle(var/mob/user);
/proc/call_shuttle_proc(var/mob/user, var/reason)
if ((!( ticker ) || !emergency_shuttle.location()))
return
if(sent_strike_team == 1)
user << "<span class='warning'>Central Command will not allow the shuttle to be called. Consider all contracts terminated.</span>"
return
if(emergency_shuttle.deny_shuttle)
if(shuttle_master.emergencyNoEscape)
user << "<span class='warning'>The emergency shuttle may not be sent at this time. Please try again later.</span>"
return
@@ -432,39 +407,24 @@ var/shuttle_call/shuttle_calls[0]
user << "<span class='warning'>The emergency shuttle is refueling. Please wait another [round((6000-world.time)/600)] minutes before trying again.</span>"
return
if(emergency_shuttle.going_to_centcom())
if(shuttle_master.emergency.mode > SHUTTLE_ESCAPE)
user << "<span class='warning'>The emergency shuttle may not be called while returning to Central Command.</span>"
return
if(emergency_shuttle.online())
user << "<span class='warning'>The emergency shuttle is already on its way.</span>"
return
if(ticker.mode.name == "blob")
user << "<span class='warning'>Under directive 7-10, [station_name()] is quarantined until further notice.</span>"
return
emergency_shuttle.call_evac(reason)
shuttle_master.requestEvac(user, reason)
log_game("[key_name(user)] has called the shuttle.")
message_admins("[key_name_admin(user)] has called the shuttle.", 1)
return
/proc/init_shift_change(var/mob/user, var/force = 0)
if ((!( ticker ) || !emergency_shuttle.location()))
return
if(emergency_shuttle.going_to_centcom())
user << "The shuttle may not be called while returning to Central Command."
return
if(emergency_shuttle.online())
user << "The shuttle is already on its way."
return
// if force is 0, some things may stop the shuttle call
if(!force)
if(emergency_shuttle.deny_shuttle)
if(shuttle_master.emergencyNoEscape)
user << "Central Command does not currently have a shuttle available in your sector. Please try again later."
return
@@ -480,22 +440,19 @@ var/shuttle_call/shuttle_calls[0]
user << "Under directive 7-10, [station_name()] is quarantined until further notice."
return
emergency_shuttle.call_transfer()
shuttle_master.requestEvac(user, "Automatic Crew Transfer")
log_game("[key_name(user)] has called the shuttle.")
message_admins("[key_name_admin(user)] has called the shuttle - [formatJumpTo(user)].", 1)
return
/proc/cancel_call_proc(var/mob/user)
if (!( ticker ) || !emergency_shuttle.can_recall())
return
if(ticker.mode.name == "meteor")
return
if(!emergency_shuttle.going_to_centcom()) //check that shuttle isn't already heading to centcomm
emergency_shuttle.recall()
log_game("[key_name(user)] has recalled the shuttle.")
message_admins("[key_name_admin(user)] has recalled the shuttle - [formatJumpTo(user)].", 1)
shuttle_master.cancelEvac(user)
log_game("[key_name(user)] has recalled the shuttle.")
message_admins("[key_name_admin(user)] has recalled the shuttle - [formatJumpTo(user)].", 1)
return
/obj/machinery/computer/communications/proc/post_status(var/command, var/data1, var/data2)
@@ -538,7 +495,7 @@ var/shuttle_call/shuttle_calls[0]
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || sent_strike_team)
return ..()
emergency_shuttle.call_evac()
shuttle_master.requestEvac(null, "All communication consoles, boards, and AI's have been destroyed.")
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
@@ -561,7 +518,7 @@ var/shuttle_call/shuttle_calls[0]
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || sent_strike_team)
return ..()
emergency_shuttle.call_evac()
shuttle_master.emergency.request(null, 0.3, null, "All communication consoles, boards, and AI's have been destroyed.")
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
@@ -0,0 +1,82 @@
/obj/machinery/computer/emergency_shuttle
name = "emergency shuttle console"
desc = "For shuttle control."
icon_screen = "shuttle"
icon_keyboard = "tech_key"
var/auth_need = 3
var/list/authorized = list()
/obj/machinery/computer/emergency_shuttle/attackby(obj/item/weapon/card/W, mob/user, params)
if(stat & (BROKEN|NOPOWER)) return
if(!istype(W, /obj/item/weapon/card))
return
if(shuttle_master.emergency.mode != SHUTTLE_DOCKED)
return
if(!user)
return
if(shuttle_master.emergency.timeLeft() < 11)
return
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (istype(W, /obj/item/device/pda))
var/obj/item/device/pda/pda = W
W = pda.id
if (!W:access) //no access
user << "The access level of [W:registered_name]\'s card is not high enough. "
return
var/list/cardaccess = W:access
if(!istype(cardaccess, /list) || !cardaccess.len) //no access
user << "The access level of [W:registered_name]\'s card is not high enough. "
return
if(!(access_heads in W:access)) //doesn't have this access
user << "The access level of [W:registered_name]\'s card is not high enough. "
return 0
var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort")
if(shuttle_master.emergency.mode != SHUTTLE_DOCKED || user.get_active_hand() != W)
return 0
var/seconds = shuttle_master.emergency.timeLeft()
if(seconds <= 10)
return 0
switch(choice)
if("Authorize")
if(!authorized.Find(W:registered_name))
authorized += W:registered_name
if(auth_need - authorized.len > 0)
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 authorized early shuttle launch ",0,1)
log_game("[key_name(user)] has authorized early shuttle launch in ([x],[y],[z])")
minor_announcement.Announce("[auth_need - authorized.len] more authorization(s) needed until shuttle is launched early")
else
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 launched the emergency shuttle [seconds] seconds before launch.",0,1)
log_game("[key_name(user)] has launched the emergency shuttle in ([x],[y],[z]) [seconds] seconds before launch.")
minor_announcement.Announce("The emergency shuttle will launch in 10 seconds")
shuttle_master.emergency.setTimer(100)
if("Repeal")
if(authorized.Remove(W:registered_name))
minor_announcement.Announce("[auth_need - authorized.len] authorizations needed until shuttle is launched early")
if("Abort")
if(authorized.len)
minor_announcement.Announce("All authorizations to launch the shuttle early have been revoked.")
authorized.Cut()
/obj/machinery/computer/emergency_shuttle/emag_act(mob/user)
if(!emagged && shuttle_master.emergency.mode == SHUTTLE_DOCKED)
var/time = shuttle_master.emergency.timeLeft()
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.")
minor_announcement.Announce("The emergency shuttle will launch in 10 seconds", "SYSTEM ERROR:")
shuttle_master.emergency.setTimer(100)
emagged = 1
/obj/machinery/computer/shuttle/white_ship
name = "White Ship Console"
desc = "Used to control the White Ship."
circuit = /obj/item/weapon/circuitboard/white_ship
shuttleId = "whiteship"
possible_destinations = "whiteship_away;whiteship_home;whiteship_z4"
+23 -31
View File
@@ -87,28 +87,26 @@
remove_display()
return 1
if(STATUS_DISPLAY_TRANSFER_SHUTTLE_TIME) //emergency shuttle timer
if(emergency_shuttle.waiting_to_leave())
message1 = "-ETD-"
if (emergency_shuttle.shuttle.is_launching())
message2 = "Launch"
else
message2 = get_shuttle_timer_departure()
if(length(message2) > CHARS_PER_LINE)
message2 = "Error"
update_display(message1, message2)
else if(emergency_shuttle.has_eta())
message1 = "-ETA-"
message2 = get_shuttle_timer_arrival()
if(length(message2) > CHARS_PER_LINE)
message2 = "Error"
update_display(message1, message2)
else if(emergency_shuttle.is_stranded())
message1 = "-ERR-"
message2 = "??:??"
update_display(message1, message2)
if(shuttle_master.emergency.timer)
var/line1
var/line2 = get_shuttle_timer()
switch(shuttle_master.emergency.mode)
if(SHUTTLE_RECALL)
line1 = "-RCL-"
if(SHUTTLE_CALL)
line1 = "-ETA-"
if(SHUTTLE_DOCKED)
line1 = "-ETD-"
if(SHUTTLE_ESCAPE)
line1 = "-ESC-"
if(SHUTTLE_STRANDED)
line1 = "-ERR-"
line2 = "??:??"
if(length(line2) > CHARS_PER_LINE)
line2 = "Error!"
update_display(line1, line2)
else
remove_display()
return 1
if(STATUS_DISPLAY_MESSAGE) //custom messages
var/line1
var/line2
@@ -169,17 +167,11 @@
if(maptext != new_text)
maptext = new_text
/obj/machinery/status_display/proc/get_shuttle_timer_arrival()
var/timeleft = emergency_shuttle.estimate_arrival_time()
if(timeleft < 0)
return ""
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
/obj/machinery/status_display/proc/get_shuttle_timer_departure()
var/timeleft = emergency_shuttle.estimate_launch_time()
if(timeleft < 0)
return ""
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
/obj/machinery/status_display/proc/get_shuttle_timer()
var/timeleft = shuttle_master.emergency.timeLeft()
if(timeleft > 0)
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
return "00:00"
/obj/machinery/status_display/proc/get_supply_shuttle_timer()
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
+74 -1
View File
@@ -74,4 +74,77 @@
shuttlespace_ew14
icon_state = "speedspace_ew_14"
shuttlespace_ew15
icon_state = "speedspace_ew_15"
icon_state = "speedspace_ew_15"
//-tg- stuff
/turf/space/transit
icon_state = "black"
dir = SOUTH
/turf/space/transit/horizontal
dir = WEST
/turf/space/transit/Entered(atom/movable/AM, atom/OldLoc)
if(!AM)
return
var/max = world.maxx-TRANSITIONEDGE
var/min = 1+TRANSITIONEDGE
var/_z = rand(1,MAX_Z) //select a random space zlevel
//now select coordinates for a border turf
var/_x
var/_y
switch(dir)
if(SOUTH)
_x = rand(min,max)
_y = max
if(WEST)
_x = max
_y = rand(min,max)
if(EAST)
_x = min
_y = rand(min,max)
else
_x = rand(min,max)
_y = min
var/turf/T = locate(_x, _y, _z)
AM.loc = T
AM.newtonian_move(dir)
//Overwrite because we dont want people building rods in space.
/turf/space/transit/attackby()
return
/turf/space/transit/New()
update_icon()
..()
/turf/space/transit/proc/update_icon()
var/p = 9
var/angle = 0
var/state = 1
switch(dir)
if(NORTH)
angle = 180
state = ((-p*x+y) % 15) + 1
if(state < 1)
state += 15
if(EAST)
angle = 90
state = ((x+p*y) % 15) + 1
if(WEST)
angle = -90
state = ((x-p*y) % 15) + 1
if(state < 1)
state += 15
else
state = ((p*x+y) % 15) + 1
icon_state = "speedspace_ns_[state]"
transform = turn(matrix(), angle)
+7 -12
View File
@@ -401,20 +401,15 @@
dat += "Current Game Mode: <B>[ticker.mode.name]</B><BR>"
dat += "Round Duration: <B>[round(world.time / 36000)]:[add_zero(num2text(world.time / 600 % 60), 2)]:[add_zero(num2text(world.time / 10 % 60), 2)]</B><BR>"
dat += "<B>Emergency shuttle</B><BR>"
if (!emergency_shuttle.online())
if(shuttle_master.emergency.mode < SHUTTLE_CALL)
dat += "<a href='?src=\ref[src];call_shuttle=1'>Call Shuttle</a><br>"
else
if (emergency_shuttle.wait_for_launch)
var/timeleft = emergency_shuttle.estimate_launch_time()
dat += "ETL: <a href='?src=\ref[src];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
else if (emergency_shuttle.shuttle.has_arrive_time())
var/timeleft = emergency_shuttle.estimate_arrival_time()
dat += "ETA: <a href='?src=\ref[src];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<a href='?src=\ref[src];call_shuttle=2'>Send Back</a><br>"
if (emergency_shuttle.shuttle.moving_status == SHUTTLE_WARMUP)
dat += "Launching now..."
var/timeleft = shuttle_master.emergency.timeLeft()
if(shuttle_master.emergency.mode < SHUTTLE_DOCKED)
dat += "ETA: <a href='?_src_=holder;edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<a href='?_src_=holder;call_shuttle=2'>Send Back</a><br>"
else
dat += "ETA: <a href='?_src_=holder;edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<a href='?src=\ref[src];delay_round_end=1'>[ticker.delay_end ? "End Round Normally" : "Delay Round End"]</a><br>"
if(ticker.mode.syndicates.len)
+5
View File
@@ -119,6 +119,11 @@
<BR>
<A href='?src=\ref[src];secretsfun=rolldice'>Roll the Dice</A><BR>
<BR>
<BR>
<A href='?src=\ref[src];secretsfun=moveferry'>Move Ferry</A><BR>
<A href='?src=\ref[src];secretsfun=moveminingshuttle'>Move Mining Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=movelaborshuttle'>Move Labor Shuttle</A><BR>
<BR>
</center>"}
dat += "</center></body></html>"
var/datum/browser/popup = new(usr, "secrets", "<div align='center'>Admin Secrets</div>", 630, 670)
+42 -139
View File
@@ -261,49 +261,37 @@
switch(href_list["call_shuttle"])
if("1")
if ((!( ticker ) || !emergency_shuttle.location()))
if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED)
return
if (emergency_shuttle.can_call())
emergency_shuttle.call_evac()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
shuttle_master.emergency.request()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>")
if("2")
if (!( ticker ) || !emergency_shuttle.location())
if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED)
return
if (emergency_shuttle.can_call())
emergency_shuttle.call_evac()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
switch(shuttle_master.emergency.mode)
if(SHUTTLE_CALL)
shuttle_master.emergency.cancel()
log_admin("[key_name(usr)] sent the Emergency Shuttle back")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] sent the Emergency Shuttle back</span>")
else
shuttle_master.emergency.cancel()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>")
else if (emergency_shuttle.can_recall())
emergency_shuttle.recall()
log_admin("[key_name(usr)] sent the Emergency Shuttle back")
message_admins("\blue [key_name_admin(usr)] sent the Emergency Shuttle back", 1)
href_list["secretsadmin"] = "check_antagonist"
href_list["secrets"] = "check_antagonist"
else if(href_list["edit_shuttle_time"])
if(!check_rights(R_SERVER)) return
if (emergency_shuttle.wait_for_launch)
var/new_time_left = input("Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", emergency_shuttle.estimate_launch_time() ) as num
emergency_shuttle.launch_time = world.time + new_time_left*10
log_admin("[key_name(usr)] edited the Emergency Shuttle's launch time to [new_time_left]")
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's launch time to [new_time_left*10]", 1)
else if (emergency_shuttle.shuttle.has_arrive_time())
var/new_time_left = input("Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) as num
emergency_shuttle.shuttle.arrive_time = world.time + new_time_left*10
log_admin("[key_name(usr)] edited the Emergency Shuttle's arrival time to [new_time_left]")
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's arrival time to [new_time_left*10]", 1)
else
alert("The shuttle is neither counting down to launch nor is it in transit. Please try again when it is.")
href_list["secretsadmin"] = "check_antagonist"
var/timer = input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", shuttle_master.emergency.timeLeft() ) as num
shuttle_master.emergency.setTimer(timer*10)
log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds")
minor_announcement.Announce("The emergency shuttle will reach its destination in [round(shuttle_master.emergency.timeLeft(600))] minutes.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds</span>")
href_list["secrets"] = "check_antagonist"
else if(href_list["delay_round_end"])
if(!check_rights(R_SERVER)) return
@@ -2359,112 +2347,6 @@
message_admins("\blue [key_name_admin(usr)] used everyone is a traitor secret. Objective is [objective]", 1)
log_admin("[key_name(usr)] used everyone is a traitor secret. Objective is [objective]")
if("launchshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShL")
var/list/valid_shuttles = list()
for (var/shuttle_tag in shuttle_controller.shuttles)
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
valid_shuttles += shuttle_tag
var/shuttle_tag = input("Which shuttle do you want to launch?") as null|anything in valid_shuttles
if (!shuttle_tag)
return
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
if (S.can_launch())
S.launch(usr)
message_admins("\blue [key_name_admin(usr)] launched the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] launched the [shuttle_tag] shuttle")
else
alert("The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.")
if("forcelaunchshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShFL")
var/list/valid_shuttles = list()
for (var/shuttle_tag in shuttle_controller.shuttles)
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
valid_shuttles += shuttle_tag
var/shuttle_tag = input("Which shuttle's launch do you want to force?") as null|anything in valid_shuttles
if (!shuttle_tag)
return
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
if (S.can_force())
S.force_launch(usr)
message_admins("\blue [key_name_admin(usr)] has forced the [shuttle_tag] shuttle launch", 1)
log_admin("[key_name(usr)] has forced the [shuttle_tag] shuttle launch")
else
alert("The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.")
if("jumpshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShJ")
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
if (!shuttle_tag) return
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!origin_area) return
var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!destination_area) return
var/long_jump = alert("Is there a transition area for this jump?","", "Yes", "No")
if (long_jump == "Yes")
var/transition_area = input("Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!transition_area) return
var/move_duration = input("How many seconds will this jump take?") as num
S.long_jump(origin_area, destination_area, transition_area, move_duration)
message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle")
else
S.short_jump(origin_area, destination_area)
message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle")
if("moveshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShM")
var/confirm = alert("This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", "Ok", "Cancel")
if (confirm == "Cancel")
return
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
if (!shuttle_tag) return
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!origin_area) return
var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!destination_area) return
S.move(origin_area, destination_area)
message_admins("\blue [key_name_admin(usr)] moved the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] moved the [shuttle_tag] shuttle")
if("togglebombcap")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BC")
@@ -2736,6 +2618,27 @@
if("securitylevel5")
set_security_level(5)
message_admins("\blue [key_name_admin(usr)] change security level to Delta.", 1)
if("moveminingshuttle")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShM")
if(!shuttle_master.toggleShuttle("mining","mining_home","mining_away"))
message_admins("[key_name_admin(usr)] moved mining shuttle")
log_admin("[key_name(usr)] moved the mining shuttle")
if("movelaborshuttle")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShL")
if(!shuttle_master.toggleShuttle("laborcamp","laborcamp_home","laborcamp_away"))
message_admins("[key_name_admin(usr)] moved labor shuttle")
log_admin("[key_name(usr)] moved the labor shuttle")
if("moveferry")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShF")
if(!shuttle_master.toggleShuttle("ferry","ferry_home","ferry_away"))
message_admins("[key_name_admin(usr)] moved the centcom ferry")
log_admin("[key_name(usr)] moved the centcom ferry")
if(usr)
log_admin("[key_name(usr)] used secret [href_list["secretsfun"]]")
if (ok)
+55 -79
View File
@@ -1,7 +1,7 @@
/client/proc/cmd_admin_drop_everything(mob/M as mob in mob_list)
set category = null
set name = "Drop Everything"
if(!check_rights(R_DEBUG|R_ADMIN))
return
@@ -19,10 +19,10 @@
/client/proc/cmd_admin_prison(mob/M as mob in mob_list)
set category = "Admin"
set name = "Prison"
if(!check_rights(R_ADMIN))
return
if (ismob(M))
if(istype(M, /mob/living/silicon/ai))
alert("The AI can't be sent to prison you jerk!", null, null, null, null, null)
@@ -48,10 +48,10 @@
set category = "Event"
set name = "Subtle Message"
if(!ismob(M))
if(!ismob(M))
return
if(!check_rights(R_SERVER|R_EVENT))
if(!check_rights(R_SERVER|R_EVENT))
return
var/msg = input("Message:", text("Subtle PM to [M.key]")) as text
@@ -70,7 +70,7 @@
/client/proc/cmd_mentor_check_new_players() //Allows mentors / admins to determine who the newer players are.
set category = "Admin"
set name = "Check new Players"
if(!check_rights(R_MENTOR|R_MOD|R_ADMIN))
return
@@ -103,7 +103,7 @@
set category = "Event"
set name = "Global Narrate"
if(!check_rights(R_SERVER|R_EVENT))
if(!check_rights(R_SERVER|R_EVENT))
return
var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text
@@ -119,7 +119,7 @@
set category = "Event"
set name = "Direct Narrate"
if(!check_rights(R_SERVER|R_EVENT))
if(!check_rights(R_SERVER|R_EVENT))
return
if(!M)
@@ -141,10 +141,10 @@
/client/proc/cmd_admin_godmode(mob/M as mob in mob_list)
set category = "Special Verbs"
set name = "Godmode"
if(!check_rights(R_ADMIN))
return
M.status_flags ^= GODMODE
usr << "\blue Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]"
@@ -155,7 +155,7 @@
proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
if(automute)
if(!config.automute_on)
if(!config.automute_on)
return
else
if(!usr || !usr.client)
@@ -165,7 +165,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
return
if(!M.client)
usr << "<font color='red'>Error: cmd_admin_mute: This mob doesn't have a client tied to it.</font>"
if(!M.client)
if(!M.client)
return
var/muteunmute
@@ -204,10 +204,10 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
/client/proc/cmd_admin_add_random_ai_law()
set category = "Event"
set name = "Add Random AI Law"
if(!check_rights(R_EVENT))
return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
log_admin("[key_name(src)] has added a random AI law.")
@@ -226,7 +226,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
if(!check_rights(R_SERVER))
return
var/action=""
if(config.antag_hud_allowed)
for(var/mob/dead/observer/g in get_ghosts())
@@ -256,10 +256,10 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
set category = "Server"
set name = "Toggle antagHUD Restrictions"
set desc = "Restricts players that have used antagHUD from being able to join this round."
if(!check_rights(R_SERVER))
return
var/action=""
if(config.antag_hud_restricted)
for(var/mob/dead/observer/g in get_ghosts())
@@ -289,10 +289,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Special Verbs"
set name = "Respawn Character"
set desc = "Respawn a person that has been gibbed/dusted/killed. They must be a ghost for this to work and preferably should not have a body to go back into."
if(!check_rights(R_SPAWN))
return
var/input = ckey(input(src, "Please specify which key will be respawned.", "Key", ""))
if(!input)
return
@@ -469,7 +469,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
new_xeno.ckey = ckey
message_admins("\blue [key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste].", 1)
return 1
/client/proc/get_ghosts(var/notify = 0,var/what = 2)
// what = 1, return ghosts ass list.
@@ -493,15 +493,15 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(what==1)
return ghosts
else
return mobs
return mobs
/client/proc/cmd_admin_add_freeform_ai_law()
set category = "Event"
set name = "Add Custom AI law"
if(!check_rights(R_EVENT))
return
var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
if(!input)
return
@@ -519,10 +519,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
/client/proc/cmd_admin_rejuvenate(mob/living/M as mob in mob_list)
set category = "Special Verbs"
set name = "Rejuvenate"
if(!check_rights(R_REJUVINATE))
return
if(!mob)
return
if(!istype(M))
@@ -538,7 +538,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Event"
set name = "Create Command Report"
if(!check_rights(R_SERVER|R_EVENT))
if(!check_rights(R_SERVER|R_EVENT))
return
var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null
@@ -590,7 +590,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
if(job_master)
for(var/datum/job/job in job_master.occupations)
src << "[job.title]: [job.total_positions]"
@@ -600,7 +600,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Event"
set name = "Explosion"
if(!check_rights(R_DEBUG|R_EVENT))
if(!check_rights(R_DEBUG|R_EVENT))
return
var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
@@ -631,7 +631,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Special Verbs"
set name = "EM Pulse"
if(!check_rights(R_DEBUG|R_EVENT))
if(!check_rights(R_DEBUG|R_EVENT))
return
var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
@@ -654,7 +654,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Special Verbs"
set name = "Gib"
if(!check_rights(R_ADMIN|R_EVENT))
if(!check_rights(R_ADMIN|R_EVENT))
return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
@@ -677,8 +677,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Event"
if(!check_rights(R_ADMIN|R_EVENT))
return
return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm == "Yes")
if (istype(mob, /mob/dead/observer)) // so they don't spam gibs everywhere
@@ -693,7 +693,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
/client/proc/cmd_admin_check_contents(mob/living/M as mob in mob_list)
set category = "Special Verbs"
set name = "Check Contents"
if(!check_rights(R_ADMIN))
return
@@ -706,7 +706,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Special Verbs"
set name = "Change View Range"
set desc = "switches between 1x and custom views"
if(!check_rights(R_ADMIN))
return
@@ -721,85 +721,61 @@ Traitors and the like can also be revived with the previous role mostly intact.
feedback_add_details("admin_verb","CVRA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/admin_call_shuttle()
set category = "Admin"
set name = "Call Shuttle"
if ((!( ticker ) || !emergency_shuttle.location()))
if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED)
return
if(!check_rights(R_ADMIN))
if(!check_rights(R_ADMIN))
src << "Only administrators may use this command."
return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
var/choice
if(emergency_shuttle.auto_recall)
choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
if(choice != "Confirm")
return
if(emergency_shuttle.no_escape)
choice = input("The shuttle will not be able to leave if you call it. Call anyway?") in list("Confirm", "Cancel")
if(choice != "Confirm")
return
choice = input("Is this an emergency evacuation or a crew transfer?") in list("Emergency", "Crew Transfer")
if (choice == "Emergency")
var/reason = input(usr, "Optional: Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
emergency_shuttle.call_evac(reason)
else
emergency_shuttle.call_transfer()
shuttle_master.emergency.request()
feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
message_admins("\blue [key_name_admin(usr)] admin-called the emergency shuttle.", 1)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-called the emergency shuttle.</span>")
return
/client/proc/admin_cancel_shuttle()
set category = "Admin"
set name = "Cancel Shuttle"
if(!check_rights(R_ADMIN))
return
if(!check_rights(R_ADMIN)) return
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return
if(!ticker || !emergency_shuttle.can_recall())
if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED)
return
emergency_shuttle.recall()
shuttle_master.emergency.cancel()
feedback_add_details("admin_verb","CCSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
message_admins("\blue [key_name_admin(usr)] admin-recalled the emergency shuttle.", 1)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-recalled the emergency shuttle.</span>")
return
/client/proc/admin_deny_shuttle()
set category = "Admin"
set name = "Toggle Deny Shuttle"
if (!ticker)
if(!check_rights(R_ADMIN))
return
if(!check_rights(R_ADMIN))
return
if(shuttle_master)
shuttle_master.emergencyNoEscape = !shuttle_master.emergencyNoEscape
emergency_shuttle.deny_shuttle = !emergency_shuttle.deny_shuttle
log_admin("[key_name(src)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.")
message_admins("[key_name_admin(usr)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.")
log_admin("[key_name(src)] has [shuttle_master.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.")
message_admins("[key_name_admin(usr)] has [shuttle_master.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.")
/client/proc/cmd_admin_attack_log(mob/M as mob in mob_list)
set category = "Special Verbs"
set name = "Attack Log"
if(!check_rights(R_ADMIN))
return
return
usr << text("\red <b>Attack Log for []</b>", mob)
for(var/t in M.attack_log)
usr << t
@@ -811,7 +787,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Make Everyone Random"
set desc = "Make everyone have a random appearance. You can only use this before rounds!"
if(!check_rights(R_SERVER|R_EVENT))
if(!check_rights(R_SERVER|R_EVENT))
return
if (ticker && ticker.mode)
@@ -845,7 +821,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Toggle random events on/off"
set desc = "Toggles random events such as meteors, black holes, blob (but not space dust) on/off"
if(!check_rights(R_SERVER|R_EVENT))
if(!check_rights(R_SERVER|R_EVENT))
return
if(!config.allow_random_events)
@@ -863,7 +839,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Toggle ERT"
set desc = "Toggle the station's ability to call a response team."
if(!check_rights(R_EVENT))
if(!check_rights(R_EVENT))
return
if(ticker.mode.ert_disabled)
+1 -3
View File
@@ -27,9 +27,7 @@ var/global/sent_strike_team = 0
sent_strike_team = 1
if (emergency_shuttle.can_recall())
emergency_shuttle.recall()
shuttle_master.cancelEvac()
var/commando_number = commandos_possible //for selecting a leader
var/leader_selected = 0 //when the leader is chosen. The last person spawned.
@@ -42,9 +42,9 @@
var/status_display_freq = "1435"
var/stat_msg1
var/stat_msg2
var/datum/announcement/priority/crew_announcement = new
New()
..()
crew_announcement.newscast = 1
@@ -75,7 +75,7 @@
if(access_captain in I.GetAccess())
authenticated = 2
crew_announcement.announcer = GetNameAndAssignmentFromId(I)
if("logout" in href_list)
authenticated = 0
crew_announcement.announcer = ""
@@ -133,15 +133,13 @@
if(!input || ..(href, href_list) || !authenticated)
return
call_shuttle_proc(usr, input)
if(emergency_shuttle.online())
if(shuttle_master.emergency.timer)
post_status("shuttle")
state = STATE_DEFAULT
if("cancelshuttle" in href_list)
state = STATE_DEFAULT
if(authenticated)
cancel_call_proc(usr)
if(emergency_shuttle.online())
post_status("shuttle")
state = STATE_CANCELSHUTTLE
if("messagelist" in href_list)
currmsg = 0
@@ -284,9 +282,9 @@
proc/main_menu()
var/dat = ""
if (computer.radio.subspace)
if(emergency_shuttle.online() && emergency_shuttle.location())
var/timeleft = emergency_shuttle.estimate_arrival_time()
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]<BR>"
if(shuttle_master.emergency.mode == SHUTTLE_CALL)
var/timeleft = shuttle_master.emergency.timeLeft()
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
refresh = 1
else
refresh = 0
+1 -2
View File
@@ -326,7 +326,6 @@
/area/shuttle/escape_pod3/station,
/area/shuttle/escape_pod5/station,
/area/shuttle/mining/station,
/area/shuttle/transport1/station,
/area/shuttle/specops/station,
/area/shuttle/prison/station,
/area/shuttle/administration/station
@@ -361,7 +360,7 @@
if(P.client)
players++
return players
// Returns how many characters are currently active(not logged out, not AFK for more than 10 minutes)
// with a specific role.
// Note that this isn't sorted by department, because e.g. having a roboticist shouldn't make meteors spawn.
+2 -1
View File
@@ -87,7 +87,8 @@
else //No light, set the turf's luminosity to 0 to remove it from view()
T.luminosity = 0
else
warning("A lighting overlay realised its loc was NOT a turf (actual loc: [loc][loc ? ", " + loc.type : ""]) in update_overlay() and got qdel'ed!")
//warning("A lighting overlay realised its loc was NOT a turf (actual loc: [loc][loc ? ", " + loc.type : "null"]) in update_overlay() and got qdel'ed!") //fucking bullshit bugs means this spams when shuttles move, feel free to fix
log_debug("A lighting overlay realised its loc was NOT a turf (actual loc: [loc][loc ? ", " + loc.type : "null"]) in update_overlay() and got qdel'ed!")
qdel(src)
/atom/movable/lighting_overlay/singularity_act()
+1 -1
View File
@@ -22,4 +22,4 @@
A = T.loc
if(A.lighting_use_dynamic)
var/atom/movable/lighting_overlay/O = new(T)
T.lighting_overlay = O
T.lighting_overlay = O
+18 -127
View File
@@ -1,136 +1,27 @@
var/labor_shuttle_tickstomove = 10
var/labor_shuttle_moving = 0
var/labor_shuttle_location = 0 // 0 = station 13, 1 = labor station
proc/move_labor_shuttle() //TODO: Security Access only; add moving the shuttle to the station to the release button.
if(labor_shuttle_moving) return
labor_shuttle_moving = 1
spawn(labor_shuttle_tickstomove*10)
var/area/fromArea
var/area/toArea
if (labor_shuttle_location == 1)
fromArea = locate(/area/shuttle/siberia/outpost)
toArea = locate(/area/shuttle/siberia/station)
else
fromArea = locate(/area/shuttle/siberia/station)
toArea = locate(/area/shuttle/siberia/outpost)
var/list/dstturfs = list()
var/throwy = world.maxy
for(var/turf/T in toArea)
dstturfs += T
if(T.y < throwy)
throwy = T.y
// hey you, get out of the way!
for(var/turf/T in dstturfs)
// find the turf to move things to
var/turf/D = locate(T.x, throwy - 1, 1)
//var/turf/E = get_step(D, SOUTH)
for(var/atom/movable/AM as mob|obj in T)
AM.Move(D)
// NOTE: Commenting this out to avoid recreating mass driver glitch
/*
spawn(0)
AM.throw_at(E, 1, 1)
return
*/
if(istype(T, /turf/simulated))
qdel(T)
for(var/mob/living/carbon/bug in toArea) // If someone somehow is still in the shuttle's docking area...
bug.gib()
fromArea.move_contents_to(toArea)
if (labor_shuttle_location)
labor_shuttle_location = 0
else
labor_shuttle_location = 1
for(var/mob/M in toArea)
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 3, 1) // buckled, not a lot of shaking
else
shake_camera(M, 10, 1) // unbuckled, HOLY SHIT SHAKE THE ROOM
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(3)
labor_shuttle_moving = 0
return
/obj/machinery/computer/labor_shuttle
name = "Labor Shuttle Console"
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
/obj/machinery/computer/shuttle/labor
name = "labor shuttle console"
desc = "Used to call and send the labor camp shuttle."
circuit = /obj/item/weapon/circuitboard/labor_shuttle
var/location = 0 //0 = station, 1 = labor camp
shuttleId = "laborcamp"
possible_destinations = "laborcamp_home;laborcamp_away"
req_access = list(access_brig)
var/hacked = 0
/obj/machinery/computer/labor_shuttle/attack_hand(user as mob)
if(..(user))
return
src.add_fingerprint(usr)
var/dat
dat = text("<center><A href='?src=\ref[src];move=[1]'>Send Labor Shuttle</A></center>")
//user << browse("[dat]", "window=laborshuttle;size=200x100")
var/datum/browser/popup = new(user, "laborshuttle", name, 200, 140)
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
/obj/machinery/computer/labor_shuttle/Topic(href, href_list)
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["move"])
if(!allowed(usr))
usr << "\red Access denied."
return
if (!labor_shuttle_moving)
usr << "\blue Shuttle recieved message and will be sent shortly."
move_labor_shuttle()
else
usr << "\blue Shuttle is already moving."
/obj/machinery/computer/labor_shuttle/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/card/emag))
src.req_access = list()
hacked = 1
usr << "You fried the consoles ID checking system. It's now available to everyone!"
else
..()
/obj/machinery/computer/labor_shuttle/one_way
name = "Prisoner Shuttle Console"
/obj/machinery/computer/shuttle/labor/one_way
name = "prisoner shuttle console"
desc = "A one-way shuttle console, used to summon the shuttle to the labor camp."
possible_destinations = "laborcamp_away"
circuit = /obj/item/weapon/circuitboard/labor_shuttle/one_way
req_access = list( )
/obj/machinery/computer/labor_shuttle/one_way/attack_hand(user as mob)
if(..(user))
return
src.add_fingerprint(usr)
var/dat
dat = text("<center><A href='?src=\ref[src];move=[1]'>Summon Labor Shuttle</A></center>")
//user << browse("[dat]", "window=laborshuttle;size=200x100")
var/datum/browser/popup = new(user, "laborshuttle", name, 200, 140)
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
/obj/machinery/computer/labor_shuttle/one_way/Topic(href, href_list)
if(href_list["move"] && labor_shuttle_location == 1)
usr << "\blue Shuttle is already at the outpost."
return
/obj/machinery/computer/shuttle/labor/one_way/Topic(href, href_list)
if(href_list["move"])
var/obj/docking_port/mobile/M = shuttle_master.getShuttle("laborcamp")
if(!M)
usr << "<span class='warning'>Cannot locate shuttle!</span>"
return 0
var/obj/docking_port/stationary/S = M.get_docked()
if(S && S.name == "laborcamp_away")
usr << "<span class='warning'>Shuttle is already at the outpost!</span>"
return 0
..()
+10 -9
View File
@@ -77,7 +77,6 @@
/obj/machinery/mineral/labor_claim_console/Topic(href, href_list)
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles["Labor"]
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["choice"])
@@ -102,20 +101,22 @@
if(!alone_in_area(get_area(src), usr))
usr << "<span class='warning'>Prisoners are only allowed to be released while alone.</span>"
else
if(shuttle.location == 1)
if (shuttle.moving_status == SHUTTLE_IDLE)
switch(shuttle_master.moveShuttle("laborcamp","laborcamp_home"))
if(1)
usr << "<span class='notice'>Shuttle not found</span>"
if(2)
usr << "<span class='notice'>Shuttle already at station</span>"
if(3)
usr << "<span class='notice'>No permission to dock could be granted.</span>"
else
var/message = "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval."
announcer.autosay(message, "Labor Camp Controller", "Security")
usr << "<span class='notice'>Shuttle received message and will be sent shortly.</span>"
shuttle.launch()
else
usr << "<span class='notice'>Shuttle is already moving.</span>"
else
usr << "<span class='notice'>Shuttle is already on-station.</span>"
if(href_list["choice"] == "release")
if(alone_in_area(get_area(loc), usr))
if(shuttle.location == 1)
var/obj/docking_port/stationary/S = shuttle_master.getDock("laborcamp_home")
if(S && S.get_docked())
if(release_door && release_door.density)
release_door.open()
else
+8
View File
@@ -37,6 +37,14 @@
new /obj/item/weapon/pickaxe(src)
new /obj/item/clothing/glasses/meson(src)
/**********************Shuttle Computer**************************/
/obj/machinery/computer/shuttle/mining
name = "Mining Shuttle Console"
desc = "Used to call and send the mining shuttle."
circuit = /obj/item/weapon/circuitboard/mining_shuttle
shuttleId = "mining"
possible_destinations = "mining_home;mining_away"
/******************************Lantern*******************************/
+4 -4
View File
@@ -234,10 +234,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//world << "DEBUG: malf mode ticker test"
if(ticker.mode:malf_mode_declared)
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
if(emergency_shuttle)
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
if(shuttle_master.emergency.mode >= SHUTTLE_RECALL)
var/timeleft = shuttle_master.emergency.timeLeft()
if(timeleft > 0)
stat(null, "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]")
/mob/dead/observer/verb/reenter_corpse()
set category = "Ghost"
@@ -181,10 +181,10 @@
if (client.statpanel == "Status")
stat(null, "Plasma Stored: [getPlasma()]/[max_plasma]")
if(emergency_shuttle)
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
if(shuttle_master.emergency.mode >= SHUTTLE_RECALL)
var/timeleft = shuttle_master.emergency.timeLeft()
if(timeleft > 0)
stat(null, "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]")
/mob/living/carbon/alien/Stun(amount)
if(status_flags & CANSTUN)
@@ -241,10 +241,10 @@
if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
if(ticker.mode:malf_mode_declared)
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
if(emergency_shuttle)
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
if(shuttle_master.emergency.mode >= SHUTTLE_RECALL)
var/timeleft = shuttle_master.emergency.timeLeft()
if(timeleft > 0)
stat(null, "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]")
if (client.statpanel == "Status")
if(locate(/obj/item/device/assembly/health) in src)
@@ -1838,9 +1838,9 @@
/mob/living/carbon/human/proc/get_full_print()
if(!dna || !dna.uni_identity)
return
return md5(dna.uni_identity)
return md5(dna.uni_identity)
/mob/living/carbon/human/can_see_reagents()
for(var/obj/item/clothing/C in src) //If they have some clothing equipped that lets them see reagents, they can see reagents
if(C.scan_reagents)
return 1
return 1
-5
View File
@@ -373,11 +373,6 @@ var/list/ai_verbs_default = list(
call_shuttle_proc(src, input)
// hack to display shuttle timer
if(emergency_shuttle.online())
var/obj/machinery/computer/communications/C = locate() in machines
if(C)
C.post_status("shuttle")
return
/mob/living/silicon/ai/proc/ai_cancel_call()
+1 -1
View File
@@ -39,7 +39,7 @@
callshuttle = 0
if(callshuttle == 3) //if all three conditions are met
emergency_shuttle.call_evac()
shuttle_master.emergency.request(null, 0.3, null, "All communication consoles, boards, and AI's have been destroyed.")
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
+4 -4
View File
@@ -140,10 +140,10 @@
// this function displays the shuttles ETA in the status panel if the shuttle has been called
/mob/living/silicon/proc/show_emergency_shuttle_eta()
if(emergency_shuttle)
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
if(shuttle_master.emergency.mode >= SHUTTLE_RECALL)
var/timeleft = shuttle_master.emergency.timeLeft()
if(timeleft > 0)
stat(null, "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]")
@@ -111,10 +111,10 @@
..()
statpanel("Status")
if(emergency_shuttle)
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
if(shuttle_master.emergency.mode >= SHUTTLE_RECALL)
var/timeleft = shuttle_master.emergency.timeLeft()
if(timeleft > 0)
stat(null, "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]")
if (client.statpanel == "Status")
stat("Chemicals", chemicals)
+4 -8
View File
@@ -379,14 +379,10 @@
var/dat = "<html><body><center>"
dat += "Round Duration: [round(hours)]h [round(mins)]m<br>"
if(emergency_shuttle) //In case Nanotrasen decides reposess CentComm's shuttles.
if(emergency_shuttle.going_to_centcom()) //Shuttle is going to centcomm, not recalled
dat += "<font color='red'><b>The station has been evacuated.</b></font><br>"
if(emergency_shuttle.online())
if (emergency_shuttle.evac) // Emergency shuttle is past the point of no recall
dat += "<font color='red'>The station is currently undergoing evacuation procedures.</font><br>"
else // Crew transfer initiated
dat += "<font color='red'>The station is currently undergoing crew transfer procedures.</font><br>"
if(shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
dat += "<font color='red'><b>The station has been evacuated.</b></font><br>"
else if(shuttle_master.emergency.mode >= SHUTTLE_CALL)
dat += "<font color='red'>The station is currently undergoing evacuation procedures.</font><br>"
dat += "Choose from the following open positions:<br>"
for(var/datum/job/job in job_master.occupations)
+1 -4
View File
@@ -34,10 +34,7 @@
narsie_spawn_animation()
sleep(70)
if(emergency_shuttle && emergency_shuttle.can_call())
emergency_shuttle.call_evac()
emergency_shuttle.launch_time = 0 // Cannot recall
shuttle_master.emergency.request(null, 0.3) // Cannot recall
/obj/singularity/narsie/large/attack_ghost(mob/dead/observer/user as mob)
if(!(src in view()))
+697
View File
@@ -0,0 +1,697 @@
//use this define to highlight docking port bounding boxes (ONLY FOR DEBUG USE)
#define DOCKING_PORT_HIGHLIGHT
//NORTH default dir
/obj/docking_port
invisibility = 101
icon = 'icons/obj/device.dmi'
//icon = 'icons/dirsquare.dmi'
icon_state = "pinonfar"
unacidable = 1
anchored = 1
var/id
dir = NORTH //this should point -away- from the dockingport door, ie towards the ship
var/width = 0 //size of covered area, perpendicular to dir
var/height = 0 //size of covered area, paralell 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
/obj/docking_port/Destroy()
return QDEL_HINT_LETMELIVE
/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)
_dir = dir
if(!_x)
_x = x
if(!_y)
_y = y
//byond's sin and cos functions are inaccurate. This is faster and perfectly accurate
var/cos = 1
var/sin = 0
switch(_dir)
if(WEST)
cos = 0
sin = 1
if(SOUTH)
cos = -1
sin = 0
if(EAST)
cos = 0
sin = -1
return list(
_x + (-dwidth*cos) - (-dheight*sin),
_y + (-dwidth*sin) + (-dheight*cos),
_x + (-dwidth+width-1)*cos - (-dheight+height-1)*sin,
_y + (-dwidth+width-1)*sin + (-dheight+height-1)*cos
)
//returns turfs within our projected rectangle in a specific order.
//this ensures that turfs are copied over in the same order, regardless of any rotation
/obj/docking_port/proc/return_ordered_turfs(_x, _y, _z, _dir, area/A)
if(!_dir)
_dir = dir
if(!_x)
_x = x
if(!_y)
_y = y
if(!_z)
_z = z
var/cos = 1
var/sin = 0
switch(_dir)
if(WEST)
cos = 0
sin = 1
if(SOUTH)
cos = -1
sin = 0
if(EAST)
cos = 0
sin = -1
. = list()
var/xi
var/yi
for(var/dx=0, dx<width, ++dx)
for(var/dy=0, dy<height, ++dy)
xi = _x + (dx-dwidth)*cos - (dy-dheight)*sin
yi = _y + (dy-dheight)*cos + (dx-dwidth)*sin
var/turf/T = locate(xi, yi, _z)
if(A)
if(get_area(T) == A)
. += T
else
. += null
else
. += T
#ifdef DOCKING_PORT_HIGHLIGHT
//Debug proc used to highlight bounding area
/obj/docking_port/proc/highlight(_color)
var/list/L = return_coords()
var/turf/T0 = locate(L[1],L[2],z)
var/turf/T1 = locate(L[3],L[4],z)
for(var/turf/T in block(T0,T1))
T.color = _color
T.maptext = null
if(_color)
var/turf/T = locate(L[1], L[2], z)
T.color = "#0f0"
T = locate(L[3], L[4], z)
T.color = "#00f"
#endif
//return first-found touching dockingport
/obj/docking_port/proc/get_docked()
return locate(/obj/docking_port/stationary) in loc
/obj/docking_port/proc/getDockedId()
var/obj/docking_port/P = get_docked()
if(P) return P.id
/obj/docking_port/stationary
name = "dock"
var/turf_type = /turf/space
var/area_type = /area/space
/obj/docking_port/stationary/New()
..()
spawn(0)
if(!shuttle_master)
sleep(50)
if(!shuttle_master)
sleep(50)
if(!shuttle_master)
throw EXCEPTION("docking port [src] could not initialize")
return 0 //give up
shuttle_master.stationary += src
log_to_dd("stationary dock initialized [src], [id]") //SHUTTLE-WIP DEBUG
if(!id)
id = "[shuttle_master.stationary.len]"
if(name == "dock")
name = "dock[shuttle_master.stationary.len]"
#ifdef DOCKING_PORT_HIGHLIGHT
highlight("#f00")
#endif
//returns first-found touching shuttleport
/obj/docking_port/stationary/get_docked()
return 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/space/transit
/obj/docking_port/stationary/transit/New()
..()
spawn(0) //shuttle_master takes a bit to initialize
if(!shuttle_master)
sleep(50)
if(!shuttle_master)
sleep(50)
if(!shuttle_master)
throw EXCEPTION("docking port [src] could not initialize")
return 0 //give up
shuttle_master.transit += src
/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 global defines)
var/callTime = 50 //time spent in transit (deciseconds)
var/roundstart_move //id of port to send shuttle to at roundstart
var/travelDir = 0 //direction the shuttle would travel in
var/obj/docking_port/stationary/destination
var/obj/docking_port/stationary/previous
/obj/docking_port/mobile/New()
..()
spawn(0)
if(!shuttle_master)
sleep(50)
if(!shuttle_master)
sleep(50)
if(!shuttle_master)
throw EXCEPTION("docking port [src] could not initialize")
return 0 //give up
shuttle_master.mobile += src
var/area/A = get_area(src)
if(istype(A, /area/shuttle))
areaInstance = A
if(!id)
id = "[shuttle_master.mobile.len]"
if(name == "shuttle")
name = "shuttle[shuttle_master.mobile.len]"
if(!areaInstance)
areaInstance = new()
areaInstance.name = name
areaInstance.contents += return_ordered_turfs()
#ifdef DOCKING_PORT_HIGHLIGHT
highlight("#0f0")
#endif
//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
//this is to check if this shuttle can physically dock at dock S
/obj/docking_port/mobile/proc/canDock(obj/docking_port/stationary/S)
if(!istype(S))
return 1
if(istype(S, /obj/docking_port/stationary/transit))
return 0
//check dock is big enough to contain us
if(dwidth > S.dwidth)
return 2
if(width-dwidth > S.width-S.dwidth)
return 3
if(dheight > S.dheight)
return 4
if(height-dheight > S.height-S.dheight)
return 5
//check the dock isn't occupied
if(S.get_docked())
return 6
return 0 //0 means we can dock
//call the shuttle to destination S
/obj/docking_port/mobile/proc/request(obj/docking_port/stationary/S)
if(canDock(S))
. = 1
throw EXCEPTION("request(): shuttle cannot dock")
return 1 //we can't dock at S
switch(mode)
if(SHUTTLE_CALL)
if(S == destination)
if(world.time <= timer)
timer = world.time
else
destination = S
timer = world.time
if(SHUTTLE_RECALL)
if(S == destination)
timer = world.time - timeLeft(1)
else
destination = S
timer = world.time
mode = SHUTTLE_CALL
else
destination = S
mode = SHUTTLE_CALL
timer = world.time
enterTransit() //hyperspace
//recall the shuttle to where it was previously
/obj/docking_port/mobile/proc/cancel()
if(mode != SHUTTLE_CALL)
return
timer = world.time - timeLeft(1)
mode = SHUTTLE_RECALL
/obj/docking_port/mobile/proc/enterTransit()
previous = null
// if(!destination)
// return
var/obj/docking_port/stationary/S0 = get_docked()
var/obj/docking_port/stationary/S1 = findTransitDock()
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"].")
else
previous = S0
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
dir = angle2dir(rotation+dir2angle(dir))
//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))
//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)
. = canDock(S1)
if(.)
throw EXCEPTION("dock(): shuttle cannot dock")
return .
if(canMove())
return -1
// //rotate transit docking ports, so we don't need zillions of variants
// if(istype(S1, /obj/docking_port/stationary/transit))
// S1.dir = turn(NORTH, -travelDir)
var/obj/docking_port/stationary/S0 = get_docked()
var/turf_type = /turf/space
var/area_type = /area/space
if(S0)
if(S0.turf_type)
turf_type = S0.turf_type
if(S0.area_type)
area_type = S0.area_type
//close and lock the dock's airlocks
closePortDoors(S0)
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)
var/rotation = dir2angle(S1.dir)-dir2angle(dir)
if ((rotation % 90) != 0)
rotation += (rotation % 90) //diagonal rotations not allowed, round up
rotation = SimplifyDegrees(rotation)
//remove area surrounding docking port
if(areaInstance.contents.len)
var/area/A0 = locate("[area_type]")
if(!A0)
A0 = new area_type(null)
for(var/turf/T0 in L0)
A0.contents += T0
//move or squish anything in the way ship at destination
roadkill(L1, S1.dir)
var/list/door_unlock_list = list()
for(var/i=1, i<=L0.len, ++i)
var/turf/T0 = L0[i]
if(!T0)
continue
var/turf/T1 = L1[i]
if(!T1)
continue
T0.copyTurf(T1)
areaInstance.contents += T1
//copy over air
if(istype(T1, /turf/simulated))
var/turf/simulated/Ts1 = T1
Ts1.copy_air_with_tile(T0)
//move mobile to new location
for(var/atom/movable/AM in T0)
if (rotation)
AM.shuttleRotate(rotation)
if (istype(AM,/obj))
var/obj/O = AM
if(O.invisibility >= 101)
continue
O.loc = T1
//close open doors
if(istype(O, /obj/machinery/door))
var/obj/machinery/door/Door = O
spawn(-1)
if(Door)
Door.close()
if(istype(Door, /obj/machinery/door/airlock))
var/obj/machinery/door/airlock/A = Door
A.lock()
door_unlock_list += A
else if (istype(AM,/mob))
var/mob/M = AM
if(!M.move_on_shuttle)
continue
M.loc = T1
//docking turbulence
if(M.client)
spawn(0)
if(M.buckled)
shake_camera(M, 2, 1) // turn it down a bit come on
else
shake_camera(M, 7, 1)
if(istype(M, /mob/living/carbon))
if(!M.buckled)
M.Weaken(3)
if (rotation)
T1.shuttleRotate(rotation)
//lighting stuff
T1.reconsider_lights()
T1.lighting_build_overlays()
air_master.remove_from_active(T1)
T1.CalculateAdjacentTurfs()
air_master.add_to_active(T1,1)
T0.ChangeTurf(turf_type)
T0.reconsider_lights()
air_master.remove_from_active(T0)
T0.CalculateAdjacentTurfs()
air_master.add_to_active(T0,1)
loc = S1.loc
dir = S1.dir
unlockPortDoors(S1)
if(S1 && S1.id != "[id]_transit")
for(var/obj/machinery/door/airlock/A in door_unlock_list)
spawn(-1)
A.unlock()
/*
if(istype(S1, /obj/docking_port/stationary/transit))
var/d = turn(dir, 180 + travelDir)
for(var/turf/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 = shuttle_master.getDock("[id]_transit")
if(T && !canDock(T))
return T
/* commented out due to issues with rotation
for(var/obj/docking_port/stationary/transit/S in shuttle_master.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(obj/docking_port/stationary/S0)
if(!istype(S0))
return 1
for(var/obj/machinery/door/airlock/A in machines)
if(A.id_tag == S0.id)
spawn(-1)
A.close()
A.lock()
/obj/docking_port/mobile/proc/unlockPortDoors(obj/docking_port/stationary/S1)
if(!istype(S1))
return 0
for(var/obj/machinery/door/airlock/A in machines)
if(A.id_tag == S1.id)
spawn(-1)
if(A.locked)
A.unlock()
/obj/docking_port/mobile/proc/roadkill(list/L, dir, x, y)
for(var/turf/T in L)
for(var/atom/movable/AM in T)
if(ismob(AM))
if(istype(AM, /mob/living))
var/mob/living/M = AM
M.Paralyse(10)
M.take_organ_damage(80)
M.anchored = 0
else
continue
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(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
/obj/docking_port/mobile/proc/setTimer(wait)
if(timer <= 0)
timer = world.time
timer += wait - timeLeft(1)
//returns timeLeft
/obj/docking_port/mobile/proc/timeLeft(divisor)
if(divisor <= 0)
divisor = 10
if(!timer)
return round(callTime/divisor, 1)
return max( round((timer+callTime-world.time)/divisor,1), 0 )
/obj/docking_port/mobile/proc/getStatusText()
var/obj/docking_port/stationary/dockedAt = get_docked()
. = (dockedAt && dockedAt.name) ? dockedAt.name : "unknown"
if(istype(dockedAt, /obj/docking_port/stationary/transit))
var/obj/docking_port/stationary/dst
if(mode == SHUTTLE_RECALL)
dst = previous
else
dst = destination
. += " towards [dst ? dst.name : "unknown location"] ([timeLeft(600)]mins)"
/obj/machinery/computer/shuttle
name = "Shuttle Console"
icon_screen = "shuttle"
icon_keyboard = "tech_key"
req_access = list( )
circuit = /obj/item/weapon/circuitboard/shuttle
var/shuttleId
var/possible_destinations = ""
var/admin_controlled
/obj/machinery/computer/shuttle/New(location, obj/item/weapon/circuitboard/shuttle/C)
..()
if(istype(C))
possible_destinations = C.possible_destinations
shuttleId = C.shuttleId
/obj/machinery/computer/shuttle/attack_hand(mob/user)
if(..(user))
return
src.add_fingerprint(usr)
var/list/options = params2list(possible_destinations)
var/obj/docking_port/mobile/M = shuttle_master.getShuttle(shuttleId)
var/dat = "Status: [M ? M.getStatusText() : "*Missing*"]<br><br>"
if(M)
var/destination_found
for(var/obj/docking_port/stationary/S in shuttle_master.stationary)
if(!options.Find(S.id))
continue
if(M.canDock(S))
continue
destination_found = 1
dat += "<A href='?src=\ref[src];move=[S.id]'>Send to [S.name]</A><br>"
if(!destination_found)
dat += "<B>Shuttle Locked</B><br>"
if(admin_controlled)
dat += "Authorized personnel only<br>"
dat += "<A href='?src=\ref[src];request=1]'>Request Authorization</A><br>"
dat += "<a href='?src=\ref[user];mach_close=computer'>Close</a>"
var/datum/browser/popup = new(user, "computer", M ? M.name : "shuttle", 300, 200)
popup.set_content("<center>[dat]</center>")
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
/obj/machinery/computer/shuttle/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
if(!allowed(usr))
usr << "<span class='danger'>Access denied.</span>"
return
if(href_list["move"])
switch(shuttle_master.moveShuttle(shuttleId, href_list["move"], 1))
if(0) usr << "<span class='notice'>Shuttle received message and will be sent shortly.</span>"
if(1) usr << "<span class='warning'>Invalid shuttle requested.</span>"
else usr << "<span class='notice'>Unable to comply.</span>"
/obj/machinery/computer/shuttle/emag_act(mob/user)
if(!emagged)
src.req_access = list()
emagged = 1
user << "<span class='notice'>You fried the consoles ID checking system.</span>"
/obj/machinery/computer/shuttle/ferry
name = "transport ferry console"
circuit = /obj/item/weapon/circuitboard/ferry
shuttleId = "ferry"
possible_destinations = "ferry_home;ferry_away"
/obj/machinery/computer/shuttle/ferry/request
name = "ferry console"
circuit = /obj/item/weapon/circuitboard/ferry/request
var/cooldown //prevents spamming admins
possible_destinations = "ferry_home"
admin_controlled = 1
/obj/machinery/computer/shuttle/ferry/request/Topic(href, href_list)
..()
if(href_list["request"])
if(cooldown)
return
cooldown = 1
usr << "<span class='notice'>Your request has been recieved by Centcom.</span>"
admins << "<b>FERRY: <font color='blue'>[key_name_admin(usr)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) (<A HREF='?_src_=holder;secretsfun=moveferry'>Move Ferry</a>)</b> is requesting to move the transport ferry to Centcom.</font>"
spawn(600) //One minute cooldown
cooldown = 0
/obj/machinery/computer/shuttle/ert
name = "ert shuttle console"
//circuit = /obj/item/weapon/circuitboard/ert
shuttleId = "ert"
possible_destinations = "ert_home;ert_away"
#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 = new type(T)
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.dir = dir
return T
+7 -7
View File
@@ -16,14 +16,14 @@
/datum/shuttle/ferry/escape_pod/can_cancel()
return 0
//This controller goes on the escape pod itself
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod
name = "escape pod controller"
var/datum/shuttle/ferry/escape_pod/pod
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1);
/* var/data[0]
data = list(
"docking_status" = docking_program.get_docking_status(),
@@ -40,12 +40,12 @@
ui = new(user, src, ui_key, "escape_pod_console.tmpl", name, 470, 290)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
ui.set_auto_update(1)*/
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/Topic(href, href_list)
if(..()) //I hate this "return 1 to indicate they are not allowed to use the controller" crap, but not sure how else to do it without being able to call machinery/Topic() directly.
return 1
/*
if("manual_arm")
pod.arming_controller.arm()
if("force_launch")
@@ -55,7 +55,7 @@
pod.launch(src)
return 0
*/
//This controller is for the escape pod berth (station side)
@@ -74,7 +74,7 @@
if (istype(docking_program, /datum/computer/file/embedded_program/docking/simple/escape_pod))
var/datum/computer/file/embedded_program/docking/simple/escape_pod/P = docking_program
armed = P.armed
data = list(
"docking_status" = docking_program.get_docking_status(),
"override_enabled" = docking_program.override_enabled,
+15 -15
View File
@@ -19,8 +19,8 @@
ui_interact(user)
/obj/machinery/computer/shuttle_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
/obj/machinery/computer/shuttle_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1);
/* var/data[0]
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
if (!istype(shuttle))
return
@@ -64,10 +64,10 @@
ui = new(user, src, ui_key, "shuttle_control_console.tmpl", "[shuttle_tag] Shuttle Control", 470, 310)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
ui.set_auto_update(1)*/
/obj/machinery/computer/shuttle_control/Topic(href, href_list)
if(..())
/obj/machinery/computer/shuttle_control/Topic(href, href_list);
/* if(..())
return
usr.set_machine(src)
@@ -78,25 +78,25 @@
if(href_list["force"])
force_launch(usr)
else if(href_list["cancel"])
cancel_launch(usr)
cancel_launch(usr)*/
/obj/machinery/computer/shuttle_control/proc/launch(var/mob/user)
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
/obj/machinery/computer/shuttle_control/proc/launch(var/mob/user);
/* var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
if (!istype(shuttle))
return
shuttle.launch(user)
shuttle.launch(user)*/
/obj/machinery/computer/shuttle_control/proc/force_launch(var/mob/user)
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
/obj/machinery/computer/shuttle_control/proc/force_launch(var/mob/user);
/* var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
if (!istype(shuttle))
return
shuttle.force_launch(user)
shuttle.force_launch(user)*/
/obj/machinery/computer/shuttle_control/proc/cancel_launch(var/mob/user)
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
/obj/machinery/computer/shuttle_control/proc/cancel_launch(var/mob/user);
/* var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
if (!istype(shuttle))
return
shuttle.cancel_launch(user)
shuttle.cancel_launch(user)*/
/obj/machinery/computer/shuttle_control/emag_act(user as mob)
src.req_access = list()
+42 -41
View File
@@ -19,7 +19,7 @@
/datum/shuttle/multi_shuttle/New()
..()
if(origin)
if(origin)
last_departed = origin
/datum/shuttle/multi_shuttle/move(var/area/origin, var/area/destination)
@@ -45,7 +45,7 @@
icon_keyboard = "med_key"
var/is_syndicate = 0
var/warn_on_return = 0
/obj/machinery/computer/shuttle_control/multi/New()
..()
if(is_syndicate)
@@ -55,15 +55,15 @@
/obj/machinery/computer/shuttle_control/multi/attack_hand(user as mob)
if(..(user))
return 1
if(!allowed(user) && !isobserver(user))
user << "<span class='warning'>Access Denied.</span>"
return 1
return 1
ui_interact(user)
/obj/machinery/computer/shuttle_control/multi/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
/obj/machinery/computer/shuttle_control/multi/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1);
/* var/data[0]
var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag]
if (!istype(MS))
return
@@ -83,7 +83,7 @@
shuttle_status = "Standing-by at base."
else
var/area/areacheck = get_area(src)
shuttle_status = "Standing-by at [sanitize(areacheck.name)]."
shuttle_status = "Standing-by at [sanitize(areacheck.name)]."
data = list(
"shuttle_status" = shuttle_status,
@@ -101,42 +101,42 @@
ui = new(user, src, ui_key, "shuttle_control_multi_console.tmpl", "[shuttle_tag] Ship Control", 470, 310)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
ui.set_auto_update(1)*/
/obj/machinery/computer/shuttle_control/multi/proc/can_launch()
var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag]
/obj/machinery/computer/shuttle_control/multi/proc/can_launch();
/* var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag]
if (!istype(MS))
return
if (MS.moving_status != SHUTTLE_IDLE)
return 0
if((MS.last_move + MS.cooldown * 10) > world.time)
return 0
return 1
/obj/machinery/computer/shuttle_control/multi/proc/can_return_to_base()
var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag]
return 1*/
/obj/machinery/computer/shuttle_control/multi/proc/can_return_to_base();
/* var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag]
if (!istype(MS))
return
if(MS.moving_status != SHUTTLE_IDLE)
return 0
if((MS.last_move + MS.cooldown * 10) > world.time)
return 0
if(MS.at_origin)
return 0
return 1
/obj/machinery/computer/shuttle_control/multi/proc/return_to_base()
var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag]
return 1*/
/obj/machinery/computer/shuttle_control/multi/proc/return_to_base();
/* var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag]
if (!istype(MS))
return
if(!can_return_to_base())
return
@@ -147,20 +147,20 @@
MS.long_jump(MS.last_departed,MS.origin,MS.interim,MS.move_time)
MS.last_departed = MS.origin
MS.at_origin = 1
/obj/machinery/computer/shuttle_control/multi/proc/toggle_cloak()
var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag]
MS.at_origin = 1*/
/obj/machinery/computer/shuttle_control/multi/proc/toggle_cloak();
/* var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag]
if (!istype(MS))
return
MS.cloaked = !MS.cloaked
/obj/machinery/computer/shuttle_control/multi/proc/launch_multi()
var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag]
*/
/obj/machinery/computer/shuttle_control/multi/proc/launch_multi();
/* var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag]
if (!istype(MS))
return
if(MS.moving_status != SHUTTLE_IDLE)
return 0
@@ -168,7 +168,7 @@
return 0
var/choice = input("Select a destination.") as null|anything in MS.destinations
if(!choice)
if(!choice)
return
if(MS.at_origin)
@@ -184,11 +184,11 @@
MS.short_jump(MS.last_departed, MS.destinations[choice])
MS.last_departed = MS.destinations[choice]
/obj/machinery/computer/shuttle_control/multi/Topic(href, href_list)
if(..())
*/
/obj/machinery/computer/shuttle_control/multi/Topic(href, href_list);
/* if(..())
return 1
if(!allowed(usr))
return 1
@@ -196,7 +196,7 @@
src.add_fingerprint(usr)
var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag]
if(!istype(MS))
if(!istype(MS))
return
if(href_list["start"])
@@ -207,3 +207,4 @@
if(href_list["move_multi"])
launch_multi()
*/
Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 197 KiB

+9 -7
View File
@@ -14,7 +14,11 @@ Used In File(s): /code/game/machinery/computers/communications.dm
{{if !data.is_ai}}
<div class="notice">Please remember to {{:helper.link('Log Out','locked',{'logout':1},null,'fixed')}}</div>
{{/if}}
{{if data.lastCallLoc}}
<div class="line">Most recent shuttle call/recall traced to: <b>{{:data.lastCallLoc}}</b></div>
{{else}}
<div class="line">Unable to trace most recent shuttle call/recall signal.</div>
{{/if}}
<div class="item">
<h3>Emergency Shuttle:</h3>
{{if data.shuttle.eta}}
@@ -25,12 +29,10 @@ Used In File(s): /code/game/machinery/computers/communications.dm
{{/if}}<!-- SHUTTLE ETA -->
<div class="itemLabel">Options:</div>
<div class="itemContents">
{{if data.shuttle.pos == 0}}
{{if data.shuttle.on && !data.is_ai}}
{{:helper.link('Cancel Shuttle','arrowreturnthick-1-w',{'operation':'cancelshuttle'})}}
{{else !data.shuttle.on}}
{{:helper.link('Call Shuttle','arrowthickstop-1-s',{'operation':'callshuttle'})}}
{{/if}}
{{if data.shuttle.callStatus == 1 && !data.is_ai}}
{{:helper.link('Cancel Shuttle','arrowreturnthick-1-w',{'operation':'cancelshuttle'})}}
{{else data.shuttle.callStatus == 2}}
{{:helper.link('Call Shuttle','arrowthickstop-1-s',{'operation':'callshuttle'})}}
{{/if}}
</div>
</div>
+4 -8
View File
@@ -145,18 +145,15 @@
#include "code\ATMOSPHERICS\pipes\simple\pipe_simple_visible.dm"
#include "code\controllers\communications.dm"
#include "code\controllers\configuration.dm"
#include "code\controllers\emergency_shuttle_controller.dm"
#include "code\controllers\failsafe.dm"
#include "code\controllers\hooks-defs.dm"
#include "code\controllers\hooks.dm"
#include "code\controllers\master_controller.dm"
#include "code\controllers\shuttle_controller.dm"
#include "code\controllers\verbs.dm"
#include "code\controllers\voting.dm"
#include "code\controllers\Processes\air.dm"
#include "code\controllers\Processes\alarm.dm"
#include "code\controllers\Processes\bot.dm"
#include "code\controllers\Processes\emergencyShuttle.dm"
#include "code\controllers\Processes\event.dm"
#include "code\controllers\Processes\garbage.dm"
#include "code\controllers\Processes\inactivity.dm"
@@ -166,11 +163,12 @@
#include "code\controllers\Processes\nanoui.dm"
#include "code\controllers\Processes\obj.dm"
#include "code\controllers\Processes\pipenet.dm"
#include "code\controllers\Processes\shuttle.dm"
#include "code\controllers\Processes\shuttles.dm"
#include "code\controllers\Processes\sun.dm"
#include "code\controllers\Processes\supply.dm"
#include "code\controllers\Processes\ticker.dm"
#include "code\controllers\Processes\vote.dm"
#include "code\controllers\Processes\shuttles\emergency.dm"
#include "code\controllers\ProcessScheduler\core\_stubs.dm"
#include "code\controllers\ProcessScheduler\core\process.dm"
#include "code\controllers\ProcessScheduler\core\processScheduler.dm"
@@ -497,11 +495,10 @@
#include "code\game\machinery\computer\pod_tracking_console.dm"
#include "code\game\machinery\computer\power.dm"
#include "code\game\machinery\computer\prisoner.dm"
#include "code\game\machinery\computer\prisonshuttle.dm"
#include "code\game\machinery\computer\robot.dm"
#include "code\game\machinery\computer\salvage_ship.dm"
#include "code\game\machinery\computer\security.dm"
#include "code\game\machinery\computer\shuttle.dm"
#include "code\game\machinery\computer\shuttle_tg.dm"
#include "code\game\machinery\computer\skills.dm"
#include "code\game\machinery\computer\specops_shuttle.dm"
#include "code\game\machinery\computer\station_alert.dm"
@@ -1834,12 +1831,11 @@
#include "code\modules\shieldgen\shield_capacitor.dm"
#include "code\modules\shieldgen\shield_gen.dm"
#include "code\modules\shieldgen\shield_gen_external.dm"
#include "code\modules\shuttle\shuttle.dm"
#include "code\modules\shuttles\antagonist.dm"
#include "code\modules\shuttles\departmental.dm"
#include "code\modules\shuttles\escape_pods.dm"
#include "code\modules\shuttles\shuttle.dm"
#include "code\modules\shuttles\shuttle_console.dm"
#include "code\modules\shuttles\shuttle_emergency.dm"
#include "code\modules\shuttles\shuttle_ferry.dm"
#include "code\modules\shuttles\shuttle_specops.dm"
#include "code\modules\shuttles\shuttle_supply.dm"
Binary file not shown.
Binary file not shown.
Binary file not shown.