About Door Frames
Are you tired of the strict limitations on floor frames, where only ladder hatches are allowed? DoorFrames is here to change that! This plugin introduces the ability to place Wooden Double Doors, Metal Double Doors, Armored Double Doors, and Garage Doors on floor frames, giving players more creative freedom and practical utility in their base designs.
What Does DoorFrames Do?
By default, Rust restricts floor frames to only accept ladder hatches, limiting design possibilities. DoorFrames overrides this behavior, allowing players to place multiple door types on floor frames, seamlessly integrating them into existing structures.
Key Features
Support for All Double Door Types
Players can place the following doors on floor frames:
Wooden Double Doors
Metal Double Doors
Armored Double Doors
Garage Doors
Permission-Based Access
Control which players can place specific door types using permission system:
doorframes.all: Allows placement of all supported door types.
doorframes.wood: Allows placement of Wooden Double Doors.
doorframes.metal: Allows placement of Metal Double Doors.
doorframes.armored: Allows placement of Armored Double Doors.
doorframes.garage: Allows placement of Garage Doors.
Cooldown System for Performance
To ensure smooth server performance, the plugin includes a 0.5-second cooldown for each frame. Additionally, a 100-frame limit is enforced to prevent excessive memory usage. The oldest cooldowns are purged as needed, ensuring stability during heavy server activity. (Those can be changed in the code for optimization.)
Custom Hook Integration
The FFDoorPlaced hook is triggered every time a door is successfully placed, enabling advanced customization for server developers.
How It Works
For Developers
Customization via Hook:
The FFDoorPlaced hook allows you to add functionality such as logging, rewards, or additional restrictions. It provides the following parameters:
BasePlayer player: The player placing the door.
Door door: The door entity being placed.
string doorType: The type of door being placed (e.g., door.double.hinged.metal).
For Players
Select a Door: Equip one of the supported doors in your hotbar.
Aim at a Floor Frame: Point at a valid floor frame within a 5-meter range.
Place with a Click: If permissions are granted, the door will automatically align to the frame.
Players who lack the required permission will receive a message in chat, preventing placement.
Important Considerations
Performance First: The cooldown system and frame limit ensure no unnecessary server lag or memory usage.
Backup Recommended: Always back up your server before installing new plugins or making major changes.
For Developers:
using Oxide.Core; using UnityEngine; namespace Oxide.Plugins { [Info("FFDoorLogger", "Hakan", "1.0.0")] public class FFDoorLogger : RustPlugin { void FFDoorPlaced(BasePlayer player, Door door, string doorType) { Puts($"{player.displayName} placed a {doorType} on a floor frame."); } } }
Functionality The FFDoorPlaced method is a hook that gets called whenever a door is placed using the DoorFrames plugin. When triggered, it:
Takes three parameters:
player: The BasePlayer who placed the door
door: The Door entity that was placed
doorType: The type of door placed (e.g., wooden, metal)