EditorRUS

Tournament script

Sep 5th, 2015
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.58 KB | None | 0 0
  1. var/list/classes = list("Assistant", "Chef", "Addicts", "Survivor", "Clown")
  2.  
  3. var/end = 0
  4. //-------------------------------------------------------------------------------------------------------------------
  5. #define GREEN "#00ff00"
  6. #define RED "#ff0000"
  7. //-------------------------------------------------------------------------------------------------------------------
  8. var/list/tourn_verbs = list(/client/proc/add_green,
  9. /client/proc/add_red,
  10. /client/proc/announce_banning,
  11. /client/proc/send_combatants,
  12. /client/proc/clear_thunder1,
  13. /client/proc/clear_thunder2,
  14. /client/proc/set_green_equip,
  15. /client/proc/set_red_equip,
  16. /client/proc/toggle_the_doors,
  17. /client/proc/start_fight,
  18. /client/proc/activate_timer,
  19. /client/proc/deactivate_timer,
  20. /client/proc/unfreeze,
  21. /client/proc/equipment_panel,
  22. /client/proc/make_test_site
  23. )
  24. /client/add_admin_verbs()
  25. ..()
  26. if (holder)
  27. verbs += tourn_verbs // Adds tournament verbs
  28.  
  29. //-------------------------------------------------------------------------------------------------------------------
  30. /client/proc/add_green()
  31. set name = "Add green player"
  32. set category = "Tournaments"
  33. if (!holder) return
  34.  
  35. var/list/keys = list()
  36. for(var/mob/dead/M in player_list)
  37. keys += M.client
  38. var/client/selection = input("Please, select a player!", "Add player", null, null) as null|anything in sortKey(keys)
  39. if(!selection)
  40. return
  41. var/mob/M = selection:mob
  42.  
  43. M = M.change_mob_type(/mob/living/carbon/human, pick(tdome2), selection.ckey, 1)
  44. M.client = selection
  45. M << "\red You've been sent to thunderdome as the green team and frozen"
  46. M.stunned = 99999
  47. M.Life()
  48. M.color = GREEN
  49. M.name = "\proper [selection.ckey]"
  50. M.real_name = "\proper [selection.ckey]"
  51. M.voice_name = "\proper [selection.ckey]"
  52.  
  53. /client/proc/add_red()
  54. set name = "Add red player"
  55. set category = "Tournaments"
  56. if (!holder) return
  57.  
  58. var/list/keys = list()
  59. for(var/mob/dead/M in player_list)
  60. keys += M.client
  61. var/client/selection = input("Please, select a player!", "Add player", null, null) as null|anything in sortKey(keys)
  62. if(!selection)
  63. return
  64. var/mob/M = selection:mob
  65.  
  66. M = M.change_mob_type(/mob/living/carbon/human, pick(tdome1), selection.ckey, 1)
  67. M.client = selection
  68. M << "\red You've been sent to thunderdome as the red team and frozen"
  69. M.stunned = 99999
  70. M.Life()
  71. M.color = RED
  72. M.name = "\proper [selection.ckey]"
  73. M.real_name = "\proper [selection.ckey]"
  74. M.voice_name = "\proper [selection.ckey]"
  75. //-------------------------------------------------------------------------------------------------------------------
  76. /client/proc/ban_class()
  77. set name = "Exclude class"
  78. set category = "Tournaments"
  79.  
  80. var/ban_class = input("Please, select a class to be excluded", "Class exclusion", null, null) as anything in classes
  81. classes -= ban_class
  82. world << "\red \bold [ckey] has excluded [lowertext(ban_class)]s"
  83. verbs -= /client/proc/ban_class
  84. if (classes.len == 1)
  85. world << "\red The players have chosen to fight using [lowertext(classes[1])]s"
  86. return
  87.  
  88. for (var/mob/living/carbon/human/M in world)
  89. if (M.color != usr.color)
  90. M.verbs += /client/proc/ban_class
  91. else if (M != usr)
  92. M.verbs -= /client/proc/ban_class
  93.  
  94. /client/proc/announce_banning()
  95. set name = "Announce exclusion"
  96. set category = "Tournaments"
  97. if (!holder) return
  98.  
  99. classes = list("Assistant", "Chef", "The Stoner", "The Survivor", "The Motherfucking Clown")
  100. world << "\red \bold The red team starts excluding classes"
  101. for (var/mob/living/carbon/human/M in world)
  102. if (M.color == RED)
  103. M.verbs += /client/proc/ban_class
  104. //-------------------------------------------------------------------------------------------------------------------
  105. /client/proc/send_combatants()
  106. set name = "Send combatants away"
  107. set category = "Tournaments"
  108. if (!holder) return
  109.  
  110. for (var/mob/living/carbon/human/M in world)
  111. if (M.color == RED)
  112. M.loc = pick(tdome1)
  113. if (M.color == GREEN)
  114. M.loc = pick(tdome2)
  115. M.revive()
  116. M.weakened = 2
  117. M.Life()
  118.  
  119. for (var/obj/machinery/door/poddoor/P in world)
  120. if (P.id == "thunderdome")
  121. spawn(0) P.close(1)
  122. //-------------------------------------------------------------------------------------------------------------------
  123. /client/proc/clear_thunder1()
  124. set name = "Remove general mess"
  125. set category = "Tournaments"
  126. if (!holder) return
  127.  
  128. for (var/obj/item/I in get_area_all_atoms(/area/tdome))
  129. qdel(I)
  130. for (var/obj/item/clothing/C in get_area_all_atoms(/area/tdome))
  131. qdel(C)
  132. for (var/obj/effect/decal/D in get_area_all_atoms(/area/tdome))
  133. qdel(D)
  134. for (var/obj/item/ammo_casing/X in get_area_all_atoms(/area/tdome))
  135. qdel(X)
  136. for (var/mob/living/simple_animal/X in get_area_all_atoms(/area/tdome))
  137. qdel(X)
  138.  
  139. /client/proc/clear_thunder2()
  140. set name = "Remove players"
  141. set category = "Tournaments"
  142. if (!holder) return
  143. for (var/mob/living/carbon/human/M in get_area_all_atoms(/area/tdome))
  144. if (M.color in list(RED, GREEN))
  145. for (var/obj/item/I in M)
  146. if (istype(I, /obj/item/weapon/implant))
  147. continue
  148. qdel(I)
  149. M.ghostize(0)
  150. qdel(M)
  151. end = 1
  152. //-------------------------------------------------------------------------------------------------------------------
  153. /client/proc/set_green_equip()
  154. set name = "Set green tea equipment"
  155. set category = "Tournaments"
  156. if (!holder) return
  157.  
  158. set_equip_tournament(GREEN, usr)
  159.  
  160. /client/proc/set_red_equip()
  161. set name = "Set red team equipment"
  162. set category = "Tournaments"
  163. if (!holder) return
  164.  
  165. set_equip_tournament(RED, usr)
  166. //-------------------------------------------------------------------------------------------------------------------
  167. /client/proc/toggle_the_doors()
  168. set name = "Toggle doors"
  169. set category = "Tournaments"
  170. if (!holder) return
  171.  
  172. for (var/obj/machinery/door/poddoor/P in world)
  173. if (P.id == "thunderdome")
  174. if (P.density) //What the fuck?
  175. spawn(0) P.open(1)
  176. else
  177. spawn(0) P.close(1)
  178. //-------------------------------------------------------------------------------------------------------------------
  179. /client/proc/unfreeze()
  180. set name = "Unfreeze combatants"
  181. set category = "Tournaments"
  182. if (!holder) return
  183.  
  184. for (var/mob/living/carbon/human/M in get_area_all_atoms(/area/tdome))
  185. if (M.color in list(RED, GREEN))
  186. M.stunned = 0
  187. M << "\red \bold You've been unfrozen"
  188. //-------------------------------------------------------------------------------------------------------------------
  189. /client/proc/start_fight()
  190. set name = "Start"
  191. set category = "Tournaments"
  192. if (!holder) return
  193.  
  194. end = 0
  195.  
  196. for (var/mob/living/carbon/human/M in get_area_all_atoms(/area/tdome))
  197. if (M.color in list(RED, GREEN))
  198. M.stunned = 0
  199.  
  200. for (var/obj/machinery/door/poddoor/P in world)
  201. if (P.id == "thunderdome")
  202. spawn(0) P.open(1)
  203.  
  204. players_tracker()
  205. world << "\red \bold The fight starts!"
  206.  
  207. /proc/players_tracker()
  208. var/list/mob/living/carbon/mobs = list()
  209. var/list/teams = list()
  210. var/list/people_alive = list()
  211.  
  212. people_alive["Red"] = 0
  213. people_alive["Green"] = 0
  214.  
  215. for (var/mob/living/carbon/human/X in get_area_all_atoms(/area/tdome))
  216. if (X.color == RED)
  217. mobs[X.ckey] = X
  218. teams[X.ckey] = RED
  219. people_alive["Red"]++
  220.  
  221. if (X.color == GREEN)
  222. mobs[X.ckey] = X
  223. teams[X.ckey] = GREEN
  224. people_alive["Green"]++
  225.  
  226. spawn while (1)
  227. if (end)
  228. for (var/datum/tournament/timer/T in timers)
  229. T.deactivated = 1
  230. return
  231.  
  232. for (var/ckey in mobs)
  233. var/mob/living/carbon/the_mob = mobs[ckey]
  234. if (!the_mob || the_mob.health <= 0)
  235. people_alive[teams[ckey] == RED ? "Red" : "Green"]--
  236. world << "\red \bold The [teams[ckey] == RED ? "red" : "green"] team has lost [ckey]. Alive left: [people_alive[teams[ckey] == RED ? "red" : "green"]]"
  237.  
  238. if (people_alive["Red"] == 0 && people_alive["Red"] == people_alive["Green"])
  239. world << "\red \bold Draw!"
  240. end = 1
  241.  
  242. else if (!people_alive["Red"])
  243. world << "\red \bold The green team wins!<br>Alive:"
  244. for (var/ckey in mobs)
  245. if (teams[ckey] == GREEN)
  246. world << "\red \bold [ckey]"
  247. end = 1
  248.  
  249. else if (!people_alive["Green"])
  250. world << "\red \bold The red team wins!<br>Alive:"
  251. for (var/ckey in mobs)
  252. if (teams[ckey] == RED)
  253. world << "\red \bold [ckey]"
  254. end = 1
  255.  
  256. if (end)
  257. for (var/datum/tournament/timer/T in timers)
  258. T.deactivated = 1
  259. return
  260. sleep(1)
  261. //-------------------------------------------------------------------------------------------------------------------
  262. var/datum/tournament/timer/timers = list()
  263.  
  264. /client/proc/activate_timer()
  265. set name = "Activate timer"
  266. set category = "Tournaments"
  267. if (!holder) return
  268.  
  269. var/timer_types = list("Damage", "Force", "Speed")
  270.  
  271. var/set_to = input(usr) as num
  272. var/timer_type = input(usr) in timer_types
  273.  
  274. new /datum/tournament/timer(set_to, timer_type)
  275.  
  276. /client/proc/deactivate_timer()
  277. set name = "Deactivate timers"
  278. set category = "Tournaments"
  279. if (!holder) return
  280.  
  281. for (var/datum/tournament/timer/T in timers)
  282. T.deactivated = 1
  283.  
  284. /datum/tournament/timer
  285. var/timer_type = 0
  286. var/timer_set = 0
  287. var/counter = 0
  288. var/lst_announce = 0
  289. var/deactivated = 0
  290. var/name = ""
  291.  
  292. New(setting, timer_type)
  293. ..()
  294. src.timer_type = timer_type
  295. src.timer_set = setting
  296. timers += src
  297. announce()
  298. activate_timer()
  299.  
  300. proc/announce()
  301. var/type_string = ""
  302. switch (timer_type)
  303. if ("Damage")
  304. type_string = "damaging"
  305. if ("Force")
  306. type_string = "instagib"
  307. if ("Speed")
  308. type_string = "slowing"
  309. var/what_it_does = ""
  310. switch (timer_type)
  311. if ("Damage")
  312. what_it_does = "All players will get [100/timer_set] damage a sec."
  313. if ("Force")
  314. what_it_does = "All weapons will gain additional damage."
  315. if ("Speed")
  316. what_it_does = "All players will lose their body temperature until -273.15 C"
  317.  
  318. world << "\red \bold \A [type_string] timer for [timer_set] seconds has been set. [what_it_does]"
  319.  
  320. proc/activate_timer()
  321. spawn while (1)
  322. if (deactivated)
  323. timers -= src
  324. del(src)
  325. return
  326. for (var/mob/living/carbon/human/M in get_area_all_atoms(/area/tdome))
  327. if (M.color in list(RED, GREEN))
  328. switch(timer_type)
  329. if ("Speed")
  330. M.bodytemperature = BODYTEMP_COLD_DAMAGE_LIMIT - ((counter / timer_set) * (10*COLD_SLOWDOWN_FACTOR))
  331. // At the end they get +10 movement delay
  332. M.Life()
  333. if ("Damage")
  334. M.adjustCloneLoss(100 / timer_set)
  335.  
  336. for (var/obj/item/I in M)
  337. if (timer_type != "Force") break
  338. if (I.force)
  339. I.force = (counter / timer_set) * (100 - initial(I.force)) + initial(I.force)
  340. if (I.throwforce)
  341. I.throwforce = (counter / timer_set) * (100 - initial(I.throwforce)) + initial(I.throwforce)
  342.  
  343. for (var/obj/item/I in get_area_all_atoms(/area/tdome))
  344. if (timer_type != "Force") break
  345. if (I.force)
  346. I.force = (counter / timer_set) * (100 - initial(I.force)) + initial(I.force)
  347. if (I.throwforce)
  348. I.throwforce = (counter / timer_set) * (100 - initial(I.throwforce)) + initial(I.throwforce)
  349.  
  350. if (round(counter / (timer_set / 10)) > lst_announce)
  351. world << "\red \bold Time left: [timer_set - counter] seconds"
  352. lst_announce = round(counter / (timer_set / 10))
  353.  
  354. counter++
  355.  
  356. if (timer_set <= counter)
  357. world << "\red \bold Time is up"
  358. timers -= src
  359. del(src)
  360. return
  361. sleep(10)
  362. //-------------------------------------------------------------------------------------------------------------------
  363.  
  364. /*
  365. Done :1. Implement V+
  366. */
  367.  
  368.  
  369. var/datum/tournament/equipment_controller/EController = new
  370.  
  371. /client/proc/equipment_panel()
  372. set name = "Equipment panel"
  373. set category = "Tournaments"
  374. if (!holder) return
  375.  
  376. EController.open_for(usr)
  377.  
  378. /datum/tournament/equip_set
  379. var/name = ""
  380. var/list/datum/tournament/equip_piece/pieces = list()
  381.  
  382. /datum/tournament/equip_piece
  383. var/spawn_type = /obj
  384. var/list/datum/tournament/equip_piece/to_pieces = list()
  385. var/datum/tournament/equip_piece/from_piece
  386. var/datum/tournament/equip_set/super
  387. var/list/vars_names = list()
  388. var/list/new_values = list()
  389.  
  390. /datum/tournament/equipment_controller
  391. var/list/datum/tournament/equip_set/sets = list()
  392.  
  393. proc/get_tabs(number)
  394. var/result = ""
  395. for (var/i=1, i<=number, i++)
  396. result += "  "
  397. return result
  398.  
  399. var/data_html = ""
  400. proc/recursive_depth_data_html(datum/tournament/equip_piece/curnode, depth) //
  401. data_html += "[get_tabs(depth)][curnode.spawn_type] <a href='?src=\ref[src];add_content=\ref[curnode]'>+</a> <a href='?src=\ref[src];delete_piece=\ref[curnode]'>-</a> <a href='?src=\ref[src];add_var=\ref[curnode]'>v+</a><br>"
  402.  
  403. for (var/indx = 1, indx<=curnode.vars_names.len, indx++)
  404. data_html += "[get_tabs(depth+1)][curnode.vars_names[indx]] = [curnode.new_values[indx]] <a href='?src=\ref[src];source=\ref[curnode];delete_var=[indx]'>v-</a> <a href='?src=\ref[src];source=\ref[curnode];edit_varname=[indx]'>~n</a> <a href='?src=\ref[src];source=\ref[curnode];edit_varvalue=[indx]'>~v</a><br>"
  405.  
  406. for (var/datum/tournament/equip_piece/E in curnode.to_pieces)
  407. recursive_depth_data_html(E, depth+1)
  408.  
  409.  
  410. var/export_string = ""
  411.  
  412.  
  413. proc/recursive_depth_export_string(datum/tournament/equip_piece/curnode)
  414. export_string += "\[[curnode.spawn_type]:"
  415. for (var/indx = 1, indx<=curnode.vars_names.len, indx++)
  416. export_string += "[curnode.vars_names[indx]]=[curnode.new_values[indx]]"
  417. if (indx < curnode.vars_names.len)
  418. export_string += ","
  419. export_string += ":"
  420. var/i = 0 //Fuck you
  421. for (var/datum/tournament/equip_piece/E in curnode.to_pieces)
  422. i++
  423. recursive_depth_export_string(E)
  424. if (i < curnode.to_pieces.len)
  425. export_string += ","
  426. export_string += "\]"
  427.  
  428.  
  429. proc/get_equip_data()
  430. data_html = "" //Null the data
  431. for (var/datum/tournament/equip_set/E in sets)
  432. data_html += "[E.name] <a href='?src=\ref[src];add_piece_to=\ref[E]'>+</a> <a href='?src=\ref[src];delete_set=\ref[E]'>-</a> <a href='?src=\ref[src];export_set=\ref[E]'>S</a><br>"
  433. for (var/datum/tournament/equip_piece/F in E.pieces)
  434. recursive_depth_data_html(F, 1)
  435. return data_html
  436.  
  437. proc/get_export_string_of_sets(list/datum/tournament/equip_set/E)
  438. export_string = ""
  439. for (var/datum/tournament/equip_set/F in E)
  440. export_string += "{"
  441. export_string += "[F.name]:"
  442. for (var/datum/tournament/equip_piece/G in F.pieces)
  443. recursive_depth_export_string(G)
  444. export_string += "}"
  445. return export_string
  446.  
  447. proc/perform_import(the_string)
  448.  
  449.  
  450. proc/open_for(var/mob/user)
  451. var/dat = ""
  452.  
  453. dat += "<a href='?src=\ref[src];add_set=1'>+</a> <a href='?src=\ref[src];import_sets=1'>G</a> <a href='?src=\ref[src];export_sets=1'>S</a><br><br>"
  454. dat += get_equip_data()
  455.  
  456. user << browse(dat, "window=equippanel")
  457.  
  458. Topic(href, href_list)
  459. if (href_list["add_set"])
  460. var/set_name = input(usr, "Enter a name for new set") as text
  461. if (!set_name)
  462. return
  463. var/datum/tournament/equip_set/new_set = new /datum/tournament/equip_set
  464. new_set.name = set_name
  465. sets += new_set
  466.  
  467. if (href_list["add_piece_to"])
  468. var/piece_type = input(usr, "Enter a type for new piece") as text
  469. if (!piece_type)
  470. return
  471. if (text2path(piece_type))
  472. var/datum/tournament/equip_piece/new_piece = new
  473. new_piece.spawn_type = text2path(piece_type)
  474. var/datum/tournament/equip_set/source = locate(href_list["add_piece_to"])
  475. source.pieces += new_piece
  476. new_piece.super = source
  477. else
  478. usr << "\red Incorrect path"
  479.  
  480. if (href_list["add_content"])
  481. var/piece_type = input(usr, "Enter a type for new piece") as text
  482. if (!piece_type)
  483. return
  484. if (text2path(piece_type))
  485. var/datum/tournament/equip_piece/new_piece = new
  486. var/datum/tournament/equip_piece/source = locate(href_list["add_content"])
  487. new_piece.spawn_type = text2path(piece_type)
  488. new_piece.from_piece = source
  489. source.to_pieces += new_piece
  490. else
  491. usr << "\red Incorrect path"
  492.  
  493. if (href_list["delete_piece"])
  494. var/datum/tournament/equip_piece/piece = locate(href_list["delete_piece"]) // Piece in question
  495. if (piece.super) // Parent piece
  496. piece.super.pieces -= piece // Exclude the piece
  497. piece.super = null
  498. if (piece.from_piece)
  499. piece.from_piece.to_pieces -= piece
  500. piece.from_piece = null
  501.  
  502. if (href_list["delete_set"])
  503. sets ^= locate(href_list["delete_set"])
  504. del(locate(href_list["delete_set"]))
  505.  
  506. if (href_list["export_set"])
  507. usr << browse(get_export_string_of_sets(list(locate(href_list["export_set"]))), "window=setstring")
  508.  
  509. if (href_list["export_sets"])
  510. usr << browse(get_export_string_of_sets(sets), "window=setstring")
  511.  
  512. if (href_list["add_var"])
  513. var/datum/tournament/equip_piece/piece = locate(href_list["add_var"])
  514. var/varname = input(usr, "Enter the name of var (or multiple references ending each with . as in obj1.obj2.var)")
  515. var/list/types = list("num", "text")
  516. var/vartype = input(usr, "Select the type of the var") in types
  517. var/varvalue
  518. switch (vartype)
  519. if ("num")
  520. varvalue = input(usr, "Enter the value") as num
  521. if ("text")
  522. varvalue = input(usr, "Enter the value") as text
  523. piece.vars_names += varname
  524. piece.new_values += varvalue
  525.  
  526. if (href_list["delete_var"])
  527. var/datum/tournament/equip_piece/piece = locate(href_list["source"])
  528. var/indx = text2num(href_list["delete_var"])
  529. var/list/new_vars_names = list()
  530. var/list/new_new_values = list()
  531. for (var/i = 1, i<=length(piece.vars_names), i++)
  532. if (i != indx)
  533. new_vars_names += piece.vars_names[i]
  534. new_new_values += piece.new_values[i]
  535. piece.vars_names = new_vars_names
  536. piece.new_values = new_new_values
  537.  
  538. if (href_list["edit_varname"])
  539. var/datum/tournament/equip_piece/piece = locate(href_list["source"])
  540. var/indx = text2num(href_list["edit_varname"])
  541. piece.vars_names[indx] = input(usr, "Enter new name")
  542.  
  543. if (href_list["edit_varvalue"])
  544. var/datum/tournament/equip_piece/piece = locate(href_list["source"])
  545. var/indx = text2num(href_list["edit_varvalue"])
  546. var/t = (isnum(piece.new_values[indx]) ? 1 : 0)
  547. if (t)
  548. piece.new_values[indx] = input(usr, "Enter new value") as num
  549. else
  550. piece.new_values[indx] = input(usr, "Enter new value")
  551.  
  552. open_for(usr)
  553.  
  554. /proc/set_equip_tournament(the_color, caller) //Copypaste of cmd
  555. var/list/dresspacks = list(
  556. "naked",
  557. "as job...",
  558. "standard space gear",
  559. "tournament standard red",
  560. "tournament standard green",
  561. "tournament gangster",
  562. "tournament chef",
  563. "tournament janitor",
  564. "laser tag red",
  565. "laser tag blue",
  566. "pirate",
  567. "space pirate",
  568. "soviet admiral",
  569. "tunnel clown",
  570. "masked killer",
  571. "assassin",
  572. "mobster",
  573. "death commando",
  574. "emergency response officer",
  575. "centcom official",
  576. "centcom commander",
  577. "special ops officer",
  578. "blue wizard",
  579. "red wizard",
  580. "marisa wizard",
  581. "plasmaman"
  582. )
  583. var/dresscode = input(caller, "Select dress for [the_color]", "Robust quick dress shop") as null|anything in dresspacks
  584. if (isnull(dresscode))
  585. return
  586.  
  587. var/datum/job/jobdatum
  588. if (dresscode == "as job...")
  589. var/jobname = input(caller, "Select job", "Robust quick dress shop") as null|anything in get_all_jobs()
  590. if(isnull(jobname))
  591. return
  592. jobdatum = SSjob.GetJob(jobname)
  593.  
  594. var/list/mob/living/mobs_avail = list()
  595. for (var/mob/living/N in get_area_all_atoms(/area/tdome))
  596. if (N.color == the_color)
  597. mobs_avail += N
  598.  
  599. for (var/mob/living/M in mobs_avail)
  600. for (var/obj/item/I in M)
  601. if (istype(I, /obj/item/weapon/implant))
  602. continue
  603. qdel(I)
  604.  
  605. switch(dresscode)
  606. if ("naked")
  607. //do nothing
  608.  
  609. if ("as job...")
  610. if(jobdatum)
  611. dresscode = jobdatum.title
  612. M.job = jobdatum.title
  613. jobdatum.equip(M)
  614.  
  615. if ("standard space gear")
  616. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
  617.  
  618. M.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(M), slot_w_uniform)
  619. M.equip_to_slot_or_del(new /obj/item/clothing/suit/space(M), slot_wear_suit)
  620. M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space(M), slot_head)
  621. var /obj/item/weapon/tank/jetpack/J = new /obj/item/weapon/tank/jetpack/oxygen(M)
  622. M.equip_to_slot_or_del(J, slot_back)
  623. J.toggle()
  624. M.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(M), slot_wear_mask)
  625. J.Topic(null, list("stat" = 1))
  626.  
  627. if ("tournament standard red","tournament standard green") //we think stunning weapon is too overpowered to use it on tournaments. --rastaf0
  628. if (dresscode=="tournament standard red")
  629. M.equip_to_slot_or_del(new /obj/item/clothing/under/color/red(M), slot_w_uniform)
  630. else
  631. M.equip_to_slot_or_del(new /obj/item/clothing/under/color/green(M), slot_w_uniform)
  632. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
  633.  
  634. M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(M), slot_wear_suit)
  635. M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/thunderdome(M), slot_head)
  636.  
  637. M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/destroyer(M), slot_r_hand)
  638. M.equip_to_slot_or_del(new /obj/item/weapon/kitchen/knife(M), slot_l_hand)
  639. M.equip_to_slot_or_del(new /obj/item/weapon/grenade/smokebomb(M), slot_r_store)
  640.  
  641.  
  642. if ("tournament gangster") //gangster are supposed to fight each other. --rastaf0
  643. M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/det(M), slot_w_uniform)
  644. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
  645.  
  646. M.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/det_suit(M), slot_wear_suit)
  647. M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(M), slot_glasses)
  648. M.equip_to_slot_or_del(new /obj/item/clothing/head/det_hat(M), slot_head)
  649.  
  650. M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile(M), slot_r_hand)
  651. M.equip_to_slot_or_del(new /obj/item/ammo_box/c10mm(M), slot_l_store)
  652.  
  653. if ("tournament chef") //Steven Seagal FTW
  654. M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chef(M), slot_w_uniform)
  655. M.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/chef(M), slot_wear_suit)
  656. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
  657. M.equip_to_slot_or_del(new /obj/item/clothing/head/chefhat(M), slot_head)
  658.  
  659. M.equip_to_slot_or_del(new /obj/item/weapon/kitchen/rollingpin(M), slot_r_hand)
  660. M.equip_to_slot_or_del(new /obj/item/weapon/kitchen/knife(M), slot_l_hand)
  661. M.equip_to_slot_or_del(new /obj/item/weapon/kitchen/knife(M), slot_r_store)
  662. M.equip_to_slot_or_del(new /obj/item/weapon/kitchen/knife(M), slot_s_store)
  663.  
  664. if ("tournament janitor")
  665. M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/janitor(M), slot_w_uniform)
  666. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
  667. var/obj/item/weapon/storage/backpack/backpack = new(M)
  668. for(var/obj/item/I in backpack)
  669. qdel(I)
  670. M.equip_to_slot_or_del(backpack, slot_back)
  671.  
  672. M.equip_to_slot_or_del(new /obj/item/weapon/mop(M), slot_r_hand)
  673. var/obj/item/weapon/reagent_containers/glass/bucket/bucket = new(M)
  674. bucket.reagents.add_reagent("water", 70)
  675. M.equip_to_slot_or_del(bucket, slot_l_hand)
  676.  
  677. M.equip_to_slot_or_del(new /obj/item/weapon/grenade/chem_grenade/cleaner(M), slot_r_store)
  678. M.equip_to_slot_or_del(new /obj/item/weapon/grenade/chem_grenade/cleaner(M), slot_l_store)
  679. M.equip_to_slot_or_del(new /obj/item/stack/tile/plasteel(M), slot_in_backpack)
  680. M.equip_to_slot_or_del(new /obj/item/stack/tile/plasteel(M), slot_in_backpack)
  681. M.equip_to_slot_or_del(new /obj/item/stack/tile/plasteel(M), slot_in_backpack)
  682. M.equip_to_slot_or_del(new /obj/item/stack/tile/plasteel(M), slot_in_backpack)
  683. M.equip_to_slot_or_del(new /obj/item/stack/tile/plasteel(M), slot_in_backpack)
  684. M.equip_to_slot_or_del(new /obj/item/stack/tile/plasteel(M), slot_in_backpack)
  685. M.equip_to_slot_or_del(new /obj/item/stack/tile/plasteel(M), slot_in_backpack)
  686.  
  687. if ("laser tag red")
  688. M.equip_to_slot_or_del(new /obj/item/clothing/under/color/red(M), slot_w_uniform)
  689. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/red(M), slot_shoes)
  690. M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/red(M), slot_gloves)
  691. M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/redtaghelm(M), slot_head)
  692. M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
  693. M.equip_to_slot_or_del(new /obj/item/clothing/suit/redtag(M), slot_wear_suit)
  694. M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
  695. M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
  696. M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/laser/redtag(M), slot_s_store)
  697.  
  698. if ("laser tag blue")
  699. M.equip_to_slot_or_del(new /obj/item/clothing/under/color/blue(M), slot_w_uniform)
  700. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/blue(M), slot_shoes)
  701. M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/blue(M), slot_gloves)
  702. M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/bluetaghelm(M), slot_head)
  703. M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
  704. M.equip_to_slot_or_del(new /obj/item/clothing/suit/bluetag(M), slot_wear_suit)
  705. M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
  706. M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
  707. M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/laser/bluetag(M), slot_s_store)
  708.  
  709. if ("pirate")
  710. M.equip_to_slot_or_del(new /obj/item/clothing/under/pirate(M), slot_w_uniform)
  711. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(M), slot_shoes)
  712. M.equip_to_slot_or_del(new /obj/item/clothing/head/bandana(M), slot_head)
  713. M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
  714. M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/pirate(M), slot_r_hand)
  715.  
  716. if ("space pirate")
  717. M.equip_to_slot_or_del(new /obj/item/clothing/under/pirate(M), slot_w_uniform)
  718. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(M), slot_shoes)
  719. M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/pirate(M), slot_wear_suit)
  720. M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/pirate(M), slot_head)
  721. M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
  722.  
  723. M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/pirate(M), slot_r_hand)
  724.  
  725. if("tunnel clown")//Tunnel clowns rule!
  726. M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(M), slot_w_uniform)
  727. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(M), slot_shoes)
  728. M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
  729. M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(M), slot_wear_mask)
  730. M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
  731. M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(M), slot_glasses)
  732. M.equip_to_slot_or_del(new /obj/item/clothing/suit/hooded/chaplain_hoodie(M), slot_wear_suit)
  733. M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(M), slot_l_store)
  734. M.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(M), slot_r_store)
  735.  
  736. var/obj/item/weapon/card/id/W = new(M)
  737. W.access = get_all_accesses()
  738. W.assignment = "Tunnel Clown!"
  739. W.registered_name = M.real_name
  740. W.update_label(M.real_name)
  741. M.equip_to_slot_or_del(W, slot_wear_id)
  742.  
  743. var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
  744. M.equip_to_slot_or_del(fire_axe, slot_r_hand)
  745.  
  746. if("masked killer")
  747. M.equip_to_slot_or_del(new /obj/item/clothing/under/overalls(M), slot_w_uniform)
  748. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/white(M), slot_shoes)
  749. M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex(M), slot_gloves)
  750. M.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(M), slot_wear_mask)
  751. M.equip_to_slot_or_del(new /obj/item/clothing/head/welding(M), slot_head)
  752. M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
  753. M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(M), slot_glasses)
  754. M.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(M), slot_wear_suit)
  755. M.equip_to_slot_or_del(new /obj/item/weapon/kitchen/knife(M), slot_l_store)
  756. M.equip_to_slot_or_del(new /obj/item/weapon/scalpel(M), slot_r_store)
  757.  
  758. var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
  759. M.equip_to_slot_or_del(fire_axe, slot_r_hand)
  760.  
  761. for(var/obj/item/carried_item in M.contents)
  762. if(!istype(carried_item, /obj/item/weapon/implant))//If it's not an implant.
  763. carried_item.add_blood(M)//Oh yes, there will be blood...
  764.  
  765. if("assassin")
  766. var/obj/item/clothing/under/U = new /obj/item/clothing/under/suit_jacket(M)
  767. M.equip_to_slot_or_del(U, slot_w_uniform)
  768. U.attachTie(new /obj/item/clothing/tie/waistcoat(M))
  769. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
  770. M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
  771. M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
  772. M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
  773. M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/saber(M), slot_l_store)
  774.  
  775. var/obj/item/weapon/storage/secure/briefcase/sec_briefcase = new(M)
  776. for(var/obj/item/briefcase_item in sec_briefcase)
  777. qdel(briefcase_item)
  778. for(var/i=3, i>0, i--)
  779. sec_briefcase.contents += new /obj/item/stack/spacecash/c1000
  780. sec_briefcase.contents += new /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow
  781. sec_briefcase.contents += new /obj/item/weapon/gun/projectile/revolver/mateba
  782. sec_briefcase.contents += new /obj/item/ammo_box/a357
  783. sec_briefcase.contents += new /obj/item/weapon/c4
  784. M.equip_to_slot_or_del(sec_briefcase, slot_l_hand)
  785.  
  786. var/obj/item/device/pda/heads/pda = new(M)
  787. pda.owner = M.real_name
  788. pda.ownjob = "Reaper"
  789. pda.update_label()
  790.  
  791. M.equip_to_slot_or_del(pda, slot_belt)
  792.  
  793. var/obj/item/weapon/card/id/syndicate/W = new(M)
  794. W.access = get_all_accesses()
  795. W.assignment = "Reaper"
  796. W.registered_name = M.real_name
  797. W.update_label(M.real_name)
  798. M.equip_to_slot_or_del(W, slot_wear_id)
  799. // DEATH SQUADS
  800. if("death commando")
  801. equip_deathsquad(M)
  802.  
  803. if("emergency response officer")
  804. var/alert
  805. if(alert("Code Red ERT?","Select Response Level","Yes","No")=="Yes")
  806. alert = 1
  807. else
  808. alert = 0
  809. switch(input("Which class?") in list("Commander","Security","Engineer","Medic"))
  810. if("Commander")
  811. equip_emergencyresponsesquad(M, "commander",alert)
  812. if("Security")
  813. equip_emergencyresponsesquad(M, "sec",alert)
  814. if("Engineer")
  815. equip_emergencyresponsesquad(M, "eng",alert)
  816. if("Medic")
  817. equip_emergencyresponsesquad(M, "med",alert)
  818.  
  819. if("centcom official")
  820. equip_centcomofficial(M)
  821.  
  822. if("centcom commander")
  823. M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_commander(M), slot_w_uniform)
  824. M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/bulletproof(M), slot_wear_suit)
  825. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat/swat(M), slot_shoes)
  826. M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
  827. M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cent/commander(M), slot_ears)
  828. M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
  829. M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/cohiba(M), slot_wear_mask)
  830. M.equip_to_slot_or_del(new /obj/item/clothing/head/centhat(M), slot_head)
  831. M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(M), slot_belt)
  832. M.equip_to_slot_or_del(new /obj/item/weapon/lighter/zippo(M), slot_r_store)
  833. M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_l_store)
  834. M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
  835.  
  836. var/obj/item/weapon/card/id/W = new(M)
  837. W.icon_state = "centcom"
  838. W.access = get_all_accesses()
  839. W.access += get_centcom_access("Centcom Commander")
  840. W.assignment = "Centcom Commander"
  841. W.registered_name = M.real_name
  842. W.update_label()
  843. M.equip_to_slot_or_del(W, slot_wear_id)
  844.  
  845. if("special ops officer")
  846. var/obj/item/device/radio/headset/R = new /obj/item/device/radio/headset/headset_cent/commander(M)
  847. R.set_frequency(CENTCOM_FREQ)
  848. R.freqlock = 1
  849. M.equip_to_slot_or_del(R, slot_ears)
  850.  
  851. M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(M), slot_w_uniform)
  852. M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/officer(M), slot_wear_suit)
  853. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat/swat(M), slot_shoes)
  854. M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
  855. M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
  856. M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/havana(M), slot_wear_mask)
  857. M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/beret(M), slot_head)
  858. M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/m1911(M), slot_belt)
  859. M.equip_to_slot_or_del(new /obj/item/weapon/lighter/zippo(M), slot_r_store)
  860. M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
  861.  
  862. var/obj/item/weapon/card/id/W = new(M)
  863. W.icon_state = "centcom"
  864. W.access = get_all_accesses()
  865. W.access += get_centcom_access("Special Ops Officer")
  866. W.assignment = "Special Ops Officer"
  867. W.registered_name = M.real_name
  868. W.update_label()
  869. M.equip_to_slot_or_del(W, slot_wear_id)
  870.  
  871. if("blue wizard")
  872. M.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(M), slot_w_uniform)
  873. M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(M), slot_wear_suit)
  874. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
  875. M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
  876. M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(M), slot_head)
  877. M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
  878. M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
  879. M.equip_to_slot_or_del(new /obj/item/weapon/staff(M), slot_l_hand)
  880. M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
  881. M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
  882.  
  883. if("red wizard")
  884. M.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(M), slot_w_uniform)
  885. M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/red(M), slot_wear_suit)
  886. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
  887. M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
  888. M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/red(M), slot_head)
  889. M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
  890. M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
  891. M.equip_to_slot_or_del(new /obj/item/weapon/staff(M), slot_l_hand)
  892. M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
  893. M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
  894.  
  895. if("marisa wizard")
  896. M.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(M), slot_w_uniform)
  897. M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/marisa(M), slot_wear_suit)
  898. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/marisa(M), slot_shoes)
  899. M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
  900. M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/marisa(M), slot_head)
  901. M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
  902. M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
  903. M.equip_to_slot_or_del(new /obj/item/weapon/staff(M), slot_l_hand)
  904. M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
  905. M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
  906.  
  907. if("soviet admiral")
  908. M.equip_to_slot_or_del(new /obj/item/clothing/head/hgpiratecap(M), slot_head)
  909. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
  910. M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
  911. M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cent(M), slot_ears)
  912. M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
  913. M.equip_to_slot_or_del(new /obj/item/clothing/suit/hgpirate(M), slot_wear_suit)
  914. M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
  915. M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(M), slot_belt)
  916. M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
  917.  
  918. var/obj/item/weapon/card/id/W = new(M)
  919. W.icon_state = "centcom"
  920. W.access = get_all_accesses()
  921. W.access += get_centcom_access("Admiral")
  922. W.assignment = "Admiral"
  923. W.registered_name = M.real_name
  924. W.update_label()
  925. M.equip_to_slot_or_del(W, slot_wear_id)
  926.  
  927. if("mobster")
  928. M.equip_to_slot_or_del(new /obj/item/clothing/head/fedora(M), slot_head)
  929. M.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
  930. M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
  931. M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
  932. M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
  933. M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/tommygun(M), slot_r_hand)
  934. M.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket/really_black(M), slot_w_uniform)
  935.  
  936. var/obj/item/weapon/card/id/W = new(M)
  937. W.assignment = "Assistant"
  938. W.registered_name = M.real_name
  939. W.update_label()
  940. M.equip_to_slot_or_del(W, slot_wear_id)
  941.  
  942. if("plasmaman")
  943. M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/hardsuit/plasmaman(M), slot_head)
  944. M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/eva/plasmaman(M),slot_wear_suit)
  945. M.equip_to_slot_or_del(new /obj/item/weapon/tank/internals/plasmaman/full(M),slot_back)
  946. M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M),slot_wear_mask)
  947.  
  948.  
  949. M.regenerate_icons()
  950.  
  951.  
  952. /client/proc/make_test_site()
  953. set name = "Make a test site"
  954. set category = "Tournaments"
  955. set background = 1
  956. if (!holder) return
  957.  
  958. var/turf/center = get_turf(usr)
  959. var/radius = input(usr, "Enter the radius of the test site") as num
  960.  
  961. var/turf/left_up_tile = locate(center.x - radius - 1, center.y - radius - 1, center.z)
  962. var/turf/right_down_tile = locate(center.x + radius + 1, center.y + radius + 1, center.z)
  963. var/list/turf/affected = block(left_up_tile, right_down_tile)
  964.  
  965. // Clear up the area
  966.  
  967. for (var/turf/T in affected)
  968. new /area/space (T)
  969. var/dist = round(((T.x - center.x)**2 + (T.y - center.y)**2)**0.5)
  970. if (dist <= radius)
  971. for (var/atom/X in T)
  972. if (!istype(X, /mob/dead/observer))
  973. qdel(X)
  974. new /area/toxins/test_area(T)
  975. if (dist == radius)
  976. var/turf/W = new /turf/simulated/wall(T)
  977. W.CalculateAdjacentTurfs()
  978. SSair.add_to_active(W,1)
  979. if (dist < radius)
  980. var/turf/W = new /turf/simulated/floor(T)
  981. W.CalculateAdjacentTurfs()
  982. SSair.add_to_active(W,1)
  983.  
  984. usr << "\red \bold The test site has been created"
  985.  
  986. #undef RED
  987. #undef GREEN
Advertisement
Add Comment
Please, Sign In to add comment