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

New plugin: Import Keys #294

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions build.py
Expand Up @@ -211,6 +211,13 @@ def saveScriptAndMeta(script,fn,metafn):
metafn = fn.replace('.user.js', '.meta.js')
saveScriptAndMeta(script, os.path.join(outDir,fn), os.path.join(outDir,metafn))

# compile the key import injection script
fn = "plugins/keys-import-inject.js"
script = readfile(fn)
script = doReplacements(script, '', '')
with io.open(os.path.join(outDir, fn), 'w', encoding='utf8') as f:
f.write(script)

# copy the IITC script into the mobile folder. create the folder if needed
try:
os.makedirs("mobile/assets")
Expand Down
2 changes: 1 addition & 1 deletion buildsettings.py
Expand Up @@ -5,7 +5,7 @@
# possible fields:
# resourceBaseUrl - optional - the URL base for external resources (all resources embedded in standard IITC)
# distUrlBase - optional - the base URL to use for update checks
# buildMobild - optional - if set, mobild builds are built with 'ant'. requires the Android SDK and appropriate mobile/local.properties file configured
# buildMobile - optional - if set, mobild builds are built with 'ant'. requires the Android SDK and appropriate mobile/local.properties file configured
# preBuild - optional - an array of strings to run as commands, via os.system, before building the scripts
# postBuild - optional - an array of string to run as commands, via os.system, after all builds are complete

Expand Down
331 changes: 331 additions & 0 deletions json_examples/handshake.js
@@ -0,0 +1,331 @@
{
"result": {
"canPlay": true,
"initialKnobs": {
"bundleMap": {
"ClientFeatureKnobs": {
"enableEmbeddedYouTubePlayback": true,
"enableGAViolationReporting": false,
"enableMultiPhotoUi": true,
"enableParticleFilter": true,
"enableRecycle": true,
"portalKeyCardRefreshIntervalSecs": 5
},
"InventoryKnobs": {
"maxInventoryItems": 2000,
"useLimit": true,
"useMax": false
},
"LinkAmplificationSharedKnobs": {
"multiLinkAmplifierDiminishingValues": [
1000,
1250,
1375,
1500
]
},
"ModifiedEntitiesKnobBundle": {
"maxEntitiesPerRequest": "100"
},
"PortalDiscoveryKnobBundle": {
"enableEdit": true,
"enablePortalDiscovery": true,
"enableResumableUpload": true,
"resumableUploadSizeBytes": 33554432,
"scalePrecisely": false,
"thumbnailCompression": 85,
"thumbnailSize": 1280
},
"PortalKnobs": {
"maxResonatorsPerPlayer": 8,
"resonatorLimits": {
"bands": [
{
"applicableLevels": [
1
],
"remaining": 8
},
{
"applicableLevels": [
2
],
"remaining": 4
},
{
"applicableLevels": [
3
],
"remaining": 4
},
{
"applicableLevels": [
4
],
"remaining": 4
},
{
"applicableLevels": [
5
],
"remaining": 2
},
{
"applicableLevels": [
6
],
"remaining": 2
},
{
"applicableLevels": [
7
],
"remaining": 1
},
{
"applicableLevels": [
8
],
"remaining": 1
}
]
}
},
"PowerCubeSharedKnobs": {
"rechargeEnergies": [
1000,
2000,
3000,
4000,
5000,
6000,
7000,
8000
]
},
"ScannerKnobs": {
"rangeM": 300,
"updateDistanceM": 10,
"updateIntervalMs": 30000
},
"WeaponRangeKnobs": {
"damageRangeMap": {
"1": 42,
"2": 48,
"3": 58,
"4": 72,
"5": 90,
"6": 112,
"7": 138,
"8": 168
}
},
"XmCostKnobs": {
"flipCardCostByLevel": [
1000,
2000,
3000,
4000,
5000,
6000,
7000,
8000
],
"linkAmplifierDeployCostByLevel": [
0,
0,
0,
0,
0,
0,
0,
0
],
"portalHackEnemyCostByLevel": [
50,
100,
150,
200,
250,
300,
350,
400
],
"portalHackFriendlyCostByLevel": [
50,
100,
150,
200,
250,
300,
350,
400
],
"portalHackNeutralCostByLevel": [
50,
100,
150,
200,
250,
300,
350,
400
],
"resonatorDeployCostByLevel": [
50,
100,
150,
200,
250,
300,
350,
400
],
"resonatorUpgradeCostByLevel": [
50,
100,
150,
200,
250,
300,
350,
400
],
"shieldDeployCostByLevel": [
200,
400,
600,
800,
1000,
1200,
1400,
1600
],
"xmpFiringCostByLevel": [
10,
20,
70,
140,
250,
360,
490,
640
]
},
"recycleKnobs": {
"recycleValuesMap": {
"EMITTER_A": [
20,
40,
60,
80,
100,
120,
140,
160
],
"EMP_BURSTER": [
20,
40,
60,
80,
100,
120,
140,
160
],
"MEDIA": [
20,
40,
60,
80,
100,
120,
140,
160
],
"PORTAL_LINK_KEY": [
20,
40,
60,
80,
100,
120,
140,
160
],
"POWER_CUBE": [
20,
40,
60,
80,
100,
120,
140,
160
],
"RES_SHIELD": [
20,
40,
60,
80,
100,
120,
140,
160
]
}
}
},
"syncTimestamp": "1368944068748"
},
"nickname": "EggSaladSandwch",
"playerEntity": [
"c1aab7d2c1fb4ed88273e49db2c458e2.c",
1368921016390,
{
"controllingTeam": {
"team": "RESISTANCE"
},
"playerPersonal": {
"allowFactionChoice": false,
"allowNicknameEdit": false,
"ap": "35042",
"clientLevel": 11,
"energy": 4709,
"energyState": "XM_OK",
"mediaHighWaterMarks": {
"General": 69
},
"notificationSettings": {
"maySendPromoEmail": true,
"shouldPushNotifyForAtPlayer": true,
"shouldPushNotifyForPortalAttacks": true,
"shouldSendEmail": true
}
}
}
],
"pregameStatus": {
"action": "NO_ACTIONS_REQUIRED",
"dialogText": ""
},
"serverVersion": "2013-05-17T16:46:39Z d5441a0cd99d opt",
"storage": {
"game_intro_has_played": "true:delim:1358355186416:delim:true",
"mission_complete_0": "SUCCESS:delim:1358390888593:delim:true",
"mission_complete_1": "SUCCESS:delim:1358390980065:delim:true",
"mission_complete_2": "SUCCESS:delim:1358391021379:delim:true",
"mission_complete_3": "SUCCESS:delim:1358391052799:delim:true",
"mission_complete_4": "SUCCESS:delim:1358381478295:delim:true",
"mission_complete_5": "SUCCESS:delim:1358391445303:delim:true",
"mission_complete_6": "SUCCESS:delim:1358391568761:delim:true",
"mission_complete_7": "SUCCESS:delim:1358391728537:delim:true",
"second_training_portal_lat_degrees": "-93.32663:delim:1358391608604:delim:true",
"training_portal_lat_degrees": "44.948536:delim:1358390926343:delim:true",
"training_portal_lng_degrees": "-93.32621:delim:1358390926365:delim:true"
},
"versionMatch": "CURRENT",
"xsrfToken": "G0yCiKre5YnSYCRhhbl_pJlkTS8:1368944078749"
}
}