From c1a9bfc35518ccb7fac083d2a46c41c02fc260af Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Thu, 12 Sep 2013 15:44:12 -0400 Subject: [PATCH] HONKsquad added --- baystation12.dme | 1 + code/modules/admin/admin.dm | 1 + code/modules/admin/topic.dm | 4 + code/modules/admin/verbs/honksquad.dm | 134 ++++++++++++++++++++++++++ 4 files changed, 140 insertions(+) create mode 100644 code/modules/admin/verbs/honksquad.dm diff --git a/baystation12.dme b/baystation12.dme index 0bd69dcf253..677c9f9e17f 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -666,6 +666,7 @@ #include "code\modules\admin\verbs\debug.dm" #include "code\modules\admin\verbs\diagnostics.dm" #include "code\modules\admin\verbs\getlogs.dm" +#include "code\modules\admin\verbs\honksquad.dm" #include "code\modules\admin\verbs\mapping.dm" #include "code\modules\admin\verbs\massmodvar.dm" #include "code\modules\admin\verbs\modifyvariables.dm" diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 7b14359588c..0e0603409ca 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -587,6 +587,7 @@ var/global/floorIsLava = 0 Trigger a Spider infestation
Send in a space ninja
Send in a strike team
+ Send in a HONKsquad
Trigger an Carp migration
Irradiate the station
Trigger a Prison Break
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 2bdb67bbfcb..dd2837165b4 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1721,6 +1721,10 @@ spawn(0) H.corgize() ok = 1 + if("honksquad") + if(usr.client.honksquad()) + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","HONK") if("striketeam") if(usr.client.strike_team()) feedback_inc("admin_secrets_fun_used",1) diff --git a/code/modules/admin/verbs/honksquad.dm b/code/modules/admin/verbs/honksquad.dm new file mode 100644 index 00000000000..5c499eedb75 --- /dev/null +++ b/code/modules/admin/verbs/honksquad.dm @@ -0,0 +1,134 @@ +//HONKsquad + +var/const/honksquad_possible = 6 //if more Commandos are needed in the future +var/global/sent_honksquad = 0 + +/client/proc/honksquad() + if(!ticker) + usr << "The game hasn't started yet!" + return + if(world.time < 6000) + usr << "There are [(6000-world.time)/10] seconds remaining before it may be called." + return + if(sent_honksquad == 1) + usr << "Clown Planet has already dispatched a HONKsquad." + return + if(alert("Do you want to send in the HONKsquad? Once enabled, this is irreversible.",,"Yes","No")!="Yes") + return + alert("This 'mode' will go on until proper levels of HONK have been restored. You may also admin-call the evac shuttle when appropriate. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.") + + var/input = null + while(!input) + input = copytext(sanitize(input(src, "Please specify which mission the HONKsquad shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN) + if(!input) + if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes") + return + + if(sent_honksquad) + usr << "Looks like someone beat you to it. HONK." + return + + sent_honksquad = 1 + + + var/honksquad_number = honksquad_possible //for selecting a leader + var/honk_leader_selected = 0 //when the leader is chosen. The last person spawned. + + +//Generates a list of HONKsquad from active ghosts. Then the user picks which characters to respawn as the commandos. + var/list/candidates = list() //candidates for being a commando out of all the active ghosts in world. + var/list/commandos = list() //actual commando ghosts as picked by the user. + for(var/mob/dead/observer/G in player_list) + if(!G.client.holder && !G.client.is_afk()) //Whoever called/has the proc won't be added to the list. + if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) + candidates += G.key + for(var/i=honksquad_possible,(i>0&&candidates.len),i--)//Decrease with every commando selected. + var/candidate = input("Pick characters to spawn as the HONKsquad. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players") as null|anything in candidates //It will auto-pick a person when there is only one candidate. + candidates -= candidate //Subtract from candidates. + commandos += candidate//Add their ghost to commandos. + +//Spawns HONKsquad and equips them. + for(var/obj/effect/landmark/L in landmarks_list) + if(honksquad_number<=0) break + if (L.name == "HONKsquad") + honk_leader_selected = honksquad_number == 1?1:0 + + var/mob/living/carbon/human/new_honksquad = create_honksquad(L, honk_leader_selected) + + if(commandos.len) + new_honksquad.key = pick(commandos) + commandos -= new_honksquad.key + new_honksquad.internal = new_honksquad.s_store + new_honksquad.internals.icon_state = "internal1" + + //So they don't forget their code or mission. + new_honksquad.mind.store_memory("Mission: \red [input].") + + new_honksquad << "\blue You are a HONKsquad. [!honk_leader_selected?"commando":"LEADER"] in the service of Clown Planet. You are called in cases of exteme low levels of HONK. You are NOT authorized to kill. \nYour current mission is: \red[input]" + + honksquad_number-- + + + message_admins("\blue [key_name_admin(usr)] has spawned a HONKsquad.", 1) + log_admin("[key_name(usr)] used Spawn HONKsquad.") + return 1 + +/client/proc/create_honksquad(obj/spawn_location, honk_leader_selected = 0) + var/mob/living/carbon/human/new_honksquad = new(spawn_location.loc) + var/honksquad_leader_rank = pick("Lieutenant", "Captain", "Major") + var/honksquad_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major") + var/honksquad_name = pick(clown_names) + + new_honksquad.gender = pick(MALE, FEMALE) + + var/datum/preferences/A = new()//Randomize appearance for the commando. + A.randomize_appearance_for(new_honksquad) + + new_honksquad.real_name = "[!honk_leader_selected ? honksquad_rank : honksquad_leader_rank] [honksquad_name]" + new_honksquad.age = !honk_leader_selected ? rand(23,35) : rand(35,45) + + new_honksquad.dna.ready_dna(new_honksquad)//Creates DNA. + + //Creates mind stuff. + new_honksquad.mind_initialize() + new_honksquad.mind.assigned_role = "MODE" + new_honksquad.mind.special_role = "HONKsquad" + ticker.mode.traitors |= new_honksquad.mind//Adds them to current traitor list. Which is really the extra antagonist list. + new_honksquad.equip_honksquad(honk_leader_selected) + return new_honksquad + +/mob/living/carbon/human/proc/equip_honksquad(honk_leader_selected = 0) + + var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src) + R.set_frequency(1442) + equip_to_slot_or_del(R, slot_ears) + equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/clown(src), slot_back) + equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(src), slot_in_backpack) + if(src.gender == FEMALE) + equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sexyclown(src), slot_wear_mask) + equip_to_slot_or_del(new /obj/item/clothing/under/sexyclown(src), slot_w_uniform) + else + equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(src), slot_w_uniform) + equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(src), slot_wear_mask) + equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(src), slot_shoes) + equip_to_slot_or_del(new /obj/item/device/pda/clown(src), slot_belt) + equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(src), slot_wear_mask) + equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(src), slot_in_backpack) + equip_to_slot_or_del(new /obj/item/weapon/bikehorn(src), slot_in_backpack) + equip_to_slot_or_del(new /obj/item/weapon/stamp/clown(src), slot_in_backpack) + equip_to_slot_or_del(new /obj/item/toy/crayon/rainbow(src), slot_in_backpack) + equip_to_slot_or_del(new /obj/item/weapon/storage/fancy/crayons(src), slot_in_backpack) + equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/spray/waterflower(src), slot_in_backpack) + src.mutations.Add(CLUMSY) + + + + var/obj/item/weapon/card/id/W = new(src) + W.name = "[real_name]'s ID Card" + W.icon_state = "centcom_old" + W.access = list(access_clown)//They get full station access. + W.assignment = "HONKsquad" + W.registered_name = real_name + equip_to_slot_or_del(W, slot_wear_id) + + return 1 \ No newline at end of file