mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
[MIRROR] Bluespace Launchpads (#879)
* Bluespace Launchpads * Delete runtimestation.dmm.rej * Delete tgstation.dme.rej * Delete tgui.js.rej * Update tgui.js
This commit is contained in:
committed by
Poojawa
parent
30e18146e5
commit
6a2916a171
@@ -163,6 +163,10 @@
|
||||
name = "Telescience Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/telescience
|
||||
origin_tech = "programming=3;bluespace=3;plasmatech=4"
|
||||
/obj/item/weapon/circuitboard/computer/launchpad_console
|
||||
name = "Launchpad Control Console (Computer Board)"
|
||||
build_path = /obj/machinery/computer/launchpad
|
||||
origin_tech = "programming=3;bluespace=3;plasmatech=2"
|
||||
/obj/item/weapon/circuitboard/computer/message_monitor
|
||||
name = "Message Monitor (Computer Board)"
|
||||
build_path = /obj/machinery/computer/message_monitor
|
||||
|
||||
155
code/game/machinery/computer/launchpad_control.dm
Normal file
155
code/game/machinery/computer/launchpad_control.dm
Normal file
@@ -0,0 +1,155 @@
|
||||
/obj/machinery/computer/launchpad
|
||||
name = "\improper Launchpad Control Console"
|
||||
desc = "Used to teleport objects to and from a launchpad."
|
||||
icon_screen = "teleport"
|
||||
icon_keyboard = "teleport_key"
|
||||
circuit = /obj/item/weapon/circuitboard/computer/launchpad_console
|
||||
var/sending = TRUE
|
||||
var/current_pad //current pad viewed on the screen
|
||||
var/list/obj/machinery/launchpad/launchpads
|
||||
var/maximum_pads = 4
|
||||
|
||||
/obj/machinery/computer/launchpad/Initialize()
|
||||
launchpads = list()
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/computer/launchpad/attack_paw(mob/user)
|
||||
to_chat(user, "<span class='warning'>You are too primitive to use this computer!</span>")
|
||||
return
|
||||
|
||||
/obj/machinery/computer/launchpad/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
var/obj/item/device/multitool/M = W
|
||||
if(M.buffer && istype(M.buffer, /obj/machinery/launchpad))
|
||||
if(LAZYLEN(launchpads) < maximum_pads)
|
||||
launchpads |= M.buffer
|
||||
M.buffer = null
|
||||
to_chat(user, "<span class='notice'>You upload the data from the [W.name]'s buffer.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] cannot handle any more connections!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/launchpad/attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/launchpad/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/computer/launchpad/proc/pad_exists(number)
|
||||
var/obj/machinery/launchpad/pad = launchpads[number]
|
||||
if(QDELETED(pad))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/launchpad/proc/get_pad(number)
|
||||
var/obj/machinery/launchpad/pad = launchpads[number]
|
||||
return pad
|
||||
|
||||
/obj/machinery/computer/launchpad/interact(mob/user)
|
||||
var/list/t = list()
|
||||
if(!LAZYLEN(launchpads))
|
||||
in_use = FALSE //Yeah so if you deconstruct teleporter while its in the process of shooting it wont disable the console
|
||||
t += "<div class='statusDisplay'>No launchpad located.</div><BR>"
|
||||
else
|
||||
for(var/i in 1 to LAZYLEN(launchpads))
|
||||
if(pad_exists(i))
|
||||
var/obj/machinery/launchpad/pad = get_pad(i)
|
||||
if(pad.stat & NOPOWER)
|
||||
t+= "<span class='linkOff'>[pad.display_name]</span>"
|
||||
else
|
||||
t+= "<A href='?src=\ref[src];choose_pad=1;pad=[i]'>[pad.display_name]</A>"
|
||||
else
|
||||
launchpads -= get_pad(i)
|
||||
t += "<BR>"
|
||||
|
||||
if(current_pad)
|
||||
var/obj/machinery/launchpad/pad = get_pad(current_pad)
|
||||
t += "<div class='statusDisplay'><b>[pad.display_name]</b></div>"
|
||||
t += "<A href='?src=\ref[src];change_name=1;pad=[current_pad]'>Rename</A>"
|
||||
t += "<A href='?src=\ref[src];remove=1;pad=[current_pad]'>Remove</A><BR><BR>"
|
||||
t += "<A href='?src=\ref[src];raisey=1;lowerx=1;pad=[current_pad]'>O</A>" //up-left
|
||||
t += "<A href='?src=\ref[src];raisey=1;pad=[current_pad]'>^</A>" //up
|
||||
t += "<A href='?src=\ref[src];raisey=1;raisex=1;pad=[current_pad]'>O</A><BR>" //up-right
|
||||
t += "<A href='?src=\ref[src];lowerx=1;pad=[current_pad]'><</A>"//left
|
||||
t += "<A href='?src=\ref[src];reset=1;pad=[current_pad]'>R</A>"//reset to 0
|
||||
t += "<A href='?src=\ref[src];raisex=1;pad=[current_pad]'>></A><BR>"//right
|
||||
t += "<A href='?src=\ref[src];lowery=1;lowerx=1;pad=[current_pad]'>O</A>"//down-left
|
||||
t += "<A href='?src=\ref[src];lowery=1;pad=[current_pad]'>v</A>"//down
|
||||
t += "<A href='?src=\ref[src];lowery=1;raisex=1;pad=[current_pad]'>O</A><BR>"//down-right
|
||||
t += "<BR>"
|
||||
t += "<div class='statusDisplay'>Current offset:</div><BR>"
|
||||
t += "<div class='statusDisplay'>[abs(pad.y_offset)] [pad.y_offset > 0 ? "N":"S"]</div><BR>"
|
||||
t += "<div class='statusDisplay'>[abs(pad.x_offset)] [pad.x_offset > 0 ? "E":"W"]</div><BR>"
|
||||
|
||||
t += "<BR><A href='?src=\ref[src];launch=1;pad=[current_pad]'>Launch</A>"
|
||||
t += " <A href='?src=\ref[src];pull=1;pad=[current_pad]'>Pull</A>"
|
||||
|
||||
var/datum/browser/popup = new(user, "launchpad", name, 300, 500)
|
||||
popup.set_content(t.Join())
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/computer/launchpad/proc/teleport(mob/user, obj/machinery/launchpad/pad)
|
||||
if(QDELETED(pad))
|
||||
to_chat(user, "<span class='warning'>ERROR: Launchpad not responding. Check launchpad integrity.</span>")
|
||||
return
|
||||
if(!pad.isAvailable())
|
||||
to_chat(user, "<span class='warning'>ERROR: Launchpad not operative. Make sure the launchpad is ready and powered.</span>")
|
||||
return
|
||||
pad.doteleport(user, sending)
|
||||
|
||||
/obj/machinery/computer/launchpad/Topic(href, href_list)
|
||||
var/obj/machinery/launchpad/pad
|
||||
if(href_list["pad"])
|
||||
pad = get_pad(text2num(href_list["pad"]))
|
||||
|
||||
if(..())
|
||||
return
|
||||
if(!LAZYLEN(launchpads))
|
||||
updateDialog()
|
||||
return
|
||||
|
||||
if(href_list["choose_pad"])
|
||||
current_pad = text2num(href_list["pad"])
|
||||
|
||||
if(href_list["raisex"])
|
||||
if(pad.x_offset < pad.range)
|
||||
pad.x_offset++
|
||||
|
||||
if(href_list["lowerx"])
|
||||
if(pad.x_offset > (pad.range * -1))
|
||||
pad.x_offset--
|
||||
|
||||
if(href_list["raisey"])
|
||||
if(pad.y_offset < pad.range)
|
||||
pad.y_offset++
|
||||
|
||||
if(href_list["lowery"])
|
||||
if(pad.y_offset > (pad.range * -1))
|
||||
pad.y_offset--
|
||||
|
||||
if(href_list["reset"])
|
||||
pad.y_offset = 0
|
||||
pad.x_offset = 0
|
||||
|
||||
if(href_list["change_name"])
|
||||
var/new_name = stripped_input(usr, "What do you wish to name the launchpad?", "Launchpad", pad.display_name, 15) as text|null
|
||||
if(!new_name)
|
||||
return
|
||||
pad.display_name = new_name
|
||||
|
||||
if(href_list["remove"])
|
||||
if(usr && alert(usr, "Are you sure?", "Remove Launchpad", "I'm Sure", "Abort") != "Abort")
|
||||
launchpads -= pad
|
||||
|
||||
if(href_list["launch"])
|
||||
sending = TRUE
|
||||
teleport(usr, pad)
|
||||
|
||||
if(href_list["pull"])
|
||||
sending = FALSE
|
||||
teleport(usr, pad)
|
||||
|
||||
updateDialog()
|
||||
373
code/game/machinery/launch_pad.dm
Normal file
373
code/game/machinery/launch_pad.dm
Normal file
@@ -0,0 +1,373 @@
|
||||
/obj/machinery/launchpad
|
||||
name = "bluespace launchpad"
|
||||
desc = "A bluespace pad able to thrust matter through bluespace, teleporting it to or from nearby locations."
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "lpad-idle"
|
||||
var/icon_teleport = "lpad-beam"
|
||||
anchored = TRUE
|
||||
use_power = TRUE
|
||||
idle_power_usage = 200
|
||||
active_power_usage = 2500
|
||||
var/stationary = TRUE //to prevent briefcase pad deconstruction and such
|
||||
var/display_name = "Launchpad"
|
||||
var/teleport_speed = 35
|
||||
var/range = 5
|
||||
var/teleporting = FALSE //if it's in the process of teleporting
|
||||
var/power_efficiency = 1
|
||||
var/x_offset = 0
|
||||
var/y_offset = 0
|
||||
|
||||
/obj/machinery/launchpad/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/weapon/circuitboard/machine/launchpad/B = new
|
||||
B.apply_default_parts(src)
|
||||
|
||||
/obj/item/weapon/circuitboard/machine/launchpad
|
||||
name = "Bluespace Launchpad (Machine Board)"
|
||||
build_path = /obj/machinery/launchpad
|
||||
origin_tech = "programming=3;engineering=3;plasmatech=2;bluespace=3"
|
||||
req_components = list(
|
||||
/obj/item/weapon/ore/bluespace_crystal = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1)
|
||||
def_components = list(/obj/item/weapon/ore/bluespace_crystal = /obj/item/weapon/ore/bluespace_crystal/artificial)
|
||||
|
||||
/obj/machinery/launchpad/RefreshParts()
|
||||
var/E = -1 //to make default parts have the base value
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
E += M.rating
|
||||
range = initial(range)
|
||||
range += E
|
||||
|
||||
/obj/machinery/launchpad/attackby(obj/item/I, mob/user, params)
|
||||
if(stationary)
|
||||
if(default_deconstruction_screwdriver(user, "lpad-idle-o", "lpad-idle", I))
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
var/obj/item/device/multitool/M = I
|
||||
M.buffer = src
|
||||
to_chat(user, "<span class='notice'>You save the data in the [I.name]'s buffer.</span>")
|
||||
return 1
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/launchpad/proc/isAvailable()
|
||||
if(stat & NOPOWER)
|
||||
return FALSE
|
||||
if(panel_open)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/launchpad/proc/doteleport(mob/user, sending)
|
||||
if(teleporting)
|
||||
to_chat(user, "<span class='warning'>ERROR: Launchpad busy.</span>")
|
||||
return
|
||||
|
||||
var/target_x = x + x_offset
|
||||
var/target_y = y + y_offset
|
||||
var/turf/target = locate(target_x, target_y, z)
|
||||
var/area/A = get_area(target)
|
||||
|
||||
flick(icon_teleport, src)
|
||||
playsound(get_turf(src), 'sound/weapons/flash.ogg', 25, 1)
|
||||
teleporting = TRUE
|
||||
|
||||
|
||||
sleep(teleport_speed)
|
||||
|
||||
if(QDELETED(src) || !isAvailable())
|
||||
return
|
||||
|
||||
teleporting = FALSE
|
||||
|
||||
// use a lot of power
|
||||
use_power(1000)
|
||||
|
||||
var/turf/source = target
|
||||
var/turf/dest = get_turf(src)
|
||||
var/list/log_msg = list()
|
||||
log_msg += ": [key_name(user)] has teleported "
|
||||
|
||||
if(sending)
|
||||
source = dest
|
||||
dest = target
|
||||
|
||||
playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 25, 1)
|
||||
for(var/atom/movable/ROI in source)
|
||||
if(ROI == src)
|
||||
continue
|
||||
// if it's anchored, don't teleport
|
||||
if(ROI.anchored)
|
||||
if(isliving(ROI))
|
||||
var/mob/living/L = ROI
|
||||
if(L.buckled)
|
||||
// TP people on office chairs
|
||||
if(L.buckled.anchored)
|
||||
continue
|
||||
|
||||
log_msg += "[key_name(L)] (on a chair), "
|
||||
else
|
||||
continue
|
||||
else if(!isobserver(ROI))
|
||||
continue
|
||||
if(ismob(ROI))
|
||||
var/mob/T = ROI
|
||||
log_msg += "[key_name(T)], "
|
||||
else
|
||||
log_msg += "[ROI.name]"
|
||||
if (istype(ROI, /obj/structure/closet))
|
||||
var/obj/structure/closet/C = ROI
|
||||
log_msg += " ("
|
||||
for(var/atom/movable/Q as mob|obj in C)
|
||||
if(ismob(Q))
|
||||
log_msg += "[key_name(Q)], "
|
||||
else
|
||||
log_msg += "[Q.name], "
|
||||
if (dd_hassuffix(log_msg, "("))
|
||||
log_msg += "empty)"
|
||||
else
|
||||
log_msg = dd_limittext(log_msg, length(log_msg) - 2)
|
||||
log_msg += ")"
|
||||
log_msg += ", "
|
||||
do_teleport(ROI, dest)
|
||||
|
||||
if (dd_hassuffix(log_msg, ", "))
|
||||
log_msg = dd_limittext(log_msg, length(log_msg) - 2)
|
||||
else
|
||||
log_msg += "nothing"
|
||||
log_msg += " [sending ? "to" : "from"] [target_x], [target_y], [z] ([A ? A.name : "null area"])"
|
||||
investigate_log(log_msg.Join(), "telesci")
|
||||
updateDialog()
|
||||
|
||||
//Starts in the briefcase. Don't spawn this directly, or it will runtime when closing.
|
||||
/obj/machinery/launchpad/briefcase
|
||||
name = "briefcase launchpad"
|
||||
desc = "A portable bluespace pad able to thrust matter through bluespace, teleporting it to or from nearby locations. Controlled via remote."
|
||||
icon_state = "blpad-idle"
|
||||
icon_teleport = "blpad-beam"
|
||||
anchored = FALSE
|
||||
use_power = FALSE
|
||||
idle_power_usage = 0
|
||||
active_power_usage = 0
|
||||
teleport_speed = 20
|
||||
range = 3
|
||||
stationary = FALSE
|
||||
var/closed = TRUE
|
||||
var/obj/item/briefcase_launchpad/briefcase
|
||||
|
||||
/obj/machinery/launchpad/briefcase/Initialize()
|
||||
. = ..()
|
||||
if(istype(loc, /obj/item/briefcase_launchpad))
|
||||
briefcase = loc
|
||||
else
|
||||
log_game("[src] has been spawned without a briefcase.")
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/launchpad/briefcase/Destroy()
|
||||
if(!QDELETED(briefcase))
|
||||
qdel(briefcase)
|
||||
briefcase = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/launchpad/briefcase/isAvailable()
|
||||
if(closed)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/machinery/launchpad/briefcase/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!briefcase || !usr.can_hold_items())
|
||||
return
|
||||
if(usr.incapacitated())
|
||||
to_chat(usr, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
usr.visible_message("<span class='notice'>[usr] starts closing [src]...</span>", "<span class='notice'>You start closing [src]...</span>")
|
||||
if(do_after(usr, 30, target = usr))
|
||||
usr.put_in_hands(briefcase)
|
||||
forceMove(briefcase)
|
||||
closed = TRUE
|
||||
|
||||
/obj/machinery/launchpad/briefcase/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/device/launchpad_remote))
|
||||
var/obj/item/device/launchpad_remote/L = I
|
||||
L.pad = src
|
||||
to_chat(user, "<span class='notice'>You link [src] to [L].</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
//Briefcase item that contains the launchpad.
|
||||
/obj/item/briefcase_launchpad
|
||||
name = "briefcase"
|
||||
desc = "It's made of AUTHENTIC faux-leather and has a price-tag still attached. Its owner must be a real professional."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "briefcase"
|
||||
flags = CONDUCT
|
||||
force = 8
|
||||
hitsound = "swing_hit"
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
resistance_flags = FLAMMABLE
|
||||
obj_integrity = 150
|
||||
max_integrity = 150
|
||||
var/obj/machinery/launchpad/briefcase/pad
|
||||
|
||||
/obj/item/briefcase_launchpad/Initialize()
|
||||
. = ..()
|
||||
pad = new(src)
|
||||
|
||||
/obj/item/briefcase_launchpad/Destroy()
|
||||
if(!QDELETED(pad))
|
||||
qdel(pad)
|
||||
pad = null
|
||||
return ..()
|
||||
|
||||
/obj/item/briefcase_launchpad/attack_self(mob/user)
|
||||
if(!isturf(user.loc)) //no setting up in a locker
|
||||
return
|
||||
add_fingerprint(user)
|
||||
user.visible_message("<span class='notice'>[user] starts setting down [src]...", "You start setting up [pad]...")
|
||||
if(do_after(user, 30, target = user))
|
||||
pad.forceMove(get_turf(src))
|
||||
pad.closed = FALSE
|
||||
user.transferItemToLoc(src, pad, TRUE)
|
||||
|
||||
/obj/item/briefcase_launchpad/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/device/launchpad_remote))
|
||||
var/obj/item/device/launchpad_remote/L = I
|
||||
L.pad = src.pad
|
||||
to_chat(user, "<span class='notice'>You link [pad] to [L].</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/device/launchpad_remote
|
||||
name = "\improper Launchpad Control Remote"
|
||||
desc = "Used to teleport objects to and from a portable launchpad."
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "blpad-remote"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "materials=3;magnets=2;bluespace=4;syndicate=3"
|
||||
var/sending = TRUE
|
||||
var/obj/machinery/launchpad/briefcase/pad
|
||||
|
||||
/obj/item/device/launchpad_remote/ui_interact(mob/user, ui_key = "launchpad_remote", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "launchpad_remote", "Briefcase Launchpad Remote", 550, 400, master_ui, state) //width, height
|
||||
ui.set_style("syndicate")
|
||||
ui.open()
|
||||
|
||||
ui.set_autoupdate(TRUE)
|
||||
|
||||
/obj/item/device/launchpad_remote/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["has_pad"] = pad ? TRUE : FALSE
|
||||
if(pad)
|
||||
data["pad_closed"] = pad.closed
|
||||
if(!pad || pad.closed)
|
||||
return data
|
||||
|
||||
data["pad_name"] = pad.display_name
|
||||
data["abs_x"] = abs(pad.x_offset)
|
||||
data["abs_y"] = abs(pad.y_offset)
|
||||
data["north_south"] = pad.y_offset > 0 ? "N":"S"
|
||||
data["east_west"] = pad.x_offset > 0 ? "E":"W"
|
||||
return data
|
||||
|
||||
/obj/item/device/launchpad_remote/proc/teleport(mob/user, obj/machinery/launchpad/pad)
|
||||
if(QDELETED(pad))
|
||||
to_chat(user, "<span class='warning'>ERROR: Launchpad not responding. Check launchpad integrity.</span>")
|
||||
return
|
||||
if(!pad.isAvailable())
|
||||
to_chat(user, "<span class='warning'>ERROR: Launchpad not operative. Make sure the launchpad is ready and powered.</span>")
|
||||
return
|
||||
pad.doteleport(user, sending)
|
||||
|
||||
/obj/item/device/launchpad_remote/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("right")
|
||||
if(pad.x_offset < pad.range)
|
||||
pad.x_offset++
|
||||
. = TRUE
|
||||
|
||||
if("left")
|
||||
if(pad.x_offset > (pad.range * -1))
|
||||
pad.x_offset--
|
||||
. = TRUE
|
||||
|
||||
if("up")
|
||||
if(pad.y_offset < pad.range)
|
||||
pad.y_offset++
|
||||
. = TRUE
|
||||
|
||||
if("down")
|
||||
if(pad.y_offset > (pad.range * -1))
|
||||
pad.y_offset--
|
||||
. = TRUE
|
||||
|
||||
if("up-right")
|
||||
if(pad.y_offset < pad.range)
|
||||
pad.y_offset++
|
||||
if(pad.x_offset < pad.range)
|
||||
pad.x_offset++
|
||||
. = TRUE
|
||||
|
||||
if("up-left")
|
||||
if(pad.y_offset < pad.range)
|
||||
pad.y_offset++
|
||||
if(pad.x_offset > (pad.range * -1))
|
||||
pad.x_offset--
|
||||
. = TRUE
|
||||
|
||||
if("down-right")
|
||||
if(pad.y_offset > (pad.range * -1))
|
||||
pad.y_offset--
|
||||
if(pad.x_offset < pad.range)
|
||||
pad.x_offset++
|
||||
. = TRUE
|
||||
|
||||
if("down-left")
|
||||
if(pad.y_offset > (pad.range * -1))
|
||||
pad.y_offset--
|
||||
if(pad.x_offset > (pad.range * -1))
|
||||
pad.x_offset--
|
||||
. = TRUE
|
||||
|
||||
if("reset")
|
||||
pad.y_offset = 0
|
||||
pad.x_offset = 0
|
||||
. = TRUE
|
||||
|
||||
if("rename")
|
||||
. = TRUE
|
||||
var/new_name = stripped_input(usr, "How do you want to rename the launchpad?", "Launchpad", pad.display_name, 15) as text|null
|
||||
if(!new_name)
|
||||
return
|
||||
pad.display_name = new_name
|
||||
|
||||
if("remove")
|
||||
. = TRUE
|
||||
if(usr && alert(usr, "Are you sure?", "Unlink Launchpad", "I'm Sure", "Abort") != "Abort")
|
||||
pad = null
|
||||
|
||||
if("launch")
|
||||
sending = TRUE
|
||||
teleport(usr, pad)
|
||||
. = TRUE
|
||||
|
||||
if("pull")
|
||||
sending = FALSE
|
||||
teleport(usr, pad)
|
||||
. = TRUE
|
||||
@@ -90,6 +90,22 @@
|
||||
build_path = /obj/item/weapon/circuitboard/machine/quantumpad
|
||||
category = list ("Teleportation Machinery")
|
||||
|
||||
/datum/design/board/launchpad
|
||||
name = "Machine Design (Bluespace Launchpad Board)"
|
||||
desc = "The circuit board for a bluespace Launchpad."
|
||||
id = "launchpad"
|
||||
req_tech = list("programming" = 3, "bluespace" = 3, "plasmatech" = 2, "engineering" = 3)
|
||||
build_path = /obj/item/weapon/circuitboard/machine/launchpad
|
||||
category = list ("Teleportation Machinery")
|
||||
|
||||
/datum/design/board/launchpad_console
|
||||
name = "Machine Design (Bluespace Launchpad Console Board)"
|
||||
desc = "The circuit board for a bluespace launchpad Console."
|
||||
id = "launchpad_console"
|
||||
req_tech = list("programming" = 4, "bluespace" = 3, "plasmatech" = 3)
|
||||
build_path = /obj/item/weapon/circuitboard/computer/launchpad_console
|
||||
category = list ("Teleportation Machinery")
|
||||
|
||||
/*/datum/design/board/telepad
|
||||
name = "Machine Design (Telepad Board)"
|
||||
desc = "The circuit board for a telescience telepad."
|
||||
|
||||
@@ -969,6 +969,24 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
item = /obj/item/weapon/aiModule/syndicate
|
||||
cost = 14
|
||||
|
||||
/datum/uplink_item/device_tools/briefcase_launchpad
|
||||
name = "Briefcase Launchpad"
|
||||
desc = "A briefcase containing a launchpad, a device able to teleport items and people to and from targets up to three tiles away from the briefcase. \
|
||||
Also includes a remote control. Touch the briefcase with the remote to link it."
|
||||
surplus = 0
|
||||
item = /obj/item/briefcase_launchpad
|
||||
cost = 6
|
||||
|
||||
/datum/uplink_item/device_tools/briefcase_launchpad/buy(mob/user, obj/item/device/uplink/U)
|
||||
var/obj/item/device/launchpad_remote/L = new(get_turf(user)) //free remote
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.put_in_hands(L))
|
||||
to_chat(H, "[L] materializes into your hands!")
|
||||
else
|
||||
to_chat(H, "\The [L] materializes onto the floor.")
|
||||
return ..()
|
||||
|
||||
/datum/uplink_item/device_tools/magboots
|
||||
name = "Blood-Red Magboots"
|
||||
desc = "A pair of magnetic boots with a Syndicate paintjob that assist with freer movement in space or on-station \
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 14 KiB |
@@ -555,6 +555,7 @@
|
||||
#include "code\game\machinery\hologram.dm"
|
||||
#include "code\game\machinery\igniter.dm"
|
||||
#include "code\game\machinery\iv_drip.dm"
|
||||
#include "code\game\machinery\launch_pad.dm"
|
||||
#include "code\game\machinery\lightswitch.dm"
|
||||
#include "code\game\machinery\limbgrower.dm"
|
||||
#include "code\game\machinery\machinery.dm"
|
||||
@@ -603,6 +604,7 @@
|
||||
#include "code\game\machinery\computer\crew.dm"
|
||||
#include "code\game\machinery\computer\dna_console.dm"
|
||||
#include "code\game\machinery\computer\gulag_teleporter.dm"
|
||||
#include "code\game\machinery\computer\launchpad_control.dm"
|
||||
#include "code\game\machinery\computer\law.dm"
|
||||
#include "code\game\machinery\computer\medical.dm"
|
||||
#include "code\game\machinery\computer\message.dm"
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
49
tgui/src/interfaces/launchpad_remote.ract
Normal file
49
tgui/src/interfaces/launchpad_remote.ract
Normal file
@@ -0,0 +1,49 @@
|
||||
<ui-display title='Controls'>
|
||||
{{#if data.has_pad}}
|
||||
{{#if data.pad_closed}}
|
||||
<ui-section label='Warning'>
|
||||
<span>Launchpad closed.</span>
|
||||
</ui-section>
|
||||
{{else}}
|
||||
<ui-section label="Launchpad">
|
||||
<span><b>{{data.pad_name}}</b></span><br>
|
||||
<ui-button icon="pencil" action='rename'>Rename</ui-button>
|
||||
<ui-button icon="remove" style="danger" action='remove'>Remove</ui-button>
|
||||
</ui-section>
|
||||
|
||||
<ui-section label='Set Target'>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:25px!important"><ui-button action='up-left'>↖</ui-button></td>
|
||||
<td style="width:25px!important; text-align:center"><ui-button action='up'>↑</ui-button></td>
|
||||
<td style="width:25px!important; text-align:right"><ui-button action='up-right'>↗</ui-button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:25px!important"><ui-button action='left' style="width:35px!important">←</ui-button></td>
|
||||
<td style="width:25px!important; text-align:center"><ui-button action='reset'>R</ui-button></td>
|
||||
<td style="width:25px!important; text-align:right"><ui-button action='right'>→</ui-button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:25px!important"><ui-button action='down-left'>↙</ui-button></td>
|
||||
<td style="width:25px!important; text-align:center"><ui-button action='down'>↓</ui-button></td>
|
||||
<td style="width:25px!important; text-align:right"><ui-button action='down-right'>↘</ui-button></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ui-section>
|
||||
<ui-section label='Current Target'>
|
||||
<span>{{data.abs_y}} {{data.north_south}}</span><br>
|
||||
<span>{{data.abs_x}} {{data.east_west}}</span>
|
||||
</ui-section>
|
||||
<ui-section label='Activate'>
|
||||
<ui-button action='launch' tooltip='Teleport everything on the pad to the target.' tooltip-side='down'>Launch</ui-button>
|
||||
<ui-button action='pull' tooltip='Teleport everything from the target to the pad.' tooltip-side='down'>Pull</ui-button>
|
||||
</ui-section>
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{else}}
|
||||
<ui-section label='Warning'>
|
||||
<span>No launchpad found. Link the remote to a launchpad.</span>
|
||||
</ui-section>
|
||||
{{/if}}
|
||||
</ui-display>
|
||||
Reference in New Issue
Block a user