Security.gd 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. extends Human
  2. class_name Security
  3. var fp
  4. var idle_response_drunk = false
  5. var idle_response_baker = false
  6. onready var NOTEBOOK = find_parent("MAIN").find_node("Notebook")
  7. func init_():
  8. return [
  9. Saying.new(Saying.MYSELF, "hi"),
  10. Saying.new(Saying.ITSELF, "hi kid"),
  11. Saying.new(Saying.ITSELF, "whazzup?"),
  12. Unconditional.new("main_choice_"),
  13. ]
  14. func main_choice_():
  15. return [
  16. [
  17. Choice.new("who are you?","who_are_you"),
  18. Choice.new("why antlers?", "antlers"),
  19. Choice.new("thing in front of you?", "notebook"),
  20. Choice.new("distro?","distro") if MAIN.distrowatch else NULL_CHOICE,
  21. Choice.new("rules?","rules") if MAIN.security_explained and MAIN.agitator_side else NULL_CHOICE,
  22. Choice.new("drunkards", "drunkards") if MAIN.knows_drunkards else NULL_CHOICE,
  23. Choice.new("about baker", "baker") if MAIN.baker_secret else NULL_CHOICE,
  24. Choice.new("why idle?", "idle") if idle_response_baker and idle_response_drunk else NULL_CHOICE,
  25. Choice.new("donut?", "donut") if MAIN.seen_security_with_donut else NULL_CHOICE,
  26. Choice.new("head is you?", "head_secret") if MAIN.security_secret else NULL_CHOICE,
  27. Choice.new("how to robofriend?", "robofriend") if MAIN.knows_node else NULL_CHOICE,
  28. Choice.new("cannot jump out", "jump_") if MAIN.tried_to_escape else NULL_CHOICE,
  29. Choice.new("bye...", "bye_"),
  30. ],
  31. ]
  32. func notebook():
  33. return[
  34. Saying.new(Saying.MYSELF, "what is this thing"),
  35. Saying.new(Saying.MYSELF, "on your table?"),
  36. Saying.new(Saying.ITSELF, "ah, this?"),
  37. Saying.new(Saying.ITSELF, "called a notebook"),
  38. Saying.new(Saying.ITSELF, "vintage machine"),
  39. Saying.new(Saying.ITSELF, "from linux era"),
  40. Saying.new(Saying.ITSELF, "but software is modern"),
  41. Saying.new(Saying.ITSELF, "all runs"),
  42. Saying.new(Saying.ITSELF, "just on 8 gigs"),
  43. Saying.new(Saying.ITSELF, "of ram!"),
  44. Unconditional.new("main_choice_"),
  45. ]
  46. func rules():
  47. return[
  48. Saying.new(Saying.MYSELF, "are there rules?"),
  49. Saying.new(Saying.MYSELF, "not to be poked?"),
  50. Saying.new(Saying.ITSELF, "not really rules"),
  51. Saying.new(Saying.ITSELF, "just"),
  52. Saying.new(Saying.ITSELF, "be excellent to others"),
  53. Saying.new(Saying.ITSELF, "there are not"),
  54. Saying.new(Saying.ITSELF, "so many people"),
  55. Unconditional.new("main_choice_"),
  56. ]
  57. func distro():
  58. return[
  59. Saying.new(Saying.MYSELF, "what distro"),
  60. Saying.new(Saying.MYSELF, "do you use?"),
  61. Saying.new(Saying.ITSELF, "i use nullportal"),
  62. Saying.new(Saying.ITSELF, "very minimal"),
  63. Saying.new(Saying.ITSELF, "it is rolling release"),
  64. Saying.new(Saying.ITSELF, "but bugs"),
  65. Saying.new(Saying.ITSELF, "almost nonexistent"),
  66. Saying.new(Saying.ITSELF, "strange if i haven't"),
  67. Saying.new(Saying.ITSELF, "told you that before"), # ^____^
  68. Unconditional.new("main_choice_"),
  69. ]
  70. func jump_():
  71. return [
  72. Saying.new(Saying.MYSELF, "can't jump out"),
  73. Saying.new(Saying.MYSELF, "error"),
  74. Saying.new(Saying.ITSELF, "really?"),
  75. Saying.new(Saying.ITSELF, "can be a malfunction"),
  76. Saying.new(Saying.ITSELF, "let me check logs"),
  77. Saying.new(Saying.ITSELF, "..."),
  78. Saying.new(Saying.ITSELF, "..."),
  79. Saying.new(Saying.ITSELF, "no, jumppad ok"),
  80. Saying.new(Saying.ITSELF, "it's on your side"),
  81. Saying.new(Saying.ITSELF, "check your setup"),
  82. Saying.new(Saying.MYSELF, "how?"),
  83. Saying.new(Saying.ITSELF, "idk, what distro?"),
  84. Saying.new(Saying.MYSELF, "don't know"),
  85. Saying.new(Saying.ITSELF, "uname r, dude"),
  86. Saying.new(Saying.ITSELF, "open your term"),
  87. Saying.new(Saying.MYSELF, "like... this?"),
  88. Saying.new(Saying.ITSELF, "what are you doing?"),
  89. Saying.new(Saying.ITSELF, "here, man! right here!"),
  90. Saying.new(Saying.MYSELF, "hmm... Bakano?"),
  91. Saying.new(Saying.ITSELF, "no idea how to fix"),
  92. Saying.new(Saying.ITSELF, "in Bakano"),
  93. Saying.new(Saying.ITSELF, "never used it"),
  94. Saying.new(Saying.ITSELF, "find smb else"), # very realistic situation, right? ^____^
  95. Saying.new(Saying.ITSELF, "btw"),
  96. Saying.new(Saying.ITSELF, "i use nullportal"),
  97. Saying.new(Saying.ITSELF, "very minimal"),
  98. Saying.new(Saying.ITSELF, "fewer errors"),
  99. Unconditional.new("main_choice_"),
  100. ]
  101. func head_secret():
  102. return [
  103. Saying.new(Saying.MYSELF, "clock says"),
  104. Saying.new(Saying.MYSELF, "head is your toy"),
  105. Saying.new(Saying.MYSELF, "why do you need it?"),
  106. Saying.new(Saying.ITSELF, "ah, you managed"),
  107. Saying.new(Saying.ITSELF, "to make hermit talk"),
  108. Saying.new(Saying.ITSELF, "cool"),
  109. Saying.new(Saying.ITSELF, "his name is Markus"),
  110. Saying.new(Saying.ITSELF, "has troubles socialising"),
  111. Saying.new(Saying.ITSELF, "well"),
  112. Saying.new(Saying.ITSELF, "this is an old node"),
  113. Saying.new(Saying.ITSELF, "hacked it a while back"),
  114. Saying.new(Saying.ITSELF, "was just lost in space"),
  115. Saying.new(Saying.ITSELF, "with defences up"),
  116. Saying.new(Saying.ITSELF, "like a wargame target"),
  117. Saying.new(Saying.ITSELF, "head's here from start"),
  118. Saying.new(Saying.ITSELF, "some socialist leader"),
  119. Saying.new(Saying.ITSELF, "just thought"),
  120. Saying.new(Saying.ITSELF, "would be cool."),
  121. Saying.new(Saying.ITSELF, "made it a makeover"),
  122. Saying.new(Saying.ITSELF, "etc"),
  123. Saying.new(Saying.ITSELF, "no particular reason", "knownode"),
  124. Unconditional.new("main_choice_"),
  125. ]
  126. func robofriend():
  127. return [
  128. Saying.new(Saying.MYSELF, "how can i get"),
  129. Saying.new(Saying.MYSELF, "a cool robot friend"),
  130. Saying.new(Saying.MYSELF, "like you have?"),
  131. Saying.new(Saying.MYSELF, "robot i met before"),
  132. Saying.new(Saying.MYSELF, "was strange"),
  133. Saying.new(Saying.ITSELF, "haha, man"),
  134. Saying.new(Saying.ITSELF, "they are all different"),
  135. Saying.new(Saying.ITSELF, "like humans"),
  136. Saying.new(Saying.ITSELF, "I met Markus"),
  137. Saying.new(Saying.ITSELF, "while travelling"),
  138. Saying.new(Saying.ITSELF, "in the machine net"),
  139. Saying.new(Saying.MYSELF, "machine net?"),
  140. Saying.new(Saying.ITSELF, "net of things, yep"),
  141. Saying.new(Saying.ITSELF, "space not optimised"),
  142. Saying.new(Saying.ITSELF, "for humans"),
  143. Saying.new(Saying.ITSELF, "though i wouldn't"),
  144. Saying.new(Saying.ITSELF, "call them things"),
  145. Saying.new(Saying.ITSELF, "there are persons also"),
  146. Saying.new(Saying.ITSELF, "like markus"),
  147. Saying.new(Saying.MYSELF, "how do you travel there?"),
  148. Saying.new(Saying.ITSELF, "you need some knowledge"),
  149. Saying.new(Saying.ITSELF, "and preferably"),
  150. Saying.new(Saying.ITSELF, "a neural interface"),
  151. Saying.new(Saying.MYSELF, "what?"),
  152. Saying.new(Saying.ITSELF, "brain connection to stack"),
  153. Saying.new(Saying.ITSELF, "this way"),
  154. Saying.new(Saying.ITSELF, "you're equal"),
  155. Saying.new(Saying.ITSELF, "2 robots with neuroboards"),
  156. Saying.new(Saying.ITSELF, "boardpeople"),
  157. Saying.new(Saying.ITSELF, "just a different network"),
  158. Saying.new(Saying.ITSELF, "and need oxygen"),
  159. Saying.new(Saying.MYSELF, "interface?"),
  160. Saying.new(Saying.MYSELF, "you mean... antlers?"),
  161. Saying.new(Saying.ITSELF, "haha, no"),
  162. Saying.new(Saying.ITSELF, "they are just for looks"),
  163. Saying.new(Saying.ITSELF, "sometimes to poke"),
  164. Saying.new(Saying.ITSELF, "interface is thin"),
  165. Saying.new(Saying.ITSELF, "you can't see it easily"),
  166. Saying.new(Saying.MYSELF, "can i have one?"),
  167. Saying.new(Saying.ITSELF, "of course you can"),
  168. Saying.new(Saying.ITSELF, "but probably better"),
  169. Saying.new(Saying.ITSELF, "when you really need it"),
  170. Saying.new(Saying.ITSELF, "at first"),
  171. Saying.new(Saying.ITSELF, "feels unnatural"),
  172. Saying.new(Saying.ITSELF, "causes depression"),
  173. Unconditional.new("main_choice_"),
  174. ]
  175. func knownode():
  176. MAIN.knows_node = true
  177. func baker():
  178. idle_response_baker = true
  179. return [
  180. Saying.new(Saying.MYSELF, "did you know"),
  181. Saying.new(Saying.MYSELF, "that baker tried"),
  182. Saying.new(Saying.MYSELF, "to order capture"),
  183. Saying.new(Saying.MYSELF, "of little girl?"),
  184. Saying.new(Saying.ITSELF, "and then cancelled it?"),
  185. Saying.new(Saying.ITSELF, "m?"),
  186. Saying.new(Saying.ITSELF, "where it is coming from?"),
  187. Saying.new(Saying.MYSELF, "..."),
  188. Saying.new(Saying.MYSELF, "..."),
  189. Saying.new(Saying.ITSELF, "listen."),
  190. Saying.new(Saying.ITSELF, "don't be a dick"),
  191. Saying.new(Saying.ITSELF, "first"),
  192. Saying.new(Saying.ITSELF, "you need a proof"),
  193. Saying.new(Saying.ITSELF, "second"),
  194. Saying.new(Saying.ITSELF, "even if you've had it"),
  195. Saying.new(Saying.ITSELF, "still a dickery."),
  196. Saying.new(Saying.ITSELF, "if it was cancelled"),
  197. Saying.new(Saying.ITSELF, "what is it"),
  198. Saying.new(Saying.ITSELF, "you want to achieve?"),
  199. Saying.new(Saying.ITSELF, "if i ban baker"),
  200. Saying.new(Saying.ITSELF, "from this node"),
  201. Saying.new(Saying.ITSELF, "and the angry mob"),
  202. Saying.new(Saying.ITSELF, "of child protectors"),
  203. Saying.new(Saying.ITSELF, "will go everywhere"),
  204. Saying.new(Saying.ITSELF, "where bakey comes up"),
  205. Saying.new(Saying.ITSELF, "and this girl"),
  206. Saying.new(Saying.ITSELF, "won't listen to head"),
  207. Saying.new(Saying.ITSELF, "in peace"),
  208. Saying.new(Saying.ITSELF, "who will get happier?"),
  209. Saying.new(Saying.ITSELF, "if you are a dick"),
  210. Saying.new(Saying.ITSELF, "go speak to agitator"),
  211. Saying.new(Saying.ITSELF, "about this"),
  212. Saying.new(Saying.ITSELF, "but then"),
  213. Saying.new(Saying.ITSELF, "never go near me again"),
  214. Saying.new(Saying.ITSELF, "or this node"),
  215. Unconditional.new("main_choice_"),
  216. ]
  217. func antlers():
  218. return [
  219. Saying.new(Saying.MYSELF, "Why antlers?"),
  220. Saying.new(Saying.ITSELF, "they signify"),
  221. Saying.new(Saying.ITSELF, "my role as a mean guy"),
  222. Saying.new(Saying.ITSELF, "who keeps other meanies"),
  223. Saying.new(Saying.ITSELF, "out"),
  224. Saying.new(Saying.ITSELF, "..."),
  225. Saying.new(Saying.ITSELF, "with antlers","sec_explained"),
  226. Unconditional.new("main_choice_"),
  227. ]
  228. func sec_explained():
  229. MAIN.security_explained = true
  230. func who_are_you():
  231. return [
  232. Saying.new(Saying.MYSELF, "Who are you?"),
  233. Saying.new(Saying.ITSELF, "name is Sec"),
  234. Saying.new(Saying.ITSELF, "I work here"),
  235. Saying.new(Saying.ITSELF, "call if in trouble","sec_explained"),
  236. Unconditional.new("main_choice_"),
  237. ]
  238. func bye_():
  239. return [
  240. Saying.new(Saying.MYSELF, "need to go"),
  241. Saying.new(Saying.ITSELF, "see ya"),
  242. ]
  243. func donut():
  244. return [
  245. Saying.new(Saying.MYSELF, "I saw you with donut"),
  246. Saying.new(Saying.ITSELF, "emm. Yes?"),
  247. Saying.new(Saying.MYSELF, "when head took a break"),
  248. Saying.new(Saying.ITSELF, "he is a good storyteller"),
  249. Saying.new(Saying.ITSELF, "waited for him"),
  250. Saying.new(Saying.ITSELF, "to take a break"),
  251. Saying.new(Saying.ITSELF, "problem ?"),
  252. Unconditional.new("main_choice_"),
  253. ]
  254. func drunkards():
  255. idle_response_drunk = true
  256. return [
  257. Saying.new(Saying.MYSELF, "these drunk..."),
  258. Saying.new(Saying.ITSELF, "harmless"),
  259. Saying.new(Saying.MYSELF, "baker says"),
  260. Saying.new(Saying.MYSELF, "bad for clients"),
  261. Saying.new(Saying.ITSELF, "i am not her shop guard"),
  262. Saying.new(Saying.ITSELF, "besides"),
  263. Saying.new(Saying.ITSELF, "they are nice people"),
  264. Unconditional.new("main_choice_"),
  265. ]
  266. func idle():
  267. return [
  268. Saying.new(Saying.MYSELF, "you don't seem to do much"),
  269. Saying.new(Saying.ITSELF, "I don't?"),
  270. Saying.new(Saying.MYSELF, "well"),
  271. Saying.new(Saying.MYSELF, "it almost seems"),
  272. Saying.new(Saying.MYSELF, "like you are lazy"),
  273. Saying.new(Saying.MYSELF, "and invent reasons"),
  274. Saying.new(Saying.MYSELF, "not to do stuff"),
  275. Saying.new(Saying.MYSELF, "just admit it"),
  276. Saying.new(Saying.ITSELF, "weeeeell..."),
  277. Saying.new(Saying.ITSELF, "it is not really true"),
  278. Saying.new(Saying.ITSELF, "first"),
  279. Saying.new(Saying.ITSELF, "i prevent people hacking"),
  280. Saying.new(Saying.ITSELF, "you don't wanna"),
  281. Saying.new(Saying.ITSELF, "be on the node"),
  282. Saying.new(Saying.ITSELF, "when it gets hacked"),
  283. Saying.new(Saying.ITSELF, "trust me on this"),
  284. Saying.new(Saying.ITSELF, "second"),
  285. Saying.new(Saying.ITSELF, "if i rule here"),
  286. Saying.new(Saying.ITSELF, "with sec s iron hand"),
  287. Saying.new(Saying.ITSELF, "you won't like it"),
  288. Saying.new(Saying.ITSELF, "this is not a Sec land"),
  289. Saying.new(Saying.ITSELF, "this is a place for you all"),
  290. Saying.new(Saying.ITSELF, "to hang out and whatnot"),
  291. Saying.new(Saying.ITSELF, "just have fun"),
  292. Saying.new(Saying.MYSELF, "mmm. ok."),
  293. Unconditional.new("main_choice_"),
  294. ]
  295. func _ready():
  296. var sp = find_parent("MAIN").find_node("SecurityPath1",true)
  297. fp = sp.find_node("PathFollow")
  298. ##################### KINEMATIC FUNCTIONS ###############################
  299. func receive_donut():
  300. var item = load("res://Donut.tscn").instance()
  301. $DonutPlace.add_child(item)
  302. func delete_donut():
  303. for c in $DonutPlace.get_children():
  304. c.queue_free()
  305. func go_for_donut():
  306. _set_noninteractable()
  307. NOTEBOOK.visible=false
  308. var tw1 = SDTween.new(self,"talk_with_baker")
  309. tw1.interpolate_property(fp,"unit_offset",0.01,.99,6,Tween.TRANS_CUBIC,Tween.EASE_IN_OUT)
  310. add_child(tw1)
  311. tw1.start()
  312. func go_back():
  313. var tw1 = SDTween.new(self,"accomodate")
  314. tw1.interpolate_property(fp,"unit_offset",0.99,0.01,6,Tween.TRANS_CUBIC,Tween.EASE_IN_OUT)
  315. add_child(tw1)
  316. tw1.start()
  317. #self.rotation_degrees=Vector3(0,0,0)
  318. func accomodate():
  319. _set_interactable()
  320. NOTEBOOK.visible=true
  321. MAIN.find_node("Head")._set_interactable()
  322. #print("getting comfy")
  323. delete_donut()
  324. var tw1 = SDTween.new()
  325. fp.rotation_degrees = Vector3(0,0,0)
  326. tw1.interpolate_property(self,"rotation_degrees",rotation_degrees,Vector3(0,0,0),1,Tween.TRANS_CUBIC,Tween.EASE_IN_OUT)
  327. add_child(tw1)
  328. tw1.start()
  329. MAIN.seen_security_with_donut = true
  330. pass
  331. func talk_with_baker():
  332. #print("talking with baker")
  333. receive_donut()
  334. var tw1 = SDTween.new(self,"go_back")
  335. tw1.interpolate_property(self,"rotation_degrees",rotation_degrees,Vector3(0,180,0),1,Tween.TRANS_CUBIC,Tween.EASE_IN_OUT)
  336. add_child(tw1)
  337. tw1.start()