Skip to content

Prevent floors from being placed on floors #345

@dmccoystephenson

Description

@dmccoystephenson

Summary

Prevent floor entities from being placed on top of existing floor entities.

Background

Players can currently stack multiple floor tiles (WoodFloor, StoneFloor) on the same grid location. This wastes inventory items and is unintended behaviour.

Requirements

  • In worldScreen.py, extend the placement validation in executePlaceAction() to check whether the target location already contains a floor entity before placing
  • Floor types to guard against: WoodFloor, StoneFloor
  • If a floor is already present, silently skip placement (or set a brief status message via status.set(...), consistent with other placement feedback)

Acceptance Criteria

  • Placing a WoodFloor or StoneFloor on a location that already contains either floor type is blocked
  • No items are consumed when placement is blocked
  • All existing tests pass; a new test in tests/screen/test_worldScreen_pushStone.py or a dedicated placement test covers this guard

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions