Merge branch 'xamlui'
This commit is contained in:
31
Content.Client/Construction/ConstructionMenu.xaml
Normal file
31
Content.Client/Construction/ConstructionMenu.xaml
Normal file
@@ -0,0 +1,31 @@
|
||||
<customControls:SS14Window xmlns:customControls="clr-namespace:Robust.Client.UserInterface.CustomControls;assembly=Robust.Client"
|
||||
xmlns:controls="clr-namespace:Robust.Client.UserInterface.Controls;assembly=Robust.Client"
|
||||
xmlns:userInterface="clr-namespace:Robust.Client.UserInterface;assembly=Robust.Client">
|
||||
<controls:HBoxContainer SizeFlagsHorizontal="FillExpand">
|
||||
<controls:VBoxContainer SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.45">
|
||||
<controls:HBoxContainer SizeFlagsHorizontal="FillExpand" SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.1">
|
||||
<controls:LineEdit Name="SearchBar" PlaceHolder="Search" SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.6"/>
|
||||
<controls:OptionButton Name="Category" SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.4"/>
|
||||
</controls:HBoxContainer>
|
||||
<controls:ItemList Name="RecipesList" SelectMode="Single" SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.9"/>
|
||||
</controls:VBoxContainer>
|
||||
<userInterface:Control SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.05"/>
|
||||
<controls:VBoxContainer SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.45">
|
||||
<controls:HBoxContainer Align="Center" SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.25">
|
||||
<controls:TextureRect Name="TargetTexture" SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.15" Stretch="KeepCentered"/>
|
||||
<controls:VBoxContainer SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.85">
|
||||
<controls:RichTextLabel Name="TargetName" SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.1"/>
|
||||
<controls:RichTextLabel Name="TargetDesc" SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.9"/>
|
||||
</controls:VBoxContainer>
|
||||
</controls:HBoxContainer>
|
||||
<controls:ItemList Name="StepList" SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.1"/>
|
||||
<controls:VBoxContainer SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.1">
|
||||
<controls:Button Name="BuildButton" Disabled="True" ToggleMode="True" SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.5"/>
|
||||
<controls:HBoxContainer SizeFlagsVertical="FillExpand" SizeFlagsStretchRatio="0.5">
|
||||
<controls:Button Name="EraseButton" ToggleMode="True" SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.7"/>
|
||||
<controls:Button Name="ClearButton" SizeFlagsHorizontal="FillExpand" SizeFlagsStretchRatio="0.3"/>
|
||||
</controls:HBoxContainer>
|
||||
</controls:VBoxContainer>
|
||||
</controls:VBoxContainer>
|
||||
</controls:HBoxContainer>
|
||||
</customControls:SS14Window>
|
||||
@@ -7,15 +7,13 @@ using Content.Client.Utility;
|
||||
using Content.Shared.Construction;
|
||||
using Content.Shared.GameObjects.Components;
|
||||
using Content.Shared.GameObjects.Components.Interactable;
|
||||
using Content.Shared.Materials;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Interfaces.Placement;
|
||||
using Robust.Client.Interfaces.ResourceManagement;
|
||||
using Robust.Client.Placement;
|
||||
using Robust.Client.ResourceManagement;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Client.Utility;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
@@ -27,7 +25,8 @@ using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Client.Construction
|
||||
{
|
||||
public class ConstructionMenu : SS14Window
|
||||
[GenerateTypedNameReferences]
|
||||
public partial class ConstructionMenu : SS14Window
|
||||
{
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly IResourceCache _resourceCache = default!;
|
||||
@@ -39,89 +38,28 @@ namespace Content.Client.Construction
|
||||
private ConstructionPrototype? _selected;
|
||||
private string[] _categories = Array.Empty<string>();
|
||||
|
||||
private readonly ItemList _recipes;
|
||||
private readonly ItemList _stepList;
|
||||
private readonly Button _buildButton;
|
||||
private readonly Button _eraseButton;
|
||||
private readonly LineEdit _searchBar;
|
||||
private readonly OptionButton _category;
|
||||
private readonly TextureRect _targetTexture;
|
||||
private readonly RichTextLabel _targetName;
|
||||
private readonly RichTextLabel _targetDescription;
|
||||
|
||||
public ConstructionMenu()
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
_placementManager.PlacementChanged += PlacementChanged;
|
||||
|
||||
Title = "Construction";
|
||||
Title = Loc.GetString("Construction");
|
||||
|
||||
var hbox = new HBoxContainer() {SizeFlagsHorizontal = SizeFlags.FillExpand};
|
||||
BuildButton.Text = Loc.GetString("Place construction ghost");
|
||||
RecipesList.OnItemSelected += RecipeSelected;
|
||||
RecipesList.OnItemDeselected += RecipeDeselected;
|
||||
|
||||
var recipeContainer = new VBoxContainer() {SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.45f};
|
||||
SearchBar.OnTextChanged += SearchTextChanged;
|
||||
Category.OnItemSelected += CategorySelected;
|
||||
|
||||
var searchContainer = new HBoxContainer() {SizeFlagsVertical = SizeFlags.FillExpand, SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.1f};
|
||||
_searchBar = new LineEdit() {PlaceHolder = "Search", SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.6f};
|
||||
_category = new OptionButton() {SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.4f};
|
||||
|
||||
_recipes = new ItemList() {SelectMode = ItemList.ItemListSelectMode.Single, SizeFlagsVertical = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.9f};
|
||||
|
||||
var spacer = new Control() {SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.05f};
|
||||
|
||||
var stepsContainer = new VBoxContainer() {SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.45f};
|
||||
var targetContainer = new HBoxContainer() {Align = BoxContainer.AlignMode.Center, SizeFlagsVertical = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.25f};
|
||||
_targetTexture = new TextureRect() {SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.15f, Stretch = TextureRect.StretchMode.KeepCentered};
|
||||
var targetInfoContainer = new VBoxContainer() {SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.85f};
|
||||
_targetName = new RichTextLabel() {SizeFlagsVertical = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.1f};
|
||||
_targetDescription = new RichTextLabel() {SizeFlagsVertical = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.9f};
|
||||
|
||||
_stepList = new ItemList() {SizeFlagsVertical = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.75f, SelectMode = ItemList.ItemListSelectMode.None};
|
||||
|
||||
var buttonContainer = new VBoxContainer() {SizeFlagsVertical = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.1f};
|
||||
_buildButton = new Button() {Disabled = true, ToggleMode = true, Text = Loc.GetString("Place construction ghost"), SizeFlagsVertical = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.5f};
|
||||
|
||||
var eraseContainer = new HBoxContainer() {SizeFlagsVertical = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.5f};
|
||||
_eraseButton = new Button() {Text = Loc.GetString("Eraser Mode"), ToggleMode = true, SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.7f};
|
||||
var clearButton = new Button() {Text = Loc.GetString("Clear All"), SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 0.3f};
|
||||
|
||||
recipeContainer.AddChild(searchContainer);
|
||||
recipeContainer.AddChild(_recipes);
|
||||
|
||||
searchContainer.AddChild(_searchBar);
|
||||
searchContainer.AddChild(_category);
|
||||
|
||||
targetInfoContainer.AddChild(_targetName);
|
||||
targetInfoContainer.AddChild(_targetDescription);
|
||||
|
||||
targetContainer.AddChild(_targetTexture);
|
||||
targetContainer.AddChild(targetInfoContainer);
|
||||
|
||||
stepsContainer.AddChild(targetContainer);
|
||||
stepsContainer.AddChild(_stepList);
|
||||
|
||||
eraseContainer.AddChild(_eraseButton);
|
||||
eraseContainer.AddChild(clearButton);
|
||||
|
||||
buttonContainer.AddChild(_buildButton);
|
||||
buttonContainer.AddChild(eraseContainer);
|
||||
|
||||
stepsContainer.AddChild(buttonContainer);
|
||||
|
||||
hbox.AddChild(recipeContainer);
|
||||
hbox.AddChild(spacer);
|
||||
hbox.AddChild(stepsContainer);
|
||||
Contents.AddChild(hbox);
|
||||
|
||||
_recipes.OnItemSelected += RecipeSelected;
|
||||
_recipes.OnItemDeselected += RecipeDeselected;
|
||||
|
||||
_searchBar.OnTextChanged += SearchTextChanged;
|
||||
_category.OnItemSelected += CategorySelected;
|
||||
|
||||
_buildButton.OnToggled += BuildButtonToggled;
|
||||
clearButton.OnPressed += ClearAllButtonPressed;
|
||||
_eraseButton.OnToggled += EraseButtonToggled;
|
||||
BuildButton.Text = Loc.GetString("Place construction ghost");
|
||||
BuildButton.OnToggled += BuildButtonToggled;
|
||||
ClearButton.Text = Loc.GetString("Clear All");
|
||||
ClearButton.OnPressed += ClearAllButtonPressed;
|
||||
EraseButton.Text = Loc.GetString("Eraser Mode");
|
||||
EraseButton.OnToggled += EraseButtonToggled;
|
||||
|
||||
PopulateCategories();
|
||||
PopulateAll();
|
||||
@@ -129,15 +67,15 @@ namespace Content.Client.Construction
|
||||
|
||||
private void PlacementChanged(object? sender, EventArgs e)
|
||||
{
|
||||
_buildButton.Pressed = false;
|
||||
_eraseButton.Pressed = false;
|
||||
BuildButton.Pressed = false;
|
||||
EraseButton.Pressed = false;
|
||||
}
|
||||
|
||||
private void PopulateAll()
|
||||
{
|
||||
foreach (var recipe in _prototypeManager.EnumeratePrototypes<ConstructionPrototype>())
|
||||
{
|
||||
_recipes.Add(GetItem(recipe, _recipes));
|
||||
RecipesList.Add(GetItem(recipe, RecipesList));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +93,7 @@ namespace Content.Client.Construction
|
||||
|
||||
private void PopulateBy(string search, string category)
|
||||
{
|
||||
_recipes.Clear();
|
||||
RecipesList.Clear();
|
||||
|
||||
foreach (var recipe in _prototypeManager.EnumeratePrototypes<ConstructionPrototype>())
|
||||
{
|
||||
@@ -171,7 +109,7 @@ namespace Content.Client.Construction
|
||||
continue;
|
||||
}
|
||||
|
||||
_recipes.Add(GetItem(recipe, _recipes));
|
||||
RecipesList.Add(GetItem(recipe, RecipesList));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,7 +128,7 @@ namespace Content.Client.Construction
|
||||
uniqueCategories.Add(category);
|
||||
}
|
||||
|
||||
_category.Clear();
|
||||
Category.Clear();
|
||||
|
||||
var array = uniqueCategories.ToArray();
|
||||
Array.Sort(array);
|
||||
@@ -198,7 +136,7 @@ namespace Content.Client.Construction
|
||||
for (var i = 0; i < array.Length; i++)
|
||||
{
|
||||
var category = array[i];
|
||||
_category.AddItem(category, i);
|
||||
Category.AddItem(category, i);
|
||||
}
|
||||
|
||||
_categories = array;
|
||||
@@ -210,11 +148,11 @@ namespace Content.Client.Construction
|
||||
|
||||
var isItem = prototype.Type == ConstructionType.Item;
|
||||
|
||||
_buildButton.Disabled = false;
|
||||
_buildButton.Text = Loc.GetString(!isItem ? "Place construction ghost" : "Craft");
|
||||
_targetName.SetMessage(prototype.Name);
|
||||
_targetDescription.SetMessage(prototype.Description);
|
||||
_targetTexture.Texture = prototype.Icon.Frame0();
|
||||
BuildButton.Disabled = false;
|
||||
BuildButton.Text = Loc.GetString(!isItem ? "Place construction ghost" : "Craft");
|
||||
TargetName.SetMessage(prototype.Name);
|
||||
TargetDesc.SetMessage(prototype.Description);
|
||||
TargetTexture.Texture = prototype.Icon.Frame0();
|
||||
|
||||
if (!_prototypeManager.TryIndex(prototype.Graph, out ConstructionGraphPrototype graph))
|
||||
return;
|
||||
@@ -295,7 +233,7 @@ namespace Content.Client.Construction
|
||||
|
||||
if (firstNode)
|
||||
{
|
||||
_stepList.AddItem(isItem
|
||||
StepList.AddItem(isItem
|
||||
? Loc.GetString($"{stepNumber++}. To craft this item, you need:")
|
||||
: Loc.GetString($"{stepNumber++}. To build this, first you need:"));
|
||||
}
|
||||
@@ -307,7 +245,7 @@ namespace Content.Client.Construction
|
||||
switch (step)
|
||||
{
|
||||
case MaterialConstructionGraphStep materialStep:
|
||||
_stepList.AddItem(
|
||||
StepList.AddItem(
|
||||
!firstNode
|
||||
? Loc.GetString(
|
||||
"{0}. Add {1}x {2}.", stepNumber++, materialStep.Amount, materialStep.Material)
|
||||
@@ -316,20 +254,20 @@ namespace Content.Client.Construction
|
||||
break;
|
||||
|
||||
case ToolConstructionGraphStep toolStep:
|
||||
_stepList.AddItem(Loc.GetString("{0}. Use a {1}.", stepNumber++, toolStep.Tool.GetToolName()), icon);
|
||||
StepList.AddItem(Loc.GetString("{0}. Use a {1}.", stepNumber++, toolStep.Tool.GetToolName()), icon);
|
||||
break;
|
||||
|
||||
case PrototypeConstructionGraphStep prototypeStep:
|
||||
_stepList.AddItem(Loc.GetString("{0}. Add {1}.", stepNumber++, prototypeStep.Name), icon);
|
||||
StepList.AddItem(Loc.GetString("{0}. Add {1}.", stepNumber++, prototypeStep.Name), icon);
|
||||
break;
|
||||
|
||||
case ComponentConstructionGraphStep componentStep:
|
||||
_stepList.AddItem(Loc.GetString("{0}. Add {1}.", stepNumber++, componentStep.Name), icon);
|
||||
StepList.AddItem(Loc.GetString("{0}. Add {1}.", stepNumber++, componentStep.Name), icon);
|
||||
break;
|
||||
|
||||
case NestedConstructionGraphStep nestedStep:
|
||||
var parallelNumber = 1;
|
||||
_stepList.AddItem(Loc.GetString("{0}. In parallel...", stepNumber++));
|
||||
StepList.AddItem(Loc.GetString("{0}. In parallel...", stepNumber++));
|
||||
|
||||
foreach (var steps in nestedStep.Steps)
|
||||
{
|
||||
@@ -343,19 +281,19 @@ namespace Content.Client.Construction
|
||||
{
|
||||
case MaterialConstructionGraphStep materialStep:
|
||||
if (!isItem)
|
||||
_stepList.AddItem(Loc.GetString(" {0}.{1}.{2}. Add {3}x {4}.", stepNumber, parallelNumber, subStepNumber++, materialStep.Amount, materialStep.Material), icon);
|
||||
StepList.AddItem(Loc.GetString(" {0}.{1}.{2}. Add {3}x {4}.", stepNumber, parallelNumber, subStepNumber++, materialStep.Amount, materialStep.Material), icon);
|
||||
break;
|
||||
|
||||
case ToolConstructionGraphStep toolStep:
|
||||
_stepList.AddItem(Loc.GetString(" {0}.{1}.{2}. Use a {3}.", stepNumber, parallelNumber, subStepNumber++, toolStep.Tool.GetToolName()), icon);
|
||||
StepList.AddItem(Loc.GetString(" {0}.{1}.{2}. Use a {3}.", stepNumber, parallelNumber, subStepNumber++, toolStep.Tool.GetToolName()), icon);
|
||||
break;
|
||||
|
||||
case PrototypeConstructionGraphStep prototypeStep:
|
||||
_stepList.AddItem(Loc.GetString(" {0}.{1}.{2}. Add {3}.", stepNumber, parallelNumber, subStepNumber++, prototypeStep.Name), icon);
|
||||
StepList.AddItem(Loc.GetString(" {0}.{1}.{2}. Add {3}.", stepNumber, parallelNumber, subStepNumber++, prototypeStep.Name), icon);
|
||||
break;
|
||||
|
||||
case ComponentConstructionGraphStep componentStep:
|
||||
_stepList.AddItem(Loc.GetString(" {0}.{1}.{2}. Add {3}.", stepNumber, parallelNumber, subStepNumber++, componentStep.Name), icon);
|
||||
StepList.AddItem(Loc.GetString(" {0}.{1}.{2}. Add {3}.", stepNumber, parallelNumber, subStepNumber++, componentStep.Name), icon);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -373,11 +311,11 @@ namespace Content.Client.Construction
|
||||
|
||||
private void ClearInfo()
|
||||
{
|
||||
_buildButton.Disabled = true;
|
||||
_targetName.SetMessage(string.Empty);
|
||||
_targetDescription.SetMessage(string.Empty);
|
||||
_targetTexture.Texture = null;
|
||||
_stepList.Clear();
|
||||
BuildButton.Disabled = true;
|
||||
TargetName.SetMessage(string.Empty);
|
||||
TargetDesc.SetMessage(string.Empty);
|
||||
TargetTexture.Texture = null;
|
||||
StepList.Clear();
|
||||
}
|
||||
|
||||
private void RecipeSelected(ItemList.ItemListSelectedEventArgs obj)
|
||||
@@ -394,13 +332,13 @@ namespace Content.Client.Construction
|
||||
|
||||
private void CategorySelected(OptionButton.ItemSelectedEventArgs obj)
|
||||
{
|
||||
_category.SelectId(obj.Id);
|
||||
PopulateBy(_searchBar.Text, _categories[obj.Id]);
|
||||
Category.SelectId(obj.Id);
|
||||
PopulateBy(SearchBar.Text, _categories[obj.Id]);
|
||||
}
|
||||
|
||||
private void SearchTextChanged(LineEdit.LineEditEventArgs obj)
|
||||
{
|
||||
PopulateBy(_searchBar.Text, _categories[_category.SelectedId]);
|
||||
PopulateBy(SearchBar.Text, _categories[Category.SelectedId]);
|
||||
}
|
||||
|
||||
private void BuildButtonToggled(BaseButton.ButtonToggledEventArgs args)
|
||||
@@ -414,7 +352,7 @@ namespace Content.Client.Construction
|
||||
if (_selected.Type == ConstructionType.Item)
|
||||
{
|
||||
constructSystem.TryStartItemConstruction(_selected.ID);
|
||||
_buildButton.Pressed = false;
|
||||
BuildButton.Pressed = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -429,14 +367,14 @@ namespace Content.Client.Construction
|
||||
_placementManager.Clear();
|
||||
}
|
||||
|
||||
_buildButton.Pressed = args.Pressed;
|
||||
BuildButton.Pressed = args.Pressed;
|
||||
}
|
||||
|
||||
private void EraseButtonToggled(BaseButton.ButtonToggledEventArgs args)
|
||||
{
|
||||
if (args.Pressed) _placementManager.Clear();
|
||||
_placementManager.ToggleEraserHijacked(new ConstructionPlacementHijack(_systemManager.GetEntitySystem<ConstructionSystem>(), null));
|
||||
_eraseButton.Pressed = args.Pressed;
|
||||
EraseButton.Pressed = args.Pressed;
|
||||
}
|
||||
|
||||
private void ClearAllButtonPressed(BaseButton.ButtonEventArgs obj)
|
||||
@@ -33,4 +33,6 @@
|
||||
<DependentUpon>OptionsMenu.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="..\RobustToolbox\MSBuild\XamlIL.targets" />
|
||||
</Project>
|
||||
|
||||
@@ -8,7 +8,6 @@ using Content.Server.Interfaces.Chat;
|
||||
using Content.Shared;
|
||||
using Newtonsoft.Json;
|
||||
using Robust.Server.Interfaces.ServerStatus;
|
||||
using Robust.Server.ServerStatus;
|
||||
using Robust.Shared.Asynchronous;
|
||||
using Robust.Shared.Interfaces.Configuration;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -73,9 +72,9 @@ namespace Content.Server
|
||||
}
|
||||
}
|
||||
|
||||
private bool _handleChatPost(HttpMethod method, HttpListenerRequest request, HttpListenerResponse response)
|
||||
private bool _handleChatPost(IStatusHandlerContext context)
|
||||
{
|
||||
if (method != HttpMethod.Post || request.Url!.AbsolutePath != "/ooc")
|
||||
if (context.RequestMethod != HttpMethod.Post || context.Url!.AbsolutePath != "/ooc")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -84,14 +83,14 @@ namespace Content.Server
|
||||
|
||||
if (string.IsNullOrEmpty(password))
|
||||
{
|
||||
response.StatusCode = (int) HttpStatusCode.Forbidden;
|
||||
context.RespondError(HttpStatusCode.Forbidden);
|
||||
return true;
|
||||
}
|
||||
|
||||
OOCPostMessage message = null;
|
||||
try
|
||||
{
|
||||
message = request.GetFromJson<OOCPostMessage>();
|
||||
message = context.RequestBodyJson<OOCPostMessage>();
|
||||
}
|
||||
catch (JsonSerializationException)
|
||||
{
|
||||
@@ -100,19 +99,19 @@ namespace Content.Server
|
||||
|
||||
if (message == null)
|
||||
{
|
||||
response.StatusCode = (int) HttpStatusCode.BadRequest;
|
||||
context.RespondError(HttpStatusCode.BadRequest);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (message.Password != password)
|
||||
{
|
||||
response.StatusCode = (int) HttpStatusCode.Forbidden;
|
||||
context.RespondError(HttpStatusCode.Forbidden);
|
||||
return true;
|
||||
}
|
||||
|
||||
_taskManager.RunOnMainThread(() => _chatManager.SendHookOOC(message.Sender, message.Contents));
|
||||
|
||||
response.StatusCode = (int) HttpStatusCode.OK;
|
||||
context.Respond("Success", HttpStatusCode.OK);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Submodule RobustToolbox updated: 58560f589f...feaa69f825
@@ -49,6 +49,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MSBuild", "MSBuild", "{5040
|
||||
RobustToolbox\MSBuild\Robust.DefineConstants.targets = RobustToolbox\MSBuild\Robust.DefineConstants.targets
|
||||
RobustToolbox\MSBuild\Robust.Engine.targets = RobustToolbox\MSBuild\Robust.Engine.targets
|
||||
RobustToolbox\MSBuild\Robust.Properties.targets = RobustToolbox\MSBuild\Robust.Properties.targets
|
||||
RobustToolbox\MSBuild\XamlIL.targets = RobustToolbox\MSBuild\XamlIL.targets
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{806ED41A-411B-4B3B-BEB6-DEC6DCA4C205}"
|
||||
@@ -74,6 +75,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Robust.Physics", "RobustToo
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust.LoaderApi", "RobustToolbox\Robust.LoaderApi\Robust.LoaderApi\Robust.LoaderApi.csproj", "{1FAE651D-29D8-437A-9864-47CE0D180016}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust.Client.NameGenerator", "RobustToolbox\Robust.Client.NameGenerator\Robust.Client.NameGenerator.csproj", "{3CFEB7DB-12C6-46F3-89FC-1450F3016FFA}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust.Client.Injectors", "RobustToolbox\Robust.Client.Injectors\Robust.Client.Injectors.csproj", "{8922428F-17C3-47A7-BFE9-570DEB2464DA}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.HttpListener", "RobustToolbox\ManagedHttpListener\src\System.Net.HttpListener.csproj", "{3429ACDA-F32F-4710-90F5-8C6DF4800304}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlX.IL.Cecil", "RobustToolbox\XamlX\src\XamlX.IL.Cecil\XamlX.IL.Cecil.csproj", "{16F7DE32-0186-44B9-9345-0C20D1BF2422}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "XamlX", "XamlX", "{AFF53804-115F-4E67-B81F-26265EA27880}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlX", "RobustToolbox\XamlX\src\XamlX\XamlX.csproj", "{23F09C45-950E-4DB7-A465-E937450FF008}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlX.Runtime", "RobustToolbox\XamlX\src\XamlX.Runtime\XamlX.Runtime.csproj", "{440426C1-8DCA-43F6-967F-94439B8DAF47}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -154,6 +169,30 @@ Global
|
||||
{1FAE651D-29D8-437A-9864-47CE0D180016}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1FAE651D-29D8-437A-9864-47CE0D180016}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1FAE651D-29D8-437A-9864-47CE0D180016}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3CFEB7DB-12C6-46F3-89FC-1450F3016FFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3CFEB7DB-12C6-46F3-89FC-1450F3016FFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3CFEB7DB-12C6-46F3-89FC-1450F3016FFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3CFEB7DB-12C6-46F3-89FC-1450F3016FFA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8922428F-17C3-47A7-BFE9-570DEB2464DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8922428F-17C3-47A7-BFE9-570DEB2464DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8922428F-17C3-47A7-BFE9-570DEB2464DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8922428F-17C3-47A7-BFE9-570DEB2464DA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3429ACDA-F32F-4710-90F5-8C6DF4800304}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3429ACDA-F32F-4710-90F5-8C6DF4800304}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3429ACDA-F32F-4710-90F5-8C6DF4800304}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3429ACDA-F32F-4710-90F5-8C6DF4800304}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{16F7DE32-0186-44B9-9345-0C20D1BF2422}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{16F7DE32-0186-44B9-9345-0C20D1BF2422}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{16F7DE32-0186-44B9-9345-0C20D1BF2422}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{16F7DE32-0186-44B9-9345-0C20D1BF2422}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{23F09C45-950E-4DB7-A465-E937450FF008}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{23F09C45-950E-4DB7-A465-E937450FF008}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{23F09C45-950E-4DB7-A465-E937450FF008}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{23F09C45-950E-4DB7-A465-E937450FF008}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{440426C1-8DCA-43F6-967F-94439B8DAF47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{440426C1-8DCA-43F6-967F-94439B8DAF47}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{440426C1-8DCA-43F6-967F-94439B8DAF47}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{440426C1-8DCA-43F6-967F-94439B8DAF47}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -173,6 +212,13 @@ Global
|
||||
{7B9472D3-79D4-48D1-9B22-BCDE518FE842} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
|
||||
{3BC34700-882F-426B-82BB-56D5708B5E0D} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
|
||||
{1FAE651D-29D8-437A-9864-47CE0D180016} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
|
||||
{3CFEB7DB-12C6-46F3-89FC-1450F3016FFA} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
|
||||
{8922428F-17C3-47A7-BFE9-570DEB2464DA} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
|
||||
{3429ACDA-F32F-4710-90F5-8C6DF4800304} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
|
||||
{AFF53804-115F-4E67-B81F-26265EA27880} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE}
|
||||
{16F7DE32-0186-44B9-9345-0C20D1BF2422} = {AFF53804-115F-4E67-B81F-26265EA27880}
|
||||
{23F09C45-950E-4DB7-A465-E937450FF008} = {AFF53804-115F-4E67-B81F-26265EA27880}
|
||||
{440426C1-8DCA-43F6-967F-94439B8DAF47} = {AFF53804-115F-4E67-B81F-26265EA27880}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {AA37ED9F-F8D6-468E-A101-658AD605B09A}
|
||||
|
||||
Reference in New Issue
Block a user