Change guid format of resonator
Change: Guid format of resonator change to following, [portal guid]-resonator-[slot] Some code cleanup
This commit is contained in:
@ -320,7 +320,7 @@ window.renderResonators = function(ent) {
|
|||||||
// replace .11 or .12 in portal guid with .r[slot] to
|
// replace .11 or .12 in portal guid with .r[slot] to
|
||||||
// get guid for resonators
|
// get guid for resonators
|
||||||
window.portalResonatorGuid = function(portalGuid, slot){
|
window.portalResonatorGuid = function(portalGuid, slot){
|
||||||
return portalGuid.slice(0,32) + '.r' + slot;
|
return portalGuid + '-resonator-' + slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.isResonatorsShow = function(){
|
window.isResonatorsShow = function(){
|
||||||
|
@ -148,7 +148,7 @@ window.getTypeByGuid = function(guid) {
|
|||||||
// .c == player/creator
|
// .c == player/creator
|
||||||
// .d == chat messages
|
// .d == chat messages
|
||||||
//
|
//
|
||||||
// .r0~.r7 == resonators
|
// resonator guid is [portal guid]-resonator-[slot]
|
||||||
switch(guid.slice(33)) {
|
switch(guid.slice(33)) {
|
||||||
case '11':
|
case '11':
|
||||||
case '12':
|
case '12':
|
||||||
@ -166,17 +166,8 @@ window.getTypeByGuid = function(guid) {
|
|||||||
case 'd':
|
case 'd':
|
||||||
return TYPE_CHAT;
|
return TYPE_CHAT;
|
||||||
|
|
||||||
case 'r0':
|
|
||||||
case 'r1':
|
|
||||||
case 'r2':
|
|
||||||
case 'r3':
|
|
||||||
case 'r4':
|
|
||||||
case 'r5':
|
|
||||||
case 'r6':
|
|
||||||
case 'r7':
|
|
||||||
return TYPE_RESONATOR;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
if(guid.slice(-11,-2) == 'resonator') return TYPE_RESONATOR;
|
||||||
return TYPE_UNKNOWN;
|
return TYPE_UNKNOWN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user