diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 2ab4f72bd2..69b6e97533 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -99,14 +99,14 @@ /obj/item/stack/proc/produce_recipe(datum/stack_recipe/recipe, var/quantity, mob/user) var/required = quantity*recipe.req_amount var/produced = min(quantity*recipe.res_amount, recipe.max_res_amount) - + if (!can_use(required)) if (produced>1) user << "\red You haven't got enough [src] to build \the [produced] [recipe.title]\s!" else user << "\red You haven't got enough [src] to build \the [recipe.title]!" return - + if (recipe.one_per_turf && (locate(recipe.result_type) in user.loc)) user << "\red There is another [recipe.title] here!" return @@ -114,21 +114,21 @@ if (recipe.on_floor && !isfloor(user.loc)) user << "\red \The [recipe.title] must be constructed on the floor!" return - + if (recipe.time) user << "\blue Building [recipe.title] ..." if (!do_after(user, recipe.time)) return - + if (use(required)) var/atom/O = new recipe.result_type(user.loc) O.set_dir(user.dir) O.add_fingerprint(user) - + if (istype(O, /obj/item/stack)) var/obj/item/stack/S = O S.amount = produced - + if (istype(O, /obj/item/weapon/storage)) //BubbleWrap - so newly formed boxes are empty for (var/obj/item/I in O) del(I) @@ -148,12 +148,12 @@ if (href_list["sublist"]) var/datum/stack_recipe_list/srl = recipes_list[text2num(href_list["sublist"])] recipes_list = srl.recipes - + var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])] var/multiplier = text2num(href_list["multiplier"]) if (!multiplier || (multiplier <= 0)) //href exploit protection return - + src.produce_recipe(R, multiplier, usr) if (src && usr.machine==src) //do not reopen closed window @@ -189,7 +189,7 @@ return 1 /* - The transfer and split procs work differently than use() and add(). + The transfer and split procs work differently than use() and add(). Whereas those procs take no action if the desired amount cannot be added or removed these procs will try to transfer whatever they can. They also remove an equal amount from the source stack. */ @@ -209,7 +209,10 @@ if (transfer && src.use(transfer)) S.add(transfer) if (prob(transfer/orig_amount * 100)) - S.copy_evidences(src) + transfer_fingerprints_to(S) + if(blood_DNA) + S.blood_DNA |= blood_DNA + //todo bloody overlay return transfer return 0 @@ -217,14 +220,16 @@ /obj/item/stack/proc/split(var/tamount) if (!amount) return null - + var/transfer = max(min(tamount, src.amount, initial(max_amount)), 0) - + var/orig_amount = src.amount if (transfer && src.use(transfer)) var/obj/item/stack/newstack = new src.type(loc, transfer) if (prob(transfer/orig_amount * 100)) - newstack.copy_evidences(src) + transfer_fingerprints_to(newstack) + if(blood_DNA) + newstack.blood_DNA |= blood_DNA return newstack return null @@ -272,13 +277,6 @@ src.interact(usr) else return ..() -/obj/item/stack/proc/copy_evidences(obj/item/stack/from as obj) - src.blood_DNA |= from.blood_DNA - src.fingerprints |= from.fingerprints - src.fingerprintshidden |= from.fingerprintshidden - src.fingerprintslast = from.fingerprintslast - //TODO bloody overlay - /* * Recipe datum */ diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index e29860dc2c..0de1036209 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -9,6 +9,8 @@ /obj/item/weapon/melee/energy/proc/activate(mob/living/user) anchored = 1 + if(active) + return active = 1 force = active_force throwforce = active_throwforce @@ -19,13 +21,15 @@ /obj/item/weapon/melee/energy/proc/deactivate(mob/living/user) anchored = 0 + if(!active) + return + playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) active = 0 force = initial(force) throwforce = initial(throwforce) sharp = initial(sharp) edge = initial(edge) w_class = initial(w_class) - playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) /obj/item/weapon/melee/energy/attack_self(mob/living/user as mob) if (active) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index ca17213bbb..dd0d073cd2 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -169,6 +169,16 @@ return 0 return 1 +/obj/item/weapon/rig/proc/reset() + offline = 2 + canremove = 1 + for(var/obj/item/piece in list(helmet,boots,gloves,chest)) + if(!piece) continue + piece.icon_state = "[initial(icon_state)]" + piece.flags &= ~STOPSPRESSUREDMAGE + piece.flags &= ~AIRTIGHT + update_icon(1) + /obj/item/weapon/rig/proc/toggle_seals(var/mob/living/carbon/human/M,var/instant) if(sealing) return @@ -281,10 +291,6 @@ piece.flags |= AIRTIGHT update_icon(1) - if(instant && air_supply) - wearer.internals = air_supply - wearer.internals.icon_state = "internal1" - /obj/item/weapon/rig/process() // If we've lost any parts, grab them back. diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 362d3827ba..c2f7adc171 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -557,8 +557,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(src.invisibility != 0) user.visible_message( \ - "[user] drags ghost, [src], to our plan of reality!", \ - "You drag [src] to our plan of reality!" \ + "[user] drags ghost, [src], to our plane of reality!", \ + "You drag [src] to our plane of reality!" \ ) toggle_visibility(1) else diff --git a/code/modules/mob/living/carbon/alien/alien_attacks.dm b/code/modules/mob/living/carbon/alien/alien_attacks.dm index 4957a2d95f..4285f91c3f 100644 --- a/code/modules/mob/living/carbon/alien/alien_attacks.dm +++ b/code/modules/mob/living/carbon/alien/alien_attacks.dm @@ -31,6 +31,7 @@ M.put_in_active_hand(G) grabbed_by += G + G.affecting = src G.synch() LAssailant = M diff --git a/code/modules/mob/living/carbon/alien/diona/diona.dm b/code/modules/mob/living/carbon/alien/diona/diona.dm index fd5a80de66..5faeadbdcc 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona.dm @@ -14,4 +14,21 @@ ..() species = all_species["Diona"] - verbs += /mob/living/carbon/alien/diona/proc/merge \ No newline at end of file + verbs += /mob/living/carbon/alien/diona/proc/merge + +/mob/living/carbon/alien/diona/start_pulling(var/atom/movable/AM) + //TODO: Collapse these checks into one proc (see pai and drone) + if(istype(AM,/obj/item)) + var/obj/item/O = AM + if(O.w_class > 2) + src << "You are too small to pull that." + return + else + ..() + else + src << "You are too small to pull that." + return + +/mob/living/carbon/alien/diona/put_in_hands(var/obj/item/W) // No hands. + W.loc = get_turf(src) + return 1 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a37933f57f..4916d801c3 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -946,12 +946,13 @@ // This will ignore any prosthetics in the prefs currently. species.create_organs(src) - for (var/obj/item/organ/brain/H in world) - if(H.brainmob) - if(H.brainmob.real_name == src.real_name) - if(H.brainmob.mind) - H.brainmob.mind.transfer_to(src) - del(H) + if(!client || !key) //Don't boot out anyone already in the mob. + for (var/obj/item/organ/brain/H in world) + if(H.brainmob) + if(H.brainmob.real_name == src.real_name) + if(H.brainmob.mind) + H.brainmob.mind.transfer_to(src) + del(H) for(var/datum/organ/internal/I in internal_organs) I.damage = 0 diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index f9bc6ee4ff..545fa41c03 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -417,8 +417,55 @@ for(var/mob/O in viewers(target, null)) O.show_message("\red [source] is trying to put \a [item] on [target]", 1) else - var/message=null + + var/target_part = null + var/obj/item/target_item = null + var/message = null + switch(place) + if("mask") + target_part = "head" + target_item = target.wear_mask + if("l_hand") + target_part = "left hand" + target_item = target.l_hand + if("r_hand") + target_part = "right hand" + target_item = target.r_hand + if("gloves") + target_part = "hands" + target_item = target.gloves + if("eyes") + target_part = "eyes" + target_item = target.glasses + if("l_ear") + target_part = "left ear" + target_item = target.l_ear + if("r_ear") + target_part = "right ear" + target_item = target.r_ear + if("head") + target_part = "head" + target_item = target.head + if("shoes") + target_part = "feet" + target_item = target.shoes + if("belt") + target_part = "waist" + target_item = target.belt + if("suit") + target_part = "body" + target_item = target.wear_suit + if("back") + target_part = "back" + target_item = target.back + if("s_store") + target_part = "suit" + target_item = target.s_store + if("id") + target_part = "uniform" + target_item = target.wear_id + if("syringe") message = "\red [source] is trying to inject [target]!" if("pill") @@ -427,86 +474,17 @@ message = "\red [source] is trying to force [target] to swallow a gulp of [item]!" if("dnainjector") message = "\red [source] is trying to inject [target] with the [item]!" - if("mask") - target.attack_log += text("\[[time_stamp()]\] Had their mask removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) mask") - if(target.wear_mask && !target.wear_mask.canremove) - message = "\red [source] fails to take off \a [target.wear_mask] from [target]'s head!" + if("uniform") + target.attack_log += text("\[[time_stamp()]\] Has had their uniform ([target.w_uniform]) removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) uniform ([target.w_uniform])") + if(target.w_uniform && !target.w_uniform.canremove) + message = "\red [source] fails to take off \a [target.w_uniform] from [target]'s body!" return else - message = "\red [source] is trying to take off \a [target.wear_mask] from [target]'s head!" - if("l_hand") - target.attack_log += text("\[[time_stamp()]\] Has had their left hand item ([target.l_hand]) removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) left hand item ([target.l_hand])") - message = "\red [source] is trying to take off \a [target.l_hand] from [target]'s left hand!" - if("r_hand") - target.attack_log += text("\[[time_stamp()]\] Has had their right hand item ([target.r_hand]) removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) right hand item ([target.r_hand])") - message = "\red [source] is trying to take off \a [target.r_hand] from [target]'s right hand!" - if("gloves") - target.attack_log += text("\[[time_stamp()]\] Has had their gloves ([target.gloves]) removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) gloves ([target.gloves])") - if(target.gloves && !target.gloves.canremove) - message = "\red [source] fails to take off \a [target.gloves] from [target]'s hands!" - return - else - message = "\red [source] is trying to take off the [target.gloves] from [target]'s hands!" - if("eyes") - target.attack_log += text("\[[time_stamp()]\] Has had their eyewear ([target.glasses]) removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) eyewear ([target.glasses])") - if(target.glasses && !target.glasses.canremove) - message = "\red [source] fails to take off \a [target.glasses] from [target]'s eyes!" - return - else - message = "\red [source] is trying to take off the [target.glasses] from [target]'s eyes!" - if("l_ear") - target.attack_log += text("\[[time_stamp()]\] Has had their left ear item ([target.l_ear]) removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) left ear item ([target.l_ear])") - if(target.l_ear && !target.l_ear.canremove) - message = "\red [source] fails to take off \a [target.l_ear] from [target]'s left ear!" - return - else - message = "\red [source] is trying to take off the [target.l_ear] from [target]'s left ear!" - if("r_ear") - target.attack_log += text("\[[time_stamp()]\] Has had their right ear item ([target.r_ear]) removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) right ear item ([target.r_ear])") - if(target.r_ear && !target.r_ear.canremove) - message = "\red [source] fails to take off \a [target.r_ear] from [target]'s right ear!" - return - else - message = "\red [source] is trying to take off the [target.r_ear] from [target]'s right ear!" - if("head") - target.attack_log += text("\[[time_stamp()]\] Has had their hat ([target.head]) removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) hat ([target.head])") - if(target.head && !target.head.canremove) - message = "\red [source] fails to take off \a [target.head] from [target]'s head!" - return - else - message = "\red [source] is trying to take off the [target.head] from [target]'s head!" - if("shoes") - target.attack_log += text("\[[time_stamp()]\] Has had their shoes ([target.shoes]) removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) shoes ([target.shoes])") - if(target.shoes && !target.shoes.canremove) - message = "\red [source] fails to take off \a [target.shoes] from [target]'s feet!" - return - else - message = "\red [source] is trying to take off the [target.shoes] from [target]'s feet!" - if("belt") - target.attack_log += text("\[[time_stamp()]\] Has had their belt item ([target.belt]) removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) belt item ([target.belt])") - message = "\red [source] is trying to take off the [target.belt] from [target]'s belt!" - if("suit") - target.attack_log += text("\[[time_stamp()]\] Has had their suit ([target.wear_suit]) removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) suit ([target.wear_suit])") - if(target.wear_suit && !target.wear_suit.canremove) - message = "\red [source] fails to take off \a [target.wear_suit] from [target]'s body!" - return - else - message = "\red [source] is trying to take off \a [target.wear_suit] from [target]'s body!" - if("back") - target.attack_log += text("\[[time_stamp()]\] Has had their back item ([target.back]) removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) back item ([target.back])") - message = "\red [source] is trying to take off \a [target.back] from [target]'s back!" + message = "\red [source] is trying to take off \a [target.w_uniform] from [target]'s body!" + for(var/obj/item/I in list(target.l_store, target.r_store)) + if(I.on_found(source)) + return if("handcuff") target.attack_log += text("\[[time_stamp()]\] Was unhandcuffed by [source.name] ([source.ckey])") source.attack_log += text("\[[time_stamp()]\] Attempted to unhandcuff [target.name]'s ([target.ckey])") @@ -515,17 +493,6 @@ target.attack_log += text("\[[time_stamp()]\] Was unlegcuffed by [source.name] ([source.ckey])") source.attack_log += text("\[[time_stamp()]\] Attempted to unlegcuff [target.name]'s ([target.ckey])") message = "\red [source] is trying to unlegcuff [target]!" - if("uniform") - target.attack_log += text("\[[time_stamp()]\] Has had their uniform ([target.w_uniform]) removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) uniform ([target.w_uniform])") - for(var/obj/item/I in list(target.l_store, target.r_store)) - if(I.on_found(source)) - return - if(target.w_uniform && !target.w_uniform.canremove) - message = "\red [source] fails to take off \a [target.w_uniform] from [target]'s body!" - return - else - message = "\red [source] is trying to take off \a [target.w_uniform] from [target]'s body!" if("tie") var/obj/item/clothing/under/suit = target.w_uniform target.attack_log += text("\[[time_stamp()]\] Has had their accessory ([suit.hastie]) removed by [source.name] ([source.ckey])") @@ -537,10 +504,6 @@ return else message = "\red [source] is trying to take off \a [suit.hastie] from [target]'s suit!" - if("s_store") - target.attack_log += text("\[[time_stamp()]\] Has had their suit storage item ([target.s_store]) removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) suit storage item ([target.s_store])") - message = "\red [source] is trying to take off \a [target.s_store] from [target]'s suit!" if("pockets") target.attack_log += text("\[[time_stamp()]\] Has had their pockets emptied by [source.name] ([source.ckey])") source.attack_log += text("\[[time_stamp()]\] Attempted to empty [target.name]'s ([target.ckey]) pockets") @@ -553,10 +516,6 @@ del(src) target.cpr_time = 0 message = "\red [source] is trying perform CPR on [target]!" - if("id") - target.attack_log += text("\[[time_stamp()]\] Has had their ID ([target.wear_id]) removed by [source.name] ([source.ckey])") - source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) ID ([target.wear_id])") - message = "\red [source] is trying to take off [target.wear_id] from [target]'s uniform!" if("internal") target.attack_log += text("\[[time_stamp()]\] Has had their internals toggled by [source.name] ([source.ckey])") source.attack_log += text("\[[time_stamp()]\] Attempted to toggle [target.name]'s ([target.ckey]) internals") @@ -575,8 +534,18 @@ return message = "\red [source] is trying to set [target]'s suit sensors!" - for(var/mob/M in viewers(target, null)) - M.show_message(message, 1) + if(target_item) + target.attack_log += text("\[[time_stamp()]\] Had their [target_item] removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) [target_item]") + + if(target_item.canremove) + message = "[source] is trying to take off \a [target_item] from [target]'s [target_part]!" + else + source.visible_message("[source] fails to take off \a [target_item] from [target]'s [target_part]!") + return + + source.visible_message(message) + spawn( HUMAN_STRIP_DELAY ) done() return diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 7201cfc8e4..3f89f5b230 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -12,8 +12,14 @@ message = trim_strip_html_properly(message) - if(stat == 2) - return say_dead(message) + if(stat) + if(stat == 2) + return say_dead(message) + return + + if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle)) + src << "You're muzzled and cannot speak!" + return var/message_mode = parse_message_mode(message, "headset") @@ -52,9 +58,6 @@ if(ending=="?") verb="asks" - if (istype(wear_mask, /obj/item/clothing/mask/muzzle)) - return - message = trim(message) if(speech_problem_flag) @@ -63,7 +66,7 @@ verb = handle_r[2] speech_problem_flag = handle_r[3] - if(!message || stat) + if(!message || message == "") return var/list/obj/item/used_radios = new @@ -265,45 +268,46 @@ return verb /mob/living/carbon/human/proc/handle_speech_problems(var/message) + var/list/returns[3] var/verb = "says" var/handled = 0 - if(silent) + if(silent || (sdisabilities & MUTE)) message = "" handled = 1 - if(sdisabilities & MUTE) - message = "" - handled = 1 - if(wear_mask) - if(istype(wear_mask, /obj/item/clothing/mask/horsehead)) - var/obj/item/clothing/mask/horsehead/hoers = wear_mask - if(hoers.voicechange) - if(mind && mind.changeling && department_radio_keys[copytext(message, 1, 3)] != "changeling") - message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!") - verb = pick("whinnies","neighs", "says") - handled = 1 + if(istype(wear_mask, /obj/item/clothing/mask/horsehead)) + var/obj/item/clothing/mask/horsehead/hoers = wear_mask + if(hoers.voicechange) + if(mind && mind.changeling && department_radio_keys[copytext(message, 1, 3)] != "changeling") + message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!") + verb = pick("whinnies","neighs", "says") + handled = 1 - if((HULK in mutations) && health >= 25 && length(message)) - message = "[uppertext(message)]!!!" - verb = pick("yells","roars","hollers") - handled = 1 - if(slurring) - message = slur(message) - verb = pick("stammers","stutters") - handled = 1 - - var/braindam = getBrainLoss() - if(braindam >= 60) - handled = 1 - if(prob(braindam/4)) + if(message != "") + if((HULK in mutations) && health >= 25 && length(message)) + message = "[uppertext(message)]!!!" + verb = pick("yells","roars","hollers") + handled = 1 + if(slurring) + message = slur(message) + verb = pick("slobbers","slurs") + handled = 1 + if(stuttering) message = stutter(message) - verb = pick("stammers", "stutters") - if(prob(braindam)) - message = uppertext(message) - verb = pick("yells like an idiot","says rather loudly") + verb = pick("stammers","stutters") + handled = 1 + + var/braindam = getBrainLoss() + if(braindam >= 60) + handled = 1 + if(prob(braindam/4)) + message = stutter(message) + verb = pick("stammers", "stutters") + if(prob(braindam)) + message = uppertext(message) + verb = "yells loudly" returns[1] = message returns[2] = verb returns[3] = handled - return returns diff --git a/code/modules/mob/living/carbon/human/whisper.dm b/code/modules/mob/living/carbon/human/whisper.dm index 0c6b9e147f..0c9882b215 100644 --- a/code/modules/mob/living/carbon/human/whisper.dm +++ b/code/modules/mob/living/carbon/human/whisper.dm @@ -5,7 +5,7 @@ if(say_disabled) //This is here to try to identify lag problems usr << "\red Speech is currently admin-disabled." return - + message = trim_strip_html_properly(message) log_whisper("[src.name]/[src.key] : [message]") @@ -36,6 +36,11 @@ //This is used by both the whisper verb and human/say() to handle whispering /mob/living/carbon/human/proc/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers") + + if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle)) + src << "You're muzzled and cannot speak!" + return + var/message_range = 1 var/eavesdropping_range = 2 var/watching_range = 5 @@ -55,17 +60,19 @@ message = capitalize(trim(message)) - //TODO: handle_speech_problems for silent - if (!message || silent || miming) - return + if(speech_problem_flag) + var/list/handle_r = handle_speech_problems(message) + message = handle_r[1] + verb = handle_r[2] + if(verb == "yells loudly") + verb = "slurs emphatically" + else + var/adverb = pick("quietly", "softly") + verb = "[verb] [adverb]" - // Mute disability - //TODO: handle_speech_problems - if (src.sdisabilities & MUTE) - return + speech_problem_flag = handle_r[3] - //TODO: handle_speech_problems - if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle)) + if(!message || message=="") return //looks like this only appears in whisper. Should it be elsewhere as well? Maybe handle_speech_problems? @@ -102,10 +109,6 @@ message = replacetext(message, "u", "µ") message = replacetext(message, "b", "ß") - //TODO: handle_speech_problems - if (src.stuttering) - message = stutter(message) - var/list/listening = hearers(message_range, src) listening |= src diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 10de649a79..a334809a37 100755 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -390,6 +390,9 @@ ..() else src << "You are too small to pull that." + else + src << "You are too small to pull that." + return // No binary for pAIs. /mob/living/silicon/pai/binarycheck() diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 491d5cdf74..74f6c85eb9 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -372,3 +372,7 @@ message = capitalize(trim_left(message)) ..(message, null, verb) + +/mob/living/simple_animal/put_in_hands(var/obj/item/W) // No hands. + W.loc = get_turf(src) + return 1 \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 1d0150ecf6..5088f98108 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -844,7 +844,6 @@ note dizziness decrements automatically in the mob's Life() proc. if(stat==2) return 0 if(anchored) return 0 if(monkeyizing) return 0 - if(restrained()) return 0 return 1 //Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it. diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index f6d5de69cb..0882531ab6 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -769,7 +769,7 @@ Note that amputating the affected organ does in fact remove the infection from t return 0 //ORGAN_BROKEN doesn't have the same meaning for robot limbs if(brute_dam > min_broken_damage * config.organ_health_multiplier) return 0 //will just immediately fracture again - + status &= ~ORGAN_BROKEN return 1 @@ -1131,7 +1131,9 @@ obj/item/weapon/organ/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/weapon/hemostat)) if(contents.len) var/obj/item/removing = pick(contents) - removing.loc = src.loc + removing.loc = get_turf(user.loc) + if(!(user.l_hand && user.r_hand)) + user.put_in_hands(removing) if(istype(removing,/obj/item/organ)) var/obj/item/organ/removed_organ = removing organs_internal -= removed_organ.organ_data diff --git a/code/modules/surgery/implant.dm b/code/modules/surgery/implant.dm index bb7d25046a..32546da143 100644 --- a/code/modules/surgery/implant.dm +++ b/code/modules/surgery/implant.dm @@ -198,12 +198,13 @@ if(worm.controlling) target.release_control() worm.detatch() - - obj.loc = get_turf(target) - if(istype(obj,/obj/item/weapon/implant)) - var/obj/item/weapon/implant/imp = obj - imp.imp_in = null - imp.implanted = 0 + worm.leave_host() + else + obj.loc = get_turf(target) + if(istype(obj,/obj/item/weapon/implant)) + var/obj/item/weapon/implant/imp = obj + imp.imp_in = null + imp.implanted = 0 else user.visible_message("\blue [user] removes \the [tool] from [target]'s [affected.display_name].", \ "\blue There's something inside [target]'s [affected.display_name], but you just missed it this time." ) diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index ccd9d388e2..c954c16de6 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -169,3 +169,43 @@ "\red Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!") //no damage or anything, just wastes medicine + +/datum/surgery_step/hardsuit + allowed_tools = list( + /obj/item/weapon/weldingtool = 80, + /obj/item/weapon/circular_saw = 60, + /obj/item/weapon/pickaxe/plasmacutter = 100 + ) + + can_infect = 0 + blood_level = 0 + + min_duration = 120 + max_duration = 180 + + can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + if(!istype(target)) + return 0 + if(istype(tool,/obj/item/weapon/weldingtool)) + var/obj/item/weapon/weldingtool/welder = tool + if(!welder.isOn()) + return 0 + return (target_zone == "chest") && istype(target.back, /obj/item/weapon/rig) && !(target.back.canremove) + + begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] starts cutting through the support systems of [target]'s [target.back] with \the [tool]." , \ + "You start cutting through the support systems of [target]'s [target.back] with \the [tool].") + ..() + + end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + + var/obj/item/weapon/rig/rig = target.back + if(!istype(rig)) + return + rig.reset() + user.visible_message("[user] has cut through the support systems of [target]'s [rig] with \the [tool].", \ + "You have cut through the support systems of [target]'s [rig] with \the [tool].") + + fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user]'s [tool] can't quite seem to get through the metal...", \ + "Your [tool] can't quite seem to get through the metal. It's weakening, though - try again.") \ No newline at end of file diff --git a/html/changelog.html b/html/changelog.html index c5c115f383..b534169136 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,15 @@ should be listed in the changelog upon commit though. Thanks. --> +