diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 73377d7a517..529ca0b8e11 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -36,6 +36,7 @@ var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit) var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N + var/can_embed = 1//If zero, this item/weapon cannot become embedded in people when you hit them with it var/list/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) var/list/allowed = null //suit storage stuff. var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers. diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 4ac80d56471..c1f31e82c00 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -6,6 +6,7 @@ sharp = 0 edge = 0 flags = NOBLOODY + can_embed = 0//No embedding pls /obj/item/weapon/melee/energy/proc/activate(mob/living/user) anchored = 1 diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index 2e3412ceb8c..47de26179d3 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -31,6 +31,7 @@ attack_verb = list("chopped", "sliced", "shredded", "slashed", "cut", "ripped") hitsound = 'sound/weapons/bladeslice.ogg' var/active = 0 + can_embed = 0//A chainsword can slice through flesh and bone, and the direction can be reversed if it ever did get stuck /obj/item/weapon/melee/chainsword/attack_self(mob/user) active= !active @@ -47,7 +48,8 @@ hitsound = initial(hitsound) icon_state = initial(icon_state) slot_flags = initial(slot_flags) - + user.regenerate_icons() + /obj/item/weapon/melee/chainsword/suicide_act(mob/user) viewers(user) << "\red [user] is slicing \himself apart with the [src.name]! It looks like \he's trying to commit suicide." return (BRUTELOSS|OXYLOSS) diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index 29f4f803bab..59a4dc2dd52 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -214,6 +214,11 @@ if(!do_after(user,cut_delay)) return + + //This prevents runtime errors if someone clicks the same wall more than once + if (!istype(src, /turf/simulated/wall)) + return + user << "You remove the outer plating." dismantle_wall() user.visible_message("The wall was torn open by [user]!") diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index d01561afc62..b5bc4021b4b 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -302,13 +302,15 @@ emp_act if (armor) damage /= armor+1 - //blunt objects should really not be embedding in things unless a huge amount of force is involved - var/embed_chance = weapon_sharp? damage/I.w_class : damage/(I.w_class*3) - var/embed_threshold = weapon_sharp? 5*I.w_class : 15*I.w_class - //Sharp objects will always embed if they do enough damage. - if((weapon_sharp && damage > (10*I.w_class)) || (damage > embed_threshold && prob(embed_chance))) - affecting.embed(I) + if (I.can_embed)//If this weapon is allowed to embed in people + //blunt objects should really not be embedding in things unless a huge amount of force is involved + var/embed_chance = weapon_sharp? damage/I.w_class : damage/(I.w_class*3) + var/embed_threshold = weapon_sharp? 5*I.w_class : 15*I.w_class + + //Sharp objects will always embed if they do enough damage. + if((weapon_sharp && damage > (10*I.w_class)) || (damage > embed_threshold && prob(embed_chance))) + affecting.embed(I) return 1 //this proc handles being hit by a thrown atom diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index 52858b63e4f..ccf0e62bc0f 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -28,7 +28,8 @@ /obj/item/weapon/scalpel/laser3 = 95, \ /obj/item/weapon/scalpel/laser2 = 85, \ /obj/item/weapon/scalpel/laser1 = 75, \ - /obj/item/weapon/melee/energy/sword = 5 + //Removed energy sword from here. with a 5% chance of success, it's a feature nobody ever used anyway + //Energy swords amputate instead now ) priority = 2 min_duration = 90 @@ -283,11 +284,11 @@ target.apply_damage(12, BRUTE, affected, sharp=1) /datum/surgery_step/generic/cauterize - allowed_tools = list( + allowed_tools = list(//Fixed these tool probabilities because they were dumb /obj/item/weapon/cautery = 100, \ - /obj/item/clothing/mask/smokable/cigarette = 75, \ + /obj/item/clothing/mask/smokable/cigarette = 25, \ /obj/item/weapon/flame/lighter = 50, \ - /obj/item/weapon/weldingtool = 25 + /obj/item/weapon/weldingtool = 75 ) min_duration = 70 @@ -322,7 +323,9 @@ /datum/surgery_step/generic/amputate allowed_tools = list( /obj/item/weapon/circular_saw = 100, \ - /obj/item/weapon/material/hatchet = 75 + /obj/item/weapon/melee/energy = 100, \ + /obj/item/weapon/melee/chainsword = 100, \ + /obj/item/weapon/material/hatchet = 55 ) min_duration = 110 @@ -336,20 +339,49 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) if (affected == null) return 0 + + if (istype(tool, /obj/item/weapon/melee/energy)) + var/obj/item/weapon/melee/energy/E = tool + if (!E.active) + user << "\red The energy blade is not turned on!" + return 0 + + if (istype(tool, /obj/item/weapon/melee/chainsword)) + var/obj/item/weapon/melee/chainsword/E = tool + if (!E.active) + user << "\red The blades aren't spinning, you can't cut anything!" + return 0 + return !affected.cannot_amputate begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("[user] is beginning to amputate [target]'s [affected.name] with \the [tool]." , \ - "You are beginning to cut through [target]'s [affected.amputation_point] with \the [tool].") + user.visible_message("[user] is beginning to amputate [target]'s [affected.name] with \the [tool]." , \ + "You begin to cut through [target]'s [affected.amputation_point] with \the [tool].") target.custom_pain("Your [affected.amputation_point] is being ripped apart!",1) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\blue [user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].", \ - "\blue You amputate [target]'s [affected.name] with \the [tool].") - affected.droplimb(1,DROPLIMB_EDGE) + user.visible_message("[user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].", \ + "You amputate [target]'s [affected.name] with \the [tool].") + + var/clean = 1 + if (istype(tool, /obj/item/weapon/melee/chainsword))//Chainswords rip and tear, so the limb removal is not clean + clean = 0 + + var/var/obj/item/organ/external/parent = affected.parent//Cache the parent organ of the limb before we sever it + affected.droplimb(clean,DROPLIMB_EDGE) + + if (istype(tool, /obj/item/weapon/melee/energy))//Code for energy weapons cauterising the cut + spawn(1) + affected = parent + affected.open = 0//Close open wounds + for (var/datum/wound/lost_limb/W in affected.wounds) + W.disinfected = 1//Cleanse the wound of any germs + W.autoheal_cutoff = INFINITY//Allow the wound to auto-heal, regardless of damage + W.max_bleeding_stage = 0//Stop bleeding fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) diff --git a/html/changelogs/Nanako-Swords.yml b/html/changelogs/Nanako-Swords.yml new file mode 100644 index 00000000000..d8e1a4ae461 --- /dev/null +++ b/html/changelogs/Nanako-Swords.yml @@ -0,0 +1,43 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Nanako + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Chainswords now have an improved animation." + - rscadd: "Chainswords and energy blades can no longer get embedded in people." + - rscadd: "Chainswords and energy blades can now be used as surgical tools to amputate limbs. Chainswords are messy. Energy blades will cut clean and cauterize the wound" + - tweak: "Surgery messages about amputating bodyparts are now very noticeable" + - tweak: "Cauterising wounds with a welding tool is much more reliable. Cauterising with a cigarette is no longer effective." + - bugfix: "Fixed chainsword held sprite not updating when toggled" + + \ No newline at end of file diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi index 319b9cf7116..e3a468194f6 100644 Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ