Migrated remaining source files into their new directory structures. Namespace migration to follow suit.

Moved rScript source files into the Mud Engine.Scripting files.  Planning on removing the reference to rScript.dll and keep everything within the MudEngine.
This commit is contained in:
Scionwest_cp 2011-09-27 19:15:37 -07:00
parent c432edbef9
commit a00f60d22b
19 changed files with 651 additions and 20 deletions

View file

@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MudEngine.GameObjects.Characters
{
public enum DialogSlot
{
Entry1,
Entry2,
Entry3,
Entry4,
Entry5,
}
public class DialogChat
{
public Dictionary<DialogSlot, DialogChat> DialogBranch { get; internal set; }
public String Response { get; set; }
public String Question { get; set; }
public DialogChat()
{
DialogBranch = new Dictionary<DialogSlot, DialogChat>();
}
public DialogChat(String response) : this()
{
this.Response = response;
}
public Boolean AddDialog(DialogSlot slot, DialogChat dialog)
{
foreach (DialogSlot s in DialogBranch.Keys)
{
//If an entry is already in use, do not replace it or add a duplicate entry with a different dialog.
//Reject it.
if (s == slot)
{
return false;
}
}
DialogBranch.Add(slot, dialog);
return true;
}
public DialogChat GetDialog(DialogSlot slot)
{
if (DialogBranch.Count == 0)
return null;
if (DialogBranch[slot] == null)
return null;
return DialogBranch[slot];
}
}
}