Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
loeasy68
GitHub Repository: loeasy68/loeasy68.github.io
Path: blob/main/website/GAUSS/js/inventory-manager.js
2941 views
1
var InventoryItem = function(id)
2
{
3
this.id = id;
4
this.anim = null;
5
this.description = '';
6
};
7
8
var editorInvItemList = [];
9
var editorMapIdInvItem = {};
10
var editorInvItemCount = 0;
11
12
var createNewInvItem = function(id)
13
{
14
var newInvItem = new InventoryItem(id);
15
editorInvItemList.push(newInvItem);
16
editorMapIdInvItem[newInvItem.id] = newInvItem;
17
};
18
19
var deleteInvItem = function(id)
20
{
21
var invItem = editorMapIdInvItem[id];
22
editorInvItemList.splice(editorInvItemList.indexOf(invItem), 1);
23
delete editorMapIdInvItem[id];
24
};
25