-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathrandomverbs.dm
1607 lines (1343 loc) · 61.7 KB
/
randomverbs.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
/client/proc/cmd_admin_drop_everything(mob/M in GLOB.mob_list)
set category = null
set name = "Drop Everything"
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(usr, "Make [M] drop everything?", "Message", list("Yes", "No"))
if(confirm != "Yes")
return
for(var/obj/item/W in M)
if(!M.dropItemToGround(W))
qdel(W)
M.regenerate_icons()
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
var/msg = "[key_name(usr)] made [key_name(M)] drop everything!" // yogs - Yog Tickets
message_admins(msg)
admin_ticket_log(M, msg)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Drop Everything") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_subtle_message(mob/M in GLOB.mob_list)
set category = "Admin.Player Interaction"
set name = "Subtle Message"
if(!ismob(M))
return
if(!check_rights(R_ADMIN))
return
message_admins("[key_name_admin(src)] has started answering [ADMIN_LOOKUPFLW(M)]'s prayer.")
var/msg = input("Message:", text("Subtle PM to [M.key]")) as text|null
if(!msg)
message_admins("[key_name_admin(src)] decided not to answer [ADMIN_LOOKUPFLW(M)]'s prayer")
return
if(usr)
if (usr.client)
if(usr.client.holder)
to_chat(M, span_big("<i>You hear a voice in your head... <b>[msg]</i></b>"))
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
msg = "SubtleMessage: [key_name(usr)] -> [key_name(M)] : [msg]" // yogs - Yog Tickets
message_admins(msg)
admin_ticket_log(M, msg)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_headset_message(mob/M in GLOB.mob_list)
set category = "Admin.Player Interaction"
set name = "Headset Message"
admin_headset_message(M)
/client/proc/admin_headset_message(mob/M in GLOB.mob_list, sender = null)
var/mob/living/carbon/human/H = M
if(!check_rights(R_ADMIN))
return
if(!istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human", confidential=TRUE)
return
if(!istype(H.ears, /obj/item/radio/headset))
to_chat(usr, "The person you are trying to contact is not wearing a headset.", confidential=TRUE)
return
if (!sender)
sender = input("Who is the message from?", "Sender") as null|anything in list(RADIO_CHANNEL_CENTCOM,RADIO_CHANNEL_SYNDICATE)
if(!sender)
return
message_admins("[key_name_admin(src)] has started answering [key_name_admin(H)]'s [sender] request.")
var/input = input("Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from [sender]", "") as text|null
if(!input)
message_admins("[key_name_admin(src)] decided not to answer [key_name_admin(H)]'s [sender] request.")
return
log_directed_talk(mob, H, input, LOG_ADMIN, "reply")
message_admins("[key_name_admin(src)] replied to [key_name_admin(H)]'s [sender] message with: \"[input]\"")
to_chat(H, "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from [sender == "Syndicate" ? "your benefactor" : "Central Command"]. Message as follows[sender == "Syndicate" ? ", agent." : ":"] [span_bold("[input].")] Message ends.\"")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Headset Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_mod_antag_rep(client/C in GLOB.clients, operation)
set category = "Misc.Unused"
set name = "Modify Antagonist Reputation"
if(!check_rights(R_ADMIN))
return
var/msg = ""
var/log_text = ""
if(operation == "zero")
log_text = "Set to 0"
SSpersistence.antag_rep -= C.ckey
else
var/prompt = "Please enter the amount of reputation to [operation]:"
if(operation == "set")
prompt = "Please enter the new reputation value:"
msg = input("Message:", prompt) as num|null
if (!msg)
return
var/ANTAG_REP_MAXIMUM = CONFIG_GET(number/antag_rep_maximum)
if(operation == "set")
log_text = "Set to [num2text(msg)]"
SSpersistence.antag_rep[C.ckey] = max(0, min(msg, ANTAG_REP_MAXIMUM))
else if(operation == "add")
log_text = "Added [num2text(msg)]"
SSpersistence.antag_rep[C.ckey] = min(SSpersistence.antag_rep[C.ckey]+msg, ANTAG_REP_MAXIMUM)
else if(operation == "subtract")
log_text = "Subtracted [num2text(msg)]"
SSpersistence.antag_rep[C.ckey] = max(SSpersistence.antag_rep[C.ckey]-msg, 0)
else
to_chat(src, "Invalid operation for antag rep modification: [operation] by user [key_name(usr)]", confidential=TRUE)
return
if(SSpersistence.antag_rep[C.ckey] <= 0)
SSpersistence.antag_rep -= C.ckey
log_admin("[key_name(usr)]: Modified [key_name(C)]'s antagonist reputation [log_text]")
message_admins(span_adminnotice("[key_name_admin(usr)]: Modified [key_name(C)]'s antagonist reputation ([log_text])"))
SSblackbox.record_feedback("tally", "admin_verb", 1, "Modify Antagonist Reputation") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_world_narrate()
set category = "Admin.Round Interaction"
set name = "Global Narrate"
if(!check_rights(R_ADMIN))
return
var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text|null
if (!msg)
return
to_chat(world, "[msg]")
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
message_admins(span_adminnotice("[key_name_admin(usr)] Sent a global narrate"))
SSblackbox.record_feedback("tally", "admin_verb", 1, "Global Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_direct_narrate(mob/M)
set category = "Admin.Player Interaction"
set name = "Direct Narrate"
if(!check_rights(R_ADMIN))
return
if(!M)
M = input("Direct narrate to whom?", "Active Players") as null|anything in GLOB.player_list
if(!M)
return
var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text|null
if( !msg )
return
to_chat(M, msg)
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
msg = "DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]" // yogs - Yog Tickets
message_admins(msg)
admin_ticket_log(M, msg)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Direct Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_local_narrate(atom/A)
set category = "Admin.Player Interaction"
set name = "Local Narrate"
if(!check_rights(R_ADMIN))
return
if(!A)
return
var/range = input("Range:", "Narrate to mobs within how many tiles:", 7) as num|null
if(!range)
return
var/msg = input("Message:", text("Enter the text you wish to appear to everyone within view:")) as text|null
if (!msg)
return
for(var/mob/M in view(range,A))
to_chat(M, msg)
log_admin("LocalNarrate: [key_name(usr)] at [AREACOORD(A)]: [msg]")
message_admins(span_adminnotice("<b> LocalNarrate: [key_name_admin(usr)] at [ADMIN_VERBOSEJMP(A)]:</b> [msg]<BR>"))
SSblackbox.record_feedback("tally", "admin_verb", 1, "Local Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_godmode(mob/M in GLOB.mob_list)
set category = "Admin.Player Interaction"
set name = "Godmode"
if(!check_rights(R_ADMIN))
return
M.status_flags ^= GODMODE
to_chat(usr, span_adminnotice("Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]"), confidential=TRUE)
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]")
var/msg = "[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]" // yogs - Yog Tickets
message_admins(msg)
admin_ticket_log(M, msg)
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Godmode", "[M.status_flags & GODMODE ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/proc/cmd_admin_mute(whom, mute_type, automute = 0)
if(!whom)
return
var/muteunmute
var/mute_string
var/feedback_string
switch(mute_type)
if(MUTE_IC)
mute_string = "IC (say and emote)"
feedback_string = "IC"
if(MUTE_OOC)
mute_string = "OOC"
feedback_string = "OOC"
if(MUTE_PRAY)
mute_string = "pray"
feedback_string = "Pray"
if(MUTE_ADMINHELP)
mute_string = "adminhelp, admin PM and ASAY"
feedback_string = "Adminhelp"
if(MUTE_MENTORHELP)
mute_string = "mentorhelp, mentor PM and MSAY"
feedback_string = "mentorhelp"
if(MUTE_DEADCHAT)
mute_string = "deadchat and DSAY"
feedback_string = "Deadchat"
if(MUTE_ALL)
mute_string = "everything"
feedback_string = "Everything"
else
return
var/client/C
if(istype(whom, /client))
C = whom
else if(istext(whom))
C = GLOB.directory[whom]
else
return
var/datum/preferences/P
if(C)
P = C.prefs
else
P = GLOB.preferences_datums[whom]
if(!P)
return
if(automute)
if(!CONFIG_GET(flag/automute_on))
return
else
if(!check_rights())
return
if(automute)
muteunmute = "auto-muted"
P.muted |= mute_type
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(whom)] from [mute_string]")
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(whom)] from [mute_string].")
if(C)
to_chat(C, "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin.", confidential=TRUE)
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Auto Mute [feedback_string]", "1")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
if(P.muted & mute_type)
muteunmute = "unmuted"
P.muted &= ~mute_type
else
muteunmute = "muted"
P.muted |= mute_type
log_admin("[key_name(usr)] has [muteunmute] [key_name(whom)] from [mute_string]")
message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(whom)] from [mute_string].")
if(C)
to_chat(C, "You have been [muteunmute] from [mute_string] by [key_name(usr, include_name = FALSE)].", confidential=TRUE)
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Mute [feedback_string]", "[P.muted & mute_type]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//I use this proc for respawn character too. /N
/proc/create_xeno(ckey)
if(!ckey)
var/list/candidates = list()
for(var/mob/M in GLOB.player_list)
if(M.stat != DEAD)
continue //we are not dead!
if(!(ROLE_ALIEN in M.client.prefs.be_special))
continue //we don't want to be an alium
if(M.client.is_afk())
continue //we are afk
if(M?.mind?.current?.stat != DEAD)
continue //we have a live body we are tied to
candidates += M.ckey
if(candidates.len)
ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates
else
to_chat(usr, span_danger("Error: create_xeno(): no suitable candidates."), confidential=TRUE)
if(!istext(ckey))
return 0
var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva")
var/obj/effect/landmark/spawn_here = GLOB.xeno_spawn.len ? pick(GLOB.xeno_spawn) : null
var/mob/living/carbon/alien/new_xeno
switch(alien_caste)
if("Queen")
new_xeno = new /mob/living/carbon/alien/humanoid/royal/queen(spawn_here)
if("Praetorian")
new_xeno = new /mob/living/carbon/alien/humanoid/royal/praetorian(spawn_here)
if("Hunter")
new_xeno = new /mob/living/carbon/alien/humanoid/hunter(spawn_here)
if("Sentinel")
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(spawn_here)
if("Drone")
new_xeno = new /mob/living/carbon/alien/humanoid/drone(spawn_here)
if("Larva")
new_xeno = new /mob/living/carbon/alien/larva(spawn_here)
else
return 0
if(!spawn_here)
SSjob.SendToLateJoin(new_xeno, FALSE)
new_xeno.ckey = ckey
var/msg = "[key_name(usr)] has spawned [ckey] as a filthy xeno [alien_caste]." // yogs - Yog Tickets
message_admins(msg)
admin_ticket_log(new_xeno, msg)
return 1
/*
If a guy was gibbed and you want to revive him, this is a good way to do so.
Works kind of like entering the game with a new character. Character receives a new mind if they didn't have one.
Traitors and the like can also be revived with the previous role mostly intact.
/N */
/client/proc/respawn_character()
set category = "Admin.Player Interaction"
set name = "Respawn Character"
set desc = "Respawn a person that has been gibbed/dusted/killed. They must be a ghost for this to work and preferably should not have a body to go back into."
if(!check_rights(R_ADMIN))
return
var/input = ckey(input(src, "Please specify which key will be respawned.", "Key", ""))
if(!input)
return
var/mob/dead/observer/G_found
for(var/mob/dead/observer/G in GLOB.player_list)
if(G.ckey == input)
G_found = G
break
if(!G_found)//If a ghost was not found.
to_chat(usr, "<font color='red'>There is no active key like that in the game or the person is not currently a ghost.</font>", confidential=TRUE)
return
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
//Check if they were an alien
if(G_found.mind.assigned_role == ROLE_ALIEN)
if(tgui_alert(usr,"This character appears to have been an alien. Would you like to respawn them as such?",,list("Yes","No"))=="Yes")
var/turf/T
if(GLOB.xeno_spawn.len)
T = pick(GLOB.xeno_spawn)
var/mob/living/carbon/alien/new_xeno
switch(G_found.mind.special_role)//If they have a mind, we can determine which caste they were.
if("Hunter")
new_xeno = new /mob/living/carbon/alien/humanoid/hunter(T)
if("Sentinel")
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(T)
if("Drone")
new_xeno = new /mob/living/carbon/alien/humanoid/drone(T)
if("Praetorian")
new_xeno = new /mob/living/carbon/alien/humanoid/royal/praetorian(T)
if("Queen")
new_xeno = new /mob/living/carbon/alien/humanoid/royal/queen(T)
else//If we don't know what special role they have, for whatever reason, or they're a larva.
create_xeno(G_found.ckey)
return
if(!T)
SSjob.SendToLateJoin(new_xeno, FALSE)
//Now to give them their mind back.
G_found.mind.transfer_to(new_xeno) //be careful when doing stuff like this! I've already checked the mind isn't in use
new_xeno.key = G_found.key
to_chat(new_xeno, "You have been fully respawned. Enjoy the game.")
var/msg = "[key_name(usr)] has respawned [new_xeno.key] as a filthy xeno." // yogs - Yog Tickets
message_admins(msg)
admin_ticket_log(new_xeno, msg)
return //all done. The ghost is auto-deleted
//check if they were a monkey
else if(findtext(G_found.real_name,"monkey"))
if(tgui_alert(usr, "This character appears to have been a monkey. Would you like to respawn them as such?",,list("Yes","No"))=="Yes")
var/mob/living/carbon/monkey/new_monkey = new
SSjob.SendToLateJoin(new_monkey)
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
new_monkey.key = G_found.key
to_chat(new_monkey, "You have been fully respawned. Enjoy the game.")
var/msg = "[key_name(usr)] has respawned [new_monkey.key] as a filthy xeno." // yogs - Yog Tickets
message_admins(msg)
admin_ticket_log(new_monkey, msg)
return //all done. The ghost is auto-deleted
//Ok, it's not a xeno or a monkey. So, spawn a human.
var/mob/living/carbon/human/new_character = new//The mob being spawned.
SSjob.SendToLateJoin(new_character)
var/datum/data/record/record_found //Referenced to later to either randomize or not randomize the character.
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
/*Try and locate a record for the person being respawned through GLOB.data_core.
This isn't an exact science but it does the trick more often than not.*/
var/id = md5("[G_found.real_name][G_found.mind.assigned_role]")
record_found = find_record("id", id, GLOB.data_core.locked)
if(record_found)//If they have a record we can determine a few things.
new_character.real_name = record_found.fields["name"]
new_character.gender = record_found.fields["gender"]
new_character.age = record_found.fields["age"]
new_character.hardset_dna(record_found.fields["identity"], record_found.fields["enzymes"], null, record_found.fields["name"], record_found.fields["blood_type"], new record_found.fields["species"], record_found.fields["features"])
else
new_character.randomize_human_appearance(~(RANDOMIZE_NAME|RANDOMIZE_SPECIES))
new_character.name = G_found.real_name
new_character.real_name = G_found.real_name
new_character.dna.update_dna_identity()
new_character.name = new_character.real_name
if(G_found.mind && !G_found.mind.active)
G_found.mind.transfer_to(new_character) //be careful when doing stuff like this! I've already checked the mind isn't in use
else
new_character.mind_initialize()
if(!new_character.mind.assigned_role)
new_character.mind.assigned_role = "Assistant"//If they somehow got a null assigned role.
new_character.key = G_found.key
/*
The code below functions with the assumption that the mob is already a traitor if they have a special role.
So all it does is re-equip the mob with powers and/or items. Or not, if they have no special role.
If they don't have a mind, they obviously don't have a special role.
*/
//Two variables to properly announce later on.
var/admin = key_name_admin(src)
var/player_key = G_found.key
//Now for special roles and equipment.
var/datum/antagonist/traitor/traitordatum = new_character.mind.has_antag_datum(/datum/antagonist/traitor)
if(traitordatum)
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)
traitordatum.equip()
switch(new_character.mind.special_role)
if(ROLE_WIZARD)
new_character.forceMove(pick(GLOB.wizardstart))
var/datum/antagonist/wizard/A = new_character.mind.has_antag_datum(/datum/antagonist/wizard,TRUE)
A.equip_wizard()
if(ROLE_OPERATIVE)
new_character.forceMove(pick(GLOB.nukeop_start))
var/datum/antagonist/nukeop/N = new_character.mind.has_antag_datum(/datum/antagonist/nukeop,TRUE)
N.equip_op()
if(ROLE_NINJA)
var/list/ninja_spawn = list()
for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list)
ninja_spawn += L
var/datum/antagonist/ninja/ninjadatum = new_character.mind.has_antag_datum(/datum/antagonist/ninja)
ninjadatum.equip_space_ninja()
if(ninja_spawn.len)
new_character.forceMove(pick(ninja_spawn))
else//They may also be a cyborg or AI.
switch(new_character.mind.assigned_role)
if("Cyborg")//More rigging to make em' work and check if they're traitor.
new_character = new_character.Robotize(TRUE)
if("AI")
new_character = new_character.AIize()
else
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)//Or we simply equip them.
//Announces the character on all the systems, based on the record.
if(!issilicon(new_character))//If they are not a cyborg/AI.
if(!record_found&&new_character.mind.assigned_role!=new_character.mind.special_role)//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway.
//Power to the user!
if(tgui_alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,list("No","Yes"))=="Yes")
GLOB.data_core.manifest_inject(new_character)
if(tgui_alert(new_character,"Would you like an active AI to announce this character?",,list("No","Yes"))=="Yes")
AnnounceArrival(new_character, new_character.mind.assigned_role)
var/msg = "[admin] has respawned [player_key] as [new_character.real_name]." // yogs - Yog Tickets
message_admins(msg)
admin_ticket_log(new_character, msg)
to_chat(new_character, "You have been fully respawned. Enjoy the game.")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Respawn Character") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return new_character
/client/proc/cmd_admin_add_freeform_ai_law()
set category = "Admin.Round Interaction"
set name = "Add Custom AI law"
if(!check_rights(R_ADMIN))
return
var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
if(!input)
return
log_admin("Admin [key_name(usr)] has added a new AI law - [input]")
message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]")
var/show_log = tgui_alert(usr, "Show ion message?", "Message", list("Yes", "No"))
var/announce_ion_laws = (show_log == "Yes" ? 100 : 0)
var/datum/round_event/ion_storm/add_law_only/ion = new()
ion.announceEvent = announce_ion_laws
ion.ionMessage = input
SSblackbox.record_feedback("tally", "admin_verb", 1, "Add Custom AI Law") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_rejuvenate(mob/living/M in GLOB.mob_list)
set category = "Admin.Player Interaction"
set name = "Rejuvenate"
if(!check_rights(R_ADMIN))
return
if(!mob)
return
if(!istype(M))
tgui_alert(usr,"Cannot revive a ghost")
return
M.revive(full_heal = 1, admin_revive = 1)
log_admin("[key_name(usr)] healed / revived [key_name(M)]")
var/msg = "Admin [key_name(usr)] healed / revived [key_name(M)]!" // yogs - Yog Tickets
message_admins(msg)
admin_ticket_log(M, msg)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Rejuvinate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_offer_rename(mob/living/L in GLOB.player_list)
set category = "Admin.Player Interaction"
set name = "Offer Rename"
var/newname
var/forced_answer = " "
var/unforced_answer = " "
if(!check_rights(R_ADMIN))
return
var/forced_rename = alert("Would you like the targeted mob to be allowed to decline?", "Allow decline?", "Yes", "No", "Cancel")
if(forced_rename == "Cancel")
message_admins(span_boldnotice("[usr] has decided not to offer ([L.ckey])[L] a rename."))
log_game("[usr] has decided not to offer ([L.ckey])[L] a rename.")
return
if(forced_rename == "Yes")
if(!L.ckey)
message_admins(span_boldnotice("[usr] attempted to offer a rename to a mob with no player!"))
log_game("[usr] attempted to offer a rename to a mob with no player.")
return
else
unforced_answer = alert(L, "An admin is offering you a chance to rename yourself", "Admin rename?", "Accept", "Decline", "Random Name")
log_game("[usr] forced a rename on [L.ckey].")
else
if(!L.ckey)
message_admins(span_boldnotice("[usr] attempted to offer a rename to a mob with no player!"))
log_game("[usr] attempted to offer a rename to a mob with no player.")
return
else
forced_answer = alert(L, "An admin is \"offering\" you a chance to rename yourself", "Admin rename?", "Accept", "Random Name")
log_game("[usr] chose to offer an optional rename to [L.ckey].")
if(QDELETED(L))
message_admins(span_boldnotice("([L.ckey])[L] has been deleted before they could rename themselves!"))
log_game("([L.ckey])[L] was Qdeleted before they could complete a rename.")
return
if(unforced_answer == "Decline")
message_admins(span_boldnotice("([L.ckey])[L] has declined the rename."))
log_game("([L.ckey])[L] chose to decline an offered rename.")
return
if(forced_answer == "Random Name" || unforced_answer == "Random Name")
newname = random_unique_name(L.gender)
log_game("([L.ckey])[L] chose to use a random name when offered a rename.")
if(forced_answer == "Accept" || unforced_answer == "Accept")
newname = sanitize_name(reject_bad_text(stripped_input(L, "Who are we again?", "Name change", L.real_name, MAX_NAME_LEN)))
log_game("([L.ckey])[L] accepted an offered name change.")
if(isnotpretty(newname))
to_chat(L, span_warning("your chosen name was not accepted! Please ahelp if you would like a second chance."))
message_admins(span_notice("([L.ckey])[L]'s new name [newname] was filtered, and was rejected!"))
log_game("([L.ckey])[L]'s new name [newname] was filtered, and was rejected.")
if(forced_rename == "No")
return
else
newname = random_unique_name(L.gender)
if(!newname || newname == "" || newname == L.real_name)
message_admins(span_boldnotice("[L.ckey]'s new name was blank or unchanged! Defaulting to random!"))
log_game("([L.ckey])[L]'s entered an identical, blank, or null new name, and was defaulted to random.")
newname = random_unique_name(L.gender)
message_admins(span_boldnotice("([L.ckey])[L.real_name] has been admin renamed to [newname]."))
log_game("([L.ckey])[L.real_name] has been renamed to [newname].")
L.fully_replace_character_name(L.real_name, newname)
if(iscarbon(L)) //doing these two JUST to be sure you dont have edge cases of your DNA and mind not matching your new name, somehow
var/mob/living/carbon/C = L
if(C?.dna)
C?.dna?.real_name = newname
if(L?.mind)
L?.mind?.name = newname
SSblackbox.record_feedback("tally", "admin_verb", 1, "Offer Mob Rename") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc
/client/proc/cmd_admin_delete(atom/A as obj|mob|turf in world)
set category = "Misc.Unused"
set name = "Delete"
if(!check_rights(R_ADMIN)) //yogs - makes this +admin instead of +spawn/+debug
return
admin_delete(A)
/client/proc/admin_delete(datum/D)
var/atom/A = D
var/coords = ""
var/jmp_coords = ""
if(istype(A))
var/turf/T = get_turf(A)
if(T)
coords = "at [COORD(T)]"
jmp_coords = "at [ADMIN_COORDJMP(T)]"
else
jmp_coords = coords = "in nullspace"
if (alert(src, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", "Yes", "No") == "Yes")
log_admin("[key_name(usr)] deleted [D] [coords]")
message_admins("[key_name_admin(usr)] deleted [D] [jmp_coords]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Delete") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(isturf(D))
var/turf/T = D
T.ScrapeAway()
else
vv_update_display(D, "deleted", VV_MSG_DELETED)
qdel(D)
if(!QDELETED(D))
vv_update_display(D, "deleted", "")
/client/proc/cmd_admin_list_open_jobs()
set category = "Admin.Round Interaction"
set name = "Manage Job Slots"
if(!check_rights(R_ADMIN))
return
holder.manage_free_slots()
SSblackbox.record_feedback("tally", "admin_verb", 1, "Manage Job Slots") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in world)
set category = "Admin.Round Interaction"
set name = "Explosion"
if(!check_rights(R_ADMIN))
return
var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
if(devastation == null)
return
var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
if(heavy == null)
return
var/light = input("Range of light impact. -1 to none", text("Input")) as num|null
if(light == null)
return
var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
if(flash == null)
return
var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
if(flames == null)
return
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
if (tgui_alert(usr, "Are you sure you want to do this? It will laaag.", "Confirmation", list("Yes", "No")) == "No")
return
explosion(O, devastation, heavy, light, flash, null, null,flames)
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at [AREACOORD(O)]")
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at [AREACOORD(O)]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Explosion") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
else
return
/client/proc/cmd_admin_emp(atom/O as obj|mob|turf in world)
set category = "Admin.Round Interaction"
set name = "EM Pulse"
if(!check_rights(R_ADMIN))
return
var/severity = input("Severity of pulse.", text("Input")) as num|null
if(!isnum(severity))
return
var/range = input("Range of pulse.", text("Input")) as num|null
if(!isnum(range))
range = severity
if (severity)
empulse(O, severity, range)
log_admin("[key_name(usr)] created an EM Pulse ([range] range, [severity] severity) at [AREACOORD(O)]")
message_admins("[key_name_admin(usr)] created an EM Pulse ([range] range, [severity] severity) at [AREACOORD(O)]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "EM Pulse") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
else
return
/client/proc/cmd_admin_gib(mob/living/M in GLOB.mob_list)
set category = "Admin.Player Interaction"
set name = "Gib"
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(usr, "Drop a brain?", "Confirm", list("Yes", "No","Cancel"))
if(confirm == "Cancel")
return
//Due to the delay here its easy for something to have happened to the mob
if(!M)
return
log_admin("[key_name(usr)] has gibbed [key_name(M)]")
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]")
if(isobserver(M))
new /obj/effect/gibspawner/generic(get_turf(M))
return
if(confirm == "Yes")
M.gib()
else
M.gib(1)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Gib") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_gib_self()
set name = "Gibself"
set category = "Admin.Player Interaction"
var/confirm = tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No"))
if(confirm == "Yes")
log_admin("[key_name(usr)] used gibself.")
message_admins(span_adminnotice("[key_name_admin(usr)] used gibself."))
SSblackbox.record_feedback("tally", "admin_verb", 1, "Gib Self") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
var/mob/living/user_mob = mob
user_mob.gib(1, 1, 1)
/client/proc/cmd_admin_check_contents(mob/living/M in GLOB.mob_list)
set category = "Misc.Unused"
set name = "Check Contents"
var/list/L = M.get_contents()
for(var/t in L)
to_chat(usr, "[t]", confidential=TRUE)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Check Contents") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_view_range()
set category = "Misc.Unused"
set name = "Change View Range"
set desc = "switches between 1x and custom views"
if(view_size.getView() == view_size.default)
//yogs start -- Adds customization and warnings
var/newview = input("Select view range:", "FUCK YE", 7) in list(7,10,12,14,32,64,128,"Custom...")
if(newview == "Custom...")
newview = input("Enter custom view range:","FUCK YEEEEE") as num
if(!newview)
return
if(newview >= 64)
if(alert("Warning: Setting your view range to that large size may cause horrendous lag, visual bugs, and/or game crashes. Are you sure?",,"Yes","No") != "Yes")
return
view_size.setTo(newview)
//yogs end
else
view_size.resetToDefault(getScreenSize(prefs.read_preference(/datum/preference/toggle/widescreen)))
log_admin("[key_name(usr)] changed their view range to [view].")
//message_admins("\blue [key_name_admin(usr)] changed their view range to [view].") //why? removed by order of XSI
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Change View Range", "[view]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/admin_call_shuttle()
set category = "Admin.Round Interaction"
set name = "Call Shuttle"
if(EMERGENCY_AT_LEAST_DOCKED)
return
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No"))
if(confirm != "Yes")
return
SSshuttle.emergency.request()
SSblackbox.record_feedback("tally", "admin_verb", 1, "Call Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
message_admins(span_adminnotice("[key_name_admin(usr)] admin-called the emergency shuttle."))
return
/client/proc/admin_cancel_shuttle()
set category = "Admin.Round Interaction"
set name = "Cancel Shuttle"
if(!check_rights(0))
return
if(tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
return
if(EMERGENCY_AT_LEAST_DOCKED)
return
SSshuttle.emergency.cancel()
SSblackbox.record_feedback("tally", "admin_verb", 1, "Cancel Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
message_admins(span_adminnotice("[key_name_admin(usr)] admin-recalled the emergency shuttle."))
return
/client/proc/everyone_random()
set category = "Admin.Round Interaction"
set name = "Make Everyone Random"
set desc = "Make everyone have a random appearance. You can only use this before rounds!"
if(SSticker.HasRoundStarted())
to_chat(usr, "Nope you can't do this, the game's already started. This only works before rounds!", confidential=TRUE)
return
var/frn = CONFIG_GET(flag/force_random_names)
if(frn)
CONFIG_SET(flag/force_random_names, FALSE)
message_admins("Admin [key_name_admin(usr)] has disabled \"Everyone is Special\" mode.")
to_chat(usr, "Disabled.", confidential=TRUE)
return
var/notifyplayers = tgui_alert(usr, "Do you want to notify the players?", "Options", list("Yes", "No", "Cancel"))
if(notifyplayers == "Cancel")
return
log_admin("Admin [key_name(src)] has forced the players to have random appearances.")
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.")
if(notifyplayers == "Yes")
to_chat(world, span_adminnotice("Admin [usr.key] has forced the players to have completely random identities!"))
to_chat(usr, "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>.", confidential=TRUE)
CONFIG_SET(flag/force_random_names, TRUE)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Everyone Random") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/admin_change_sec_level()
set category = "Admin.Round Interaction"
set name = "Set Security Level"
set desc = "Changes the security level. Announcement only, i.e. setting to Delta won't activate nuke"
if(!check_rights(R_ADMIN))
return
var/level = input("Select security level to change to","Set Security Level") as null|anything in list("green","blue","red","gamma","epsilon","delta")
if(level)
SSsecurity_level.set_level(level)
log_admin("[key_name(usr)] changed the security level to [level]")
message_admins("[key_name_admin(usr)] changed the security level to [level]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Set Security Level [capitalize(level)]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in GLOB.nuke_list)
set name = "Toggle Nuke"
set category = "Admin.Round End"
set popup_menu = FALSE
if(!check_rights(R_DEBUG))
return
var/areyousure = alert(src, "Are you sure you want to trigger a nuke?", "Options", "Yes", "No", "Cancel")
if(areyousure == "Cancel" || areyousure == "No")
return
if(N.type != /obj/machinery/nuclearbomb/beer)
var/areyousure2 = alert(src, "THIS WILL BLOW UP THE STATION?", "Options", "Yes", "No", "Cancel")
if(areyousure2 == "Cancel" || areyousure2 == "No")
return
if(!N.timing)
var/newtime = input(usr, "Set activation timer.", "Activate Nuke", "[N.timer_set]") as num|null
if(!newtime)
return
N.timer_set = newtime
N.set_safety()
N.set_active()
log_admin("[key_name(usr)] [N.timing ? "activated" : "deactivated"] a nuke at [AREACOORD(N)].")
message_admins("[ADMIN_LOOKUPFLW(usr)] [N.timing ? "activated" : "deactivated"] a nuke at [ADMIN_VERBOSEJMP(N)].")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Nuke", "[N.timing]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_combo_hud()
set category = "Admin"
set name = "Toggle Combo HUD"
set desc = "Toggles the Admin Combo HUD (antag, sci, med, eng)"
if(!check_rights(R_ADMIN))
return
if (combo_hud_enabled)
disable_combo_hud()
else
enable_combo_hud()
to_chat(usr, "You toggled your admin combo HUD [combo_hud_enabled ? "ON" : "OFF"].", confidential = TRUE)
message_admins("[key_name_admin(usr)] toggled their admin combo HUD [combo_hud_enabled ? "ON" : "OFF"].")
log_admin("[key_name(usr)] toggled their admin combo HUD [combo_hud_enabled ? "ON" : "OFF"].")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Combo HUD", "[combo_hud_enabled ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/enable_combo_hud()
if (combo_hud_enabled)
return
combo_hud_enabled = TRUE
for (var/hudtype in list(DATA_HUD_SECURITY_ADVANCED, DATA_HUD_MEDICAL_ADVANCED, DATA_HUD_DIAGNOSTIC_ADVANCED))
var/datum/atom_hud/atom_hud = GLOB.huds[hudtype]
atom_hud.show_to(mob)
for (var/datum/atom_hud/alternate_appearance/basic/antagonist_hud/antag_hud in GLOB.active_alternate_appearances)
antag_hud.show_to(mob)
mob.update_sight()
/client/proc/disable_combo_hud()
if (!combo_hud_enabled)
return
combo_hud_enabled = FALSE
for (var/hudtype in list(DATA_HUD_SECURITY_ADVANCED, DATA_HUD_MEDICAL_ADVANCED, DATA_HUD_DIAGNOSTIC_ADVANCED))
var/datum/atom_hud/atom_hud = GLOB.huds[hudtype]
atom_hud.hide_from(mob)
for (var/datum/atom_hud/alternate_appearance/basic/antagonist_hud/antag_hud in GLOB.active_alternate_appearances)
antag_hud.hide_from(mob)
mob.update_sight()
/client/proc/run_weather()
set category = "Admin.Round Interaction"
set name = "Run Weather"
set desc = "Triggers a weather on the z-level you choose."
if(!holder)
return
var/weather_type = input("Choose a weather", "Weather") as null|anything in subtypesof(/datum/weather)
if(!weather_type)
return
var/turf/T = get_turf(mob)
var/z_level = input("Z-Level to target?", "Z-Level", T?.z) as num|null
if(!isnum(z_level))
return
SSweather.run_weather(weather_type, z_level)
message_admins("[key_name_admin(usr)] started weather of type [weather_type] on the z-level [z_level].")
log_admin("[key_name(usr)] started weather of type [weather_type] on the z-level [z_level].")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Run Weather")
/client/proc/mass_zombie_infection()
set category = "Admin.Round Interaction"
set name = "Mass Zombie Infection"
set desc = "Infects all humans with a latent organ that will zombify \
them on death."
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(usr, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", list("Yes", "No"))
if(confirm != "Yes")
return
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
new /obj/item/organ/zombie_infection/nodamage(H)
message_admins("[key_name_admin(usr)] added a latent zombie infection to all humans.")
log_admin("[key_name(usr)] added a latent zombie infection to all humans.")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Mass Zombie Infection")