From 201046c3bfd3cccebc2c715d2291dd804d797d8f Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sun, 22 Jan 2012 15:31:13 -0700 Subject: [PATCH 1/8] Improved capabilities to set someone else's internals. Improved the operating table again. Grabbed another TG update for telecomms. --- baystation12.dme | 1 - code/defines/obj.dm | 1 + code/game/machinery/OpTable.dm | 224 +++++++----------- .../telecomms/machine_interactions.dm | 27 ++- code/modules/mob/living/carbon/human/human.dm | 16 +- 5 files changed, 119 insertions(+), 150 deletions(-) diff --git a/baystation12.dme b/baystation12.dme index c7b1de5ca8..088c1ce7b1 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -578,7 +578,6 @@ #include "code\game\objects\kitchen.dm" #include "code\game\objects\lamarr.dm" #include "code\game\objects\mineral_doors.dm" -#include "code\game\objects\new_year.dm" #include "code\game\objects\noticeboard.dm" #include "code\game\objects\object_procs.dm" #include "code\game\objects\portals.dm" diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 2aa379fd69..66b16cbf4b 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -115,6 +115,7 @@ var/t_loc = null var/obj/item/item = null var/place = null + var/internalloc = null /obj/effect/equip_e/human name = "human" diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index d95784d41d..4aebb8e1e6 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -14,135 +14,72 @@ var/obj/machinery/computer/operating/computer = null var/id = 0.0 -/obj/machinery/optable/New() - ..() - for(var/obj/machinery/computer/operating/O in world) - if(src.id == O.id) - src.computer = O - spawn(100) - process() + New() + ..() + if(id) + for(var/obj/machinery/computer/operating/O in world) + if(src.id == O.id) + src.computer = O -/obj/machinery/optable/ex_act(severity) - - switch(severity) - if(1.0) - //SN src = null - del(src) - return - if(2.0) - if (prob(50)) + ex_act(severity) + switch(severity) + if(1.0) //SN src = null del(src) return - if(3.0) - if (prob(25)) - src.density = 0 - else - return - -/obj/machinery/optable/blob_act() - if(prob(75)) - del(src) - -/obj/machinery/optable/hand_p(mob/user as mob) - - return src.attack_paw(user) - return - -/obj/machinery/optable/attack_paw(mob/user as mob) - if ((usr.mutations & HULK)) - usr << text("\blue You destroy the operating table.") - for(var/mob/O in oviewers()) - if ((O.client && !( O.blinded ))) - O << text("\red [usr] destroys the operating table.") - src.density = 0 - del(src) - if (!( locate(/obj/machinery/optable, user.loc) )) - step(user, get_dir(user, src)) - if (user.loc == src.loc) - user.layer = TURF_LAYER - for(var/mob/M in viewers(user, null)) - M.show_message("The monkey hides under the table!", 1) - //Foreach goto(69) - return - -/obj/machinery/optable/attack_hand(mob/user as mob) - if ((usr.mutations & HULK)) - usr << text("\blue You destroy the table.") - for(var/mob/O in oviewers()) - if ((O.client && !( O.blinded ))) - O << text("\red [usr] destroys the table.") - src.density = 0 - del(src) - return - -/obj/machinery/optable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(air_group || (height==0)) return 1 - - if(istype(mover) && mover.checkpass(PASSTABLE)) - return 1 - else - return 0 - - -/obj/machinery/optable/MouseDrop_T(obj/O as obj, mob/user as mob) - - if ((!( istype(O, /obj/item/weapon) ) || user.equipped() != O)) + if(2.0) + if (prob(50)) + //SN src = null + del(src) + return + if(3.0) + if (prob(25)) + src.density = 0 + else return - user.drop_item() - if (O.loc != src.loc) - step(O, get_dir(O, src)) - return -/obj/machinery/optable/proc/check_victim() - if(locate(/mob/living/carbon, src.loc)) - var/mob/M = locate(/mob/living/carbon, src.loc) - if(M.resting) - src.victim = M - icon_state = "table2-active" + blob_act() + if(prob(75)) + del(src) + + hand_p(mob/user as mob) + return src.attack_paw(user) + return + + attack_paw(mob/user as mob) + if ((usr.mutations & HULK)) + usr << text("\blue You destroy the operating table.") + for(var/mob/O in oviewers()) + if ((O.client && !( O.blinded ))) + O << text("\red [usr] destroys the operating table.") + src.density = 0 + del(src) + if (!( locate(/obj/machinery/optable, user.loc) )) + step(user, get_dir(user, src)) + if (user.loc == src.loc) + user.layer = TURF_LAYER + for(var/mob/M in viewers(user, null)) + M.show_message("The monkey hides under the table!", 1) + //Foreach goto(69) + return + + attack_hand(mob/user as mob) + if ((usr.mutations & HULK)) + usr << text("\blue You destroy the table.") + for(var/mob/O in oviewers()) + if ((O.client && !( O.blinded ))) + O << text("\red [usr] destroys the table.") + src.density = 0 + del(src) + return + + CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + if(air_group || (height==0)) return 1 + + if(istype(mover) && mover.checkpass(PASSTABLE)) return 1 - src.victim = null - icon_state = "table2-idle" - return 0 - -/obj/machinery/optable/process() - check_victim() - -/obj/machinery/optable/attackby(obj/item/weapon/W as obj, mob/user as mob) - - if (istype(W, /obj/item/weapon/grab)) - if(ismob(W:affecting)) - var/mob/M = W:affecting - if (M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - M.resting = 1 - M.loc = src.loc - for (var/mob/C in viewers(src)) - C.show_message("\red [M] has been laid on the operating table by [user].", 3) - for(var/obj/O in src) - O.loc = src.loc - src.add_fingerprint(user) - icon_state = "table2-active" - src.victim = M - del(W) - return - user.drop_item() - if(W && W.loc) - W.loc = src.loc - return - -/obj/machinery/optable/portable - name = "mobile operating Table" - desc = "Used for advanced medical procedures. Seems to be movable, neat." - icon = 'rollerbed.dmi' - icon_state = "up" - density = 1 - anchored = 0 - - New() - ..() - processing_objects.Remove(src) + else + return 0 MouseDrop_T(obj/O as obj, mob/user as mob) if ((!( istype(O, /obj/item/weapon) ) || user.equipped() != O)) @@ -152,9 +89,22 @@ step(O, get_dir(O, src)) return + proc/check_victim() + if(locate(/mob/living/carbon, src.loc)) + var/mob/M = locate(/mob/living/carbon, src.loc) + if(M.resting) + src.victim = M + icon_state = "table2-active" + return 1 + src.victim = null + icon_state = "table2-idle" + processing_objects.Remove(src) + return 0 + + process() + check_victim() + attackby(obj/item/weapon/W as obj, mob/user as mob) - if(!anchored) - return if (istype(W, /obj/item/weapon/grab)) if(ismob(W:affecting)) var/mob/M = W:affecting @@ -168,6 +118,7 @@ for(var/obj/O in src) O.loc = src.loc src.add_fingerprint(user) + icon_state = "table2-active" src.victim = M processing_objects.Add(src) del(W) @@ -177,15 +128,22 @@ W.loc = src.loc return - check_victim() - if(locate(/mob/living/carbon/human, src.loc)) - var/mob/M = locate(/mob/living/carbon/human, src.loc) - if(M.resting) - src.victim = M - return 1 - src.victim = null - processing_objects.Remove(src) - return 0 +/obj/machinery/optable/portable + name = "mobile operating Table" + desc = "Used for advanced medical procedures. Seems to be movable, neat." + icon = 'rollerbed.dmi' + icon_state = "up" + density = 1 + anchored = 0 + id = null + + New() + ..() + + attackby(obj/item/weapon/W as obj, mob/user as mob) + if(!anchored) + return + return ..() verb/make_deployable() set category = "Object" diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 8c1108ef89..2fc5a6c975 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -77,6 +77,9 @@ newpath = text2path(I) var/obj/item/s = new newpath s.loc = user.loc + if(istype(P, /obj/item/weapon/cable_coil)) + var/obj/item/weapon/cable_coil/A = P + A.amount = 1 // Drop a circuit board too C.loc = user.loc @@ -113,13 +116,16 @@ dat += "
Network: [network]" dat += "
Prefabrication: [autolinkers.len ? "TRUE" : "FALSE"]" dat += "
Linked Network Entities:
    " + + var/i = 0 for(var/obj/machinery/telecomms/T in links) - dat += "
  1. \ref[T] [T.name] ([T.id]) (X)
  2. " + i++ + dat += "
  3. \ref[T] [T.name] ([T.id]) \[X\]
  4. " dat += "
" dat += "
Filtering Frequencies: " - var/i = 0 + i = 0 if(length(freq_listening)) for(var/x in freq_listening) i++ @@ -197,6 +203,16 @@ temp = "-% Removed frequency filter [x] %-" freq_listening.Remove(x) + if(href_list["unlink"]) + + var/obj/machinery/telecomms/T = links[text2num(href_list["unlink"])] + temp = "-% Removed \ref[T] [T.name] from linked entities. %-" + + // Remove link entries from both T and src. + if(src in T.links) + T.links.Remove(src) + links.Remove(T) + if(href_list["link"]) if(P.buffer) @@ -222,13 +238,6 @@ temp = "-% Buffer successfully flushed. %-" P.buffer = null - if(href_list["remove"]) - - temp = "-% Link successfully removed. %-" - for(var/obj/machinery/telecomms/T in links) - if(T.id == href_list["remove"]) - src.links.Remove(T) - break usr.machine = src src.add_fingerprint(usr) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 60500eef49..33d4eb0dce 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -2118,11 +2118,11 @@ It can still be worn/put on as normal. if (!( istype(target.wear_mask, /obj/item/clothing/mask) )) return else - if (istype(target.back, /obj/item/weapon/tank)) + if (istype(target.back, /obj/item/weapon/tank) && internalloc == "back") target.internal = target.back - else if (istype(target.s_store, /obj/item/weapon/tank)) + else if (istype(target.s_store, /obj/item/weapon/tank) && internalloc == "store") target.internal = target.s_store - else if (istype(target.belt, /obj/item/weapon/tank)) + else if (istype(target.belt, /obj/item/weapon/tank) && internalloc == "belt") target.internal = target.belt if (target.internal) for(var/mob/M in viewers(target, 1)) @@ -2160,14 +2160,14 @@ It can still be worn/put on as normal.
Right Ear: [(r_ear ? r_ear : "Nothing")]
Head: [(head ? head : "Nothing")]
Shoes: [(shoes ? shoes : "Nothing")] -
Belt: [(belt ? belt : "Nothing")] +
Belt: [(belt ? belt : "Nothing")] [(istype(wear_mask, /obj/item/clothing/mask) && istype(belt, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : ""]
Uniform: [(w_uniform ? w_uniform : "Nothing")]
(Exo)Suit: [(wear_suit ? wear_suit : "Nothing")] -
Back: [(back ? back : "Nothing")] +
Back: [(back ? back : "Nothing")][(istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : ""]
ID: [(wear_id ? wear_id : "Nothing")] -
Suit Storage: [(s_store ? s_store : "Nothing")] +
Suit Storage: [(s_store ? s_store : "Nothing")] [(istype(wear_mask, /obj/item/clothing/mask) && istype(s_store, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : ""]
[(handcuffed ? text("Handcuffed") : text("Not Handcuffed"))] -
[(internal ? text("Remove Internal") : ((istype(wear_mask, /obj/item/clothing/mask) && (istype(back, /obj/item/weapon/tank) || istype(belt, /obj/item/weapon/tank) || istype(s_store, /obj/item/weapon/tank)) && !( internal )) ? text(" Set Internal", src) : ""))] +
[(internal ? text("Remove Internal") : "")]
Empty Pockets
Empty Hat
Refresh @@ -2341,6 +2341,8 @@ It can still be worn/put on as normal. O.s_loc = usr.loc O.t_loc = loc O.place = href_list["item"] + if(href_list["loc"]) + O.internalloc = href_list["loc"] requests += O spawn( 0 ) O.process() From 20ac0c223522c9cf12e9df0ff10cd121a4d1544b Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sun, 22 Jan 2012 16:28:13 -0700 Subject: [PATCH 2/8] Fixed some silliness I messed up on. --- code/modules/mob/living/carbon/human/human.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 33d4eb0dce..a8f7ee216f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -2118,11 +2118,11 @@ It can still be worn/put on as normal. if (!( istype(target.wear_mask, /obj/item/clothing/mask) )) return else - if (istype(target.back, /obj/item/weapon/tank) && internalloc == "back") + if (istype(target.back, /obj/item/weapon/tank) && (internalloc == "back" || !internalloc)) target.internal = target.back - else if (istype(target.s_store, /obj/item/weapon/tank) && internalloc == "store") + else if (istype(target.s_store, /obj/item/weapon/tank) && (internalloc == "store" || !internalloc)) target.internal = target.s_store - else if (istype(target.belt, /obj/item/weapon/tank) && internalloc == "belt") + else if (istype(target.belt, /obj/item/weapon/tank) && (internalloc == "belt" || !internalloc)) target.internal = target.belt if (target.internal) for(var/mob/M in viewers(target, 1)) From 9bc6c7eb9af9f471cd356155dd3536ed7a38b669 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sun, 22 Jan 2012 16:42:56 -0700 Subject: [PATCH 3/8] Fixed some errors. --- code/game/machinery/OpTable.dm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 4aebb8e1e6..d4e4ea682a 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -10,6 +10,7 @@ active_power_usage = 5 var/mob/living/carbon/victim = null var/strapped = 0.0 + var/updatesicon = 1 var/obj/machinery/computer/operating/computer = null var/id = 0.0 @@ -94,10 +95,12 @@ var/mob/M = locate(/mob/living/carbon, src.loc) if(M.resting) src.victim = M - icon_state = "table2-active" + if(updatesicon) + icon_state = "table2-active" return 1 src.victim = null - icon_state = "table2-idle" + if(updatesicon) + icon_state = "table2-idle" processing_objects.Remove(src) return 0 @@ -118,7 +121,8 @@ for(var/obj/O in src) O.loc = src.loc src.add_fingerprint(user) - icon_state = "table2-active" + if(updatesicon) + icon_state = "table2-active" src.victim = M processing_objects.Add(src) del(W) @@ -136,6 +140,7 @@ density = 1 anchored = 0 id = null + updatesicon = 0 New() ..() From fa06a12b1e44b2362cd907b8bee76fb2b4bd5f83 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sun, 22 Jan 2012 19:41:13 -0700 Subject: [PATCH 4/8] 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 088c1ce7b1..b694860cd8 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 56fa985528..31316ec6d8 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 29179a7e17..906ea0b545 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 7f2942be4b..99357250ce 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) From a9520990f70bfd567c3e89a1d714941582b5d9ae Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sun, 22 Jan 2012 22:41:17 -0700 Subject: [PATCH 5/8] More updates for the response team and stuff. The response team telecomm unit now works right, radios now have an autosay proc for automated announcements, the SpecOps shuttle now uses autosay, proper energy guns replace the bugged ones, Automated (non player AI) announcement of new players, another attempt at making the command frequency legible, HUD icon for secHUDs and ERT members. --- baystation12.dme | 1 + code/game/machinery/telecomms/broadcaster.dm | 4 +- .../objects/items/weapons/implants/implant.dm | 7 +- code/game/objects/radio/radio.dm | 115 +++++++++++++++++ code/game/response_team.dm | 120 ++++++++++++++---- code/game/specops_shuttle.dm | 47 ++++--- code/modules/admin/verbs/debug.dm | 2 +- code/modules/mob/new_player/new_player.dm | 12 +- code/modules/projectiles/gun.dm | 9 ++ code/stylesheet.dm | 3 +- icons/mob/hud.dmi | Bin 2489 -> 2551 bytes 11 files changed, 259 insertions(+), 61 deletions(-) diff --git a/baystation12.dme b/baystation12.dme index b694860cd8..890997d4e9 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -577,6 +577,7 @@ #include "code\game\objects\kitchen.dm" #include "code\game\objects\lamarr.dm" #include "code\game\objects\mineral_doors.dm" +#include "code\game\objects\new_year.dm" #include "code\game\objects\noticeboard.dm" #include "code\game\objects\object_procs.dm" #include "code\game\objects\portals.dm" diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index fcfa830ebe..91ae88093e 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -62,7 +62,7 @@ machinetype = 6 heatgen = 0 var/intercept = 0 // if nonzero, broadcasts all messages to syndicate channel - var/syndi = 1 //If 1, it goes to syndicate frequency. Else, goes to deathsquad + var/syndi = 1 //If 1, it goes to syndicate frequency. Else, goes to deathsquad/Response Team receive_signal(datum/signal/signal) @@ -210,7 +210,7 @@ // --- Broadcast to response team radio! --- - else if(data == 3) + else if(data == 4) var/datum/radio_frequency/syndicateconnection = radio_controller.return_frequency(1439) for (var/obj/item/device/radio/R in syndicateconnection.devices["[RADIO_CHAT]"]) diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 8029addbfe..9283f50e04 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -283,13 +283,8 @@ the implant may become unstable and either pre-maturely inject the subject or si if(M.stat == 2) var/turf/t = get_turf(M) var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null) - var/mob/living/carbon/human/G = new /mob/living/carbon/human(null) - G.real_name = "[mobname]'s death alarm" - G.name = "[mobname]'s death alarm" - G.universal_speak = 1 - a.talk_into(G,"[mobname] has died in [t.loc.name]!") + a.autosay("[mobname] has died in [t.loc.name]!", "[mobname]'s Death Alarm") del(a) - del(G) processing_objects.Remove(src) diff --git a/code/game/objects/radio/radio.dm b/code/game/objects/radio/radio.dm index 1643c38ec3..79faf80183 100644 --- a/code/game/objects/radio/radio.dm +++ b/code/game/objects/radio/radio.dm @@ -183,6 +183,121 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use updateDialog() add_fingerprint(usr) +/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) + var/datum/radio_frequency/connection = null + if(channel && channels && channels.len > 0) + if (channel == "department") + //world << "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\"" + channel = channels[1] + connection = secure_radio_connections[channel] + else + connection = radio_connection + channel = null + if (!istype(connection)) + return + + if(subspace_transmission) + // First, we want to generate a new radio signal + var/datum/signal/signal = new + signal.transmission_method = 2 // 2 would be a subspace transmission. + // transmission_method could probably be enumerated through #define. Would be neater. + + // --- Finally, tag the actual signal with the appropriate values --- + signal.data = list( + // Identity-associated tags: + "mob" = new /mob/living/silicon/ai(src), // store a reference to the mob + "mobtype" = /mob/living/silicon/ai, // the mob's type + "realname" = from, // the mob's real name + "name" = from, // the mob's display name + "job" = "(Automated Announcement)", // the mob's job + "key" = "none", // the mob's key + "vmessage" = "*garbled automated announcement*", // the message to display if the voice wasn't understood + "vname" = "synthesized voice", // the name to display if the voice wasn't understood + "vmask" = 0, // 1 if the mob is using a voice gas mask + + // We store things that would otherwise be kept in the actual mob + // so that they can be logged even AFTER the mob is deleted or something + + // Other tags: + "compression" = rand(45,50), // compressed radio signal + "message" = message, // the actual sent message + "connection" = connection, // the radio connection to use + "radio" = src, // stores the radio used for transmission + "slow" = 0, // how much to sleep() before broadcasting - simulates net lag + "traffic" = 0 // dictates the total traffic sum that the signal went through + ) + signal.frequency = connection.frequency // Quick frequency set + + //#### Sending the signal to all subspace receivers ####// + for(var/obj/machinery/telecomms/receiver/R in world) + R.receive_signal(signal) + + // Allinone can act as receivers. + for(var/obj/machinery/telecomms/allinone/R in world) + R.receive_signal(signal) + + // Receiving code can be located in Telecommunications.dm + return + + + /* ###### Intercoms and station-bounced radios ###### */ + + var/filter_type = 2 + + /* --- Intercoms can only broadcast to other intercoms, but bounced radios can broadcast to bounced radios and intercoms --- */ + if(istype(src, /obj/item/device/radio/intercom)) + filter_type = 1 + + + var/datum/signal/signal = new + signal.transmission_method = 2 + + + /* --- Try to send a normal subspace broadcast first */ + + signal.data = list( + + "mob" = new /mob/living/silicon/ai(src), // store a reference to the mob + "mobtype" = /mob/living/silicon/ai, // the mob's type + "realname" = from, // the mob's real name + "name" = from, // the mob's display name + "job" = "(Automated Announcement)", // the mob's job + "key" = "none", // the mob's key + "vmessage" = "*garbled automated announcement*", // the message to display if the voice wasn't understood + "vname" = "synthesized voice", // the name to display if the voice wasn't understood + "vmask" = 0, // 1 if the mob is using a voice gas mask + + // We store things that would otherwise be kept in the actual mob + // so that they can be logged even AFTER the mob is deleted or something + + // Other tags: + "compression" = 0, // compressed radio signal + "message" = message, // the actual sent message + "connection" = connection, // the radio connection to use + "radio" = src, // stores the radio used for transmission + "slow" = 0, // how much to sleep() before broadcasting - simulates net lag + "traffic" = 0 // dictates the total traffic sum that the signal went through + ) + signal.frequency = connection.frequency // Quick frequency set + + for(var/obj/machinery/telecomms/receiver/R in world) + R.receive_signal(signal) + + + sleep(rand(10,25)) // wait a little... + + if(signal.data["done"]) + del(signal) // delete the signal - we're done here. + return + + // Oh my god; the comms are down or something because the signal hasn't been broadcasted yet. + // Send a mundane broadcast with limited targets: + + Broadcast_Message(connection, new /mob/living/silicon/ai(src), 0, "*garbled automated announcement*", + src, message, from, "(Automated Announcement)", from, "synthesized voice", + filter_type, signal.data["compression"]) + return + /obj/item/device/radio/talk_into(mob/M as mob, message, channel) if(GLOBAL_RADIO_TYPE == 1) // NEW RADIO SYSTEMS: By Doohl diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 31316ec6d8..edb8811e95 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -22,14 +22,12 @@ client/verb/JoinResponseTeam() var/new_name = input(usr, "Pick a name","Name") as null|text if(!new_name) return - var/gender = alert(usr, "Pick a gender","Gender","Male","Female") - - var/mob/living/carbon/human/new_commando = create_response_team(L, leader_selected, new_name, gender) + var/mob/living/carbon/human/new_commando = create_response_team(L, leader_selected, new_name) new_commando.mind.key = usr.key new_commando.key = usr.key - new_commando << "\blue You are [!leader_selected?"member":"LEADER"] of an armed response team in CentComm's service. Something went down on [station_name()] and they're now on code red. Go in there and fix the problem." + new_commando << "\blue You are [!leader_selected?" a member":" the LEADER"] of an armed response team in CentComm's service. Something went down on [station_name()] and they're now on code red. Go in there and fix the problem." new_commando << "You should first gear up and discuss a plan with your team. More members may be joining, don't move out before you're ready." else @@ -75,30 +73,105 @@ proc/trigger_armed_response_team() send_emergency_team = 1 -/client/proc/create_response_team(obj/spawn_location, leader_selected = 0, commando_name, gender) +/client/proc/create_response_team(obj/spawn_location, leader_selected = 0, commando_name) - var/mob/living/carbon/human/new_commando = new(spawn_location.loc) - new_commando.gender = ((gender == "Male") ? MALE : FEMALE) + var/mob/living/carbon/human/M = new(spawn_location.loc) - var/datum/preferences/A = new()//Randomize appearance for the commando. - A.randomize_appearance_for(new_commando) + var/new_facial = input("Please select facial hair color.", "Character Generation") as color + if(new_facial) + M.r_facial = hex2num(copytext(new_facial, 2, 4)) + M.g_facial = hex2num(copytext(new_facial, 4, 6)) + M.b_facial = hex2num(copytext(new_facial, 6, 8)) - new_commando.real_name = commando_name - new_commando.age = !leader_selected ? rand(23,35) : rand(35,45) + var/new_hair = input("Please select hair color.", "Character Generation") as color + if(new_facial) + M.r_hair = hex2num(copytext(new_hair, 2, 4)) + M.g_hair = hex2num(copytext(new_hair, 4, 6)) + M.b_hair = hex2num(copytext(new_hair, 6, 8)) - new_commando.dna.ready_dna(new_commando)//Creates DNA. + var/new_eyes = input("Please select eye color.", "Character Generation") as color + if(new_eyes) + M.r_eyes = hex2num(copytext(new_eyes, 2, 4)) + M.g_eyes = hex2num(copytext(new_eyes, 4, 6)) + M.b_eyes = hex2num(copytext(new_eyes, 6, 8)) + + var/new_tone = input("Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as text + + if (new_tone) + M.s_tone = max(min(round(text2num(new_tone)), 220), 1) + M.s_tone = -M.s_tone + 35 + + // hair + var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair + var/list/hairs = list() + + // loop through potential hairs + for(var/x in all_hairs) + var/datum/sprite_accessory/hair/H = new x // create new hair datum based on type x + hairs.Add(H.name) // add hair name to hairs + del(H) // delete the hair after it's all done + + var/new_style = input("Please select hair style", "Character Generation") as null|anything in hairs + + // if new style selected (not cancel) + if (new_style) + M.h_style = new_style + + for(var/x in all_hairs) // loop through all_hairs again. Might be slightly CPU expensive, but not significantly. + var/datum/sprite_accessory/hair/H = new x // create new hair datum + if(H.name == new_style) + M.hair_style = H // assign the hair_style variable a new hair datum + break + else + del(H) // if hair H not used, delete. BYOND can garbage collect, but better safe than sorry + + // facial hair + var/list/all_fhairs = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair + var/list/fhairs = list() + + for(var/x in all_fhairs) + var/datum/sprite_accessory/facial_hair/H = new x + fhairs.Add(H.name) + del(H) + + new_style = input("Please select facial style", "Character Generation") as null|anything in fhairs + + if(new_style) + M.f_style = new_style + for(var/x in all_fhairs) + var/datum/sprite_accessory/facial_hair/H = new x + if(H.name == new_style) + M.facial_hair_style = H + break + else + del(H) + + var/new_gender = alert(usr, "Please select gender.", "Character Generation", "Male", "Female") + if (new_gender) + if(new_gender == "Male") + M.gender = MALE + else + M.gender = FEMALE + M.update_body() + M.update_face() + M.update_clothing() + + M.real_name = commando_name + M.age = !leader_selected ? rand(23,35) : rand(35,45) + + M.dna.ready_dna(M)//Creates DNA. //Creates mind stuff. - new_commando.mind = new - new_commando.mind.current = new_commando - new_commando.mind.original = new_commando - new_commando.mind.assigned_role = "MODE" - new_commando.mind.special_role = "Response Team" - if(!(new_commando.mind in ticker.minds)) - ticker.minds += new_commando.mind//Adds them to regular mind list. - new_commando.equip_strike_team(leader_selected) + M.mind = new + M.mind.current = M + M.mind.original = M + M.mind.assigned_role = "MODE" + M.mind.special_role = "Response Team" + if(!(M.mind in ticker.minds)) + ticker.minds += M.mind//Adds them to regular mind list. + M.equip_strike_team(leader_selected) del(spawn_location) - return new_commando + return M /mob/living/carbon/human/proc/equip_strike_team(leader_selected = 0) @@ -144,7 +217,10 @@ proc/trigger_armed_response_team() var/obj/item/weapon/card/id/W = new(src) W.name = "[real_name]'s ID Card" W.icon_state = "centcom" - W.access = get_access("Head of Personnel") + if(leader_selected) + W.access = get_access("Captain") + else + W.access = get_access("Head of Personnel") W.access += list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage)//Let's add their alloted CentCom access. W.assignment = "Emergency Response Team" W.registered = real_name diff --git a/code/game/specops_shuttle.dm b/code/game/specops_shuttle.dm index 906ea0b545..f05c6326ca 100644 --- a/code/game/specops_shuttle.dm +++ b/code/game/specops_shuttle.dm @@ -10,7 +10,6 @@ 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" @@ -20,15 +19,16 @@ var/specops_shuttle_timereset = 0 var/temp = null var/hacked = 0 var/allowedtocall = 0 + var/specops_shuttle_timereset = 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/obj/item/device/radio/intercom/announcer = new /obj/item/device/radio/intercom(null)//We need a fake AI to announce some stuff below. Otherwise it will be wonky. + announcer.config(list("Response Team" = 0)) 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. + var/message = "THE SPECIAL OPERATIONS SHUTTLE IS PREPARING TO RETURN"//Initial message shown. if(announcer) - announcer.say(message) + announcer.autosay(message, "A.L.I.C.E.", "Response Team") while(specops_shuttle_time - world.timeofday > 0) var/ticksleft = specops_shuttle_time - world.timeofday @@ -44,7 +44,7 @@ var/specops_shuttle_timereset = 0 message = "ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN" if(rounded_time_left==0) message = "ALERT: TAKEOFF" - announcer.say(message) + announcer.autosay(message, "A.L.I.C.E.", "Response Team") 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. @@ -82,17 +82,22 @@ var/specops_shuttle_timereset = 0 var/mob/M = locate(/mob) in T M << "\red You have arrived at Central Command. Operation has ended!" + for(var/obj/machinery/computer/specops_shuttle/S in world) + S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY + + del(announcer) + /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? - 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/obj/item/device/radio/intercom/announcer = new /obj/item/device/radio/intercom(null)//We need a fake AI to announce some stuff below. Otherwise it will be wonky. + announcer.config(list("Response Team" = 0)) 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) + announcer.autosay(message, "A.L.I.C.E.", "Response Team") message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD" - announcer.say(message) + announcer.autosay(message, "A.L.I.C.E.", "Response Team") while(specops_shuttle_time - world.timeofday > 0) var/ticksleft = specops_shuttle_time - world.timeofday @@ -108,7 +113,7 @@ var/specops_shuttle_timereset = 0 message = "ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN" if(rounded_time_left==0) message = "ALERT: TAKEOFF" - announcer.say(message) + announcer.autosay(message, "A.L.I.C.E.", "Response Team") 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. @@ -218,17 +223,19 @@ var/specops_shuttle_timereset = 0 var/mob/M = locate(/mob) in T M << "\red You have arrived to [station_name]. Commence operation!" + for(var/obj/machinery/computer/specops_shuttle/S in world) + S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY + + del(announcer) + /proc/specops_can_move() if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return 0 - else if(world.time <= specops_shuttle_timereset) - return 0 + for(var/obj/machinery/computer/specops_shuttle/S in world) + if(world.time <= S.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) @@ -280,7 +287,9 @@ var/specops_shuttle_timereset = 0 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!" + if (((world.time - specops_shuttle_timereset)/10) > 60) + usr << "\blue [-((world.time - specops_shuttle_timereset)/10)/60] minutes remain!" + 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." @@ -290,7 +299,6 @@ var/specops_shuttle_timereset = 0 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() @@ -312,7 +320,6 @@ var/specops_shuttle_timereset = 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 99357250ce..2c3aa31f76 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -690,7 +690,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that var/obj/item/clothing/glasses/sunglasses/V = new(M) V.loc = K M.equip_if_possible(K, M.slot_wear_suit) - M.equip_if_possible(new /obj/item/weapon/gun/energy(M), M.slot_s_store) + M.equip_if_possible(new /obj/item/weapon/gun/energy/gun(M), M.slot_s_store) var/obj/item/device/pda/heads/pda = new(M) pda.owner = M.real_name diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index af2c6097c0..6d3ac0648e 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -270,15 +270,9 @@ proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank) if (ticker.current_state == GAME_STATE_PLAYING) - var/ailist[] = list() - for (var/mob/living/silicon/ai/A in world) - if (!A.stat) - ailist += A - if (ailist.len) - var/mob/living/silicon/ai/announcer = pick(ailist) - if(character.mind) - if((character.mind.assigned_role != "Cyborg") && (character.mind.special_role != "MODE")) - announcer.say("[character.real_name] has signed up as [rank].") + var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null) + a.autosay("[character.real_name] has arrived on the station.", "Arrivals Announcement Computer") + del(a) proc/ManifestLateSpawn(var/mob/living/carbon/human/H, icon/H_icon) // Attempted fix to add late joiners to various databases -- TLE diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 92ba2cb0c0..4b66e30ca7 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -50,6 +50,15 @@ M.drop_item() del(src) return + if (target == user && user.zone_sel.selecting == "mouth") + M.visible_message("\red [user] sticks their gun in their mouth, ready to pull the trigger...") + if(!do_after(user, 20)) + M.visible_message("\blue [user] decided life was worth living") + return + M.visible_message("\red [user] pulls the trigger.") + M.apply_damage(60, BRUTE, "head") + M.apply_damage(90, BRUTE, "chest") + return if (!user.IsAdvancedToolUser()) user << "\red You don't have the dexterity to do this!" diff --git a/code/stylesheet.dm b/code/stylesheet.dm index 0cc4bfb71e..120caff798 100644 --- a/code/stylesheet.dm +++ b/code/stylesheet.dm @@ -94,7 +94,8 @@ h1, h2, h3, h4, h5, h6 .comradio { - color: #ACA82D; + color:#0028FF; + background: #FFD700; } .syndradio diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi index 8fe609fbb676e295e0a988b2c33f827d6142a06f..92a4a81987a83f8b85c46992c5b95d320ebffef7 100644 GIT binary patch delta 2208 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 E0W*B{y8r+H From 08a9cabe765d13e78e871a8dffb12b6d85636536 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sun, 22 Jan 2012 23:45:16 -0700 Subject: [PATCH 6/8] Fixed some stuff related to the previous commit. --- code/game/jobs/access.dm | 13 ++++++++++++- code/game/objects/radio/radio.dm | 6 +++--- code/game/response_team.dm | 2 +- code/modules/projectiles/gun.dm | 19 ++++++++++--------- code/stylesheet.dm | 4 ++-- icons/mob/hud.dmi | Bin 2551 -> 2541 bytes 6 files changed, 28 insertions(+), 16 deletions(-) diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 38861503bb..86bc3f013a 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -491,14 +491,25 @@ return var/jobName + var/list/accesses = list() if(istype(src, /obj/item/device/pda)) if(src:id) jobName = src:id:assignment + accesses = src:id:access if(istype(src, /obj/item/weapon/card/id)) jobName = src:assignment + accesses = src:access if(jobName in get_all_jobs()) return jobName + + var/centcom = 0 + for(var/i = 1, i <= accesses.len, i++) + if(accesses[i] > 100) + centcom = 1 + break + if(centcom) + return "centcom" else - return "Unknown" \ No newline at end of file + return "Unknown" diff --git a/code/game/objects/radio/radio.dm b/code/game/objects/radio/radio.dm index 79faf80183..37d459777d 100644 --- a/code/game/objects/radio/radio.dm +++ b/code/game/objects/radio/radio.dm @@ -209,7 +209,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use "mobtype" = /mob/living/silicon/ai, // the mob's type "realname" = from, // the mob's real name "name" = from, // the mob's display name - "job" = "(Automated Announcement)", // the mob's job + "job" = "Automated Announcement", // the mob's job "key" = "none", // the mob's key "vmessage" = "*garbled automated announcement*", // the message to display if the voice wasn't understood "vname" = "synthesized voice", // the name to display if the voice wasn't understood @@ -261,7 +261,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use "mobtype" = /mob/living/silicon/ai, // the mob's type "realname" = from, // the mob's real name "name" = from, // the mob's display name - "job" = "(Automated Announcement)", // the mob's job + "job" = "Automated Announcement", // the mob's job "key" = "none", // the mob's key "vmessage" = "*garbled automated announcement*", // the message to display if the voice wasn't understood "vname" = "synthesized voice", // the name to display if the voice wasn't understood @@ -294,7 +294,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use // Send a mundane broadcast with limited targets: Broadcast_Message(connection, new /mob/living/silicon/ai(src), 0, "*garbled automated announcement*", - src, message, from, "(Automated Announcement)", from, "synthesized voice", + src, message, from, "Automated Announcement", from, "synthesized voice", filter_type, signal.data["compression"]) return diff --git a/code/game/response_team.dm b/code/game/response_team.dm index edb8811e95..87901a232a 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -190,7 +190,7 @@ proc/trigger_armed_response_team() camera.c_tag = real_name //Basic Uniform - equip_if_possible(new /obj/item/clothing/under/color/black(src), slot_w_uniform) + equip_if_possible(new /obj/item/clothing/under/syndicate/tacticool(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/gun(src), slot_belt) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 4b66e30ca7..5b5a3a766b 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -37,6 +37,16 @@ for(var/obj/O in contents) O.emp_act(severity) + attack(mob/living/M as mob, mob/living/user as mob, def_zone) + if (M == user && user.zone_sel.selecting == "mouth" && load_into_chamber()) + M.visible_message("\red [user] sticks their gun in their mouth, ready to pull the trigger...") + if(!do_after(user, 40)) + M.visible_message("\blue [user] decided life was worth living") + return + M.visible_message("\red [user] pulls the trigger.") + M.apply_damage(70, BRUTE, "head") + M.apply_damage(110, BRUTE, "chest") + return afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)//TODO: go over this if(flag) return //we're placing gun on a table or in backpack @@ -50,15 +60,6 @@ M.drop_item() del(src) return - if (target == user && user.zone_sel.selecting == "mouth") - M.visible_message("\red [user] sticks their gun in their mouth, ready to pull the trigger...") - if(!do_after(user, 20)) - M.visible_message("\blue [user] decided life was worth living") - return - M.visible_message("\red [user] pulls the trigger.") - M.apply_damage(60, BRUTE, "head") - M.apply_damage(90, BRUTE, "chest") - return if (!user.IsAdvancedToolUser()) user << "\red You don't have the dexterity to do this!" diff --git a/code/stylesheet.dm b/code/stylesheet.dm index 120caff798..5454743afd 100644 --- a/code/stylesheet.dm +++ b/code/stylesheet.dm @@ -94,8 +94,8 @@ h1, h2, h3, h4, h5, h6 .comradio { - color:#0028FF; - background: #FFD700; + color:#FF9966; + text-decoration: underline; } .syndradio diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi index 92a4a81987a83f8b85c46992c5b95d320ebffef7..e7425bb46c3e3385e0ea5cb3d59a094669e687b4 100644 GIT binary patch delta 538 zcmV+#0_FYp6YUeQI01hF|9VtdbVOxyV{&P5bZKvH004NLm6p$L+b|5q&+$_j?X?@y zrWtzKWoS|K(7r;!NVLUPmOM&MmOcHLqysu&0Y2Yk<0pxKK9ag@e>^-sy|nkwPtBIK zNKWnd_V(+tS?t8uU>~cSW)WEWP){GFQe|6Sgvke{Si}CJS$KcZVn45&MW;0IY5f_M z7!k}fd4&7LDI?s;!t3P{hwo;v-)6A4GuWH;9Oq`RIC|z(Q-kM7dt0ur*8kb}1q}9% zQe`ODqe{t%6=5BXl_Y^~`rM7C`kWF&>U2T4?V~8)vyaZNT~=~oN%fjta+2GIFR0o=9qhs?m01j_D9%# zMw3N#$Yl(y;wrn4>?VTLcUW7uog=0asH=m3mGC#QGbH5Me5kTztbWxqSyr`jAtAqwmw&6f3WPYoUqBOkc0J&a?bw?%{q>zBRH9NNy?gVn9^3Qr&WtY?KOP>RUKaPyPxCEn zm68|V7q?%R^Vv>(3-+`K(h)d|H1- zB}N4EOdjEWaV`jVvhaGj#NoRM?6(Q*?F9B_J;k{RERLQz)zsiQ(%zQqtMz~OeF1~L zqudzE^`KHqW<^*>LnFzco4#~|slMdQkUCuu?l||788b(@GN}s&vTFr%;c!V}FOFjA zI&s)lKS$EWny7y^Y{SX_%5GF?Pz}4lNoqsT>V$IxVJ(}|#DVlyw8YYbbkCXbvp>S_ z3z{rysnj8`ifimbwwnl2-(hXtc8Zv4pspnWE8%ZqCrHS%`Osv`SpBMJ$W==&WiSCz zHcAS{Fw$-hwuL}L1pC6~P)FIL2XlvTZx#Wx{$treh9-YWP^KJdU#6*(YPEz}heqHr zzh}_oEcuNf1EOH!vdre5qvRfZUbIlHRYHTO*l-}Y9^|)G1e7<5o1&1thLS*G7$e$k zn-VHT Date: Sun, 22 Jan 2012 23:50:58 -0700 Subject: [PATCH 7/8] Fixed some borkenness with guns, and tried making the command channel readable. --- code/modules/projectiles/gun.dm | 2 ++ code/stylesheet.dm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 5b5a3a766b..5c759614b5 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -47,6 +47,8 @@ M.apply_damage(70, BRUTE, "head") M.apply_damage(110, BRUTE, "chest") return + else + return ..() afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)//TODO: go over this if(flag) return //we're placing gun on a table or in backpack diff --git a/code/stylesheet.dm b/code/stylesheet.dm index 5454743afd..077a64b60d 100644 --- a/code/stylesheet.dm +++ b/code/stylesheet.dm @@ -94,7 +94,7 @@ h1, h2, h3, h4, h5, h6 .comradio { - color:#FF9966; + color:#FF9900; text-decoration: underline; } From e3a5ff464cbd5527477a8a817c028f5fdd46c87d Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sun, 22 Jan 2012 23:52:40 -0700 Subject: [PATCH 8/8] Replaced missing line in DME. --- baystation12.dme | 1 + 1 file changed, 1 insertion(+) diff --git a/baystation12.dme b/baystation12.dme index 890997d4e9..c7b1de5ca8 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -443,6 +443,7 @@ #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"