/
PDA.dm
executable file
·2426 lines (2094 loc) · 101 KB
/
PDA.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#define MAX_DESIGNS 10
#define SCANMODE_NONE 0
#define SCANMODE_MEDICAL 1
#define SCANMODE_FORENSIC 2
#define SCANMODE_REAGENT 3
#define SCANMODE_HALOGEN 4
#define SCANMODE_ATMOS 5
#define SCANMODE_DEVICE 6
#define PDA_MINIMAP_WIDTH 256
#define PDA_MINIMAP_OFFSET_X 8
#define PDA_MINIMAP_OFFSET_Y 233
//The advanced pea-green monochrome lcd of tomorrow.
var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda
name = "\improper PDA"
desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a pre-programmed ROM cartridge. Can download additional applications from PDA terminals."
icon = 'icons/obj/pda.dmi'
icon_state = "pda"
item_state = "electronic"
w_class = W_CLASS_TINY
flags = FPRINT
slot_flags = SLOT_ID | SLOT_BELT
//Main variables
var/owner = null
var/default_cartridge = 0 // Access level defined by cartridge
var/obj/item/weapon/cartridge/cartridge = null //current cartridge
var/mode = 0 //Controls what menu the PDA will display. 0 is hub; the rest are either built in or based on cartridge.
//Secondary variables
var/scanmode = SCANMODE_NONE //used for various PDA scanning functions
var/fon = 0 //Is the flashlight function on?
var/f_lum = 2 //Luminosity for the flashlight function
var/silent = 0 //To beep or not to beep, that is the question
var/toff = 0 //If 1, messenger disabled
var/tnote = null //Current Texts
var/last_text //No text spamming
var/last_honk //Also no honk spamming that's bad too
var/ttone = "beep" //The ringtone!
var/lock_code = "" // Lockcode to unlock uplink
var/honkamt = 0 //How many honks left when infected with honk.exe
var/mimeamt = 0 //How many silence left when infected with mime.exe
var/note = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant!" //Current note in the notepad function
var/notehtml = ""
var/cart = "" //A place to stick cartridge menu information
var/detonate = 1 // Can the PDA be blown up?
var/hidden = 0 // Is the PDA hidden from the PDA list?
var/obj/item/weapon/card/id/id = null //Making it possible to slot an ID card into the PDA so it can function as both.
var/ownjob = null //related to above
var/obj/item/device/paicard/pai = null // A slot for a personal AI device
var/obj/item/device/analyzer/atmos_analys = new
var/obj/item/device/device_analyser/dev_analys = null
var/MM = null
var/DD = null
var/list/applications = list()
var/list/incoming_transactions = list()
var/global/list/currentevents1 = list("The Prime Minister of Space Australia has announced today a new policy to hand out fake dollar bills to the poor.",
"The President of Space America issued a press release today stating that he is not in fact, a Tajaran in disguise.",
"The Prime Minister of Space England is in hot water today after he announced that space tea would now be made with 20% more nuclear waste.",
"The Czar of the Space Soviet Union has issued a press release stating 'Spess Amerikans suck cocks!' we're working on a translation.",
"Space Israel has not gotten into trouble for bombing dirty Space Palestine again today. Don't be so anti-semitic.",
"Our sources tell us that the Earth country Poland has issued a press release stating that 'they didn't want to go to space anyway' and that 'space sucks'. More at eleven.",
"Sources are saying that the Earth country Poland has issued another press release saying they were sorry and would very much like to be in space. The Intergalactic Empire responded with the word 'No'.",
"The President of Space America has come under fire recently for stating that god was a chicken.",
"The Intergalactic Empire is in hot water this week after proposing to rename Space-Milk to Milk. The newsroom would like to apologize to any readers offended by this news.",
"The Prime Minister of Space Scotland has announced that 'Freedom Day' did not go as planned. Our sources report that over 2000 human heads are now being returned to their loved ones.",
"The Prime Minister of Space Australia has come under fire for stating 'Women are in the kitchen, men are on the sofa, jews are in the oven. My country is doing well.",
"Dirty Space Palestine just declared Jihad on Mighty Space Israel. For shame, Space Palestine.",
"The President of Space America was questioned today about his reaction to the Space Superstorm Baldman disaster, he replied 'I didn't send anybody since I figured it would quit about three quarters through.",
"The President of Space America was photographed today kicking a dog to death while muttering about how he liked cats better.",
"The President of Space America was photographed today with a fairly obvious tail protruding out of his pants, he denies the photo is real, saying 'I, president T'jkar Aw'krejn, am no Tajaran-- I mean catbeast.",
"The votes have come in, and the new Prime Minister of Space Uzbekistan is Kthchichikachi Breekikikiki. When questioned about his landslide victory, he replied 'SQAAAAAAAK'. His only opponent, Er'p Fh'goot, was the first openly gay catbeast to run for office.",
"The President of Space America has issued a press release asking for more chips in his office.",
"The Prime Minister of Space Uzbekistan has issued a press release, stating that 'SQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK BAWWK BAAWWWWKK'. We would like to say that Faux News does not condone or support the words of Mr. Breekikikiki.",
"The Prime Minister of Space Australia has come under fire for stating he was very upset with how many black people there was in his country.",
"The Czar of Space Russia has accused the President of Space America of being a dirty catbeast. The President wiggled his trademark ears and said that if he was a Tajaran, the Czar was a space shark. The President is being treated for bite wounds.",
"The 'Universes Largest Oven' has been completed today in Space Germany. Prime Minister Adole Himmler has invited Space Isreal to see the oven first at its grand opening."
)
var/global/list/currentevents2 = list("CEO Discount Dan has been sued. Again.",
"Nanotrasen has inducted a new policy wherein clowns will be spanked for stealing milk.",
"Discount Dan's has created a new line of Discountu Danu food product for Space Japan. The food is comprised of Space Carp on rice. More at ten.",
"Discount Dan's has come under fire for their new 'Horsemeat Lasagna'",
"Nanotrasen's official website has been hacked this morning. The site read 'NT SUXZ, GO SYNDIEKATTZ!!1!1!!' for 48 hours until the site was fixed.",
"Read the all new book by a former unnamed syndicate, 'Nanotrasen sucks but the dental is good so whatever.'",
"Nanotrasen has released a new study that has been made useless by the internet.",
"Discount Dan's 'Spooky Dan' line of product has come under fire for being unintentionally racist toward ghosts.",
"Discount Dan's 'Discounto Danito' line of product has come out with a new 'fiesta size' burrito. CEO Discount Dan has been quoted as saying, 'A big 'ol clot for a big 'ol family!'",
"The Syndicate has issued a press release stating that 'Nanotrasen sucks dicks.'",
"Nanotrasen CEO Johnson Lovelocker has been photographed kicking a Tajaran to death. This shameful publicity stunt is part of the new 'NT Hates Catbeasts, do you?' campaign.",
"Nanotrasen CEO Johnson Lovelocker has been photographed kicking a Vox in the cloaca. He commented that, 'BIRDS BELONG IN MY FUCKING MEALS DAMN IT'.",
"Nanotrasen CEO Johnson Lovelocker is in hot water for an alleged sex scandal with a confused syndicate woman that took the motto 'Fuck NT' too seriously.",
"Nanotrasen CEO Johnson Lovelocker issued a press release stating, 'Anybody who's fucking impersonating me is going to get fucking bluespaced unto a spike.'. We do not condone Lovelocker's use of foul language in the newsroom.",
"Nanotrasen CEO Johnson Lovelocker and Discount Dan's CEO Discount Dan have been photographed buying a new friend necklace. The Syndicate issued a statement that 'That's totally gay.'",
"Discount Dan has been photographed this evening hunting the endangered albino space panda. When questioned, he replied that the endangered animal was 'Good eats'.",
"Nanotrasen's head programmer quit this evening when people did not respond well to his new features on NTOS. Said features included the ability to instantly transmit pictures of your butt to people by blinking.",
"Nanotrasen CEO Johnson Lovelocker was photographed this morning celebrating his birthday will well deserved hookers and blow.",
"Discount Dan's stock has risen 20 points today after CEO Discount Dan promised to include a free toy in every 'Happy Dan' meal. In other news, we have over 300 confirmed reports of broken teeth and lead poisoning in children 6 and under.",
"Discount Dan has come under fire today after trying to hug a plasmaman whilst smoking a cigar. He is being treated for 3rd degree burns at the moment, and we at the newsroom wish him luck.",
"Nanotrasen's treasurer Shlomo Goldburginstein died today in a tragic cooking incident with NT Officer Gass Judenraigh."
)
var/global/list/currentevents3 = list("Border patrol around Space America has tightened today after a wave of Tajarans yiffed their way across. We have reports of over 2000 molested Space Americans. More to come at seven.",
"Tajarans continue to protest in their 'Trillion Fur March' today. We have reports that the Space American army is giving a KOS order on all non-humans in the area.",
"Read the all new book by known Plasmaman rights activist Spookler Boney, 'AGHGHHGHGH KILL ME IT BURNS AGHHHHHHH'",
"Read the all new book by the worlds most renown skeleton Johnny Hips, 'It aint easy, being bony.'",
"Scientists in Space Austria have found a chicken with the ability to warp space-time. More at ten.",
"Scientists working on at the Bluespace Portal Research Facility (BPRF), have looked into the fabric of reality. They report that all it is out there is a bunch of fat nerds and a chicken.",
"Scientists working at the Large Hadron Collider have discovered nothing today. A sceptical scientist was quoted as saying, 'It could be nothing, but it's probably just something again.'",
"Johnny Hips has released a new album today, 'Tibia Blues'. The songs include classics such as 'I aint got money for milk.', 'Skeleton Rock', and a new song named, 'Bone Marrow'.",
"Doctors have discovered that clowns indeed do have a funny bone.",
"Renowned mime scientist Free Shrugs has discovered a new element today. He has named it ' ', he also says that it has the properties of ' '.",
"Archaeologists have discovered god's final message to his creation today. The message reads, 'bawk'.",
"Scientists have discovered a new type of elementary particle today. Our sources say it has a bad atitude, and enjoys the color blue.",
"Today, a man was discovered to be living with a 20 year old ghost in his house. When the ghost was questioned who killed him, he responded 'A FAGGOT!'. More at four.",
"Scientists report that ghosts do in fact exist, however, they are huge assholes.",
"Supermatter researchers today have reported that the substance is highly volatile and could possibly rip apart the universe in large quantities. Discount Dan has been reported as ordering over 1000 pounds of supermatter shards.",
"Scientists working at the BPRF have discovered a pocket universe comprised fully of dead clown souls today. 40 scientists are being treated for madness."
)
var/global/list/history = list("Adolf Hitler's cyborg body was lain to rest after the ending of WW4.",
"World War Buttbot began, the following war claimed the asses of over 500000 young gentlemen.",
"The 54th President of the United States of Space America was shot in the dick. He succumbed to his injuries after medbay threw him in cryo for an entire day.",
"The first great zombie apocalypse began on Venus.",
"The first man to step on Pluto slipped and was impaled on an ice spike shortly after landing.",
"North Korea became the first country to land a rocket on the sun.",
"Kim Jong Long Dong Silver, 58th generation leader of North Korea, died after being shot seventy two times in the chest.",
"Nanotrasen's new 'Space Station 13' project was announced.",
"Jupiter and Neptune became sentient for a period of 78 hours, Jupiter was heard screaming 'WHY AM I ALIVE DEAR GOD.', whilst curiously, Neptune only said 'Well here we go again.'.",
"The first furry in space was thrown out an airlock, along with his fursuit.",
"The 89th President of Space America read Woody's Got Wood aloud in his first State of the Union, and was beaten to death shortly after.",
"Space France surrendered for the 10124th time, making it the most invaded country in the galaxy.",
"Our glorious leader Karl Pilkington the 24th was crowned emperor of the Intergalactic Human Empire.",
"Everyone in the universe said 'Dave sucks.' at the same time. The cause of this event was unknown, but over 200000 men named Dave were murdered.",
"A cult religion following the belief god was a chicken was created.",
)
var/global/list/facts = list("If you have 3 quarters, 4 dimes, and 4 pennies, you have $1.19. You also have the largest amount of money in coins without being able to make change for a dollar.",
"The numbers '172' can be found on the back of the U.S. $5 dollar bill in the bushes at the base of the Lincoln Memorial.",
"President Kennedy was the fastest random speaker in the world with upwards of 350 words per minute.",
"In the average lifetime, a person will walk the equivalent of 5 times around the equator.",
"Odontophobia is the fear of teeth.",
"The surface area of an average-sized brick is 79 cm squared.",
"According to suicide statistics, Monday is the favoured day for self-destruction.",
"The Neanderthal's brain was bigger than yours is.",
"The pancreas produces Insulin.",
"The word 'lethologica' describes the state of not being able to remember the word you want.",
"Every year about 98% of the atoms in your body are replaced.",
"The international telephone dialing code for Antarctica is 672.",
"Women are 37% more likely to go to a psychiatrist than men are.",
"The human heart creates enough pressure to squirt blood 30 feet (9 m).",
"When snakes are born with two heads, they fight each other for food.",
"Stressed is Desserts spelled backwards.",
"The word 'nerd' was first coined by Dr. Seuss in 'If I Ran the Zoo.'",
"Revolvers cannot be silenced because of all the noisy gasses which escape the cylinder gap at the rear of the barrel.",
"Every human spent about half an hour as a single cell.",
"7.5 million toothpicks can be created from a cord of wood.",
"If the Earth's sun were just inch in diameter, the nearest star would be 445 miles away.",
"There is no word in the English language that rhymes with month, orange, silver or purple.",
"Starfish have no brains.",
"2 and 5 are the only prime numbers that end in 2 or 5.",
"'Pronunciation' is the word which is mispronounced the most in the English language.",
"Women blink nearly twice as much as men.",
"Owls are the only birds who can see the color blue.",
"A pizza that has radius 'z' and height 'a' has volume Pi × z × z × a.",
"Months that begin on a Sunday will always have a 'Friday the 13th.'",
"Zero is an even number.",
"The longest English word that can be spelled without repeating any letters is 'uncopyrightable'.",
"10! (Ten factorial) seconds equals exactly six Earth weeks.",
"Want to remember the first digits of Pi easily? You can do it by counting each word's letters in 'May I have a large container of plasma?'"
)
var/currentevent1 = null
var/currentevent2 = null
var/currentevent3 = null
var/onthisday = null
var/didyouknow = null
/obj/item/device/pda/New()
..()
var/datum/pda_app/balance_check/app = new /datum/pda_app/balance_check()
app.onInstall(src)
/obj/item/device/pda/medical
name = "Medical PDA"
default_cartridge = /obj/item/weapon/cartridge/medical
icon_state = "pda-m"
/obj/item/device/pda/medical/New()
..()
var/datum/pda_app/ringer/app = new /datum/pda_app/ringer()
app.onInstall(src)
app.frequency = deskbell_freq_medbay
/obj/item/device/pda/viro
name = "Virology PDA"
default_cartridge = /obj/item/weapon/cartridge/medical
icon_state = "pda-v"
/obj/item/device/pda/viro/New()
..()
var/datum/pda_app/ringer/app = new /datum/pda_app/ringer()
app.onInstall(src)
app.frequency = deskbell_freq_medbay
/obj/item/device/pda/engineering
name = "Engineering PDA"
default_cartridge = /obj/item/weapon/cartridge/engineering
icon_state = "pda-e"
/obj/item/device/pda/security
name = "Security PDA"
default_cartridge = /obj/item/weapon/cartridge/security
icon_state = "pda-s"
/obj/item/device/pda/security/New()
..()
var/datum/pda_app/ringer/app = new /datum/pda_app/ringer()
app.onInstall(src)
app.frequency = deskbell_freq_brig
/obj/item/device/pda/detective
name = "Detective PDA"
default_cartridge = /obj/item/weapon/cartridge/detective
icon_state = "pda-det"
/obj/item/device/pda/detective/New()
..()
var/datum/pda_app/light_upgrade/app = new /datum/pda_app/light_upgrade()
app.onInstall(src)
/obj/item/device/pda/warden
name = "Warden PDA"
default_cartridge = /obj/item/weapon/cartridge/security
icon_state = "pda-warden"
/obj/item/device/pda/warden/New()
..()
var/datum/pda_app/ringer/app = new /datum/pda_app/ringer()
app.onInstall(src)
app.frequency = deskbell_freq_brig
/obj/item/device/pda/janitor
name = "Janitor PDA"
default_cartridge = /obj/item/weapon/cartridge/janitor
icon_state = "pda-j"
ttone = "slip"
/obj/item/device/pda/toxins
name = "Science PDA"
default_cartridge = /obj/item/weapon/cartridge/signal/toxins
icon_state = "pda-tox"
ttone = "boom"
/obj/item/device/pda/toxins/New()
..()
var/datum/pda_app/ringer/app = new /datum/pda_app/ringer()
app.onInstall(src)
app.frequency = deskbell_freq_rnd
/obj/item/device/pda/clown
name = "Clown PDA"
default_cartridge = /obj/item/weapon/cartridge/clown
icon_state = "pda-clown"
desc = "A portable microcomputer by Thinktronic Systems, LTD. The surface is coated with polytetrafluoroethylene and banana drippings."
ttone = "honk"
/obj/item/device/pda/mime
name = "Mime PDA"
default_cartridge = /obj/item/weapon/cartridge/mime
icon_state = "pda-mime"
silent = 1
ttone = "silence"
/obj/item/device/pda/heads
name = "Head of department PDA"
default_cartridge = /obj/item/weapon/cartridge/head
icon_state = "pda-h"
/obj/item/device/pda/heads/hop
name = "Head of Personnel PDA"
default_cartridge = /obj/item/weapon/cartridge/hop
icon_state = "pda-hop"
/obj/item/device/pda/heads/hop/New()
..()
var/datum/pda_app/ringer/app = new /datum/pda_app/ringer()
app.onInstall(src)
app.frequency = deskbell_freq_hop
/obj/item/device/pda/heads/hos
name = "Head of Security PDA"
default_cartridge = /obj/item/weapon/cartridge/hos
icon_state = "pda-hos"
/obj/item/device/pda/heads/hos/New()
..()
var/datum/pda_app/ringer/app = new /datum/pda_app/ringer()
app.onInstall(src)
app.frequency = deskbell_freq_brig
/obj/item/device/pda/heads/ce
name = "Chief Engineer PDA"
default_cartridge = /obj/item/weapon/cartridge/ce
icon_state = "pda-ce"
/obj/item/device/pda/heads/cmo
name = "Chief Medical Officer PDA"
default_cartridge = /obj/item/weapon/cartridge/cmo
icon_state = "pda-cmo"
/obj/item/device/pda/heads/cmo/New()
..()
var/datum/pda_app/ringer/app = new /datum/pda_app/ringer()
app.onInstall(src)
app.frequency = deskbell_freq_medbay
/obj/item/device/pda/heads/rd
name = "Research Director PDA"
default_cartridge = /obj/item/weapon/cartridge/rd
icon_state = "pda-rd"
/obj/item/device/pda/heads/rd/New()
..()
var/datum/pda_app/ringer/app = new /datum/pda_app/ringer()
app.onInstall(src)
app.frequency = deskbell_freq_rnd
/obj/item/device/pda/captain
name = "Captain PDA"
default_cartridge = /obj/item/weapon/cartridge/captain
icon_state = "pda-c"
detonate = 0
//toff = 1
/obj/item/device/pda/captain/New()
..()
for(var/app_type in (typesof(/datum/pda_app) - /datum/pda_app)) //yes, the captain is such a baller that his PDA has all the apps by default.
var/datum/pda_app/app = new app_type() //will have to edit that when emagged/hidden apps get added.
app.onInstall(src)
/obj/item/device/pda/cargo
name = "Cargo PDA"
default_cartridge = /obj/item/weapon/cartridge/quartermaster
icon_state = "pda-cargo"
/obj/item/device/pda/cargo/New()
..()
var/datum/pda_app/ringer/app = new /datum/pda_app/ringer()
app.onInstall(src)
app.frequency = deskbell_freq_cargo
/obj/item/device/pda/quartermaster
name = "Quartermaster PDA"
default_cartridge = /obj/item/weapon/cartridge/quartermaster
icon_state = "pda-q"
/obj/item/device/pda/quartermaster/New()
..()
var/datum/pda_app/ringer/app = new /datum/pda_app/ringer()
app.onInstall(src)
app.frequency = deskbell_freq_cargo
/obj/item/device/pda/shaftminer
name = "Mining PDA"
icon_state = "pda-miner"
/obj/item/device/pda/syndicate
default_cartridge = /obj/item/weapon/cartridge/syndicate
icon_state = "pda-syn"
name = "Military PDA"
hidden = 1
/obj/item/device/pda/syndicate/door
default_cartridge = /obj/item/weapon/cartridge/syndicatedoor
/obj/item/device/pda/chaplain
name = "Chaplain PDA"
icon_state = "pda-holy"
ttone = "holy"
/obj/item/device/pda/lawyer
name = "Lawyer PDA"
default_cartridge = /obj/item/weapon/cartridge/lawyer
icon_state = "pda-lawyer"
ttone = "..."
/obj/item/device/pda/botanist
name = "Botany PDA"
//default_cartridge = /obj/item/weapon/cartridge/botanist
icon_state = "pda-hydro"
/obj/item/device/pda/roboticist
name = "Robotics PDA"
icon_state = "pda-robot"
/obj/item/device/pda/librarian
name = "Librarian PDA"
icon_state = "pda-libb"
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a WGW-11 series e-reader."
note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!"
silent = 1 //Quiet in the library!
/obj/item/device/pda/clear
icon_state = "pda-transp"
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a special edition with a transparent case."
note = "Congratulations, you have chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Max Turbo Limited Edition!"
/obj/item/device/pda/chef
name = "Chef PDA"
default_cartridge = /obj/item/weapon/cartridge/chef
icon_state = "pda-chef"
/obj/item/device/pda/bar
name = "Bartender PDA"
icon_state = "pda-bar"
/obj/item/device/pda/atmos
name = "Atmospherics PDA"
default_cartridge = /obj/item/weapon/cartridge/atmos
icon_state = "pda-atmo"
/obj/item/device/pda/mechanic
name = "Mechanic PDA"
default_cartridge = /obj/item/weapon/cartridge/mechanic
icon_state = "pda-atmo"
/obj/item/device/pda/chemist
name = "Chemistry PDA"
default_cartridge = /obj/item/weapon/cartridge/chemistry
icon_state = "pda-chem"
/obj/item/device/pda/geneticist
name = "Genetics PDA"
default_cartridge = /obj/item/weapon/cartridge/medical
icon_state = "pda-gene"
// Special AI/pAI PDAs that cannot explode.
/obj/item/device/pda/ai
icon_state = "NONE"
ttone = "data"
detonate = 0
/obj/item/device/pda/ai/New()
..()
var/datum/pda_app/spam_filter/app = new /datum/pda_app/spam_filter()
app.onInstall(src)
/obj/item/device/pda/ai/proc/set_name_and_job(newname as text, newjob as text)
owner = newname
ownjob = newjob
name = newname + " (" + ownjob + ")"
//AI verb and proc for sending PDA messages.
/mob/living/silicon/ai/proc/cmd_send_pdamesg()
var/list/names = list()
var/list/plist = list()
var/list/namecounts = list()
if(usr.stat == 2)
to_chat(usr, "You can't send PDA messages because you are dead!")
return
if(src.aiPDA.toff)
to_chat(usr, "Turn on your receiver in order to send messages.")
return
for (var/obj/item/device/pda/P in get_viewable_pdas())
if (P == src)
continue
else if (P == src.aiPDA)
continue
var/name = P.owner
if (name in names)
namecounts[name]++
name = text("[name] ([namecounts[name]])")
else
names.Add(name)
namecounts[name] = 1
plist[text("[name]")] = P
var/c = input(usr, "Please select a PDA") as null|anything in sortList(plist)
if (!c)
return
var/selected = plist[c]
src.aiPDA.create_message(src, selected)
//AI verb and proc for sending PDA messages.
/obj/item/device/pda/ai/verb/cmd_send_pdamesg()
set category = "AI Commands"
set name = "Send Message"
set src in usr
if(usr.isDead())
to_chat(usr, "You can't send PDA messages because you are dead!")
return
var/list/plist = available_pdas()
if (plist)
var/c = input(usr, "Please select a PDA") as null|anything in sortList(plist)
if (!c) // if the user hasn't selected a PDA file we can't send a message
return
var/selected = plist[c]
create_message(usr, selected)
/obj/item/device/pda/ai/verb/cmd_toggle_pda_receiver()
set category = "AI Commands"
set name = "Toggle Sender/Receiver"
set src in usr
if(usr.isDead())
to_chat(usr, "You can't do that because you are dead!")
return
toff = !toff
to_chat(usr, "<span class='notice'>PDA sender/receiver toggled [(toff ? "Off" : "On")]!</span>")
/obj/item/device/pda/ai/verb/cmd_toggle_pda_silent()
set category = "AI Commands"
set name = "Toggle Ringer"
set src in usr
if(usr.isDead())
to_chat(usr, "You can't do that because you are dead!")
return
silent=!silent
to_chat(usr, "<span class='notice'>PDA ringer toggled [(silent ? "Off" : "On")]!</span>")
/obj/item/device/pda/ai/verb/cmd_show_message_log()
set category = "AI Commands"
set name = "Show Message Log"
set src in usr
if(usr.isDead())
to_chat(usr, "You can't do that because you are dead!")
return
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>[tnote]</body></html>"
usr << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
/mob/living/silicon/ai/proc/cmd_show_message_log()
if(usr.isDead())
to_chat(usr, "You can't do that because you are dead!")
return
if(!isnull(aiPDA))
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>[aiPDA.tnote]</body></html>"
usr << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
else
to_chat(usr, "You do not have a PDA. You should make an issue report about this.")
/obj/item/device/pda/ai/attack_self(mob/user as mob)
if ((honkamt > 0) && (prob(60)))//For clown virus.
honkamt--
playsound(loc, 'sound/items/bikehorn.ogg', 30, 1)
return
/obj/item/device/pda/ai/pai
ttone = "assist"
/*
* The Actual PDA
*/
/obj/item/device/pda/New()
..()
PDAs += src
if(default_cartridge)
cartridge = new default_cartridge(src)
new /obj/item/weapon/pen(src)
MM = text2num(time2text(world.timeofday, "MM")) // get the current month
DD = text2num(time2text(world.timeofday, "DD")) // get the day
currentevent1 = pick(currentevents1)
currentevent2 = pick(currentevents2)
currentevent3 = pick(currentevents3)
onthisday = pick(history)
didyouknow = pick(facts)
/obj/item/device/pda/proc/can_use(mob/user)
if(user && ismob(user))
if(user.incapacitated())
return 0
if(loc == user)
return 1
return 0
/obj/item/device/pda/GetAccess()
if(id)
return id.GetAccess()
else
return ..()
/obj/item/device/pda/GetID()
return id
/obj/item/device/pda/get_owner_name_from_ID()
return owner
/obj/item/device/pda/MouseDrop(obj/over_object as obj, src_location, over_location)
var/mob/M = usr
if((!istype(over_object, /obj/screen)) && can_use(M))
return attack_self(M)
return
//NOTE: graphic resources are loaded on client login
/obj/item/device/pda/attack_self(mob/user as mob)
user.set_machine(src)
if(active_uplink_check(user))
return
if(user.client)
var/datum/asset/simple/C = new/datum/asset/simple/pda()
send_asset_list(user.client, C.assets)
var/dat = list()
dat += {"
<html>
<head><title>Personal Data Assistant</title></head>
<body>
<link rel="stylesheet" type="text/css" href="pda.css"/> <!--This stylesheet contains all the PDA icons in base 64!-->
"}
dat += "<a href='byond://?src=\ref[src];choice=Close'><span class='pda_icon pda_exit'></span> Close</a>"
if ((!isnull(cartridge)) && (mode == 0))
dat += " | <a href='byond://?src=\ref[src];choice=Eject'><span class='pda_icon pda_eject'></span> Eject [cartridge]</a>"
if (mode)
dat += " | <a href='byond://?src=\ref[src];choice=Return'><span class='pda_icon pda_menu'></span> Return</a>"
dat += {"| <a href='byond://?src=\ref[src];choice=Refresh'><span class='pda_icon pda_refresh'></span> Refresh</a>
<br>"}
if (!owner)
dat += {"Warning: No owner information entered. Please swipe card.<br><br>
<a href='byond://?src=\ref[src];choice=Refresh'><span class='pda_icon pda_refresh'></span> Retry</a>"}
else
switch (mode)
if (0)
dat += {"<h2>PERSONAL DATA ASSISTANT v.1.3</h2>
Owner: [owner], [ownjob]<br>"}
dat += text("ID: <A href='?src=\ref[src];choice=Authenticate'>[id ? "[id.registered_name], [id.assignment]" : "----------"]")
dat += text("<br><A href='?src=\ref[src];choice=UpdateInfo'>[id ? "Update PDA Info" : ""]</A><br><br>")
dat += {"Station Time: [worldtime2text()]
<br><br>
<h4>General Functions</h4>
<ul>
<li><a href='byond://?src=\ref[src];choice=1'><span class='pda_icon pda_notes'></span> Notekeeper</a></li>
<li><a href='byond://?src=\ref[src];choice=2'><span class='pda_icon pda_mail'></span> Messenger</a></li>
<li><a href='byond://?src=\ref[src];choice=50'><span class='pda_icon pda_clock'></span> Current Events</a></li>"}
//dat += "<li><a href='byond://?src=[src];choice=chatroom'><span class='pda_icon pda_chatroom'></span> Nanotrasen Relay Chat</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=41'><span class='pda_icon pda_notes'></span> View Crew Manifest</a></li>"
if (cartridge)
if (cartridge.access_clown)
dat += "<li><a href='byond://?src=\ref[src];choice=Honk'><span class='pda_icon pda_honk'></span> Honk Synthesizer</a></li>"
if(cartridge.access_status_display)
dat += "<li><a href='byond://?src=\ref[src];choice=42'><span class='pda_icon pda_status'></span> Set Status Display</a></li>"
dat += "</ul>"
dat += {"<h4>Applications</h4>"}
if(applications.len == 0)
dat += {"<i>No application currently installed.</i>"}
else
dat += {"<ul>"}
for(var/datum/pda_app/app in applications)
if(app.menu)
dat += {"<li><a href='byond://?src=\ref[src];choice=[app.menu]'>[app.icon ? "<span class='pda_icon [app.icon]'></span> " : ""][app.name]</a></li>"}
else
dat += {"<li>[app.icon ? "<span class='pda_icon [app.icon]'></span> " : ""][app.name]</li>"}
dat += {"</ul>"}
if (cartridge)
if (cartridge.access_engine || cartridge.access_atmos)
dat += {"<h4>Engineering Functions</h4>
<ul>
<li><a href='byond://?src=\ref[src];choice=43'><span class='pda_icon pda_power'></span> Power Monitor</a></li>
<li><a href='byond://?src=\ref[src];choice=53'><span class='pda_icon pda_alert'></span> Alert Monitor</a></li>
</ul>"}
if (cartridge.access_mechanic)
dat += {"<h4>Mechanic Functions</h4>
<ul>
<li><a href='byond://?src=\ref[src];choice=Device Analyser'><span class='pda_icon pda_scanner'></span> [scanmode == SCANMODE_DEVICE ? "Disable" : "Enable" ] Device Analyser</a></li>
</ul>"}
if (cartridge.access_medical)
dat += {"<h4>Medical Functions</h4>
<ul>
<li><a href='byond://?src=\ref[src];choice=44'><span class='pda_icon pda_medical'></span> Medical Records</a></li>
<li><a href='byond://?src=\ref[src];choice=Medical Scan'><span class='pda_icon pda_scanner'></span> [scanmode == SCANMODE_MEDICAL ? "Disable" : "Enable"] Medical Scanner</a></li>
</ul>"}
if (cartridge.access_security)
dat += {"<h4>Security Functions</h4>
<ul>
<li><a href='byond://?src=\ref[src];choice=45'><span class='pda_icon pda_cuffs'></span> Security Records</A></li>"}
if(istype(cartridge.radio, /obj/item/radio/integrated/beepsky))
dat += {"<li><a href='byond://?src=\ref[src];choice=46'><span class='pda_icon pda_cuffs'></span> Security Bot Access</a></li>
</ul>"}
else
dat += "</ul>"
if(cartridge.access_quartermaster)
dat += {"<h4>Quartermaster Functions:</h4>
<ul>
<li><a href='byond://?src=\ref[src];choice=47'><span class='pda_icon pda_crate'></span> Supply Records</A></li>
<li><a href='byond://?src=\ref[src];choice=48'><span class='pda_icon pda_mule'></span> Delivery Bot Control</A></li>
</ul>"}
dat += {"</ul>
<h4>Utilities</h4>
<ul>"}
if (cartridge)
if (cartridge.access_janitor)
dat += "<li><a href='byond://?src=\ref[src];choice=49'><span class='pda_icon pda_bucket'></span> Custodial Locator</a></li>"
if (istype(cartridge.radio, /obj/item/radio/integrated/signal))
dat += "<li><a href='byond://?src=\ref[src];choice=40'><span class='pda_icon pda_signaler'></span> Signaler System</a></li>"
if (cartridge.access_reagent_scanner)
dat += "<li><a href='byond://?src=\ref[src];choice=Reagent Scan'><span class='pda_icon pda_reagent'></span> [scanmode == SCANMODE_REAGENT ? "Disable" : "Enable"] Reagent Scanner</a></li>"
if (cartridge.access_engine)
dat += "<li><a href='byond://?src=\ref[src];choice=Halogen Counter'><span class='pda_icon pda_reagent'></span> [scanmode == SCANMODE_HALOGEN ? "Disable" : "Enable"] Halogen Counter</a></li>"
if (cartridge.access_atmos)
dat += "<li><a href='byond://?src=\ref[src];choice=Gas Scan'><span class='pda_icon pda_reagent'></span> [scanmode == SCANMODE_ATMOS ? "Disable" : "Enable"] Gas Scanner</a></li>"
if (cartridge.access_remote_door)
dat += "<li><a href='byond://?src=\ref[src];choice=Toggle Door'><span class='pda_icon pda_rdoor'></span> Toggle Remote Door</a></li>"
dat += {"<li><a href='byond://?src=\ref[src];choice=3'><span class='pda_icon pda_atmos'></span> Atmospheric Scan</a></li>
<li><a href='byond://?src=\ref[src];choice=Light'><span class='pda_icon pda_flashlight'></span> [fon ? "Disable" : "Enable"] Flashlight</a></li>"}
if (pai)
if(pai.loc != src)
pai = null
else
dat += {"<li><a href='byond://?src=\ref[src];choice=pai;option=1'>pAI Device Configuration</a></li>
<li><a href='byond://?src=\ref[src];choice=pai;option=2'>Eject pAI Device</a></li>"}
dat += "</ul>"
if (1)
dat += {"<h4><span class='pda_icon pda_notes'></span> Notekeeper V2.1</h4>
<a href='byond://?src=\ref[src];choice=Edit'> Edit</a><br>"}
dat += note
if (2)
dat += {"<h4><span class='pda_icon pda_mail'></span> SpaceMessenger V3.9.4</h4>
<a href='byond://?src=\ref[src];choice=Toggle Ringer'><span class='pda_icon pda_bell'></span> Ringer: [silent == 1 ? "Off" : "On"]</a> |
<a href='byond://?src=\ref[src];choice=Toggle Messenger'><span class='pda_icon pda_mail'></span> Send / Receive: [toff == 1 ? "Off" : "On"]</a> |
<a href='byond://?src=\ref[src];choice=Ringtone'><span class='pda_icon pda_bell'></span> Set Ringtone</a> |
<a href='byond://?src=\ref[src];choice=21'><span class='pda_icon pda_mail'></span> Messages</a><br>"}
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate))
dat += "<b>[cartridge:shock_charges] detonation charges left.</b><HR>"
if (istype(cartridge, /obj/item/weapon/cartridge/clown))
dat += "<b>[cartridge:honk_charges] viral files left.</b><HR>"
if (istype(cartridge, /obj/item/weapon/cartridge/mime))
dat += "<b>[cartridge:mime_charges] viral files left.</b><HR>"
dat += {"<h4><span class='pda_icon pda_menu'></span> Detected PDAs</h4>
<ul>"}
var/count = 0
if (!toff)
for (var/obj/item/device/pda/P in sortNames(get_viewable_pdas()))
if (P == src)
continue
if(P.hidden)
continue
dat += "<li><a href='byond://?src=\ref[src];choice=Message;target=\ref[P]'>[P]</a>"
if (id && !istype(P,/obj/item/device/pda/ai))
dat += " (<a href='byond://?src=\ref[src];choice=transferFunds;target=\ref[P]'><span class='pda_icon pda_money'></span>*Send Money*</a>)"
if (istype(cartridge, /obj/item/weapon/cartridge/syndicate) && P.detonate)
dat += " (<a href='byond://?src=\ref[src];choice=Detonate;target=\ref[P]'><span class='pda_icon pda_boom'></span>*Detonate*</a>)"
if (istype(cartridge, /obj/item/weapon/cartridge/clown))
dat += " (<a href='byond://?src=\ref[src];choice=Send Honk;target=\ref[P]'><span class='pda_icon pda_honk'></span>*Send Virus*</a>)"
if (istype(cartridge, /obj/item/weapon/cartridge/mime))
dat += " (<a href='byond://?src=\ref[src];choice=Send Silence;target=\ref[P]'>*Send Virus*</a>)"
dat += "</li>"
count++
dat += "</ul>"
if (count == 0)
dat += "None detected.<br>"
if(21)
dat += {"<h4><span class='pda_icon pda_mail'></span> SpaceMessenger V3.9.4</h4>
<a href='byond://?src=\ref[src];choice=Clear'><span class='pda_icon pda_blank'></span> Clear Messages</a>
<h4><span class='pda_icon pda_mail'></span> Messages</h4>"}
dat += tnote
dat += "<br>"
if (3)
dat += "<h4><span class='pda_icon pda_atmos'></span> Atmospheric Readings</h4>"
var/turf/T = get_turf(user.loc)
if (isnull(T))
dat += "Unable to obtain a reading.<br>"
else
var/datum/gas_mixture/environment = T.return_air()
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles()
dat += "Air Pressure: [round(pressure,0.1)] kPa<br>"
if (total_moles)
var/o2_level = environment.oxygen/total_moles
var/n2_level = environment.nitrogen/total_moles
var/co2_level = environment.carbon_dioxide/total_moles
var/plasma_level = environment.toxins/total_moles
var/unknown_level = 1-(o2_level+n2_level+co2_level+plasma_level)
dat += {"Nitrogen: [round(n2_level*100)]%<br>
Oxygen: [round(o2_level*100)]%<br>
Carbon Dioxide: [round(co2_level*100)]%<br>
Plasma: [round(plasma_level*100)]%<br>"}
if(unknown_level > 0.01)
dat += "OTHER: [round(unknown_level)]%<br>"
dat += "Temperature: [round(environment.temperature-T0C)]°C<br>"
dat += "<br>"
if (5)
dat += {"<h4><span class='pda_icon pda_chatroom'></span> Nanotrasen Relay Chat</h4>
<h4><span class='pda_icon pda_menu'></span> Detected Channels</h4>: <li>"}
for(var/datum/chatroom/C in chatrooms)
dat += "<a href='byond://?src=\ref[src];pdachannel=[C.name]'>#[html_encode(lowertext(C.name))]"
if(C.password != "")
dat += " <span class='pda_icon pda_locked'></span>"
dat += "</li>"
if (41) //Allows everyone to access crew
dat += {"<h4><span class='pda_icon pda_notes'></span> Crew Manifest</h4>
Entries cannot be modified from this terminal.<br><br>"}
if(data_core)
dat += data_core.get_manifest(1) // make it monochrome
dat += "<br>"
if (50) //Current events.
dat += {"<h4><span class='pda_icon pda_clock'></span> Current Events</h4>
Station Time: <b>[worldtime2text()]</b>.<br>
Empire Date: <b>[MM]/[DD]/[game_year]</b>.<br><br>
<b>Current Events,</b><br>
<li>[currentevent1]</li<br>
<li>[currentevent2]</li><br>
<li>[currentevent3]</li><br><br>
<b>On this day,</b><br>
<li>[onthisday]</li><br><br>
<b>Did you know...</b><br>
<li>[didyouknow]</li><br>"}
if (PDA_APP_RINGER)
var/datum/pda_app/ringer/app = locate(/datum/pda_app/ringer) in applications
dat += {"<h4>Ringer Application</h4>"}
if(app)
dat += {"
Status: <a href='byond://?src=\ref[src];choice=toggleDeskRinger'>[app.status ? "On" : "Off"]</a><br>
Frequency:
<a href='byond://?src=\ref[src];choice=ringerFrequency;rfreq=-10'>-</a>
<a href='byond://?src=\ref[src];choice=ringerFrequency;rfreq=-2'>-</a>
[format_frequency(app.frequency)]
<a href='byond://?src=\ref[src];choice=ringerFrequency;rfreq=2'>+</a>
<a href='byond://?src=\ref[src];choice=ringerFrequency;rfreq=10'>+</a><br>
<br>
"}
if (PDA_APP_SPAMFILTER)
var/datum/pda_app/spam_filter/app = locate(/datum/pda_app/spam_filter) in applications
dat += {"<h4>Spam Filtering Application</h4>"}
if(app)
dat += {"
<ul>
<li>[(app.function == 2) ? "<b>Block the spam.</b>" : "<a href='byond://?src=\ref[src];choice=setFilter;filter=2'>Block the spam.</a>"]</li>
<li>[(app.function == 1) ? "<b>Conceal the spam.</b>" : "<a href='byond://?src=\ref[src];choice=setFilter;filter=1'>Conceal the spam.</a>"]</li>
<li>[(app.function == 0) ? "<b>Do nothing.</b>" : "<a href='byond://?src=\ref[src];choice=setFilter;filter=0'>Do nothing.</a>"]</li>
</ul>
"}
if (PDA_APP_BALANCECHECK)
var/datum/pda_app/balance_check/app = locate(/datum/pda_app/balance_check) in applications
dat += {"<h4><span class='pda_icon [app.icon]'></span> Virtual Wallet and Balance Check Application</h4>"}
if(app)
if(!id)
dat += {"<i>Insert an ID card in the PDA to use this application.</i>"}
else
if(!id.virtual_wallet)
id.update_virtual_wallet()
dat += {"<hr>
<h5>Virtual Wallet</h5>
Owner: <b>[id.virtual_wallet.owner_name]</b><br>
Balance: <b>[id.virtual_wallet.money]</b>$ <u><a href='byond://?src=\ref[src];choice=printCurrency'><span class='pda_icon [app.icon]'></span>Print Currency</a></u>
<h6>Transaction History</h6>
On [MM]/[DD]/[game_year]:
<ul>
"}
var/list/v_log = list()
for(var/e in id.virtual_wallet.transaction_log)
v_log += e
for(var/datum/transaction/T in reverseRange(v_log))
dat += {"<li>\[[T.time]\] [T.amount]$, [T.purpose] at [T.source_terminal]</li>"}
dat += {"</ul><hr>"}
if(!(app.linked_db))
app.reconnect_database()
if(app.linked_db)
if(app.linked_db.activated)
var/datum/money_account/D = app.linked_db.attempt_account_access(id.associated_account_number, 0, 2, 0)
if(D)
dat += {"
<h5>Bank Account</h5>
Owner: <b>[D.owner_name]</b><br>
Balance: <b>[D.money]</b>$
<h6>Transaction History</h6>
On [MM]/[DD]/[game_year]:
<ul>
"}
var/list/t_log = list()
for(var/e in D.transaction_log)
t_log += e
for(var/datum/transaction/T in reverseRange(t_log))
if(T.purpose == "Account creation")//always the last element of the reverse transaction_log
dat += {"</ul>
On [(DD == 1) ? "[((MM-2)%12)+1]" : "[MM]"]/[((DD-2)%30)+1]/[(DD == MM == 1) ? "[game_year - 1]" : "[game_year]"]:
<ul>
<li>\[[T.time]\] [T.amount]$, [T.purpose] at [T.source_terminal]</li>
</ul>"}
else
dat += {"<li>\[[T.time]\] [T.amount]$, [T.purpose] at [T.source_terminal]</li>"}
if(!D.transaction_log.len)
dat += {"</ul>"}
else
dat += {"
<h5>Bank Account</h5>
<i>Unable to access bank account. Either its security settings don't allow remote checking or the account is nonexistent.</i>
"}
else
dat += {"
<h5>Bank Account</h5>
<i>Unfortunately your station's Accounts Database doesn't allow remote access. Negociate with your HoP or Captain to solve this issue.</i>
"}
else
dat += {"
<h5>Bank Account</h5>
<i>Unable to connect to accounts database. The database is either nonexistent, inoperative, or too far away.</i>
"}
if (PDA_APP_STATIONMAP)
if(user.client)
var/datum/asset/simple/C = new/datum/asset/simple/pda_stationmap()
send_asset_list(user.client, C.assets)
var/datum/pda_app/station_map/app = locate(/datum/pda_app/station_map) in applications
dat += {"<h4>Station Map Application</h4>"}
if(app)
var/turf/T = get_turf(src.loc)
if(!fexists("icons/pda_icons/pda_minimap_[map.nameShort].png"))
dat += {"<span class='warning'>It appears that our services have yet to produce a minimap of this station. We apologize for the inconvenience.</span>"}
if(T.z == map.zMainStation)
dat += {"Current Location: <b>[T.loc.name] ([T.x-WORLD_X_OFFSET[map.zMainStation]],[T.y-WORLD_Y_OFFSET[map.zMainStation]],1)</b><br>"} //it's a "Station Map" app, so it only gives information reguarding
else //the station's z-level
dat += {"Current Location: <b>Unknown</b><br>"}
if(fexists("icons/pda_icons/pda_minimap_[map.nameShort].png"))
dat += {"
<div style="position: relative; left: 0; top: 0;">
<img src="pda_minimap_[map.nameShort].png" style="position: relative; top: 0; left: 0;"/>
"}
if(T.z == map.zMainStation)
dat += {"<img src="pda_minimap_loc.gif" style="position: absolute; top: [(T.y * -1) + PDA_MINIMAP_OFFSET_Y + PDA_MINIMAP_WIDTH/2]px; left: [T.x + PDA_MINIMAP_OFFSET_X - PDA_MINIMAP_WIDTH/2]px;"/>"}
for(var/datum/minimap_marker/mkr in app.markers)
dat += {"<img src="pda_minimap_mkr.gif" style="position: absolute; top: [((mkr.y+WORLD_Y_OFFSET[map.zMainStation]) * -1) + PDA_MINIMAP_OFFSET_Y + PDA_MINIMAP_WIDTH/2]px; left: [mkr.x+WORLD_X_OFFSET[map.zMainStation] + PDA_MINIMAP_OFFSET_X - PDA_MINIMAP_WIDTH/2]px;"/>"}
dat += {"</div>"}
else
dat += {"
<div style="position: relative; left: 0; top: 0;">
<img src="pda_minimap_bg_notfound.png" style="position: relative; top: 0; left: 0;"/>
"}
if(T.z == map.zMainStation)
dat += {"<img src="pda_minimap_loc.gif" style="position: absolute; top: [(T.y * -1) + PDA_MINIMAP_OFFSET_Y + PDA_MINIMAP_WIDTH/2]px; left: [T.x + PDA_MINIMAP_OFFSET_X - PDA_MINIMAP_WIDTH/2]px;"/>"}