docs: README auf den Fork umgeschrieben
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,45 +1,66 @@
|
|||||||

|
# d4rk_divegear
|
||||||
|
|
||||||
# qbx_divegear
|
Tauchausrüstung für QBox. Fork von [qbx_divegear](https://github.com/Qbox-project/qbx_divegear)
|
||||||
|
mit Flaschengrößen, gesyncter Lampe, Tiefenanzeige und Ausrüstung, die bei
|
||||||
|
Animationen nicht verschwindet.
|
||||||
|
|
||||||
A Qbox resource that enables the functionality of diving and air tank items.
|
## Features
|
||||||
|
|
||||||
Works with [qbx_diving](https://github.com/Qbox-project/qbx_diving/), a coral diving and collection resource, also developed by the Qbox community!
|
- **Vier Flaschengrößen** — 5, 10, 15 und 20 Minuten. Die Restluft liegt in der
|
||||||
|
Item-Metadata und überlebt Ablegen, Relog, Resource-Restart und Tod. Der
|
||||||
|
Füllstand ist als Balken direkt im Inventar-Slot sichtbar.
|
||||||
|
- **Gesyncte Tauchlampe** — an der Ausrüstung, An/Aus per Taste (Standard `L`).
|
||||||
|
Andere Spieler sehen den Lichtkegel.
|
||||||
|
- **NUI-HUD** — Restluft als Ring mit `mm:ss` und Tauchtiefe in Metern, mit
|
||||||
|
Warnstufen. Nur sichtbar mit angelegter Ausrüstung unter Wasser.
|
||||||
|
- **Tiefenabhängiger Verbrauch** — tiefer tauchen kostet mehr Luft. Abschaltbar.
|
||||||
|
- **Ausrüstung bleibt** — bei Emotes, Ragdoll, Kleiderwechsel und aufräumenden
|
||||||
|
Fremd-Scripts.
|
||||||
|
- **Serverseitige Prüfung** — die Restluft kann nur sinken, und nicht schneller
|
||||||
|
als physikalisch möglich.
|
||||||
|
|
||||||
# Features
|
## Abhängigkeiten
|
||||||
|
|
||||||
- Able to set the length of time an air tank will refill your tank
|
`qbx_core` · `ox_lib` · `ox_inventory`
|
||||||
- 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
|
## Installation
|
||||||
|
|
||||||
Place these items in ox_inventory's item.lua if you don't have them already:
|
1. Resource nach `resources/` und in der `server.cfg` starten.
|
||||||
|
2. Die Einträge aus [`items_for_ox_inventory.lua`](items_for_ox_inventory.lua) in
|
||||||
|
`ox_inventory/data/items.lua` kopieren.
|
||||||
|
3. Item-Icons nach `cdn.d4rkst3r.de/items/` legen (`diving_gear.png`,
|
||||||
|
`diving_fill.png`, `diving_tank_small.png` … `diving_tank_xl.png`).
|
||||||
|
|
||||||
```
|
## Bedienung
|
||||||
['diving_fill'] = {
|
|
||||||
label = 'Diving Tube',
|
|
||||||
weight = 3000,
|
|
||||||
stack = false,
|
|
||||||
close = true,
|
|
||||||
description = "used to refill your diving gear's oxygen supply."
|
|
||||||
},
|
|
||||||
|
|
||||||
['diving_gear'] = {
|
| Aktion | Wie |
|
||||||
label = 'Diving Gear',
|
|---|---|
|
||||||
weight = 30000,
|
| Ausrüstung an-/ausziehen | `diving_gear` benutzen |
|
||||||
stack = false,
|
| Flasche wählen | Menü beim Anlegen (entfällt bei nur einer Flasche) |
|
||||||
close = true,
|
| Flasche auffüllen | `diving_fill` benutzen, nicht unter Wasser |
|
||||||
description = "A diving set that let's swim underwater. Blub blub!"
|
| Lampe an/aus | `L` (in den FiveM-Tastenbelegungen umlegbar) |
|
||||||
},
|
|
||||||
|
|
||||||
|
## Konfiguration
|
||||||
|
|
||||||
|
| Datei | Inhalt |
|
||||||
|
|---|---|
|
||||||
|
| [`config/client.lua`](config/client.lua) | Timings, Verbrauch, Tiefe, HUD, Lampe |
|
||||||
|
| [`config/shared.lua`](config/shared.lua) | Flaschen und ihre Laufzeit, Sync-Intervall, Anti-Cheat-Grenze |
|
||||||
|
|
||||||
|
Laufzeiten ändert man über `capacity` (Sekunden) in `config/shared.lua`. Wer den
|
||||||
|
Tiefenfaktor (`maxDecayFactor`) hochdreht, muss `maxDrainPerSecond` mitziehen —
|
||||||
|
sonst schreibt der Server ehrlichen Spielern in großer Tiefe Luft zurück.
|
||||||
|
|
||||||
|
## Entwicklung
|
||||||
|
|
||||||
|
```bash
|
||||||
|
node ../.tools/lint.mjs # Lua-Lint (CfxLua-tauglich)
|
||||||
|
node ../.tools/nui-preview.mjs nui # HUD im Browser anschauen
|
||||||
```
|
```
|
||||||
|
|
||||||
# ox_inventory images
|
Der Umbau ist in [PLAN.md](PLAN.md) dokumentiert, inklusive der offenen Punkte.
|
||||||
|
|
||||||
Missing images for your items? Here are some free-to-use images!
|
## Lizenz
|
||||||
|
|
||||||

|
GPL-3.0, wie das Original. Upstream-Historie ist erhalten und liegt auf dem
|
||||||

|
Remote `upstream`.
|
||||||
|
|||||||
Reference in New Issue
Block a user