- alien ruin structure drawing order changes
- placing cargo items using syncedRand (items will be in the same position for all clients) - less confusing waypoint/spawnpoint editing (spawnpoints can't be converted to waypoints or vice versa, and spawnpoint settings aren't shown for waypoints) - more informative message about missing cargo spawnpoints
This commit is contained in:
@@ -150,10 +150,10 @@
|
||||
linkable="true"
|
||||
pickdistance="150.0">
|
||||
|
||||
<Sprite texture="Content/Map/ruins.png" sourcerect="0,842,260,54" depth="0.01" origin="0.5,0.5"/>
|
||||
<Sprite texture="Content/Map/ruins.png" sourcerect="747,0,260,95" depth="0.8" origin="0.5,0.5"/>
|
||||
|
||||
<Door canbeselected="true" horizontal="true">
|
||||
<Sprite texture="Content/Map/ruins.png" sourcerect="747,0,260,95" depth="0.05" origin="0.0,0.5"/>
|
||||
<Sprite texture="Content/Map/ruins.png" sourcerect="0,842,260,54" depth="0.6" origin="0.0,0.5"/>
|
||||
<sound file="aliendoor.ogg" type="OnUse" range="1000.0"/>
|
||||
</Door>
|
||||
|
||||
@@ -171,10 +171,10 @@
|
||||
linkable="true"
|
||||
pickdistance="150.0">
|
||||
|
||||
<Sprite texture="Content/Map/ruins.png" sourcerect="842,192,54,259" depth="0.8" origin="0.5,0.5"/>
|
||||
<Sprite texture="Content/Map/ruins.png" sourcerect="746,101,93,259" depth="0.8" origin="0.5,0.5"/>
|
||||
|
||||
<Door canbeselected="true">
|
||||
<Sprite texture="Content/Map/ruins.png" sourcerect="746,101,93,259" depth="0.6" origin="0.5,0.0"/>
|
||||
<Sprite texture="Content/Map/ruins.png" sourcerect="842,192,54,259" depth="0.6" origin="0.5,0.0"/>
|
||||
<sound file="aliendoor.ogg" type="OnUse" range="3000.0"/>
|
||||
</Door>
|
||||
|
||||
|
||||
@@ -110,29 +110,29 @@
|
||||
width="173" height="129" depth = "0.9"/>
|
||||
|
||||
|
||||
<RuinWallHorizontal category="Alien" sprite="Content/Map/ruins.png" sourcerect="0,896,832,128" depth ="0.95" castshadow="true"
|
||||
<RuinWallHorizontal category="Alien" sprite="Content/Map/ruins.png" sourcerect="0,896,832,128" depth ="0.06" castshadow="true"
|
||||
width = "128" height ="128" resizehorizontal="true" body="true" health="500"/>
|
||||
|
||||
<RuinWallVertical category="Alien" sprite="Content/Map/ruins.png" sourcerect="896,192,128,832" depth ="0.94" castshadow="true"
|
||||
<RuinWallVertical category="Alien" sprite="Content/Map/ruins.png" sourcerect="896,192,128,832" depth ="0.061" castshadow="true"
|
||||
width = "128" height ="128" resizevertical="true" body="true" health="500"/>
|
||||
|
||||
<RuinWallHorizontalSmall category="Alien" sprite="Content/Map/ruins.png" sourcerect="0,842,832,54" depth ="0.95" castshadow="true"
|
||||
<RuinWallHorizontalSmall category="Alien" sprite="Content/Map/ruins.png" sourcerect="0,842,832,54" depth ="0.062" castshadow="true"
|
||||
width = "128" height ="54" resizehorizontal="true" body="true" health="500"/>
|
||||
|
||||
<RuinWallVerticalSmall category="Alien" sprite="Content/Map/ruins.png" sourcerect="842,192,54,832" depth ="0.96" castshadow="true"
|
||||
<RuinWallVerticalSmall category="Alien" sprite="Content/Map/ruins.png" sourcerect="842,192,54,832" depth ="0.063" castshadow="true"
|
||||
width = "54" height ="128" resizevertical="true" body="true" health="500"/>
|
||||
|
||||
|
||||
<RuinBack category="Alien" sprite="Content/Map/ruins.png" sourcerect="0,0,512,512" depth ="0.98"
|
||||
width="64" height="64" resizehorizontal="true" resizevertical="true"/>
|
||||
|
||||
<RuinBackCarvings category="Alien" sprite="Content/Map/ruins.png" sourcerect="512,0,233,512" depth ="0.98"
|
||||
<RuinBackCarvings category="Alien" sprite="Content/Map/ruins.png" sourcerect="512,0,233,512" depth ="0.981"
|
||||
width="64" height="64" resizehorizontal="true" resizevertical="true"/>
|
||||
|
||||
<RuinBlock category="Alien" sprite="Content/Map/ruins.png" sourcerect="0,513,514,296" depth ="0.99"
|
||||
width="514" height="296"/>
|
||||
|
||||
<RuinFractalBall category="Alien" sprite="Content/Map/ruins2.png" sourcerect="0,0,512,512" depth ="0.97"
|
||||
<RuinFractalBall category="Alien" sprite="Content/Map/ruins2.png" sourcerect="0,0,512,512" depth ="0.971"
|
||||
width="512" height="512"/>
|
||||
|
||||
<RuinClaw category="Alien" sprite="Content/Map/ruins2.png" sourcerect="512,517,126,270" depth ="0.97"
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
Vector2 position = new Vector2(
|
||||
Rand.Range(cargoRoom.Rect.X + 20, cargoRoom.Rect.Right - 20, true),
|
||||
Rand.Range(cargoRoom.Rect.X + 20, cargoRoom.Rect.Right - 20, false),
|
||||
cargoRoom.Rect.Y - cargoRoom.Rect.Height + 10.0f);
|
||||
|
||||
var item = new Item(itemPrefab, position, cargoRoom.Submarine);
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Barotrauma
|
||||
set;
|
||||
}
|
||||
|
||||
public string ToolTip
|
||||
public virtual string ToolTip
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
||||
@@ -52,6 +52,19 @@ namespace Barotrauma
|
||||
set;
|
||||
}
|
||||
|
||||
public override string ToolTip
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.ToolTip;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.ToolTip = value;
|
||||
textBlock.ToolTip = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override SpriteFont Font
|
||||
{
|
||||
set
|
||||
|
||||
@@ -549,7 +549,8 @@ namespace Barotrauma
|
||||
|
||||
if (WayPoint.WayPointList.Find(wp => wp.SpawnType == SpawnType.Cargo) == null)
|
||||
{
|
||||
DebugConsole.ThrowError("The submarine doesn't have a waypoint marked as ''Cargo'', which are used for determining where to place bought items.");
|
||||
DebugConsole.ThrowError("The submarine doesn't have spawnpoints for cargo (which are used for determining where to place bought items). "
|
||||
+"To fix this, create a new spawnpoint and change its ''spawn type'' parameter to ''cargo''.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -202,8 +202,8 @@ namespace Barotrauma
|
||||
|
||||
spawnType += (int)button.UserData;
|
||||
|
||||
if (spawnType > SpawnType.Cargo) spawnType = SpawnType.Path;
|
||||
if (spawnType < SpawnType.Path) spawnType = SpawnType.Cargo;
|
||||
if (spawnType > SpawnType.Cargo) spawnType = SpawnType.Human;
|
||||
if (spawnType < SpawnType.Human) spawnType = SpawnType.Cargo;
|
||||
|
||||
spawnTypeText.Text = spawnType.ToString();
|
||||
|
||||
@@ -247,43 +247,60 @@ namespace Barotrauma
|
||||
private GUIComponent CreateEditingHUD(bool inGame = false)
|
||||
{
|
||||
int width = 500;
|
||||
int height = spawnType == SpawnType.Path ? 100 : 140;
|
||||
int x = GameMain.GraphicsWidth / 2 - width / 2, y = 10;
|
||||
|
||||
editingHUD = new GUIFrame(new Rectangle(x, y, width, 150), Color.Black * 0.5f);
|
||||
editingHUD = new GUIFrame(new Rectangle(x, y, width, height), Color.Black * 0.5f);
|
||||
editingHUD.Padding = new Vector4(10, 10, 0, 0);
|
||||
editingHUD.UserData = this;
|
||||
|
||||
new GUITextBlock(new Rectangle(0, 0, 100, 20), "Editing waypoint", GUI.Style, editingHUD);
|
||||
new GUITextBlock(new Rectangle(0, 20, 100, 20), "Hold space to link to another entity", GUI.Style, editingHUD);
|
||||
new GUITextBlock(new Rectangle(0, 40, 100, 20), "Spawnpoint: ", GUI.Style, editingHUD);
|
||||
if (spawnType == SpawnType.Path)
|
||||
{
|
||||
new GUITextBlock(new Rectangle(0, 0, 100, 20), "Editing waypoint", GUI.Style, editingHUD);
|
||||
new GUITextBlock(new Rectangle(0, 20, 100, 20), "Hold space to link to another waypoint", GUI.Style, editingHUD);
|
||||
}
|
||||
else
|
||||
{
|
||||
new GUITextBlock(new Rectangle(0, 0, 100, 20), "Editing spawnpoint", GUI.Style, editingHUD);
|
||||
new GUITextBlock(new Rectangle(0, 25, 100, 20), "Spawn type: ", GUI.Style, editingHUD);
|
||||
|
||||
var spawnTypeText = new GUITextBlock(new Rectangle(0, 25, 200, 20), spawnType.ToString(), GUI.Style, Alignment.Right, Alignment.TopLeft, editingHUD);
|
||||
|
||||
var button = new GUIButton(new Rectangle(-30,0,20,20), "-", Alignment.Right, GUI.Style, spawnTypeText);
|
||||
button.UserData = -1;
|
||||
button.OnClicked = ChangeSpawnType;
|
||||
|
||||
button = new GUIButton(new Rectangle(0, 0, 20, 20), "+", Alignment.Right, GUI.Style, spawnTypeText);
|
||||
button.UserData = 1;
|
||||
button.OnClicked = ChangeSpawnType;
|
||||
|
||||
y = 40 + 20;
|
||||
|
||||
new GUITextBlock(new Rectangle(0, y, 100, 20), "ID Card tags:", Color.Transparent, Color.White, Alignment.TopLeft, null, editingHUD);
|
||||
GUITextBox propertyBox = new GUITextBox(new Rectangle(100, y, 200, 20), GUI.Style, editingHUD);
|
||||
propertyBox.Text = string.Join(", ", idCardTags);
|
||||
propertyBox.OnEnterPressed = EnterIDCardTags;
|
||||
propertyBox.OnTextChanged = TextBoxChanged;
|
||||
propertyBox.ToolTip = "Characters spawning at this spawnpoint will have the specified tags added to their ID card. You can, for example, use these tags to limit access to some parts of the sub.";
|
||||
|
||||
y = y + 30;
|
||||
|
||||
new GUITextBlock(new Rectangle(0, y, 100, 20), "Assigned job:", Color.Transparent, Color.White, Alignment.TopLeft, null, editingHUD);
|
||||
propertyBox = new GUITextBox(new Rectangle(100, y, 200, 20), GUI.Style, editingHUD);
|
||||
propertyBox.Text = (assignedJob == null) ? "None" : assignedJob.Name;
|
||||
propertyBox.OnEnterPressed = EnterAssignedJob;
|
||||
propertyBox.OnTextChanged = TextBoxChanged;
|
||||
propertyBox.ToolTip = "Only characters with the specified job will spawn at this spawnpoint.";
|
||||
|
||||
}
|
||||
|
||||
|
||||
var spawnTypeText = new GUITextBlock(new Rectangle(0, 40, 200, 20), spawnType.ToString(), GUI.Style, Alignment.Right, Alignment.TopLeft, editingHUD);
|
||||
|
||||
var button = new GUIButton(new Rectangle(-30,0,20,20), "-", Alignment.Right, GUI.Style, spawnTypeText);
|
||||
button.UserData = -1;
|
||||
button.OnClicked = ChangeSpawnType;
|
||||
|
||||
button = new GUIButton(new Rectangle(0, 0, 20, 20), "+", Alignment.Right, GUI.Style, spawnTypeText);
|
||||
button.UserData = 1;
|
||||
button.OnClicked = ChangeSpawnType;
|
||||
|
||||
//spriteBatch.DrawString(GUI.font, "Spawnpoint: " + spawnType.ToString() + " +/-", new Vector2(x, y + 40), Color.Black);
|
||||
|
||||
y = 40+20;
|
||||
|
||||
new GUITextBlock(new Rectangle(0, y, 100, 20), "ID Card tags:", Color.Transparent, Color.White, Alignment.TopLeft, null, editingHUD);
|
||||
GUITextBox propertyBox = new GUITextBox(new Rectangle(100, y, 200, 20), GUI.Style, editingHUD);
|
||||
propertyBox.Text = string.Join(", ", idCardTags);
|
||||
propertyBox.OnEnterPressed = EnterIDCardTags;
|
||||
propertyBox.OnTextChanged = TextBoxChanged;
|
||||
y = y + 30;
|
||||
|
||||
new GUITextBlock(new Rectangle(0, y, 100, 20), "Assigned job:", Color.Transparent, Color.White, Alignment.TopLeft, null, editingHUD);
|
||||
propertyBox = new GUITextBox(new Rectangle(100, y, 200, 20), GUI.Style, editingHUD);
|
||||
propertyBox.Text = (assignedJob == null) ? "None" : assignedJob.Name;
|
||||
|
||||
propertyBox.OnEnterPressed = EnterAssignedJob;
|
||||
propertyBox.OnTextChanged = TextBoxChanged;
|
||||
y = y + 30;
|
||||
|
||||
return editingHUD;
|
||||
|
||||
Reference in New Issue
Block a user