48 using ChangeFunc = void(*)(uint64_t entityId,
const char* path,
const char* oldText,
const char* newText);
53 using RevertFunc = void(*)(uint64_t entityId,
const char* path);
C# backend for the Nebula scripting subsystem.
Definition nsharpserver.h:31
The level formats' contribution for managed properties.
Definition propertyextension.h:43
static void TextRefs(const char *text, Util::Array< Game::TextRef > &out)
the entity references a text names, as the paths this extension names its fields by.
Definition propertyextension.cc:397
static void * defaultPropertyJson
Definition propertyextension.h:146
static void RecordChange(Game::Entity entity, const char *path, const char *oldText, const char *newText)
the change the managed write path reported.
Definition propertyextension.cc:536
static void SetRefContext(const char *pairs)
the file's guid map, as "guid:entityId" pairs.
Definition propertyextension.cc:381
static RevertFunc revertCallback
Definition propertyextension.h:157
void(*)(uint64_t entityId, const char *path, const char *oldText, const char *newText) ChangeFunc
what an editor hands the extension when it attaches.
Definition propertyextension.h:48
static void RequestRevert(Game::Entity entity, const char *path)
the key the managed side pressed the override marker on.
Definition propertyextension.cc:551
static const Util::Array< Util::String > & PropertyNames()
Definition propertyextension.cc:601
static bool HasProperty(Game::Entity entity, const char *propertyName)
true when the entity has the property, which is what makes a dropdown row read as already added
Definition propertyextension.cc:612
static void * jsonKeys
Definition propertyextension.h:148
void(*)(uint64_t entityId, const char *path) RevertFunc
what an editor hands the extension for a revert request.
Definition propertyextension.h:53
static void SetChangeCallback(ChangeFunc func)
An editor attaches itself here.
Definition propertyextension.cc:116
static void CaptureKeys(Game::Entity entity, const Util::Array< Util::String > &keys, Util::String &out)
the json for one entity with only the named keys, which is what a linked entity writes
Definition propertyextension.cc:206
static void SetRevertCallback(RevertFunc func)
An editor attaches itself here.
Definition propertyextension.cc:127
static void * remapRefs
Definition propertyextension.h:153
static void Merge(const char *base, const char *over, Util::String &out)
what the base text gives when the keys the other text carries are put over it
Definition propertyextension.cc:299
static void Capture(Game::Entity entity, Util::String &out)
the json for one entity, as the managed runtime produces it
Definition propertyextension.cc:159
static void Remap(const char *text, const char *pairs, Util::String &out)
the text with the named paths' references put as the given guids, as "path\tguid" pairs
Definition propertyextension.cc:465
static ChangeFunc changeCallback
Definition propertyextension.h:156
static void * mergeJson
Definition propertyextension.h:149
static void Register(Scripting::NSharpServer *server, Scripting::AssemblyId assemblyId)
resolve the managed entry points and register the extension with the level formats
Definition propertyextension.cc:56
static void * serializeKeys
Definition propertyextension.h:147
static Util::Array< Util::String > names
Definition propertyextension.h:171
static void * hasProperty
Definition propertyextension.h:145
static void * textRefs
Definition propertyextension.h:152
bool(*)(uint64_t entityId, const char *path) AuthoredFunc
what an editor hands the extension for the override marker.
Definition propertyextension.h:59
static void AddPropertyName(const char *propertyName)
One of the names the editor's dropdown lists.
Definition propertyextension.cc:580
static void * serializeProperties
Definition propertyextension.h:142
static Util::StringAtom ExtensionName()
the name the extension registered under, which is what the editor's override marker is keyed by
Definition propertyextension.cc:147
static void ClearPropertyNames()
Definition propertyextension.cc:592
static void * setRefContext
Definition propertyextension.h:151
static void TextKeys(const char *text, Util::Array< Util::String > &out)
the keys a text carries, as the paths this extension names them by
Definition propertyextension.cc:248
static void * applyProperties
Definition propertyextension.h:143
static void * drawProperties
Definition propertyextension.h:144
static void SetAuthoredCallback(AuthoredFunc func)
An editor attaches itself here.
Definition propertyextension.cc:138
static Util::StringAtom extensionName
Definition propertyextension.h:165
static AuthoredFunc authoredCallback
Definition propertyextension.h:158
static bool registered
Definition propertyextension.h:162
static void * resolveJson
Definition propertyextension.h:150
static bool IsAuthored(Game::Entity entity, const char *path)
whether the editor's marker says this entity authored the path.
Definition propertyextension.cc:566
static Util::Array< char > buffer
Definition propertyextension.h:168
static void Draw(Game::Entity entity)
the property section, drawn by the managed side through the editor's ImGui surface.
Definition propertyextension.cc:517
static void Apply(Game::Entity entity, const char *json)
one entity, put back from the json the file carried for it
Definition propertyextension.cc:190
static void * clearWorldMirror
Definition propertyextension.h:154
static void ClearMirror(uint32_t worldId)
the mirror this extension keeps of a world, dropped.
Definition propertyextension.cc:502
static void Resolve(const char *base, const Util::Array< Util::String > &keys, Util::String &out)
the text for the named keys, each value read from the base text, or the field's default when the base...
Definition propertyextension.cc:336
static void DefaultPropertyJson(const char *propertyName, Util::String &out)
the text a default instance of the property produces, which is what an add writes
Definition propertyextension.cc:627
Nebula's dynamic array class.
Definition array.h:61
A StringAtom.
Definition stringatom.h:22
Nebula's universal string class.
Definition string.h:50
An entity is essentially just an Id with some utility functions attached.
Definition entity.h:35
Definition assemblyid.h:12