Zone Builder:
- Doorways now show the Travel Direction the opposite doorway uses within the pop up tooltip. - Doorway tooltips now show the Connected Room information in the doors popup tooltip when loaded. DoorwayManager: - Saves the connected rooms traveldirection within the Doorway now. MudEngine: - Door.ConnectedRoom struct now contains a TravelDirection Field for finding out what travel direction a connected room uses to return back to the original room. - GameScript class added within the GameManagement namespace.
This commit is contained in:
parent
968ab21e5a
commit
4f5fd633ba
7 changed files with 72 additions and 7 deletions
|
@ -184,12 +184,13 @@ namespace MudDesigner.Editors
|
||||||
connected.Realm = Program.Realm.Name;
|
connected.Realm = Program.Realm.Name;
|
||||||
connected.Zone = Program.Zone.Name;
|
connected.Zone = Program.Zone.Name;
|
||||||
connected.Room = Program.Room.Name;
|
connected.Room = Program.Room.Name;
|
||||||
|
connected.TravelDirection = TravelDirection;
|
||||||
|
|
||||||
//Create a new door, add our link and set its travel direction
|
//Create a new door, add our link and set its travel direction
|
||||||
Door door = new Door();
|
Door door = new Door();
|
||||||
door.TravelRoom = connected;
|
door.TravelRoom = connected;
|
||||||
door.TravelDirection = TravelDirections.GetTravelDirectionValue(TravelDirection.ToString());
|
door.TravelDirection = TravelDirections.GetTravelDirectionValue(TravelDirection.ToString());
|
||||||
|
|
||||||
//install the door
|
//install the door
|
||||||
linkedRoom.InstalledDoors.Add(door);
|
linkedRoom.InstalledDoors.Add(door);
|
||||||
//save the linked room
|
//save the linked room
|
||||||
|
|
|
@ -354,6 +354,20 @@ namespace MudDesigner.Editors
|
||||||
propertyRoom.SelectedObject = Program.Room;
|
propertyRoom.SelectedObject = Program.Room;
|
||||||
IsRoomLoaded = true;
|
IsRoomLoaded = true;
|
||||||
IsCreatingRoom = false;
|
IsCreatingRoom = false;
|
||||||
|
|
||||||
|
//assign the doorways to the UI
|
||||||
|
foreach (Door door in Program.Room.InstalledDoors)
|
||||||
|
{
|
||||||
|
AvailableTravelDirections travelDirection = door.TravelDirection;
|
||||||
|
|
||||||
|
Control[] controls = this.Controls.Find("btn" + travelDirection.ToString(), true);
|
||||||
|
|
||||||
|
controls[0].Text = travelDirection.ToString() + "\nInstalled";
|
||||||
|
|
||||||
|
doorwayHelp.SetToolTip(controls[0], travelDirection.ToString() + " Doorway Installed.\n\n"
|
||||||
|
+ door.TravelRoom.Realm + "->" + door.TravelRoom.Zone + "->" + door.TravelRoom.Room + "->" + door.TravelRoom.TravelDirection.ToString());
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doorwayMenuStrip_Opening(object sender, CancelEventArgs e)
|
private void doorwayMenuStrip_Opening(object sender, CancelEventArgs e)
|
||||||
|
@ -418,8 +432,8 @@ namespace MudDesigner.Editors
|
||||||
Control[] controls = this.Controls.Find("btn" + travelDirection.ToString(), true);
|
Control[] controls = this.Controls.Find("btn" + travelDirection.ToString(), true);
|
||||||
|
|
||||||
controls[0].Text = travelDirection.ToString() + "\nInstalled";
|
controls[0].Text = travelDirection.ToString() + "\nInstalled";
|
||||||
Help.SetToolTip(controls[0], travelDirection.ToString() + " Doorway Installed.\n\n"
|
doorwayHelp.SetToolTip(controls[0], travelDirection.ToString() + " Doorway Installed.\n\n"
|
||||||
+ form.linkedRealm.Name + "->" + form.linkedZone.Name + "->" + form.linkedRoom.Name);
|
+ form.linkedRealm.Name + "->" + form.linkedZone.Name + "->" + form.linkedRoom.Name + "->" + form.TravelDirection.ToString());
|
||||||
|
|
||||||
Door door = new Door(travelDirection);
|
Door door = new Door(travelDirection);
|
||||||
Door.ConnectedRoom d = new Door.ConnectedRoom();
|
Door.ConnectedRoom d = new Door.ConnectedRoom();
|
||||||
|
|
20
Mud Designer/Editors/ZoneBuilder.designer.cs
generated
20
Mud Designer/Editors/ZoneBuilder.designer.cs
generated
|
@ -72,6 +72,7 @@
|
||||||
this.btnNorth = new System.Windows.Forms.Button();
|
this.btnNorth = new System.Windows.Forms.Button();
|
||||||
this.btnUp = new System.Windows.Forms.Button();
|
this.btnUp = new System.Windows.Forms.Button();
|
||||||
this.Help = new System.Windows.Forms.ToolTip(this.components);
|
this.Help = new System.Windows.Forms.ToolTip(this.components);
|
||||||
|
this.doorwayHelp = new System.Windows.Forms.ToolTip(this.components);
|
||||||
this.containerMain.Panel1.SuspendLayout();
|
this.containerMain.Panel1.SuspendLayout();
|
||||||
this.containerMain.Panel2.SuspendLayout();
|
this.containerMain.Panel2.SuspendLayout();
|
||||||
this.containerMain.SuspendLayout();
|
this.containerMain.SuspendLayout();
|
||||||
|
@ -417,6 +418,7 @@
|
||||||
this.btnEast.Size = new System.Drawing.Size(118, 93);
|
this.btnEast.Size = new System.Drawing.Size(118, 93);
|
||||||
this.btnEast.TabIndex = 7;
|
this.btnEast.TabIndex = 7;
|
||||||
this.btnEast.Text = "East";
|
this.btnEast.Text = "East";
|
||||||
|
this.doorwayHelp.SetToolTip(this.btnEast, "No doorway installed.\r\n\r\nRight-click to install one.\r\n");
|
||||||
this.btnEast.UseVisualStyleBackColor = false;
|
this.btnEast.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
// doorwayMenuStrip
|
// doorwayMenuStrip
|
||||||
|
@ -426,7 +428,7 @@
|
||||||
this.toolStripMenuItem2,
|
this.toolStripMenuItem2,
|
||||||
this.mnuClearDoorway});
|
this.mnuClearDoorway});
|
||||||
this.doorwayMenuStrip.Name = "doorwayMenuStrip";
|
this.doorwayMenuStrip.Name = "doorwayMenuStrip";
|
||||||
this.doorwayMenuStrip.Size = new System.Drawing.Size(162, 76);
|
this.doorwayMenuStrip.Size = new System.Drawing.Size(162, 54);
|
||||||
this.doorwayMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.doorwayMenuStrip_Opening);
|
this.doorwayMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.doorwayMenuStrip_Opening);
|
||||||
//
|
//
|
||||||
// mnuInstallDoor
|
// mnuInstallDoor
|
||||||
|
@ -484,6 +486,7 @@
|
||||||
this.btnWest.Size = new System.Drawing.Size(118, 93);
|
this.btnWest.Size = new System.Drawing.Size(118, 93);
|
||||||
this.btnWest.TabIndex = 6;
|
this.btnWest.TabIndex = 6;
|
||||||
this.btnWest.Text = "West";
|
this.btnWest.Text = "West";
|
||||||
|
this.doorwayHelp.SetToolTip(this.btnWest, "No doorway installed.\r\n\r\nRight-click to install one.");
|
||||||
this.btnWest.UseVisualStyleBackColor = false;
|
this.btnWest.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
// btnDown
|
// btnDown
|
||||||
|
@ -499,6 +502,7 @@
|
||||||
this.btnDown.Size = new System.Drawing.Size(118, 51);
|
this.btnDown.Size = new System.Drawing.Size(118, 51);
|
||||||
this.btnDown.TabIndex = 5;
|
this.btnDown.TabIndex = 5;
|
||||||
this.btnDown.Text = "Down";
|
this.btnDown.Text = "Down";
|
||||||
|
this.doorwayHelp.SetToolTip(this.btnDown, "No doorway installed.\r\n\r\nRight-click to install one.\r\n");
|
||||||
this.btnDown.UseVisualStyleBackColor = false;
|
this.btnDown.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
// btnSouth
|
// btnSouth
|
||||||
|
@ -514,6 +518,7 @@
|
||||||
this.btnSouth.Size = new System.Drawing.Size(118, 86);
|
this.btnSouth.Size = new System.Drawing.Size(118, 86);
|
||||||
this.btnSouth.TabIndex = 4;
|
this.btnSouth.TabIndex = 4;
|
||||||
this.btnSouth.Text = "South";
|
this.btnSouth.Text = "South";
|
||||||
|
this.doorwayHelp.SetToolTip(this.btnSouth, "No doorway installed.\r\n\r\nRight-click to install one.\r\n");
|
||||||
this.btnSouth.UseVisualStyleBackColor = false;
|
this.btnSouth.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
// btnNorth
|
// btnNorth
|
||||||
|
@ -529,6 +534,7 @@
|
||||||
this.btnNorth.Size = new System.Drawing.Size(118, 86);
|
this.btnNorth.Size = new System.Drawing.Size(118, 86);
|
||||||
this.btnNorth.TabIndex = 3;
|
this.btnNorth.TabIndex = 3;
|
||||||
this.btnNorth.Text = "North";
|
this.btnNorth.Text = "North";
|
||||||
|
this.doorwayHelp.SetToolTip(this.btnNorth, "No doorway installed.\r\n\r\nRight-click to install one.");
|
||||||
this.btnNorth.UseVisualStyleBackColor = false;
|
this.btnNorth.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
// btnUp
|
// btnUp
|
||||||
|
@ -544,6 +550,7 @@
|
||||||
this.btnUp.Size = new System.Drawing.Size(118, 51);
|
this.btnUp.Size = new System.Drawing.Size(118, 51);
|
||||||
this.btnUp.TabIndex = 0;
|
this.btnUp.TabIndex = 0;
|
||||||
this.btnUp.Text = "Up";
|
this.btnUp.Text = "Up";
|
||||||
|
this.doorwayHelp.SetToolTip(this.btnUp, "No doorway installed.\r\n\r\nRight-click to install one.\r\n");
|
||||||
this.btnUp.UseVisualStyleBackColor = false;
|
this.btnUp.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
// Help
|
// Help
|
||||||
|
@ -555,6 +562,16 @@
|
||||||
this.Help.ReshowDelay = 100;
|
this.Help.ReshowDelay = 100;
|
||||||
this.Help.ToolTipTitle = "Zone Designer";
|
this.Help.ToolTipTitle = "Zone Designer";
|
||||||
//
|
//
|
||||||
|
// doorwayHelp
|
||||||
|
//
|
||||||
|
this.doorwayHelp.AutomaticDelay = 100;
|
||||||
|
this.doorwayHelp.AutoPopDelay = 15000;
|
||||||
|
this.doorwayHelp.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
||||||
|
this.doorwayHelp.InitialDelay = 100;
|
||||||
|
this.doorwayHelp.IsBalloon = true;
|
||||||
|
this.doorwayHelp.ReshowDelay = 20;
|
||||||
|
this.doorwayHelp.ToolTipTitle = "Zone Designer";
|
||||||
|
//
|
||||||
// ZoneBuilder
|
// ZoneBuilder
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
@ -632,6 +649,7 @@
|
||||||
private System.Windows.Forms.ToolStripMenuItem installDoorwayToAnotherZoneToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem installDoorwayToAnotherZoneToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
|
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
|
||||||
private System.Windows.Forms.ToolStripMenuItem installReverseDoorwayToSelectedRoomToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem installReverseDoorwayToSelectedRoomToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolTip doorwayHelp;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -117,12 +117,15 @@
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="Help.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>17, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="doorwayMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="doorwayMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>94, 17</value>
|
<value>94, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="doorwayHelp.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>250, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="Help.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
<data name="installReverseDoorwayToSelectedRoomToolStripMenuItem.ToolTipText" xml:space="preserve">
|
<data name="installReverseDoorwayToSelectedRoomToolStripMenuItem.ToolTipText" xml:space="preserve">
|
||||||
<value>Automatically links the currently loaded Room & its Doorway
|
<value>Automatically links the currently loaded Room & its Doorway
|
||||||
to the opposite doorway contained within the currently selected
|
to the opposite doorway contained within the currently selected
|
||||||
|
@ -134,4 +137,7 @@ Note that the currently selected room is what will be linked to,
|
||||||
it does not need to be loaded in order to be linked. Loading it will
|
it does not need to be loaded in order to be linked. Loading it will
|
||||||
unload the currently loaded room.</value>
|
unload the currently loaded room.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<metadata name="Help.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
|
@ -80,6 +80,7 @@
|
||||||
<DependentUpon>ExistingRealms.cs</DependentUpon>
|
<DependentUpon>ExistingRealms.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="MudEngine\FileSystem\SaveDataTypes.cs" />
|
<Compile Include="MudEngine\FileSystem\SaveDataTypes.cs" />
|
||||||
|
<Compile Include="MudEngine\GameManagement\GameScript.cs" />
|
||||||
<Compile Include="MudEngine\GameObjects\Bag.cs" />
|
<Compile Include="MudEngine\GameObjects\Bag.cs" />
|
||||||
<Compile Include="MudEngine\GameObjects\BaseObject.cs" />
|
<Compile Include="MudEngine\GameObjects\BaseObject.cs" />
|
||||||
<Compile Include="MudEngine\GameObjects\Currency.cs" />
|
<Compile Include="MudEngine\GameObjects\Currency.cs" />
|
||||||
|
|
24
Mud Designer/MudEngine/GameManagement/GameScript.cs
Normal file
24
Mud Designer/MudEngine/GameManagement/GameScript.cs
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
//.NET Framework
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
//MudEngine
|
||||||
|
using MudDesigner.MudEngine.FileSystem;
|
||||||
|
using MudDesigner.MudEngine.GameManagement;
|
||||||
|
using MudDesigner.MudEngine.GameObjects;
|
||||||
|
//ManagedScripting
|
||||||
|
using ManagedScripting;
|
||||||
|
using ManagedScripting.CodeBuilding;
|
||||||
|
|
||||||
|
namespace MudDesigner.MudEngine.GameManagement
|
||||||
|
{
|
||||||
|
public class GameScript
|
||||||
|
{
|
||||||
|
ScriptObject _ScriptObject;
|
||||||
|
|
||||||
|
public GameScript()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,6 +15,7 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
|
||||||
public string Realm;
|
public string Realm;
|
||||||
public string Zone;
|
public string Zone;
|
||||||
public string Room;
|
public string Room;
|
||||||
|
public AvailableTravelDirections TravelDirection;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Category("Door Settings")]
|
[Category("Door Settings")]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue