mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Don't allow setting odoor to same ID.
This commit is contained in:
parent
2f66e47f8c
commit
a4ce6caae2
@ -205,6 +205,8 @@ namespace MCGalaxy.Commands.World {
|
|||||||
} else {
|
} else {
|
||||||
ExtBlock other = GetBlock(p, scope, msg);
|
ExtBlock other = GetBlock(p, scope, msg);
|
||||||
if (other.IsInvalid) return;
|
if (other.IsInvalid) return;
|
||||||
|
if (other == block) { Player.Message(p, "ID of oDoor must be different."); return; }
|
||||||
|
|
||||||
scope[i].oDoorIndex = (ushort)other.Index;
|
scope[i].oDoorIndex = (ushort)other.Index;
|
||||||
|
|
||||||
Player.Message(p, "oDoor for {0} set to: {1}",
|
Player.Message(p, "oDoor for {0} set to: {1}",
|
||||||
@ -268,7 +270,7 @@ namespace MCGalaxy.Commands.World {
|
|||||||
Player.Message(p, "%H[scope] can be: %Score, global, level");
|
Player.Message(p, "%H[scope] can be: %Score, global, level");
|
||||||
|
|
||||||
Player.Message(p, "%Hproperties: %Sportal, messageblock, rails, waterkills, " +
|
Player.Message(p, "%Hproperties: %Sportal, messageblock, rails, waterkills, " +
|
||||||
"lavakills, door, tdoor, killer, deathmessage, animalai, stackblock, opblock");
|
"lavakills, door, tdoor, killer, deathmessage, animalai, stackblock, opblock, odoor");
|
||||||
Player.Message(p, "%HType %T/Help BlockProps [property] %Hfor more details");
|
Player.Message(p, "%HType %T/Help BlockProps [property] %Hfor more details");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,6 +304,8 @@ namespace MCGalaxy.Commands.World {
|
|||||||
} else if (message.CaselessEq("opblock")) {
|
} else if (message.CaselessEq("opblock")) {
|
||||||
Player.Message(p, "%HMarks the block as being on OP block. OP blocks can't be blown up by explosions, " +
|
Player.Message(p, "%HMarks the block as being on OP block. OP blocks can't be blown up by explosions, " +
|
||||||
"and can't be replaced in games when build type is ModifyOnly.");
|
"and can't be replaced in games when build type is ModifyOnly.");
|
||||||
|
} else if (message.CaselessEq("odoor")) {
|
||||||
|
Player.Message(p, "%HSets the block that this block is changed into, when activated by a neighbouring door.");
|
||||||
} else {
|
} else {
|
||||||
Player.Message(p, "&cUnrecognised property \"{0}\"", message);
|
Player.Message(p, "&cUnrecognised property \"{0}\"", message);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user