ID:164265
 
Say i had Two door's, each one with their own unique Message & password

How would i make the message & password for door one, switch with door two. Bare in mind there'll be far more than two doors.

Thanks for your time.
The implementation of this really depends on where you're going to be triggering this password switch.
I haven't tested it out. Give it a shot and see how it goes. I wrote it up in the brower so you'll need to change every 4 spaces into a tab. And you'll need to change the message and password variable to the correct ones, also the door type.

proc/swap()
var/list/L = list()
var/obj/door/dr
for(var/obj/door/o in world)
if(!dr)dr = o
L += o
while(L.len > 0)
var/obj/door/d = pick(L)
var
pass = d.password
msg = d.message
L.Remove(d)
if(L.len == 0)
d.password = dr.password
d.message = dr.message
dr.password = pass
dr.message = msg
else
var/obj/door/d2 = pick(L)
L.Remove(d2)
d.password = d2.password
d.message = d2.message
d2.password = pass
d2.message = msg
In response to Zaltron
I aint home right now, but once i get back ill be shure to try that! looks like itll do the treat.

Also
        door
icon = 'door.dmi'
icon_state="door"
opacity=1
Enter(atom/movable/A)
if(ismob(A))
var/mob/M = A
var/pass = input(M,"What's the password?","Password") as text
if(pass)
if(findtext(pass,"Easy"))
M.loc = src
step(M,M.dir)
else
M << "Wrong password!"
verb
Look()
set src in oview(1)
usr << "<b>Whatever. </b>"



That's an example of what im using, i know, i know. its awful.[Load Excuse] I've been away from DM for quite a while. *cough*