module Base
{
    /* BADLANDS Power - Controllers DLC: the generator controller, a wall box.
       Built like vanilla's wall shelves (entity_carpentry_shelves_lvl1): the
       SpriteConfig's needToBeAgainstWall is what makes the build cursor demand a
       wall -- it is an entity key, not a tile property. Faces point at the base
       box sprites; the lamp is an overlay the Lua sets (sheet 4..15).
       timedAction reuses vanilla's screwdriver animation. */
    entity BPC_GeneratorController
    {
        component UiConfig
        {
            xuiSkin = default,
            entityStyle = ES_BPC_GeneratorController,
            uiEnabled = false,
        }
        component SpriteConfig
        {
            needToBeAgainstWall = true,
            face S
            {
                layer
                {
                    row = badlands_powerctl_01_0,
                }
            }
            face E
            {
                layer
                {
                    row = badlands_powerctl_01_1,
                }
            }
            face N
            {
                layer
                {
                    row = badlands_powerctl_01_2,
                }
            }
            face W
            {
                layer
                {
                    row = badlands_powerctl_01_3,
                }
            }
        }
        component CraftRecipe
        {
            timedAction = DismantleElectrical,
            time = 240,
            category = Miscellaneous,
            SkillRequired = Electricity:7,
            xpAward = Electricity:25,
            Tooltip = Tooltip_craft_BPC_ControllerDesc,
            inputs
            {
                item 1 tags[base:screwdriver] mode:keep flags[Prop1;MayDegradeVeryLight],
                item 1 [Base.Timer],
                item 4 [Base.ElectronicsScrap],
                item 2 [Base.ElectricWire],
                item 2 [Base.SmallSheetMetal],
                item 4 [Base.Screws],
            }
        }
    }

    xuiSkin default
    {
        entity ES_BPC_GeneratorController
        {
            LuaWindowClass = ISEntityWindow,
            DisplayName = Generator Controller,
            Icon = Build_BPCGeneratorController,
        }
    }
}
