Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🗑️ Add opt-in deletion of seasonal junk untradables #1049

Merged
merged 6 commits into from
May 20, 2022

Conversation

carloslbello
Copy link
Collaborator

Only deletes these untradable items:
Noise Maker - TF Birthday
Party Hat
Spirit of Giving
Soul Gargoyle

@idinium96
Copy link
Member

Sorry for the late response, and thank you for the PR.
Nice feature, I will have a look soon.

@idinium96
Copy link
Member

idinium96 commented Apr 6, 2022

Also, since you're adding a new option, please add that new option key here:

miscSettings: {
type: 'object',
properties: {
showOnlyMetal: {
$ref: '#/definitions/only-enable'
},
sortInventory: {
type: 'object',
properties: {
enable: {
type: 'boolean'
},
type: {
anyOf: [
{
// 1 - by name, 2 - by defindex, 3 - by rarity, 4 - by type, 5 - by date
minimum: 1,
maximum: 5
},
{
const: 101 // by class
},
{
const: 102 // by slot
}
]
}
},
required: ['enable', 'type'],
additionalProperties: false
},
createListings: {
$ref: '#/definitions/only-enable'
},
addFriends: {
$ref: '#/definitions/only-enable'
},
sendGroupInvite: {
$ref: '#/definitions/only-enable'
},
autobump: {
$ref: '#/definitions/only-enable'
},
counterOffer: {
type: 'object',
properties: {
enable: {
type: 'boolean'
},
skipIncludeMessage: {
type: 'boolean'
}
},
required: ['enable', 'skipIncludeMessage'],
additionalProperties: false
},
skipItemsInTrade: {
$ref: '#/definitions/only-enable'
},
weaponsAsCurrency: {
type: 'object',
properties: {
enable: {
type: 'boolean'
},
withUncraft: {
type: 'boolean'
}
},
required: ['enable', 'withUncraft'],
additionalProperties: false
},
checkUses: {
type: 'object',
properties: {
duel: {
type: 'boolean'
},
noiseMaker: {
type: 'boolean'
}
},
required: ['duel', 'noiseMaker'],
additionalProperties: false
},
game: {
type: 'object',
properties: {
playOnlyTF2: {
type: 'boolean'
},
customName: {
type: 'string',
maxLength: 60
}
},
required: ['playOnlyTF2', 'customName'],
additionalProperties: false
},
alwaysRemoveItemAttributes: {
type: 'object',
properties: {
customTexture: {
$ref: '#/definitions/only-enable'
}
// giftedByTag: {
// $ref: '#/definitions/only-enable'
// }
},
required: ['customTexture'], // 'giftedByTag'
additionalProperties: false
}
},
required: [
'showOnlyMetal',
'sortInventory',
'createListings',
'addFriends',
'sendGroupInvite',
'autobump',
'counterOffer',
'skipItemsInTrade',
'weaponsAsCurrency',
'checkUses',
'game',
'alwaysRemoveItemAttributes'
],
additionalProperties: false
},

It should be something like this:

                deleteUntradableJunk: {
                    $ref: '#/definitions/only-enable'
                }

put this after line 433 (don't forget to put a comma before adding the new key), and then add a new element in the required array.

@carloslbello
Copy link
Collaborator Author

Sorry I took so long to get back to this. I've updated the options schema definition file with that information.

@idinium96 idinium96 merged commit 28207aa into TF2Autobot:development May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants