Skip to content

Understand how correct this implementation is #59

@skulidropek

Description

@skulidropek

Understand how correct this implementation is

private object OnItemDeployed(Deployer deployer, BaseEntity entity, BaseEntity parent)
        {
            if (entity == null || deployer == null || entity is not SleepingBag)
            {
                return new object();
            }

            BasePlayer player = deployer.GetOwnerPlayer();
            if (player == null)
            {
                return new object();
            }

            if (entity is not SleepingBag bag)
            {
                return new object();
            }

            // Проверяем, является ли это водным спальным мешком
            if (bag.skinID != config.General.WaterBagSkinID)
            {
                return new object();
            }

            // Отправляем сообщение о размещении
            player.ChatMessage(GetMessage("BagPlaced", player.UserIDString));

            return new object();
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions