D4rkst3randClaude Opus 5 d661152bc9
Lint / Lint Resource (push) Has been cancelled
feat: Flaschengroessen mit echter Laufzeit und persistenter Restluft
Der Sauerstoff war eine lokale Client-Variable: nicht persistent, an kein Item
gebunden, weg bei Relog. Dazu ergab startingOxygenLevel=100 bei decayRate=1/s
genau 100 Sekunden Tauchzeit statt Minuten.

Sauerstoff-Logik:
- Restsekunden statt Punkte, Verbrauch ueber GetGameTimer-Delta statt gezaehlter
  Wait(1000) - ein Tick laeuft unter Last laenger als eine Sekunde, was sich
  ueber einen langen Tauchgang aufsummiert
- Float-Vergleiche (oxygenLevel % 10 == 0, == 0) raus, Warnschwellen als
  config.warnAtSeconds, jede Schwelle einmal pro Tauchgang
- Verbrauch steigt mit der Tiefe (1 + tiefe/30, gedeckelt), abschaltbar
- Anzeige als mm:ss

Flaschen:
- Vier Items mit capacity in Sekunden (300/600/900/1200) in config/shared.lua
- Restluft in metadata.oxygen, Fuellstand zusaetzlich in metadata.durability,
  damit der Balken direkt im Inventar-Slot sichtbar ist
- Kein decay auf den Items: ox_inventory loescht sonst die leere Flasche
- Auswahlmenue beim Anlegen und Auffuellen (entfaellt bei nur einer Flasche)
- diving_fill fuellt bis capacity statt auf einen Fixwert, verweigert volle
  Flaschen und verbraucht sich nur bei Erfolg
- items_for_ox_inventory.lua zum Reinkopieren

Server:
- getTanks/syncTank als Callbacks, Restluft kann nur sinken und nicht schneller
  als maxDrainPerSecond pro echter Sekunde
- SetMetadata ersetzt die Metadata-Tabelle komplett, daher wird der bestehende
  Inhalt kopiert statt nur oxygen gesetzt

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 23:45:11 +02:00
2023-11-08 17:36:09 -08:00

image

qbx_divegear

A Qbox resource that enables the functionality of diving and air tank items.

Works with qbx_diving, a coral diving and collection resource, also developed by the Qbox community!

Features

  • Able to set the length of time an air tank will refill your tank
  • Able to configure the rate of decay of the oxygen tank (to allow longer time in the water)
  • Limitations for refilling underwater (to limit endless use of air tanks)
  • animations and timers during refill
  • Text that displays current air time at the bottom of the player's screen when underwater and wearing gear

ox_inventory items

Place these items in ox_inventory's item.lua if you don't have them already:

    ['diving_fill'] = {
        label = 'Diving Tube',
        weight = 3000,
        stack = false,
        close = true,
        description = "used to refill your diving gear's oxygen supply."
    },

    ['diving_gear'] = {
        label = 'Diving Gear',
        weight = 30000,
        stack = false,
        close = true,
        description = "A diving set that let's swim underwater. Blub blub!"
    },

ox_inventory images

Missing images for your items? Here are some free-to-use images!

diving_gear diving_fill

S
Description
Tauchausruestung mit Flaschengroessen, gesyncter Lampe und Tiefenanzeige (Fork von qbx_divegear)
Readme GPL-3.0
715 KiB
Languages
Lua 65%
JavaScript 21.7%
CSS 9.3%
HTML 4%