mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-12 07:35:31 +01:00
Converted Syndicate shuttle over to multi-shuttle setup.
This commit is contained in:
@@ -372,7 +372,6 @@
|
||||
#include "code\game\machinery\computer\skills.dm"
|
||||
#include "code\game\machinery\computer\specops_shuttle.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\doors\airlock.dm"
|
||||
#include "code\game\machinery\doors\airlock_electronics.dm"
|
||||
|
||||
@@ -404,7 +404,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
|
||||
if(ticker)
|
||||
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)
|
||||
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
|
||||
|
||||
@@ -179,8 +179,7 @@
|
||||
|
||||
/obj/item/weapon/pinpointer/nukeop
|
||||
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)
|
||||
if(!active)
|
||||
|
||||
@@ -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
|
||||
@@ -82,16 +82,21 @@ var/global/datum/shuttle_controller/shuttles
|
||||
MS.origin = /area/syndicate_station/start
|
||||
|
||||
MS.destinations = list(
|
||||
"NW" = /area/syndicate_station/northwest,
|
||||
"N" = /area/syndicate_station/north,
|
||||
"NE" = /area/syndicate_station/northeast,
|
||||
"SW" = /area/syndicate_station/southwest,
|
||||
"S" = /area/syndicate_station/south,
|
||||
"SE" = /area/syndicate_station/southeast,
|
||||
"Telecomms" = /area/syndicate_station/commssat,
|
||||
"Mining" = /area/syndicate_station/mining
|
||||
"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
|
||||
@@ -159,11 +164,12 @@ var/global/datum/shuttle_controller/shuttles
|
||||
|
||||
for(var/mob/M in area_going_to)
|
||||
if(M.client)
|
||||
M << "\red The ship lurches beneath you!"
|
||||
spawn(0)
|
||||
if(M.buckled)
|
||||
M << "\red Sudden acceleration presses you into your chair!"
|
||||
shake_camera(M, 3, 1)
|
||||
else
|
||||
M << "\red The ship lurches beneath you!"
|
||||
shake_camera(M, 10, 1)
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(!M.buckled)
|
||||
@@ -237,4 +243,7 @@ var/global/datum/shuttle_controller/shuttles
|
||||
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]!")
|
||||
@@ -5,6 +5,7 @@
|
||||
var/at_origin = 1
|
||||
var/move_time = 240
|
||||
var/cooldown = 200
|
||||
var/last_move = 0
|
||||
|
||||
var/announcer
|
||||
var/arrival_message
|
||||
@@ -42,21 +43,30 @@
|
||||
if(..(user))
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
var/dat
|
||||
|
||||
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>"
|
||||
|
||||
dat += "<b><A href='?src=\ref[src];toggle_cloak=[1]'>Toggle cloaking field</A></b><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=220x220")
|
||||
user << browse("[dat]", "window=[shuttle_tag]shuttlecontrol;size=300x600")
|
||||
|
||||
/obj/machinery/computer/shuttle_control/multi/Topic(href, href_list)
|
||||
|
||||
@@ -73,6 +83,10 @@
|
||||
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)
|
||||
@@ -121,4 +135,4 @@
|
||||
shuttles.move_shuttle(shuttle_tag,locate(MS.last_departed),locate(MS.destinations[choice]))
|
||||
MS.last_departed = MS.destinations[choice]
|
||||
|
||||
updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
Reference in New Issue
Block a user