Add an option to doors to disable manual operation.

Hank Jimbo shared this feedback 6 years ago
Submitted

This would mean that players cannot interfere with the opening/closing of doors which are being used in airlock systems or doors to a vacuum, controlled by a script or by timer blocks.

Replies (1)

photo
1

You can already do this. Just turn the door off.

photo
1

No shit. I'm requesting the ability to disable the manual interference of doors while in operation.

photo
1

I am sorry, just trying to help

i'm only saying that's how I do it, works ok. doors are off, script turns door on , opens it then turns door off,

[code]

const string doorname = "Sliding Door";

string doorState = "Closed";

public void Main(string argument, UpdateType updateSource)


{


if ((updateSource & UpdateType.Update1) == 0) doorState = doorState == "Closed" ? "Open" : "Closed";


List<IMyDoor> doors = new List<IMyDoor>();

GridTerminalSystem.GetBlocksOfType(doors ,blk => blk.CustomName == doorname && blk.IsFunctional );


if (doors.Count >0 ) {

string currentState = doors[0].Status.ToString();


if ( doorState == currentState ) {

doors[0].Enabled = false;

Runtime.UpdateFrequency = UpdateFrequency.None;

} else {

doors[0].Enabled = true;

Runtime.UpdateFrequency = UpdateFrequency.Update1;

if ( doorState == "Closed" )

doors[0].CloseDoor();

else

doors[0].OpenDoor();

}

Echo(doors[0].Status.ToString());

} else {

Runtime.UpdateFrequency = UpdateFrequency.None;

}

}

[/code]

put that in a program block.. run it .. allmanual use of the door is blocked.. door only open/close when you run the program

photo
1

I've put a version in the workshop - "Open and Close Locked Doors - safe air lock doors"

I don't publish most scripts

photo
Leave a Comment
 
Attach a file
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!