New map rule to disable unit control via logic (#11627)
* map rule to disable unit control via logic * syntaxn't
This commit is contained in:
@@ -168,6 +168,8 @@ public class LExecutor{
|
||||
|
||||
@Override
|
||||
public void run(LExecutor exec){
|
||||
if(!exec.privileged && !state.rules.logicUnitControl) return;
|
||||
|
||||
if(exec.binds == null || exec.binds.length != content.units().size){
|
||||
exec.binds = new int[content.units().size];
|
||||
}
|
||||
@@ -219,6 +221,8 @@ public class LExecutor{
|
||||
|
||||
@Override
|
||||
public void run(LExecutor exec){
|
||||
if(!exec.privileged && !state.rules.logicUnitControl) return;
|
||||
|
||||
Object unitObj = exec.unit.obj();
|
||||
LogicAI ai = UnitControlI.checkLogicAI(exec, unitObj);
|
||||
|
||||
@@ -329,6 +333,8 @@ public class LExecutor{
|
||||
|
||||
@Override
|
||||
public void run(LExecutor exec){
|
||||
if(!exec.privileged && !state.rules.logicUnitControl) return;
|
||||
|
||||
Object unitObj = exec.unit.obj();
|
||||
LogicAI ai = checkLogicAI(exec, unitObj);
|
||||
|
||||
|
||||
@@ -300,7 +300,8 @@ public class LogicDialog extends BaseDialog{
|
||||
for(Prov<LStatement> prov : LogicIO.allStatements){
|
||||
LStatement example = prov.get();
|
||||
if(example instanceof InvalidStatement || example.hidden() || (example.privileged() && !privileged) || (example.nonPrivileged() && privileged) ||
|
||||
(!text.isEmpty() && !example.name().toLowerCase(Locale.ROOT).contains(text) && !example.typeName().toLowerCase(Locale.ROOT).contains(text))) continue;
|
||||
(!text.isEmpty() && !example.name().toLowerCase(Locale.ROOT).contains(text) && !example.typeName().toLowerCase(Locale.ROOT).contains(text)) ||
|
||||
(!privileged && !state.rules.logicUnitControl && example.category() == LCategory.unit)) continue;
|
||||
|
||||
if(matched[0] == null){
|
||||
matched[0] = prov;
|
||||
|
||||
Reference in New Issue
Block a user