diff --git a/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm b/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm index 55a61a6f59..6df5a22050 100644 --- a/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm +++ b/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm @@ -11,7 +11,7 @@ datum/directive/terminations/alien_fraud datum/directive/terminations/alien_fraud/get_crew_to_terminate() var/list/aliens[0] for(var/mob/M in player_list) - if (M.is_ready() && is_alien(M)) + if (M.is_ready() && is_alien(M) && M != mode.head_loyalist.current) aliens.Add(M) return aliens diff --git a/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm b/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm index 1e31eca7b6..1ea28852fd 100644 --- a/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm +++ b/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm @@ -6,7 +6,7 @@ datum/directive/bluespace_contagion proc/get_infection_candidates() var/list/candidates[0] for(var/mob/M in player_list) - if (M.is_ready() && !M.is_mechanical()) + if (M.is_ready() && !M.is_mechanical() && M != mode.head_loyalist.current) candidates.Add(M) return candidates diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 935760efdb..5a78b702d0 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -552,6 +552,8 @@ ) if(istype(M, /mob/living/carbon/human)) var/datum/organ/internal/eyes/eyes = H.internal_organs_by_name["eyes"] + if(!eyes) + return eyes.damage += rand(3,4) if(eyes.damage >= eyes.min_bruised_damage) if(M.stat != 2) @@ -631,4 +633,3 @@ var/obj/item/I = get_active_hand() if(I && !I.abstract) I.showoff(src) - diff --git a/code/game/sound.dm b/code/game/sound.dm index 3f89ea4d18..25e693a91c 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -9,7 +9,7 @@ var/list/hiss_sound = list('sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','soun var/list/page_sound = list('sound/effects/pageturn1.ogg', 'sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg') //var/list/gun_sound = list('sound/weapons/Gunshot.ogg', 'sound/weapons/Gunshot2.ogg','sound/weapons/Gunshot3.ogg','sound/weapons/Gunshot4.ogg') -/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff) +/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff, var/is_global) soundin = get_sfx(soundin) // same sound for everyone @@ -25,28 +25,27 @@ var/list/page_sound = list('sound/effects/pageturn1.ogg', 'sound/effects/pagetur var/mob/M = P if(!M || !M.client) continue - + var/distance = get_dist(M, turf_source) if(distance <= (world.view + extrarange) * 3) var/turf/T = get_turf(M) - + if(T && T.z == turf_source.z) //check that the air can transmit sound var/datum/gas_mixture/environment = T.return_air() if (!environment || environment.return_pressure() < SOUND_MINIMUM_PRESSURE) - if (distance > 1) + if (distance > 1) continue - + var/new_frequency = 32000 + (frequency - 32000)*0.125 //lower the frequency. very rudimentary var/new_volume = vol*0.15 //muffle the sound, like we're hearing through contact - M.playsound_local(turf_source, soundin, new_volume, vary, new_frequency, falloff) + M.playsound_local(turf_source, soundin, new_volume, vary, new_frequency, falloff, is_global) else - M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff) + M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, is_global) -var/const/FALLOFF_SOUNDS = 2 -var/const/SURROUND_CAP = 255 +var/const/FALLOFF_SOUNDS = 0.5 -/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff) +/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff, is_global) if(!src.client || ear_deaf > 0) return soundin = get_sfx(soundin) @@ -54,8 +53,7 @@ var/const/SURROUND_CAP = 255 S.wait = 0 //No queue S.channel = 0 //Any channel S.volume = vol - S.environment = 2 - + S.environment = -1 if (vary) if(frequency) S.frequency = frequency @@ -65,20 +63,21 @@ var/const/SURROUND_CAP = 255 if(isturf(turf_source)) // 3D sounds, the technology is here! var/turf/T = get_turf(src) - S.volume -= get_dist(T, turf_source) * 0.75 + S.volume -= get_dist(T, turf_source) * 2 //multiplicative falloff to add on top of natural audio falloff. + var/datum/gas_mixture/environment = T.return_air() + if(get_dist(T, turf_source) > 2) + S.volume -= environment.return_pressure()/100 + 1 if (S.volume < 0) S.volume = 0 var/dx = turf_source.x - T.x // Hearing from the right/left - - S.x = round(max(-SURROUND_CAP, min(SURROUND_CAP, dx)), 1) - + S.x = dx var/dz = turf_source.y - T.y // Hearing from infront/behind - S.z = round(max(-SURROUND_CAP, min(SURROUND_CAP, dz)), 1) - + S.z = dz // The y value is for above your head, but there is no ceiling in 2d spessmens. S.y = 1 S.falloff = (falloff ? falloff : FALLOFF_SOUNDS) - + if(!is_global) + S.environment = 2 src << S /client/proc/playtitlemusic() diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 1479506430..0aee3c0cf3 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1031,11 +1031,13 @@ datum/preferences if("input") switch(href_list["preference"]) if("name") - var/new_name = reject_bad_name( input(user, "Choose your character's name:", "Character Preference") as text|null ) - if(new_name) - real_name = new_name - else - user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." + var/raw_name = input(user, "Choose your character's name:", "Character Preference") as text|null + if (!isnull(raw_name)) // Check to ensure that the user entered text (rather than cancel.) + var/new_name = reject_bad_name(raw_name) + if(new_name) + real_name = new_name + else + user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." if("age") var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index 4ad6e328af..4ed1004756 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -159,9 +159,9 @@ src.damage += 0.2 * process_accuracy //Damaged one shares the fun else - var/victim = pick(owner.internal_organs) - var/datum/organ/internal/O = owner.internal_organs[victim] - O.damage += 0.2 * process_accuracy + var/datum/organ/internal/O = pick(owner.internal_organs) + if(O) + O.damage += 0.2 * process_accuracy //Detox can heal small amounts of damage if (src.damage && src.damage < src.min_bruised_damage && owner.reagents.has_reagent("anti_toxin")) diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index 1a0fba6426..8f1f68698e 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -34,7 +34,7 @@ H << "\red You have a monitor for a head, where do you think you're going to put that?" return - M << "\blue You swallow a gulp of [src]." + M << "\blue You swallow a gulp from \the [src]." if(reagents.total_volume) reagents.trans_to_ingest(M, gulp_size) diff --git a/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm b/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm index c2bb90ddb8..454badcf19 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm @@ -71,7 +71,7 @@ center_of_mass = list("x"=16, "y"=10) if("tomatojuice") icon_state = "glass_red" - name = "Glass of Tomato juf" + name = "Glass of Tomato juice" desc = "Are you sure this is tomato juice?" center_of_mass = list("x"=16, "y"=10) if("blood") diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index d38830e5e8..b6f91feec7 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -10,7 +10,7 @@ standing_mob = 1 load_item_visible = 1 load_offset_x = 0 - load_offset_y = 8 + load_offset_y = 7 var/car_limit = 3 //how many cars an engine can pull before performance degrades active_engines = 1 @@ -34,7 +34,7 @@ standing_mob = 1 load_item_visible = 1 load_offset_x = 0 - load_offset_y = 5 + load_offset_y = 4 //------------------------------------------- // Standard procs @@ -44,6 +44,8 @@ cell = new /obj/item/weapon/cell/high verbs -= /atom/movable/verb/pull key = new() + var/image/I = new(icon = 'icons/obj/vehicles.dmi', icon_state = "cargo_engine_overlay", layer = src.layer + 0.2) //over mobs + overlays += I /obj/vehicle/train/cargo/engine/Move() if(on && cell.charge < power_use) @@ -248,6 +250,9 @@ if(istype(load, /mob/living/carbon/human)) load.pixel_y += 4 + + if(load) + return 1 /obj/vehicle/train/cargo/engine/load(var/atom/movable/C) if(!ismob(C)) diff --git a/code/modules/vehicles/train.dm b/code/modules/vehicles/train.dm index b7a6706dea..deaed1130c 100644 --- a/code/modules/vehicles/train.dm +++ b/code/modules/vehicles/train.dm @@ -80,7 +80,7 @@ return 1 /obj/vehicle/train/MouseDrop_T(var/atom/movable/C, mob/user as mob) - if(user.buckled || user.stat || user.restrained() || !Adjacent(user) || !user.Adjacent(C)) + if(user.buckled || user.stat || user.restrained() || !Adjacent(user) || !user.Adjacent(C) || !istype(C)) return if(istype(C,/obj/vehicle/train)) latch(C, user) diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index b44f38122e..5e5affac99 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -58,6 +58,8 @@ return 0 /obj/vehicle/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/hand_labeler)) + return if(istype(W, /obj/item/weapon/screwdriver)) if(!locked) open = !open diff --git a/icons/obj/vehicles.dmi b/icons/obj/vehicles.dmi index de24172c3a..e70275591f 100644 Binary files a/icons/obj/vehicles.dmi and b/icons/obj/vehicles.dmi differ