From bc225449195b0475a5458df4ee9296effd850e3c Mon Sep 17 00:00:00 2001 From: variableundefined <40092670+variableundefined@users.noreply.github.com> Date: Sun, 2 Sep 2018 22:22:33 +0800 Subject: [PATCH 1/2] Port Shuttle to StonedMC --- .../{Processes => subsystem}/shuttles.dm | 90 ++++---- code/controllers/verbs.dm | 2 +- code/game/atoms.dm | 2 +- .../game/gamemodes/autotraitor/autotraitor.dm | 4 +- code/game/gamemodes/blob/blob.dm | 4 +- code/game/gamemodes/cult/cult.dm | 2 +- code/game/gamemodes/cult/cult_items.dm | 6 +- code/game/gamemodes/cult/runes.dm | 4 +- code/game/gamemodes/game_mode.dm | 6 +- code/game/gamemodes/gameticker.dm | 2 +- .../gamemodes/malfunction/Malf_Modules.dm | 18 +- code/game/gamemodes/meteor/meteor.dm | 2 +- .../miniantags/abduction/abduction.dm | 4 +- code/game/gamemodes/nuclear/nuclear.dm | 2 +- code/game/gamemodes/nuclear/nuclearbomb.dm | 2 +- code/game/gamemodes/nuclear/pinpointer.dm | 2 +- code/game/gamemodes/objective.dm | 16 +- code/game/gamemodes/revolution/revolution.dm | 12 +- code/game/gamemodes/scoreboard.dm | 10 +- code/game/gamemodes/shadowling/shadowling.dm | 4 +- .../shadowling/shadowling_abilities.dm | 10 +- .../special_shadowling_abilities.dm | 4 +- code/game/gamemodes/wizard/raginmages.dm | 2 +- code/game/jobs/job_objectives/science.dm | 4 +- .../game/machinery/computer/communications.dm | 34 +-- code/game/machinery/status_display.dm | 6 +- code/game/machinery/supply_display.dm | 6 +- code/game/world.dm | 6 +- code/modules/admin/player_panel.dm | 6 +- code/modules/admin/topic.dm | 24 +-- code/modules/admin/verbs/randomverbs.dm | 28 +-- code/modules/mining/laborcamp/laborshuttle.dm | 2 +- code/modules/mining/laborcamp/laborstacker.dm | 4 +- code/modules/mob/living/silicon/ai/ai.dm | 2 +- code/modules/mob/living/silicon/ai/death.dm | 10 +- code/modules/mob/mob.dm | 4 +- code/modules/mob/new_player/new_player.dm | 4 +- .../file_system/programs/command/comms.dm | 14 +- code/modules/pda/cart_apps.dm | 10 +- code/modules/power/singularity/narsie.dm | 4 +- .../security_levels/security levels.dm | 2 +- code/modules/shuttle/README.md | 2 +- code/modules/shuttle/emergency.dm | 68 +++--- code/modules/shuttle/shuttle.dm | 44 ++-- code/modules/shuttle/shuttle_manipulator.dm | 14 +- code/modules/shuttle/supply.dm | 197 ++++++++---------- code/modules/station_goals/bsa.dm | 2 +- code/modules/station_goals/dna_vault.dm | 4 +- code/modules/station_goals/shield.dm | 4 +- paradise.dme | 2 +- 50 files changed, 359 insertions(+), 358 deletions(-) rename code/controllers/{Processes => subsystem}/shuttles.dm (81%) diff --git a/code/controllers/Processes/shuttles.dm b/code/controllers/subsystem/shuttles.dm similarity index 81% rename from code/controllers/Processes/shuttles.dm rename to code/controllers/subsystem/shuttles.dm index 0e7b3f05095..a50ceaca56a 100644 --- a/code/controllers/Processes/shuttles.dm +++ b/code/controllers/subsystem/shuttles.dm @@ -1,8 +1,11 @@ -var/datum/controller/process/shuttle/shuttle_master +#define CALL_SHUTTLE_REASON_LENGTH 12 -var/const/CALL_SHUTTLE_REASON_LENGTH = 12 - -/datum/controller/process/shuttle +SUBSYSTEM_DEF(shuttle) + name = "Shuttle" + wait = 10 + init_order = INIT_ORDER_SHUTTLE + flags = SS_KEEP_TIMING|SS_NO_TICK_CHECK + runlevels = RUNLEVEL_SETUP | RUNLEVEL_GAME var/list/mobile = list() var/list/stationary = list() var/list/transit = list() @@ -37,15 +40,8 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 var/datum/round_event/shuttle_loan/shuttle_loan var/sold_atoms = "" -/datum/controller/process/shuttle/setup() - name = "shuttle" - schedule_interval = 20 - - var/watch = start_watch() - log_startup_progress("Initializing shuttle docks...") - initialize_docks() - var/count = mobile.len + stationary.len + transit.len - log_startup_progress(" Initialized [count] docks in [stop_watch(watch)]s.") +/datum/controller/subsystem/shuttle/Initialize(start_timeofday) + ordernum = rand(1,9000) if(!emergency) WARNING("No /obj/docking_port/mobile/emergency placed on the map!") @@ -53,8 +49,8 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 WARNING("No /obj/docking_port/mobile/emergency/backup placed on the map!") if(!supply) WARNING("No /obj/docking_port/mobile/supply placed on the map!") - - ordernum = rand(1,9000) + + initial_load() for(var/typepath in subtypesof(/datum/supply_packs)) var/datum/supply_packs/P = new typepath() @@ -62,36 +58,39 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 supply_packs["[P.type]"] = P initial_move() -/datum/controller/process/shuttle/doWork() - points += points_per_decisecond * schedule_interval + return ..() + +/datum/controller/subsystem/shuttle/stat_entry(msg) + ..("M:[mobile.len] S:[stationary.len] T:[transit.len]") + +/datum/controller/subsystem/shuttle/proc/initial_load() + for(var/obj/docking_port/D in world) + D.register() + CHECK_TICK + +/datum/controller/subsystem/shuttle/fire(resumed = FALSE) + points += points_per_decisecond * wait for(var/thing in mobile) if(thing) var/obj/docking_port/mobile/P = thing P.check() continue + CHECK_TICK mobile.Remove(thing) - -DECLARE_GLOBAL_CONTROLLER(shuttle, shuttle_master) - -/datum/controller/process/shuttle/proc/initialize_docks() - for(var/obj/docking_port/D in world) - D.register() - - -/datum/controller/process/shuttle/proc/getShuttle(id) +/datum/controller/subsystem/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) +/datum/controller/subsystem/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) +/datum/controller/subsystem/shuttle/proc/requestEvac(mob/user, call_reason) if(!emergency) WARNING("requestEvac(): There is no emergency shuttle, but the shuttle was called. Using the backup shuttle instead.") if(!backup_shuttle) @@ -151,19 +150,19 @@ DECLARE_GLOBAL_CONTROLLER(shuttle, shuttle_master) // Called when an emergency shuttle mobile docking port is // destroyed, which will only happen with admin intervention -/datum/controller/process/shuttle/proc/emergencyDeregister() +/datum/controller/subsystem/shuttle/proc/emergencyDeregister() // When a new emergency shuttle is created, it will override the // backup shuttle. emergency = backup_shuttle -/datum/controller/process/shuttle/proc/cancelEvac(mob/user) +/datum/controller/subsystem/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() +/datum/controller/subsystem/shuttle/proc/canRecall() if(emergency.mode != SHUTTLE_CALL) return if(!emergency.canRecall) @@ -178,7 +177,7 @@ DECLARE_GLOBAL_CONTROLLER(shuttle, shuttle_master) return return 1 -/datum/controller/process/shuttle/proc/autoEvac() +/datum/controller/subsystem/shuttle/proc/autoEvac() var/callShuttle = 1 for(var/thing in shuttle_caller_list) @@ -205,7 +204,7 @@ DECLARE_GLOBAL_CONTROLLER(shuttle, shuttle_master) 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) +/datum/controller/subsystem/shuttle/proc/toggleShuttle(shuttleId, dockHome, dockAway, timed) var/obj/docking_port/mobile/M = getShuttle(shuttleId) if(!M) return 1 @@ -222,7 +221,7 @@ DECLARE_GLOBAL_CONTROLLER(shuttle, shuttle_master) return 0 //dock successful -/datum/controller/process/shuttle/proc/moveShuttle(shuttleId, dockId, timed) +/datum/controller/subsystem/shuttle/proc/moveShuttle(shuttleId, dockId, timed) var/obj/docking_port/mobile/M = getShuttle(shuttleId) var/obj/docking_port/stationary/D = getDock(dockId) if(!M) @@ -235,8 +234,29 @@ DECLARE_GLOBAL_CONTROLLER(shuttle, shuttle_master) return 2 return 0 //dock successful -/datum/controller/process/shuttle/proc/initial_move() +/datum/controller/subsystem/shuttle/proc/initial_move() for(var/obj/docking_port/mobile/M in mobile) if(!M.roundstart_move) continue M.dockRoundstart() + +/datum/controller/subsystem/shuttle/proc/generateSupplyOrder(packId, _orderedby, _orderedbyRank, _comment, _crates) + if(!packId) + return + var/datum/supply_packs/P = supply_packs["[packId]"] + if(!P) + return + + var/datum/supply_order/O = new() + O.ordernum = ordernum++ + O.object = P + O.orderedby = _orderedby + O.orderedbyRank = _orderedbyRank + O.comment = _comment + O.crates = _crates + + requestlist += O + + return O + +#undef CALL_SHUTTLE_REASON_LENGTH \ No newline at end of file diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index 4e9380e2fed..c37eefe17b8 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -88,7 +88,7 @@ debug_variables(npcai_master) feedback_add_details("admin_verb","DNPCAI") if("Shuttle") - debug_variables(shuttle_master) + debug_variables(SSshuttle) feedback_add_details("admin_verb","DShuttle") if("Timer") debug_variables(SStimer) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 3c541a308ff..fd1fff30645 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -108,7 +108,7 @@ //check for centcomm shuttles for(var/centcom_shuttle in list("emergency", "pod1", "pod2", "pod3", "pod4", "ferry")) - var/obj/docking_port/mobile/M = shuttle_master.getShuttle(centcom_shuttle) + var/obj/docking_port/mobile/M = SSshuttle.getShuttle(centcom_shuttle) if(T in M.areaInstance) return 1 diff --git a/code/game/gamemodes/autotraitor/autotraitor.dm b/code/game/gamemodes/autotraitor/autotraitor.dm index eb32bed006d..9ecc3e89342 100644 --- a/code/game/gamemodes/autotraitor/autotraitor.dm +++ b/code/game/gamemodes/autotraitor/autotraitor.dm @@ -69,7 +69,7 @@ /datum/game_mode/traitor/autotraitor/proc/traitorcheckloop() spawn(9000) - if(shuttle_master.emergency.mode >= SHUTTLE_ESCAPE) + if(SSshuttle.emergency.mode >= SHUTTLE_ESCAPE) return //message_admins("Performing AutoTraitor Check") var/playercount = 0 @@ -156,7 +156,7 @@ /datum/game_mode/traitor/autotraitor/latespawn(mob/living/carbon/human/character) ..() - if(shuttle_master.emergency.mode >= SHUTTLE_ESCAPE) + if(SSshuttle.emergency.mode >= SHUTTLE_ESCAPE) return //message_admins("Late Join Check") if(character.client && (ROLE_TRAITOR in character.client.prefs.be_special) && !jobban_isbanned(character, ROLE_TRAITOR) && !jobban_isbanned(character, "Syndicate")) diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index 80bba117a20..6949de8c9b3 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -145,8 +145,8 @@ var/list/blob_nodes = list() for(var/datum/mind/blob in infected_crew) greet_blob(blob) - if(shuttle_master) - shuttle_master.emergencyNoEscape = 1 + if(SSshuttle) + SSshuttle.emergencyNoEscape = 1 spawn(0) diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index f2e8db26b40..344bba8f5c2 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -256,7 +256,7 @@ var/global/list/all_cults = list() var/area/A = get_area(cult_mind.current ) if( is_type_in_list(A, centcom_areas)) acolytes_survived++ - else if(A == shuttle_master.emergency.areaInstance && shuttle_master.emergency.mode >= SHUTTLE_ESCAPE) //snowflaked into objectives because shitty bay shuttles had areas to auto-determine this + else if(A == SSshuttle.emergency.areaInstance && SSshuttle.emergency.mode >= SHUTTLE_ESCAPE) //snowflaked into objectives because shitty bay shuttles had areas to auto-determine this acolytes_survived++ if(acolytes_survived>=acolytes_needed) diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index b8e5365cb5d..f4252c4a909 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -251,10 +251,10 @@ to_chat(user, "Nar-Sie or his avatars are already on this plane, there is no delaying the end of all things.") return - if(shuttle_master.emergency.mode == SHUTTLE_CALL) + if(SSshuttle.emergency.mode == SHUTTLE_CALL) var/cursetime = 1800 - var/timer = shuttle_master.emergency.timeLeft(1) + cursetime - shuttle_master.emergency.setTimer(timer) + var/timer = SSshuttle.emergency.timeLeft(1) + cursetime + SSshuttle.emergency.setTimer(timer) to_chat(user,"You shatter the orb! A dark essence spirals into the air, then disappears.") playsound(user.loc, 'sound/effects/Glassbr1.ogg', 50, 1) qdel(src) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 087bfbb4008..7ed941cd930 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -626,8 +626,8 @@ var/list/teleport_runes = list() new /mob/living/simple_animal/slaughter/cult(T, pick(NORTH, EAST, SOUTH, WEST)) new /mob/living/simple_animal/slaughter/cult(T, pick(NORTHEAST, SOUTHEAST, NORTHWEST, SOUTHWEST)) cult_mode.demons_summoned = 1 - shuttle_master.emergency.request(null, 0.5,null) - shuttle_master.emergency.canRecall = FALSE + SSshuttle.emergency.request(null, 0.5,null) + SSshuttle.emergency.canRecall = FALSE cult_mode.third_phase() qdel(src) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 760868e8435..6d1d0bb3f7a 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -176,7 +176,7 @@ break /datum/game_mode/proc/check_finished() //to be called by ticker - if((shuttle_master.emergency && shuttle_master.emergency.mode >= SHUTTLE_ENDGAME) || station_was_nuked) + if((SSshuttle.emergency && SSshuttle.emergency.mode >= SHUTTLE_ENDGAME) || station_was_nuked) return 1 return 0 @@ -198,7 +198,7 @@ var/list/area/escape_locations = list(/area/shuttle/escape, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom) - if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME) //shuttle didn't get to centcom + if(SSshuttle.emergency.mode < SHUTTLE_ENDGAME) //shuttle didn't get to centcom escape_locations -= /area/shuttle/escape for(var/mob/M in player_list) @@ -214,7 +214,7 @@ if(M.loc && M.loc.loc && M.loc.loc.type in escape_locations) escaped_total++ - if(M.loc && M.loc.loc && M.loc.loc.type == shuttle_master.emergency.areaInstance.type && shuttle_master.emergency.mode >= SHUTTLE_ENDGAME) + if(M.loc && M.loc.loc && M.loc.loc.type == SSshuttle.emergency.areaInstance.type && SSshuttle.emergency.mode >= SHUTTLE_ENDGAME) escaped_on_shuttle++ if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape_pod1/centcom) diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 0c609c818b4..9e6b5e603e6 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -386,7 +386,7 @@ var/round_start_time = 0 //emergency_shuttle.process() DONE THROUGH PROCESS SCHEDULER - var/game_finished = shuttle_master.emergency.mode >= SHUTTLE_ENDGAME || mode.station_was_nuked + var/game_finished = SSshuttle.emergency.mode >= SHUTTLE_ENDGAME || mode.station_was_nuked if(config.continuous_rounds) mode.check_finished() // some modes contain var-changing code in here, so call even if we don't uses result else diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 8f4b5dab95e..e61cb1a46a0 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -57,10 +57,10 @@ /obj/machinery/doomsday_device/Destroy() fast_processing -= src - shuttle_master.emergencyNoEscape = 0 - if(shuttle_master.emergency.mode == SHUTTLE_STRANDED) - shuttle_master.emergency.mode = SHUTTLE_DOCKED - shuttle_master.emergency.timer = world.time + SSshuttle.emergencyNoEscape = 0 + if(SSshuttle.emergency.mode == SHUTTLE_STRANDED) + SSshuttle.emergency.mode = SHUTTLE_DOCKED + SSshuttle.emergency.timer = world.time priority_announcement.Announce("Hostile environment resolved. You have 3 minutes to board the Emergency Shuttle.", "Priority Announcement", 'sound/AI/shuttledock.ogg') return ..() @@ -68,7 +68,7 @@ detonation_timer = world.time + default_timer timing = 1 fast_processing += src - shuttle_master.emergencyNoEscape = 1 + SSshuttle.emergencyNoEscape = 1 /obj/machinery/doomsday_device/proc/seconds_remaining() . = max(0, (round(detonation_timer - world.time) / 10)) @@ -77,10 +77,10 @@ var/turf/T = get_turf(src) if(!T || !is_station_level(T.z)) minor_announcement.Announce("DOOMSDAY DEVICE OUT OF STATION RANGE, ABORTING", "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", 'sound/misc/notice1.ogg') - shuttle_master.emergencyNoEscape = 0 - if(shuttle_master.emergency.mode == SHUTTLE_STRANDED) - shuttle_master.emergency.mode = SHUTTLE_DOCKED - shuttle_master.emergency.timer = world.time + SSshuttle.emergencyNoEscape = 0 + if(SSshuttle.emergency.mode == SHUTTLE_STRANDED) + SSshuttle.emergency.mode = SHUTTLE_DOCKED + SSshuttle.emergency.timer = world.time priority_announcement.Announce("Hostile environment resolved. You have 3 minutes to board the Emergency Shuttle.", "Priority Announcement", 'sound/AI/shuttledock.ogg') qdel(src) if(!timing) diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm index deb3676e164..18b2e020716 100644 --- a/code/game/gamemodes/meteor/meteor.dm +++ b/code/game/gamemodes/meteor/meteor.dm @@ -38,7 +38,7 @@ var/turf/location = get_turf(player.loc) if(!location) continue - if(location.loc.type == shuttle_master.emergency.areaInstance.type) //didn't work in the switch for some reason + if(location.loc.type == SSshuttle.emergency.areaInstance.type) //didn't work in the switch for some reason text += "
[player.real_name] escaped on the emergency shuttle" else diff --git a/code/game/gamemodes/miniantags/abduction/abduction.dm b/code/game/gamemodes/miniantags/abduction/abduction.dm index 4bfc8c9672d..9926f27ef10 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction.dm @@ -176,8 +176,8 @@ var/obj/machinery/abductor/console/con = get_team_console(team_number) var/datum/objective/objective = team_objectives[team_number] if(con.experiment.points >= objective.target_amount) - shuttle_master.emergency.request(null, 0.5) - shuttle_master.emergency.canRecall = FALSE + SSshuttle.emergency.request(null, 0.5) + SSshuttle.emergency.canRecall = FALSE finished = 1 return ..() return ..() diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 17afd375952..2932d39cb16 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -299,7 +299,7 @@ proc/issyndicate(mob/living/M as mob) if(!D.onCentcom()) disk_rescued = 0 break - var/crew_evacuated = (shuttle_master.emergency.mode >= SHUTTLE_ESCAPE) + var/crew_evacuated = (SSshuttle.emergency.mode >= SHUTTLE_ESCAPE) //var/operatives_are_dead = is_operatives_are_dead() diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 6b78a31dac0..b0d1261996a 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -370,7 +370,7 @@ var/bomb_set if(ticker) if(ticker.mode && ticker.mode.name == "nuclear emergency") - var/obj/docking_port/mobile/syndie_shuttle = shuttle_master.getShuttle("syndicate") + var/obj/docking_port/mobile/syndie_shuttle = SSshuttle.getShuttle("syndicate") if(syndie_shuttle) ticker.mode:syndies_didnt_escape = is_station_level(syndie_shuttle.z) ticker.mode:nuke_off_station = off_station diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index e9bea1d8b1d..285654ea81c 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -246,7 +246,7 @@ visible_message("Authentication Disk Locator mode actived.") return if(!home) - home = shuttle_master.getShuttle("syndicate") + home = SSshuttle.getShuttle("syndicate") if(!home) icon_state = icon_null return diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index a0ba4773785..2e3862ce583 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -177,16 +177,16 @@ var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) - /datu /datum/objective/hijack/check_completion() if(!owner.current || owner.current.stat) return 0 - if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME) + if(SSshuttle.emergency.mode < SHUTTLE_ENDGAME) return 0 if(issilicon(owner.current)) return 0 var/area/A = get_area(owner.current) - if(shuttle_master.emergency.areaInstance != A) + if(SSshuttle.emergency.areaInstance != A) return 0 - return shuttle_master.emergency.is_hijacked() + return SSshuttle.emergency.is_hijacked() /datum/objective/hijackclone explanation_text = "Hijack the shuttle by ensuring only you (or your copies) escape." @@ -195,10 +195,10 @@ var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) - /datu /datum/objective/hijackclone/check_completion() if(!owner.current) return 0 - if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME) + if(SSshuttle.emergency.mode < SHUTTLE_ENDGAME) return 0 - var/area/A = shuttle_master.emergency.areaInstance + var/area/A = SSshuttle.emergency.areaInstance for(var/mob/living/player in player_list) //Make sure nobody else is onboard if(player.mind && player.mind != owner) @@ -226,12 +226,12 @@ var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) - /datu /datum/objective/block/check_completion() if(!istype(owner.current, /mob/living/silicon)) return 0 - if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME) + if(SSshuttle.emergency.mode < SHUTTLE_ENDGAME) return 0 if(!owner.current) return 0 - var/area/A = shuttle_master.emergency.areaInstance + var/area/A = SSshuttle.emergency.areaInstance var/list/protected_mobs = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot) for(var/mob/living/player in player_list) @@ -258,7 +258,7 @@ var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) - /datu return 1 if(ticker.mode.station_was_nuked) //If they escaped the blast somehow, let them win return 1 - if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME) + if(SSshuttle.emergency.mode < SHUTTLE_ENDGAME) return 0 var/turf/location = get_turf(owner.current) if(!location) diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 089cad71a3a..b7679db6495 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -80,8 +80,8 @@ for(var/datum/mind/rev_mind in head_revolutionaries) greet_revolutionary(rev_mind) modePlayer += head_revolutionaries - if(shuttle_master) - shuttle_master.emergencyNoEscape = 1 + if(SSshuttle) + SSshuttle.emergencyNoEscape = 1 ..() @@ -216,10 +216,10 @@ /datum/game_mode/revolution/check_finished() if(config.continuous_rounds) if(finished != 0) - shuttle_master.emergencyNoEscape = 0 - if(shuttle_master.emergency.mode == SHUTTLE_STRANDED) - shuttle_master.emergency.mode = SHUTTLE_DOCKED - shuttle_master.emergency.timer = world.time + SSshuttle.emergencyNoEscape = 0 + if(SSshuttle.emergency.mode == SHUTTLE_STRANDED) + SSshuttle.emergency.mode = SHUTTLE_DOCKED + SSshuttle.emergency.timer = world.time command_announcement.Announce("Hostile enviroment resolved. You have 3 minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg') return ..() if(finished != 0) diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm index d34ebba4aa2..d946c1450f1 100644 --- a/code/game/gamemodes/scoreboard.dm +++ b/code/game/gamemodes/scoreboard.dm @@ -29,7 +29,7 @@ if(I.stat == DEAD && is_station_level(I.z)) score_deadcrew++ - if(shuttle_master.emergency.mode >= SHUTTLE_ENDGAME) + if(SSshuttle.emergency.mode >= SHUTTLE_ENDGAME) for(var/mob/living/player in mob_list) if(player.client) if(player.stat != DEAD) @@ -43,12 +43,12 @@ var/cash_score = 0 var/dmg_score = 0 - if(shuttle_master.emergency.mode >= SHUTTLE_ENDGAME) + if(SSshuttle.emergency.mode >= SHUTTLE_ENDGAME) for(var/mob/living/carbon/human/E in mob_list) cash_score = 0 dmg_score = 0 var/turf/location = get_turf(E.loc) - var/area/escape_zone = shuttle_master.emergency.areaInstance + var/area/escape_zone = SSshuttle.emergency.areaInstance if(E.stat != DEAD && location in escape_zone) // Escapee Scores cash_score = get_score_container_worth(E) @@ -183,7 +183,7 @@ Ore Mined: [score_oremined] ([score_oremined * 2] Points)
Refreshments Prepared: [score_meals] ([score_meals * 5] Points)
Research Completed: [score_researchdone] ([score_researchdone * 30] Points)
"} - if(shuttle_master.emergency.mode == SHUTTLE_ENDGAME) dat += "Shuttle Escapees: [score_escapees] ([score_escapees * 25] Points)
" + if(SSshuttle.emergency.mode == SHUTTLE_ENDGAME) dat += "Shuttle Escapees: [score_escapees] ([score_escapees * 25] Points)
" dat += {"Random Events Endured: [score_eventsendured] ([score_eventsendured * 50] Points)
Whole Station Powered: [score_powerbonus ? "Yes" : "No"] ([score_powerbonus * 2500] Points)
Ultra-Clean Station: [score_mess ? "No" : "Yes"] ([score_messbonus * 3000] Points)

@@ -203,7 +203,7 @@ dat += {"Richest Escapee: [score_richestname], [score_richestjob]: $[num2text(score_richestcash,50)] ([score_richestkey])
Most Battered Escapee: [score_dmgestname], [score_dmgestjob]: [score_dmgestdamage] damage ([score_dmgestkey])
"} else - if(shuttle_master.emergency.mode <= SHUTTLE_STRANDED) + if(SSshuttle.emergency.mode <= SHUTTLE_STRANDED) dat += "The station wasn't evacuated!
" else dat += "No-one escaped!
" diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 6a1c242efb4..06e912c9da8 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -255,11 +255,11 @@ Made by Xhuis /datum/game_mode/shadowling/declare_completion() - 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 + if(check_shadow_victory() && SSshuttle.emergency.mode >= SHUTTLE_ESCAPE) //Doesn't end instantly - this is hacky and I don't know of a better way ~X to_chat(world, "The shadowlings have ascended and taken over the station!") else if(shadowling_dead && !check_shadow_victory()) //If the shadowlings have ascended, they can not lose the round to_chat(world, "The shadowlings have been killed by the crew!") - else if(!check_shadow_victory() && shuttle_master.emergency.mode >= SHUTTLE_ESCAPE) + else if(!check_shadow_victory() && SSshuttle.emergency.mode >= SHUTTLE_ESCAPE) to_chat(world, "The crew escaped the station before the shadowlings could ascend!") else to_chat(world, "The shadowlings have failed!") diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index ea846e394a5..31a3fa6d63c 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -703,7 +703,7 @@ to_chat(user, "[target] must be a thrall.") charge_counter = charge_max return - if(shuttle_master.emergency.mode != SHUTTLE_CALL) + if(SSshuttle.emergency.mode != SHUTTLE_CALL) to_chat(user, "The shuttle must be inbound only to the station.") charge_counter = charge_max return @@ -720,13 +720,13 @@ M.visible_message("[M]'s eyes suddenly flare red. They proceed to collapse on the floor, not breathing.", \ "...speeding by... ...pretty blue glow... ...touch it... ...no glow now... ...no light... ...nothing at all...") M.death() - if(shuttle_master.emergency.mode == SHUTTLE_CALL) + if(SSshuttle.emergency.mode == SHUTTLE_CALL) var/more_minutes = 9000 - var/timer = shuttle_master.emergency.timeLeft() + var/timer = SSshuttle.emergency.timeLeft() timer += more_minutes event_announcement.Announce("Major system failure aboard the emergency shuttle. This will extend its arrival time by approximately 15 minutes and the shuttle is unable to be recalled.", "System Failure", 'sound/misc/notice1.ogg') - shuttle_master.emergency.setTimer(timer) - shuttle_master.emergency.canRecall = FALSE + SSshuttle.emergency.setTimer(timer) + SSshuttle.emergency.canRecall = FALSE user.mind.spell_list.Remove(src) //Can only be used once! qdel(src) diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm index 7aebaa0b044..d2582243d8c 100644 --- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm @@ -178,8 +178,8 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N H.loc = A sleep(50) if(!ticker.mode.shadowling_ascended) - shuttle_master.emergency.request(null, 0.3) - shuttle_master.emergency.canRecall = FALSE + SSshuttle.emergency.request(null, 0.3) + SSshuttle.emergency.canRecall = FALSE ticker.mode.shadowling_ascended = 1 A.mind.RemoveSpell(src) qdel(H) diff --git a/code/game/gamemodes/wizard/raginmages.dm b/code/game/gamemodes/wizard/raginmages.dm index a75da0edb13..e252800f46a 100644 --- a/code/game/gamemodes/wizard/raginmages.dm +++ b/code/game/gamemodes/wizard/raginmages.dm @@ -116,7 +116,7 @@ /datum/game_mode/wizard/raginmages/proc/make_more_mages() - if(making_mage || shuttle_master.emergency.mode >= SHUTTLE_ESCAPE) + if(making_mage || SSshuttle.emergency.mode >= SHUTTLE_ESCAPE) return 0 making_mage = 1 var/list/candidates = list() diff --git a/code/game/jobs/job_objectives/science.dm b/code/game/jobs/job_objectives/science.dm index ac646b24080..0d5b4aebd83 100644 --- a/code/game/jobs/job_objectives/science.dm +++ b/code/game/jobs/job_objectives/science.dm @@ -13,8 +13,8 @@ return desc /datum/job_objective/maximize_research/check_for_completion() - for(var/tech in shuttle_master.techLevels) - if(shuttle_master.techLevels[tech] > 0) + for(var/tech in SSshuttle.techLevels) + if(SSshuttle.techLevels[tech] > 0) return 1 return 0 diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 865f683946e..704cbed07e9 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -163,7 +163,7 @@ return call_shuttle_proc(usr, input) - if(shuttle_master.emergency.timer) + if(SSshuttle.emergency.timer) post_status("shuttle") setMenuState(usr,COMM_SCREEN_MAIN) @@ -175,7 +175,7 @@ var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No") if(response == "Yes") cancel_call_proc(usr) - if(shuttle_master.emergency.timer) + if(SSshuttle.emergency.timer) post_status("shuttle") setMenuState(usr,COMM_SCREEN_MAIN) @@ -392,16 +392,16 @@ data["current_message"] = data["is_ai"] ? messagetext[aicurrmsg] : messagetext[currmsg] data["current_message_title"] = data["is_ai"] ? messagetitle[aicurrmsg] : messagetitle[currmsg] - data["lastCallLoc"] = shuttle_master.emergencyLastCallLoc ? format_text(shuttle_master.emergencyLastCallLoc.name) : null + data["lastCallLoc"] = SSshuttle.emergencyLastCallLoc ? format_text(SSshuttle.emergencyLastCallLoc.name) : null var/shuttle[0] - switch(shuttle_master.emergency.mode) + switch(SSshuttle.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() + if(SSshuttle.emergency.mode == SHUTTLE_CALL) + var/timeleft = SSshuttle.emergency.timeLeft() shuttle["eta"] = "[timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]" data["shuttle"] = shuttle @@ -447,11 +447,11 @@ to_chat(user, "Central Command will not allow the shuttle to be called. Consider all contracts terminated.") return - if(shuttle_master.emergencyNoEscape) + if(SSshuttle.emergencyNoEscape) to_chat(user, "The emergency shuttle may not be sent at this time. Please try again later.") return - if(shuttle_master.emergency.mode > SHUTTLE_ESCAPE) + if(SSshuttle.emergency.mode > SHUTTLE_ESCAPE) to_chat(user, "The emergency shuttle may not be called while returning to Central Command.") return @@ -459,7 +459,7 @@ to_chat(user, "Under directive 7-10, [station_name()] is quarantined until further notice.") return - shuttle_master.requestEvac(user, reason) + SSshuttle.requestEvac(user, reason) log_game("[key_name(user)] has called the shuttle.") message_admins("[key_name_admin(user)] has called the shuttle.", 1) @@ -468,7 +468,7 @@ /proc/init_shift_change(var/mob/user, var/force = 0) // if force is 0, some things may stop the shuttle call if(!force) - if(shuttle_master.emergencyNoEscape) + if(SSshuttle.emergencyNoEscape) to_chat(user, "Central Command does not currently have a shuttle available in your sector. Please try again later.") return @@ -485,11 +485,11 @@ return if(seclevel2num(get_security_level()) >= SEC_LEVEL_RED) // There is a serious threat we gotta move no time to give them five minutes. - shuttle_master.emergency.request(null, 0.5, null, " Automatic Crew Transfer", 1) - shuttle_master.emergency.canRecall = FALSE + SSshuttle.emergency.request(null, 0.5, null, " Automatic Crew Transfer", 1) + SSshuttle.emergency.canRecall = FALSE else - shuttle_master.emergency.request(null, 1, null, " Automatic Crew Transfer", 0) - shuttle_master.emergency.canRecall = FALSE + SSshuttle.emergency.request(null, 1, null, " Automatic Crew Transfer", 0) + SSshuttle.emergency.canRecall = FALSE if(user) log_game("[key_name(user)] has called the shuttle.") message_admins("[key_name_admin(user)] has called the shuttle - [formatJumpTo(user)].", 1) @@ -500,7 +500,7 @@ if(ticker.mode.name == "meteor") return - if(shuttle_master.cancelEvac(user)) + if(SSshuttle.cancelEvac(user)) log_game("[key_name(user)] has recalled the shuttle.") message_admins("[key_name_admin(user)] has recalled the shuttle - [ADMIN_FLW(user)].", 1) else @@ -534,7 +534,7 @@ /obj/machinery/computer/communications/Destroy() shuttle_caller_list -= src - shuttle_master.autoEvac() + SSshuttle.autoEvac() return ..() /obj/item/circuitboard/communications/New() @@ -543,7 +543,7 @@ /obj/item/circuitboard/communications/Destroy() shuttle_caller_list -= src - shuttle_master.autoEvac() + SSshuttle.autoEvac() return ..() /proc/print_command_report(text = "", title = "Central Command Update") diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index ebf3cfeadf9..12e9a5cf38f 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -89,10 +89,10 @@ return 1 if(STATUS_DISPLAY_TRANSFER_SHUTTLE_TIME) //emergency shuttle timer var/use_warn = 0 - if(shuttle_master.emergency && shuttle_master.emergency.timer) + if(SSshuttle.emergency && SSshuttle.emergency.timer) use_warn = 1 - message1 = "-[shuttle_master.emergency.getModeStr()]-" - message2 = shuttle_master.emergency.getTimerStr() + message1 = "-[SSshuttle.emergency.getModeStr()]-" + message2 = SSshuttle.emergency.getTimerStr() if(length(message2) > CHARS_PER_LINE) message2 = "Error!" diff --git a/code/game/machinery/supply_display.dm b/code/game/machinery/supply_display.dm index 863d76ef7b6..d08f68b2914 100644 --- a/code/game/machinery/supply_display.dm +++ b/code/game/machinery/supply_display.dm @@ -4,8 +4,8 @@ /obj/machinery/status_display/supply_display/update() if(!..() && mode == STATUS_DISPLAY_CUSTOM) - if(shuttle_master.supply.mode == SHUTTLE_IDLE) - if(is_station_level(shuttle_master.supply.z)) + if(SSshuttle.supply.mode == SHUTTLE_IDLE) + if(is_station_level(SSshuttle.supply.z)) message1 = "CARGO" message2 = "Docked" else @@ -13,7 +13,7 @@ message2 = station_time_timestamp("hh:mm") else message1 = "CARGO" - message2 = shuttle_master.supply.getTimerStr() + message2 = SSshuttle.supply.getTimerStr() if(lentext(message2) > CHARS_PER_LINE) message2 = "Error" diff --git a/code/game/world.dm b/code/game/world.dm index 516346aeca3..166dd42f6d0 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -126,11 +126,11 @@ var/world_topic_spam_protect_time = world.timeofday s["security_level"] = get_security_level() s["ticker_state"] = ticker.current_state - if(shuttle_master && shuttle_master.emergency) + if(SSshuttle && SSshuttle.emergency) // Shuttle status, see /__DEFINES/stat.dm - s["shuttle_mode"] = shuttle_master.emergency.mode + s["shuttle_mode"] = SSshuttle.emergency.mode // Shuttle timer, in seconds - s["shuttle_timer"] = shuttle_master.emergency.timeLeft() + s["shuttle_timer"] = SSshuttle.emergency.timeLeft() for(var/i in 1 to admins.len) var/list/A = admins[i] diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index b03f35b6091..78b175b4656 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -407,11 +407,11 @@ dat += "Current Game Mode: [ticker.mode.name]
" dat += "Round Duration: [round(ROUND_TIME / 36000)]:[add_zero(num2text(ROUND_TIME / 600 % 60), 2)]:[add_zero(num2text(ROUND_TIME / 10 % 60), 2)]
" dat += "Emergency shuttle
" - if(shuttle_master.emergency.mode < SHUTTLE_CALL) + if(SSshuttle.emergency.mode < SHUTTLE_CALL) dat += "Call Shuttle
" else - var/timeleft = shuttle_master.emergency.timeLeft() - if(shuttle_master.emergency.mode < SHUTTLE_DOCKED) + var/timeleft = SSshuttle.emergency.timeLeft() + if(SSshuttle.emergency.mode < SHUTTLE_DOCKED) dat += "ETA: [(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]
" dat += "Send Back
" else diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 194b1d49035..969c1558bae 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -274,22 +274,22 @@ switch(href_list["call_shuttle"]) if("1") - if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED) + if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED) return - shuttle_master.emergency.request() + SSshuttle.emergency.request() log_admin("[key_name(usr)] called the Emergency Shuttle") message_admins("[key_name_admin(usr)] called the Emergency Shuttle to the station") if("2") - if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED) + if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED) return - switch(shuttle_master.emergency.mode) + switch(SSshuttle.emergency.mode) if(SHUTTLE_CALL) - shuttle_master.emergency.cancel() + SSshuttle.emergency.cancel() log_admin("[key_name(usr)] sent the Emergency Shuttle back") message_admins("[key_name_admin(usr)] sent the Emergency Shuttle back") else - shuttle_master.emergency.cancel() + SSshuttle.emergency.cancel() log_admin("[key_name(usr)] called the Emergency Shuttle") message_admins("[key_name_admin(usr)] called the Emergency Shuttle to the station") @@ -299,10 +299,10 @@ else if(href_list["edit_shuttle_time"]) if(!check_rights(R_SERVER)) return - var/timer = input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", shuttle_master.emergency.timeLeft() ) as num - shuttle_master.emergency.setTimer(timer*10) + var/timer = input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", SSshuttle.emergency.timeLeft() ) as num + SSshuttle.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.") + minor_announcement.Announce("The emergency shuttle will reach its destination in [round(SSshuttle.emergency.timeLeft(600))] minutes.") message_admins("[key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds") href_list["secrets"] = "check_antagonist" @@ -2859,21 +2859,21 @@ 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")) + if(!SSshuttle.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")) + if(!SSshuttle.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")) + if(!SSshuttle.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") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 2f794dafbd0..5ab895a281c 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -794,7 +794,7 @@ Traitors and the like can also be revived with the previous role mostly intact. set category = "Admin" set name = "Call Shuttle" - if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED) + if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED) return if(!check_rights(R_ADMIN)) @@ -804,11 +804,11 @@ Traitors and the like can also be revived with the previous role mostly intact. if(confirm != "Yes") return if(alert("Set Shuttle Recallable (Select Yes unless you know what this does)", "Recallable?", "Yes", "No") == "Yes") - shuttle_master.emergency.canRecall = TRUE + SSshuttle.emergency.canRecall = TRUE else - shuttle_master.emergency.canRecall = FALSE + SSshuttle.emergency.canRecall = FALSE - shuttle_master.emergency.request() + SSshuttle.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.") @@ -823,20 +823,20 @@ Traitors and the like can also be revived with the previous role mostly intact. return if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return - if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED) + if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED) return - if(shuttle_master.emergency.canRecall == FALSE) + if(SSshuttle.emergency.canRecall == FALSE) if(alert("Shuttle is currently set to be nonrecallable. Recalling may break things. Respect Recall Status?", "Override Recall Status?", "Yes", "No") == "Yes") return else var/keepStatus = alert("Maintain recall status on future shuttle calls?", "Maintain Status?", "Yes", "No") == "Yes" //Keeps or drops recallability - shuttle_master.emergency.canRecall = TRUE // must be true for cancel proc to work - shuttle_master.emergency.cancel() + SSshuttle.emergency.canRecall = TRUE // must be true for cancel proc to work + SSshuttle.emergency.cancel() if(keepStatus) - shuttle_master.emergency.canRecall = FALSE // restores original status + SSshuttle.emergency.canRecall = FALSE // restores original status else - shuttle_master.emergency.cancel() + SSshuttle.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.") @@ -853,11 +853,11 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!check_rights(R_ADMIN)) return - if(shuttle_master) - shuttle_master.emergencyNoEscape = !shuttle_master.emergencyNoEscape + if(SSshuttle) + SSshuttle.emergencyNoEscape = !SSshuttle.emergencyNoEscape - 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.") + log_admin("[key_name(src)] has [SSshuttle.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.") + message_admins("[key_name_admin(usr)] has [SSshuttle.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.") /client/proc/cmd_admin_attack_log(mob/M as mob in mob_list) set category = "Admin" diff --git a/code/modules/mining/laborcamp/laborshuttle.dm b/code/modules/mining/laborcamp/laborshuttle.dm index 626f9ea1def..36f16438c09 100644 --- a/code/modules/mining/laborcamp/laborshuttle.dm +++ b/code/modules/mining/laborcamp/laborshuttle.dm @@ -16,7 +16,7 @@ /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") + var/obj/docking_port/mobile/M = SSshuttle.getShuttle("laborcamp") if(!M) to_chat(usr, "Cannot locate shuttle!") return 0 diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm index 527f59fe740..d3e22e5bca2 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -102,7 +102,7 @@ if(!alone_in_area(get_area(src), usr)) to_chat(usr, "Prisoners are only allowed to be released while alone.") else - switch(shuttle_master.moveShuttle("laborcamp","laborcamp_home")) + switch(SSshuttle.moveShuttle("laborcamp","laborcamp_home")) if(1) to_chat(usr, "Shuttle not found") if(2) @@ -116,7 +116,7 @@ if(href_list["choice"] == "release") if(alone_in_area(get_area(loc), usr)) - var/obj/docking_port/stationary/S = shuttle_master.getDock("laborcamp_home") + var/obj/docking_port/stationary/S = SSshuttle.getDock("laborcamp_home") if(S && S.get_docked()) if(release_door && release_door.density) release_door.open() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index c0393d78f92..2152b611503 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -265,7 +265,7 @@ var/list/ai_verbs_default = list( /mob/living/silicon/ai/Destroy() ai_list -= src shuttle_caller_list -= src - shuttle_master.autoEvac() + SSshuttle.autoEvac() QDEL_NULL(eyeobj) // No AI, no Eye if(malfhacking) deltimer(malfhacking) diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index 6d7cb04639f..553af6f09b8 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -16,7 +16,7 @@ see_invisible = SEE_INVISIBLE_LEVEL_TWO shuttle_caller_list -= src - shuttle_master.autoEvac() + SSshuttle.autoEvac() if(nuking) set_security_level("red") @@ -26,10 +26,10 @@ if(doomsday_device) doomsday_device.timing = 0 - shuttle_master.emergencyNoEscape = 0 - if(shuttle_master.emergency.mode == SHUTTLE_STRANDED) - shuttle_master.emergency.mode = SHUTTLE_DOCKED - shuttle_master.emergency.timer = world.time + SSshuttle.emergencyNoEscape = 0 + if(SSshuttle.emergency.mode == SHUTTLE_STRANDED) + SSshuttle.emergency.mode = SHUTTLE_DOCKED + SSshuttle.emergency.timer = world.time priority_announcement.Announce("Hostile environment resolved. You have 3 minutes to board the Emergency Shuttle.", "Priority Announcement", 'sound/AI/shuttledock.ogg') qdel(doomsday_device) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 841c17a248e..9857bd0c1de 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -992,9 +992,9 @@ var/list/slot_equipment_priority = list( \ // this function displays the shuttles ETA in the status panel if the shuttle has been called /mob/proc/show_stat_emergency_shuttle_eta() - var/ETA = shuttle_master.emergency.getModeStr() + var/ETA = SSshuttle.emergency.getModeStr() if(ETA) - stat(null, "[ETA] [shuttle_master.emergency.getTimerStr()]") + stat(null, "[ETA] [SSshuttle.emergency.getTimerStr()]") /mob/proc/show_stat_turf_contents() if(listed_turf && client) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index a2586dd65a1..aa1606fe6db 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -432,9 +432,9 @@ var/dat = "
" dat += "Round Duration: [round(hours)]h [round(mins)]m
" - if(shuttle_master.emergency.mode >= SHUTTLE_ESCAPE) + if(SSshuttle.emergency.mode >= SHUTTLE_ESCAPE) dat += "The station has been evacuated.
" - else if(shuttle_master.emergency.mode >= SHUTTLE_CALL) + else if(SSshuttle.emergency.mode >= SHUTTLE_CALL) dat += "The station is currently undergoing evacuation procedures.
" if(length(job_master.prioritized_jobs)) diff --git a/code/modules/modular_computers/file_system/programs/command/comms.dm b/code/modules/modular_computers/file_system/programs/command/comms.dm index 2ca6d9928a3..e6c506ca027 100644 --- a/code/modules/modular_computers/file_system/programs/command/comms.dm +++ b/code/modules/modular_computers/file_system/programs/command/comms.dm @@ -34,7 +34,7 @@ /datum/computer_file/program/comm/Destroy() shuttle_caller_list -= src - shuttle_master.autoEvac() + SSshuttle.autoEvac() return ..() /datum/computer_file/program/comm/proc/is_authenticated(mob/user, loud = 1) @@ -145,16 +145,16 @@ data["current_message"] = data["is_ai"] ? messagetext[aicurrmsg] : messagetext[currmsg] data["current_message_title"] = data["is_ai"] ? messagetitle[aicurrmsg] : messagetitle[currmsg] - data["lastCallLoc"] = shuttle_master.emergencyLastCallLoc ? format_text(shuttle_master.emergencyLastCallLoc.name) : null + data["lastCallLoc"] = SSshuttle.emergencyLastCallLoc ? format_text(SSshuttle.emergencyLastCallLoc.name) : null var/shuttle[0] - switch(shuttle_master.emergency.mode) + switch(SSshuttle.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() + if(SSshuttle.emergency.mode == SHUTTLE_CALL) + var/timeleft = SSshuttle.emergency.timeLeft() shuttle["eta"] = "[timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]" data["shuttle"] = shuttle @@ -257,7 +257,7 @@ return 1 call_shuttle_proc(usr, input) - if(shuttle_master.emergency.timer) + if(SSshuttle.emergency.timer) post_status("shuttle") setMenuState(usr, COMM_SCREEN_MAIN) @@ -269,7 +269,7 @@ var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No") if(response == "Yes") cancel_call_proc(usr) - if(shuttle_master.emergency.timer) + if(SSshuttle.emergency.timer) post_status("shuttle") setMenuState(usr, COMM_SCREEN_MAIN) diff --git a/code/modules/pda/cart_apps.dm b/code/modules/pda/cart_apps.dm index 78a77442ffe..78f0eec355d 100644 --- a/code/modules/pda/cart_apps.dm +++ b/code/modules/pda/cart_apps.dm @@ -313,19 +313,19 @@ /datum/data/pda/app/supply/update_ui(mob/user as mob, list/data) var/supplyData[0] - if(shuttle_master.supply.mode == SHUTTLE_CALL) + if(SSshuttle.supply.mode == SHUTTLE_CALL) supplyData["shuttle_moving"] = 1 - if(!is_station_level(shuttle_master.supply.z)) + if(!is_station_level(SSshuttle.supply.z)) supplyData["shuttle_loc"] = "station" else supplyData["shuttle_loc"] = "centcom" - supplyData["shuttle_time"] = "([shuttle_master.supply.timeLeft(600)] Mins)" + supplyData["shuttle_time"] = "([SSshuttle.supply.timeLeft(600)] Mins)" var/supplyOrderCount = 0 var/supplyOrderData[0] - for(var/S in shuttle_master.shoppinglist) + for(var/S in SSshuttle.shoppinglist) var/datum/supply_order/SO = S supplyOrderCount++ supplyOrderData[++supplyOrderData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "ApprovedBy" = SO.orderedby, "Comment" = html_encode(SO.comment)) @@ -338,7 +338,7 @@ var/requestCount = 0 var/requestData[0] - for(var/S in shuttle_master.requestlist) + for(var/S in SSshuttle.requestlist) var/datum/supply_order/SO = S requestCount++ requestData[++requestData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "OrderedBy" = SO.orderedby, "Comment" = html_encode(SO.comment)) diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index 0520630dcac..b443fe1b853 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -38,8 +38,8 @@ narsie_spawn_animation() sleep(70) - shuttle_master.emergency.request(null, 0.3) // Cannot recall - shuttle_master.emergency.canRecall = FALSE + SSshuttle.emergency.request(null, 0.3) // Cannot recall + SSshuttle.emergency.canRecall = FALSE /obj/singularity/narsie/large/attack_ghost(mob/dead/observer/user as mob) makeNewConstruct(/mob/living/simple_animal/hostile/construct/harvester, user, null, 1) diff --git a/code/modules/security_levels/security levels.dm b/code/modules/security_levels/security levels.dm index aa96b79dd01..327ab65ed94 100644 --- a/code/modules/security_levels/security levels.dm +++ b/code/modules/security_levels/security levels.dm @@ -29,7 +29,7 @@ if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != security_level) if(level >= SEC_LEVEL_RED && security_level < SEC_LEVEL_RED) // Mark down this time to prevent shuttle cheese - shuttle_master.emergency_sec_level_time = world.time + SSshuttle.emergency_sec_level_time = world.time switch(level) if(SEC_LEVEL_GREEN) diff --git a/code/modules/shuttle/README.md b/code/modules/shuttle/README.md index 75db0ad14a7..598a162c7ea 100644 --- a/code/modules/shuttle/README.md +++ b/code/modules/shuttle/README.md @@ -124,7 +124,7 @@ use on Paradise, and none are very complex. ### Shuttle Controller This is a very simple change. On -tg-station13, the shuttle controller is referenced by a variable named `SSShuttle`. On Paradise, due to controller naming conventions, it is -instead named `shuttle_master`. +instead named `SSshuttle`. ### Airlocks The biggest modification comes in the form of how docking ports interact with airlocks. diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 09978047027..23b3c5950a1 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -11,11 +11,11 @@ return if(!istype(W, /obj/item/card)) return - if(shuttle_master.emergency.mode != SHUTTLE_DOCKED) + if(SSshuttle.emergency.mode != SHUTTLE_DOCKED) return if(!user) return - if(shuttle_master.emergency.timeLeft() < 11) + if(SSshuttle.emergency.timeLeft() < 11) return if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) if(istype(W, /obj/item/pda)) @@ -35,10 +35,10 @@ 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) + if(SSshuttle.emergency.mode != SHUTTLE_DOCKED || user.get_active_hand() != W) return 0 - var/seconds = shuttle_master.emergency.timeLeft() + var/seconds = SSshuttle.emergency.timeLeft() if(seconds <= 10) return 0 @@ -54,7 +54,7 @@ message_admins("[key_name_admin(user)] has launched the emergency shuttle [seconds] seconds before launch.") 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) + SSshuttle.emergency.setTimer(100) if("Repeal") if(authorized.Remove(W:registered_name)) @@ -66,12 +66,12 @@ 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() + if(!emagged && SSshuttle.emergency.mode == SHUTTLE_DOCKED) + var/time = SSshuttle.emergency.timeLeft() message_admins("[key_name_admin(user)] has emagged the emergency shuttle: [time] seconds before launch.") 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) + SSshuttle.emergency.setTimer(100) emagged = 1 @@ -98,15 +98,15 @@ if(!..()) return 0 //shuttle master not initialized - shuttle_master.emergency = src + SSshuttle.emergency = src return 1 /obj/docking_port/mobile/emergency/Destroy(force) if(force) // This'll make the shuttle subsystem use the backup shuttle. - if(shuttle_master.emergency == src) + if(SSshuttle.emergency == src) // If we're the selected emergency shuttle - shuttle_master.emergencyDeregister() + SSshuttle.emergencyDeregister() return ..() @@ -115,21 +115,21 @@ if(divisor <= 0) divisor = 10 if(!timer) - return round(shuttle_master.emergencyCallTime/divisor, 1) + return round(SSshuttle.emergencyCallTime/divisor, 1) var/dtime = world.time - timer switch(mode) if(SHUTTLE_ESCAPE) - dtime = max(shuttle_master.emergencyEscapeTime - dtime, 0) + dtime = max(SSshuttle.emergencyEscapeTime - dtime, 0) if(SHUTTLE_DOCKED) - dtime = max(shuttle_master.emergencyDockTime - dtime, 0) + dtime = max(SSshuttle.emergencyDockTime - dtime, 0) else - dtime = max(shuttle_master.emergencyCallTime - dtime, 0) + dtime = max(SSshuttle.emergencyCallTime - dtime, 0) return round(dtime/divisor, 1) /obj/docking_port/mobile/emergency/request(obj/docking_port/stationary/S, coefficient=1, area/signalOrigin, reason, redAlert) - shuttle_master.emergencyCallTime = initial(shuttle_master.emergencyCallTime) * coefficient + SSshuttle.emergencyCallTime = initial(SSshuttle.emergencyCallTime) * coefficient switch(mode) if(SHUTTLE_RECALL) mode = SHUTTLE_CALL @@ -144,11 +144,11 @@ return if(prob(70)) - shuttle_master.emergencyLastCallLoc = signalOrigin + SSshuttle.emergencyLastCallLoc = signalOrigin else - shuttle_master.emergencyLastCallLoc = null + SSshuttle.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." : "" ]") + 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][SSshuttle.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ]") if(reason == "Automatic Crew Transfer" && signalOrigin == null) // Best way we have to check that it's actually a crew transfer and not just a player using the same message- any other calls to this proc should have a signalOrigin. atc.shift_ending() @@ -167,10 +167,10 @@ mode = SHUTTLE_RECALL if(prob(70)) - shuttle_master.emergencyLastCallLoc = signalOrigin + SSshuttle.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." : "" ]") + SSshuttle.emergencyLastCallLoc = null + emergency_shuttle_recalled.Announce("The emergency shuttle has been recalled.[SSshuttle.emergencyLastCallLoc ? " Recall signal traced. Results can be viewed on any communications console." : "" ]") /obj/docking_port/mobile/emergency/proc/is_hijacked() for(var/mob/living/player in player_list) @@ -215,9 +215,9 @@ if(!ripples.len && (time_left <= SHUTTLE_RIPPLE_TIME) && ((mode == SHUTTLE_CALL) || (mode == SHUTTLE_ESCAPE))) var/destination if(mode == SHUTTLE_CALL) - destination = shuttle_master.getDock("emergency_home") + destination = SSshuttle.getDock("emergency_home") else if(mode == SHUTTLE_ESCAPE) - destination = shuttle_master.getDock("emergency_away") + destination = SSshuttle.getDock("emergency_away") create_ripples(destination) switch(mode) @@ -228,7 +228,7 @@ if(SHUTTLE_CALL) if(time_left <= 0) //move emergency shuttle to station - if(dock(shuttle_master.getDock("emergency_home"))) + if(dock(SSshuttle.getDock("emergency_home"))) setTimer(20) return mode = SHUTTLE_DOCKED @@ -246,7 +246,7 @@ */ if(SHUTTLE_DOCKED) - if(time_left <= 0 && shuttle_master.emergencyNoEscape) + if(time_left <= 0 && SSshuttle.emergencyNoEscape) priority_announcement.Announce("Hostile environment detected. Departure has been postponed indefinitely pending conflict resolution.") sound_played = 0 mode = SHUTTLE_STRANDED @@ -256,9 +256,9 @@ for(var/area/shuttle/escape/E in world) E << 'sound/effects/hyperspace_begin.ogg' - if(time_left <= 0 && !shuttle_master.emergencyNoEscape) + if(time_left <= 0 && !SSshuttle.emergencyNoEscape) //move each escape pod to its corresponding transit dock - for(var/obj/docking_port/mobile/pod/M in shuttle_master.mobile) + for(var/obj/docking_port/mobile/pod/M in SSshuttle.mobile) if(is_station_level(M.z)) //Will not launch from the mine/planet M.enterTransit() //now move the actual emergency shuttle to its transit dock @@ -275,8 +275,8 @@ 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")) + for(var/obj/docking_port/mobile/pod/M in SSshuttle.mobile) + M.dock(SSshuttle.getDock("[M.id]_away")) for(var/area/shuttle/escape/E in world) E << 'sound/effects/hyperspace_end.ogg' @@ -321,7 +321,7 @@ /* findTransitDock() - . = shuttle_master.getDock("[id]_transit") + . = SSshuttle.getDock("[id]_transit") if(.) return . return ..() */ @@ -368,7 +368,7 @@ roundstart_move = "backup_away" /obj/docking_port/mobile/emergency/backup/register() - var/current_emergency = shuttle_master.emergency + var/current_emergency = SSshuttle.emergency ..() - shuttle_master.emergency = current_emergency - shuttle_master.backup_shuttle = src + SSshuttle.emergency = current_emergency + SSshuttle.backup_shuttle = src diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 54f4836ff5b..cd539570219 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -154,15 +154,15 @@ var/lock_shuttle_doors = 0 /obj/docking_port/stationary/register() - if(!shuttle_master) + if(!SSshuttle) throw EXCEPTION("docking port [src] could not initialize.") return 0 - shuttle_master.stationary += src + SSshuttle.stationary += src if(!id) - id = "[shuttle_master.stationary.len]" + id = "[SSshuttle.stationary.len]" if(name == "dock") - name = "dock[shuttle_master.stationary.len]" + name = "dock[SSshuttle.stationary.len]" #ifdef DOCKING_PORT_HIGHLIGHT highlight("#f00") @@ -191,7 +191,7 @@ name = "In transit" //This looks weird, but- it means that the on-map instances can be named something actually usable to search for, but still appear correctly in terminals. - shuttle_master.transit += src + SSshuttle.transit += src return 1 /obj/docking_port/mobile @@ -236,22 +236,22 @@ ..() /obj/docking_port/mobile/register() - if(!shuttle_master) + if(!SSshuttle) throw EXCEPTION("docking port [src] could not initialize.") return 0 - shuttle_master.mobile += src + SSshuttle.mobile += src if(!id) - id = "[shuttle_master.mobile.len]" + id = "[SSshuttle.mobile.len]" if(name == "shuttle") - name = "shuttle[shuttle_master.mobile.len]" + name = "shuttle[SSshuttle.mobile.len]" return 1 /obj/docking_port/mobile/Destroy(force) if(force) - shuttle_master.mobile -= src + SSshuttle.mobile -= src areaInstance = null destination = null previous = null @@ -517,14 +517,14 @@ /obj/docking_port/mobile/proc/findTransitDock() - var/obj/docking_port/stationary/transit/T = shuttle_master.getDock("[id]_transit") + var/obj/docking_port/stationary/transit/T = SSshuttle.getDock("[id]_transit") if(T && check_dock(T)) return T /obj/docking_port/mobile/proc/findRoundstartDock() var/obj/docking_port/stationary/D - D = shuttle_master.getDock(roundstart_move) + D = SSshuttle.getDock(roundstart_move) if(D) return D @@ -536,7 +536,7 @@ . = dock_id(roundstart_move) /obj/docking_port/mobile/proc/dock_id(id) - var/port = shuttle_master.getDock(id) + var/port = SSshuttle.getDock(id) if(port) . = dock(port) else @@ -707,20 +707,20 @@ var/obj/docking_port/mobile/M if(!shuttleId) // find close shuttle that is ok to mess with - if(!shuttle_master) //intentionally mapping shuttle consoles without actual shuttles IS POSSIBLE OH MY GOD WHO KNEW *glare* + if(!SSshuttle) //intentionally mapping shuttle consoles without actual shuttles IS POSSIBLE OH MY GOD WHO KNEW *glare* return - for(var/obj/docking_port/mobile/D in shuttle_master.mobile) + for(var/obj/docking_port/mobile/D in SSshuttle.mobile) if(get_dist(src, D) <= max_connect_range && D.rebuildable) M = D shuttleId = M.id break - else if(!possible_destinations && shuttle_master) //possible destinations should **not** always exist; so, if it's specifically set to null, don't make it exist - M = shuttle_master.getShuttle(shuttleId) + else if(!possible_destinations && SSshuttle) //possible destinations should **not** always exist; so, if it's specifically set to null, don't make it exist + M = SSshuttle.getShuttle(shuttleId) if(M && !possible_destinations) // find perfect fits possible_destinations = "" - for(var/obj/docking_port/stationary/S in shuttle_master.stationary) + for(var/obj/docking_port/stationary/S in SSshuttle.stationary) if(!istype(S, /obj/docking_port/stationary/transit) && S.width == M.width && S.height == M.height && S.dwidth == M.dwidth && S.dheight == M.dheight && findtext(S.id, M.id)) possible_destinations += "[possible_destinations ? ";" : ""][S.id]" @@ -734,7 +734,7 @@ ui_interact(user) /obj/machinery/computer/shuttle/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - var/obj/docking_port/mobile/M = shuttle_master.getShuttle(shuttleId) + var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId) ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "shuttle_console.tmpl", M ? M.name : "shuttle", 300, 200) @@ -742,14 +742,14 @@ /obj/machinery/computer/shuttle/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state) var/data[0] - var/obj/docking_port/mobile/M = shuttle_master.getShuttle(shuttleId) + var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId) data["status"] = M ? M.getStatusText() : null if(M) data["shuttle"] = 1 var/list/docking_ports = list() data["docking_ports"] = docking_ports var/list/options = params2list(possible_destinations) - for(var/obj/docking_port/stationary/S in shuttle_master.stationary) + for(var/obj/docking_port/stationary/S in SSshuttle.stationary) if(!options.Find(S.id)) continue if(!M.check_dock(S)) @@ -775,7 +775,7 @@ // Seriously, though, NEVER trust a Topic with something like this. Ever. message_admins("move HREF ([src] attempted to move to: [href_list["move"]]) exploit attempted by [key_name_admin(usr)] on [src] (JMP)") return - switch(shuttle_master.moveShuttle(shuttleId, href_list["move"], 1)) + switch(SSshuttle.moveShuttle(shuttleId, href_list["move"], 1)) if(0) to_chat(usr, "Shuttle received message and will be sent shortly.") if(1) diff --git a/code/modules/shuttle/shuttle_manipulator.dm b/code/modules/shuttle/shuttle_manipulator.dm index 5ba25533445..0e67b74de67 100644 --- a/code/modules/shuttle/shuttle_manipulator.dm +++ b/code/modules/shuttle/shuttle_manipulator.dm @@ -87,7 +87,7 @@ data["templates_tabs"] += S.port_id // The first found shuttle type will be our default if(!existing_shuttle) - existing_shuttle = shuttle_master.getShuttle(S.port_id) + existing_shuttle = SSshuttle.getShuttle(S.port_id) templates[S.port_id] = list( "port_id" = S.port_id, "templates" = list() @@ -111,7 +111,7 @@ // Status panel data["shuttles"] = list() - for(var/i in shuttle_master.mobile) + for(var/i in SSshuttle.mobile) var/obj/docking_port/mobile/M = i var/list/L = list() L["name"] = M.name @@ -148,19 +148,19 @@ if(href_list["select_template_category"]) var/chosen_shuttle_id = href_list["select_template_category"] selected = null - existing_shuttle = shuttle_master.getShuttle(chosen_shuttle_id) + existing_shuttle = SSshuttle.getShuttle(chosen_shuttle_id) return 1 if(href_list["select_template"]) if(S) - existing_shuttle = shuttle_master.getShuttle(S.port_id) + existing_shuttle = SSshuttle.getShuttle(S.port_id) selected = S . = TRUE if(href_list["jump_to"]) if(href_list["type"] == "mobile") - for(var/i in shuttle_master.mobile) + for(var/i in SSshuttle.mobile) var/obj/docking_port/mobile/M = i if(M.id == href_list["id"]) user.forceMove(get_turf(M)) @@ -170,7 +170,7 @@ if(href_list["fast_travel"]) - for(var/i in shuttle_master.mobile) + for(var/i in SSshuttle.mobile) var/obj/docking_port/mobile/M = i if(M.id == href_list["id"] && M.timer && M.timeLeft() >= 50) M.setTimer(50) @@ -192,7 +192,7 @@ user.forceMove(get_turf(preview_shuttle)) if(href_list["load"]) - if(existing_shuttle == shuttle_master.backup_shuttle) + if(existing_shuttle == SSshuttle.backup_shuttle) // TODO make the load button disabled WARNING("The shuttle that the selected shuttle will replace \ is the backup shuttle. Backup shuttle is required to be \ diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index 02cf501a47f..e7e455676b0 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -24,7 +24,7 @@ /obj/docking_port/mobile/supply/register() if(!..()) return 0 - shuttle_master.supply = src + SSshuttle.supply = src return 1 /obj/docking_port/mobile/supply/canMove() @@ -48,7 +48,7 @@ if(!is_station_level(z)) //we only buy when we are -at- the station return 1 - if(!shuttle_master.shoppinglist.len) + if(!SSshuttle.shoppinglist.len) return 2 var/list/emptyTurfs = list() @@ -71,14 +71,14 @@ emptyTurfs += T - for(var/datum/supply_order/SO in shuttle_master.shoppinglist) + for(var/datum/supply_order/SO in SSshuttle.shoppinglist) if(!SO.object) throw EXCEPTION("Supply Order [SO] has no object associated with it.") continue var/turf/T = pick_n_take(emptyTurfs) //turf we will place it in if(!T) - shuttle_master.shoppinglist.Cut(1, shuttle_master.shoppinglist.Find(SO)) + SSshuttle.shoppinglist.Cut(1, SSshuttle.shoppinglist.Find(SO)) return var/errors = 0 @@ -90,7 +90,7 @@ errors |= MANIFEST_ERROR_ITEM SO.createObject(T, errors) - shuttle_master.shoppinglist.Cut() + SSshuttle.shoppinglist.Cut() /obj/docking_port/mobile/supply/proc/sell() if(z != level_name_to_num(CENTCOMM)) //we only sell when we are -at- centcomm @@ -105,19 +105,19 @@ for(var/atom/movable/MA in areaInstance) if(MA.anchored) continue - shuttle_master.sold_atoms += " [MA.name]" + SSshuttle.sold_atoms += " [MA.name]" // Must be in a crate (or a critter crate)! if(istype(MA,/obj/structure/closet/crate) || istype(MA,/obj/structure/closet/critter)) - shuttle_master.sold_atoms += ":" + SSshuttle.sold_atoms += ":" if(!MA.contents.len) - shuttle_master.sold_atoms += " (empty)" + SSshuttle.sold_atoms += " (empty)" ++crate_count var/find_slip = 1 for(var/thing in MA) // Sell manifests - shuttle_master.sold_atoms += " [thing:name]" + SSshuttle.sold_atoms += " [thing:name]" if(find_slip && istype(thing,/obj/item/paper/manifest)) var/obj/item/paper/manifest/slip = thing // TODO: Check for a signature, too. @@ -128,8 +128,8 @@ if(slip.stamped[i] == /obj/item/stamp/denied) denied = 1 if(slip.erroneous && denied) // Caught a mistake by Centcom (IDEA: maybe Centcom rarely gets offended by this) - pointsEarned = slip.points - shuttle_master.points_per_crate - shuttle_master.points += pointsEarned // For now, give a full refund for paying attention (minus the crate cost) + pointsEarned = slip.points - SSshuttle.points_per_crate + SSshuttle.points += pointsEarned // For now, give a full refund for paying attention (minus the crate cost) msg += "+[pointsEarned]: Station correctly denied package [slip.ordernumber]: " if(slip.erroneous & MANIFEST_ERROR_NAME) msg += "Destination station incorrect. " @@ -139,8 +139,8 @@ msg += "Package incomplete. " msg += "Points refunded.
" else if(!slip.erroneous && !denied) // Approving a proper order awards the relatively tiny points_per_slip - shuttle_master.points += shuttle_master.points_per_slip - msg += "+[shuttle_master.points_per_slip]: Package [slip.ordernumber] accorded.
" + SSshuttle.points += SSshuttle.points_per_slip + msg += "+[SSshuttle.points_per_slip]: Package [slip.ordernumber] accorded.
" else // You done goofed. if(slip.erroneous) msg += "+0: Station approved package [slip.ordernumber] despite error: " @@ -152,8 +152,8 @@ msg += "We found unshipped items on our dock." msg += " Be more vigilant.
" else - pointsEarned = round(shuttle_master.points_per_crate - slip.points) - shuttle_master.points += pointsEarned + pointsEarned = round(SSshuttle.points_per_crate - slip.points) + SSshuttle.points += pointsEarned msg += "[pointsEarned]: Station denied package [slip.ordernumber]. Our records show no fault on our part.
" find_slip = 0 continue @@ -173,10 +173,10 @@ if(!disk.stored) continue var/datum/tech/tech = disk.stored - var/cost = tech.getCost(shuttle_master.techLevels[tech.id]) + var/cost = tech.getCost(SSshuttle.techLevels[tech.id]) if(cost) - shuttle_master.techLevels[tech.id] = tech.level - shuttle_master.points += cost + SSshuttle.techLevels[tech.id] = tech.level + SSshuttle.points += cost for(var/mob/M in player_list) if(M.mind) for(var/datum/job_objective/further_research/objective in M.mind.job_objectives) @@ -189,48 +189,48 @@ if(!disk.blueprint) continue var/datum/design/design = disk.blueprint - if(design.id in shuttle_master.researchDesigns) + if(design.id in SSshuttle.researchDesigns) continue - shuttle_master.points += shuttle_master.points_per_design - shuttle_master.researchDesigns += design.id - msg += "+[shuttle_master.points_per_design]: [design.name] design.
" + SSshuttle.points += SSshuttle.points_per_design + SSshuttle.researchDesigns += design.id + msg += "+[SSshuttle.points_per_design]: [design.name] design.
" // Sell exotic plants if(istype(thing, /obj/item/seeds)) var/obj/item/seeds/S = thing if(S.rarity == 0) // Mundane species msg += "+0: We don't need samples of mundane species \"[capitalize(S.species)]\".
" - else if(shuttle_master.discoveredPlants[S.type]) // This species has already been sent to CentComm - var/potDiff = S.potency - shuttle_master.discoveredPlants[S.type] // Compare it to the previous best + else if(SSshuttle.discoveredPlants[S.type]) // This species has already been sent to CentComm + var/potDiff = S.potency - SSshuttle.discoveredPlants[S.type] // Compare it to the previous best if(potDiff > 0) // This sample is better - shuttle_master.discoveredPlants[S.type] = S.potency + SSshuttle.discoveredPlants[S.type] = S.potency msg += "+[potDiff]: New sample of \"[capitalize(S.species)]\" is superior. Good work.
" - shuttle_master.points += potDiff + SSshuttle.points += potDiff else // This sample is worthless - msg += "+0: New sample of \"[capitalize(S.species)]\" is not more potent than existing sample ([shuttle_master.discoveredPlants[S.type]] potency).
" + msg += "+0: New sample of \"[capitalize(S.species)]\" is not more potent than existing sample ([SSshuttle.discoveredPlants[S.type]] potency).
" else // This is a new discovery! - shuttle_master.discoveredPlants[S.type] = S.potency + SSshuttle.discoveredPlants[S.type] = S.potency msg += "[S.rarity]: New species discovered: \"[capitalize(S.species)]\". Excellent work.
" - shuttle_master.points += S.rarity // That's right, no bonus for potency. Send a crappy sample first to "show improvement" later + SSshuttle.points += S.rarity // That's right, no bonus for potency. Send a crappy sample first to "show improvement" later qdel(MA) - shuttle_master.sold_atoms += "." + SSshuttle.sold_atoms += "." if(plasma_count > 0) - pointsEarned = round(plasma_count * shuttle_master.points_per_plasma) + pointsEarned = round(plasma_count * SSshuttle.points_per_plasma) msg += "+[pointsEarned]: Received [plasma_count] unit(s) of exotic material.
" - shuttle_master.points += pointsEarned + SSshuttle.points += pointsEarned if(intel_count > 0) - pointsEarned = round(intel_count * shuttle_master.points_per_intel) + pointsEarned = round(intel_count * SSshuttle.points_per_intel) msg += "+[pointsEarned]: Received [intel_count] article(s) of enemy intelligence.
" - shuttle_master.points += pointsEarned + SSshuttle.points += pointsEarned if(crate_count > 0) - pointsEarned = round(crate_count * shuttle_master.points_per_crate) + pointsEarned = round(crate_count * SSshuttle.points_per_crate) msg += "+[pointsEarned]: Received [crate_count] crate(s).
" - shuttle_master.points += pointsEarned + SSshuttle.points += pointsEarned - shuttle_master.centcom_message = msg + SSshuttle.centcom_message = msg /proc/forbidden_atoms_check(atom/A) var/list/blacklist = list( @@ -271,25 +271,6 @@ var/comment = null var/crates -/datum/controller/process/shuttle/proc/generateSupplyOrder(packId, _orderedby, _orderedbyRank, _comment, _crates) - if(!packId) - return - var/datum/supply_packs/P = supply_packs["[packId]"] - if(!P) - return - - var/datum/supply_order/O = new() - O.ordernum = ordernum++ - O.object = P - O.orderedby = _orderedby - O.orderedbyRank = _orderedbyRank - O.comment = _comment - O.crates = _crates - - requestlist += O - - return O - /datum/supply_order/proc/generateRequisition(atom/_loc) if(!object) return @@ -298,7 +279,7 @@ playsound(_loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1) reqform.name = "Requisition Form - [crates] '[object.name]' for [orderedby]" reqform.info += "

[station_name()] Supply Requisition Form


" - reqform.info += "INDEX: #[shuttle_master.ordernum]
" + reqform.info += "INDEX: #[SSshuttle.ordernum]
" reqform.info += "REQUESTED BY: [orderedby]
" reqform.info += "RANK: [orderedbyRank]
" reqform.info += "REASON: [comment]
" @@ -331,7 +312,7 @@ slip.ordernumber = ordernum var/stationName = (errors & MANIFEST_ERROR_NAME) ? new_station_name() : station_name() - var/packagesAmt = shuttle_master.shoppinglist.len + ((errors & MANIFEST_ERROR_COUNT) ? rand(1,2) : 0) + var/packagesAmt = SSshuttle.shoppinglist.len + ((errors & MANIFEST_ERROR_COUNT) ? rand(1,2) : 0) slip.name = "Shipping Manifest - '[object.name]' for [orderedby]" slip.info = "

[command_name()] Shipping Manifest



" @@ -444,8 +425,8 @@ var/cat = text2num(last_viewed_group) var/packs_list[0] - for(var/set_name in shuttle_master.supply_packs) - var/datum/supply_packs/pack = shuttle_master.supply_packs[set_name] + for(var/set_name in SSshuttle.supply_packs) + var/datum/supply_packs/pack = SSshuttle.supply_packs[set_name] if(!pack.contraband && !pack.hidden && !pack.special && pack.group == cat) // 0/1 after the pack name (set_name) is a boolean for ordering multiple crates packs_list.Add(list(list("name" = pack.name, "amount" = pack.amount, "cost" = pack.cost, "command1" = list("doorder" = "[set_name]0"), "command2" = list("doorder" = "[set_name]1"), "command3" = list("contents" = set_name)))) @@ -458,7 +439,7 @@ data["contents_access"] = content_pack.access ? get_access_desc(content_pack.access) : "None" var/requests_list[0] - for(var/set_name in shuttle_master.requestlist) + for(var/set_name in SSshuttle.requestlist) var/datum/supply_order/SO = set_name if(SO) // Check if the user owns the request, so they can cancel requests @@ -470,18 +451,18 @@ data["requests"] = requests_list var/orders_list[0] - for(var/set_name in shuttle_master.shoppinglist) + for(var/set_name in SSshuttle.shoppinglist) var/datum/supply_order/SO = set_name if(SO) orders_list.Add(list(list("ordernum" = SO.ordernum, "supply_type" = SO.object.name, "orderedby" = SO.orderedby))) data["orders"] = orders_list - data["points"] = round(shuttle_master.points) + data["points"] = round(SSshuttle.points) data["send"] = list("send" = 1) - data["moving"] = shuttle_master.supply.mode != SHUTTLE_IDLE - data["at_station"] = shuttle_master.supply.getDockedId() == "supply_home" - data["timeleft"] = shuttle_master.supply.timeLeft(600) + data["moving"] = SSshuttle.supply.mode != SHUTTLE_IDLE + data["at_station"] = SSshuttle.supply.getDockedId() == "supply_home" + data["timeleft"] = SSshuttle.supply.timeLeft(600) return data @@ -499,7 +480,7 @@ var/multi = text2num(copytext(href_list["doorder"], -1)) if(!isnum(multi)) return 1 - var/datum/supply_packs/P = shuttle_master.supply_packs[index] + var/datum/supply_packs/P = SSshuttle.supply_packs[index] if(!istype(P)) return 1 var/crates = 1 @@ -528,7 +509,7 @@ //make our supply_order datums for(var/i = 1; i <= crates; i++) - var/datum/supply_order/O = shuttle_master.generateSupplyOrder(index, idname, idrank, reason, crates) + var/datum/supply_order/O = SSshuttle.generateSupplyOrder(index, idname, idrank, reason, crates) if(!O) return if(i == 1) O.generateRequisition(loc) @@ -536,10 +517,10 @@ else if(href_list["rreq"]) var/ordernum = text2num(href_list["rreq"]) var/obj/item/card/id/I = usr.get_id_card() - for(var/i=1, i<=shuttle_master.requestlist.len, i++) - var/datum/supply_order/SO = shuttle_master.requestlist[i] + for(var/i=1, i<=SSshuttle.requestlist.len, i++) + var/datum/supply_order/SO = SSshuttle.requestlist[i] if(SO.ordernum == ordernum && (I && SO.orderedby == I.registered_name)) - shuttle_master.requestlist.Cut(i,i+1) + SSshuttle.requestlist.Cut(i,i+1) break else if(href_list["last_viewed_group"]) @@ -551,7 +532,7 @@ if(topic == 1) content_pack = null else - var/datum/supply_packs/P = shuttle_master.supply_packs[topic] + var/datum/supply_packs/P = SSshuttle.supply_packs[topic] content_pack = P add_fingerprint(usr) @@ -593,8 +574,8 @@ var/cat = text2num(last_viewed_group) var/packs_list[0] - for(var/set_name in shuttle_master.supply_packs) - var/datum/supply_packs/pack = shuttle_master.supply_packs[set_name] + for(var/set_name in SSshuttle.supply_packs) + var/datum/supply_packs/pack = SSshuttle.supply_packs[set_name] if((pack.hidden && hacked) || (pack.contraband && can_order_contraband) || (pack.special && pack.special_enabled) || (!pack.contraband && !pack.hidden && !pack.special)) if(pack.group == cat) // 0/1 after the pack name (set_name) is a boolean for ordering multiple crates @@ -608,7 +589,7 @@ data["contents_access"] = content_pack.access ? get_access_desc(content_pack.access) : "None" var/requests_list[0] - for(var/set_name in shuttle_master.requestlist) + for(var/set_name in SSshuttle.requestlist) var/datum/supply_order/SO = set_name if(SO) if(!SO.comment) @@ -617,21 +598,21 @@ data["requests"] = requests_list var/orders_list[0] - for(var/set_name in shuttle_master.shoppinglist) + for(var/set_name in SSshuttle.shoppinglist) var/datum/supply_order/SO = set_name if(SO) orders_list.Add(list(list("ordernum" = SO.ordernum, "supply_type" = SO.object.name, "orderedby" = SO.orderedby, "comment" = SO.comment))) data["orders"] = orders_list - data["canapprove"] = (shuttle_master.supply.getDockedId() == "supply_away") && !(shuttle_master.supply.mode != SHUTTLE_IDLE) - data["points"] = round(shuttle_master.points) + data["canapprove"] = (SSshuttle.supply.getDockedId() == "supply_away") && !(SSshuttle.supply.mode != SHUTTLE_IDLE) + data["points"] = round(SSshuttle.points) data["send"] = list("send" = 1) - data["message"] = shuttle_master.centcom_message ? shuttle_master.centcom_message : "Remember to stamp and send back the supply manifests." + data["message"] = SSshuttle.centcom_message ? SSshuttle.centcom_message : "Remember to stamp and send back the supply manifests." - data["moving"] = shuttle_master.supply.mode != SHUTTLE_IDLE - data["at_station"] = shuttle_master.supply.getDockedId() == "supply_home" - data["timeleft"] = shuttle_master.supply.timeLeft(600) - data["can_launch"] = !shuttle_master.supply.canMove() + data["moving"] = SSshuttle.supply.mode != SHUTTLE_IDLE + data["at_station"] = SSshuttle.supply.getDockedId() == "supply_home" + data["timeleft"] = SSshuttle.supply.timeLeft(600) + data["can_launch"] = !SSshuttle.supply.canMove() return data /obj/machinery/computer/supplycomp/proc/is_authorized(mob/user) @@ -650,24 +631,24 @@ if(!is_authorized(usr)) return 1 - if(!shuttle_master) - log_runtime(EXCEPTION("The shuttle_master controller datum is missing somehow."), src) + if(!SSshuttle) + log_runtime(EXCEPTION("The SSshuttle controller datum is missing somehow."), src) return 1 if(href_list["send"]) - if(shuttle_master.supply.canMove()) + if(SSshuttle.supply.canMove()) to_chat(usr, "For safety reasons the automated supply shuttle cannot transport live organisms, classified nuclear weaponry or homing beacons.") - else if(shuttle_master.supply.getDockedId() == "supply_home") - shuttle_master.toggleShuttle("supply", "supply_home", "supply_away", 1) - investigate_log("[key_name(usr)] has sent the supply shuttle away. Remaining points: [shuttle_master.points]. Shuttle contents: [shuttle_master.sold_atoms]", "cargo") - else if(!shuttle_master.supply.request(shuttle_master.getDock("supply_home"))) + else if(SSshuttle.supply.getDockedId() == "supply_home") + SSshuttle.toggleShuttle("supply", "supply_home", "supply_away", 1) + investigate_log("[key_name(usr)] has sent the supply shuttle away. Remaining points: [SSshuttle.points]. Shuttle contents: [SSshuttle.sold_atoms]", "cargo") + else if(!SSshuttle.supply.request(SSshuttle.getDock("supply_home"))) post_signal("supply") - if(LAZYLEN(shuttle_master.shoppinglist) && prob(10)) + if(LAZYLEN(SSshuttle.shoppinglist) && prob(10)) var/datum/supply_order/O = new /datum/supply_order() - O.ordernum = shuttle_master.ordernum - O.object = shuttle_master.supply_packs[pick(shuttle_master.supply_packs)] + O.ordernum = SSshuttle.ordernum + O.object = SSshuttle.supply_packs[pick(SSshuttle.supply_packs)] O.orderedby = random_name(pick(MALE,FEMALE), species = "Human") - shuttle_master.shoppinglist += O + SSshuttle.shoppinglist += O investigate_log("Random [O.object] crate added to supply shuttle") else if(href_list["doorder"]) @@ -680,7 +661,7 @@ var/multi = text2num(copytext(href_list["doorder"], -1)) if(!isnum(multi)) return 1 - var/datum/supply_packs/P = shuttle_master.supply_packs[index] + var/datum/supply_packs/P = SSshuttle.supply_packs[index] if(!istype(P)) return 1 var/crates = 1 @@ -708,37 +689,37 @@ //make our supply_order datums for(var/i = 1; i <= crates; i++) - var/datum/supply_order/O = shuttle_master.generateSupplyOrder(index, idname, idrank, reason, crates) + var/datum/supply_order/O = SSshuttle.generateSupplyOrder(index, idname, idrank, reason, crates) if(!O) return 1 if(i == 1) O.generateRequisition(loc) else if(href_list["confirmorder"]) - if(shuttle_master.supply.getDockedId() != "supply_away" || shuttle_master.supply.mode != SHUTTLE_IDLE) + if(SSshuttle.supply.getDockedId() != "supply_away" || SSshuttle.supply.mode != SHUTTLE_IDLE) return 1 var/ordernum = text2num(href_list["confirmorder"]) var/datum/supply_order/O var/datum/supply_packs/P - for(var/i=1, i<=shuttle_master.requestlist.len, i++) - var/datum/supply_order/SO = shuttle_master.requestlist[i] + for(var/i=1, i<=SSshuttle.requestlist.len, i++) + var/datum/supply_order/SO = SSshuttle.requestlist[i] if(SO.ordernum == ordernum) O = SO P = O.object - if(shuttle_master.points >= P.cost) - shuttle_master.requestlist.Cut(i,i+1) - shuttle_master.points -= P.cost - shuttle_master.shoppinglist += O - investigate_log("[key_name(usr)] has authorized an order for [P.name]. Remaining points: [shuttle_master.points].", "cargo") + if(SSshuttle.points >= P.cost) + SSshuttle.requestlist.Cut(i,i+1) + SSshuttle.points -= P.cost + SSshuttle.shoppinglist += O + investigate_log("[key_name(usr)] has authorized an order for [P.name]. Remaining points: [SSshuttle.points].", "cargo") else to_chat(usr, "There are insufficient supply points for this request.") break else if(href_list["rreq"]) var/ordernum = text2num(href_list["rreq"]) - for(var/i=1, i<=shuttle_master.requestlist.len, i++) - var/datum/supply_order/SO = shuttle_master.requestlist[i] + for(var/i=1, i<=SSshuttle.requestlist.len, i++) + var/datum/supply_order/SO = SSshuttle.requestlist[i] if(SO.ordernum == ordernum) - shuttle_master.requestlist.Cut(i,i+1) + SSshuttle.requestlist.Cut(i,i+1) break else if(href_list["last_viewed_group"]) @@ -750,7 +731,7 @@ if(topic == 1) content_pack = null else - var/datum/supply_packs/P = shuttle_master.supply_packs[topic] + var/datum/supply_packs/P = SSshuttle.supply_packs[topic] content_pack = P add_fingerprint(usr) diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index 57142365cc4..c8c927e9109 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -15,7 +15,7 @@ /datum/station_goal/bluespace_cannon/on_report() //Unlock BSA parts - var/datum/supply_packs/misc/bsa/P = shuttle_master.supply_packs["[/datum/supply_packs/misc/bsa]"] + var/datum/supply_packs/misc/bsa/P = SSshuttle.supply_packs["[/datum/supply_packs/misc/bsa]"] P.special_enabled = TRUE /datum/station_goal/bluespace_cannon/check_completion() diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index 46f5920f3d3..2a932e37f73 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -42,10 +42,10 @@ The base vault parts should be available for shipping by your cargo shuttle."} /datum/station_goal/dna_vault/on_report() - var/datum/supply_packs/P = shuttle_master.supply_packs["[/datum/supply_packs/misc/dna_vault]"] + var/datum/supply_packs/P = SSshuttle.supply_packs["[/datum/supply_packs/misc/dna_vault]"] P.special_enabled = TRUE - P = shuttle_master.supply_packs["[/datum/supply_packs/misc/dna_probes]"] + P = SSshuttle.supply_packs["[/datum/supply_packs/misc/dna_probes]"] P.special_enabled = TRUE /datum/station_goal/dna_vault/check_completion() diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm index 3307bd61b13..26c4838897c 100644 --- a/code/modules/station_goals/shield.dm +++ b/code/modules/station_goals/shield.dm @@ -13,10 +13,10 @@ /datum/station_goal/station_shield/on_report() //Unlock - var/datum/supply_packs/P = shuttle_master.supply_packs["[/datum/supply_packs/misc/shield_sat]"] + var/datum/supply_packs/P = SSshuttle.supply_packs["[/datum/supply_packs/misc/shield_sat]"] P.special_enabled = TRUE - P = shuttle_master.supply_packs["[/datum/supply_packs/misc/shield_sat_control]"] + P = SSshuttle.supply_packs["[/datum/supply_packs/misc/shield_sat_control]"] P.special_enabled = TRUE /datum/station_goal/station_shield/check_completion() diff --git a/paradise.dme b/paradise.dme index 7c4deb70dd2..6b28d8e01ac 100644 --- a/paradise.dme +++ b/paradise.dme @@ -198,7 +198,6 @@ #include "code\controllers\Processes\npcai.dm" #include "code\controllers\Processes\npcpool.dm" #include "code\controllers\Processes\obj.dm" -#include "code\controllers\Processes\shuttles.dm" #include "code\controllers\Processes\ticker.dm" #include "code\controllers\ProcessScheduler\core\process.dm" #include "code\controllers\ProcessScheduler\core\processScheduler.dm" @@ -210,6 +209,7 @@ #include "code\controllers\subsystem\mobs.dm" #include "code\controllers\subsystem\nanoui.dm" #include "code\controllers\subsystem\nightshift.dm" +#include "code\controllers\subsystem\shuttles.dm" #include "code\controllers\subsystem\spacedrift.dm" #include "code\controllers\subsystem\sun.dm" #include "code\controllers\subsystem\throwing.dm" From bbca113d1b0d6a9a8e50d100ff74ae3b22c53187 Mon Sep 17 00:00:00 2001 From: variableundefined <40092670+variableundefined@users.noreply.github.com> Date: Tue, 4 Sep 2018 15:15:38 +0800 Subject: [PATCH 2/2] Update README.md properly --- code/modules/shuttle/README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/modules/shuttle/README.md b/code/modules/shuttle/README.md index 598a162c7ea..9568131ba94 100644 --- a/code/modules/shuttle/README.md +++ b/code/modules/shuttle/README.md @@ -13,6 +13,9 @@ - [Initialization](#initialization) + # Important note: +The following readme was last updated during Late 2015. The changes between Paradise & TG's shuttle system has diverged greatly since then. Do not take the documentation here's description of differences between tg & paradise seriously without double checking. + # Shuttle system ## Introduction This folder belongs to the "shuttle" system. The shuttle system is used to control the @@ -121,11 +124,6 @@ direction as the "Stationary" docking port. There are three main differences between -tg-station13's shuttle system and the one in use on Paradise, and none are very complex. -### Shuttle Controller -This is a very simple change. On -tg-station13, the shuttle controller is referenced by a -variable named `SSShuttle`. On Paradise, due to controller naming conventions, it is -instead named `SSshuttle`. - ### Airlocks The biggest modification comes in the form of how docking ports interact with airlocks. With -tg-station13's base code, any door on the shuttle will be closed, and any door