Add admin-controlled self epinephrine for unconscious players

This commit is contained in:
2026-10-15 12:39:19 +02:00
parent 3b920e0715
commit 0a7102cd51
19 changed files with 346 additions and 22 deletions
+6
View File
@@ -33,6 +33,12 @@ Native reconnect reservation and handoff remain separate from new-character admi
Enabled retains the actual held firearm, including its magazine and attachments, and selects it again after revival. It never creates a replacement or takes a gun acquired by another inventory. Disabled allows the normal ground drop. Grenades, gadgets and mounted weapons are excluded. The native test verifies inventory retention and the same rifle in hand after waking; it does not qualify the unconscious ragdoll's hand pose. Revival inside a vehicle leaves the gun in inventory rather than forcing an equip animation.
## Optional self epinephrine
**Esc → Co10 Escape Reintroduced → Mission → Self epinephrine (Space)** lets administrators enable self-injection. It defaults to Disabled, including when loading older settings files. `/esc mission selfepi set 1` or `0` changes the same saved preference immediately, including for existing casualties.
When enabled, an unconscious prisoner can press and release **Space** to consume one epinephrine injector from their own inventory. Standard epinephrine is preferred when usable; combat epinephrine is also supported. Each retains its normal medical effect: standard epinephrine restores resilience over time and cannot replace lost blood or stop bleeding. No injector is supplied automatically, and a genuinely dead body cannot use this action. The casualty hint explains the shortcut while enabled. Keys held during knockout, chat or menus must be released before a fresh press can inject.
## Placement
Prison placement searches a 4×4 lattice with axis coordinates -4.5, -1.5, 1.5 and 4.5m relative to the authored center. The four inner positions are checked first, then eight edge positions, then four corners. Neighboring centers are 3m apart and remain 1.5m inside walls positioned at ±6m. The inner and edge positions are within 5m of the prison center. Terrain height and slope, physical scene/character occupancy, and pending reservations can reject a slot. Connection IDs 1 and 13 receive no special or shared position. Disconnected physical bodies still obstruct the native query.