little cleanup

This commit is contained in:
Olivier Gagnon
2021-06-16 02:26:10 -04:00
parent 99b8dfa0c1
commit 43d0fcb9f9
6 changed files with 28 additions and 528 deletions

View File

@@ -3741,7 +3741,7 @@ function NetscriptFunctions(workerScript) {
getEquipmentNames: function() {
updateDynamicRam("getEquipmentNames", getRamCost("gang", "getEquipmentNames"));
checkGangApiAccess("getEquipmentNames");
return Player.gang.getAllUpgradeNames();
return Object.keys(GangMemberUpgrades);
},
getEquipmentCost: function(equipName) {
updateDynamicRam("getEquipmentCost", getRamCost("gang", "getEquipmentCost"));
@@ -3751,7 +3751,9 @@ function NetscriptFunctions(workerScript) {
getEquipmentType: function(equipName) {
updateDynamicRam("getEquipmentType", getRamCost("gang", "getEquipmentType"));
checkGangApiAccess("getEquipmentType");
return Player.gang.getUpgradeType(equipName);
const upg = GangMemberUpgrades[equipName];
if (upg == null) return "";
return upg.getType();
},
getEquipmentStats: function(equipName) {
updateDynamicRam("getEquipmentStats", getRamCost("gang", "getEquipmentStats"));