From 78942630334fdcffc68e24af5df1057ea2346fc6 Mon Sep 17 00:00:00 2001 From: Ikarrus Date: Sat, 27 Jun 2015 13:33:33 -0600 Subject: [PATCH 1/4] Destructible Clothing Tweaks - Fixes runtime with burning decals without reagents - Adjusts some burnable flags - Removes minimum shred prob() --- code/game/objects/effects/decals/Cleanable/misc.dm | 4 +++- code/game/objects/effects/decals/cleanable.dm | 5 +++-- .../structures/crates_lockers/closets/secure/personal.dm | 1 + .../structures/crates_lockers/closets/secure/security.dm | 1 + code/modules/clothing/shoes/miscellaneous.dm | 3 ++- code/modules/mob/living/carbon/human/inventory.dm | 3 +-- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm index 1a205f1607a..794080ef7c7 100644 --- a/code/game/objects/effects/decals/Cleanable/misc.dm +++ b/code/game/objects/effects/decals/Cleanable/misc.dm @@ -74,9 +74,11 @@ layer = 3 icon = 'icons/effects/effects.dmi' icon_state = "cobweb1" - burn_state = 0 //Burnable burntime = 1 +/obj/effect/decal/cleanable/cobweb/fire_act() + qdel(src) + /obj/effect/decal/cleanable/molten_item name = "gooey grey mass" desc = "It looks like a melted... something." diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index f81ef319ca1..26835a69788 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -37,6 +37,7 @@ ..() /obj/effect/decal/cleanable/fire_act() - reagents.chem_temp += 30 - reagents.handle_reactions() + if(reagents) + reagents.chem_temp += 30 + reagents.handle_reactions() ..() \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm index d3dac41e27d..32e4e24b632 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -25,6 +25,7 @@ /obj/structure/closet/secure_closet/personal/cabinet icon_state = "cabinet" + burn_state = 0 //Burnable /obj/structure/closet/secure_closet/personal/cabinet/New() ..() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 63074fe5145..46adf4137d6 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -155,6 +155,7 @@ name = "\proper detective's cabinet" req_access = list(access_forensics_lockers) icon_state = "cabinet" + burn_state = 0 //Burnable /obj/structure/closet/secure_closet/detective/New() ..() diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 0bebe7a3ee0..58101dca40a 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -29,6 +29,7 @@ item_state = "jackboots" armor = list(melee = 25, bullet = 25, laser = 25, energy = 25, bomb = 50, bio = 10, rad = 0) strip_delay = 70 + burn_state = -1 //Won't burn in fires /obj/item/clothing/shoes/combat/swat //overpowered boots for death squads name = "\improper SWAT boots" @@ -36,7 +37,6 @@ permeability_coefficient = 0.01 flags = NOSLIP armor = list(melee = 40, bullet = 30, laser = 25, energy = 25, bomb = 50, bio = 30, rad = 30) - burn_state = -1 //Won't burn in fires /obj/item/clothing/shoes/sandal desc = "A pair of rather plain, wooden sandals." @@ -86,6 +86,7 @@ item_color = "hosred" strip_delay = 50 put_on_delay = 50 + burn_state = -1 //Won't burn in fires /obj/item/clothing/shoes/winterboots name = "winter boots" diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index a4c1a29a2aa..df383f3e0e5 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -449,7 +449,7 @@ shredded = -1 //Heat protection = Fireproof else if(shock > 0) - if(prob(min(90,max(10,shock)))) + if(prob(min(90,max(0,shock)))) shredded = armor["bomb"] + 10 //It gets shredded, but it also absorbs the shock the clothes underneath would recieve by this amount else shredded = -1 //It survives explosion @@ -463,7 +463,6 @@ Item.loc = src.loc spawn(1) //so the shreds aren't instantly deleted by the explosion var/obj/effect/decal/cleanable/shreds/Shreds = new(loc) - Shreds.name = "shredded [src.name]" Shreds.desc = "The sad remains of what used to be a glorious [src.name]." qdel(src) else From d07e315ddfc218d6c116bf94760da3edd9db6d29 Mon Sep 17 00:00:00 2001 From: Ikarrus Date: Sat, 27 Jun 2015 14:22:38 -0600 Subject: [PATCH 2/4] Squashed --- .../objects/structures/crates_lockers/closets/gimmick.dm | 2 ++ .../structures/crates_lockers/closets/job_closets.dm | 4 +++- .../structures/crates_lockers/closets/secure/bar.dm | 2 ++ .../structures/crates_lockers/closets/secure/personal.dm | 1 + .../structures/crates_lockers/closets/secure/security.dm | 1 + code/modules/clothing/suits/toggles.dm | 7 +++++++ code/modules/mob/living/carbon/human/human_damage.dm | 2 +- code/modules/mob/living/carbon/human/inventory.dm | 2 +- 8 files changed, 18 insertions(+), 3 deletions(-) diff --git a/code/game/objects/structures/crates_lockers/closets/gimmick.dm b/code/game/objects/structures/crates_lockers/closets/gimmick.dm index 1cabfc03243..a0d01834972 100644 --- a/code/game/objects/structures/crates_lockers/closets/gimmick.dm +++ b/code/game/objects/structures/crates_lockers/closets/gimmick.dm @@ -2,6 +2,8 @@ name = "cabinet" desc = "Old will forever be in fashion." icon_state = "cabinet" + burn_state = 0 //Burnable + burntime = 20 /obj/structure/closet/acloset name = "strange closet" diff --git a/code/game/objects/structures/crates_lockers/closets/job_closets.dm b/code/game/objects/structures/crates_lockers/closets/job_closets.dm index 9ac55af828a..302b49a66f4 100644 --- a/code/game/objects/structures/crates_lockers/closets/job_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/job_closets.dm @@ -108,4 +108,6 @@ /obj/structure/closet/coffin name = "coffin" desc = "It's a burial receptacle for the dearly departed." - icon_state = "coffin" \ No newline at end of file + icon_state = "coffin" + burn_state = 0 //Burnable + burntime = 20 \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets/secure/bar.dm b/code/game/objects/structures/crates_lockers/closets/secure/bar.dm index e5d818ca19f..e7c46ced1ce 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/bar.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/bar.dm @@ -2,6 +2,8 @@ name = "booze storage" req_access = list(access_bar) icon_state = "cabinet" + burn_state = 0 //Burnable + burntime = 20 /obj/structure/closet/secure_closet/bar/New() ..() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm index 32e4e24b632..908c05c33d8 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -26,6 +26,7 @@ /obj/structure/closet/secure_closet/personal/cabinet icon_state = "cabinet" burn_state = 0 //Burnable + burntime = 20 /obj/structure/closet/secure_closet/personal/cabinet/New() ..() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 46adf4137d6..ebf2237ca3a 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -156,6 +156,7 @@ req_access = list(access_forensics_lockers) icon_state = "cabinet" burn_state = 0 //Burnable + burntime = 20 /obj/structure/closet/secure_closet/detective/New() ..() diff --git a/code/modules/clothing/suits/toggles.dm b/code/modules/clothing/suits/toggles.dm index 44e2d98abf6..24989946279 100644 --- a/code/modules/clothing/suits/toggles.dm +++ b/code/modules/clothing/suits/toggles.dm @@ -8,6 +8,10 @@ MakeHood() ..() +/obj/item/clothing/suit/hooded/Destroy() + qdel(hood) + ..() + /obj/item/clothing/suit/hooded/proc/MakeHood() if(!hood) var/obj/item/clothing/head/winterhood/W = new hoodtype(src) @@ -93,6 +97,9 @@ verbs -= /obj/item/clothing/suit/space/hardsuit/verb/Jetpack verbs -= /obj/item/clothing/suit/space/hardsuit/verb/Jetpack_Rockets ..() +/obj/item/clothing/suit/space/hardsuit/Destroy() + qdel(helmet) + ..() /obj/item/clothing/suit/space/hardsuit/proc/MakeHelmet() if(!helmettype) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index df2c627615c..48250417654 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -12,7 +12,7 @@ health = maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute if( ((maxHealth - total_burn) < config.health_threshold_dead) && stat == DEAD ) ChangeToHusk() - if(bodytemperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST) + if(on_fire) shred_clothing() med_hud_set_health() med_hud_set_status() diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index df383f3e0e5..297938a075c 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -463,7 +463,7 @@ Item.loc = src.loc spawn(1) //so the shreds aren't instantly deleted by the explosion var/obj/effect/decal/cleanable/shreds/Shreds = new(loc) - Shreds.desc = "The sad remains of what used to be a glorious [src.name]." + Shreds.desc = "The sad remains of what used to be [src.name]." qdel(src) else burn() From 48dedda36bc9a715b08bf78073ebbaf0c43c388c Mon Sep 17 00:00:00 2001 From: Ikarrus Date: Sun, 28 Jun 2015 18:55:34 -0600 Subject: [PATCH 3/4] ABSTRACT items cannot be shredded --- code/modules/mob/living/carbon/human/inventory.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 297938a075c..4bd3d94f560 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -440,6 +440,9 @@ w_uniform.shred(bomb,shock-absorbed,src) /obj/item/proc/shred(var/bomb,var/shock,var/mob/living/carbon/human/Human) + if(flags & ABSTRACT) + return -1 + var/shredded if(!bomb) From 4dbb5feb2d698e0c90fe8c1fbc8f79fb128f2776 Mon Sep 17 00:00:00 2001 From: Ikarrus Date: Sun, 28 Jun 2015 20:29:13 -0600 Subject: [PATCH 4/4] If ex_act(2) is softened by armor, shredding chance gets halved --- code/modules/mob/living/carbon/human/human.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index b99a78d7e9e..b8024eed08d 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -125,11 +125,12 @@ f_loss += 60 - shred_clothing(1,50) - if (prob(getarmor(null, "bomb"))) b_loss = b_loss/1.5 f_loss = f_loss/1.5 + shred_clothing(1,25) + else + shred_clothing(1,50) if (!istype(ears, /obj/item/clothing/ears/earmuffs)) adjustEarDamage(30, 120)