Agitator.gd 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. extends Human
  2. class_name Agitator
  3. var freq = 1
  4. var phase = 0
  5. var active = true
  6. var player_piggyback = false
  7. onready var sign_ = find_node("Sign")
  8. var previous_rotation
  9. func _init():
  10. workplace = "Agipoint"
  11. transit_point = "TRANSIT1"
  12. func _process(delta):
  13. if active:
  14. sign_.translation = Vector3(0,0,abs(sin(phase)))
  15. phase=wrapf(phase+delta*6.28*freq,0,6.28)
  16. func turn_back():
  17. turn_around(true)
  18. func step_forward(l = 1.0):
  19. var tw2 = SDTween.new()
  20. tw2.interpolate_property(self,"translation",translation,translation+transform.basis.z*l,anitime,Tween.TRANS_CUBIC,Tween.EASE_IN_OUT)
  21. add_child(tw2)
  22. tw2.start()
  23. func turn_around(back = false):
  24. PLAYER.dont_end_chat = true
  25. var tw = SDTween.new()
  26. force_finish_tweens()
  27. if !back:
  28. previous_rotation = $Spatial.rotation_degrees
  29. tw.interpolate_property($Spatial,"rotation_degrees", previous_rotation, previous_rotation + Vector3(0,180,0),anitime,Tween.TRANS_CUBIC,Tween.EASE_IN_OUT)
  30. step_forward()
  31. else:
  32. tw.interpolate_property($Spatial,"rotation_degrees", $Spatial.rotation_degrees, previous_rotation,anitime,Tween.TRANS_CUBIC,Tween.EASE_IN_OUT)
  33. add_child(tw)
  34. tw.start()
  35. func force_finish_tweens():
  36. for c in get_children(): # not sure about that?
  37. #What about cases when you climb on back and this tween gets deleted?
  38. if c is Tween:
  39. c.seek(c.get_runtime()) #hopefully sets tween to its end
  40. func climb_back():
  41. player_piggyback = true
  42. var camera = $Camera
  43. var tw = SDTween.new()
  44. force_finish_tweens()
  45. var t
  46. var cp = $CameraPlace
  47. t = cp.global_transform
  48. cp.get_parent().remove_child(cp)
  49. camera.add_child(cp)
  50. cp.global_transform = t
  51. t = camera.global_transform
  52. camera.get_parent().remove_child(camera)
  53. $Spatial.add_child(camera)
  54. camera.global_transform = t
  55. tw.interpolate_property(camera,"transform", camera.transform,$Spatial/PassengerPlace.transform, anitime, Tween.TRANS_CUBIC,Tween.EASE_IN_OUT)
  56. add_child(tw)
  57. tw.start()
  58. func take_player():
  59. pass
  60. func init_():
  61. return [
  62. Saying.new(Saying.MYSELF, "he..."),
  63. Saying.new(Saying.ITSELF, "hi! Wanna know more?"),
  64. Saying.new(Saying.MYSELF, "...llo"),
  65. Unconditional.new("main_choice_"),
  66. ]
  67. func main_choice_():
  68. return [
  69. [
  70. Choice.new("what are you doing?","platform"),
  71. Choice.new("priest","priest") if MAIN.lasagna_side else NULL_CHOICE,
  72. Choice.new("but there is a guard!","sec_argument") if MAIN.agitator_side and MAIN.security_explained else NULL_CHOICE,
  73. Choice.new("about girl","girl") if MAIN.baker_secret else NULL_CHOICE,
  74. Choice.new("she didn't return [END]","left") if MAIN.girl_didnt_return else NULL_CHOICE,
  75. Choice.new("what about stack?","stack") if MAIN.knows_stack else NULL_CHOICE,
  76. Choice.new("who are you?","who_are_you"),
  77. Choice.new("bye...", "bye_"),
  78. ],
  79. ]
  80. func left():
  81. return [
  82. Saying.new(Saying.MYSELF, "she said she needs to think"),
  83. Saying.new(Saying.MYSELF, "said will be today"),
  84. Saying.new(Saying.MYSELF, "but didn't return"),
  85. Saying.new(Saying.ITSELF, "oh"),
  86. Saying.new(Saying.ITSELF, "i guess that's it"),
  87. Saying.new(Saying.ITSELF, "she left"),
  88. Saying.new(Saying.ITSELF, "i will still try"),
  89. Saying.new(Saying.ITSELF, "to bring baker to justice"),
  90. Saying.new(Saying.ITSELF, "but for now"),
  91. Saying.new(Saying.ITSELF, "sec doesn't look happy"),
  92. Saying.new(Saying.ITSELF, "i guess we both"),
  93. Saying.new(Saying.ITSELF, "need to leave"),
  94. Saying.new(Saying.MYSELF, "i can't"), # TODO: wait to try escaping if didn't?
  95. Saying.new(Saying.MYSELF, "prints error"),
  96. Saying.new(Saying.ITSELF, "sorry"),
  97. Saying.new(Saying.ITSELF, "idk how to fix it"),
  98. Saying.new(Saying.ITSELF, "but let's try oldschool","turn_around"),
  99. Saying.new(Saying.ITSELF, "just climb me like that","climb_back"),
  100. Saying.new(Saying.ITSELF, "good","turn_back"), #camera moves on top of agi
  101. Saying.new(Saying.ITSELF, "let's go","leave"), # agi goes and warps. End
  102. ]
  103. func sec_argument():
  104. return [
  105. Saying.new(Saying.MYSELF, "hmm..."), #separate and tie to sec?
  106. Saying.new(Saying.MYSELF, "but there are antlers"),
  107. Saying.new(Saying.MYSELF, "look, over there?"),
  108. Saying.new(Saying.MYSELF, "You will have trouble"),
  109. Saying.new(Saying.MYSELF, "if you just hit me?"),
  110. Saying.new(Saying.ITSELF, "Well, sort of."),
  111. Saying.new(Saying.ITSELF, "but i can run away."),
  112. Saying.new(Saying.ITSELF, "He'll never find me"),
  113. Saying.new(Saying.ITSELF, "once i drop this sign"),
  114. Saying.new(Saying.ITSELF, "that's called anonymity","basic_anonymity"),
  115. Saying.new(Saying.ITSELF, "i am agitator"),
  116. Saying.new(Saying.ITSELF, "only when i need it"),
  117. Saying.new(Saying.MYSELF, "hmm, ok"),
  118. Saying.new(Saying.ITSELF, "besides"),
  119. Saying.new(Saying.ITSELF, "you think you know Sec?"),
  120. Unconditional.new("main_choice_"),
  121. ]
  122. func basic_anonymity():
  123. MAIN.knows_basic_anonimity = true
  124. func platform():
  125. return [
  126. Saying.new(Saying.MYSELF, "what are you doing?"),
  127. Saying.new(Saying.ITSELF, "trying to awake people"),
  128. Saying.new(Saying.ITSELF, "net is in disarray."),
  129. Saying.new(Saying.ITSELF, "people go missing."),
  130. Saying.new(Saying.ITSELF, "what i think we need"),
  131. Saying.new(Saying.ITSELF, "is laws and justice"),
  132. Saying.new(Saying.ITSELF, "i.e. a state"),
  133. Saying.new(Saying.MYSELF, "laws?"),
  134. Saying.new(Saying.ITSELF, "..."),
  135. Saying.new(Saying.ITSELF, "ok, for you"),
  136. Saying.new(Saying.ITSELF, "should start from basics"),
  137. Saying.new(Saying.ITSELF, "Long ago"),
  138. Saying.new(Saying.ITSELF, "before i was born"),
  139. Saying.new(Saying.ITSELF, "there were \"laws\""),
  140. Saying.new(Saying.ITSELF, "rules equal for all."),
  141. Saying.new(Saying.ITSELF, "for example a law"),
  142. Saying.new(Saying.ITSELF, "to not hurt other people"),
  143. Saying.new(Saying.ITSELF, "So i can't hit you"),
  144. Saying.new(Saying.ITSELF, "and get away with it"),
  145. Saying.new(Saying.ITSELF, "in public spaces"),
  146. Saying.new(Saying.ITSELF, "like this"),
  147. Saying.new(Saying.ITSELF, "there are rules to follow"),
  148. Saying.new(Saying.ITSELF, "however"),
  149. Saying.new(Saying.ITSELF, "enacting them is hard."),
  150. Saying.new(Saying.ITSELF, "and in other places"),
  151. Saying.new(Saying.ITSELF, "esp. in private ones"),
  152. Saying.new(Saying.ITSELF, "there are no rules at all"),
  153. Saying.new(Saying.ITSELF, "or twisted."),
  154. Saying.new(Saying.ITSELF, "No justice"),
  155. Saying.new(Saying.ITSELF, "you can be enslaved"),
  156. Saying.new(Saying.ITSELF, "tricked"),
  157. Saying.new(Saying.ITSELF, "sold for organs"),
  158. Saying.new(Saying.ITSELF, "or just killed"),
  159. Saying.new(Saying.ITSELF, "millions of people"),
  160. Saying.new(Saying.ITSELF, "go missing every year"),
  161. Saying.new(Saying.ITSELF, "in just this segment"),
  162. Saying.new(Saying.ITSELF, "of the net"),
  163. Saying.new(Saying.ITSELF, "I cannot tolerate this","agiside"),
  164. Unconditional.new("main_choice_"),
  165. ]
  166. func agiside():
  167. MAIN.agitator_side = true
  168. func bye_():
  169. return [
  170. Saying.new(Saying.MYSELF, "need to go"),
  171. Saying.new(Saying.ITSELF, "good luck"),
  172. ]
  173. func stack():
  174. return [
  175. Saying.new(Saying.MYSELF, "what about stack?"),
  176. Saying.new(Saying.MYSELF, "it makes you safer?"),
  177. Saying.new(Saying.ITSELF, "..."),
  178. Saying.new(Saying.ITSELF, "You might not feel this"),
  179. Saying.new(Saying.ITSELF, "yet"),
  180. Saying.new(Saying.ITSELF, "but tech stack"),
  181. Saying.new(Saying.ITSELF, "being the only thing"),
  182. Saying.new(Saying.ITSELF, "between you and death"),
  183. Saying.new(Saying.ITSELF, "is very stressfull."),
  184. Saying.new(Saying.ITSELF, "One wrong move"),
  185. Saying.new(Saying.ITSELF, "or one little bug"),
  186. Saying.new(Saying.ITSELF, "is all it may take"),
  187. Saying.new(Saying.ITSELF, "for a person to perish"),
  188. Saying.new(Saying.ITSELF, "..."),
  189. Saying.new(Saying.ITSELF, "I don't even understand"),
  190. Saying.new(Saying.ITSELF, "how the hell thing works"),
  191. Saying.new(Saying.ITSELF, "even though it is open"),
  192. Saying.new(Saying.ITSELF, "..."),
  193. Saying.new(Saying.ITSELF, "At least i know the risks"),
  194. Saying.new(Saying.ITSELF, "others just careless"),
  195. Saying.new(Saying.ITSELF, "they think it is magic"),
  196. Saying.new(Saying.ITSELF, "until they die."),
  197. Saying.new(Saying.ITSELF, "... this should end."),
  198. ]
  199. func priest():
  200. return [
  201. Saying.new(Saying.MYSELF, "priest says you're wrong"),
  202. Saying.new(Saying.ITSELF, "ah, Richard?"),
  203. Saying.new(Saying.ITSELF, "understandable"),
  204. Saying.new(Saying.ITSELF, "almost all of his \"church\""),
  205. Saying.new(Saying.ITSELF, "are foss and oshw devs."),
  206. Saying.new(Saying.ITSELF, "guys who make free tools"),
  207. Saying.new(Saying.ITSELF, "and release them wild"),
  208. Saying.new(Saying.ITSELF, "for both good and bad."),
  209. Saying.new(Saying.ITSELF, "the current net is"),
  210. Saying.new(Saying.ITSELF, "in many ways,"),
  211. Saying.new(Saying.ITSELF, "result of such behavior."),
  212. Saying.new(Saying.ITSELF, "I guess for Richard and co"),
  213. Saying.new(Saying.ITSELF, "being beyond control"),
  214. Saying.new(Saying.ITSELF, "is more important"),
  215. Saying.new(Saying.ITSELF, "than random casualties"),
  216. Saying.new(Saying.ITSELF, "caused by anarchy"),
  217. ]
  218. func girl():
  219. return [
  220. Saying.new(Saying.MYSELF, "I want to tell you sth"), #one needs to know she doesn't have parents prob.
  221. Saying.new(Saying.MYSELF, "This girl is in danger"),
  222. Saying.new(Saying.MYSELF, "right now"),
  223. Saying.new(Saying.ITSELF, "what?"),
  224. Saying.new(Saying.MYSELF, "baker woman"),
  225. Saying.new(Saying.MYSELF, "wanted to enslave her"),
  226. Saying.new(Saying.ITSELF, "what???"),
  227. Saying.new(Saying.MYSELF, "and haven't lost interest"),
  228. Saying.new(Saying.ITSELF, "this is a dark story."),
  229. Saying.new(Saying.ITSELF, "you're telling"),
  230. Saying.new(Saying.MYSELF, "how to protect her?"),
  231. Saying.new(Saying.ITSELF, "well, in such cases"),
  232. Saying.new(Saying.ITSELF, "the best protection"),
  233. Saying.new(Saying.ITSELF, "is usually publicity"),
  234. Saying.new(Saying.ITSELF, "I will contact friends"),
  235. Saying.new(Saying.ITSELF, "in nearby Zstate"),
  236. Saying.new(Saying.ITSELF, "and we will see"),
  237. Saying.new(Saying.ITSELF, "if they can grant"),
  238. Saying.new(Saying.ITSELF, "her public protection"),
  239. Saying.new(Saying.ITSELF, "in their space"),
  240. Saying.new(Saying.ITSELF, "until she grows up"),
  241. Saying.new(Saying.ITSELF, "what the girl says?"),
  242. Saying.new(Saying.ITSELF, "could you talk to her?","agiknows"),
  243. Saying.new(Saying.MYSELF, "can try"),
  244. Unconditional.new("main_choice_"),
  245. ]
  246. func who_are_you():
  247. return [
  248. Saying.new(Saying.MYSELF, "Who are you?"),
  249. Saying.new(Saying.ITSELF, "I am an activist"),
  250. Saying.new(Saying.ITSELF, "trying to make a change"),
  251. Unconditional.new("main_choice_"),
  252. ]
  253. func agiknows():
  254. MAIN.agitator_knows = true