Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.96 KB | None | 0 0
  1. (function()
  2. local L1_0
  3. function L1_0(A0_1)
  4. local L1_2, L2_3
  5. L1_2 = {}
  6. L2_3 = characterDialog
  7. L2_3 = L2_3.startDialog
  8. L2_3 = L2_3(L2_3, A0_1)
  9. if L2_3 == nil then
  10. L1_2[1] = {
  11. type = "SubjectPage",
  12. dialog = "MISSING TEXT: \"" .. A0_1 .. "\"",
  13. subject = {}
  14. }
  15. else
  16. repeat
  17. table.insert(L1_2, {
  18. type = "SubjectPage",
  19. dialog = L2_3.text,
  20. subject = {
  21. type = L2_3.portraitSprite,
  22. state = L2_3.portraitAnimation
  23. },
  24. imageCode = L2_3.imageCode
  25. })
  26. L2_3 = characterDialog:nextDialog()
  27. until L2_3 == nil
  28. end
  29. return L1_2
  30. end
  31. Storyteller_getPages = L1_0
  32. end)()
  33. ;(function()
  34. local L1_4
  35. function L1_4(A0_5, A1_6, A2_7, A3_8)
  36. local L4_9, L5_10, L6_11, L7_12, L8_13, L9_14, L10_15, L11_16, L12_17, L13_18, L14_19, L15_20, L16_21, L17_22, L18_23, L19_24, L20_25, L21_26, L22_27, L23_28, L24_29, L25_30, L26_31
  37. L4_9 = {
  38. L5_10,
  39. L6_11,
  40. L7_12,
  41. L8_13,
  42. [23] = L9_14(L10_15, L11_16)
  43. }
  44. L5_10 = cutscenes
  45. L6_11 = L5_10
  46. L5_10 = L5_10.createThread
  47. L7_12 = "StoryTeller_1"
  48. L5_10 = L5_10(L6_11, L7_12)
  49. L6_11 = cutscenes
  50. L7_12 = L6_11
  51. L6_11 = L6_11.createThread
  52. L8_13 = "StoryTeller_2"
  53. L6_11 = L6_11(L7_12, L8_13)
  54. L7_12 = cutscenes
  55. L8_13 = L7_12
  56. L7_12 = L7_12.createThread
  57. L9_14 = "StoryTeller_3"
  58. L7_12 = L7_12(L8_13, L9_14)
  59. L8_13 = cutscenes
  60. L9_14 = L8_13
  61. L8_13 = L8_13.createThread
  62. L10_15 = "StoryTeller_4"
  63. L8_13 = L8_13(L9_14, L10_15)
  64. L9_14 = cutscenes
  65. L10_15 = L9_14
  66. L9_14 = L9_14.createThread
  67. L11_16 = "StoryTeller_5"
  68. L26_31 = L9_14(L10_15, L11_16)
  69. ;({
  70. L5_10,
  71. L6_11,
  72. L7_12,
  73. L8_13,
  74. [23] = L9_14(L10_15, L11_16)
  75. })[5] = L9_14
  76. ;({
  77. L5_10,
  78. L6_11,
  79. L7_12,
  80. L8_13,
  81. [23] = L9_14(L10_15, L11_16)
  82. })[6] = L10_15
  83. ;({
  84. L5_10,
  85. L6_11,
  86. L7_12,
  87. L8_13,
  88. [23] = L9_14(L10_15, L11_16)
  89. })[7] = L11_16
  90. ;({
  91. L5_10,
  92. L6_11,
  93. L7_12,
  94. L8_13,
  95. [23] = L9_14(L10_15, L11_16)
  96. })[8] = L12_17
  97. ;({
  98. L5_10,
  99. L6_11,
  100. L7_12,
  101. L8_13,
  102. [23] = L9_14(L10_15, L11_16)
  103. })[9] = L13_18
  104. ;({
  105. L5_10,
  106. L6_11,
  107. L7_12,
  108. L8_13,
  109. [23] = L9_14(L10_15, L11_16)
  110. })[10] = L14_19
  111. ;({
  112. L5_10,
  113. L6_11,
  114. L7_12,
  115. L8_13,
  116. [23] = L9_14(L10_15, L11_16)
  117. })[11] = L15_20
  118. ;({
  119. L5_10,
  120. L6_11,
  121. L7_12,
  122. L8_13,
  123. [23] = L9_14(L10_15, L11_16)
  124. })[12] = L16_21
  125. ;({
  126. L5_10,
  127. L6_11,
  128. L7_12,
  129. L8_13,
  130. [23] = L9_14(L10_15, L11_16)
  131. })[13] = L17_22
  132. ;({
  133. L5_10,
  134. L6_11,
  135. L7_12,
  136. L8_13,
  137. [23] = L9_14(L10_15, L11_16)
  138. })[14] = L18_23
  139. ;({
  140. L5_10,
  141. L6_11,
  142. L7_12,
  143. L8_13,
  144. [23] = L9_14(L10_15, L11_16)
  145. })[15] = L19_24
  146. ;({
  147. L5_10,
  148. L6_11,
  149. L7_12,
  150. L8_13,
  151. [23] = L9_14(L10_15, L11_16)
  152. })[16] = L20_25
  153. ;({
  154. L5_10,
  155. L6_11,
  156. L7_12,
  157. L8_13,
  158. [23] = L9_14(L10_15, L11_16)
  159. })[17] = L21_26
  160. ;({
  161. L5_10,
  162. L6_11,
  163. L7_12,
  164. L8_13,
  165. [23] = L9_14(L10_15, L11_16)
  166. })[18] = L22_27
  167. ;({
  168. L5_10,
  169. L6_11,
  170. L7_12,
  171. L8_13,
  172. [23] = L9_14(L10_15, L11_16)
  173. })[19] = L23_28
  174. ;({
  175. L5_10,
  176. L6_11,
  177. L7_12,
  178. L8_13,
  179. [23] = L9_14(L10_15, L11_16)
  180. })[20] = L24_29
  181. ;({
  182. L5_10,
  183. L6_11,
  184. L7_12,
  185. L8_13,
  186. [23] = L9_14(L10_15, L11_16)
  187. })[21] = L25_30
  188. ;({
  189. L5_10,
  190. L6_11,
  191. L7_12,
  192. L8_13,
  193. [23] = L9_14(L10_15, L11_16)
  194. })[22] = L26_31
  195. L5_10 = cutscenes
  196. L6_11 = L5_10
  197. L5_10 = L5_10.createThread
  198. L7_12 = "ST_more"
  199. L5_10 = L5_10(L6_11, L7_12)
  200. L6_11, L7_12, L8_13, L9_14, L10_15, L11_16, L12_17, L13_18, L14_19 = nil, nil, nil, nil, nil, nil, nil, nil, nil
  201. L15_20 = {}
  202. L15_20.active = false
  203. L15_20.currentPage = nil
  204. L15_20.showMoreButton = nil
  205. L15_20.moreButtonIsActive = true
  206. L15_20.moreButtonIsPressed = false
  207. L15_20.noTwitter = false
  208. L15_20.noMore = false
  209. L15_20.forceDownArrow = false
  210. L15_20.noBg = false
  211. L15_20.pages = nil
  212. L15_20.removeHashTag = true
  213. L15_20.useAudio = true
  214. L15_20.twitterAnimating = false
  215. L15_20.camZoom = nil
  216. L16_21, L17_22, L18_23, L19_24, L20_25 = nil, nil, nil, nil, nil
  217. if not A3_8 then
  218. L21_26 = Capy
  219. L21_26 = L21_26.Vector3
  220. L22_27 = 0
  221. L23_28 = 50
  222. L24_29 = 0
  223. L21_26 = L21_26(L22_27, L23_28, L24_29)
  224. A3_8 = L21_26
  225. end
  226. L21_26 = convertY_fromTLtoTR
  227. L22_27 = 0
  228. L21_26 = L21_26(L22_27)
  229. L22_27 = convertX_fromTLtoTR
  230. L23_28 = graphics
  231. L24_29 = L23_28
  232. L23_28 = L23_28.getUIScreenWidth
  233. L23_28 = L23_28(L24_29)
  234. L23_28 = L23_28 + 1
  235. L22_27 = L22_27(L23_28)
  236. L23_28 = convertX_fromTLtoTR
  237. L24_29 = 0
  238. L23_28 = L23_28(L24_29)
  239. L24_29 = convertY_fromTLtoTR
  240. L25_30 = graphics
  241. L26_31 = L25_30
  242. L25_30 = L25_30.getUIScreenHeight
  243. L25_30 = L25_30(L26_31)
  244. L25_30 = L25_30 + 1
  245. L24_29 = L24_29(L25_30)
  246. L25_30 = convertX_fromTLtoTR
  247. L26_31 = graphics
  248. L26_31 = L26_31.getUIScreenWidth
  249. L26_31 = L26_31(L26_31)
  250. L26_31 = L26_31 / 2
  251. L25_30 = L25_30(L26_31)
  252. L26_31 = 60
  253. scene.ST_subject:setPosition(L26_31, L25_30, 0)
  254. if localeStrings:getLanguage() == "Japanese" then
  255. scene.ST_textbox:setPosition(100, 240, -5)
  256. scene.ST_tweet:setAnchor(Capy.Vector3(0.735, 0.48, 0))
  257. scene.ST_tweet:setFontScale(0.74)
  258. end
  259. engine:loadSounds("SSS/UI")
  260. engine:loadSounds("SSS/other")
  261. function L15_20.start(A0_32)
  262. local L1_33, L2_34, L3_35, L4_36, L5_37
  263. L1_33 = _UPVALUE0_
  264. L2_34 = L1_33
  265. L1_33 = L1_33.reset
  266. L1_33(L2_34)
  267. L1_33 = print
  268. L2_34 = "Starting story: "
  269. L3_35 = _UPVALUE1_
  270. L2_34 = L2_34 .. L3_35
  271. L1_33(L2_34)
  272. L1_33 = cutscenes
  273. L2_34 = L1_33
  274. L1_33 = L1_33.createThread
  275. L3_35 = "ST_rot"
  276. L4_36 = "rotSubjectRing"
  277. L1_33 = L1_33(L2_34, L3_35, L4_36)
  278. _UPVALUE2_ = L1_33
  279. L1_33 = scene
  280. L1_33 = L1_33.ST_moreTriangle
  281. L2_34 = L1_33
  282. L1_33 = L1_33.setRotation
  283. L3_35 = -90
  284. L1_33(L2_34, L3_35)
  285. L1_33 = _UPVALUE0_
  286. L1_33 = L1_33.noBg
  287. if not L1_33 then
  288. L1_33 = _UPVALUE3_
  289. L1_33 = L1_33[1]
  290. L2_34 = cutscenes
  291. L2_34 = L2_34.ST_slideInBg
  292. L1_33.current = L2_34
  293. else
  294. L1_33 = _UPVALUE3_
  295. L1_33 = L1_33[1]
  296. L2_34 = cutscenes
  297. L2_34 = L2_34.ST_noBg
  298. L1_33.current = L2_34
  299. end
  300. L1_33 = _UPVALUE3_
  301. L1_33 = L1_33[1]
  302. function L2_34()
  303. scene.ST_more.onClick = _UPVALUE0_
  304. scene.ST_more.onClickUp = _UPVALUE1_
  305. scene.ST_tweet.onClick = _UPVALUE2_
  306. _UPVALUE3_[1].current = cutscenes.ST_slideOutLBracket
  307. _UPVALUE3_[1]:addCurrent(cutscenes.ST_slideOutRBracket)
  308. _UPVALUE3_[1].onDead = function()
  309. _UPVALUE0_[1].onDead = nil
  310. _UPVALUE1_:nextPage()
  311. end
  312. end
  313. L1_33.onDead = L2_34
  314. L1_33 = _UPVALUE7_
  315. L1_33 = L1_33()
  316. if L1_33 then
  317. L1_33 = _UPVALUE8_
  318. if L1_33 then
  319. L1_33 = scene
  320. L1_33 = L1_33.ST_camFocus
  321. L2_34 = L1_33
  322. L1_33 = L1_33.setPosition
  323. L3_35 = _UPVALUE7_
  324. L3_35 = L3_35()
  325. L4_36 = L3_35
  326. L3_35 = L3_35.getPosition
  327. L3_35 = L3_35(L4_36)
  328. L4_36 = _UPVALUE9_
  329. L3_35 = L3_35 + L4_36
  330. L1_33(L2_34, L3_35)
  331. L1_33 = _UPVALUE8_
  332. L2_34 = L1_33
  333. L1_33 = L1_33.startCinemaMode
  334. L3_35 = scene
  335. L3_35 = L3_35.ST_camFocus
  336. L4_36 = false
  337. L5_37 = false
  338. L1_33(L2_34, L3_35, L4_36, L5_37)
  339. L1_33 = _UPVALUE0_
  340. L2_34 = _UPVALUE8_
  341. L2_34 = L2_34.zoomLevel
  342. L1_33.camZoom = L2_34
  343. end
  344. end
  345. L1_33 = _UPVALUE0_
  346. L1_33.active = true
  347. L1_33 = _G
  348. L1_33 = L1_33.getStats
  349. L1_33 = L1_33()
  350. L2_34 = L1_33
  351. L1_33 = L1_33.canOpenMegatome
  352. L1_33 = L1_33(L2_34)
  353. if L1_33 == true then
  354. L1_33 = engine
  355. L1_33 = L1_33.sceneName
  356. if L1_33 ~= "archetype" then
  357. L1_33 = engine
  358. L1_33 = L1_33.sceneName
  359. if L1_33 ~= "credits" then
  360. L1_33 = addLogBookEntry
  361. L2_34 = "URSULA"
  362. L3_35 = _UPVALUE1_
  363. L4_36 = false
  364. L1_33(L2_34, L3_35, L4_36)
  365. end
  366. end
  367. end
  368. L1_33 = _UPVALUE0_
  369. L1_33 = L1_33.useAudio
  370. if L1_33 == true then
  371. L1_33 = audio
  372. L2_34 = L1_33
  373. L1_33 = L1_33.playEvent
  374. L3_35 = "SSS/UI/dialogStart"
  375. L1_33(L2_34, L3_35)
  376. L1_33 = audio
  377. L2_34 = L1_33
  378. L1_33 = L1_33.playEvent
  379. L3_35 = "SSS/other/misc/NPCdialogloop"
  380. L1_33 = L1_33(L2_34, L3_35)
  381. _UPVALUE10_ = L1_33
  382. end
  383. L1_33 = _UPVALUE0_
  384. L2_34 = L1_33
  385. L1_33 = L1_33.setupUI
  386. L1_33(L2_34)
  387. L1_33 = 48
  388. L2_34 = convertX_fromTLtoTR
  389. L3_35 = graphics
  390. L4_36 = L3_35
  391. L3_35 = L3_35.getUIScreenWidth
  392. L3_35 = L3_35(L4_36)
  393. L3_35 = L3_35 + 76
  394. L2_34 = L2_34(L3_35)
  395. L3_35 = convertX_fromTLtoTR
  396. L4_36 = graphics
  397. L5_37 = L4_36
  398. L4_36 = L4_36.getUIScreenWidth
  399. L5_37 = L4_36(L5_37)
  400. L3_35 = L3_35(L4_36, L5_37, L4_36(L5_37))
  401. L4_36 = convertX_fromTLtoTR
  402. L5_37 = graphics
  403. L5_37 = L5_37.getUIScreenWidth
  404. L5_37 = L5_37(L5_37)
  405. L5_37 = L5_37 + 108
  406. L4_36 = L4_36(L5_37)
  407. L5_37 = -5
  408. cutscenes.ST_slideInTweet.m.destination:set(L1_33, L3_35, L5_37)
  409. cutscenes.ST_slideInTweet_2.m.destination:set(L1_33, L2_34, L5_37)
  410. cutscenes.ST_slideOutTweet.m.destination:set(L1_33, L2_34, L5_37)
  411. cutscenes.ST_fadeInTweet.m.destination:set(L1_33, L2_34, L5_37)
  412. cutscenes.ST_slideInTweeting.m.destination:set(L1_33, L3_35, L5_37)
  413. cutscenes.ST_fadeOutTweet.m.destination:set(L1_33, L4_36, L5_37)
  414. end
  415. function L15_20.setupUI(A0_38)
  416. hookFunction(engine, "onResolutionChanged", recomputeBoxInfo)
  417. hookFunction(engine, "onOrientationModeChanged", onOrientationModeChanged)
  418. recomputeBoxInfo()
  419. end
  420. function onOrientationModeChanged(A0_39)
  421. if A0_39 == "portrait" then
  422. scene.ST_textbg:setRenderAlpha(0)
  423. else
  424. scene.ST_textbg:setRenderAlpha(1)
  425. end
  426. end
  427. function recomputeBoxInfo()
  428. local L0_40, L1_41
  429. L0_40 = convertX_fromTLtoTR(0)
  430. L1_41 = convertY_fromTLtoTR(-300)
  431. cutscenes.ST_slideInBg.m.destination:set(L1_41, L0_40, 10)
  432. cutscenes.ST_slideOutBg.m.destination:set(L1_41, L0_40, 10)
  433. L1_41 = convertY_fromTLtoTR(-32)
  434. cutscenes.ST_slideInBG2.m.destination:set(L1_41, L0_40, 10)
  435. print("subject recompute box")
  436. end
  437. function L15_20.stop(A0_42)
  438. print("storystop")
  439. if not _UPVALUE0_.noBg then
  440. _UPVALUE1_[3].current = cutscenes.ST_slideOutBg
  441. else
  442. _UPVALUE1_[3].current = cutscenes.ST_noBg
  443. end
  444. _UPVALUE1_[2].onDead = function()
  445. _UPVALUE0_[2].onDead = nil
  446. _UPVALUE0_[5].current = cutscenes.ST_slideInLBracket
  447. _UPVALUE0_[5]:addCurrent(cutscenes.ST_slideInRBracket)
  448. _UPVALUE0_[5]:addCurrent(cutscenes.ST_fadeOutTweet)
  449. end
  450. _UPVALUE1_[3].onDead = function()
  451. _UPVALUE0_.active = false
  452. scene.ST_more.onClick = nil
  453. scene.ST_more.onClickUp = nil
  454. scene.ST_tweet.onClick = nil
  455. _UPVALUE1_[3].onDead = nil
  456. safeCall(_UPVALUE0_.onDone)
  457. _UPVALUE2_:clear()
  458. end
  459. if _UPVALUE3_() ~= nil and _UPVALUE4_ then
  460. _UPVALUE4_:startUserMode()
  461. end
  462. if _UPVALUE5_ then
  463. audio:stopEvent(_UPVALUE5_)
  464. end
  465. end
  466. function L15_20.reset(A0_43)
  467. A0_43.active = false
  468. A0_43.currentPage = nil
  469. A0_43.pages = Storyteller_getPages(_UPVALUE0_)
  470. end
  471. function L15_20.setDialog(A0_44, A1_45)
  472. _UPVALUE0_ = A1_45
  473. _UPVALUE1_:reset()
  474. end
  475. function L15_20.getFocusOffset(A0_46)
  476. local L1_47
  477. L1_47 = _UPVALUE0_
  478. return L1_47
  479. end
  480. function L15_20.setFocusOffset(A0_48, A1_49)
  481. _UPVALUE0_ = A1_49
  482. end
  483. function L15_20.setPage(A0_50, A1_51)
  484. local L2_52, L3_53
  485. L2_52 = _UPVALUE0_
  486. L2_52 = L2_52.currentPage
  487. L3_53 = A1_51
  488. if L2_52 == nil and L3_53 ~= nil and L3_53.type == "SubjectPage" then
  489. _UPVALUE1_(L3_53)
  490. elseif L2_52 ~= nil and L2_52.type == "SubjectPage" and L3_53 ~= nil and L3_53.type == "SubjectPage" then
  491. _UPVALUE2_(L2_52, L3_53)
  492. elseif L2_52 ~= nil and L2_52.type == "SubjectPage" and L3_53 == nil then
  493. _UPVALUE3_(L2_52)
  494. end
  495. _UPVALUE0_.currentPage = L3_53
  496. if not _UPVALUE0_.noTwitter and L3_53 and L3_53.dialog ~= "" then
  497. _UPVALUE4_[4]:addCurrent(cutscenes.ST_fadeInTweet)
  498. else
  499. _UPVALUE4_[4]:addCurrent(cutscenes.ST_fadeOutTweet)
  500. end
  501. if A1_51 == nil then
  502. _UPVALUE0_:stop()
  503. end
  504. end
  505. function L15_20.nextPage(A0_54)
  506. safeCall(_UPVALUE0_.onNextPage)
  507. _UPVALUE0_:setPage(table.remove(A0_54.pages, 1))
  508. end
  509. function L15_20.hasNextPage(A0_55)
  510. local L1_56
  511. L1_56 = A0_55.pages
  512. L1_56 = #L1_56
  513. L1_56 = L1_56 > 0
  514. return L1_56
  515. end
  516. function L15_20.more(A0_57)
  517. if _UPVALUE0_:hasNextPage() then
  518. _UPVALUE0_:nextPage()
  519. else
  520. _UPVALUE0_:setPage(nil)
  521. end
  522. _UPVALUE1_[4]:addCurrent(cutscenes.ST_slideOutTweet)
  523. _UPVALUE2_.current = cutscenes.ST_fadeOutMore
  524. scene.ST_more:unpressed()
  525. _UPVALUE0_.moreButtonIsActive = false
  526. _UPVALUE0_.moreButtonIsPressed = false
  527. end
  528. function L15_20.handleUrsula(A0_58, A1_59)
  529. local L2_60
  530. L2_60 = A1_59.stopUserInteraction
  531. L2_60(A1_59)
  532. L2_60 = ST_UrsulaTalkIdle
  533. L2_60 = L2_60(A1_59)
  534. A1_59:setCustomIdle(L2_60)
  535. if A1_59.currentSpeed == 0 then
  536. L2_60:onStopped()
  537. end
  538. end
  539. function L15_20.unhandleUrsula(A0_61, A1_62)
  540. A1_62:setCustomIdle(nil)
  541. A1_62:startUserInteraction()
  542. end
  543. function L10_15(A0_63)
  544. local L1_64
  545. L1_64 = A0_63.duration
  546. L1_64 = L1_64 or 0.5
  547. timer:setTimeout(_UPVALUE0_.showMoreButton, L1_64)
  548. end
  549. function L15_20.showMoreButton()
  550. if not _UPVALUE0_:hasNextPage() or _UPVALUE0_.forceDownArrow then
  551. scene.ST_moreTriangle:setRotation(0)
  552. scene.ST_more:setSoundEvent("SSS/UI/playButtonDown")
  553. else
  554. scene.ST_more:setSoundEvent("SSS/UI/playButtonNormal")
  555. end
  556. if not _UPVALUE0_.noMore then
  557. _UPVALUE1_.current = cutscenes.ST_fadeInMore
  558. function _UPVALUE1_.onDead()
  559. local L0_65, L1_66
  560. L0_65 = _UPVALUE0_
  561. L0_65.onDead = nil
  562. L0_65 = _UPVALUE1_
  563. L0_65.moreButtonIsActive = true
  564. end
  565. end
  566. end
  567. function L15_20.slideInTweetButton(A0_67)
  568. if _UPVALUE0_.currentPage ~= nil and not _UPVALUE0_.noTwitter then
  569. audio:playEvent("SSS/UI/tweetThisButtonAppears")
  570. _UPVALUE1_[4]:addCurrent(cutscenes.ST_slideInTweet)
  571. end
  572. end
  573. function L11_16()
  574. if _UPVALUE0_.moreButtonIsActive == true then
  575. scene.ST_more:pressed()
  576. _UPVALUE0_.moreButtonIsPressed = true
  577. end
  578. end
  579. function L12_17()
  580. if _UPVALUE0_.moreButtonIsActive == true and _UPVALUE0_.moreButtonIsPressed == true then
  581. _UPVALUE0_:more()
  582. end
  583. end
  584. function L14_19()
  585. local L0_68
  586. L0_68 = scene
  587. L0_68 = L0_68.ST_tweet
  588. L0_68 = L0_68.getAlpha
  589. L0_68 = L0_68(L0_68)
  590. if L0_68 ~= 1 then
  591. return
  592. end
  593. L0_68 = convertX_fromTLtoTR
  594. L0_68 = L0_68(graphics:getUIScreenWidth())
  595. if _UPVALUE0_.currentPage ~= nil and scene.ST_tweet:getPosY() == L0_68 and _UPVALUE0_.twitterAnimating == false then
  596. audio:playEvent("SSS/Gourd/pressTweetThisButton")
  597. if not engine:isLoggedInSocial() then
  598. _UPVALUE0_.twitterAnimating = true
  599. loadObject("TwitterLogin").onSuccess = function()
  600. local L0_69, L1_70
  601. L0_69 = _UPVALUE0_
  602. L0_69.onSuccess = nil
  603. L0_69 = true
  604. _UPVALUE1_ = L0_69
  605. end
  606. loadObject("TwitterLogin").onDone = function()
  607. _UPVALUE0_.twitterAnimating = false
  608. if _UPVALUE1_ == true then
  609. _UPVALUE0_:slideInTweetButton()
  610. end
  611. end
  612. loadObject("TwitterLogin"):start()
  613. else
  614. _UPVALUE1_()
  615. end
  616. elseif not _UPVALUE0_.noTwitter and _UPVALUE0_.twitterAnimating == false then
  617. audio:playEvent("SSS/UI/tweetThisButtonAppears")
  618. _UPVALUE2_[4]:addCurrent(cutscenes.ST_slideInTweet)
  619. _UPVALUE0_.twitterAnimating = true
  620. timer:setTimeout(function()
  621. local L1_71
  622. L1_71 = _UPVALUE0_
  623. L1_71.twitterAnimating = false
  624. end, 0.5)
  625. end
  626. end
  627. function L18_23()
  628. local L0_72
  629. L0_72 = _UPVALUE0_
  630. L0_72 = L0_72[4]
  631. L0_72.current = cutscenes.ST_slideInTweeting
  632. L0_72 = scene
  633. L0_72 = L0_72.ST_tweet
  634. L0_72 = L0_72.setText
  635. L0_72(L0_72, localeStrings:getString("TWITTER_TWEETING"))
  636. L0_72 = scene
  637. L0_72 = L0_72.ST_tweetWaves
  638. L0_72 = L0_72.setAnimationLoop
  639. L0_72(L0_72, -1)
  640. L0_72 = scene
  641. L0_72 = L0_72.ST_tweet
  642. L0_72.onClick = nil
  643. L0_72 = scene
  644. L0_72 = L0_72.ST_more
  645. L0_72.onClickUp = nil
  646. L0_72 = engine
  647. function L0_72.onRequestSucceeded()
  648. print("success!", _UPVALUE0_.currentPage.dialog)
  649. engine.onRequestSucceeded = nil
  650. engine.onRequestFailed = nil
  651. engine.onConnectionFailed = nil
  652. _UPVALUE1_(true)
  653. end
  654. L0_72 = engine
  655. function L0_72.onRequestFailed(A0_73, A1_74)
  656. engine.onRequestSucceeded = nil
  657. engine.onRequestFailed = nil
  658. engine.onConnectionFailed = nil
  659. print("request failed!", A0_73, A1_74)
  660. _UPVALUE0_(false)
  661. end
  662. L0_72 = engine
  663. function L0_72.onConnectionFailed(A0_75, A1_76)
  664. engine.onRequestSucceeded = nil
  665. engine.onRequestFailed = nil
  666. engine.onConnectionFailed = nil
  667. print("connection failed!", A0_75, A1_76)
  668. _UPVALUE0_(false)
  669. end
  670. L0_72 = _UPVALUE1_
  671. L0_72 = L0_72.currentPage
  672. L0_72 = L0_72.dialog
  673. L0_72 = L0_72 .. " " .. localeStrings:getString("HASHTAG_SWORCERY")
  674. if localeStrings:getLanguage() == "Japanese" and _UPVALUE1_.currentPage.imageCode ~= "" then
  675. L0_72 = L0_72 .. " http://sukimusu.jp/" .. _UPVALUE1_.currentPage.imageCode
  676. end
  677. print("TWEET: " .. L0_72)
  678. engine:publishSocial(L0_72)
  679. end
  680. function L19_24(A0_77)
  681. if A0_77 then
  682. scene.ST_tweet:setText(localeStrings:getString("TWITTER_SUCCESS"))
  683. scene.ST_tweetWaves:setAnimationLoop(1)
  684. timer:setTimeout(function()
  685. local L0_78, L1_79
  686. L0_78 = _UPVALUE0_
  687. L0_78 = L0_78[4]
  688. L1_79 = cutscenes
  689. L1_79 = L1_79.ST_fadeOutTweet
  690. L0_78.current = L1_79
  691. L0_78 = _UPVALUE0_
  692. L0_78 = L0_78[4]
  693. function L1_79()
  694. local L0_80, L1_81
  695. L0_80 = _UPVALUE0_
  696. L0_80 = L0_80[4]
  697. L0_80.onDead = nil
  698. L0_80 = scene
  699. L0_80 = L0_80.ST_tweet
  700. L1_81 = L0_80
  701. L0_80 = L0_80.setText
  702. L0_80(L1_81, localeStrings:getString("TWITTER_TWEET"))
  703. L0_80 = scene
  704. L0_80 = L0_80.ST_tweet
  705. L1_81 = _UPVALUE1_
  706. L0_80.onClick = L1_81
  707. L0_80 = scene
  708. L0_80 = L0_80.ST_more
  709. L1_81 = _UPVALUE2_
  710. L0_80.onClickUp = L1_81
  711. end
  712. L0_78.onDead = L1_79
  713. end, 2)
  714. else
  715. scene.ST_tweet:setText(localeStrings:getString("TWITTER_FAILED"))
  716. scene.ST_tweetWaves:setAnimationLoop(1)
  717. timer:setTimeout(function()
  718. local L0_82, L1_83
  719. L0_82 = _UPVALUE0_
  720. L0_82 = L0_82[4]
  721. L1_83 = cutscenes
  722. L1_83 = L1_83.ST_slideOutTweet
  723. L0_82.current = L1_83
  724. L0_82 = _UPVALUE0_
  725. L0_82 = L0_82[4]
  726. function L1_83()
  727. local L0_84, L1_85
  728. L0_84 = _UPVALUE0_
  729. L0_84 = L0_84[4]
  730. L0_84.onDead = nil
  731. L0_84 = scene
  732. L0_84 = L0_84.ST_tweet
  733. L1_85 = L0_84
  734. L0_84 = L0_84.setText
  735. L0_84(L1_85, localeStrings:getString("TWITTER_TWEET"))
  736. L0_84 = scene
  737. L0_84 = L0_84.ST_tweet
  738. L1_85 = _UPVALUE1_
  739. L0_84.onClick = L1_85
  740. L0_84 = scene
  741. L0_84 = L0_84.ST_more
  742. L1_85 = _UPVALUE2_
  743. L0_84.onClickUp = L1_85
  744. end
  745. L0_82.onDead = L1_83
  746. end, 2)
  747. end
  748. end
  749. function L7_12(A0_86)
  750. _UPVALUE0_(A0_86)
  751. _UPVALUE1_(A0_86.dialog)
  752. if A0_86.subject.state then
  753. _UPVALUE2_(A0_86.subject.type, A0_86.subject.state)
  754. _UPVALUE3_[1].current = cutscenes.ST_slideInSubject
  755. end
  756. _UPVALUE3_[2].current = cutscenes.ST_fadeInText
  757. end
  758. function L8_13(A0_87, A1_88)
  759. _UPVALUE0_(A1_88)
  760. if A0_87.subject.state ~= A1_88.subject.state or A0_87.subject.type ~= A1_88.subject.type then
  761. _UPVALUE1_(_UPVALUE2_[1], A1_88)
  762. end
  763. _UPVALUE2_[2].current = cutscenes.ST_fadeOutText
  764. _UPVALUE2_[2].onDead = function()
  765. _UPVALUE0_[2].onDead = nil
  766. if _UPVALUE1_.dialog ~= nil then
  767. _UPVALUE2_(_UPVALUE1_.dialog)
  768. _UPVALUE0_[2].current = cutscenes.ST_fadeInText
  769. end
  770. end
  771. end
  772. function L13_18(A0_89, A1_90)
  773. local L2_91, L3_92
  774. L2_91 = _UPVALUE0_
  775. L2_91 = L2_91[1]
  776. L3_92 = cutscenes
  777. L3_92 = L3_92.ST_shrinkOutSubject
  778. L2_91.current = L3_92
  779. L2_91 = A1_90.subject
  780. L2_91 = L2_91.state
  781. if L2_91 then
  782. L2_91 = _UPVALUE0_
  783. L2_91 = L2_91[1]
  784. function L3_92()
  785. _UPVALUE0_(_UPVALUE1_.subject.type, _UPVALUE1_.subject.state)
  786. _UPVALUE2_[1].onDead = nil
  787. _UPVALUE2_[1].current = cutscenes.ST_slideInSubject
  788. end
  789. L2_91.onDead = L3_92
  790. else
  791. L2_91 = _UPVALUE0_
  792. L2_91 = L2_91[1]
  793. L2_91.onDead = nil
  794. end
  795. end
  796. function L9_14(A0_93)
  797. _UPVALUE0_[1].current = cutscenes.ST_slideOutSubject
  798. _UPVALUE0_[2].current = cutscenes.ST_fadeOutText
  799. _UPVALUE0_[4]:addCurrent(cutscenes.ST_slideOutTweet)
  800. _UPVALUE1_.current = cutscenes.ST_fadeOutMore
  801. end
  802. function L16_21(A0_94)
  803. local L1_95, L2_96
  804. L1_95 = 1
  805. L2_96 = string
  806. L2_96 = L2_96.upper
  807. L2_96 = L2_96(A0_94)
  808. print(A0_94) //Che ho cambiato in L2_96=A0_94
  809. if _UPVALUE0_.removeHashTag == true then
  810. L2_96 = _G.removeHashTag(L2_96)
  811. end
  812. scene.ST_textbox:setText(L2_96)
  813. end
  814. function L17_22()
  815. local L0_97, L1_98
  816. L0_97 = _UPVALUE0_
  817. if not L0_97 then
  818. L0_97 = scene
  819. L0_97 = L0_97.TU_Ursula
  820. end
  821. return L0_97
  822. end
  823. return L15_20
  824. end
  825. Storyteller = L1_4
  826. end)()
  827. ;(function()
  828. local L1_99
  829. function L1_99(A0_100)
  830. local L1_101, L2_102, L3_103, L4_104
  831. L1_101 = {}
  832. L2_102 = A0_100.currentDirection
  833. L1_101.direction = L2_102
  834. L2_102, L3_103 = nil, nil
  835. function L4_104(A0_105, A1_106)
  836. _UPVALUE0_ = A1_106
  837. end
  838. L1_101.start = L4_104
  839. function L4_104(A0_107)
  840. _UPVALUE0_ = nil
  841. timer:clearTimer(_UPVALUE1_)
  842. end
  843. L1_101.stop = L4_104
  844. function L3_103()
  845. if _UPVALUE0_.direction == "S" then
  846. _UPVALUE0_.direction = "SE"
  847. elseif _UPVALUE0_.direction == "SE" then
  848. _UPVALUE0_.direction = "E"
  849. elseif _UPVALUE0_.direction == "E" then
  850. _UPVALUE0_.direction = "NE"
  851. elseif _UPVALUE0_.direction == "NE" then
  852. _UPVALUE0_.direction = "N"
  853. elseif _UPVALUE0_.direction == "SW" then
  854. _UPVALUE0_.direction = "W"
  855. elseif _UPVALUE0_.direction == "W" then
  856. _UPVALUE0_.direction = "NW"
  857. elseif _UPVALUE0_.direction == "NW" then
  858. _UPVALUE0_.direction = "N"
  859. end
  860. if _UPVALUE0_.direction == "N" then
  861. print("facing N for dialog")
  862. timer:clearTimer()
  863. end
  864. _UPVALUE1_:getEntity():setAnimation("travelstanding" .. _UPVALUE0_.direction)
  865. end
  866. function L4_104(A0_108)
  867. _UPVALUE0_.direction = _UPVALUE1_.currentDirection
  868. timer:setTimer(_UPVALUE2_, 0.5)
  869. end
  870. L1_101.onStopped = L4_104
  871. function L4_104(A0_109, A1_110)
  872. A1_110()
  873. end
  874. L1_101.requestInterrupt = L4_104
  875. function L4_104(A0_111)
  876. local L1_112
  877. end
  878. L1_101.onGo = L4_104
  879. function L4_104(A0_113)
  880. local L1_114
  881. end
  882. L1_101.onClick = L4_104
  883. function L4_104(A0_115)
  884. local L1_116
  885. end
  886. L1_101.onClickUp = L4_104
  887. function L4_104(A0_117, A1_118)
  888. end
  889. L1_101.look = L4_104
  890. function L4_104(A0_119)
  891. local L1_120
  892. end
  893. L1_101.stopLook = L4_104
  894. function L4_104(A0_121)
  895. local L1_122
  896. end
  897. L1_101.doAction = L4_104
  898. return L1_101
  899. end
  900. ST_UrsulaTalkIdle = L1_99
  901. end)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement