public void HideAction(string nm) { CmBlock obj = GetCmBlock(nm); if ((obj != null) && (obj is IAction)) { (obj as IAction).visible = false; RefreshActlist(); } }
public void Execute() { foreach (string st in commands) { lastExecutedBlock = this; if (needStop) { needStop = false; break; } else { mf.theCore.ExecCommand(st); } } }
void processing(string curword) { if ((waitact) || (waitblc)) { if (waitact) { cmb = new myAction(mf); } else { cmb = new CmBlock(mf); } cmb.name = curline; do { str++; if ((tf[str] != "/act") && (tf[str] != "/block") && (tf[str] != "/b")) { cmb.AddCommand(tf[str]); } }while((tf[str] != "/act") && (tf[str] != "/block") && (tf[str] != "/b")); str--; if (waitact) { waitact = false; } else { waitblc = false; } } if (waitloc) { loca = new Location(mf); loca.name = curword; do { str++; if (tf[str] != "/descr") { loca.discr += tf[str] + '\n'; } }while(tf[str] != "/descr"); waitloc = false; } if (curword == "*loc") { roomcount++; waitloc = true; } if (curword == "/loc") { waitloc = false; waitact = false; waitblc = false; waitaut = false; mf.theCore.AddRoom(loca); if (roomcount == 1) { mf.FirstRoom = loca.name; } loca = null; } if (curword == "*act") { waitact = true; } if (curword == "/act") { waitact = false; (cmb as IAction).visible = true; loca.AddCmBlock(cmb); cmb = null; } if ((curword == "/block") || (curword == "/b")) { waitblc = false; if (loca != null) { loca.AddCmBlock(cmb); } else { mf.theCore.getGlobPtr().AddCmBlock(cmb); } cmb = null; } if (waitaut) { loca.Auto = curword; waitaut = false; } if (waititm) { itm.name = curline; //.Remove((curline.Length-1),1); waititm = false; } if (waitclk) { itm.Onclick = curline; waitclk = false; } if ((curword == "*block") || (curword == "*b")) { waitblc = true; } if (curword == "*auto") { waitaut = true; } if (curword == "*item") { itm = new myItem(); waititm = true; } if (curword == "*onclick") { waitclk = true; } if (curword == "/item") { waitclk = false; waititm = false; mf.theCore.AddItem(itm); itm = null; } }
public void AddCmBlock(CmBlock act) { actions.Add(act); }