From 85c2af3871f9e5ee4d39267c435216efc30ac60f Mon Sep 17 00:00:00 2001 From: Chinsky Date: Sat, 1 Dec 2012 09:04:20 +0400 Subject: [PATCH 1/5] Started cleanup of medical stacks code. Removed silly way to get targeted organ. Removed child organs being affected sometimes. --- code/game/objects/items/stacks/medical.dm | 30 +---------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 5df2b005bc6..559d8255d36 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -23,40 +23,12 @@ if (istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M - var/datum/organ/external/affecting = H.get_organ("chest") + var/datum/organ/external/affecting = H.get_organ(check_zone(user.zone_sel.selecting)) if(affecting.status & ORGAN_ROBOT) user << "\red This isn't useful at all on a robotic limb.." return 1 - if(istype(user, /mob/living/carbon/human)) - var/mob/living/carbon/human/user2 = user - affecting = H.get_organ(check_zone(user2.zone_sel.selecting)) - else - if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0) - affecting = H.get_organ("head") - - // If we're targetting arms or legs, also heal the respective hand/foot - if(affecting.name in list("l_arm","r_arm","l_leg","r_leg")) - var/datum/organ/external/child - if(affecting.name == "l_arm") - child = H.get_organ("l_hand") - else if(affecting.name == "r_arm") - child = H.get_organ("r_hand") - else if(affecting.name == "r_leg") - child = H.get_organ("r_foot") - else if(affecting.name == "l_leg") - child = H.get_organ("l_foot") - - if(src.heal_brute) - if(!affecting.bandage() && !child.bandage()) - user << "\red The wounds on this limb have already been bandaged." - return 1 - else if(src.heal_burn) - if(!affecting.salve() && !child.salve()) - user << "\red The wounds on this limb have already been salved." - return 1 - else if(src.heal_brute) if(!affecting.bandage()) user << "\red The wounds on this limb have already been bandaged." From ab440fbf7d164a22db41d544fde6ee87d6cf33a6 Mon Sep 17 00:00:00 2001 From: Chinsky Date: Sat, 1 Dec 2012 18:35:27 +0400 Subject: [PATCH 2/5] Fixed compile error in custom items. Made rigs protect against radiation again. --- code/modules/clothing/spacesuits/rig.dm | 4 ++-- code/modules/customitems/item_defines.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig.dm b/code/modules/clothing/spacesuits/rig.dm index ab04e347fe8..9429e41cb31 100644 --- a/code/modules/clothing/spacesuits/rig.dm +++ b/code/modules/clothing/spacesuits/rig.dm @@ -4,7 +4,7 @@ desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding." icon_state = "rig0-engineering" item_state = "eng_helm" - armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 60) + armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 100) allowed = list(/obj/item/device/flashlight) var/brightness_on = 4 //luminosity when on var/on = 0 @@ -42,7 +42,7 @@ icon_state = "rig-engineering" item_state = "eng_hardsuit" slowdown = 2 - armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 60) + armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 100) allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/satchel,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd) heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 6ee0502c886..8ddc7e68b17 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -529,7 +529,7 @@ desc = "A colorful pair of magboots with the name Susan Harris clearly written on the back." icon = 'custom_items.dmi' icon_state = "atmosmagboots0" - verb/toggle() + toggle() set name = "Toggle Magboots" set category = "Object" set src in usr From 0b614a488ccc8d685f6d8f91da2535f8f1a81d2d Mon Sep 17 00:00:00 2001 From: Chinsky Date: Sun, 2 Dec 2012 00:02:43 +0400 Subject: [PATCH 3/5] Made bandages stop bleeding when applied, not waiting until next 20-tick organ update cycle. --- code/datums/organs/organ_external.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/datums/organs/organ_external.dm b/code/datums/organs/organ_external.dm index 4a89aecf382..d59c2a79315 100644 --- a/code/datums/organs/organ_external.dm +++ b/code/datums/organs/organ_external.dm @@ -214,6 +214,7 @@ proc/bandage() var/rval = 0 + src.status &= ~ORGAN_BLEEDING for(var/datum/wound/W in wounds) if(W.internal) continue rval |= !W.bandaged From 0a9b6f6bbe9ae0f8fa6eebe8458a9df7e4368982 Mon Sep 17 00:00:00 2001 From: Chinsky Date: Sun, 2 Dec 2012 00:03:30 +0400 Subject: [PATCH 4/5] Removed armor suit from Captain's spawn gear --- code/game/jobs/job/captain.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index 3c81adadc97..7303cb0d4dd 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -21,7 +21,7 @@ var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H) U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U) H.equip_to_slot_or_del(U, slot_w_uniform) - H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt) + //H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/captain(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head) From 507dc0c49651cc88e37245fffceea4208fa59931 Mon Sep 17 00:00:00 2001 From: Chinsky Date: Sun, 2 Dec 2012 16:30:24 +0400 Subject: [PATCH 5/5] Better feedback messages and ability to target groin, hands and feet. --- code/game/objects/items/stacks/medical.dm | 50 ++++++++++------------- 1 file changed, 21 insertions(+), 29 deletions(-) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 559d8255d36..63992bde103 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -23,42 +23,34 @@ if (istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M - var/datum/organ/external/affecting = H.get_organ(check_zone(user.zone_sel.selecting)) - + var/datum/organ/external/affecting = H.get_organ(user.zone_sel.selecting) if(affecting.status & ORGAN_ROBOT) user << "\red This isn't useful at all on a robotic limb.." return 1 - if(src.heal_brute) - if(!affecting.bandage()) - user << "\red The wounds on this limb have already been bandaged." - return 1 - else if(src.heal_burn) - if(!affecting.salve()) - user << "\red The wounds on this limb have already been salved." - return 1 + if(src.heal_brute) + if(!affecting.bandage()) + user << "\red The wounds on [M]'s [affecting.display_name] have already been bandaged." + return 1 + else + user.visible_message( "\blue [user] bandages wounds on [M]'s [affecting.display_name].", \ + "\blue You bandage wounds on [M]'s [affecting.display_name]." ) + + else if(src.heal_burn) + if(!affecting.salve()) + user << "\red The wounds on [M]'s [affecting.display_name] have already been salved." + return 1 + else + user.visible_message( "\blue [user] salves wounds on [M]'s [affecting.display_name].", \ + "\blue You salve wounds on [M]'s [affecting.display_name]." ) H.UpdateDamageIcon() - M.updatehealth() else M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2)) + user.visible_message( \ + "\blue [M] has been applied with [src] by [user].", \ + "\blue You apply \the [src] to [M]." \ + ) use(1) - - if (user) - if (M != user) - user.visible_message( \ - "\blue [M] has been applied with [src] by [user].", \ - "\blue You apply \the [src] to [M]." \ - ) - else - var/t_himself = "itself" - if (user.gender == MALE) - t_himself = "himself" - else if (user.gender == FEMALE) - t_himself = "herself" - - user.visible_message( \ - "\blue [M] applied [src] on [t_himself].", \ - "\blue You apply \the [src] on yourself." \ - ) + M.updatehealth()