mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Code-wide changes: /mob -level procs: equip_if_possible() is now known as equip_to_slot_or_del() to prevent confusion with equip_to_slot_if_possible() and to better describe what it does. equip_to_slot_if_possible(item, slot, del_on_fail, disable_warning, redraw_mob) equip_to_appropriate_slot() is now a /mob - level proc. equip_to_slot() is an unsafe proc, which just handles the final step of actually getting an item onto the mob. It has no checks of whether it can or can't do that. Use equip_to_slot_if_possible() for that purpose. New /obj/item -level proc: /obj/item/proc/mob_can_equip(M as mob, slot, disable_warning = 0) This proc can be used to determine whehter a mob can pick up an item from the item's side. Carn, I'll need you to review code/modules/mob/living/carbon/human/inventory.dm to ensure that I'm not redrawing the mob too many times. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4423 316c924e-a436-60f5-8080-3fe189b3f50e
56 lines
2.1 KiB
Plaintext
56 lines
2.1 KiB
Plaintext
/client/proc/only_one()
|
|
set category = "Fun"
|
|
set name = "THERE CAN BE ONLY ONE"
|
|
set desc = "Makes everyone into a traitor and has them fight for the nuke auth. disk."
|
|
if(!ticker)
|
|
alert("The game hasn't started yet!")
|
|
return
|
|
if(alert("BEGIN THE TOURNAMENT?",,"Yes","No")=="No")
|
|
return
|
|
|
|
feedback_add_details("admin_verb","TCBOO") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
for(var/mob/living/carbon/human/H in player_list)
|
|
if(H.stat == 2 || !(H.client)) continue
|
|
if(is_special_character(H)) continue
|
|
|
|
ticker.mode.traitors += H.mind
|
|
H.mind.special_role = "traitor"
|
|
|
|
var/datum/objective/steal/steal_objective = new
|
|
steal_objective.owner = H.mind
|
|
steal_objective.set_target("nuclear authentication disk")
|
|
H.mind.objectives += steal_objective
|
|
|
|
var/datum/objective/hijack/hijack_objective = new
|
|
hijack_objective.owner = H.mind
|
|
H.mind.objectives += hijack_objective
|
|
|
|
H << "<B>You are the traitor.</B>"
|
|
var/obj_count = 1
|
|
for(var/datum/objective/OBJ in H.mind.objectives)
|
|
H << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
|
|
obj_count++
|
|
|
|
for (var/obj/item/I in H)
|
|
if (istype(I, /obj/item/weapon/implant))
|
|
continue
|
|
del(I)
|
|
|
|
H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt(H), slot_w_uniform)
|
|
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_ears)
|
|
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head)
|
|
H.equip_to_slot_or_del(new /obj/item/weapon/claymore(H), slot_l_hand)
|
|
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), slot_shoes)
|
|
H.equip_to_slot_or_del(new /obj/item/weapon/pinpointer(H.loc), slot_l_store)
|
|
|
|
var/obj/item/weapon/card/id/W = new(H)
|
|
W.name = "[H.real_name]'s ID Card"
|
|
W.icon_state = "centcom"
|
|
W.access = get_all_accesses()
|
|
W.access += get_all_centcom_access()
|
|
W.assignment = "Highlander"
|
|
W.registered_name = H.real_name
|
|
H.equip_to_slot_or_del(W, slot_wear_id)
|
|
|
|
message_admins("\blue [key_name_admin(usr)] used THERE CAN BE ONLY ONE!", 1)
|
|
log_admin("[key_name(usr)] used there can be only one.") |