From 0dfe70fe2b545e2ba2d4e0ec2c733a9bd20513a4 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 3 May 2014 20:08:45 +0930 Subject: [PATCH 1/9] IPC will no longer take damage from walking in glass. Not sure why this was happening beforehand. --- code/game/objects/items/stacks/sheets/glass.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index 0e79b89189..5f1218a4cd 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -285,11 +285,14 @@ playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) if(ishuman(M)) var/mob/living/carbon/human/H = M + + if(H.flags & IS_SYNTHETIC) + return + if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) ) var/datum/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot")) if(affecting.status & ORGAN_ROBOT) return - H.Weaken(3) if(affecting.take_damage(5, 0)) H.UpdateDamageIcon() From 5ef994337b5dca1f20151918a0a5fce95a676769 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 3 May 2014 20:13:20 +0930 Subject: [PATCH 2/9] Fix for previous commit. --- code/game/objects/items/stacks/sheets/glass.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index 5f1218a4cd..4a85328819 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -286,7 +286,7 @@ if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.flags & IS_SYNTHETIC) + if(H.species.flags & IS_SYNTHETIC) return if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) ) From 378e6865d4782ca712f7c39c4b5a73e96cf11773 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 3 May 2014 20:25:36 +0930 Subject: [PATCH 3/9] Attempting to stop IPC from eating and drinking. --- .../reagents/reagent_containers/food/drinks.dm | 12 ++++++++++++ .../reagents/reagent_containers/food/snacks.dm | 16 +++++++++++++++- code/modules/reagents/reagent_containers/pill.dm | 12 ++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index 026338606d..f5ad9391f6 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -27,6 +27,13 @@ return 0 if(M == user) + + if(istype(M,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC) + 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]." if(reagents.total_volume) reagents.trans_to_ingest(M, gulp_size) @@ -35,6 +42,11 @@ return 1 else if( istype(M, /mob/living/carbon/human) ) + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC) + H << "\red They have a monitor for a head, where do you think you're going to put that?" + return + for(var/mob/O in viewers(world.view, user)) O.show_message("\red [user] attempts to feed [M] [src].", 1) if(!do_mob(user, M)) return diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 2cfe2978eb..7d8eca5676 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -37,8 +37,16 @@ M.drop_from_inventory(src) //so icons update :[ del(src) return 0 + if(istype(M, /mob/living/carbon)) - if(M == user) //If you're eating it yourself. + if(M == user) //If you're eating it yourself + + if(istype(M,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC) + H << "\red You have a monitor for a head, where do you think you're going to put that?" + return + . var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25) if (fullness <= 50) M << "\red You hungrily chew out a piece of [src] and gobble it!" @@ -52,6 +60,12 @@ M << "\red You cannot force any more of [src] to go down your throat." return 0 else + if(istype(M,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC) + H << "\red They have a monitor for a head, where do you think you're going to put that?" + return + if(!istype(M, /mob/living/carbon/slime)) //If you're feeding it to someone else. var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25) if (fullness <= (550 * (1 + M.overeatduration / 1000))) diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index fa9149f3ff..1cdcf8cc49 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -20,6 +20,13 @@ return attack(mob/M as mob, mob/user as mob, def_zone) if(M == user) + + if(istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC) + H << "\red You have a monitor for a head, where do you think you're going to put that?" + return + M << "\blue You swallow [src]." M.drop_from_inventory(src) //icon update if(reagents.total_volume) @@ -31,6 +38,11 @@ else if(istype(M, /mob/living/carbon/human) ) + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC) + H << "\red They have a monitor for a head, where do you think you're going to put that?" + return + for(var/mob/O in viewers(world.view, user)) O.show_message("\red [user] attempts to force [M] to swallow [src].", 1) From c526b9c29a95b487f4762e16795c502cebb9ca03 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 3 May 2014 21:09:55 +0930 Subject: [PATCH 4/9] Lousy goddamn indentation. --- .../reagent_containers/food/drinks.dm | 18 +++++++------- .../reagent_containers/food/snacks.dm | 24 +++++++++---------- .../reagents/reagent_containers/pill.dm | 16 ++++++------- 3 files changed, 28 insertions(+), 30 deletions(-) diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index f5ad9391f6..d09acc8e15 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -28,11 +28,11 @@ if(M == user) - if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(H.species.flags & IS_SYNTHETIC) - H << "\red You have a monitor for a head, where do you think you're going to put that?" - return + if(istype(M,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC) + 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]." if(reagents.total_volume) @@ -42,10 +42,10 @@ return 1 else if( istype(M, /mob/living/carbon/human) ) - var/mob/living/carbon/human/H = M - if(H.species.flags & IS_SYNTHETIC) - H << "\red They have a monitor for a head, where do you think you're going to put that?" - return + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC) + H << "\red They have a monitor for a head, where do you think you're going to put that?" + return for(var/mob/O in viewers(world.view, user)) O.show_message("\red [user] attempts to feed [M] [src].", 1) diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 7d8eca5676..89abf284c5 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -39,15 +39,13 @@ return 0 if(istype(M, /mob/living/carbon)) + var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25) if(M == user) //If you're eating it yourself - - if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(H.species.flags & IS_SYNTHETIC) - H << "\red You have a monitor for a head, where do you think you're going to put that?" - return - . - var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25) + if(istype(M,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC) + H << "\red You have a monitor for a head, where do you think you're going to put that?" + return if (fullness <= 50) M << "\red You hungrily chew out a piece of [src] and gobble it!" if (fullness > 50 && fullness <= 150) @@ -61,13 +59,13 @@ return 0 else if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(H.species.flags & IS_SYNTHETIC) - H << "\red They have a monitor for a head, where do you think you're going to put that?" - return + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC) + H << "\red They have a monitor for a head, where do you think you're going to put that?" + return if(!istype(M, /mob/living/carbon/slime)) //If you're feeding it to someone else. - var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25) + if (fullness <= (550 * (1 + M.overeatduration / 1000))) for(var/mob/O in viewers(world.view, user)) O.show_message("\red [user] attempts to feed [M] [src].", 1) diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 1cdcf8cc49..2ada558367 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -22,10 +22,10 @@ if(M == user) if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(H.species.flags & IS_SYNTHETIC) - H << "\red You have a monitor for a head, where do you think you're going to put that?" - return + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC) + H << "\red You have a monitor for a head, where do you think you're going to put that?" + return M << "\blue You swallow [src]." M.drop_from_inventory(src) //icon update @@ -38,10 +38,10 @@ else if(istype(M, /mob/living/carbon/human) ) - var/mob/living/carbon/human/H = M - if(H.species.flags & IS_SYNTHETIC) - H << "\red They have a monitor for a head, where do you think you're going to put that?" - return + var/mob/living/carbon/human/H = M + if(H.species.flags & IS_SYNTHETIC) + H << "\red They have a monitor for a head, where do you think you're going to put that?" + return for(var/mob/O in viewers(world.view, user)) O.show_message("\red [user] attempts to force [M] to swallow [src].", 1) From 25c85d6e2ab113dcf31979285263d086a7bb51d4 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 3 May 2014 21:10:26 +0930 Subject: [PATCH 5/9] Adding some repair procs to cables and welders for IPC use. --- code/game/objects/items/weapons/tools.dm | 27 +++++++++++++++++++++-- code/modules/power/cable.dm | 28 ++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index ad7ec85f14..5f93605169 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -449,11 +449,15 @@ item_state = "crowbar_red" /obj/item/weapon/weldingtool/attack(mob/M as mob, mob/user as mob) + if(hasorgans(M)) + var/datum/organ/external/S = M:organs_by_name[user.zone_sel.selecting] + if (!S) return if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help") return ..() + if(S.brute_dam) S.heal_damage(15,0,0,1) if(user != M) @@ -464,7 +468,26 @@ user.visible_message("\red \The [user] patches some dents on their [S.display_name] with \the [src]",\ "\red You patch some dents on your [S.display_name]",\ "You hear a welder.") - else - user << "Nothing to fix!" + return + + if(istype(M,/mob/living/carbon/human)) + + var/mob/living/carbon/human/H = M + + if(H.species.flags & IS_SYNTHETIC) + + if(H.getFireLoss() > 0) + + if(M == user) + user << "\red You can't repair damage to your own body - it's against OH&S." + return + + user.visible_message("\red \The [user] patches some dents on \the [M] with \the [src]",\ + "\red \The [user] patches some of your dents.",\ + "You hear a welder.") + H.heal_organ_damage(5,0) + return + + user << "Nothing to fix!" else return ..() diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 7456e54915..e1eba818f1 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -638,11 +638,14 @@ obj/structure/cable/proc/cableColor(var/colorC) /obj/item/weapon/cable_coil/attack(mob/M as mob, mob/user as mob) if(hasorgans(M)) + var/datum/organ/external/S = M:get_organ(user.zone_sel.selecting) if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help") return ..() + if(S.burn_dam > 0 && use(1)) S.heal_damage(0,15,0,1) + if(user != M) user.visible_message("\The [user] repairs some burn damage on [M]'s [S.display_name] with \the [src]",\ "\The [user] repairs some burn damage on your [S.display_name]",\ @@ -651,7 +654,28 @@ obj/structure/cable/proc/cableColor(var/colorC) user.visible_message("\The [user] repairs some burn damage on their [S.display_name] with \the [src]",\ "You repair some burn damage on your [S.display_name]",\ "You hear wires being cut.") - else - user << "Nothing to fix!" + + return + + if(istype(M,/mob/living/carbon/human)) + + var/mob/living/carbon/human/H = M + + if(H.species.flags & IS_SYNTHETIC) + + if(H.getFireLoss() > 0) + + if(M == user) + user << "\red You can't repair damage to your own body - it's against OH&S." + return + + user.visible_message("\The [user] repairs some burn damage on [M] with \the [src]",\ + "\The [user] repairs some of your burn damage.",\ + "You hear wires being cut.") + H.heal_organ_damage(0,5) + return + + user << "Nothing to fix!" + else return ..() From 5b32150858a1bd765a88671c6635710bd07a258f Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 3 May 2014 21:21:19 +0930 Subject: [PATCH 6/9] Fixes for previous commit, sigh. --- code/game/objects/items/weapons/tools.dm | 6 +++--- code/modules/power/cable.dm | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 5f93605169..be44827938 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -476,16 +476,16 @@ if(H.species.flags & IS_SYNTHETIC) - if(H.getFireLoss() > 0) + if(H.getBruteLoss() > 0) if(M == user) user << "\red You can't repair damage to your own body - it's against OH&S." return user.visible_message("\red \The [user] patches some dents on \the [M] with \the [src]",\ - "\red \The [user] patches some of your dents.",\ + "\red \You patches some of the dents on \the [M].",\ "You hear a welder.") - H.heal_organ_damage(5,0) + H.heal_overall_damage(5,0) return user << "Nothing to fix!" diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index e1eba818f1..851f1fdf3e 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -670,9 +670,9 @@ obj/structure/cable/proc/cableColor(var/colorC) return user.visible_message("\The [user] repairs some burn damage on [M] with \the [src]",\ - "\The [user] repairs some of your burn damage.",\ + "You repair some of \the [M]'s burn damage.",\ "You hear wires being cut.") - H.heal_organ_damage(0,5) + H.heal_overall_damage(0,5) return user << "Nothing to fix!" From 1a2ad49b8eaef808e7f609bf3c994a0f5b8c4db1 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 3 May 2014 21:27:49 +0930 Subject: [PATCH 7/9] Removed 'You are now sterile' line from groin loss due to spam issues when lost by an IPC as well as general pointlessness. --- code/modules/organs/organ_external.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 5ed7583adf..0444216267 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -515,8 +515,6 @@ This function completely restores a damaged organ to perfect condition. var/obj/organ //Dropped limb object switch(body_part) - if(LOWER_TORSO) - owner << "\red You are now sterile." if(HEAD) if(owner.species.flags & IS_SYNTHETIC) organ= new /obj/item/weapon/organ/head/posi(owner.loc, owner) From 3d693a5f38d48ee7afa227f0d78659517e1fdb1f Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 3 May 2014 21:29:10 +0930 Subject: [PATCH 8/9] Several IPC adjustments. --- code/modules/mob/living/carbon/human/human.dm | 6 +++++- code/modules/mob/living/carbon/human/human_damage.dm | 4 ++++ code/modules/mob/living/carbon/human/life.dm | 6 ++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 9e75b94987..89f3b8eccc 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -63,7 +63,7 @@ hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank") hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank") hud_list[STATUS_HUD_OOC] = image('icons/mob/hud.dmi', src, "hudhealthy") - + ..() @@ -860,6 +860,10 @@ return /mob/living/carbon/human/proc/vomit() + + if(species.flags & IS_SYNTHETIC) + return //Machines don't throw up. + if(!lastpuke) lastpuke = 1 src << "You feel nauseous..." diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index a8a8648476..1b12f62562 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -73,6 +73,10 @@ /mob/living/carbon/human/adjustCloneLoss(var/amount) ..() + + if(species.flags & IS_SYNTHETIC) + return + var/heal_prob = max(0, 80 - getCloneLoss()) var/mut_prob = min(80, getCloneLoss()+10) if (amount > 0) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index a87a505b28..fe535fc897 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -225,6 +225,9 @@ proc/handle_mutations_and_radiation() + if(species.flags & IS_SYNTHETIC) //Robots don't suffer from mutations or radloss. + return + if(getFireLoss()) if((COLD_RESISTANCE in mutations) || (prob(1))) heal_organ_damage(0,1) @@ -249,6 +252,7 @@ radiation = 0 else + if(species.flags & RAD_ABSORB) var/rads = radiation/25 radiation -= rads @@ -258,8 +262,6 @@ adjustToxLoss(-(rads)) updatehealth() return - if(species.flags & IS_SYNTHETIC) - return var/damage = 0 switch(radiation) From 0e39f18763f22fc5f109f3bad9bb23ac012b4b7d Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 3 May 2014 23:17:08 +0930 Subject: [PATCH 9/9] Compile fix. --- code/game/objects/items/weapons/tools.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index be44827938..e434913aee 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -483,7 +483,7 @@ return user.visible_message("\red \The [user] patches some dents on \the [M] with \the [src]",\ - "\red \You patches some of the dents on \the [M].",\ + "\red You patch some of the dents on \the [M].",\ "You hear a welder.") H.heal_overall_damage(5,0) return