Compare commits
No commits in common. "652bd5fe1a03eb26a8ba8ad7169a5b078e51a06b" and "88221039bb0d2aabbb1c23c216422f2f7046d9e3" have entirely different histories.
652bd5fe1a
...
88221039bb
@ -32,18 +32,15 @@ void RefreshBlocks() {
|
||||
auto pluginmaptype = cast<CGameEditorPluginMapMapType>(cast<CGameCtnEditorFree>(GetApp().Editor).PluginMapType);
|
||||
|
||||
for(uint i = 0; i < blocks.Length; i++) {
|
||||
string blockname = blocks[i].BlockModel.IdName;
|
||||
int fallbacksize = 0;
|
||||
int idifexist = -1;
|
||||
string blockname;
|
||||
bool isofficial = true;
|
||||
blockname = blocks[i].BlockModel.IdName;
|
||||
if (blockname.ToLower().SubStr(blockname.Length - 22, 22) == ".block.gbx_customblock") {
|
||||
isofficial = false;
|
||||
blockname = blockname.SubStr(0, blockname.Length - 12);
|
||||
|
||||
auto article = cast<CGameCtnArticle>(blocks[i].BlockInfo.ArticlePtr);
|
||||
fallbacksize = article.BlockItem_ItemModelArticle.CollectorFid.ByteSize;
|
||||
}
|
||||
|
||||
|
||||
if (include_default_objects || blockname.ToLower().SubStr(blockname.Length - 10, 10) == ".block.gbx") {
|
||||
vec3 pos;
|
||||
if (blocks[i].CoordX != 4294967295 && blocks[i].CoordZ != 4294967295) { // Not placed in free mapping
|
||||
@ -70,7 +67,7 @@ void RefreshBlocks() {
|
||||
objects[index].positions.InsertLast(pos);
|
||||
} else {
|
||||
int trigger = blocks[i].BlockModel.EdWaypointType;
|
||||
AddNewObject(blockname, trigger, "Block", pos, fallbacksize, isofficial);
|
||||
AddNewObject(blockname, trigger, "Block", pos, 0, isofficial);
|
||||
objectsindex.InsertLast(blockname);
|
||||
}
|
||||
}
|
||||
@ -87,6 +84,7 @@ void RefreshItems() {
|
||||
// Items
|
||||
auto items = map.AnchoredObjects;
|
||||
for(uint i = 0; i < items.Length; i++) {
|
||||
int idifexist = -1;
|
||||
string itemname = items[i].ItemModel.IdName;
|
||||
int fallbacksize = 0;
|
||||
bool isofficial = true;
|
||||
@ -96,10 +94,11 @@ void RefreshItems() {
|
||||
auto article = cast<CGameCtnArticle>(items[i].ItemModel.ArticlePtr);
|
||||
if (article !is null) {
|
||||
itemname = string(article.PageName) + string(article.Name) + ".Item.Gbx";
|
||||
}
|
||||
} else {
|
||||
auto fid = cast<CSystemFidFile@>(GetFidFromNod(items[i].ItemModel));
|
||||
fallbacksize = fid.ByteSize;
|
||||
}
|
||||
}
|
||||
|
||||
if (include_default_objects || itemname.ToLower().SubStr(itemname.Length - 9, 9) == ".item.gbx") {
|
||||
int index = objectsindex.Find(itemname);
|
||||
|
@ -3,5 +3,5 @@ name = "Blocks & Items Counter"
|
||||
author = "Beu"
|
||||
category = "Map Editor"
|
||||
siteid = 97
|
||||
version = "1.7"
|
||||
version = "1.6"
|
||||
blocks = [ "Plugin_Blocks&ItemsCounter" ]
|
||||
|
Loading…
Reference in New Issue
Block a user