MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / ASReadItem

Function ASReadItem

Source/Scripting/angelscript/asfuncs.cpp:3107–3113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3105}
3106
3107ItemObject* ASReadItem(int which) {
3108 if (which < 0 || which >= (int)the_scenegraph->item_objects_.size()) {
3109 std::string callstack = active_context_stack.top()->GetCallstack();
3110 FatalError("Error", "There is no item object %d\n Called from:\n%s", which, callstack.c_str());
3111 }
3112 return (ItemObject*)the_scenegraph->item_objects_[which];
3113}
3114
3115ItemObject* ASReadItemID(int which) {
3116 Object* obj = the_scenegraph->GetObjectFromID(which);

Callers

nothing calls this directly

Calls 5

GetCallstackMethod · 0.80
topMethod · 0.80
FatalErrorFunction · 0.50
sizeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected