The changeling's regenerative ability's description now states that you have to use it before you die to help prevent confusion.

A proper fix for teleport data-cards. Instead of just doing player.loc = landmark.loc it now properly uses the teleporter datum. It sets a new 'one time use' variable which means that only one person or object can pass through the teleporter before it looses the coordinates. This is also in place to prevent hand-teles from opening portals to the clown planet.

Players will not really notice any change except that when they insert the clown-coordinates, they must then walk through the teleporter.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4503 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
johnsonmt88@gmail.com
2012-08-20 19:44:14 +00:00
parent f1bfcfb2cf
commit 00a1ff2d97
3 changed files with 31 additions and 21 deletions

View File

@@ -28,6 +28,7 @@ var/list/datum/power/changeling/powerinstances = list()
/datum/power/changeling/fakedeath
name = "Regenerative Stasis"
desc = "We fake our death while we regenerate our form, even through death."
helptext = "Must be used before death."
genomecost = 0
allowduringlesserform = 1
verbpath = /mob/proc/changeling_fakedeath

View File

@@ -5,6 +5,8 @@
circuit = "/obj/item/weapon/circuitboard/teleporter"
var/obj/item/locked = null
var/id = null
var/one_time_use = 0 //Used for one-time-use teleport cards (such as clown planet coordinates.)
//Setting this to 1 will set src.locked to null after a player enters the portal and will not allow hand-teles to open portals to that location.
/obj/machinery/computer/teleporter/New()
src.id = "[rand(1000, 9999)]"
@@ -12,36 +14,39 @@
return
//TODO: Merge this proc with attack_hand() code so that this actually uses the teleporter procs instead of just bypassing everything
/obj/machinery/computer/teleporter/attackby(I as obj, mob/living/user as mob)
if (istype(I, /obj/item/weapon/card/data/))
var/obj/item/weapon/card/data/M = I
if(stat & (NOPOWER|BROKEN) & (M.function != "teleporter"))
if(istype(I, /obj/item/weapon/card/data/))
var/obj/item/weapon/card/data/C = I
if(stat & (NOPOWER|BROKEN) & (C.function != "teleporter"))
src.attack_hand()
//Quickfix for hiding nuke disks and people getting to centcomm until I can get the attack_hand() stuff to incorperate this.
for(var/obj/O in user.get_contents())
if(istype(O, /obj/item/weapon/disk/nuclear) || istype(O, /obj/item/device/radio/beacon) || istype(O, /obj/item/weapon/storage/backpack/holding))
user << "<span class='notice'>Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through.</span>"
return
var/obj/L = null
var/obj/S = null
for(var/obj/effect/landmark/sloc in world)
if (sloc.name != M.data)
continue
if (locate(/mob/living) in sloc.loc)
continue
S = sloc
if(sloc.name != C.data) continue
if(locate(/mob/living) in sloc.loc) continue
L = sloc
break
if(!S)
S = locate("landmark*[M.data]") // use old stype
if(istype(S, /obj/effect/landmark/) && istype(S.loc, /turf))
user.loc = S.loc
if(!L)
L = locate("landmark*[C.data]") // use old stype
if(istype(L, /obj/effect/landmark/) && istype(L.loc, /turf))
src.locked = L
one_time_use = 1
usr << "You insert the coordinates into the machine."
usr << "A message flashes across the screen reminding the traveller that the nuclear authentication disk is to remain on the station at all times."
user.drop_item()
del(I)
return
for(var/mob/O in hearers(src, null))
O.show_message("\blue Locked In", 2)
src.add_fingerprint(usr)
else
..()
return
/obj/machinery/computer/teleporter/attack_paw()
@@ -136,6 +141,10 @@
do_teleport(M, locate(rand((2*TRANSITIONEDGE), world.maxx - (2*TRANSITIONEDGE)), rand((2*TRANSITIONEDGE), world.maxy - (2*TRANSITIONEDGE)), 3), 2)
else
do_teleport(M, com.locked) //dead-on precision
if(com.one_time_use) //Make one-time-use cards only usable one time!
com.one_time_use = 0
com.locked = null
else
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)

View File

@@ -109,7 +109,7 @@ Frequency:
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)
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