JackhammerFlashlight

JackhammerFlashlight 1.0.1

1 / 2
Add a fully functional flashlight to jackhammers in Rust.

Mining in dark caves or at night should not mean constantly switching between your jackhammer and a separate light source.

JackhammerFlashlight adds a toggleable flashlight to jackhammers, allowing players to mine while illuminating the area in front of them. Players can turn the flashlight on or off using the normal Rust flashlight key or simple chat commands, while server owners can configure battery duration, multiple recharge methods, replaceable batteries, support for normal jackhammers, custom item skins, loot container drops, and optional battery status displays.

Perfect for PvE, PvP, Vanilla+, modded, survival, mining, and custom progression Rust servers.

✨ Features

  1. Adds a fully functional flashlight to supported jackhammers.
  2. Players can toggle the flashlight using the normal Rust flashlight key (F).
  3. Chat commands to toggle the flashlight, turn it on or off, and check battery charge.
  4. Flashlight follows the player's aim direction while holding the jackhammer.
  5. Special Jackhammer Flashlight item with a configurable display name and skin ID.
  6. Optional support for enabling flashlights on normal Rust jackhammers.
  7. Configurable battery duration with support for unlimited battery life.
  8. Battery charge decreases automatically while the flashlight is enabled.
  9. Battery consumption pauses when the flashlight is turned off.
  10. Remaining battery charge is preserved when the player switches items or puts the jackhammer away.
  11. Flashlight automatically turns off when its battery runs out.
  12. Players can check their remaining battery charge using a chat command.
  13. Recharge batteries using configurable Rust items and resource costs.
  14. Configure multiple recharge items with separate amounts, skin IDs, and charge percentages.
  15. Optional automatic battery recharging with configurable charge percentage per minute.
  16. Optional workbench recharging with separate rates for Level 1, Level 2, and Level 3 Workbenches.
  17. Configurable workbench recharge radius.
  18. Recharge batteries using /jf recharge with optional item selection.
  19. Optional recharge command cooldown, permission requirement, and item cost settings.
  20. Optional free recharge command with a configurable charge percentage.
  21. Replace empty batteries using configurable Rust items.
  22. Optional automatic battery replacement when the flashlight runs out of charge.
  23. Battery capacity is preserved separately from remaining charge to support recharging.
  24. Configurable fallback battery capacity for older jackhammers.
  25. Optional SimpleStatus integration to display battery information while holding the jackhammer.
  26. Optional AdvancedStatus integration with battery countdown support.
  27. Battery display supports remaining time, paused charge, unlimited battery, and empty battery states.
  28. Configurable command aliases for player flashlight controls.
  29. Admin command to give special Jackhammer Flashlight items to online players.
  30. Supports giving multiple jackhammers with a single command.
  31. Admins can specify a custom battery duration when giving jackhammers.
  32. Optional automatic Jackhammer Flashlight drops from configured loot containers.
  33. Configurable loot container prefabs, drop chances, and minimum/maximum item amounts.
  34. Separate battery duration overrides for individual loot drop configurations.
  35. Automatically restores active flashlight functionality when players equip supported jackhammers.
  36. English and Russian plugin messages included.

🔦 Flashlight Controls

Players can control their jackhammer flashlight using the regular Rust flashlight key or chat commands.

ControlDescription
F KeyToggles the flashlight on or off while holding a supported jackhammer.
/jfToggles the flashlight on or off.
/jf onTurns the flashlight on.
/jf offTurns the flashlight off.
/jf batteryShows the remaining battery charge.
/jf rechargeRecharges the battery using the configured recharge settings.
/jf recharge <item shortname>Attempts to recharge using a matching configured item.
/jf replaceReplaces an empty battery using the configured replacement item.

Tip

Example:
Hold a Jackhammer Flashlight and press F to turn on the light. Press F again to turn it off.

The flashlight follows your aim direction, allowing you to see where you are mining without switching tools.

🔋 Battery System

JackhammerFlashlight includes a configurable battery system that allows server owners to control how long flashlights can remain active and how players restore their charge.

Battery SettingDescription
Unlimited BatteryFlashlight can remain enabled without running out of charge.
Limited BatteryFlashlight operates for the configured number of seconds.
Battery PauseBattery consumption stops when the flashlight is turned off.
Battery DepletionFlashlight automatically turns off when its remaining charge reaches zero.
Battery CapacityStores the maximum charge separately from the remaining battery time.
Battery RechargeRestores charge through enabled recharge methods without exceeding maximum capacity.
Battery StatusPlayers can check their remaining charge using /jf battery.

Tip

Example:
Set Battery Duration (seconds, 0 = unlimited) to 600 to give newly created Jackhammer Flashlight items 10 minutes of battery usage.

Set the duration to 0 for unlimited battery life.

With a 600-second battery, a recharge that restores 50% capacity adds 300 seconds of charge, up to the battery's maximum capacity.

⚡ Recharge System

JackhammerFlashlight includes multiple configurable recharge methods, allowing server owners to choose how players restore their flashlight batteries.

Recharge MethodDescription
Item RechargeConsume configured Rust items to restore a percentage of battery capacity.
Automatic RechargeGradually recharge batteries over time while the flashlight is off.
Workbench RechargeRecharge batteries near Workbenches with configurable rates for each level.
Recharge CommandConfigure command-based recharging with optional permissions, cooldowns, and item requirements.
Replaceable BatteriesConsume a configured item to replace a completely empty battery.
Automatic ReplacementAutomatically replace an empty battery when the required replacement item is available.

Recharge methods can be enabled or disabled separately.

🔧 Item Recharge

Players can recharge their flashlight battery using configurable Rust items.

  • Configure one or multiple items that can be used for recharging.
  • Set a separate item amount for each recharge option.
  • Configure how much battery capacity each item restores.
  • Optional skin ID requirements for recharge items.
  • Players can recharge using /jf recharge.
  • Players can specify a recharge item using /jf recharge <item shortname>.
  • Required items are consumed from the player's inventory.
  • Recharging cannot exceed the battery's maximum capacity.

Tip

Example:
Configure 10 Low Grade Fuel to restore 50% of the battery's maximum capacity.

A jackhammer with a 600-second battery receives up to 300 additional seconds of charge when the player uses the configured fuel cost.

The default item recharge configuration already includes 10 Low Grade Fuel for 50% charge.

🔄 Automatic Recharge

Automatically restore battery charge over time without requiring players to use items or commands.

  • Enable or disable automatic recharging.
  • Configure the battery percentage restored per minute.
  • Recharges supported jackhammers in the player's inventory.
  • Only recharges batteries while their flashlight is turned off.
  • Stops automatically when the battery reaches full capacity.
  • Recharging is processed at regular intervals.

Tip

Example:
Set Charge Percent per Minute to 20 to recharge 20% of maximum battery capacity per minute while the flashlight is off.

A completely empty battery can reach full charge after approximately 5 minutes when this rate is active without a faster workbench recharge rate.

🛠️ Workbench Recharge

Allow players to recharge flashlight batteries by staying near Rust Workbenches.

WorkbenchDefault Recharge Rate
Level 1 Workbench20% battery capacity per minute.
Level 2 Workbench40% battery capacity per minute.
Level 3 Workbench60% battery capacity per minute.

  • Enable or disable workbench recharging.
  • Configure the maximum recharge distance.
  • Set separate charging rates for each workbench level.
  • Supports deployed Workbenches and supported static Workbenches.
  • Recharges eligible jackhammers in the player's inventory while their flashlight is off.
  • Uses the highest available recharge rate when multiple workbenches or automatic recharge apply.
  • Automatically stops charging when the battery is full.

Tip

Example:
Set the recharge radius to 3 meters.

Players standing near a Level 3 Workbench can recharge at 60% battery capacity per minute using the default Level 3 rate.

Workbench recharging is disabled by default and must be enabled in the configuration.

⌨️ Recharge Command

The /jf recharge command lets players restore battery charge using the enabled recharge settings.

  • Recharge the jackhammer currently held by the player.
  • Optional permission requirement using jackhammerflashlight.recharge.
  • Configurable recharge command cooldown.
  • Choose whether recharge command usage requires items.
  • Configure the recharge percentage when item costs are not required.
  • Supports selecting a specific configured recharge item.
  • Prevents recharging while the flashlight is turned on.
  • Prevents recharging batteries that are already full or have unlimited charge.

Note

Recharge Command Behavior


Item-based recharging can work with /jf recharge when Item Recharge is enabled, even if the separate Recharge Command setting is disabled.

Enabling Recharge Command activates its additional permission, cooldown, and optional no-item recharge settings.

When Require Items is disabled under Recharge Command, players can use the configured no-item recharge percentage. Specifying an item shortname still selects an item-based recharge.

🔋 Replaceable Batteries

JackhammerFlashlight also supports replacing completely empty batteries using configurable Rust items.

  • Enable or disable battery replacement.
  • Configure which Rust item is required for replacement.
  • Set the number of items consumed per replacement.
  • Optional skin ID requirement for replacement items.
  • Players can manually replace an empty battery using /jf replace.
  • Replacing a battery restores its full configured capacity.
  • Optional automatic battery replacement when the flashlight runs out.
  • Automatic replacement can restore the light without requiring the player to manually run a command.

Tip

Example:
Configure weapon.mod.flashlight as the replacement item with an amount of 1.

When the jackhammer battery becomes empty, the player can use /jf replace to consume one Weapon Flashlight item and restore the battery to full capacity.

Enable Automatically Replace When Empty to let the plugin attempt replacement automatically when the battery runs out or the player tries to turn on an empty flashlight.

Warning

Important Recharge Notes


  • Recharge functionality must be enabled in the main Recharge Settings.
  • Batteries with unlimited charge do not need recharging or replacement.
  • Item and command recharging require the flashlight to be off.
  • Automatic and workbench recharging only affect eligible jackhammers with their flashlights turned off.
  • Manual battery replacement requires the battery to be completely empty.
  • Automatic battery replacement requires the replacement feature and automatic replacement setting to be enabled.
  • Automatic recharge, workbench recharge, recharge command options, and battery replacement are disabled by default.

📊 Battery Status Integration

JackhammerFlashlight supports optional integration with SimpleStatus and AdvancedStatus to display battery information while players hold supported jackhammers.

SimpleStatus

  • Displays battery information while holding a supported jackhammer.
  • Shows a countdown when the flashlight is running on limited battery.
  • Displays the remaining charge when the flashlight is turned off.
  • Supports unlimited and depleted battery states.
  • Updates when the battery is recharged or replaced while the jackhammer is held.

AdvancedStatus

  • Displays battery information using an AdvancedStatus bar.
  • Supports a countdown for remaining battery duration.
  • Updates the battery display depending on whether the flashlight is enabled or disabled.
  • Reflects battery changes after recharging or replacement.
  • Automatically removes the status when the player stops holding the supported jackhammer.

Note

Integration Notes


  • SimpleStatus and AdvancedStatus are optional integrations.
  • Both integrations can be enabled or disabled in the configuration.
  • When both are enabled and available, SimpleStatus takes priority.
  • Players can still use /jf battery without either status plugin installed.

📦 Loot Container Drops

Server owners can optionally configure special Jackhammer Flashlight items to appear inside Rust loot containers.

SettingDescription
EnabledEnables or disables the configured loot drop entry.
PrefabSpecifies the loot container prefab.
ChanceSets the chance of adding Jackhammer Flashlight items to the container.
Min AmountMinimum number of jackhammers added when the drop succeeds.
Max AmountMaximum number of jackhammers added when the drop succeeds.
Battery DurationSets a custom battery duration for jackhammers generated by this entry.

Multiple loot drop entries can be configured for different loot container types.

Tip

Example:
Enable a loot drop entry for assets/bundled/prefabs/radtown/crate_normal.prefab and set its chance to 10 to give matching crates a 10% chance of receiving the configured Jackhammer Flashlight items when their loot spawns.

Note

Loot Battery Settings


  • -1 - Uses the default battery duration from the main configuration.
  • 0 - Gives generated jackhammers unlimited battery life.
  • Any positive value - Sets a custom battery duration in seconds for that loot entry.

Loot container drops are disabled by default.

⌨️ Commands

/jf - Toggles the flashlight on or off while holding a supported jackhammer.

/jf on - Turns the flashlight on.

/jf off - Turns the flashlight off.

/jf battery - Shows the remaining battery charge.

/jf recharge - Recharges the currently held jackhammer using the configured recharge method.

/jf recharge <item shortname> - Recharges using a matching configured recharge item.

/jf replace - Replaces the empty battery using the configured replacement item.

Player flashlight command aliases are fully configurable.

🛡️ Admin Commands

/jfgive <player name or Steam ID> - Gives one Jackhammer Flashlight to the selected online player.

/jfgive <player name or Steam ID> <amount> - Gives the specified number of Jackhammer Flashlights.

/jfgive <player name or Steam ID> <amount> <battery seconds> - Gives Jackhammer Flashlights with a custom battery duration.

Command Examples

Код:
/jfgive PlayerName
/jfgive PlayerName 5
/jfgive "Player Name" 3
/jfgive PlayerName 1 600
/jfgive PlayerName 2 0

Note

Admin Command Notes


  • Player names containing spaces must be placed inside quotation marks.
  • The target player must be online and alive.
  • The default amount is 1.
  • Battery duration uses the main configuration unless explicitly specified.
  • Use 0 as the battery duration for unlimited charge.
  • If the target player's inventory is full, additional jackhammers are dropped at their feet.
  • The /jfgive command is available to Rust admins and players with the required permission.

🔐 Permissions

jackhammerflashlight.give - Allows non-admin players to use /jfgive to give Jackhammer Flashlight items to online players.

jackhammerflashlight.recharge - Required to use /jf recharge when Recharge Command is enabled and its permission requirement is enabled.

No permission is required for normal flashlight controls.

Item-based recharging can be used without the recharge permission when the separate Recharge Command permission requirement is not active.

Rust admins can use /jfgive without being granted the give permission separately.

⚙️ Example Configuration

JSON:
{
  "Commands": [
    "jf"
  ],
  "Enable Flashlight on Normal Jackhammers": false,
  "Item Name": "Jackhammer Flashlight",
  "Skin ID": 0,
  "Battery Duration (seconds, 0 = unlimited)": 0.0,
  "Recharge Settings": {
    "Enabled": true,
    "Fallback Capacity for Legacy Batteries (seconds)": 300.0,
    "Item Recharge": {
      "Enabled": true,
      "Items": [
        {
          "Item Shortname": "lowgradefuel",
          "Skin ID (0 = any)": 0,
          "Amount": 10,
          "Charge Percent": 50.0
        }
      ]
    },
    "Automatic Recharge": {
      "Enabled": false,
      "Charge Percent per Minute": 20.0
    },
    "Workbench Recharge": {
      "Enabled": false,
      "Radius (meters)": 3.0,
      "Level 1 Charge Percent per Minute": 20.0,
      "Level 2 Charge Percent per Minute": 40.0,
      "Level 3 Charge Percent per Minute": 60.0
    },
    "Recharge Command": {
      "Enabled": false,
      "Require Permission (jackhammerflashlight.recharge)": false,
      "Cooldown (seconds, 0 = none)": 60.0,
      "Require Items": true,
      "Charge Percent without Items": 100.0
    },
    "Replaceable Batteries": {
      "Enabled": false,
      "Automatically Replace When Empty": false,
      "Item Shortname": "weapon.mod.flashlight",
      "Skin ID (0 = any)": 0,
      "Amount": 1
    }
  },
  "[SimpleStatus] Show Battery While Holding": false,
  "[AdvancedStatus] Show Battery While Holding": false,
  "Drop Settings": [
    {
      "Enabled": false,
      "Prefab": "assets/bundled/prefabs/radtown/crate_normal.prefab",
      "Chance": 10,
      "Min Amount": 1,
      "Max Amount": 1,
      "Battery Duration (seconds, -1 = use default, 0 = unlimited)": -1.0
    }
  ],
  "Config Version": {
    "Major": 1,
    "Minor": 0,
    "Patch": 1
  }
}

Note

Configuration Notes


  • Commands: Configurable aliases for flashlight controls.
  • Normal Jackhammers: Enables flashlight functionality for regular Rust jackhammers instead of only specially created Jackhammer Flashlight items.
  • Item Name: Custom display name for generated Jackhammer Flashlight items.
  • Skin ID: Custom skin ID applied to generated Jackhammer Flashlight items.
  • Battery Duration: Sets the default battery duration in seconds. Use 0 for unlimited charge.
  • Recharge Enabled: Enables or disables the entire recharge system.
  • Legacy Battery Capacity: Sets the fallback maximum battery capacity for older jackhammers without stored capacity information.
  • Item Recharge: Configure item shortnames, amounts, optional skin IDs, and charge percentages.
  • Automatic Recharge: Configure passive battery recharging and the percentage restored per minute.
  • Workbench Recharge: Configure charging distance and different recharge speeds for Level 1, Level 2, and Level 3 Workbenches.
  • Recharge Command: Configure optional recharge command permissions, cooldowns, item requirements, and no-item charging.
  • Replaceable Batteries: Configure the replacement item, required amount, optional skin ID, and automatic replacement behavior.
  • SimpleStatus: Enables battery display integration with SimpleStatus.
  • AdvancedStatus: Enables battery display integration with AdvancedStatus.
  • Drop Settings: Configures optional loot container drops, item amounts, chances, and battery overrides.

Warning

Important:
When normal jackhammer support is disabled, flashlight functionality is limited to special Jackhammer Flashlight items created by the plugin.

Enable Flashlight on Normal Jackhammers in the configuration if you want regular Rust jackhammers to support the flashlight feature as well.

For rechargeable gameplay, configure a positive battery duration. Unlimited batteries do not need recharging.

Item-based recharging is enabled by default, while automatic recharge, workbench recharge, additional recharge command options, and replaceable batteries must be enabled separately.

💡 Why Choose JackhammerFlashlight?

Mining at night or inside dark caves should not require constantly switching between your tools and a separate light source.

JackhammerFlashlight combines a practical, aim-following flashlight, simple controls, configurable battery duration, multiple recharge methods, replaceable batteries, optional battery status integration, customizable jackhammer items, and loot container drops in one focused plugin.

Whether you want unlimited flashlights for everyday mining, rechargeable batteries that consume resources, automatic charging near workbenches, or replaceable batteries for custom progression, JackhammerFlashlight gives server owners full control over how players use and maintain their mining lights
Автор
Meowhuh
Скачиваний
1
Просмотры
6
Первый выпуск
Обновление

Рейтинг

0,00 звёзд Оценок: 0

Ещё ресурсы от Meowhuh

  • MonumentBlockerSystem
    MonumentBlockerSystem
    Complete monument blocker management for Rust servers.
  • TurretSystem
    TurretSystem
    Complete turret and base-defense management for Rust servers.
  • TranslateSystem
    TranslateSystem
    Automatic chat translation for Rust servers.
  • TrashBoxSystem
    TrashBoxSystem
    Automatic item disposal with customizable trash boxes for Rust servers.
  • OreGolems
    OreGolems
    Turn ordinary ore nodes into massive, animated boss encounters in Rust.
Назад
Верх