Files
assaultcube-/config/scontext.cfg
T
ac-stef 2f99b368f0 allow mnemonics for execution context levels
scriptcontext and isolatecontext now allow plain text mnemonics for
context level arguments (one of CORE, CFG, PROMPT, MAPCFG, MDLCFG)

also:

- cleanup (some dead code and dead prototypes removed)
- some stuff renamed
- script errors now show context levels
- conc is no longer thread-safe (but slightly faster)

DOCREF scriptcontext isolatecontext
2017-05-18 16:19:01 +02:00

32 lines
1.1 KiB
INI

// define script security contexts to restrict commands to certain contexts
// do NOT modify
// supported contexts: CORE (hardcoded scripts), CFG (known scripts), PROMPT (command prompt),
// MAPCFG (map config files, we don't trust them), MDLCFG (model config files, same)
// set allowed commands for the map config context
looplist [
loadnotexture loadsky fog fogcolour watercolour shadowyaw
mapmodelreset mapmodel texturereset texture mapsoundreset mapsound
] s [
scriptcontext MAPCFG $s
]
looplist [
md2anim md2emit md2tag
md3anim md3emit md3link md3load md3skin
mdlalphatest mdlalphablend mdlcachelimit mdlcullface mdlscale mdlshadowdist mdltrans mdltranslucent mdlvertexlight mdlattribute
] s [
scriptcontext MDLCFG $s
]
// isolate the map config context
// this disables access from this context to identifiers located in other contexts
// also it removes all aliases created in this context once the running context changes
isolatecontext MAPCFG
isolatecontext MDLCFG
// secure this configuration for the rest of the game
sealcontexts