-
Notifications
You must be signed in to change notification settings - Fork 524
/
Copy pathrandomverbs.dm
999 lines (814 loc) · 40.4 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
/client/proc/cmd_admin_drop_everything(mob/M as mob in mob_list)
set category = null
set name = "Drop Everything"
if(!holder)
src << "Only administrators may use this command."
return
var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No")
if(confirm != "Yes")
return
for(var/obj/item/W in M)
M.drop_from_inventory(W)
log_admin("[key_name(usr)] made [key_name(M)] drop everything!",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1)
feedback_add_details("admin_verb","DEVR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_prison(mob/M as mob in mob_list)
set category = "Admin"
set name = "Prison"
if(!holder)
src << "Only administrators may use this command."
return
if (ismob(M))
if(istype(M, /mob/living/silicon/ai))
alert("The AI can't be sent to prison you jerk!", null, null, null, null, null)
return
//strip their stuff before they teleport into a cell :downs:
for(var/obj/item/W in M)
M.drop_from_inventory(W)
//teleport person to cell
M.Paralyse(5)
sleep(5) //so they black out before warping
M.loc = pick(prisonwarp)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/prisoner = M
prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(prisoner), slot_w_uniform)
prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes)
spawn(50)
M << "<span class='danger'>You have been sent to the prison station!</span>"
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.",admin_key=key_name(usr),ckey=key_name(M))
message_admins("<span class='notice'>[key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.</span>", 1)
feedback_add_details("admin_verb","PRISON") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_subtle_message(mob/M as mob in mob_list)
set category = "Special Verbs"
set name = "Subtle Message"
if(!ismob(M)) return
if (!holder)
src << "Only administrators may use this command."
return
var/msg = sanitize(input("Message:", text("Subtle PM to [M.key]")) as text)
if (!msg)
return
if(usr)
if (usr.client)
if(usr.client.holder)
M << "\bold You hear a voice in your head... \italic [msg]"
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("<span class='notice'><b>SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg]</b></span>", 1)
feedback_add_details("admin_verb","SMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_mentor_check_new_players() //Allows mentors / admins to determine who the newer players are.
set category = "Admin"
set name = "Check new Players"
if(!holder)
src << "Only staff members may use this command."
var/age = alert(src, "Age check", "Show accounts yonger then _____ days","7", "30" , "All")
if(age == "All")
age = 9999999
else
age = text2num(age)
var/missing_ages = 0
var/msg = ""
var/highlight_special_characters = 1
if(!check_rights(R_MOD|R_ADMIN, 0))
highlight_special_characters = 0
for(var/client/C in clients)
if(C.player_age == "Requires database")
missing_ages = 1
continue
if(C.player_age < age)
msg += "[key_name(C, 1, 1, highlight_special_characters)]: account is [C.player_age] days old<br>"
if(missing_ages)
src << "Some accounts did not have proper ages set in their clients. This function requires database to be present"
if(msg != "")
src << browse(msg, "window=Player_age_check")
else
src << "No matches for that age range found."
/client/proc/cmd_admin_world_narrate() // Allows administrators to fluff events a little easier -- TLE
set category = "Special Verbs"
set name = "Global Narrate"
if (!holder)
src << "Only administrators may use this command."
return
var/msg = html_decode(sanitize(input("Message:", text("Enter the text you wish to appear to everyone:")) as text))
if (!msg)
return
world << "[msg]"
log_admin("GlobalNarrate: [key_name(usr)] : [msg]",admin_key=key_name(usr))
message_admins("<span class='notice'>\bold GlobalNarrate: [key_name_admin(usr)] : [msg]<BR></span>", 1)
feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_direct_narrate(var/mob/M) // Targetted narrate -- TLE
set category = "Special Verbs"
set name = "Direct Narrate"
if(!holder)
src << "Only administrators may use this command."
return
if(!M)
M = input("Direct narrate to who?", "Active Players") as null|anything in get_mob_with_client_list()
if(!M)
return
var/msg = html_decode(sanitize(input("Message:", text("Enter the text you wish to appear to your target:")) as text))
if( !msg )
return
M << msg
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("<span class='notice'>\bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]<BR></span>", 1)
feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_godmode(mob/M as mob in mob_list)
set category = "Special Verbs"
set name = "Godmode"
if(!holder)
src << "Only administrators may use this command."
return
M.status_flags ^= GODMODE
usr << "<span class='notice'>Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]</span>"
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]", 1)
feedback_add_details("admin_verb","GOD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
if(automute)
if(!config.automute_on) return
else
if(!usr || !usr.client)
return
if(!usr.client.holder)
usr << "<font color='red'>Error: cmd_admin_mute: You don't have permission to do this.</font>"
return
if(!M.client)
usr << "<font color='red'>Error: cmd_admin_mute: This mob doesn't have a client tied to it.</font>"
if(M.client.holder)
usr << "<font color='red'>Error: cmd_admin_mute: You cannot mute an admin/mod.</font>"
if(!M.client) return
if(M.client.holder) return
var/muteunmute
var/mute_string
switch(mute_type)
if(MUTE_IC) mute_string = "IC (say and emote)"
if(MUTE_OOC) mute_string = "OOC"
if(MUTE_PRAY) mute_string = "pray"
if(MUTE_ADMINHELP) mute_string = "adminhelp, admin PM and ASAY"
if(MUTE_DEADCHAT) mute_string = "deadchat and DSAY"
if(MUTE_AOOC) mute_string = "AOOC"
if(MUTE_ALL) mute_string = "everything"
else return
if(automute)
muteunmute = "auto-muted"
M.client.prefs.muted |= mute_type
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(M)] from [mute_string]",ckey=key_name(M))
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
M << "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin."
feedback_add_details("admin_verb","AUTOMUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
if(M.client.prefs.muted & mute_type)
muteunmute = "unmuted"
M.client.prefs.muted &= ~mute_type
M.client.spam_alert = 0
else
muteunmute = "muted"
M.client.prefs.muted |= mute_type
log_admin("[key_name(usr)] has [muteunmute] [key_name(M)] from [mute_string]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
M << "You have been [muteunmute] from [mute_string]."
feedback_add_details("admin_verb","MUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_add_random_ai_law()
set category = "Fun"
set name = "Add Random AI Law"
if(!holder)
src << "Only administrators may use this command."
return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
log_admin("[key_name(src)] has added a random AI law.",admin_key=key_name(usr))
message_admins("[key_name_admin(src)] has added a random AI law.", 1)
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
if(show_log == "Yes")
command_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
IonStorm(0)
feedback_add_details("admin_verb","ION") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/*
Allow admins to set players to be able to respawn/bypass 30 min wait, without the admin having to edit variables directly
Ccomp's first proc.
*/
proc/get_ghosts(var/notify = 0,var/what = 2, var/client/C = null)
// what = 1, return ghosts ass list.
// what = 2, return mob list
var/list/mobs = list()
var/list/ghosts = list()
var/list/sortmob = sortAtom(mob_list) // get the mob list.
var/any=0
for(var/mob/abstract/observer/M in sortmob)
mobs.Add(M) //filter it where it's only ghosts
any = 1 //if no ghosts show up, any will just be 0
if(!any)
if(notify && C)
C << "There doesn't appear to be any ghosts for you to select."
return
for(var/mob/M in mobs)
var/name = M.name
ghosts[name] = M //get the name of the mob for the popup list
if(what==1)
return ghosts
else
return mobs
/client/proc/allow_character_respawn()
set category = "Special Verbs"
set name = "Allow player to respawn"
set desc = "Let's the player bypass the 30 minute wait to respawn or allow them to re-enter their corpse."
if(!holder)
src << "Only administrators may use this command."
var/list/ghosts = get_ghosts(1,1,src)
var/target = input("Please, select a ghost!", "COME BACK TO LIFE!", null, null) as null|anything in ghosts
if(!target)
src << "Hrm, appears you didn't select a ghost" // Sanity check, if no ghosts in the list we don't want to edit a null variable and cause a runtime error.
return
var/mob/abstract/observer/G = ghosts[target]
if(G.has_enabled_antagHUD && config.antag_hud_restricted)
var/response = alert(src, "Are you sure you wish to allow this individual to play?","Ghost has used AntagHUD","Yes","No")
if(response == "No") return
G.timeofdeath=-19999 /* time of death is checked in /mob/verb/abandon_mob() which is the Respawn verb.
timeofdeath is used for bodies on autopsy but since we're messing with a ghost I'm pretty sure
there won't be an autopsy.
*/
var/datum/preferences/P
if (G.client)
P = G.client.prefs
else if (G.ckey)
P = preferences_datums[G.ckey]
else
src << "Something went wrong, couldn't find the target's preferences datum"
return 0
for (var/entry in P.time_of_death)//Set all the prefs' times of death to a huge negative value so any respawn timers will be fine
P.time_of_death[entry] = -99999
G.has_enabled_antagHUD = 2
G.can_reenter_corpse = 1
G:show_message(text("<span class='notice'><B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B></span>"), 1)
log_admin("[key_name(usr)] allowed [key_name(G)] to bypass the 30 minute respawn limit",admin_key=key_name(usr),ckey=key_name(G))
message_admins("Admin [key_name_admin(usr)] allowed [key_name_admin(G)] to bypass the 30 minute respawn limit", 1)
/client/proc/toggle_antagHUD_use()
set category = "Server"
set name = "Toggle antagHUD usage"
set desc = "Toggles antagHUD usage for observers"
if(!holder)
src << "Only administrators may use this command."
var/action=""
if(config.antag_hud_allowed)
for(var/mob/abstract/observer/g in get_ghosts())
if(!g.client.holder) //Remove the verb from non-admin ghosts
g.verbs -= /mob/abstract/observer/verb/toggle_antagHUD
if(g.antagHUD)
g.antagHUD = 0 // Disable it on those that have it enabled
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
g << "<span class='warning'>The Administrator has disabled AntagHUD.</span> "
config.antag_hud_allowed = 0
src << "<span class='danger'>AntagHUD usage has been disabled.</span>"
action = "disabled"
else
for(var/mob/abstract/observer/g in get_ghosts())
if(!g.client.holder) // Add the verb back for all non-admin ghosts
g.verbs += /mob/abstract/observer/verb/toggle_antagHUD
g << "<span class='notice'><B>The Administrator has enabled AntagHUD.</B></span>" // Notify all observers they can now use AntagHUD
config.antag_hud_allowed = 1
action = "enabled"
src << "<span class='notice'><B>AntagHUD usage has been enabled.</B></span>"
log_admin("[key_name(usr)] has [action] antagHUD usage for observers",admin_key=key_name(usr))
message_admins("Admin [key_name_admin(usr)] has [action] antagHUD usage for observers", 1)
/client/proc/toggle_antagHUD_restrictions()
set category = "Server"
set name = "Toggle antagHUD Restrictions"
set desc = "Restricts players that have used antagHUD from being able to join this round."
if(!holder)
src << "Only administrators may use this command."
var/action=""
if(config.antag_hud_restricted)
for(var/mob/abstract/observer/g in get_ghosts())
g << "<span class='notice'><B>The administrator has lifted restrictions on joining the round if you use AntagHUD</B></span>"
action = "lifted restrictions"
config.antag_hud_restricted = 0
src << "<span class='notice'><B>AntagHUD restrictions have been lifted</B></span>"
else
for(var/mob/abstract/observer/g in get_ghosts())
g << "<span class='danger'>The administrator has placed restrictions on joining the round if you use AntagHUD</span>"
g << "<span class='danger'>Your AntagHUD has been disabled, you may choose to re-enabled it but will be under restrictions </span>"
g.antagHUD = 0
g.has_enabled_antagHUD = 0
action = "placed restrictions"
config.antag_hud_restricted = 1
src << "<span class='danger'>AntagHUD restrictions have been enabled</span>"
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD",admin_key=key_name(usr))
message_admins("Admin [key_name_admin(usr)] has [action] on joining the round if they use AntagHUD", 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 = "Special Verbs"
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(!holder)
src << "Only administrators may use this command."
return
var/input = ckey(input(src, "Please specify which key will be respawned.", "Key", ""))
if(!input)
return
var/mob/abstract/observer/G_found
for(var/mob/abstract/observer/G in player_list)
if(G.ckey == input)
G_found = G
break
if(!G_found)//If a ghost was not found.
usr << "<font color='red'>There is no active key like that in the game or the person is not currently a ghost.</font>"
return
var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned.
var/datum/record/general/locked/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 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]")
for(var/datum/record/general/locked/R in SSrecords.records_locked)
if(R.nid == id)
record_found = R//We shall now reference the record.
break
if(record_found)//If they have a record we can determine a few things.
new_character.real_name = record_found.name
new_character.gender = record_found.sex
new_character.age = record_found.age
new_character.b_type = record_found.medical.blood_type
else
new_character.gender = pick(MALE,FEMALE)
var/datum/preferences/A = new()
A.randomize_appearance_for(new_character)
new_character.real_name = G_found.real_name
if(!new_character.real_name)
if(new_character.gender == MALE)
new_character.real_name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
else
new_character.real_name = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
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
new_character.mind.special_verbs = list()
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.
//DNA
if(record_found && record_found.medical)//Pull up their name from database records if they did have a mind.
new_character.dna = new()//Let's first give them a new DNA.
new_character.dna.unique_enzymes = record_found.medical.blood_dna //Enzymes are based on real name but we'll use the record for conformity.
// I HATE BYOND. HATE. HATE. - N3X
var/list/newSE= record_found.enzymes
var/list/newUI = record_found.identity
new_character.dna.SE = newSE.Copy() //This is the default of enzymes so I think it's safe to go with.
new_character.dna.UpdateSE()
new_character.UpdateAppearance(newUI.Copy())//Now we configure their appearance based on their unique identity, same as with a DNA machine or somesuch.
else//If they have no records, we just do a random DNA for them, based on their random appearance/savefile.
new_character.dna.ready_dna(new_character)
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/antag_data = get_antag_data(new_character.mind.special_role)
if(antag_data)
antag_data.add_antagonist(new_character.mind)
antag_data.place_mob(new_character)
else
SSjobs.EquipRank(new_character, new_character.mind.assigned_role, 1)
//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 && !player_is_antag(new_character.mind, only_offstation_roles = 1)) //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(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?",,"No","Yes")=="Yes")
SSrecords.generate_record(new_character)
if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
call(/proc/AnnounceArrival)(new_character, new_character.mind.assigned_role)
message_admins("<span class='notice'>[admin] has respawned [player_key] as [new_character.real_name].</span>", 1)
new_character << "You have been fully respawned. Enjoy the game."
feedback_add_details("admin_verb","RSPCH") //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 = "Fun"
set name = "Add Custom AI law"
if(!holder)
src << "Only administrators may use this command."
return
var/input = sanitize(input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null)
if(!input)
return
for(var/mob/living/silicon/ai/M in mob_list)
if (M.stat == 2)
usr << "Upload failed. No signal is being detected from the AI."
else if (M.see_in_dark == 0)
usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power."
else
M.add_ion_law(input)
for(var/mob/living/silicon/ai/O in mob_list)
O << "<span class='danger'>" + input + "...LAWS UPDATED</span>"
O.show_laws()
log_admin("Admin [key_name(usr)] has added a new AI law - [input]",admin_key=key_name(usr))
message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]", 1)
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
if(show_log == "Yes")
command_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_rejuvenate(mob/living/M as mob in mob_list)
set category = "Special Verbs"
set name = "Rejuvenate"
if(!holder)
src << "Only administrators may use this command."
return
if(!mob)
return
if(!istype(M))
alert("Cannot revive a ghost")
return
if(config.allow_admin_rev)
M.revive()
log_admin("[key_name(usr)] healed / revived [key_name(M)]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("<span class='danger'>Admin [key_name_admin(usr)] healed / revived [key_name_admin(M)]!</span>", 1)
else
alert("Admin revive disabled")
feedback_add_details("admin_verb","REJU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_create_centcom_report()
set category = "Special Verbs"
set name = "Create Command Report"
if(!holder)
src << "Only administrators may use this command."
return
var/reporttitle
var/reportbody
var/reporter = null
var/reporttype = input(usr, "Choose whether to use a template or custom report.", "Create Command Report") in list("Template", "Custom", "Cancel")
switch(reporttype)
if("Template")
establish_db_connection(dbcon)
if (!dbcon.IsConnected())
src << "<span class='notice'>Unable to connect to the database.</span>"
return
var/DBQuery/query = dbcon.NewQuery("SELECT title, message FROM ss13_ccia_general_notice_list WHERE deleted_at IS NULL")
query.Execute()
var/list/template_names = list()
var/list/templates = list()
while (query.NextRow())
template_names += query.item[1]
templates[query.item[1]] = query.item[2]
// Catch empty list
if (!templates.len)
src << "<span class='notice'>There are no templates in the database.</span>"
return
reporttitle = input(usr, "Please select a command report template.", "Create Command Report") in template_names
reportbody = templates[reporttitle]
if("Custom")
reporttitle = sanitizeSafe(input(usr, "Pick a title for the report.", "Title") as text|null)
if(!reporttitle)
reporttitle = "NanoTrasen Update"
reportbody = sanitize(input(usr, "Please enter anything you want. Anything. Serious.", "Body", "") as message|null, extra = 0)
if(!reportbody)
return
else
return
if (reporttype == "Template")
reporter = sanitizeSafe(input(usr, "Please enter your CCIA name. (blank for CCIAAMS)", "Name") as text|null)
if (reporter)
reportbody += "\n\n- [reporter], Central Command Internal Affairs Agent, [commstation_name()]"
else
reportbody += "\n\n- CCIAAMS, [commstation_name()]"
switch(alert("Should this be announced to the general population?",,"Yes","No"))
if("Yes")
command_announcement.Announce("[reportbody]", reporttitle, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1);
if("No")
world << "<span class='warning'>New [current_map.company_name] Update available at all communication consoles.</span>"
world << sound('sound/AI/commandreport.ogg')
log_admin("[key_name(src)] has created a command report: [reportbody]",admin_key=key_name(usr))
message_admins("[key_name_admin(src)] has created a command report", 1)
feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//New message handling
post_comm_message(reporttitle, reportbody)
/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in range(world.view))
set category = "Admin"
set name = "Delete"
if (!holder)
src << "Only administrators may use this command."
return
var/action = alert(src, "Are you sure you want to delete:\n[O]\nat ([O.x], [O.y], [O.z])?", "Confirmation", "Yes", "No", "Hard Delete")
if (action == "No")
return
if (istype(O, /mob/abstract/observer))
var/mob/abstract/observer/M = O
if (M.client && alert(src, "They are still connected. Are you sure, they will loose connection.", "Confirmation", "Yes", "No") != "Yes")
return
log_admin("[key_name(usr)] deleted [O] at ([O.x],[O.y],[O.z])",admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] deleted [O] at ([O.x],[O.y],[O.z])", 1)
feedback_add_details("admin_verb","DEL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if (isturf(O)) // Can't qdel a turf.
var/turf/T = O
T.ChangeTurf(/turf/space)
return
if (action == "Yes")
qdel(O, TRUE)
else
// This is naughty, but sometimes necessary.
O.Destroy(TRUE) // Because direct del without this breaks things.
del(O)
/client/proc/cmd_admin_list_open_jobs()
set category = "Admin"
set name = "List free slots"
if (!holder)
src << "Only administrators may use this command."
return
for(var/datum/job/job in SSjobs.occupations)
src << "[job.title]: [job.total_positions]"
feedback_add_details("admin_verb","LFS") //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 range(world.view))
set category = "Special Verbs"
set name = "Explosion"
if(!check_rights(R_DEBUG|R_FUN)) 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
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1))
if ((devastation > 20) || (heavy > 20) || (light > 20))
if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
return
explosion(O, devastation, heavy, light, flash)
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])",admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])", 1)
feedback_add_details("admin_verb","EXPL") //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 range(world.view))
set category = "Special Verbs"
set name = "EM Pulse"
if(!check_rights(R_DEBUG|R_FUN)) return
var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
if(heavy == null) return
var/light = input("Range of light pulse.", text("Input")) as num|null
if(light == null) return
if (heavy || light)
empulse(O, heavy, light)
log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])",admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] created an EM PUlse ([heavy],[light]) at ([O.x],[O.y],[O.z])", 1)
feedback_add_details("admin_verb","EMP") //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/M as mob in mob_list)
set category = "Special Verbs"
set name = "Gib"
if(!check_rights(R_ADMIN|R_FUN)) return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") 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)]",admin_key=key_name(usr),ckey=key_name(M))
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]", 1)
if(istype(M, /mob/abstract/observer))
gibs(M.loc, M.viruses)
return
M.gib()
feedback_add_details("admin_verb","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 = "Fun"
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm == "Yes")
if (istype(mob, /mob/abstract/observer)) // so they don't spam gibs everywhere
return
else
mob.gib()
log_admin("[key_name(usr)] used gibself.",admin_key=key_name(usr))
message_admins("<span class='notice'>[key_name_admin(usr)] used gibself.</span>", 1)
feedback_add_details("admin_verb","GIBS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/*
/client/proc/cmd_manual_ban()
set name = "Manual Ban"
set category = "Special Verbs"
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
var/mob/M = null
switch(alert("How would you like to ban someone today?", "Manual Ban", "Key List", "Enter Manually", "Cancel"))
if("Key List")
var/list/keys = list()
for(var/mob/M in world)
keys += M.client
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in keys
if(!selection)
return
M = selection:mob
if ((M.client && M.client.holder && (M.client.holder.level >= holder.level)))
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
switch(alert("Temporary Ban?",,"Yes","No"))
if("Yes")
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num
if(!mins)
return
if(mins >= 525600) mins = 525599
var/reason = input(usr,"Reason?","reason","Griefer") as text
if(!reason)
return
if(M)
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
M << "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>"
M << "\red This is a temporary ban, it will be removed in [mins] minutes."
M << "\red To try to resolve this matter head to http://ss13.donglabs.com/forum/"
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=[mins]&server=[replacetext(config.server_name, "#", "")]")
del(M.client)
qdel(M)
else
if("No")
var/reason = input(usr,"Reason?","reason","Griefer") as text
if(!reason)
return
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
M << "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>"
M << "\red This is a permanent ban."
M << "\red To try to resolve this matter head to http://ss13.donglabs.com/forum/"
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=perma&server=[replacetext(config.server_name, "#", "")]")
del(M.client)
qdel(M)
*/
/client/proc/update_world()
// If I see anyone granting powers to specific keys like the code that was here,
// I will both remove their SVN access and permanently ban them from my servers.
return
/client/proc/cmd_admin_check_contents(mob/living/M as mob in mob_list)
set category = "Special Verbs"
set name = "Check Contents"
var/list/L = M.get_contents()
for(var/t in L)
usr << "[t]"
feedback_add_details("admin_verb","CC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/* This proc is DEFERRED. Does not do anything.
/client/proc/cmd_admin_remove_phoron()
set category = "Debug"
set name = "Stabilize Atmos."
if(!holder)
src << "Only administrators may use this command."
return
feedback_add_details("admin_verb","STATM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
// DEFERRED
spawn(0)
for(var/turf/T in view())
T.poison = 0
T.oldpoison = 0
T.tmppoison = 0
T.oxygen = 755985
T.oldoxy = 755985
T.tmpoxy = 755985
T.co2 = 14.8176
T.oldco2 = 14.8176
T.tmpco2 = 14.8176
T.n2 = 2.844e+006
T.on2 = 2.844e+006
T.tn2 = 2.844e+006
T.tsl_gas = 0
T.osl_gas = 0
T.sl_gas = 0
T.temp = 293.15
T.otemp = 293.15
T.ttemp = 293.15
*/
/client/proc/toggle_view_range()
set category = "Special Verbs"
set name = "Change View Range"
set desc = "switches between 1x and custom views"
if(view == world.view)
view = input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128)
else
view = world.view
log_admin("[key_name(usr)] changed their view range to [view].",admin_key=key_name(usr))
//message_admins("\blue [key_name_admin(usr)] changed their view range to [view].", 1) //why? removed by order of XSI
feedback_add_details("admin_verb","CVRA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/admin_call_shuttle()
set category = "Admin"
set name = "Call Shuttle"
if ((!( ROUND_IS_STARTED ) || !emergency_shuttle.location()))
return
if(!check_rights(R_ADMIN)) return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
var/choice
if(SSticker.mode.auto_recall_shuttle)
choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
if(choice == "Confirm")
emergency_shuttle.auto_recall = 1 //enable auto-recall
else
return
choice = input("Is this an emergency evacuation or a crew transfer?") in list("Emergency", "Crew Transfer")
if (choice == "Emergency")
emergency_shuttle.call_evac()
else
emergency_shuttle.call_transfer()
feedback_add_details("admin_verb","CSHUT") //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.",admin_key=key_name(usr))
message_admins("<span class='notice'>[key_name_admin(usr)] admin-called the emergency shuttle.</span>", 1)
return
/client/proc/admin_cancel_shuttle()
set category = "Admin"
set name = "Cancel Shuttle"
if(!check_rights(R_ADMIN)) return
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return
if(!ROUND_IS_STARTED || !emergency_shuttle.can_recall())
return
emergency_shuttle.recall()
feedback_add_details("admin_verb","CCSHUT") //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.",admin_key=key_name(usr))
message_admins("<span class='notice'>[key_name_admin(usr)] admin-recalled the emergency shuttle.</span>", 1)
return
/client/proc/admin_deny_shuttle()
set category = "Admin"
set name = "Toggle Deny Shuttle"
if (!ROUND_IS_STARTED)
return
if(!check_rights(R_ADMIN)) return
emergency_shuttle.deny_shuttle = !emergency_shuttle.deny_shuttle
log_admin("[key_name(src)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.",admin_key=key_name(usr))
message_admins("[key_name_admin(usr)] has [emergency_shuttle.deny_shuttle ? "denied" : "allowed"] the shuttle to be called.")
/client/proc/cmd_admin_attack_log(mob/M as mob in mob_list)
set category = "Special Verbs"
set name = "Attack Log"
usr << text("<span class='danger'>Attack Log for []</span>", mob)
for(var/t in M.attack_log)
usr << t
feedback_add_details("admin_verb","ATTL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/everyone_random()
set category = "Fun"
set name = "Make Everyone Random"
set desc = "Make everyone have a random appearance. You can only use this before rounds!"
if(!check_rights(R_FUN)) return
if (SSticker.mode)
usr << "Nope you can't do this, the game's already started. This only works before rounds!"
return
if(SSticker.random_players)
SSticker.random_players = 0
message_admins("Admin [key_name_admin(usr)] has disabled \"Everyone is Special\" mode.", 1)
usr << "Disabled."
return
var/notifyplayers = alert(src, "Do you want to notify the players?", "Options", "Yes", "No", "Cancel")
if(notifyplayers == "Cancel")
return
log_admin("Admin [key_name(src)] has forced the players to have random appearances.",admin_key=key_name(usr))
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.", 1)
if(notifyplayers == "Yes")
world << "<span class='notice'><b>Admin [usr.key] has forced the players to have completely random identities!</b></span>"
usr << "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>."
SSticker.random_players = 1
feedback_add_details("admin_verb","MER") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_random_events()
set category = "Server"
set name = "Toggle random events on/off"
set desc = "Toggles random events such as meteors, black holes, blob (but not space dust) on/off"
if(!check_rights(R_SERVER)) return
if(!config.allow_random_events)
config.allow_random_events = 1
usr << "Random events enabled"
message_admins("Admin [key_name_admin(usr)] has enabled random events.", 1)
else
config.allow_random_events = 0
usr << "Random events disabled"
message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1)
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/fab_tip()
set category = "Admin"
set name = "Fabricate Tip"
set desc = "Sends a tip (that you specify) to all players. After all \
you're the experienced player here."
if(!holder)
return
var/input = input(usr, "Please specify your tip that you want to send to the players.", "Tip", "") as message|null
if(!input)
return
SSticker.selected_tip = input
// If we've already tipped, then send it straight away.
if(SSticker.tipped)
SSticker.send_tip_of_the_round()
SSticker.selected_tip = initial(SSticker.selected_tip)
message_admins("[key_name_admin(usr)] sent a tip of the round.")
log_admin("[key_name(usr)] sent \"[input]\" as the Tip of the Round.",admin_key=key_name(usr))
feedback_add_details("admin_verb","TIP")
/client/proc/show_tip()
set category = "Debug"
set name = "Show Tip"
set desc = "Sends a tip (that the config specifies) to all players. After all \
you're not the experienced player here."
if(!holder)
return
SSticker.send_tip_of_the_round()
message_admins("[key_name_admin(usr)] sent a pregenerated tip of the round.")
log_admin("[key_name(usr)] sent a pregenerated Tip of the Round.",admin_key=key_name(usr))
feedback_add_details("admin_verb","FAP")