You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

711 lines
28 KiB

  1. //admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless
  2. //the procs are cause you can't put the comments in the GLOB var define
  3. GLOBAL_LIST_INIT(admin_verbs_default, world.AVerbsDefault())
  4. GLOBAL_PROTECT(admin_verbs_default)
  5. /world/proc/AVerbsDefault()
  6. return list(
  7. /client/proc/deadmin, /*destroys our own admin datum so we can play as a regular player*/
  8. /client/proc/cmd_admin_say, /*admin-only ooc chat*/
  9. /client/proc/hide_verbs, /*hides all our adminverbs*/
  10. /client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/
  11. /client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
  12. /client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/
  13. /client/proc/secrets,
  14. /client/proc/toggle_hear_radio, /*allows admins to hide all radio output*/
  15. /client/proc/reload_admins,
  16. /client/proc/reestablish_db_connection, /*reattempt a connection to the database*/
  17. /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
  18. /client/proc/cmd_admin_pm_panel, /*admin-pm list*/
  19. /client/proc/stop_sounds,
  20. /client/proc/mark_datum_mapview,
  21. /client/proc/fix_air /*resets air in designated radius to its default atmos composition*/
  22. )
  23. GLOBAL_LIST_INIT(admin_verbs_admin, world.AVerbsAdmin())
  24. GLOBAL_PROTECT(admin_verbs_admin)
  25. /world/proc/AVerbsAdmin()
  26. return list(
  27. /client/proc/invisimin, /*allows our mob to go invisible/visible*/
  28. // /datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/ -Removed due to rare practical use. Moved to debug verbs ~Errorage
  29. /datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/
  30. /datum/verbs/menu/Admin/verb/playerpanel,
  31. /client/proc/game_panel, /*game panel, allows to change game-mode etc*/
  32. /client/proc/check_ai_laws, /*shows AI and borg laws*/
  33. /datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
  34. /datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/
  35. /datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/
  36. /datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/
  37. /datum/admins/proc/announce, /*priority announce something to all clients.*/
  38. /datum/admins/proc/set_admin_notice, /*announcement all clients see when joining the server.*/
  39. /client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
  40. /client/proc/toggle_view_range, /*changes how far we can see*/
  41. /client/proc/getserverlogs, /*for accessing server logs*/
  42. /client/proc/getcurrentlogs, /*for accessing server logs for the current round*/
  43. /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/
  44. /client/proc/cmd_admin_headset_message, /*send an message to somebody through their headset as CentCom*/
  45. /client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
  46. /client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/
  47. /client/proc/centcom_podlauncher,/*Open a window to launch a Supplypod and configure it or it's contents*/
  48. /client/proc/check_antagonists, /*shows all antags*/
  49. /datum/admins/proc/access_news_network, /*allows access of newscasters*/
  50. /client/proc/jumptocoord, /*we ghost and jump to a coordinate*/
  51. /client/proc/Getmob, /*teleports a mob to our location*/
  52. /client/proc/Getkey, /*teleports a mob with a certain ckey to our location*/
  53. // /client/proc/sendmob, /*sends a mob somewhere*/ -Removed due to it needing two sorting procs to work, which were executed every time an admin right-clicked. ~Errorage
  54. /client/proc/jumptoarea,
  55. /client/proc/jumptokey, /*allows us to jump to the location of a mob with a certain ckey*/
  56. /client/proc/jumptomob, /*allows us to jump to a specific mob*/
  57. /client/proc/jumptoturf, /*allows us to jump to a specific turf*/
  58. /client/proc/admin_call_shuttle, /*allows us to call the emergency shuttle*/
  59. /client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcom*/
  60. /client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/
  61. /client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/
  62. /client/proc/cmd_admin_local_narrate, /*sends text to all mobs within view of atom*/
  63. /client/proc/cmd_admin_create_centcom_report,
  64. /client/proc/cmd_change_command_name,
  65. /client/proc/cmd_admin_check_player_exp, /* shows players by playtime */
  66. /client/proc/toggle_combo_hud, // toggle display of the combination pizza antag and taco sci/med/eng hud
  67. /client/proc/toggle_AI_interact, /*toggle admin ability to interact with machines as an AI*/
  68. /datum/admins/proc/open_shuttlepanel, /* Opens shuttle manipulator UI */
  69. /client/proc/deadchat,
  70. /client/proc/toggleprayers,
  71. /client/proc/toggle_prayer_sound,
  72. /client/proc/colorasay,
  73. /client/proc/resetasaycolor,
  74. /client/proc/toggleadminhelpsound,
  75. /client/proc/respawn_character,
  76. /client/proc/discord_id_manipulation,
  77. /datum/admins/proc/open_borgopanel
  78. )
  79. GLOBAL_LIST_INIT(admin_verbs_ban, list(/client/proc/unban_panel, /client/proc/ban_panel, /client/proc/stickybanpanel))
  80. GLOBAL_PROTECT(admin_verbs_ban)
  81. GLOBAL_LIST_INIT(admin_verbs_sounds, list(/client/proc/play_local_sound, /client/proc/play_direct_mob_sound, /client/proc/play_sound, /client/proc/set_round_end_sound))
  82. GLOBAL_PROTECT(admin_verbs_sounds)
  83. GLOBAL_LIST_INIT(admin_verbs_fun, list(
  84. /client/proc/cmd_admin_dress,
  85. /client/proc/cmd_admin_gib_self,
  86. /client/proc/drop_bomb,
  87. /client/proc/set_dynex_scale,
  88. /client/proc/drop_dynex_bomb,
  89. /client/proc/cinematic,
  90. /client/proc/one_click_antag,
  91. /client/proc/cmd_admin_add_freeform_ai_law,
  92. /client/proc/object_say,
  93. /client/proc/toggle_random_events,
  94. /client/proc/set_ooc,
  95. /client/proc/reset_ooc,
  96. /client/proc/forceEvent,
  97. /client/proc/admin_change_sec_level,
  98. /client/proc/toggle_nuke,
  99. /client/proc/run_weather,
  100. /client/proc/mass_zombie_infection,
  101. /client/proc/mass_zombie_cure,
  102. /client/proc/polymorph_all,
  103. /client/proc/show_tip,
  104. /client/proc/smite,
  105. /client/proc/admin_away
  106. ))
  107. GLOBAL_PROTECT(admin_verbs_fun)
  108. GLOBAL_LIST_INIT(admin_verbs_spawn, list(/datum/admins/proc/spawn_atom, /datum/admins/proc/podspawn_atom, /datum/admins/proc/spawn_cargo, /datum/admins/proc/spawn_objasmob, /client/proc/respawn_character, /datum/admins/proc/beaker_panel))
  109. GLOBAL_PROTECT(admin_verbs_spawn)
  110. GLOBAL_LIST_INIT(admin_verbs_server, world.AVerbsServer())
  111. GLOBAL_PROTECT(admin_verbs_server)
  112. /world/proc/AVerbsServer()
  113. return list(
  114. /datum/admins/proc/startnow,
  115. /datum/admins/proc/restart,
  116. /datum/admins/proc/end_round,
  117. /datum/admins/proc/delay,
  118. /datum/admins/proc/toggleaban,
  119. /client/proc/everyone_random,
  120. /datum/admins/proc/toggleAI,
  121. /client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
  122. /client/proc/cmd_debug_del_all,
  123. /client/proc/toggle_random_events,
  124. /client/proc/forcerandomrotate,
  125. /client/proc/adminchangemap,
  126. /client/proc/panicbunker,
  127. /client/proc/toggle_hub
  128. )
  129. GLOBAL_LIST_INIT(admin_verbs_debug, world.AVerbsDebug())
  130. GLOBAL_PROTECT(admin_verbs_debug)
  131. /world/proc/AVerbsDebug()
  132. return list(
  133. /client/proc/restart_controller,
  134. /client/proc/cmd_admin_list_open_jobs,
  135. /client/proc/Debug2,
  136. /client/proc/cmd_debug_make_powernets,
  137. /client/proc/cmd_debug_mob_lists,
  138. /client/proc/cmd_admin_delete,
  139. /client/proc/cmd_debug_del_all,
  140. /client/proc/restart_controller,
  141. /client/proc/enable_debug_verbs,
  142. /client/proc/callproc,
  143. /client/proc/callproc_datum,
  144. /client/proc/SDQL2_query,
  145. /client/proc/test_movable_UI,
  146. /client/proc/test_snap_UI,
  147. /client/proc/debugNatureMapGenerator,
  148. /client/proc/check_bomb_impacts,
  149. /proc/machine_upgrade,
  150. /client/proc/populate_world,
  151. /client/proc/get_dynex_power, //*debug verbs for dynex explosions.
  152. /client/proc/get_dynex_range, //*debug verbs for dynex explosions.
  153. /client/proc/set_dynex_scale,
  154. /client/proc/cmd_display_del_log,
  155. /client/proc/outfit_manager,
  156. /client/proc/modify_goals,
  157. /client/proc/debug_huds,
  158. /client/proc/map_template_load,
  159. /client/proc/map_template_upload,
  160. /client/proc/jump_to_ruin,
  161. /client/proc/clear_dynamic_transit,
  162. /client/proc/toggle_medal_disable,
  163. /client/proc/view_runtimes,
  164. /client/proc/pump_random_event,
  165. /client/proc/cmd_display_init_log,
  166. /client/proc/cmd_display_overlay_log,
  167. /client/proc/reload_configuration,
  168. /datum/admins/proc/create_or_modify_area,
  169. )
  170. GLOBAL_LIST_INIT(admin_verbs_possess, list(/proc/possess, /proc/release))
  171. GLOBAL_PROTECT(admin_verbs_possess)
  172. GLOBAL_LIST_INIT(admin_verbs_permissions, list(/client/proc/edit_admin_permissions))
  173. GLOBAL_PROTECT(admin_verbs_permissions)
  174. GLOBAL_LIST_INIT(admin_verbs_poll, list(/client/proc/create_poll))
  175. GLOBAL_PROTECT(admin_verbs_poll)
  176. //verbs which can be hidden - needs work
  177. GLOBAL_LIST_INIT(admin_verbs_hideable, list(
  178. /client/proc/set_ooc,
  179. /client/proc/reset_ooc,
  180. /client/proc/deadmin,
  181. /datum/admins/proc/show_traitor_panel,
  182. /datum/admins/proc/toggleenter,
  183. /datum/admins/proc/toggleguests,
  184. /datum/admins/proc/announce,
  185. /datum/admins/proc/set_admin_notice,
  186. /client/proc/admin_ghost,
  187. /client/proc/toggle_view_range,
  188. /client/proc/cmd_admin_subtle_message,
  189. /client/proc/cmd_admin_headset_message,
  190. /client/proc/cmd_admin_check_contents,
  191. /datum/admins/proc/access_news_network,
  192. /client/proc/admin_call_shuttle,
  193. /client/proc/admin_cancel_shuttle,
  194. /client/proc/cmd_admin_direct_narrate,
  195. /client/proc/cmd_admin_world_narrate,
  196. /client/proc/cmd_admin_local_narrate,
  197. /client/proc/play_local_sound,
  198. /client/proc/play_sound,
  199. /client/proc/set_round_end_sound,
  200. /client/proc/cmd_admin_dress,
  201. /client/proc/cmd_admin_gib_self,
  202. /client/proc/drop_bomb,
  203. /client/proc/drop_dynex_bomb,
  204. /client/proc/get_dynex_range,
  205. /client/proc/get_dynex_power,
  206. /client/proc/set_dynex_scale,
  207. /client/proc/cinematic,
  208. /client/proc/cmd_admin_add_freeform_ai_law,
  209. /client/proc/cmd_admin_create_centcom_report,
  210. /client/proc/cmd_change_command_name,
  211. /client/proc/object_say,
  212. /client/proc/toggle_random_events,
  213. /datum/admins/proc/startnow,
  214. /datum/admins/proc/restart,
  215. /datum/admins/proc/delay,
  216. /datum/admins/proc/toggleaban,
  217. /client/proc/everyone_random,
  218. /datum/admins/proc/toggleAI,
  219. /client/proc/restart_controller,
  220. /client/proc/cmd_admin_list_open_jobs,
  221. /client/proc/callproc,
  222. /client/proc/callproc_datum,
  223. /client/proc/Debug2,
  224. /client/proc/reload_admins,
  225. /client/proc/cmd_debug_make_powernets,
  226. /client/proc/startSinglo,
  227. /client/proc/cmd_debug_mob_lists,
  228. /client/proc/cmd_debug_del_all,
  229. /client/proc/enable_debug_verbs,
  230. /proc/possess,
  231. /proc/release,
  232. /client/proc/reload_admins,
  233. /client/proc/panicbunker,
  234. /client/proc/admin_change_sec_level,
  235. /client/proc/toggle_nuke,
  236. /client/proc/cmd_display_del_log,
  237. /client/proc/toggle_combo_hud,
  238. /client/proc/debug_huds
  239. ))
  240. GLOBAL_PROTECT(admin_verbs_hideable)
  241. /client/proc/add_admin_verbs()
  242. if(holder)
  243. control_freak = CONTROL_FREAK_SKIN | CONTROL_FREAK_MACROS
  244. var/rights = holder.rank.rights
  245. verbs += GLOB.admin_verbs_default
  246. if(rights & R_BUILD)
  247. verbs += /client/proc/togglebuildmodeself
  248. if(rights & R_ADMIN)
  249. verbs += GLOB.admin_verbs_admin
  250. if(rights & R_BAN)
  251. verbs += GLOB.admin_verbs_ban
  252. if(rights & R_FUN)
  253. verbs += GLOB.admin_verbs_fun
  254. if(rights & R_SERVER)
  255. verbs += GLOB.admin_verbs_server
  256. if(rights & R_DEBUG)
  257. verbs += GLOB.admin_verbs_debug
  258. if(rights & R_POSSESS)
  259. verbs += GLOB.admin_verbs_possess
  260. if(rights & R_PERMISSIONS)
  261. verbs += GLOB.admin_verbs_permissions
  262. if(rights & R_STEALTH)
  263. verbs += /client/proc/stealth
  264. if(rights & R_ADMIN)
  265. verbs += GLOB.admin_verbs_poll
  266. if(rights & R_SOUND)
  267. verbs += GLOB.admin_verbs_sounds
  268. if(CONFIG_GET(string/invoke_youtubedl))
  269. verbs += /client/proc/play_web_sound
  270. if(rights & R_SPAWN)
  271. verbs += GLOB.admin_verbs_spawn
  272. /client/proc/remove_admin_verbs()
  273. verbs.Remove(
  274. GLOB.admin_verbs_default,
  275. /client/proc/togglebuildmodeself,
  276. GLOB.admin_verbs_admin,
  277. GLOB.admin_verbs_ban,
  278. GLOB.admin_verbs_fun,
  279. GLOB.admin_verbs_server,
  280. GLOB.admin_verbs_debug,
  281. GLOB.admin_verbs_possess,
  282. GLOB.admin_verbs_permissions,
  283. /client/proc/stealth,
  284. GLOB.admin_verbs_poll,
  285. GLOB.admin_verbs_sounds,
  286. /client/proc/play_web_sound,
  287. GLOB.admin_verbs_spawn,
  288. /*Debug verbs added by "show debug verbs"*/
  289. GLOB.admin_verbs_debug_mapping,
  290. /client/proc/disable_debug_verbs,
  291. /client/proc/readmin
  292. )
  293. /client/proc/hide_verbs()
  294. set name = "Adminverbs - Hide All"
  295. set category = "Admin"
  296. remove_admin_verbs()
  297. verbs += /client/proc/show_verbs
  298. to_chat(src, "<span class='interface'>Almost all of your adminverbs have been hidden.</span>", confidential = TRUE)
  299. SSblackbox.record_feedback("tally", "admin_verb", 1, "Hide All Adminverbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  300. return
  301. /client/proc/show_verbs()
  302. set name = "Adminverbs - Show"
  303. set category = "Admin"
  304. verbs -= /client/proc/show_verbs
  305. add_admin_verbs()
  306. to_chat(src, "<span class='interface'>All of your adminverbs are now visible.</span>", confidential = TRUE)
  307. SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Adminverbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  308. /client/proc/admin_ghost()
  309. set category = "Admin - Game"
  310. set name = "Aghost"
  311. if(!holder)
  312. return
  313. . = TRUE
  314. if(isobserver(mob))
  315. //re-enter
  316. var/mob/dead/observer/ghost = mob
  317. if(!ghost.mind || !ghost.mind.current) //won't do anything if there is no body
  318. return FALSE
  319. if(!ghost.can_reenter_corpse)
  320. log_admin("[key_name(usr)] re-entered corpse")
  321. message_admins("[key_name_admin(usr)] re-entered corpse")
  322. ghost.can_reenter_corpse = 1 //force re-entering even when otherwise not possible
  323. ghost.reenter_corpse()
  324. SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin Reenter") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  325. else if(isnewplayer(mob))
  326. to_chat(src, "<font color='red'>Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.</font>", confidential = TRUE)
  327. return FALSE
  328. else
  329. //ghostize
  330. log_admin("[key_name(usr)] admin ghosted.")
  331. message_admins("[key_name_admin(usr)] admin ghosted.")
  332. var/mob/body = mob
  333. body.ghostize(1)
  334. if(body && !body.key)
  335. body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
  336. SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin Ghost") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  337. /client/proc/invisimin()
  338. set name = "Invisimin"
  339. set category = "Admin - Game"
  340. set desc = "Toggles ghost-like invisibility (Don't abuse this)"
  341. if(holder && mob)
  342. if(mob.invisibility == INVISIBILITY_OBSERVER)
  343. mob.invisibility = initial(mob.invisibility)
  344. to_chat(mob, "<span class='boldannounce'>Invisimin off. Invisibility reset.</span>", confidential = TRUE)
  345. else
  346. mob.invisibility = INVISIBILITY_OBSERVER
  347. to_chat(mob, "<span class='adminnotice'><b>Invisimin on. You are now as invisible as a ghost.</b></span>", confidential = TRUE)
  348. /client/proc/check_antagonists()
  349. set name = "Check Antagonists"
  350. set category = "Admin - Game"
  351. if(holder)
  352. holder.check_antagonists()
  353. log_admin("[key_name(usr)] checked antagonists.") //for tsar~
  354. if(!isobserver(usr) && SSticker.HasRoundStarted())
  355. message_admins("[key_name_admin(usr)] checked antagonists.")
  356. SSblackbox.record_feedback("tally", "admin_verb", 1, "Check Antagonists") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  357. /client/proc/ban_panel()
  358. set name = "Banning Panel"
  359. set category = "Admin"
  360. if(!check_rights(R_BAN))
  361. return
  362. holder.ban_panel()
  363. SSblackbox.record_feedback("tally", "admin_verb", 1, "Banning Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  364. /client/proc/unban_panel()
  365. set name = "Unbanning Panel"
  366. set category = "Admin"
  367. if(!check_rights(R_BAN))
  368. return
  369. holder.unban_panel()
  370. SSblackbox.record_feedback("tally", "admin_verb", 1, "Unbanning Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  371. /client/proc/game_panel()
  372. set name = "Game Panel"
  373. set category = "Admin - Game"
  374. if(holder)
  375. holder.Game()
  376. SSblackbox.record_feedback("tally", "admin_verb", 1, "Game Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  377. /client/proc/secrets()
  378. set name = "Secrets"
  379. set category = "Admin - Game"
  380. if (holder)
  381. holder.Secrets()
  382. SSblackbox.record_feedback("tally", "admin_verb", 1, "Secrets Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  383. /client/proc/findStealthKey(txt)
  384. if(txt)
  385. for(var/P in GLOB.stealthminID)
  386. if(GLOB.stealthminID[P] == txt)
  387. return P
  388. txt = GLOB.stealthminID[ckey]
  389. return txt
  390. /client/proc/createStealthKey()
  391. var/num = (rand(0,1000))
  392. var/i = 0
  393. while(i == 0)
  394. i = 1
  395. for(var/P in GLOB.stealthminID)
  396. if(num == GLOB.stealthminID[P])
  397. num++
  398. i = 0
  399. GLOB.stealthminID["[ckey]"] = "@[num2text(num)]"
  400. /client/proc/stealth()
  401. set category = "Admin"
  402. set name = "Stealth Mode"
  403. if(holder)
  404. if(holder.fakekey)
  405. holder.fakekey = null
  406. if(isobserver(mob))
  407. mob.invisibility = initial(mob.invisibility)
  408. mob.alpha = initial(mob.alpha)
  409. if(mob.mind)
  410. if(mob.mind.ghostname)
  411. mob.name = mob.mind.ghostname
  412. else
  413. mob.name = mob.mind.name
  414. else
  415. mob.name = mob.real_name
  416. mob.mouse_opacity = initial(mob.mouse_opacity)
  417. else
  418. var/new_key = ckeyEx(stripped_input(usr, "Enter your desired display name.", "Fake Key", key, 26))
  419. if(!new_key)
  420. return
  421. holder.fakekey = new_key
  422. createStealthKey()
  423. if(isobserver(mob))
  424. mob.invisibility = INVISIBILITY_MAXIMUM //JUST IN CASE
  425. mob.alpha = 0 //JUUUUST IN CASE
  426. mob.name = " "
  427. mob.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
  428. log_admin("[key_name(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]")
  429. message_admins("[key_name_admin(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]")
  430. SSblackbox.record_feedback("tally", "admin_verb", 1, "Stealth Mode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  431. /client/proc/drop_bomb()
  432. set category = "Fun"
  433. set name = "Drop Bomb"
  434. set desc = "Cause an explosion of varying strength at your location."
  435. var/list/choices = list("Small Bomb (1, 2, 3, 3)", "Medium Bomb (2, 3, 4, 4)", "Big Bomb (3, 5, 7, 5)", "Maxcap", "Custom Bomb")
  436. var/choice = input("What size explosion would you like to produce? NOTE: You can do all this rapidly and in an IC manner (using cruise missiles!) with the Config/Launch Supplypod verb. WARNING: These ignore the maxcap") as null|anything in choices
  437. var/turf/epicenter = mob.loc
  438. switch(choice)
  439. if(null)
  440. return 0
  441. if("Small Bomb (1, 2, 3, 3)")
  442. explosion(epicenter, 1, 2, 3, 3, TRUE, TRUE)
  443. if("Medium Bomb (2, 3, 4, 4)")
  444. explosion(epicenter, 2, 3, 4, 4, TRUE, TRUE)
  445. if("Big Bomb (3, 5, 7, 5)")
  446. explosion(epicenter, 3, 5, 7, 5, TRUE, TRUE)
  447. if("Maxcap")
  448. explosion(epicenter, GLOB.MAX_EX_DEVESTATION_RANGE, GLOB.MAX_EX_HEAVY_RANGE, GLOB.MAX_EX_LIGHT_RANGE, GLOB.MAX_EX_FLASH_RANGE)
  449. if("Custom Bomb")
  450. var/devastation_range = input("Devastation range (in tiles):") as null|num
  451. if(devastation_range == null)
  452. return
  453. var/heavy_impact_range = input("Heavy impact range (in tiles):") as null|num
  454. if(heavy_impact_range == null)
  455. return
  456. var/light_impact_range = input("Light impact range (in tiles):") as null|num
  457. if(light_impact_range == null)
  458. return
  459. var/flash_range = input("Flash range (in tiles):") as null|num
  460. if(flash_range == null)
  461. return
  462. if(devastation_range > GLOB.MAX_EX_DEVESTATION_RANGE || heavy_impact_range > GLOB.MAX_EX_HEAVY_RANGE || light_impact_range > GLOB.MAX_EX_LIGHT_RANGE || flash_range > GLOB.MAX_EX_FLASH_RANGE)
  463. if(alert("Bomb is bigger than the maxcap. Continue?",,"Yes","No") != "Yes")
  464. return
  465. epicenter = mob.loc //We need to reupdate as they may have moved again
  466. explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, TRUE, TRUE)
  467. message_admins("[ADMIN_LOOKUPFLW(usr)] creating an admin explosion at [epicenter.loc].")
  468. log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc].")
  469. SSblackbox.record_feedback("tally", "admin_verb", 1, "Drop Bomb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  470. /client/proc/drop_dynex_bomb()
  471. set category = "Fun"
  472. set name = "Drop DynEx Bomb"
  473. set desc = "Cause an explosion of varying strength at your location."
  474. var/ex_power = input("Explosive Power:") as null|num
  475. var/turf/epicenter = mob.loc
  476. if(ex_power && epicenter)
  477. dyn_explosion(epicenter, ex_power)
  478. message_admins("[ADMIN_LOOKUPFLW(usr)] creating an admin explosion at [epicenter.loc].")
  479. log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc].")
  480. SSblackbox.record_feedback("tally", "admin_verb", 1, "Drop Dynamic Bomb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  481. /client/proc/get_dynex_range()
  482. set category = "Debug"
  483. set name = "Get DynEx Range"
  484. set desc = "Get the estimated range of a bomb, using explosive power."
  485. var/ex_power = input("Explosive Power:") as null|num
  486. if (isnull(ex_power))
  487. return
  488. var/range = round((2 * ex_power)**GLOB.DYN_EX_SCALE)
  489. to_chat(usr, "Estimated Explosive Range: (Devastation: [round(range*0.25)], Heavy: [round(range*0.5)], Light: [round(range)])", confidential = TRUE)
  490. /client/proc/get_dynex_power()
  491. set category = "Debug"
  492. set name = "Get DynEx Power"
  493. set desc = "Get the estimated required power of a bomb, to reach a specific range."
  494. var/ex_range = input("Light Explosion Range:") as null|num
  495. if (isnull(ex_range))
  496. return
  497. var/power = (0.5 * ex_range)**(1/GLOB.DYN_EX_SCALE)
  498. to_chat(usr, "Estimated Explosive Power: [power]", confidential = TRUE)
  499. /client/proc/set_dynex_scale()
  500. set category = "Debug"
  501. set name = "Set DynEx Scale"
  502. set desc = "Set the scale multiplier of dynex explosions. The default is 0.5."
  503. var/ex_scale = input("New DynEx Scale:") as null|num
  504. if(!ex_scale)
  505. return
  506. GLOB.DYN_EX_SCALE = ex_scale
  507. log_admin("[key_name(usr)] has modified Dynamic Explosion Scale: [ex_scale]")
  508. message_admins("[key_name_admin(usr)] has modified Dynamic Explosion Scale: [ex_scale]")
  509. /client/proc/give_spell(mob/T in GLOB.mob_list)
  510. set category = "Fun"
  511. set name = "Give Spell"
  512. set desc = "Gives a spell to a mob."
  513. var/list/spell_list = list()
  514. var/type_length = length_char("/obj/effect/proc_holder/spell") + 2
  515. for(var/A in GLOB.spells)
  516. spell_list[copytext_char("[A]", type_length)] = A
  517. var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in sortList(spell_list)
  518. if(!S)
  519. return
  520. SSblackbox.record_feedback("tally", "admin_verb", 1, "Give Spell") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  521. log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].")
  522. message_admins("<span class='adminnotice'>[key_name_admin(usr)] gave [key_name_admin(T)] the spell [S].</span>")
  523. S = spell_list[S]
  524. if(T.mind)
  525. T.mind.AddSpell(new S)
  526. else
  527. T.AddSpell(new S)
  528. message_admins("<span class='danger'>Spells given to mindless mobs will not be transferred in mindswap or cloning!</span>")
  529. /client/proc/remove_spell(mob/T in GLOB.mob_list)
  530. set category = "Fun"
  531. set name = "Remove Spell"
  532. set desc = "Remove a spell from the selected mob."
  533. if(T && T.mind)
  534. var/obj/effect/proc_holder/spell/S = input("Choose the spell to remove", "NO ABRAKADABRA") as null|anything in sortList(T.mind.spell_list)
  535. if(S)
  536. T.mind.RemoveSpell(S)
  537. log_admin("[key_name(usr)] removed the spell [S] from [key_name(T)].")
  538. message_admins("<span class='adminnotice'>[key_name_admin(usr)] removed the spell [S] from [key_name_admin(T)].</span>")
  539. SSblackbox.record_feedback("tally", "admin_verb", 1, "Remove Spell") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  540. /client/proc/give_disease(mob/living/T in GLOB.mob_living_list)
  541. set category = "Fun"
  542. set name = "Give Disease"
  543. set desc = "Gives a Disease to a mob."
  544. if(!istype(T))
  545. to_chat(src, "<span class='notice'>You can only give a disease to a mob of type /mob/living.</span>", confidential = TRUE)
  546. return
  547. var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in sortList(SSdisease.diseases, /proc/cmp_typepaths_asc)
  548. if(!D)
  549. return
  550. T.ForceContractDisease(new D, FALSE, TRUE)
  551. SSblackbox.record_feedback("tally", "admin_verb", 1, "Give Disease") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  552. log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")
  553. message_admins("<span class='adminnotice'>[key_name_admin(usr)] gave [key_name_admin(T)] the disease [D].</span>")
  554. /client/proc/object_say(obj/O in world)
  555. set category = "Admin - Events"
  556. set name = "OSay"
  557. set desc = "Makes an object say something."
  558. var/message = input(usr, "What do you want the message to be?", "Make Sound") as text | null
  559. if(!message)
  560. return
  561. O.say(message)
  562. log_admin("[key_name(usr)] made [O] at [AREACOORD(O)] say \"[message]\"")
  563. message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [O] at [AREACOORD(O)]. say \"[message]\"</span>")
  564. SSblackbox.record_feedback("tally", "admin_verb", 1, "Object Say") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  565. /client/proc/togglebuildmodeself()
  566. set name = "Toggle Build Mode Self"
  567. set category = "Admin - Events"
  568. if (!(holder.rank.rights & R_BUILD))
  569. return
  570. if(src.mob)
  571. togglebuildmode(src.mob)
  572. SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Build Mode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
  573. /client/proc/check_ai_laws()
  574. set name = "Check AI Laws"
  575. set category = "Admin - Game"
  576. if(holder)
  577. src.holder.output_ai_laws()
  578. /client/proc/deadmin()
  579. set name = "Deadmin"
  580. set category = "Admin"
  581. set desc = "Shed your admin powers."
  582. if(!holder)
  583. return
  584. if(has_antag_hud())
  585. toggle_combo_hud()
  586. holder.deactivate()
  587. to_chat(src, "<span class='interface'>You are now a normal player.</span>", confidential = TRUE)
  588. log_admin("[src] deadmined themself.")
  589. message_admins("[src] deadmined themself.")
  590. SSblackbox.record_feedback("tally", "admin_verb", 1, "Deadmin")
  591. /client/proc/readmin()
  592. set name = "Readmin"
  593. set category = "Admin"
  594. set desc = "Regain your admin powers."
  595. var/datum/admins/A = GLOB.deadmins[ckey]
  596. if(!A)
  597. A = GLOB.admin_datums[ckey]
  598. if (!A)
  599. var/msg = " is trying to readmin but they have no deadmin entry"
  600. message_admins("[key_name_admin(src)][msg]")
  601. log_admin_private("[key_name(src)][msg]")
  602. return
  603. A.associate(src)
  604. if (!holder)
  605. return //This can happen if an admin attempts to vv themself into somebody elses's deadmin datum by getting ref via brute force
  606. to_chat(src, "<span class='interface'>You are now an admin.</span>", confidential = TRUE)
  607. message_admins("[src] re-adminned themselves.")
  608. log_admin("[src] re-adminned themselves.")
  609. SSblackbox.record_feedback("tally", "admin_verb", 1, "Readmin")
  610. /client/proc/populate_world(amount = 50 as num)
  611. set name = "Populate World"
  612. set category = "Debug"
  613. set desc = "(\"Amount of mobs to create\") Populate the world with test mobs."
  614. if (amount > 0)
  615. var/area/area
  616. var/list/candidates
  617. var/turf/open/floor/tile
  618. var/j,k
  619. for (var/i = 1 to amount)
  620. j = 100
  621. do
  622. area = pick(GLOB.the_station_areas)
  623. if (area)
  624. candidates = get_area_turfs(area)
  625. if (candidates.len)
  626. k = 100
  627. do
  628. tile = pick(candidates)
  629. while ((!tile || !istype(tile)) && --k > 0)
  630. if (tile)
  631. var/mob/living/carbon/human/hooman = new(tile)
  632. hooman.equipOutfit(pick(subtypesof(/datum/outfit)))
  633. testing("Spawned test mob at [COORD(tile)]")
  634. while (!area && --j > 0)
  635. /client/proc/toggle_AI_interact()
  636. set name = "Toggle Admin AI Interact"
  637. set category = "Admin - Game"
  638. set desc = "Allows you to interact with most machines as an AI would as a ghost"
  639. AI_Interact = !AI_Interact
  640. if(mob && IsAdminGhost(mob))
  641. mob.has_unlimited_silicon_privilege = AI_Interact
  642. log_admin("[key_name(usr)] has [AI_Interact ? "activated" : "deactivated"] Admin AI Interact")
  643. message_admins("[key_name_admin(usr)] has [AI_Interact ? "activated" : "deactivated"] their AI interaction")