Files
Paradise/code/game/objects/items/weapons/teleportation.dm
Cael_Aislinn bdeb96b7e5 Merge branch 'incremental_tg' r5514 (11/1/2013) into bs12_with_tgport
Conflicts:
	baystation12.dme
	code/ATMOSPHERICS/components/unary/vent_pump.dm
	code/ATMOSPHERICS/components/unary/vent_scrubber.dm
	code/__HELPERS/game.dm
	code/controllers/shuttle_controller.dm
	code/datums/datumvars.dm
	code/datums/supplypacks.dm
	code/defines/obj/storage.dm
	code/defines/obj/vending.dm
	code/defines/obj/weapon.dm
	code/defines/procs/command_alert.dm
	code/game/area/Space Station 13 areas.dm
	code/game/atoms.dm
	code/game/gamemodes/changeling/modularchangling.dm
	code/game/gamemodes/cult/runes.dm
	code/game/gamemodes/events.dm
	code/game/gamemodes/events/dust.dm
	code/game/gamemodes/events/miniblob.dm
	code/game/gamemodes/events/ninja_equipment.dm
	code/game/gamemodes/factions.dm
	code/game/gamemodes/game_mode.dm
	code/game/gamemodes/gameticker.dm
	code/game/jobs/access.dm
	code/game/jobs/job/assistant.dm
	code/game/jobs/job/captain.dm
	code/game/jobs/job/civilian.dm
	code/game/jobs/job/engineering.dm
	code/game/jobs/job/medical.dm
	code/game/jobs/job/science.dm
	code/game/jobs/job/security.dm
	code/game/jobs/job_controller.dm
	code/game/machinery/alarm.dm
	code/game/machinery/atmo_control.dm
	code/game/machinery/atmoalter/area_atmos_computer.dm
	code/game/machinery/bots/medbot.dm
	code/game/machinery/computer/HolodeckControl.dm
	code/game/machinery/computer/ai_core.dm
	code/game/machinery/computer/atmos_alert.dm
	code/game/machinery/computer/card.dm
	code/game/machinery/computer/cloning.dm
	code/game/machinery/computer/computer.dm
	code/game/machinery/computer/message.dm
	code/game/machinery/computer/pod.dm
	code/game/machinery/computer/prisoner.dm
	code/game/machinery/computer/syndicate_shuttle.dm
	code/game/machinery/constructable_frame.dm
	code/game/machinery/doors/door.dm
	code/game/machinery/doors/firedoor.dm
	code/game/machinery/newscaster.dm
	code/game/machinery/recharger.dm
	code/game/machinery/spaceheater.dm
	code/game/machinery/telecomms/broadcaster.dm
	code/game/machinery/telecomms/logbrowser.dm
	code/game/machinery/telecomms/machine_interactions.dm
	code/game/machinery/teleporter.dm
	code/game/machinery/wishgranter.dm
	code/game/mecha/mech_fabricator.dm
	code/game/mecha/working/ripley.dm
	code/game/objects/items.dm
	code/game/objects/items/blueprints.dm
	code/game/objects/items/devices/flashlight.dm
	code/game/objects/items/devices/radio/encryptionkey.dm
	code/game/objects/items/devices/uplinks.dm
	code/game/objects/items/stacks/medical.dm
	code/game/objects/items/weapons/cards_ids.dm
	code/game/objects/items/weapons/gift_wrappaper.dm
	code/game/objects/items/weapons/hydroponics.dm
	code/game/objects/items/weapons/manuals.dm
	code/game/objects/items/weapons/secstorage/secstorage.dm
	code/game/objects/items/weapons/storage/backpack.dm
	code/game/objects/items/weapons/storage/firstaid.dm
	code/game/objects/items/weapons/storage/kit.dm
	code/game/objects/items/weapons/storage/storage.dm
	code/game/objects/items/weapons/storage/toolbox.dm
	code/game/objects/items/weapons/storage/uplink_kits.dm
	code/game/objects/items/weapons/stunbaton.dm
	code/game/objects/items/weapons/surgery_tools.dm
	code/game/objects/items/weapons/tools.dm
	code/game/objects/structures/crates_lockers/closets/secure/cargo.dm
	code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm
	code/game/objects/structures/crates_lockers/closets/secure/scientist.dm
	code/game/objects/structures/crates_lockers/closets/secure/security.dm
	code/game/objects/structures/electricchair.dm
	code/game/objects/structures/extinguisher.dm
	code/game/objects/structures/watercloset.dm
	code/game/objects/weapons.dm
	code/game/turfs/turf.dm
	code/game/vehicles/airtight/airtight.dm
	code/game/vehicles/vehicle.dm
	code/global.dm
	code/modules/DetectiveWork/evidence.dm
	code/modules/admin/IsBanned.dm
	code/modules/admin/player_panel.dm
	code/modules/admin/verbs/diagnostics.dm
	code/modules/admin/verbs/getlogs.dm
	code/modules/client/preferences.dm
	code/modules/clothing/masks/miscellaneous.dm
	code/modules/clothing/spacesuits/rig.dm
	code/modules/clothing/suits/miscellaneous.dm
	code/modules/critters/critter_defenses.dm
	code/modules/detectivework/scanner.dm
	code/modules/flufftext/Hallucination.dm
	code/modules/food/recipes_microwave.dm
	code/modules/mining/mine_items.dm
	code/modules/mining/mine_turfs.dm
	code/modules/mining/satchel_ore_boxdm.dm
	code/modules/mob/dead/observer/observer.dm
	code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
	code/modules/mob/living/carbon/alien/special/facehugger.dm
	code/modules/mob/living/carbon/carbon.dm
	code/modules/mob/living/carbon/carbon_defines.dm
	code/modules/mob/living/carbon/human/human.dm
	code/modules/mob/living/carbon/human/human_attackhand.dm
	code/modules/mob/living/carbon/human/life.dm
	code/modules/mob/living/carbon/human/say.dm
	code/modules/mob/living/carbon/human/update_icons.dm
	code/modules/mob/living/carbon/metroid/metroid.dm
	code/modules/mob/living/living.dm
	code/modules/mob/living/silicon/ai/life.dm
	code/modules/mob/living/silicon/robot/robot.dm
	code/modules/mob/mob_cleanup.dm
	code/modules/mob/mob_defines.dm
	code/modules/mob/mob_transformation_simple.dm
	code/modules/paperwork/clipboard.dm
	code/modules/paperwork/folders.dm
	code/modules/paperwork/paper.dm
	code/modules/paperwork/paperbin.dm
	code/modules/paperwork/pen.dm
	code/modules/power/cable.dm
	code/modules/projectiles/guns/energy/special.dm
	code/modules/projectiles/guns/projectile/revolver.dm
	code/modules/projectiles/projectile/change.dm
	code/modules/projectiles/projectile/special.dm
	code/modules/reagents/Chemistry-Reagents.dm
	code/modules/reagents/reagent_containers/glass.dm
	code/modules/reagents/reagent_containers/hypospray.dm
	code/modules/recycling/sortingmachinery.dm
	code/modules/research/designs.dm
	config/config.txt
	html/changelog.html
	icons/mob/head.dmi
	icons/mob/hud.dmi
	icons/mob/items_lefthand.dmi
	icons/mob/items_righthand.dmi
	icons/mob/mask.dmi
	icons/mob/suit.dmi
	icons/mob/ties.dmi
	icons/mob/uniform.dmi
	icons/obj/clothing/hats.dmi
	icons/obj/clothing/masks.dmi
	icons/obj/clothing/suits.dmi
	icons/obj/clothing/ties.dmi
	icons/obj/grenade.dmi
	icons/obj/projectiles.dmi

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
2013-01-11 22:12:31 +10:00

177 lines
5.5 KiB
Plaintext

/* Teleportation devices.
* Contains:
* Locator
* Hand-tele
*/
/*
* Locator
*/
/obj/item/weapon/locator
name = "locator"
desc = "Used to track those with locater implants."
icon = 'icons/obj/device.dmi'
icon_state = "locator"
var/temp = null
var/frequency = 1451
var/broadcasting = null
var/listening = 1.0
flags = FPRINT | TABLEPASS| CONDUCT
w_class = 2.0
item_state = "electronic"
throw_speed = 4
throw_range = 20
m_amt = 400
origin_tech = "magnets=1"
/obj/item/weapon/locator/attack_self(mob/user as mob)
user.set_machine(src)
var/dat
if (src.temp)
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
else
dat = {"
<B>Persistent Signal Locator</B><HR>
Frequency:
<A href='byond://?src=\ref[src];freq=-10'>-</A>
<A href='byond://?src=\ref[src];freq=-2'>-</A> [format_frequency(src.frequency)]
<A href='byond://?src=\ref[src];freq=2'>+</A>
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
<A href='?src=\ref[src];refresh=1'>Refresh</A>"}
user << browse(dat, "window=radio")
onclose(user, "radio")
return
/obj/item/weapon/locator/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
var/turf/current_location = get_turf(usr)//What turf is the user on?
if(!current_location||current_location.z==2)//If turf was not found or they're on z level 2.
usr << "The [src] is malfunctioning."
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.set_machine(src)
if (href_list["refresh"])
src.temp = "<B>Persistent Signal Locator</B><HR>"
var/turf/sr = get_turf(src)
if (sr)
src.temp += "<B>Located Beacons:</B><BR>"
for(var/obj/item/device/radio/beacon/W in world)
if (W.frequency == src.frequency)
var/turf/tr = get_turf(W)
if (tr.z == sr.z && tr)
var/direct = max(abs(tr.x - sr.x), abs(tr.y - sr.y))
if (direct < 5)
direct = "very strong"
else
if (direct < 10)
direct = "strong"
else
if (direct < 20)
direct = "weak"
else
direct = "very weak"
src.temp += "[W.code]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
src.temp += "<B>Extranneous Signals:</B><BR>"
for (var/obj/item/weapon/implant/tracking/W in world)
if (!W.implanted || !(istype(W.loc,/datum/organ/external) || ismob(W.loc)))
continue
else
var/mob/M = W.loc
if (M.stat == 2)
if (M.timeofdeath + 6000 < world.time)
continue
var/turf/tr = get_turf(W)
if (tr.z == sr.z && tr)
var/direct = max(abs(tr.x - sr.x), abs(tr.y - sr.y))
if (direct < 20)
if (direct < 5)
direct = "very strong"
else
if (direct < 10)
direct = "strong"
else
direct = "weak"
src.temp += "[W.id]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
src.temp += "<B>You are at \[[sr.x],[sr.y],[sr.z]\]</B> in orbital coordinates.<BR><BR><A href='byond://?src=\ref[src];refresh=1'>Refresh</A><BR>"
else
src.temp += "<B><FONT color='red'>Processing Error:</FONT></B> Unable to locate orbital position.<BR>"
else
if (href_list["freq"])
src.frequency += text2num(href_list["freq"])
src.frequency = sanitize_frequency(src.frequency)
else
if (href_list["temp"])
src.temp = null
if (istype(src.loc, /mob))
attack_self(src.loc)
else
for(var/mob/M in viewers(1, src))
if (M.client)
src.attack_self(M)
return
/*
* Hand-tele
*/
/obj/item/weapon/hand_tele
name = "hand tele"
desc = "A portable item using blue-space technology."
icon = 'icons/obj/device.dmi'
icon_state = "hand_tele"
item_state = "electronic"
throwforce = 5
w_class = 2.0
throw_speed = 3
throw_range = 5
m_amt = 10000
origin_tech = "magnets=1;bluespace=3"
/obj/item/weapon/hand_tele/attack_self(mob/user as mob)
var/turf/current_location = get_turf(user)//What turf is the user on?
if(!current_location||current_location.z==2||current_location.z>=7)//If turf was not found or they're on z level 2 or >7 which does not currently exist.
user << "<span class='notice'>\The [src] is malfunctioning.</span>"
return
var/list/L = list( )
for(var/obj/machinery/teleport/hub/R in world)
var/obj/machinery/computer/teleporter/com = locate(/obj/machinery/computer/teleporter, locate(R.x - 2, R.y, R.z))
if (istype(com, /obj/machinery/computer/teleporter) && com.locked && !com.one_time_use)
if(R.icon_state == "tele1")
L["[com.id] (Active)"] = com.locked
else
L["[com.id] (Inactive)"] = com.locked
var/list/turfs = list( )
for(var/turf/T in orange(10))
if(T.x>world.maxx-8 || T.x<8) continue //putting them at the edge is dumb
if(T.y>world.maxy-8 || T.y<8) continue
turfs += T
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") in L
if ((user.get_active_hand() != src || user.stat || user.restrained()))
return
var/count = 0 //num of portals from this teleport in world
for(var/obj/effect/portal/PO in world)
if(PO.creator == src) count++
if(count >= 3)
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
return
var/T = L[t1]
for(var/mob/O in hearers(user, null))
O.show_message("<span class='notice'>Locked In.</span>", 2)
var/obj/effect/portal/P = new /obj/effect/portal( get_turf(src) )
P.target = T
P.creator = src
src.add_fingerprint(user)
return