From fa06a12b1e44b2362cd907b8bee76fb2b4bd5f83 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sun, 22 Jan 2012 19:41:13 -0700 Subject: [PATCH] Fixed some stupid stuff with the Spec Ops shuttle and the wrong energy guns given to mobs. --- baystation12.dme | 1 - code/game/response_team.dm | 2 +- code/game/specops_shuttle.dm | 95 +++++++++++++++++++++++++++++-- code/modules/admin/verbs/debug.dm | 4 ++ 4 files changed, 95 insertions(+), 7 deletions(-) diff --git a/baystation12.dme b/baystation12.dme index 088c1ce7b1b..b694860cd8d 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -443,7 +443,6 @@ #include "code\game\machinery\airlock_control.dm" #include "code\game\machinery\alarm.dm" #include "code\game\machinery\atmo_control.dm" -#include "code\game\machinery\autolathe.dm" #include "code\game\machinery\biogenerator.dm" #include "code\game\machinery\camera.dm" #include "code\game\machinery\cell_charger.dm" diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 56fa9855282..31316ec6d87 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -120,7 +120,7 @@ proc/trigger_armed_response_team() equip_if_possible(new /obj/item/clothing/under/color/black(src), slot_w_uniform) equip_if_possible(new /obj/item/device/flashlight(src), slot_l_store) equip_if_possible(new /obj/item/weapon/clipboard(src), slot_r_store) - equip_if_possible(new /obj/item/weapon/gun/energy/taser(src), slot_belt) + equip_if_possible(new /obj/item/weapon/gun/energy/gun(src), slot_belt) //Glasses equip_if_possible(new /obj/item/clothing/glasses/sunglasses/sechud(src), slot_glasses) diff --git a/code/game/specops_shuttle.dm b/code/game/specops_shuttle.dm index 29179a7e17a..906ea0b5455 100644 --- a/code/game/specops_shuttle.dm +++ b/code/game/specops_shuttle.dm @@ -2,6 +2,7 @@ #define SPECOPS_MOVETIME 600 //Time to station is milliseconds. 60 seconds, enough time for everyone to be on the shuttle before it leaves. #define SPECOPS_STATION_AREATYPE "/area/shuttle/specops/station" //Type of the spec ops shuttle area for station #define SPECOPS_DOCK_AREATYPE "/area/shuttle/specops/centcom" //Type of the spec ops shuttle area for dock +#define SPECOPS_RETURN_DELAY 6000 //Time between the shuttle is capable of moving. var/specops_shuttle_moving_to_station = 0 var/specops_shuttle_moving_to_centcom = 0 @@ -9,6 +10,7 @@ var/specops_shuttle_at_station = 0 var/specops_shuttle_can_send = 1 var/specops_shuttle_time = 0 var/specops_shuttle_timeleft = 0 +var/specops_shuttle_timereset = 0 /obj/machinery/computer/specops_shuttle name = "Spec. Ops. Shuttle Console" @@ -19,6 +21,67 @@ var/specops_shuttle_timeleft = 0 var/hacked = 0 var/allowedtocall = 0 +/proc/specops_return() + var/area/centcom/control/cent_com = locate()//To find announcer. This area should exist for this proc to work. + var/mob/living/silicon/decoy/announcer = locate() in cent_com//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 SPECIAL OPERATIONS SHUTTLE IS PREPARING FOR LAUNCH"//Initial message shown. + if(announcer) + announcer.say(message) + + while(specops_shuttle_time - world.timeofday > 0) + var/ticksleft = specops_shuttle_time - world.timeofday + + if(ticksleft > 1e5) + specops_shuttle_time = world.timeofday + 10 // midnight rollover + specops_shuttle_timeleft = (ticksleft / 10) + + //All this does is announce the time before launch. + if(announcer) + var/rounded_time_left = round(specops_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) + + specops_shuttle_moving_to_station = 0 + specops_shuttle_moving_to_centcom = 0 + + specops_shuttle_at_station = 1 + + var/area/start_location = locate(/area/shuttle/specops/station) + var/area/end_location = locate(/area/shuttle/specops/centcom) + + 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 at Central Command. Operation has ended!" + /proc/specops_process() var/area/centcom/control/cent_com = locate()//To find announcer. This area should exist for this proc to work. var/area/centcom/specops/special_ops = locate()//Where is the specops area located? @@ -156,8 +219,15 @@ var/specops_shuttle_timeleft = 0 M << "\red You have arrived to [station_name]. Commence operation!" /proc/specops_can_move() - if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return 0 - else return 1 + if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) + return 0 + else if(world.time <= specops_shuttle_timereset) + return 0 + return 1 + +/obj/machinery/computer/specops_shuttle/proc/make_move() + specops_shuttle_timereset = world.time + return /obj/machinery/computer/specops_shuttle/attack_ai(var/mob/user as mob) return attack_hand(user) @@ -190,7 +260,7 @@ var/specops_shuttle_timeleft = 0 else dat += {"
Special Operations Shuttle
\nLocation: [specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "Departing for [station_name] in ([specops_shuttle_timeleft] seconds.)":specops_shuttle_at_station ? "Station":"Dock"]
- [specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "\n*The Special Ops. shuttle is already leaving.*
\n
":specops_shuttle_at_station ? "\nShuttle Offline
\n
":"\nDepart to [station_name]
\n
"] + [specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "\n*The Special Ops. shuttle is already leaving.*
\n
":specops_shuttle_at_station ? "\nShuttle standing by...
\n
":"\nDepart to [station_name]
\n
"] \nClose"} user << browse(dat, "window=computer;size=575x450") @@ -207,8 +277,22 @@ var/specops_shuttle_timeleft = 0 if (href_list["sendtodock"]) if(!specops_shuttle_at_station|| specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return - usr << "\blue Central Command will not allow the Special Operations shuttle to return." - return + if (!specops_can_move()) + usr << "\blue Central Command will not allow the Special Operations shuttle to return yet." + if(world.time <= specops_shuttle_timereset) + usr << "\blue [(world.time - specops_shuttle_timereset)/10] seconds remain!" + return + + usr << "\blue The Special Operations shuttle will arrive at Central Command in [(SPECOPS_MOVETIME/10)] seconds." + + temp += "Shuttle departing.

OK" + updateUsrDialog() + + specops_shuttle_moving_to_centcom = 1 + specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME + specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY + spawn(0) + specops_return() else if (href_list["sendtostation"]) if(specops_shuttle_at_station || specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return @@ -228,6 +312,7 @@ var/specops_shuttle_timeleft = 0 specops_shuttle_moving_to_station = 1 specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME + specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY spawn(0) specops_process() diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 7f2942be4b0..99357250ce6 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -480,6 +480,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that "assassin", "death commando", "syndicate commando", + "response team", "centcom official", "centcom commander", "special ops officer", @@ -677,6 +678,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that if("syndicate commando") M.equip_syndicate_commando() + if("response team") + M.equip_strike_team() + if("centcom official") M.equip_if_possible(new /obj/item/clothing/under/rank/centcom_officer(M), M.slot_w_uniform) M.equip_if_possible(new /obj/item/clothing/shoes/black(M), M.slot_shoes)