Exports ​
All current exports accept a player server id unless noted. They operate on online players; offline character lookups are not implemented.
| Export | Result |
|---|---|
getState(src) |
{ stage, blood, pain, bleeding, since, vitals } or nil |
isDowned(src) |
boolean |
isDead(src) |
boolean |
getInjuries(src) |
Injury list or an empty list |
can(src, featureId, opts?) |
Feature authorization result from np_jobs / fallback resolver |
getFeatureConfig(src, featureId) |
Resolved job feature config or nil |
isOnDuty(src) |
Whether the host reports the player on duty |
revive(src, opts?) |
boolean; opts may include by and reason |
heal(src, opts?) |
boolean; opts include injuries, blood, pain |
getPatientSummary(src) |
Alias for getState(src) |
getConsent(citizenId) |
Stored consent profile |
setMdtConsent(citizenId, value) |
Stores MDT consent and returns success |
Use server exports for admin and resource integrations. Client events do not grant permission to revive or change another player's state.
Addon host ​
np_medic is an np_addon host with API level 1 (npAddon.host({ api = 1, label = 'Medical' }) on the server and
the client; the server calls npAddon.ready() at the end of its boot). An addon declares np_addon 'np_medic' in its
manifest and runs npAddon.attach('np_medic', fn, { api = 1 }); fn runs again after every np_medic restart. See
Addons.
API level 1 offers:
| Surface | Side | Use |
|---|---|---|
exports.np_medic:can(src, featureId) |
server | The feature check: np_jobs, or np_medic's fallback jobs without np_jobs |
np_medic:notify { text, kind } |
client event | A player message in np_medic's style (its notification bridge) |
Treatment prop lists in config/medic/props.lua |
config | May name models streamed by an addon |
Addons today: np_medic_field (field camp: tents, labels, doors, templates, field equipment).