mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Merge branch 'shuttlecontroller' of https://github.com/Zuhayr/Baystation12 into dev
This commit is contained in:
@@ -373,9 +373,7 @@
|
|||||||
#include "code\game\machinery\computer\skills.dm"
|
#include "code\game\machinery\computer\skills.dm"
|
||||||
#include "code\game\machinery\computer\specops_shuttle.dm"
|
#include "code\game\machinery\computer\specops_shuttle.dm"
|
||||||
#include "code\game\machinery\computer\station_alert.dm"
|
#include "code\game\machinery\computer\station_alert.dm"
|
||||||
#include "code\game\machinery\computer\syndicate_shuttle.dm"
|
|
||||||
#include "code\game\machinery\computer\syndicate_specops_shuttle.dm"
|
#include "code\game\machinery\computer\syndicate_specops_shuttle.dm"
|
||||||
#include "code\game\machinery\computer\vox_shuttle.dm"
|
|
||||||
#include "code\game\machinery\doors\airlock.dm"
|
#include "code\game\machinery\doors\airlock.dm"
|
||||||
#include "code\game\machinery\doors\airlock_electronics.dm"
|
#include "code\game\machinery\doors\airlock_electronics.dm"
|
||||||
#include "code\game\machinery\doors\alarmlock.dm"
|
#include "code\game\machinery\doors\alarmlock.dm"
|
||||||
@@ -1198,7 +1196,6 @@
|
|||||||
#include "code\modules\research\rdconsole.dm"
|
#include "code\modules\research\rdconsole.dm"
|
||||||
#include "code\modules\research\rdmachines.dm"
|
#include "code\modules\research\rdmachines.dm"
|
||||||
#include "code\modules\research\research.dm"
|
#include "code\modules\research\research.dm"
|
||||||
#include "code\modules\research\research_shuttle.dm"
|
|
||||||
#include "code\modules\research\server.dm"
|
#include "code\modules\research\server.dm"
|
||||||
#include "code\modules\research\xenoarchaeology\areas.dm"
|
#include "code\modules\research\xenoarchaeology\areas.dm"
|
||||||
#include "code\modules\research\xenoarchaeology\chemistry.dm"
|
#include "code\modules\research\xenoarchaeology\chemistry.dm"
|
||||||
@@ -1278,7 +1275,10 @@
|
|||||||
#include "code\modules\scripting\Scanner\Tokens.dm"
|
#include "code\modules\scripting\Scanner\Tokens.dm"
|
||||||
#include "code\modules\security levels\keycard authentication.dm"
|
#include "code\modules\security levels\keycard authentication.dm"
|
||||||
#include "code\modules\security levels\security levels.dm"
|
#include "code\modules\security levels\security levels.dm"
|
||||||
#include "code\modules\shuttles\engineering.dm"
|
#include "code\modules\shuttles\antagonist.dm"
|
||||||
|
#include "code\modules\shuttles\departmental.dm"
|
||||||
|
#include "code\modules\shuttles\shuttle.dm"
|
||||||
|
#include "code\modules\shuttles\shuttles_multi.dm"
|
||||||
#include "code\modules\supermatter\supermatter.dm"
|
#include "code\modules\supermatter\supermatter.dm"
|
||||||
#include "code\modules\surgery\appendix.dm"
|
#include "code\modules\surgery\appendix.dm"
|
||||||
#include "code\modules\surgery\bones.dm"
|
#include "code\modules\surgery\bones.dm"
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ datum/controller/game_controller/proc/setup()
|
|||||||
if(!ticker)
|
if(!ticker)
|
||||||
ticker = new /datum/controller/gameticker()
|
ticker = new /datum/controller/gameticker()
|
||||||
|
|
||||||
|
if(!shuttles) shuttles = new /datum/shuttle_controller()
|
||||||
|
|
||||||
setup_objects()
|
setup_objects()
|
||||||
setupgenetics()
|
setupgenetics()
|
||||||
setupfactions()
|
setupfactions()
|
||||||
@@ -280,7 +282,7 @@ datum/controller/game_controller/proc/process_machines_power()
|
|||||||
if(M)
|
if(M)
|
||||||
if(M.use_power)
|
if(M.use_power)
|
||||||
M.auto_use_power()
|
M.auto_use_power()
|
||||||
|
|
||||||
if(A.apc.len && A.master == A)
|
if(A.apc.len && A.master == A)
|
||||||
i++
|
i++
|
||||||
continue
|
continue
|
||||||
@@ -295,7 +297,7 @@ datum/controller/game_controller/proc/process_machines_rebuild()
|
|||||||
A.powerupdate += 1
|
A.powerupdate += 1
|
||||||
active_areas |= A
|
active_areas |= A
|
||||||
rebuild_active_areas = 0
|
rebuild_active_areas = 0
|
||||||
|
|
||||||
|
|
||||||
datum/controller/game_controller/proc/process_objects()
|
datum/controller/game_controller/proc/process_objects()
|
||||||
var/i = 1
|
var/i = 1
|
||||||
|
|||||||
@@ -272,8 +272,9 @@ datum/game_mode/proc/auto_declare_completion_heist()
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/datum/game_mode/heist/check_finished()
|
/datum/game_mode/heist/check_finished()
|
||||||
if (!(is_raider_crew_alive()) || (vox_shuttle_location && (vox_shuttle_location == "start")))
|
// DO NOT FORGET TO FIX THIS.
|
||||||
return 1
|
//if (!(is_raider_crew_alive()) || (vox_shuttle_location && (vox_shuttle_location == "start")))
|
||||||
|
// return 1
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/datum/game_mode/heist/cleanup()
|
/datum/game_mode/heist/cleanup()
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
|||||||
|
|
||||||
if(ticker)
|
if(ticker)
|
||||||
if(ticker.mode && ticker.mode.name == "nuclear emergency")
|
if(ticker.mode && ticker.mode.name == "nuclear emergency")
|
||||||
var/obj/machinery/computer/syndicate_station/syndie_location = locate(/obj/machinery/computer/syndicate_station)
|
var/obj/machinery/computer/shuttle_control/multi/syndicate/syndie_location = locate(/obj/machinery/computer/shuttle_control/multi/syndicate)
|
||||||
if(syndie_location)
|
if(syndie_location)
|
||||||
ticker.mode:syndies_didnt_escape = (syndie_location.z > 1 ? 0 : 1) //muskets will make me change this, but it will do for now
|
ticker.mode:syndies_didnt_escape = (syndie_location.z > 1 ? 0 : 1) //muskets will make me change this, but it will do for now
|
||||||
ticker.mode:nuke_off_station = off_station
|
ticker.mode:nuke_off_station = off_station
|
||||||
|
|||||||
@@ -179,8 +179,7 @@
|
|||||||
|
|
||||||
/obj/item/weapon/pinpointer/nukeop
|
/obj/item/weapon/pinpointer/nukeop
|
||||||
var/mode = 0 //Mode 0 locates disk, mode 1 locates the shuttle
|
var/mode = 0 //Mode 0 locates disk, mode 1 locates the shuttle
|
||||||
var/obj/machinery/computer/syndicate_station/home = null
|
var/obj/machinery/computer/shuttle_control/multi/syndicate/home = null
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/pinpointer/nukeop/attack_self(mob/user as mob)
|
/obj/item/weapon/pinpointer/nukeop/attack_self(mob/user as mob)
|
||||||
if(!active)
|
if(!active)
|
||||||
|
|||||||
@@ -169,10 +169,7 @@
|
|||||||
build_path = "/obj/machinery/computer/supplycomp"
|
build_path = "/obj/machinery/computer/supplycomp"
|
||||||
origin_tech = "programming=3"
|
origin_tech = "programming=3"
|
||||||
var/contraband_enabled = 0
|
var/contraband_enabled = 0
|
||||||
/obj/item/weapon/circuitboard/research_shuttle
|
|
||||||
name = "Circuit board (Research Shuttle)"
|
|
||||||
build_path = "/obj/machinery/computer/research_shuttle"
|
|
||||||
origin_tech = "programming=2"
|
|
||||||
/obj/item/weapon/circuitboard/operating
|
/obj/item/weapon/circuitboard/operating
|
||||||
name = "Circuit board (Operating Computer)"
|
name = "Circuit board (Operating Computer)"
|
||||||
build_path = "/obj/machinery/computer/operating"
|
build_path = "/obj/machinery/computer/operating"
|
||||||
@@ -196,20 +193,17 @@
|
|||||||
/obj/item/weapon/circuitboard/splicer
|
/obj/item/weapon/circuitboard/splicer
|
||||||
name = "Circuit board (Disease Splicer)"
|
name = "Circuit board (Disease Splicer)"
|
||||||
build_path = "/obj/machinery/computer/diseasesplicer"
|
build_path = "/obj/machinery/computer/diseasesplicer"
|
||||||
|
|
||||||
/obj/item/weapon/circuitboard/mining_shuttle
|
/obj/item/weapon/circuitboard/mining_shuttle
|
||||||
name = "Circuit board (Mining Shuttle)"
|
name = "Circuit board (Mining Shuttle)"
|
||||||
build_path = "/obj/machinery/computer/mining_shuttle"
|
build_path = "/obj/machinery/computer/shuttle_control/mining"
|
||||||
origin_tech = "programming=2"
|
origin_tech = "programming=2"
|
||||||
|
|
||||||
/obj/item/weapon/circuitboard/engineering_shuttle
|
/obj/item/weapon/circuitboard/engineering_shuttle
|
||||||
name = "Circuit board (Engineering Shuttle)"
|
name = "Circuit board (Engineering Shuttle)"
|
||||||
build_path = "/obj/machinery/computer/engineering_shuttle"
|
build_path = "/obj/machinery/computer/shuttle_control/engineering"
|
||||||
origin_tech = "programming=2"
|
origin_tech = "programming=2"
|
||||||
|
|
||||||
/obj/item/weapon/circuitboard/research_shuttle
|
/obj/item/weapon/circuitboard/research_shuttle
|
||||||
name = "Circuit board (Research Shuttle)"
|
name = "Circuit board (Research Shuttle)"
|
||||||
build_path = "/obj/machinery/computer/research_shuttle"
|
build_path = "/obj/machinery/computer/shuttle_control/research"
|
||||||
origin_tech = "programming=2"
|
origin_tech = "programming=2"
|
||||||
/obj/item/weapon/circuitboard/HolodeckControl // Not going to let people get this, but it's just here for future
|
/obj/item/weapon/circuitboard/HolodeckControl // Not going to let people get this, but it's just here for future
|
||||||
name = "Circuit board (Holodeck Control)"
|
name = "Circuit board (Holodeck Control)"
|
||||||
|
|||||||
@@ -1,104 +0,0 @@
|
|||||||
#define SYNDICATE_SHUTTLE_MOVE_TIME 240
|
|
||||||
#define SYNDICATE_SHUTTLE_COOLDOWN 200
|
|
||||||
|
|
||||||
/obj/machinery/computer/syndicate_station
|
|
||||||
name = "syndicate shuttle terminal"
|
|
||||||
icon = 'icons/obj/computer.dmi'
|
|
||||||
icon_state = "syndishuttle"
|
|
||||||
req_access = list(access_syndicate)
|
|
||||||
var/area/curr_location
|
|
||||||
var/moving = 0
|
|
||||||
var/lastMove = 0
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/syndicate_station/New()
|
|
||||||
curr_location= locate(/area/syndicate_station/start)
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/syndicate_station/proc/syndicate_move_to(area/destination as area)
|
|
||||||
if(moving) return
|
|
||||||
if(lastMove + SYNDICATE_SHUTTLE_COOLDOWN > world.time) return
|
|
||||||
var/area/dest_location = locate(destination)
|
|
||||||
if(curr_location == dest_location) return
|
|
||||||
|
|
||||||
moving = 1
|
|
||||||
lastMove = world.time
|
|
||||||
|
|
||||||
if(curr_location.z != dest_location.z)
|
|
||||||
var/area/transit_location = locate(/area/syndicate_station/transit)
|
|
||||||
curr_location.move_contents_to(transit_location)
|
|
||||||
curr_location = transit_location
|
|
||||||
sleep(SYNDICATE_SHUTTLE_MOVE_TIME)
|
|
||||||
|
|
||||||
curr_location.move_contents_to(dest_location)
|
|
||||||
curr_location = dest_location
|
|
||||||
moving = 0
|
|
||||||
return 1
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/syndicate_station/attackby(obj/item/I as obj, mob/user as mob)
|
|
||||||
return attack_hand(user)
|
|
||||||
|
|
||||||
/obj/machinery/computer/syndicate_station/attack_ai(mob/user as mob)
|
|
||||||
return attack_hand(user)
|
|
||||||
|
|
||||||
/obj/machinery/computer/syndicate_station/attack_paw(mob/user as mob)
|
|
||||||
return attack_hand(user)
|
|
||||||
|
|
||||||
/obj/machinery/computer/syndicate_station/attack_hand(mob/user as mob)
|
|
||||||
if(!allowed(user))
|
|
||||||
user << "\red Access Denied"
|
|
||||||
return
|
|
||||||
|
|
||||||
user.set_machine(src)
|
|
||||||
|
|
||||||
var/dat = {"Location: [curr_location]<br>
|
|
||||||
Ready to move[max(lastMove + SYNDICATE_SHUTTLE_COOLDOWN - world.time, 0) ? " in [max(round((lastMove + SYNDICATE_SHUTTLE_COOLDOWN - world.time) * 0.1), 0)] seconds" : ": now"]<br>
|
|
||||||
<a href='?src=\ref[src];syndicate=1'>Syndicate Space</a><br>
|
|
||||||
<a href='?src=\ref[src];station_nw=1'>North West of SS13</a> |
|
|
||||||
<a href='?src=\ref[src];station_n=1'>North of SS13</a> |
|
|
||||||
<a href='?src=\ref[src];station_ne=1'>North East of SS13</a><br>
|
|
||||||
<a href='?src=\ref[src];station_sw=1'>South West of SS13</a> |
|
|
||||||
<a href='?src=\ref[src];station_s=1'>South of SS13</a> |
|
|
||||||
<a href='?src=\ref[src];station_se=1'>South East of SS13</a><br>
|
|
||||||
<a href='?src=\ref[src];commssat=1'>South of the Communication Satellite</a> |
|
|
||||||
<a href='?src=\ref[src];mining=1'>North East of the Mining Asteroid</a><br>
|
|
||||||
<a href='?src=\ref[user];mach_close=computer'>Close</a>"}
|
|
||||||
|
|
||||||
user << browse(dat, "window=computer;size=575x450")
|
|
||||||
onclose(user, "computer")
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/syndicate_station/Topic(href, href_list)
|
|
||||||
if(!isliving(usr)) return
|
|
||||||
var/mob/living/user = usr
|
|
||||||
|
|
||||||
if(in_range(src, user) || istype(user, /mob/living/silicon))
|
|
||||||
user.set_machine(src)
|
|
||||||
|
|
||||||
if(href_list["syndicate"])
|
|
||||||
syndicate_move_to(/area/syndicate_station/start)
|
|
||||||
else if(href_list["station_nw"])
|
|
||||||
syndicate_move_to(/area/syndicate_station/northwest)
|
|
||||||
else if(href_list["station_n"])
|
|
||||||
syndicate_move_to(/area/syndicate_station/north)
|
|
||||||
else if(href_list["station_ne"])
|
|
||||||
syndicate_move_to(/area/syndicate_station/northeast)
|
|
||||||
else if(href_list["station_sw"])
|
|
||||||
syndicate_move_to(/area/syndicate_station/southwest)
|
|
||||||
else if(href_list["station_s"])
|
|
||||||
syndicate_move_to(/area/syndicate_station/south)
|
|
||||||
else if(href_list["station_se"])
|
|
||||||
syndicate_move_to(/area/syndicate_station/southeast)
|
|
||||||
else if(href_list["commssat"])
|
|
||||||
syndicate_move_to(/area/syndicate_station/commssat)
|
|
||||||
else if(href_list["mining"])
|
|
||||||
syndicate_move_to(/area/syndicate_station/mining)
|
|
||||||
|
|
||||||
add_fingerprint(usr)
|
|
||||||
updateUsrDialog()
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/computer/syndicate_station/bullet_act(var/obj/item/projectile/Proj)
|
|
||||||
visible_message("[Proj] ricochets off [src]!") //let's not let them fuck themselves in the rear
|
|
||||||
@@ -1,141 +0,0 @@
|
|||||||
#define VOX_SHUTTLE_MOVE_TIME 400
|
|
||||||
#define VOX_SHUTTLE_COOLDOWN 1200
|
|
||||||
|
|
||||||
//Copied from Syndicate shuttle.
|
|
||||||
var/global/vox_shuttle_location
|
|
||||||
var/global/announce_vox_departure = 1 //Stealth systems - give an announcement or not.
|
|
||||||
|
|
||||||
/obj/machinery/computer/vox_stealth
|
|
||||||
name = "skipjack cloaking field terminal"
|
|
||||||
icon = 'icons/obj/computer.dmi'
|
|
||||||
icon_state = "syndishuttle"
|
|
||||||
req_access = list(access_syndicate)
|
|
||||||
|
|
||||||
/obj/machinery/computer/vox_stealth/attackby(obj/item/I as obj, mob/user as mob)
|
|
||||||
return attack_hand(user)
|
|
||||||
|
|
||||||
/obj/machinery/computer/vox_stealth/attack_ai(mob/user as mob)
|
|
||||||
return attack_hand(user)
|
|
||||||
|
|
||||||
/obj/machinery/computer/vox_stealth/attack_paw(mob/user as mob)
|
|
||||||
return attack_hand(user)
|
|
||||||
|
|
||||||
/obj/machinery/computer/vox_stealth/attack_hand(mob/user as mob)
|
|
||||||
if(!allowed(user))
|
|
||||||
user << "\red Access Denied"
|
|
||||||
return
|
|
||||||
|
|
||||||
if(announce_vox_departure)
|
|
||||||
user << "\red Shuttle stealth systems have been activated. The Exodus will not be warned of our arrival."
|
|
||||||
announce_vox_departure = 0
|
|
||||||
else
|
|
||||||
user << "\red Shuttle stealth systems have been deactivated. The Exodus will be warned of our arrival."
|
|
||||||
announce_vox_departure = 1
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/vox_station
|
|
||||||
name = "vox skipjack terminal"
|
|
||||||
icon = 'icons/obj/computer.dmi'
|
|
||||||
icon_state = "syndishuttle"
|
|
||||||
req_access = list(access_syndicate)
|
|
||||||
var/area/curr_location
|
|
||||||
var/moving = 0
|
|
||||||
var/lastMove = 0
|
|
||||||
var/warning //Warning about the end of the round.
|
|
||||||
|
|
||||||
/obj/machinery/computer/vox_station/New()
|
|
||||||
curr_location= locate(/area/shuttle/vox/station)
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/vox_station/proc/vox_move_to(area/destination as area)
|
|
||||||
if(moving) return
|
|
||||||
if(lastMove + VOX_SHUTTLE_COOLDOWN > world.time) return
|
|
||||||
var/area/dest_location = locate(destination)
|
|
||||||
if(curr_location == dest_location) return
|
|
||||||
|
|
||||||
if(announce_vox_departure)
|
|
||||||
if(curr_location == locate(/area/shuttle/vox/station))
|
|
||||||
command_alert("Attention, Exodus, we just tracked a small target bypassing our defensive perimeter. Can't fire on it without hitting the station - you've got incoming visitors, like it or not.", "NSV Icarus")
|
|
||||||
else if(dest_location == locate(/area/shuttle/vox/station))
|
|
||||||
command_alert("Your guests are pulling away, Exodus - moving too fast for us to draw a bead on them. Looks like they're heading out of the system at a rapid clip.", "NSV Icarus")
|
|
||||||
|
|
||||||
moving = 1
|
|
||||||
lastMove = world.time
|
|
||||||
|
|
||||||
if(curr_location.z != dest_location.z)
|
|
||||||
var/area/transit_location = locate(/area/vox_station/transit)
|
|
||||||
curr_location.move_contents_to(transit_location)
|
|
||||||
curr_location = transit_location
|
|
||||||
sleep(VOX_SHUTTLE_MOVE_TIME)
|
|
||||||
|
|
||||||
curr_location.move_contents_to(dest_location)
|
|
||||||
curr_location = dest_location
|
|
||||||
moving = 0
|
|
||||||
|
|
||||||
return 1
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/vox_station/attackby(obj/item/I as obj, mob/user as mob)
|
|
||||||
return attack_hand(user)
|
|
||||||
|
|
||||||
/obj/machinery/computer/vox_station/attack_ai(mob/user as mob)
|
|
||||||
return attack_hand(user)
|
|
||||||
|
|
||||||
/obj/machinery/computer/vox_station/attack_paw(mob/user as mob)
|
|
||||||
return attack_hand(user)
|
|
||||||
|
|
||||||
/obj/machinery/computer/vox_station/attack_hand(mob/user as mob)
|
|
||||||
if(!allowed(user))
|
|
||||||
user << "\red Access Denied"
|
|
||||||
return
|
|
||||||
|
|
||||||
user.set_machine(src)
|
|
||||||
|
|
||||||
var/dat = {"Location: [curr_location]<br>
|
|
||||||
Ready to move[max(lastMove + VOX_SHUTTLE_COOLDOWN - world.time, 0) ? " in [max(round((lastMove + VOX_SHUTTLE_COOLDOWN - world.time) * 0.1), 0)] seconds" : ": now"]<br>
|
|
||||||
<a href='?src=\ref[src];start=1'>Return to dark space</a><br>
|
|
||||||
<a href='?src=\ref[src];solars_fore_port=1'>Fore port solar</a> |
|
|
||||||
<a href='?src=\ref[src];solars_aft_port=1'>Aft port solar</a> |
|
|
||||||
<a href='?src=\ref[src];solars_fore_starboard=1'>Fore starboard solar</a><br>
|
|
||||||
<a href='?src=\ref[src];solars_aft_starboard=1'>Aft starboard solar</a> |
|
|
||||||
<a href='?src=\ref[src];mining=1'>Mining Asteroid</a><br>
|
|
||||||
<a href='?src=\ref[user];mach_close=computer'>Close</a>"}
|
|
||||||
|
|
||||||
user << browse(dat, "window=computer;size=575x450")
|
|
||||||
onclose(user, "computer")
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/vox_station/Topic(href, href_list)
|
|
||||||
if(!isliving(usr)) return
|
|
||||||
var/mob/living/user = usr
|
|
||||||
|
|
||||||
if(in_range(src, user) || istype(user, /mob/living/silicon))
|
|
||||||
user.set_machine(src)
|
|
||||||
|
|
||||||
vox_shuttle_location = "station"
|
|
||||||
if(href_list["start"])
|
|
||||||
if(ticker && (istype(ticker.mode,/datum/game_mode/heist)))
|
|
||||||
if(!warning)
|
|
||||||
user << "\red Returning to dark space will end your raid and report your success or failure. If you are sure, press the button again."
|
|
||||||
warning = 1
|
|
||||||
return
|
|
||||||
vox_move_to(/area/shuttle/vox/station)
|
|
||||||
vox_shuttle_location = "start"
|
|
||||||
else if(href_list["solars_fore_starboard"])
|
|
||||||
vox_move_to(/area/vox_station/northeast_solars)
|
|
||||||
else if(href_list["solars_fore_port"])
|
|
||||||
vox_move_to(/area/vox_station/northwest_solars)
|
|
||||||
else if(href_list["solars_aft_starboard"])
|
|
||||||
vox_move_to(/area/vox_station/southeast_solars)
|
|
||||||
else if(href_list["solars_aft_port"])
|
|
||||||
vox_move_to(/area/vox_station/southwest_solars)
|
|
||||||
else if(href_list["mining"])
|
|
||||||
vox_move_to(/area/vox_station/mining)
|
|
||||||
|
|
||||||
add_fingerprint(usr)
|
|
||||||
updateUsrDialog()
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/computer/vox_station/bullet_act(var/obj/item/projectile/Proj)
|
|
||||||
visible_message("[Proj] ricochets off [src]!")
|
|
||||||
@@ -169,34 +169,12 @@ var/list/mechtoys = list(
|
|||||||
eta = round(ticksleft/600,1)
|
eta = round(ticksleft/600,1)
|
||||||
else
|
else
|
||||||
eta = 0
|
eta = 0
|
||||||
send()
|
shuttles.move_shuttle("Supply")
|
||||||
|
moving = 0
|
||||||
|
at_station = !at_station
|
||||||
|
|
||||||
sleep(processing_interval)
|
sleep(processing_interval)
|
||||||
|
|
||||||
proc/send()
|
|
||||||
var/area/from
|
|
||||||
var/area/dest
|
|
||||||
var/area/the_shuttles_way
|
|
||||||
switch(at_station)
|
|
||||||
if(1)
|
|
||||||
from = locate(SUPPLY_STATION_AREATYPE)
|
|
||||||
dest = locate(SUPPLY_DOCK_AREATYPE)
|
|
||||||
the_shuttles_way = from
|
|
||||||
at_station = 0
|
|
||||||
if(0)
|
|
||||||
from = locate(SUPPLY_DOCK_AREATYPE)
|
|
||||||
dest = locate(SUPPLY_STATION_AREATYPE)
|
|
||||||
the_shuttles_way = dest
|
|
||||||
at_station = 1
|
|
||||||
moving = 0
|
|
||||||
|
|
||||||
//Do I really need to explain this loop?
|
|
||||||
for(var/mob/living/unlucky_person in the_shuttles_way)
|
|
||||||
unlucky_person.gib()
|
|
||||||
|
|
||||||
from.move_contents_to(dest)
|
|
||||||
|
|
||||||
//Check whether the shuttle is allowed to move
|
//Check whether the shuttle is allowed to move
|
||||||
proc/can_move()
|
proc/can_move()
|
||||||
if(moving) return 0
|
if(moving) return 0
|
||||||
@@ -521,7 +499,11 @@ var/list/mechtoys = list(
|
|||||||
else if(supply_shuttle.at_station)
|
else if(supply_shuttle.at_station)
|
||||||
supply_shuttle.moving = -1
|
supply_shuttle.moving = -1
|
||||||
supply_shuttle.sell()
|
supply_shuttle.sell()
|
||||||
supply_shuttle.send()
|
supply_shuttle.moving = 0
|
||||||
|
supply_shuttle.at_station = !supply_shuttle.at_station
|
||||||
|
|
||||||
|
shuttles.move_shuttle("Supply")
|
||||||
|
|
||||||
temp = "The supply shuttle has departed.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
temp = "The supply shuttle has departed.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||||
else
|
else
|
||||||
supply_shuttle.moving = 1
|
supply_shuttle.moving = 1
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ var/list/bombers = list( )
|
|||||||
var/list/admin_log = list ( )
|
var/list/admin_log = list ( )
|
||||||
var/list/lastsignalers = list( ) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
|
var/list/lastsignalers = list( ) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
|
||||||
var/list/lawchanges = list( ) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
|
var/list/lawchanges = list( ) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
|
||||||
var/list/shuttles = list( )
|
|
||||||
var/list/reg_dna = list( )
|
var/list/reg_dna = list( )
|
||||||
// list/traitobj = list( )
|
// list/traitobj = list( )
|
||||||
|
|
||||||
|
|||||||
@@ -637,10 +637,7 @@ var/global/floorIsLava = 0
|
|||||||
<A href='?src=\ref[src];secretsfun=fakeguns'>Make all items look like guns</A><BR>
|
<A href='?src=\ref[src];secretsfun=fakeguns'>Make all items look like guns</A><BR>
|
||||||
<A href='?src=\ref[src];secretsfun=schoolgirl'>Japanese Animes Mode</A><BR>
|
<A href='?src=\ref[src];secretsfun=schoolgirl'>Japanese Animes Mode</A><BR>
|
||||||
<A href='?src=\ref[src];secretsfun=eagles'>Egalitarian Station Mode</A><BR>
|
<A href='?src=\ref[src];secretsfun=eagles'>Egalitarian Station Mode</A><BR>
|
||||||
<A href='?src=\ref[src];secretsfun=moveadminshuttle'>Move Administration Shuttle</A><BR>
|
<A href='?src=\ref[src];secretsfun=moveshuttle'>Move a shuttle</A><BR>
|
||||||
<A href='?src=\ref[src];secretsfun=moveferry'>Move Ferry</A><BR>
|
|
||||||
<A href='?src=\ref[src];secretsfun=movealienship'>Move Alien Dinghy</A><BR>
|
|
||||||
<A href='?src=\ref[src];secretsfun=moveminingshuttle'>Move Mining Shuttle</A><BR>
|
|
||||||
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR>
|
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR>
|
||||||
<A href='?src=\ref[src];secretsfun=whiteout'>Fix all lights</A><BR>
|
<A href='?src=\ref[src];secretsfun=whiteout'>Fix all lights</A><BR>
|
||||||
<A href='?src=\ref[src];secretsfun=friendai'>Best Friend AI</A><BR>
|
<A href='?src=\ref[src];secretsfun=friendai'>Best Friend AI</A><BR>
|
||||||
@@ -1127,67 +1124,4 @@ proc/get_options_bar(whom, detail = 2, name = 0, link = 1)
|
|||||||
//
|
//
|
||||||
//ALL DONE
|
//ALL DONE
|
||||||
//*********************************************************************************************************
|
//*********************************************************************************************************
|
||||||
//TO-DO:
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
/**********************Administration Shuttle**************************/
|
|
||||||
|
|
||||||
var/admin_shuttle_location = 0 // 0 = centcom 13, 1 = station
|
|
||||||
|
|
||||||
proc/move_admin_shuttle()
|
|
||||||
var/area/fromArea
|
|
||||||
var/area/toArea
|
|
||||||
if (admin_shuttle_location == 1)
|
|
||||||
fromArea = locate(/area/shuttle/administration/station)
|
|
||||||
toArea = locate(/area/shuttle/administration/centcom)
|
|
||||||
else
|
|
||||||
fromArea = locate(/area/shuttle/administration/centcom)
|
|
||||||
toArea = locate(/area/shuttle/administration/station)
|
|
||||||
fromArea.move_contents_to(toArea)
|
|
||||||
if (admin_shuttle_location)
|
|
||||||
admin_shuttle_location = 0
|
|
||||||
else
|
|
||||||
admin_shuttle_location = 1
|
|
||||||
return
|
|
||||||
|
|
||||||
/**********************Centcom Ferry**************************/
|
|
||||||
|
|
||||||
var/ferry_location = 0 // 0 = centcom , 1 = station
|
|
||||||
|
|
||||||
proc/move_ferry()
|
|
||||||
var/area/fromArea
|
|
||||||
var/area/toArea
|
|
||||||
if (ferry_location == 1)
|
|
||||||
fromArea = locate(/area/shuttle/transport1/station)
|
|
||||||
toArea = locate(/area/shuttle/transport1/centcom)
|
|
||||||
else
|
|
||||||
fromArea = locate(/area/shuttle/transport1/centcom)
|
|
||||||
toArea = locate(/area/shuttle/transport1/station)
|
|
||||||
fromArea.move_contents_to(toArea)
|
|
||||||
if (ferry_location)
|
|
||||||
ferry_location = 0
|
|
||||||
else
|
|
||||||
ferry_location = 1
|
|
||||||
return
|
|
||||||
|
|
||||||
/**********************Alien ship**************************/
|
|
||||||
|
|
||||||
var/alien_ship_location = 1 // 0 = base , 1 = mine
|
|
||||||
|
|
||||||
proc/move_alien_ship()
|
|
||||||
var/area/fromArea
|
|
||||||
var/area/toArea
|
|
||||||
if (alien_ship_location == 1)
|
|
||||||
fromArea = locate(/area/shuttle/alien/mine)
|
|
||||||
toArea = locate(/area/shuttle/alien/base)
|
|
||||||
else
|
|
||||||
fromArea = locate(/area/shuttle/alien/base)
|
|
||||||
toArea = locate(/area/shuttle/alien/mine)
|
|
||||||
fromArea.move_contents_to(toArea)
|
|
||||||
if (alien_ship_location)
|
|
||||||
alien_ship_location = 0
|
|
||||||
else
|
|
||||||
alien_ship_location = 1
|
|
||||||
return
|
|
||||||
@@ -1920,32 +1920,21 @@
|
|||||||
ticker.mode.finalize_traitor(A.mind)
|
ticker.mode.finalize_traitor(A.mind)
|
||||||
message_admins("\blue [key_name_admin(usr)] used everyone is a traitor secret. Objective is [objective]", 1)
|
message_admins("\blue [key_name_admin(usr)] used everyone is a traitor secret. Objective is [objective]", 1)
|
||||||
log_admin("[key_name(usr)] used everyone is a traitor secret. Objective is [objective]")
|
log_admin("[key_name(usr)] used everyone is a traitor secret. Objective is [objective]")
|
||||||
if("moveminingshuttle")
|
|
||||||
if(mining_shuttle_moving)
|
if("moveshuttle")
|
||||||
return
|
|
||||||
feedback_inc("admin_secrets_fun_used",1)
|
if(!shuttles) return // Something is very wrong, the shuttle controller has not been created.
|
||||||
feedback_add_details("admin_secrets_fun_used","ShM")
|
|
||||||
move_mining_shuttle()
|
|
||||||
message_admins("\blue [key_name_admin(usr)] moved mining shuttle", 1)
|
|
||||||
log_admin("[key_name(usr)] moved the mining shuttle")
|
|
||||||
if("moveadminshuttle")
|
|
||||||
feedback_inc("admin_secrets_fun_used",1)
|
feedback_inc("admin_secrets_fun_used",1)
|
||||||
feedback_add_details("admin_secrets_fun_used","ShA")
|
feedback_add_details("admin_secrets_fun_used","ShA")
|
||||||
move_admin_shuttle()
|
|
||||||
message_admins("\blue [key_name_admin(usr)] moved the centcom administration shuttle", 1)
|
var/shuttle_tag = input("Which shuttle do you want to call?") as null|anything in shuttles.locations
|
||||||
log_admin("[key_name(usr)] moved the centcom administration shuttle")
|
|
||||||
if("moveferry")
|
if(shuttle_tag && !shuttles.moving[shuttle_tag])
|
||||||
feedback_inc("admin_secrets_fun_used",1)
|
shuttles.move_shuttle(shuttle_tag)
|
||||||
feedback_add_details("admin_secrets_fun_used","ShF")
|
message_admins("\blue [key_name_admin(usr)] moved the [shuttle_tag] shuttle", 1)
|
||||||
move_ferry()
|
log_admin("[key_name(usr)] moved the [shuttle_tag] shuttle")
|
||||||
message_admins("\blue [key_name_admin(usr)] moved the centcom ferry", 1)
|
|
||||||
log_admin("[key_name(usr)] moved the centcom ferry")
|
|
||||||
if("movealienship")
|
|
||||||
feedback_inc("admin_secrets_fun_used",1)
|
|
||||||
feedback_add_details("admin_secrets_fun_used","ShX")
|
|
||||||
move_alien_ship()
|
|
||||||
message_admins("\blue [key_name_admin(usr)] moved the alien dinghy", 1)
|
|
||||||
log_admin("[key_name(usr)] moved the alien dinghy")
|
|
||||||
if("togglebombcap")
|
if("togglebombcap")
|
||||||
feedback_inc("admin_secrets_fun_used",1)
|
feedback_inc("admin_secrets_fun_used",1)
|
||||||
feedback_add_details("admin_secrets_fun_used","BC")
|
feedback_add_details("admin_secrets_fun_used","BC")
|
||||||
|
|||||||
@@ -38,132 +38,6 @@
|
|||||||
new /obj/item/clothing/glasses/meson(src)
|
new /obj/item/clothing/glasses/meson(src)
|
||||||
|
|
||||||
|
|
||||||
/**********************Shuttle Computer**************************/
|
|
||||||
|
|
||||||
var/mining_shuttle_tickstomove = 10
|
|
||||||
var/mining_shuttle_moving = 0
|
|
||||||
var/mining_shuttle_location = 0 // 0 = station 13, 1 = mining station
|
|
||||||
|
|
||||||
proc/move_mining_shuttle()
|
|
||||||
if(mining_shuttle_moving) return
|
|
||||||
mining_shuttle_moving = 1
|
|
||||||
spawn(mining_shuttle_tickstomove*10)
|
|
||||||
var/area/fromArea
|
|
||||||
var/area/toArea
|
|
||||||
if (mining_shuttle_location == 1)
|
|
||||||
fromArea = locate(/area/shuttle/mining/outpost)
|
|
||||||
toArea = locate(/area/shuttle/mining/station)
|
|
||||||
|
|
||||||
else
|
|
||||||
fromArea = locate(/area/shuttle/mining/station)
|
|
||||||
toArea = locate(/area/shuttle/mining/outpost)
|
|
||||||
|
|
||||||
var/list/dstturfs = list()
|
|
||||||
var/throwy = world.maxy
|
|
||||||
|
|
||||||
for(var/turf/T in toArea)
|
|
||||||
dstturfs += T
|
|
||||||
if(T.y < throwy)
|
|
||||||
throwy = T.y
|
|
||||||
|
|
||||||
// hey you, get out of the way!
|
|
||||||
for(var/turf/T in dstturfs)
|
|
||||||
// find the turf to move things to
|
|
||||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
|
||||||
//var/turf/E = get_step(D, SOUTH)
|
|
||||||
for(var/atom/movable/AM as mob|obj in T)
|
|
||||||
AM.Move(D)
|
|
||||||
// NOTE: Commenting this out to avoid recreating mass driver glitch
|
|
||||||
/*
|
|
||||||
spawn(0)
|
|
||||||
AM.throw_at(E, 1, 1)
|
|
||||||
return
|
|
||||||
*/
|
|
||||||
|
|
||||||
if(istype(T, /turf/simulated))
|
|
||||||
del(T)
|
|
||||||
|
|
||||||
for(var/mob/living/carbon/bug in toArea) // If someone somehow is still in the shuttle's docking area...
|
|
||||||
bug.gib()
|
|
||||||
|
|
||||||
for(var/mob/living/simple_animal/pest in toArea) // And for the other kind of bug...
|
|
||||||
pest.gib()
|
|
||||||
|
|
||||||
fromArea.move_contents_to(toArea)
|
|
||||||
if (mining_shuttle_location)
|
|
||||||
mining_shuttle_location = 0
|
|
||||||
else
|
|
||||||
mining_shuttle_location = 1
|
|
||||||
|
|
||||||
for(var/mob/M in toArea)
|
|
||||||
if(M.client)
|
|
||||||
spawn(0)
|
|
||||||
if(M.buckled)
|
|
||||||
shake_camera(M, 3, 1) // buckled, not a lot of shaking
|
|
||||||
else
|
|
||||||
shake_camera(M, 10, 1) // unbuckled, HOLY SHIT SHAKE THE ROOM
|
|
||||||
if(istype(M, /mob/living/carbon))
|
|
||||||
if(!M.buckled)
|
|
||||||
M.Weaken(3)
|
|
||||||
|
|
||||||
mining_shuttle_moving = 0
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/computer/mining_shuttle
|
|
||||||
name = "mining shuttle console"
|
|
||||||
icon = 'icons/obj/computer.dmi'
|
|
||||||
icon_state = "shuttle"
|
|
||||||
req_access = list(access_mining)
|
|
||||||
circuit = "/obj/item/weapon/circuitboard/mining_shuttle"
|
|
||||||
var/hacked = 0
|
|
||||||
var/location = 0 //0 = station, 1 = mining base
|
|
||||||
|
|
||||||
/obj/machinery/computer/mining_shuttle/attack_hand(user as mob)
|
|
||||||
if(..(user))
|
|
||||||
return
|
|
||||||
src.add_fingerprint(usr)
|
|
||||||
var/dat
|
|
||||||
|
|
||||||
dat = "<center>Mining Shuttle Control<hr>"
|
|
||||||
|
|
||||||
if(mining_shuttle_moving)
|
|
||||||
dat += "Location: <font color='red'>Moving</font> <br>"
|
|
||||||
else
|
|
||||||
dat += "Location: [mining_shuttle_location ? "Outpost" : "Station"] <br>"
|
|
||||||
|
|
||||||
dat += "<b><A href='?src=\ref[src];move=[1]'>Send</A></b></center>"
|
|
||||||
|
|
||||||
|
|
||||||
user << browse("[dat]", "window=miningshuttle;size=200x150")
|
|
||||||
|
|
||||||
/obj/machinery/computer/mining_shuttle/Topic(href, href_list)
|
|
||||||
if(..())
|
|
||||||
return
|
|
||||||
usr.set_machine(src)
|
|
||||||
src.add_fingerprint(usr)
|
|
||||||
if(href_list["move"])
|
|
||||||
//if(ticker.mode.name == "blob")
|
|
||||||
// if(ticker.mode:declared)
|
|
||||||
// usr << "Under directive 7-10, [station_name()] is quarantined until further notice."
|
|
||||||
// return
|
|
||||||
|
|
||||||
if (!mining_shuttle_moving)
|
|
||||||
usr << "\blue Shuttle recieved message and will be sent shortly."
|
|
||||||
move_mining_shuttle()
|
|
||||||
else
|
|
||||||
usr << "\blue Shuttle is already moving."
|
|
||||||
|
|
||||||
updateUsrDialog()
|
|
||||||
|
|
||||||
/obj/machinery/computer/mining_shuttle/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
||||||
|
|
||||||
if (istype(W, /obj/item/weapon/card/emag))
|
|
||||||
src.req_access = list()
|
|
||||||
hacked = 1
|
|
||||||
usr << "You fried the consoles ID checking system. It's now available to everyone!"
|
|
||||||
else
|
|
||||||
..()
|
|
||||||
|
|
||||||
/******************************Lantern*******************************/
|
/******************************Lantern*******************************/
|
||||||
|
|
||||||
/obj/item/device/flashlight/lantern
|
/obj/item/device/flashlight/lantern
|
||||||
|
|||||||
@@ -1,108 +0,0 @@
|
|||||||
|
|
||||||
/**********************Shuttle Computer**************************/
|
|
||||||
|
|
||||||
//copy paste from the mining shuttle
|
|
||||||
|
|
||||||
var/research_shuttle_tickstomove = 10
|
|
||||||
var/research_shuttle_moving = 0
|
|
||||||
var/research_shuttle_location = 0 // 0 = station 13, 1 = research station
|
|
||||||
|
|
||||||
proc/move_research_shuttle()
|
|
||||||
if(research_shuttle_moving) return
|
|
||||||
research_shuttle_moving = 1
|
|
||||||
spawn(research_shuttle_tickstomove*10)
|
|
||||||
var/area/fromArea
|
|
||||||
var/area/toArea
|
|
||||||
if (research_shuttle_location == 1)
|
|
||||||
fromArea = locate(/area/shuttle/research/outpost)
|
|
||||||
toArea = locate(/area/shuttle/research/station)
|
|
||||||
else
|
|
||||||
fromArea = locate(/area/shuttle/research/station)
|
|
||||||
toArea = locate(/area/shuttle/research/outpost)
|
|
||||||
|
|
||||||
|
|
||||||
var/list/dstturfs = list()
|
|
||||||
var/throwy = world.maxy
|
|
||||||
|
|
||||||
for(var/turf/T in toArea)
|
|
||||||
dstturfs += T
|
|
||||||
if(T.y < throwy)
|
|
||||||
throwy = T.y
|
|
||||||
|
|
||||||
// hey you, get out of the way!
|
|
||||||
for(var/turf/T in dstturfs)
|
|
||||||
// find the turf to move things to
|
|
||||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
|
||||||
//var/turf/E = get_step(D, SOUTH)
|
|
||||||
for(var/atom/movable/AM as mob|obj in T)
|
|
||||||
AM.Move(D)
|
|
||||||
// NOTE: Commenting this out to avoid recreating mass driver glitch
|
|
||||||
/*
|
|
||||||
spawn(0)
|
|
||||||
AM.throw_at(E, 1, 1)
|
|
||||||
return
|
|
||||||
*/
|
|
||||||
|
|
||||||
if(istype(T, /turf/simulated))
|
|
||||||
del(T)
|
|
||||||
|
|
||||||
for(var/mob/living/carbon/bug in toArea) // If someone somehow is still in the shuttle's docking area...
|
|
||||||
bug.gib()
|
|
||||||
|
|
||||||
for(var/mob/living/simple_animal/pest in toArea) // And for the other kind of bug...
|
|
||||||
pest.gib()
|
|
||||||
|
|
||||||
fromArea.move_contents_to(toArea)
|
|
||||||
if (research_shuttle_location)
|
|
||||||
research_shuttle_location = 0
|
|
||||||
else
|
|
||||||
research_shuttle_location = 1
|
|
||||||
research_shuttle_moving = 0
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/computer/research_shuttle
|
|
||||||
name = "Research Shuttle Console"
|
|
||||||
icon = 'icons/obj/computer.dmi'
|
|
||||||
icon_state = "shuttle"
|
|
||||||
req_access = list(access_research)
|
|
||||||
circuit = "/obj/item/weapon/circuitboard/research_shuttle"
|
|
||||||
var/hacked = 0
|
|
||||||
var/location = 0 //0 = station, 1 = research base
|
|
||||||
|
|
||||||
/obj/machinery/computer/research_shuttle/attack_hand(user as mob)
|
|
||||||
src.add_fingerprint(usr)
|
|
||||||
var/dat = "<center>Research shuttle: <b><A href='?src=\ref[src];move=1'>Send</A></b></center><br>"
|
|
||||||
|
|
||||||
user << browse("[dat]", "window=researchshuttle;size=200x100")
|
|
||||||
|
|
||||||
/obj/machinery/computer/research_shuttle/Topic(href, href_list)
|
|
||||||
if(..())
|
|
||||||
return
|
|
||||||
usr.machine = src
|
|
||||||
src.add_fingerprint(usr)
|
|
||||||
if(href_list["move"])
|
|
||||||
//if(ticker.mode.name == "blob")
|
|
||||||
// if(ticker.mode:declared)
|
|
||||||
// usr << "Under directive 7-10, [station_name()] is quarantined until further notice."
|
|
||||||
// return
|
|
||||||
|
|
||||||
if (!research_shuttle_moving)
|
|
||||||
usr << "\blue Shuttle recieved message and will be sent shortly."
|
|
||||||
move_research_shuttle()
|
|
||||||
else
|
|
||||||
usr << "\blue Shuttle is already moving."
|
|
||||||
|
|
||||||
/obj/machinery/computer/research_shuttle/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
||||||
|
|
||||||
if (istype(W, /obj/item/weapon/card/emag))
|
|
||||||
var/obj/item/weapon/card/emag/E = W
|
|
||||||
if(E.uses)
|
|
||||||
E.uses--
|
|
||||||
else
|
|
||||||
return
|
|
||||||
src.req_access = list()
|
|
||||||
hacked = 1
|
|
||||||
usr << "You fried the consoles ID checking system. It's now available to everyone!"
|
|
||||||
|
|
||||||
else
|
|
||||||
..()
|
|
||||||
9
code/modules/shuttles/antagonist.dm
Normal file
9
code/modules/shuttles/antagonist.dm
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/obj/machinery/computer/shuttle_control/multi/vox
|
||||||
|
name = "skipjack control console"
|
||||||
|
req_access = list(access_syndicate)
|
||||||
|
shuttle_tag = "Vox Skipjack"
|
||||||
|
|
||||||
|
/obj/machinery/computer/shuttle_control/multi/syndicate
|
||||||
|
name = "Syndicate control console"
|
||||||
|
req_access = list(access_syndicate)
|
||||||
|
shuttle_tag = "Syndicate"
|
||||||
17
code/modules/shuttles/departmental.dm
Normal file
17
code/modules/shuttles/departmental.dm
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/obj/machinery/computer/shuttle_control/mining
|
||||||
|
name = "mining shuttle console"
|
||||||
|
shuttle_tag = "Mining"
|
||||||
|
req_access = list(access_mining)
|
||||||
|
circuit = "/obj/item/weapon/circuitboard/mining_shuttle"
|
||||||
|
|
||||||
|
/obj/machinery/computer/shuttle_control/engineering
|
||||||
|
name = "engineering shuttle console"
|
||||||
|
shuttle_tag = "Engineering"
|
||||||
|
req_access = list(access_engine)
|
||||||
|
circuit = "/obj/item/weapon/circuitboard/engineering_shuttle"
|
||||||
|
|
||||||
|
/obj/machinery/computer/shuttle_control/research
|
||||||
|
name = "research shuttle console"
|
||||||
|
shuttle_tag = "Research"
|
||||||
|
req_access = list(access_research)
|
||||||
|
circuit = "/obj/item/weapon/circuitboard/research_shuttle"
|
||||||
@@ -1,108 +0,0 @@
|
|||||||
var/engineering_shuttle_tickstomove = 10
|
|
||||||
var/engineering_shuttle_moving = 0
|
|
||||||
var/engineering_shuttle_location = 1 //Starts at the construction site.
|
|
||||||
|
|
||||||
proc/move_engineering_shuttle()
|
|
||||||
if(engineering_shuttle_moving) return
|
|
||||||
engineering_shuttle_moving = 1
|
|
||||||
spawn(engineering_shuttle_tickstomove*10)
|
|
||||||
var/area/fromArea
|
|
||||||
var/area/toArea
|
|
||||||
if (engineering_shuttle_location == 1)
|
|
||||||
fromArea = locate(/area/shuttle/constructionsite/site)
|
|
||||||
toArea = locate(/area/shuttle/constructionsite/station)
|
|
||||||
|
|
||||||
else
|
|
||||||
fromArea = locate(/area/shuttle/constructionsite/station)
|
|
||||||
toArea = locate(/area/shuttle/constructionsite/site)
|
|
||||||
|
|
||||||
var/list/dstturfs = list()
|
|
||||||
var/throwy = world.maxy
|
|
||||||
|
|
||||||
for(var/turf/T in toArea)
|
|
||||||
dstturfs += T
|
|
||||||
if(T.y < throwy)
|
|
||||||
throwy = T.y
|
|
||||||
|
|
||||||
for(var/turf/T in dstturfs)
|
|
||||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
|
||||||
for(var/atom/movable/AM as mob|obj in T)
|
|
||||||
AM.Move(D)
|
|
||||||
if(istype(T, /turf/simulated))
|
|
||||||
del(T)
|
|
||||||
|
|
||||||
for(var/mob/living/carbon/bug in toArea)
|
|
||||||
bug.gib()
|
|
||||||
|
|
||||||
for(var/mob/living/simple_animal/pest in toArea)
|
|
||||||
pest.gib()
|
|
||||||
|
|
||||||
fromArea.move_contents_to(toArea)
|
|
||||||
if (engineering_shuttle_location)
|
|
||||||
engineering_shuttle_location = 0
|
|
||||||
else
|
|
||||||
engineering_shuttle_location = 1
|
|
||||||
|
|
||||||
for(var/mob/M in toArea)
|
|
||||||
if(M.client)
|
|
||||||
spawn(0)
|
|
||||||
if(M.buckled)
|
|
||||||
shake_camera(M, 3, 1)
|
|
||||||
else
|
|
||||||
shake_camera(M, 10, 1)
|
|
||||||
if(istype(M, /mob/living/carbon))
|
|
||||||
if(!M.buckled)
|
|
||||||
M.Weaken(3)
|
|
||||||
|
|
||||||
engineering_shuttle_moving = 0
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/computer/engineering_shuttle
|
|
||||||
name = "engineering shuttle console"
|
|
||||||
icon = 'icons/obj/computer.dmi'
|
|
||||||
icon_state = "shuttle"
|
|
||||||
req_access = list(access_engine)
|
|
||||||
circuit = "/obj/item/weapon/circuitboard/engineering_shuttle"
|
|
||||||
var/hacked = 0
|
|
||||||
var/location = 0
|
|
||||||
|
|
||||||
/obj/machinery/computer/engineering_shuttle/attack_hand(user as mob)
|
|
||||||
if(..(user))
|
|
||||||
return
|
|
||||||
src.add_fingerprint(usr)
|
|
||||||
var/dat
|
|
||||||
|
|
||||||
dat = "<center>Engineering Shuttle Control<hr>"
|
|
||||||
|
|
||||||
if(engineering_shuttle_moving)
|
|
||||||
dat += "Location: <font color='red'>Moving</font> <br>"
|
|
||||||
else
|
|
||||||
dat += "Location: [engineering_shuttle_location ? "Outpost" : "Station"] <br>"
|
|
||||||
|
|
||||||
dat += "<b><A href='?src=\ref[src];move=[1]'>Send</A></b></center>"
|
|
||||||
|
|
||||||
|
|
||||||
user << browse("[dat]", "window=engineeringshuttle;size=200x150")
|
|
||||||
|
|
||||||
/obj/machinery/computer/engineering_shuttle/Topic(href, href_list)
|
|
||||||
if(..())
|
|
||||||
return
|
|
||||||
usr.set_machine(src)
|
|
||||||
src.add_fingerprint(usr)
|
|
||||||
if(href_list["move"])
|
|
||||||
if (!engineering_shuttle_moving)
|
|
||||||
usr << "\blue Shuttle recieved message and will be sent shortly."
|
|
||||||
move_engineering_shuttle()
|
|
||||||
else
|
|
||||||
usr << "\blue Shuttle is already moving."
|
|
||||||
|
|
||||||
updateUsrDialog()
|
|
||||||
|
|
||||||
/obj/machinery/computer/engineering_shuttle/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
||||||
|
|
||||||
if (istype(W, /obj/item/weapon/card/emag))
|
|
||||||
src.req_access = list()
|
|
||||||
hacked = 1
|
|
||||||
usr << "You fried the consoles ID checking system. It's now available to everyone!"
|
|
||||||
else
|
|
||||||
..()
|
|
||||||
256
code/modules/shuttles/shuttle.dm
Normal file
256
code/modules/shuttles/shuttle.dm
Normal file
@@ -0,0 +1,256 @@
|
|||||||
|
//These lists are populated in /datum/shuttle_controller/New()
|
||||||
|
//Shuttle controller is instantiated in master_controller.dm.
|
||||||
|
|
||||||
|
var/global/datum/shuttle_controller/shuttles
|
||||||
|
|
||||||
|
/datum/shuttle_controller //This isn't really a controller...
|
||||||
|
var/list/locations = list()
|
||||||
|
var/list/delays = list()
|
||||||
|
var/list/moving = list()
|
||||||
|
var/list/areas_offsite = list()
|
||||||
|
var/list/areas_station = list()
|
||||||
|
|
||||||
|
//Shuttles with multiple destinations don't quite behave in the same way as ferries.
|
||||||
|
var/list/multi_shuttles = list()
|
||||||
|
|
||||||
|
/datum/shuttle_controller/New()
|
||||||
|
|
||||||
|
..()
|
||||||
|
|
||||||
|
//Supply and escape shuttles.
|
||||||
|
locations["Supply"] = 1
|
||||||
|
delays["Supply"] = 0
|
||||||
|
moving["Supply"] = 0
|
||||||
|
areas_offsite["Supply"] = locate(/area/supply/dock)
|
||||||
|
areas_station["Supply"] = locate(/area/supply/station)
|
||||||
|
|
||||||
|
// Admin shuttles.
|
||||||
|
locations["Centcom"] = 1
|
||||||
|
delays["Centcom"] = 0
|
||||||
|
moving["Centcom"] = 0
|
||||||
|
areas_offsite["Centcom"] = locate(/area/shuttle/transport1/centcom)
|
||||||
|
areas_station["Centcom"] = locate(/area/shuttle/transport1/station)
|
||||||
|
|
||||||
|
locations["Administration"] = 1
|
||||||
|
delays["Administration"] = 0
|
||||||
|
moving["Administration"] = 0
|
||||||
|
areas_offsite["Administration"] = locate(/area/shuttle/administration/centcom)
|
||||||
|
areas_station["Administration"] = locate(/area/shuttle/administration/station)
|
||||||
|
|
||||||
|
locations["Alien"] = 0
|
||||||
|
delays["Alien"] = 0
|
||||||
|
moving["Alien"] = 0
|
||||||
|
areas_offsite["Alien"] = locate(/area/shuttle/alien/base)
|
||||||
|
areas_station["Alien"] = locate(/area/shuttle/alien/mine)
|
||||||
|
|
||||||
|
// Public shuttles.
|
||||||
|
locations["Engineering"] = 1
|
||||||
|
delays["Engineering"] = 10
|
||||||
|
moving["Engineering"] = 0
|
||||||
|
areas_offsite["Engineering"] = locate(/area/shuttle/constructionsite/site)
|
||||||
|
areas_station["Engineering"] = locate(/area/shuttle/constructionsite/station)
|
||||||
|
|
||||||
|
locations["Mining"] = 0
|
||||||
|
delays["Mining"] = 10
|
||||||
|
moving["Mining"] = 0
|
||||||
|
areas_offsite["Mining"] = locate(/area/shuttle/mining/outpost)
|
||||||
|
areas_station["Mining"] = locate(/area/shuttle/mining/station)
|
||||||
|
|
||||||
|
locations["Research"] = 0
|
||||||
|
delays["Research"] = 10
|
||||||
|
moving["Research"] = 0
|
||||||
|
areas_offsite["Research"] = locate(/area/shuttle/research/outpost)
|
||||||
|
areas_station["Research"] = locate(/area/shuttle/research/station)
|
||||||
|
|
||||||
|
//Vox Shuttle.
|
||||||
|
var/datum/multi_shuttle/VS = new
|
||||||
|
VS.origin = /area/shuttle/vox/station
|
||||||
|
|
||||||
|
VS.destinations = list(
|
||||||
|
"Fore Starboard Solars" = /area/vox_station/northeast_solars,
|
||||||
|
"Fore Port Solars" = /area/vox_station/northwest_solars,
|
||||||
|
"Aft Starboard Solars" = /area/vox_station/southeast_solars,
|
||||||
|
"Aft Port Solars" = /area/vox_station/southwest_solars,
|
||||||
|
"Mining asteroid" = /area/vox_station/mining
|
||||||
|
)
|
||||||
|
|
||||||
|
VS.announcer = "NSV Icarus"
|
||||||
|
VS.arrival_message = "Attention, Exodus, we just tracked a small target bypassing our defensive perimeter. Can't fire on it without hitting the station - you've got incoming visitors, like it or not."
|
||||||
|
VS.departure_message = "Your guests are pulling away, Exodus - moving too fast for us to draw a bead on them. Looks like they're heading out of the system at a rapid clip."
|
||||||
|
VS.interim = /area/vox_station/transit
|
||||||
|
|
||||||
|
multi_shuttles["Vox Skipjack"] = VS
|
||||||
|
locations["Vox Skipjack"] = 1
|
||||||
|
delays["Vox Skipjack"] = 10
|
||||||
|
moving["Vox Skipjack"] = 0
|
||||||
|
|
||||||
|
//Nuke Ops shuttle.
|
||||||
|
var/datum/multi_shuttle/MS = new
|
||||||
|
MS.origin = /area/syndicate_station/start
|
||||||
|
|
||||||
|
MS.destinations = list(
|
||||||
|
"Northwest of the station" = /area/syndicate_station/northwest,
|
||||||
|
"North of the station" = /area/syndicate_station/north,
|
||||||
|
"Northeast of the station" = /area/syndicate_station/northeast,
|
||||||
|
"Southwest of the station" = /area/syndicate_station/southwest,
|
||||||
|
"South of the station" = /area/syndicate_station/south,
|
||||||
|
"Southeast of the station" = /area/syndicate_station/southeast,
|
||||||
|
"Telecomms Satellite" = /area/syndicate_station/commssat,
|
||||||
|
"Mining Asteroid" = /area/syndicate_station/mining
|
||||||
|
)
|
||||||
|
|
||||||
|
MS.announcer = "NSV Icarus"
|
||||||
|
MS.arrival_message = "Attention, Exodus, you have a large signature approaching the station - looks unarmed to surface scans. We're too far out to intercept - brace for visitors."
|
||||||
|
MS.departure_message = "Your visitors are on their way out of the system, Exodus, burning delta-v like it's nothing. Good riddance."
|
||||||
|
MS.interim = /area/syndicate_station/transit
|
||||||
|
|
||||||
|
multi_shuttles["Syndicate"] = MS
|
||||||
|
locations["Syndicate"] = 1
|
||||||
|
delays["Syndicate"] = 10
|
||||||
|
moving["Syndicate"] = 0
|
||||||
|
|
||||||
|
/datum/shuttle_controller/proc/move_shuttle(var/shuttle_tag,var/area/origin,var/area/destination)
|
||||||
|
|
||||||
|
//world << "move_shuttle() called for [shuttle_tag] leaving [origin] en route to [destination]."
|
||||||
|
if(!shuttle_tag || isnull(locations[shuttle_tag]))
|
||||||
|
return
|
||||||
|
|
||||||
|
if(moving[shuttle_tag] == 1) return
|
||||||
|
moving[shuttle_tag] = 1
|
||||||
|
|
||||||
|
spawn(delays[shuttle_tag]*10)
|
||||||
|
|
||||||
|
var/area/area_going_to
|
||||||
|
if(destination)
|
||||||
|
//world << "Using supplied destination [destination]."
|
||||||
|
area_going_to = destination
|
||||||
|
else
|
||||||
|
//world << "Using controller value [(locations[shuttle_tag] == 1 ? areas_station[shuttle_tag] : areas_offsite[shuttle_tag])]."
|
||||||
|
area_going_to = (locations[shuttle_tag] == 1 ? areas_station[shuttle_tag] : areas_offsite[shuttle_tag])
|
||||||
|
|
||||||
|
var/area/area_coming_from
|
||||||
|
if(origin)
|
||||||
|
//world << "Using supplied origin [origin]."
|
||||||
|
area_coming_from = origin
|
||||||
|
else
|
||||||
|
//world << "Using controller value [(locations[shuttle_tag] == 1 ? areas_offsite[shuttle_tag] : areas_station[shuttle_tag])]."
|
||||||
|
area_coming_from = (locations[shuttle_tag] == 1 ? areas_offsite[shuttle_tag] : areas_station[shuttle_tag])
|
||||||
|
|
||||||
|
//world << "area_coming_from: [area_coming_from]"
|
||||||
|
//world << "area_going_to: [area_going_to]"
|
||||||
|
|
||||||
|
if(area_coming_from == area_going_to)
|
||||||
|
//world << "cancelling move, shuttle will overlap."
|
||||||
|
moving[shuttle_tag] = 0
|
||||||
|
return
|
||||||
|
|
||||||
|
var/list/dstturfs = list()
|
||||||
|
var/throwy = world.maxy
|
||||||
|
|
||||||
|
for(var/turf/T in area_going_to)
|
||||||
|
dstturfs += T
|
||||||
|
if(T.y < throwy)
|
||||||
|
throwy = T.y
|
||||||
|
|
||||||
|
for(var/turf/T in dstturfs)
|
||||||
|
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||||
|
for(var/atom/movable/AM as mob|obj in T)
|
||||||
|
AM.Move(D)
|
||||||
|
if(istype(T, /turf/simulated))
|
||||||
|
del(T)
|
||||||
|
|
||||||
|
for(var/mob/living/carbon/bug in area_going_to)
|
||||||
|
bug.gib()
|
||||||
|
|
||||||
|
for(var/mob/living/simple_animal/pest in area_going_to)
|
||||||
|
pest.gib()
|
||||||
|
|
||||||
|
area_coming_from.move_contents_to(area_going_to)
|
||||||
|
|
||||||
|
locations[shuttle_tag] = !locations[shuttle_tag]
|
||||||
|
|
||||||
|
for(var/mob/M in area_going_to)
|
||||||
|
if(M.client)
|
||||||
|
spawn(0)
|
||||||
|
if(M.buckled)
|
||||||
|
M << "\red Sudden acceleration presses you into your chair!"
|
||||||
|
shake_camera(M, 3, 1)
|
||||||
|
else
|
||||||
|
M << "\red The floor lurches beneath you!"
|
||||||
|
shake_camera(M, 10, 1)
|
||||||
|
if(istype(M, /mob/living/carbon))
|
||||||
|
if(!M.buckled)
|
||||||
|
M.Weaken(3)
|
||||||
|
|
||||||
|
moving[shuttle_tag] = 0
|
||||||
|
return
|
||||||
|
|
||||||
|
//This is for shuttles with a timer before arrival such as the vox skipjack and the escape shuttle.
|
||||||
|
/datum/shuttle_controller/proc/move_shuttle_long(var/shuttle_tag,var/area/departing,var/area/destination,var/area/interim,var/delay)
|
||||||
|
|
||||||
|
move_shuttle(shuttle_tag,locate(departing),locate(interim))
|
||||||
|
|
||||||
|
spawn(1)
|
||||||
|
moving[shuttle_tag] = 1 //So they can't jump out by messing with the console.
|
||||||
|
|
||||||
|
sleep(delay)
|
||||||
|
|
||||||
|
moving[shuttle_tag] = 0
|
||||||
|
move_shuttle(shuttle_tag,locate(interim),locate(destination))
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/machinery/computer/shuttle_control
|
||||||
|
name = "shuttle console"
|
||||||
|
icon = 'icons/obj/computer.dmi'
|
||||||
|
icon_state = "shuttle"
|
||||||
|
req_access = list(access_engine)
|
||||||
|
circuit = "/obj/item/weapon/circuitboard/engineering_shuttle"
|
||||||
|
|
||||||
|
var/shuttle_tag // Used to coordinate data in shuttle controller.
|
||||||
|
var/hacked = 0 // Has been emagged, no access restrictions.
|
||||||
|
|
||||||
|
/obj/machinery/computer/shuttle_control/attack_hand(user as mob)
|
||||||
|
|
||||||
|
if(..(user))
|
||||||
|
return
|
||||||
|
src.add_fingerprint(user)
|
||||||
|
var/dat
|
||||||
|
|
||||||
|
dat = "<center>[shuttle_tag] Shuttle Control<hr>"
|
||||||
|
|
||||||
|
if(shuttles.moving[shuttle_tag])
|
||||||
|
dat += "Location: <font color='red'>Moving</font> <br>"
|
||||||
|
else
|
||||||
|
dat += "Location: [shuttles.locations[shuttle_tag] ? "Offsite" : "Station"] <br>"
|
||||||
|
|
||||||
|
dat += "<b><A href='?src=\ref[src];move=[1]'>Send</A></b></center>"
|
||||||
|
|
||||||
|
|
||||||
|
user << browse("[dat]", "window=[shuttle_tag]shuttlecontrol;size=200x150")
|
||||||
|
|
||||||
|
/obj/machinery/computer/shuttle_control/Topic(href, href_list)
|
||||||
|
if(..())
|
||||||
|
return
|
||||||
|
usr.set_machine(src)
|
||||||
|
src.add_fingerprint(usr)
|
||||||
|
|
||||||
|
if(href_list["move"])
|
||||||
|
if (!shuttles.moving[shuttle_tag])
|
||||||
|
usr << "\blue [shuttle_tag] Shuttle recieved message and will be sent shortly."
|
||||||
|
shuttles.move_shuttle(shuttle_tag)
|
||||||
|
else
|
||||||
|
usr << "\blue [shuttle_tag] Shuttle is already moving."
|
||||||
|
|
||||||
|
|
||||||
|
/obj/machinery/computer/shuttle_control/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
|
|
||||||
|
if (istype(W, /obj/item/weapon/card/emag))
|
||||||
|
src.req_access = list()
|
||||||
|
hacked = 1
|
||||||
|
usr << "You short out the console's ID checking system. It's now available to everyone!"
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/machinery/computer/shuttle_control/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
visible_message("[Proj] ricochets off [src]!")
|
||||||
138
code/modules/shuttles/shuttles_multi.dm
Normal file
138
code/modules/shuttles/shuttles_multi.dm
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
//This is a holder for things like the Vox and Nuke shuttle.
|
||||||
|
/datum/multi_shuttle
|
||||||
|
|
||||||
|
var/cloaked = 1
|
||||||
|
var/at_origin = 1
|
||||||
|
var/move_time = 240
|
||||||
|
var/cooldown = 200
|
||||||
|
var/last_move = 0
|
||||||
|
|
||||||
|
var/announcer
|
||||||
|
var/arrival_message
|
||||||
|
var/departure_message
|
||||||
|
|
||||||
|
var/area/interim
|
||||||
|
var/area/last_departed
|
||||||
|
var/list/destinations
|
||||||
|
var/area/origin
|
||||||
|
var/return_warning = 0
|
||||||
|
|
||||||
|
/datum/multi_shuttle/New()
|
||||||
|
..()
|
||||||
|
if(origin) last_departed = origin
|
||||||
|
|
||||||
|
/datum/multi_shuttle/proc/announce_departure()
|
||||||
|
|
||||||
|
if(cloaked || isnull(departure_message))
|
||||||
|
return
|
||||||
|
|
||||||
|
command_alert(departure_message,(announcer ? announcer : "Central Command"))
|
||||||
|
|
||||||
|
/datum/multi_shuttle/proc/announce_arrival()
|
||||||
|
|
||||||
|
if(cloaked || isnull(arrival_message))
|
||||||
|
return
|
||||||
|
|
||||||
|
command_alert(arrival_message,(announcer ? announcer : "Central Command"))
|
||||||
|
|
||||||
|
/obj/machinery/computer/shuttle_control/multi
|
||||||
|
icon_state = "syndishuttle"
|
||||||
|
|
||||||
|
/obj/machinery/computer/shuttle_control/multi/attack_hand(user as mob)
|
||||||
|
|
||||||
|
if(..(user))
|
||||||
|
return
|
||||||
|
src.add_fingerprint(user)
|
||||||
|
|
||||||
|
var/datum/multi_shuttle/MS = shuttles.multi_shuttles[shuttle_tag]
|
||||||
|
if(!istype(MS)) return
|
||||||
|
|
||||||
|
var/dat
|
||||||
|
dat = "<center>[shuttle_tag] Ship Control<hr>"
|
||||||
|
|
||||||
|
|
||||||
|
if(shuttles.moving[shuttle_tag])
|
||||||
|
dat += "Location: <font color='red'>Moving</font> <br>"
|
||||||
|
else
|
||||||
|
var/area/areacheck = get_area(src)
|
||||||
|
dat += "Location: [areacheck.name]<br>"
|
||||||
|
|
||||||
|
if((MS.last_move + MS.cooldown) > world.time)
|
||||||
|
dat += "<font color='red'>Engines charging.</font><br>"
|
||||||
|
else
|
||||||
|
dat += "<font color='green'>Engines ready.</font><br>"
|
||||||
|
|
||||||
|
dat += "<br><b><A href='?src=\ref[src];toggle_cloak=[1]'>Toggle cloaking field</A></b><br>"
|
||||||
|
dat += "<b><A href='?src=\ref[src];move_multi=[1]'>Move ship</A></b><br>"
|
||||||
|
dat += "<b><A href='?src=\ref[src];start=[1]'>Return to base</A></b></center>"
|
||||||
|
|
||||||
|
user << browse("[dat]", "window=[shuttle_tag]shuttlecontrol;size=300x600")
|
||||||
|
|
||||||
|
/obj/machinery/computer/shuttle_control/multi/Topic(href, href_list)
|
||||||
|
|
||||||
|
if(..())
|
||||||
|
return
|
||||||
|
|
||||||
|
usr.set_machine(src)
|
||||||
|
src.add_fingerprint(usr)
|
||||||
|
|
||||||
|
var/datum/multi_shuttle/MS = shuttles.multi_shuttles[shuttle_tag]
|
||||||
|
if(!istype(MS)) return
|
||||||
|
|
||||||
|
if (shuttles.moving[shuttle_tag])
|
||||||
|
usr << "\blue [shuttle_tag] vessel is moving."
|
||||||
|
return
|
||||||
|
|
||||||
|
if((MS.last_move + MS.cooldown) > world.time)
|
||||||
|
usr << "\red The ship is inoperable while the engines are charging."
|
||||||
|
return
|
||||||
|
|
||||||
|
if(href_list["start"])
|
||||||
|
|
||||||
|
if(MS.at_origin)
|
||||||
|
usr << "\red You are already at your home base."
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!MS.return_warning)
|
||||||
|
usr << "\red Returning to your home base will end your mission. If you are sure, press the button again."
|
||||||
|
//TODO: Actually end the mission.
|
||||||
|
MS.return_warning = 1
|
||||||
|
return
|
||||||
|
|
||||||
|
shuttles.move_shuttle_long(shuttle_tag,MS.last_departed,MS.origin,MS.interim,MS.move_time)
|
||||||
|
MS.last_departed = MS.origin
|
||||||
|
MS.at_origin = 1
|
||||||
|
|
||||||
|
if(href_list["toggle_cloak"])
|
||||||
|
|
||||||
|
if(!shuttles.multi_shuttles) return
|
||||||
|
|
||||||
|
MS.cloaked = !MS.cloaked
|
||||||
|
usr << "\red Ship stealth systems have been [(MS.cloaked ? "activated. The station will not" : "deactivated. The station will")] be warned of our arrival."
|
||||||
|
|
||||||
|
if(href_list["move_multi"])
|
||||||
|
|
||||||
|
if(!shuttles.multi_shuttles) return
|
||||||
|
|
||||||
|
var/choice = input("Select a destination.") as null|anything in MS.destinations
|
||||||
|
if(!choice) return
|
||||||
|
|
||||||
|
usr << "\blue [shuttle_tag] main computer recieved message."
|
||||||
|
|
||||||
|
if(MS.at_origin)
|
||||||
|
MS.announce_arrival()
|
||||||
|
MS.last_departed = MS.origin
|
||||||
|
MS.at_origin = 0
|
||||||
|
|
||||||
|
shuttles.move_shuttle_long(shuttle_tag,MS.last_departed,MS.destinations[choice],MS.interim,MS.move_time)
|
||||||
|
MS.last_departed = MS.destinations[choice]
|
||||||
|
return
|
||||||
|
|
||||||
|
else if(choice == MS.origin)
|
||||||
|
|
||||||
|
MS.announce_departure()
|
||||||
|
|
||||||
|
shuttles.move_shuttle(shuttle_tag,locate(MS.last_departed),locate(MS.destinations[choice]))
|
||||||
|
MS.last_departed = MS.destinations[choice]
|
||||||
|
|
||||||
|
updateUsrDialog()
|
||||||
1852
maps/tgstation2.dmm
1852
maps/tgstation2.dmm
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user