Merge remote-tracking branch 'upstream/stable' into ed-27-05-2025-upstream-sync
# Conflicts: # .github/CODEOWNERS # Content.Client/Guidebook/Controls/GuideReagentReaction.xaml.cs # Content.IntegrationTests/Tests/Chemistry/TryAllReactionsTest.cs # Content.Server/Procedural/DungeonJob/DungeonJob.OreDunGen.cs # Resources/Prototypes/Entities/Effects/chemistry_effects.yml # Resources/Prototypes/Entities/Mobs/Customization/Markings/human_hair.yml # Resources/Prototypes/GameRules/meteorswarms.yml # Resources/Prototypes/Procedural/dungeon_configs.yml
This commit is contained in:
@@ -126,14 +126,14 @@ public sealed class FloorTileSystem : EntitySystem
|
||||
if (mapGrid != null)
|
||||
{
|
||||
var gridUid = location.EntityId;
|
||||
var tile = _map.GetTileRef(gridUid, mapGrid, location);
|
||||
|
||||
if (!CanPlaceTile(gridUid, mapGrid, out var reason))
|
||||
if (!CanPlaceTile(gridUid, mapGrid, tile.GridIndices, out var reason))
|
||||
{
|
||||
_popup.PopupClient(reason, args.User, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
var tile = _map.GetTileRef(gridUid, mapGrid, location);
|
||||
var baseTurf = (ContentTileDefinition) _tileDefinitionManager[tile.Tile.TypeId];
|
||||
|
||||
if (HasBaseTurf(currentTileDefinition, baseTurf.ID))
|
||||
@@ -182,12 +182,12 @@ public sealed class FloorTileSystem : EntitySystem
|
||||
_audio.PlayPredicted(placeSound, location, user);
|
||||
}
|
||||
|
||||
public bool CanPlaceTile(EntityUid gridUid, MapGridComponent component, [NotNullWhen(false)] out string? reason)
|
||||
public bool CanPlaceTile(EntityUid gridUid, MapGridComponent component, Vector2i gridIndices, [NotNullWhen(false)] out string? reason)
|
||||
{
|
||||
var ev = new FloorTileAttemptEvent();
|
||||
var ev = new FloorTileAttemptEvent(gridIndices);
|
||||
RaiseLocalEvent(gridUid, ref ev);
|
||||
|
||||
if (HasComp<ProtectedGridComponent>(gridUid) || ev.Cancelled)
|
||||
if (ev.Cancelled)
|
||||
{
|
||||
reason = Loc.GetString("invalid-floor-placement");
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user