From 884fd25f78357c575ea45326825cfaf6a1338407 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sat, 3 Mar 2012 23:45:20 -0700 Subject: [PATCH] Fixed the rest of Tajspeak, radios now give a cue when someone talks into it, fixed throwing and tables, fixed bloodiness, fixed autofiring vars. You can throw over tables again. Fixed some bloodiness not being added. Fixed some vars not being reset. --- baystation12.dme | 1 + code/WorkInProgress/Cael_Aislinn/Tajara/say.dm | 13 ++++++++++++- code/WorkInProgress/Cael_Aislinn/Tajara/whisper.dm | 2 +- code/game/throwing.dm | 13 +++++++------ .../mob/living/carbon/human/human_defense.dm | 10 ++++++++-- code/modules/mob/living/say.dm | 14 +++++++++++++- code/modules/projectiles/gun.dm | 3 +++ 7 files changed, 45 insertions(+), 11 deletions(-) diff --git a/baystation12.dme b/baystation12.dme index 275b6a3bae5..1a7ccdb973e 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1077,6 +1077,7 @@ #include "code\WorkInProgress\Cael_Aislinn\Tajara\say.dm" #include "code\WorkInProgress\Cael_Aislinn\Tajara\tajara_transformation.dm" #include "code\WorkInProgress\Cael_Aislinn\Tajara\tajaran.dm" +#include "code\WorkInProgress\Cael_Aislinn\Tajara\whisper.dm" #include "code\WorkInProgress\Chinsky\ashtray.dm" #include "code\WorkInProgress\mapload\dmm_suite.dm" #include "code\WorkInProgress\mapload\reader.dm" diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/say.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/say.dm index 79246dba209..b36bbb5bdbc 100644 --- a/code/WorkInProgress/Cael_Aislinn/Tajara/say.dm +++ b/code/WorkInProgress/Cael_Aislinn/Tajara/say.dm @@ -190,7 +190,7 @@ if( !message_mode && (disease_symptoms & DISEASE_WHISPER)) message_mode = "whisper" - if(src.stunned > 0 && (!(traumatic_shock > 61) && prob(50))) + if(src.stunned > 0 || (!(traumatic_shock > 61) && prob(50))) message_mode = "" //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it @@ -365,6 +365,10 @@ if (M.client && M.client.ghost_ears) listening|=M + var/list/eavesdroppers = get_mobs_in_view(7, src) + for(var/mob/M in listening) + eavesdroppers.Remove(M) + for (var/obj/O in ((W | contents)-used_radios)) W |= O @@ -532,3 +536,10 @@ sleep(11) del(B) */ + + if (length(eavesdroppers)) + + for (var/mob/M in eavesdroppers) + M << "\blue [src] speaks into their radio..." + M << speech_bubble + spawn(30) del(speech_bubble) \ No newline at end of file diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/whisper.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/whisper.dm index 99e04f37109..e4c91900877 100644 --- a/code/WorkInProgress/Cael_Aislinn/Tajara/whisper.dm +++ b/code/WorkInProgress/Cael_Aislinn/Tajara/whisper.dm @@ -22,7 +22,7 @@ var/mob/living/carbon/human/H = src alt_name = " (as [H.get_visible_name()])" // Mute disability - if (src.sdisabilities & 2) + if (src.disabilities & 64) return if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle)) diff --git a/code/game/throwing.dm b/code/game/throwing.dm index e3729f44939..670664103f5 100644 --- a/code/game/throwing.dm +++ b/code/game/throwing.dm @@ -87,7 +87,7 @@ else return get_step(start, EAST) -/atom/movable/proc/hit_check() +/atom/movable/proc/hit_check(var/turf/target) if(src.throwing) for(var/atom/A in get_turf(src)) if(A == src) continue @@ -96,7 +96,7 @@ src.throw_impact(A) src.throwing = 0 if(isobj(A)) - if(A.density) // **TODO: Better behaviour for windows + if(A.density && !A.CanPass(src,target)) // **TODO: Better behaviour for windows // which are dense, but shouldn't always stop movement src.throw_impact(A) src.throwing = 0 @@ -150,6 +150,7 @@ dy = SOUTH var/dist_travelled = 0 var/dist_since_sleep = 0 + var/turf/target_turf = get_turf(target) if(dist_x > dist_y) var/error = dist_x/2 - dist_y while(((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf)) @@ -159,7 +160,7 @@ if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge break src.Move(step) - hit_check() + hit_check(target_turf) error += dist_x dist_travelled++ dist_since_sleep++ @@ -171,7 +172,7 @@ if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge break src.Move(step) - hit_check() + hit_check(target_turf) error -= dist_y dist_travelled++ dist_since_sleep++ @@ -187,7 +188,7 @@ if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge break src.Move(step) - hit_check() + hit_check(target_turf) error += dist_y dist_travelled++ dist_since_sleep++ @@ -199,7 +200,7 @@ if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge break src.Move(step) - hit_check() + hit_check(target_turf) error -= dist_x dist_travelled++ dist_since_sleep++ diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 0625a31bcbe..4a0c22e4291 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -108,11 +108,17 @@ emp_act location.add_blood(src) if(ishuman(user)) var/mob/living/carbon/human/H = user - if(H.gloves) H.gloves.add_blood(src) - else H.add_blood(src) if(H.wear_suit) H.wear_suit.add_blood(src) else if(H.w_uniform) H.w_uniform.add_blood(src) if(H.shoes) H.shoes.add_blood(src) + if (H.gloves) + H.gloves.add_blood(H) + H.gloves.transfer_blood = 2 + H.gloves.bloody_hands_mob = H + else + H.add_blood(H) + H.bloody_hands = 2 + H.bloody_hands_mob = H switch(hit_area) if("head")//Harder to score a stun but if you do it lasts a bit longer diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index c76afae8228..3339524a47e 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -153,7 +153,7 @@ if( !message_mode && (disease_symptoms & DISEASE_WHISPER)) message_mode = "whisper" - if(src.stunned > 0 && (!(traumatic_shock > 61) && prob(50))) + if(src.stunned > 0 || (!(traumatic_shock > 61) && prob(50))) message_mode = "" //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it @@ -319,6 +319,7 @@ listening = hearers(message_range, T) var/list/V = view(message_range, T) var/list/W = V + //find mobs in lockers, cryo, intellicards, brains, MMIs, and so on. for (var/mob/M in world) if (!M.client) @@ -334,6 +335,10 @@ if (M.client && M.client.ghost_ears) listening|=M + var/list/eavesdroppers = get_mobs_in_view(7, src) + for(var/mob/M in listening) + eavesdroppers.Remove(M) + for (var/obj/O in ((W | contents)-used_radios)) W |= O @@ -504,6 +509,13 @@ del(B) */ + if (length(eavesdroppers)) + + for (var/mob/M in eavesdroppers) + M << "\blue [src] speaks into their radio..." + M << speech_bubble + spawn(30) del(speech_bubble) + /obj/effect/speech_bubble diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index d108e2934c0..ce4ca361b56 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -325,6 +325,9 @@ mob/proc del(T.item_use_icon) del(T.gun_move_icon) del(T.gun_run_icon) + T.target_can_move = 0 + T.target_can_run = 0 + T.target_can_click = 0 if(!targeted_by.len) del targeted_by spawn(1) update_clothing()