diff --git a/code/game/syndicate_specops_shuttle.dm b/code/game/syndicate_specops_shuttle.dm new file mode 100644 index 00000000000..a5016ea5ef0 --- /dev/null +++ b/code/game/syndicate_specops_shuttle.dm @@ -0,0 +1,256 @@ +//Config stuff +#define SYNDICATE_ELITE_MOVETIME 600 //Time to station is milliseconds. 60 seconds, enough time for everyone to be on the shuttle before it leaves. +#define SYNDICATE_ELITE_STATION_AREATYPE "/area/shuttle/syndicate_elite/station" //Type of the spec ops shuttle area for station +#define SYNDICATE_ELITE_DOCK_AREATYPE "/area/shuttle/syndicate_elite/mothership" //Type of the spec ops shuttle area for dock + +var/syndicate_elite_shuttle_moving_to_station = 0 +var/syndicate_elite_shuttle_moving_to_mothership = 0 +var/syndicate_elite_shuttle_at_station = 0 +var/syndicate_elite_shuttle_can_send = 1 +var/syndicate_elite_shuttle_time = 0 +var/syndicate_elite_shuttle_timeleft = 0 + +/obj/machinery/computer/syndicate_elite_shuttle + name = "Elite Syndicate Squad Shuttle Console" + icon = 'computer.dmi' + icon_state = "syndishuttle" + req_access = list(access_cent_specops) + var/temp = null + var/hacked = 0 + var/allowedtocall = 0 + +/proc/syndicate_elite_process() + var/area/syndicate_mothership/control/syndicate_ship = locate()//To find announcer. This area should exist for this proc to work. + var/area/syndicate_mothership/elite_squad/elite_squad = locate()//Where is the specops area located? + var/mob/living/silicon/decoy/announcer = locate() in syndicate_ship//We need a fake AI to announce some stuff below. Otherwise it will be wonky. + + var/message_tracker[] = list(0,1,2,3,5,10,30,45)//Create a a list with potential time values. + var/message = "THE SYNDICATE ELITE SHUTTLE IS PREPARING FOR LAUNCH"//Initial message shown. + if(announcer) + announcer.say(message) + // message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD" + announcer.say(message) + + while(syndicate_elite_shuttle_time - world.timeofday > 0) + var/ticksleft = syndicate_elite_shuttle_time - world.timeofday + + if(ticksleft > 1e5) + syndicate_elite_shuttle_time = world.timeofday // midnight rollover + syndicate_elite_shuttle_timeleft = (ticksleft / 10) + + //All this does is announce the time before launch. + if(announcer) + var/rounded_time_left = round(syndicate_elite_shuttle_timeleft)//Round time so that it will report only once, not in fractions. + if(rounded_time_left in message_tracker)//If that time is in the list for message announce. + message = "ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN" + if(rounded_time_left==0) + message = "ALERT: TAKEOFF" + announcer.say(message) + message_tracker -= rounded_time_left//Remove the number from the list so it won't be called again next cycle. + //Should call all the numbers but lag could mean some issues. Oh well. Not much I can do about that. + + sleep(5) + + syndicate_elite_shuttle_moving_to_station = 0 + syndicate_elite_shuttle_moving_to_mothership = 0 + + syndicate_elite_shuttle_at_station = 1 + if (syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return + + if (!syndicate_elite_can_move()) + usr << "\red The Syndicate Elite shuttle is unable to leave." + return + + sleep(600) +/* + //Begin Marauder launchpad. + spawn(0)//So it parallel processes it. + for(var/obj/machinery/door/poddoor/M in elite_squad) + switch(M.id) + if("ASSAULT0") + spawn(10)//1 second delay between each. + M.open() + if("ASSAULT1") + spawn(20) + M.open() + if("ASSAULT2") + spawn(30) + M.open() + if("ASSAULT3") + spawn(40) + M.open() + + sleep(10) + + var/spawn_marauder[] = new() + for(var/obj/landmark/L in world) + if(L.name == "Marauder Entry") + spawn_marauder.Add(L) + for(var/obj/landmark/L in world) + if(L.name == "Marauder Exit") + var/obj/portal/P = new(L.loc) + P.invisibility = 101//So it is not seen by anyone. + P.failchance = 0//So it has no fail chance when teleporting. + P.target = pick(spawn_marauder)//Where the marauder will arrive. + spawn_marauder.Remove(P.target) + + sleep(10) + + for(var/obj/machinery/mass_driver/M in elite_squad) + switch(M.id) + if("ASSAULT0") + spawn(10) + M.drive() + if("ASSAULT1") + spawn(20) + M.drive() + if("ASSAULT2") + spawn(30) + M.drive() + if("ASSAULT3") + spawn(40) + M.drive() + + sleep(50)//Doors remain open for 5 seconds. + + for(var/obj/machinery/door/poddoor/M in elite_squad) + switch(M.id)//Doors close at the same time. + if("ASSAULT0") + spawn(0) + M.close() + if("ASSAULT1") + spawn(0) + M.close() + if("ASSAULT2") + spawn(0) + M.close() + if("ASSAULT3") + spawn(0) + M.close() + */ + elite_squad.readyreset()//Reset firealarm after the team launched. + //End Marauder launchpad. +/* + var/obj/explosionmarker = locate("Syndicate Breach Area") + if(explosionmarker) + var/turf/simulated/T = explosionmarker.loc + if(T) + explosion(T,4,6,8,10,0) + + sleep(40) +// proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1) + +*/ + var/area/start_location = locate(/area/shuttle/syndicate_elite/mothership) + var/area/end_location = locate(/area/shuttle/syndicate_elite/station) + + var/list/dstturfs = list() + var/throwy = world.maxy + + for(var/turf/T in end_location) + dstturfs = T + if(T.y < throwy) + throwy = T.y + + // hey you, get out of the way! + for(var/turf/T in dstturfs) + // find the turf to move things to + var/turf/D = locate(T.x, throwy - 1, 1) + //var/turf/E = get_step(D, SOUTH) + for(var/atom/movable/AM as mob|obj in T) + AM.Move(D) + if(istype(T, /turf/simulated)) + del(T) + + start_location.move_contents_to(end_location) + + for(var/turf/T in get_area_turfs(end_location) ) + var/mob/M = locate(/mob) in T + M << "\red You have arrived to [station_name]. Commence operation!" + +/proc/syndicate_elite_can_move() + if(syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return 0 + else return 1 + +/obj/machinery/computer/syndicate_elite_shuttle/attackby(I as obj, user as mob) + return attack_hand(user) + +/obj/machinery/computer/syndicate_elite_shuttle/attack_ai(var/mob/user as mob) + return attack_hand(user) + +/obj/machinery/computer/syndicate_elite_shuttle/attack_paw(var/mob/user as mob) + return attack_hand(user) + +/obj/machinery/computer/syndicate_elite_shuttle/attackby(I as obj, user as mob) + if(istype(I,/obj/item/weapon/card/emag)) + user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals." + else + return attack_hand(user) + +/obj/machinery/computer/syndicate_elite_shuttle/attack_hand(var/mob/user as mob) + if(!allowed(user)) + user << "\red Access Denied." + return + + if (sent_syndicate_strike_team == 0) + usr << "\red The strike team has not yet deployed." + return + + if(..()) + return + + user.machine = src + var/dat + if (temp) + dat = temp + else + dat = {"
Special Operations Shuttle
+ \nLocation: [syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership ? "Departing for [station_name] in ([syndicate_elite_shuttle_timeleft] seconds.)":syndicate_elite_shuttle_at_station ? "Station":"Dock"]
+ [syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership ? "\n*The Syndicate Elite shuttle is already leaving.*
\n
":syndicate_elite_shuttle_at_station ? "\nShuttle Offline
\n
":"\nDepart to [station_name]
\n
"] + \nClose"} + + user << browse(dat, "window=computer;size=575x450") + onclose(user, "computer") + return + +/obj/machinery/computer/syndicate_elite_shuttle/Topic(href, href_list) + if(..()) + return + + if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon))) + usr.machine = src + + if (href_list["sendtodock"]) + if(!syndicate_elite_shuttle_at_station|| syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return + + usr << "\blue The Syndicate will not allow the Elite Squad shuttle to return." + return + + else if (href_list["sendtostation"]) + if(syndicate_elite_shuttle_at_station || syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return + + if (!specops_can_move()) + usr << "\red The Syndicate Elite shuttle is unable to leave." + return + + usr << "\blue The Syndicate Elite shuttle will arrive on [station_name] in [(SYNDICATE_ELITE_MOVETIME/10)] seconds." + + temp = "Shuttle departing.

OK" + updateUsrDialog() + + var/area/syndicate_mothership/elite_squad/elite_squad = locate() + if(elite_squad) + elite_squad.readyalert()//Trigger alarm for the spec ops area. + syndicate_elite_shuttle_moving_to_station = 1 + + syndicate_elite_shuttle_time = world.timeofday + spawn(0) + syndicate_elite_process() + + + else if (href_list["mainmenu"]) + temp = null + + add_fingerprint(usr) + updateUsrDialog() + return \ No newline at end of file diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm new file mode 100644 index 00000000000..a2d8fdbfb78 --- /dev/null +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -0,0 +1,193 @@ +//STRIKE TEAMS + +var/const/syndicate_commandos_possible = 6 //if more Commandos are needed in the future +var/global/sent_syndicate_strike_team = 0 +/client/proc/syndicate_strike_team() + set category = "Fun" + set name = "Spawn Syndicate Strike Team" + set desc = "Spawns a squad of commandos in the Syndicate Mothership if you want to run an admin event." + if(!src.authenticated || !src.holder) + src << "Only administrators may use this command." + return + if(!ticker) + alert("The game hasn't started yet!") + return +// if(world.time < 6000) +// alert("Not so fast, buddy. Wait a few minutes until the game gets going. There are [(6000-world.time)/10] seconds remaining.") +// return + if(sent_syndicate_strike_team == 1) + alert("The Syndicate are already sending a team, Mr. Dumbass.") + return + if(alert("Do you want to send in the Syndicate Strike Team? Once enabled, this is irreversible.",,"Yes","No")=="No") + return + alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned syndicates have internals cameras which are viewable through a monitor inside the Syndicate Mothership Bridge. 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 = input(src, "Please specify which mission the syndicate strike team shall undertake.", "Specify Mission", "") + if(!input) + if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes") + return + + if(sent_syndicate_strike_team) + src << "Looks like someone beat you to it." + return + + sent_syndicate_strike_team = 1 + + if (emergency_shuttle.direction == 1 && emergency_shuttle.online == 1) + emergency_shuttle.recall() + world << "\blue Alert: The shuttle is going back!" + + var/syndicate_commando_number = syndicate_commandos_possible //for selecting a leader + var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned. + +//Code for spawning a nuke auth code. + var/nuke_code + var/temp_code + for(var/obj/machinery/nuclearbomb/N in world) + temp_code = text2num(N.r_code) + if(temp_code)//if it's actually a number. It won't convert any non-numericals. + nuke_code = N.r_code + break + +//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. + var/mob/dead/observer/G//Basic variable to search for later. + var/candidates_list[] = list()//candidates for being a commando out of all the active ghosts in world. + var/syndicate_commandos_list[] = list()//actual commando ghosts as picked by the user. + for(G in world) + if(G.client) + if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5) //Whoever called/has the proc won't be added to the list. +// if(((G.client.inactivity/10)/60) <= 5) //Removing it allows even the caller to jump in. Good for testing. + candidates_list += G.client//Add their client to list. + for(var/i=syndicate_commandos_possible,(i>0&&candidates_list.len),i--)//Decrease with every commando selected. + var/client/G_client = input("Pick characters to spawn as the commandos. 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_list//It will auto-pick a person when there is only one candidate. + if(G_client)//They may have logged out when the admin was choosing people. Or were not chosen. Would run time error otherwise. + candidates_list -= G_client//Subtract from candidates. + syndicate_commandos_list += G_client.mob//Add their ghost to commandos. + +//Spawns commandos and equips them. + for (var/obj/landmark/L in world) + if(syndicate_commando_number<=0) break + if (L.name == "Syndicate-Commando") + syndicate_leader_selected = syndicate_commando_number == 1?1:0 + + var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected) + + if(syndicate_commandos_list.len) + G = pick(syndicate_commandos_list) + new_syndicate_commando.mind.key = G.key//For mind stuff. + new_syndicate_commando.key = G.key + new_syndicate_commando.internal = new_syndicate_commando.s_store + new_syndicate_commando.internals.icon_state = "internal1" + syndicate_commandos_list -= G + del(G) + + //So they don't forget their code or mission. + if(nuke_code) + new_syndicate_commando.mind.store_memory("Nuke Code: \red [nuke_code].") + new_syndicate_commando.mind.store_memory("Mission: \red [input].") + + new_syndicate_commando << "\blue You are an Elite Syndicate. [!syndicate_leader_selected?"commando":"LEADER"] in the service of the Syndicate. \nYour current mission is: \red[input]" + + syndicate_commando_number-- + +//Spawns the rest of the commando gear. +// for (var/obj/landmark/L) + // if (L.name == "Commando_Manual") + //new /obj/item/weapon/gun/energy/pulse_rifle(L.loc) + // var/obj/item/weapon/paper/P = new(L.loc) + // P.info = "

Good morning soldier!. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:
#1 Work as a team.
#2 Accomplish your objective at all costs.
#3 Leave no witnesses.
You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.
If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.

In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations LEADER is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.

Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.
First and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE. Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.
To make the device functional:
#1 Place bomb in designated detonation zone
#2 Extend and anchor bomb (attack with hand).
#3 Insert Nuclear Auth. Disk into slot.
#4 Type numeric code into keypad ([nuke_code]).
Note: If you make a mistake press R to reset the device.
#5 Press the E button to log onto the device.
You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.
Note: Toggle off the SAFETY.
Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.
Note: THE BOMB IS STILL SET AND WILL DETONATE
Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.

The nuclear authorization code is: [nuke_code ? nuke_code : "None provided"]

Good luck, soldier!

" + // P.name = "Spec. Ops. Manual" + + for (var/obj/landmark/L in world) + if (L.name == "Syndicate-Commando-Bomb") + new /obj/spawner/newbomb/timer/syndicate(L.loc) + del(L) + + message_admins("\blue [key_name_admin(usr)] has spawned a Syndicate strike squad.", 1) + log_admin("[key_name(usr)] used Spawn Syndicate Squad.") + +/client/proc/create_syndicate_death_commando(obj/spawn_location, syndicate_leader_selected = 0) + var/mob/living/carbon/human/new_syndicate_commando = new(spawn_location.loc) + var/syndicate_commando_leader_rank = pick("Lieutenant", "Captain", "Major") + var/syndicate_commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major") + var/syndicate_commando_name = pick(last_names) + + new_syndicate_commando.gender = pick(MALE, FEMALE) + + var/datum/preferences/A = new()//Randomize appearance for the commando. + A.randomize_appearance_for(new_syndicate_commando) + + new_syndicate_commando.real_name = "[!syndicate_leader_selected ? syndicate_commando_rank : syndicate_commando_leader_rank] [syndicate_commando_name]" + new_syndicate_commando.age = !syndicate_leader_selected ? rand(23,35) : rand(35,45) + + new_syndicate_commando.dna.ready_dna(new_syndicate_commando)//Creates DNA. + + //Creates mind stuff. + new_syndicate_commando.mind = new + new_syndicate_commando.mind.current = new_syndicate_commando + new_syndicate_commando.mind.original = new_syndicate_commando + new_syndicate_commando.mind.assigned_role = "MODE" + new_syndicate_commando.mind.special_role = "Syndicate Commando" + if(!(new_syndicate_commando.mind in ticker.minds)) + ticker.minds += new_syndicate_commando.mind//Adds them to regular mind list. + if(!(new_syndicate_commando.mind in ticker.mode.traitors))//If they weren't already an extra traitor. + ticker.mode.traitors += new_syndicate_commando.mind//Adds them to current traitor list. Which is really the extra antagonist list. + new_syndicate_commando.equip_syndicate_commando(syndicate_leader_selected) + del(spawn_location) + return new_syndicate_commando + +/mob/living/carbon/human/proc/equip_syndicate_commando(syndicate_leader_selected = 0) + var/obj/machinery/camera/camera = new /obj/machinery/camera(src) //Gives all the commandos internals cameras. + camera.network = "Syndicate" + camera.c_tag = real_name + + var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src) + R.set_frequency(1337) //Same frequency as the syndicate team in Nuke mode. + equip_if_possible(R, slot_ears) + equip_if_possible(new /obj/item/clothing/under/syndicate(src), slot_w_uniform) + equip_if_possible(new /obj/item/clothing/shoes/swat(src), slot_shoes) + if (!syndicate_leader_selected) + equip_if_possible(new /obj/item/clothing/suit/space/syndicate/elite(src), slot_wear_suit) + else + equip_if_possible(new /obj/item/clothing/suit/space/syndicate/elite/leader(src), slot_wear_suit) + equip_if_possible(new /obj/item/clothing/gloves/swat(src), slot_gloves) + if (!syndicate_leader_selected) + equip_if_possible(new /obj/item/clothing/head/helmet/space/syndicate/elite(src), slot_head) + else + equip_if_possible(new /obj/item/clothing/head/helmet/space/syndicate/elite/leader(src), slot_head) + equip_if_possible(new /obj/item/clothing/mask/gas/syndicate(src), slot_wear_mask) + equip_if_possible(new /obj/item/clothing/glasses/thermal(src), slot_glasses) + + equip_if_possible(new /obj/item/weapon/storage/backpack/security(src), slot_back) + equip_if_possible(new /obj/item/weapon/storage/survival_kit(src), slot_in_backpack) + + equip_if_possible(new /obj/item/ammo_magazine/c45(src), slot_in_backpack) + equip_if_possible(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack) + equip_if_possible(new /obj/item/weapon/plastique(src), slot_in_backpack) + equip_if_possible(new /obj/item/device/flashlight(src), slot_in_backpack) + if (!syndicate_leader_selected) + equip_if_possible(new /obj/item/weapon/plastique(src), slot_in_backpack) + else + equip_if_possible(new /obj/item/weapon/pinpointer(src), slot_in_backpack) + equip_if_possible(new /obj/item/weapon/disk/nuclear(src), slot_in_backpack) + + equip_if_possible(new /obj/item/weapon/melee/energy/sword(src), slot_l_store) + equip_if_possible(new /obj/item/weapon/empgrenade(src), slot_r_store) + equip_if_possible(new /obj/item/weapon/tank/emergency_oxygen(src), slot_s_store) + equip_if_possible(new /obj/item/weapon/gun/projectile/silenced(src), slot_belt) + + equip_if_possible(new /obj/item/weapon/gun/energy/pulse_rifle(src), slot_r_hand) //Will change to something different at a later time -- Superxpdude + + var/obj/item/weapon/card/id/syndicate/W = new(src) //Untrackable by AI + W.name = "[real_name]'s ID Card" + W.icon_state = "id" + W.access = get_all_accesses()//They get full station access because obviously the syndicate has HAAAX, and can make special IDs for their most elite members. + W.access += list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage, access_syndicate)//Let's add their forged CentCom access and syndicate access. + W.assignment = "Syndicate Commando" + W.registered = real_name + equip_if_possible(W, slot_wear_id) + + resistances += "alien_embryo" + return 1 \ No newline at end of file