Telescience port from /tg/

This commit is contained in:
Markolie
2014-12-11 17:10:40 +01:00
parent 46a061e722
commit c55c74207d
17 changed files with 721 additions and 683 deletions
@@ -1,36 +0,0 @@
// Bluespace crystals, used in telescience and when crushed it will blink you to a random turf.
/obj/item/bluespace_crystal
name = "bluespace crystal"
desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate."
icon = 'icons/obj/telescience.dmi'
icon_state = "bluespace_crystal"
w_class = 1
origin_tech = "bluespace=4;materials=3"
var/blink_range = 8 // The teleport range when crushed/thrown at someone.
/obj/item/bluespace_crystal/New()
..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/bluespace_crystal/attack_self(var/mob/user)
blink_mob(user)
user.drop_item()
user.visible_message("<span class='notice'>[user] crushes the [src]!</span>")
qdel(src)
/obj/item/bluespace_crystal/proc/blink_mob(var/mob/living/L)
do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg')
/obj/item/bluespace_crystal/throw_impact(atom/hit_atom)
..()
if(isliving(hit_atom))
blink_mob(hit_atom)
qdel(src)
// Artifical bluespace crystal, doesn't give you much research.
/obj/item/bluespace_crystal/artificial
name = "artificial bluespace crystal"
desc = "An artificially made bluespace crystal, it looks delicate."
origin_tech = "bluespace=2"
blink_range = 4 // Not as good as the organic stuff!
-84
View File
@@ -1,84 +0,0 @@
var/list/sps_list = list()
/obj/item/device/sps
name = "space positioning system"
desc = "Helping lost spacemen find their way through the planets since 2016."
icon = 'icons/obj/telescience.dmi'
icon_state = "gps-c"
w_class = 2.0
slot_flags = SLOT_BELT
origin_tech = "materials=2;magnets=3;bluespace=2"
var/spstag = "COM0"
var/emped = 0
var/turf/locked_location
/obj/item/device/sps/New()
..()
sps_list.Add(src)
name = "space positioning system ([spstag])"
overlays += "working"
/obj/item/device/sps/Destroy()
sps_list.Remove(src)
..()
/obj/item/device/sps/emp_act(severity)
emped = 1
overlays -= "working"
overlays += "emp"
spawn(300)
emped = 0
overlays -= "emp"
overlays += "working"
/obj/item/device/sps/attack_self(mob/user as mob)
var/obj/item/device/sps/t = ""
var/sps_window_height = 110 + sps_list.len * 20 // Variable window height, depending on how many sps units there are to show
if(emped)
t += "ERROR"
else
t += "<A href='?src=\ref[src];tag=1'>Set Tag</A><A href='?src=\ref[src];refresh=1'>Refresh</A>"
t += "<BR>Tag: [spstag]"
if(locked_location && locked_location.loc)
t += "<BR>Bluespace coordinates saved: [locked_location.loc]"
sps_window_height += 20
for(var/obj/item/device/sps/G in sps_list)
var/turf/pos = get_turf(G)
var/area/sps_area = get_area(G)
var/tracked_spstag = G.spstag
if(G.emped == 1)
t += "<BR>[tracked_spstag]: ERROR"
else
t += "<BR>[tracked_spstag]: [format_text(sps_area.name)] ([pos.x], [pos.y], [pos.z])"
var/datum/browser/popup = new(user, "sps", name, 360, min(sps_window_height, 800))
popup.set_content(t)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
/obj/item/device/sps/Topic(href, href_list)
..()
if(href_list["tag"] )
var/a = input("Please enter desired tag.", name, spstag) as text
a = uppertext(copytext(sanitize(a), 1, 5))
if(src.loc == usr)
spstag = a
name = "space positioning system ([spstag])"
attack_self(usr)
if(href_list["refresh"] )
if(src.loc == usr)
attack_self(usr)
/obj/item/device/sps/science
icon_state = "gps-s"
spstag = "SCI0"
/obj/item/device/sps/engineering
icon_state = "gps-e"
spstag = "ENG0"
/obj/item/device/sps/mining
icon_state = "gps-m"
spstag = "MINE0"
desc = "A positioning system helpful for rescuing trapped or injured miners, keeping one on you at all times while mining might just save your life."
-59
View File
@@ -1,59 +0,0 @@
/obj/item/weapon/rcs
name = "rapid-crate-sender (RCS)"
desc = "Use this to send crates and closets to cargo telepads."
icon = 'icons/obj/items.dmi'
icon_state = "rcs"
opacity = 0
density = 0
anchored = 0.0
flags = FPRINT | CONDUCT
force = 10.0
throwforce = 10.0
throw_speed = 1
throw_range = 5
var/rcharges = 10
var/obj/machinery/pad = null
var/last_charge = 30
var/mode = 0
var/rand_x = 0
var/rand_y = 0
var/emagged = 0
var/teleporting = 0
/obj/item/weapon/rcs/New()
processing_objects.Add(src)
desc = "Use this to send crates and closets to cargo telepads. There are [rcharges] charges left."
/obj/item/weapon/rcs/Destroy()
processing_objects.Remove(src)
..()
/obj/item/weapon/rcs/process()
if(rcharges > 10)
rcharges = 10
if(last_charge == 0)
rcharges++
desc = "Use this to send crates and closets to cargo telepads. There are [rcharges] charges left."
last_charge = 30
else
last_charge--
/obj/item/weapon/rcs/attack_self(mob/user)
if(emagged)
if(mode == 0)
mode = 1
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
user << "\red The telepad locator has become uncalibrated."
else
mode = 0
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
user << "\blue You calibrate the telepad locator."
/obj/item/weapon/rcs/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/card/emag) && emagged == 0)
emagged = 1
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
user << "\red You emag the RCS. Click on it to toggle between modes."
return