d661152bc95c2b1a514fdcc438929bd01fc44b55
Lint / Lint Resource (push) Has been cancelled
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>
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!
Languages
Lua
65%
JavaScript
21.7%
CSS
9.3%
HTML
4%