From 2e1d8bfb5b0e12c440c0f0ae115b7b8486245a2a Mon Sep 17 00:00:00 2001 From: Alberyk Date: Fri, 10 Feb 2017 14:11:48 -0200 Subject: [PATCH] Fix invisible chairs and stools created by the staff of animation (#1745) Fix invisible chairs and materials things created by the wizard staff of animation Fixes #1728 --- code/game/machinery/deployable.dm | 7 +++++-- code/modules/mob/living/simple_animal/hostile/mimic.dm | 9 +++------ html/changelogs/alberyk-PR-386.yml | 6 ++++++ 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 html/changelogs/alberyk-PR-386.yml diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 0140a33fe37..56a5ece0182 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -64,7 +64,7 @@ for reference: var/health = 100 var/maxhealth = 100 var/material/material - + /obj/structure/barricade/New(var/newloc, var/material_name) ..(newloc) if(!material_name) @@ -77,7 +77,7 @@ for reference: desc = "This space is blocked off by a barricade made of [material.display_name]." color = material.icon_colour maxhealth = material.integrity - health = maxhealth + health = maxhealth /obj/structure/barricade/get_material() return material @@ -185,18 +185,21 @@ for reference: return else if (istype(W, /obj/item/weapon/wrench)) if (src.health < src.maxhealth) + user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) src.health = src.maxhealth src.emagged = 0 src.req_access = list(access_security) visible_message("[user] repairs \the [src]!") return else if (src.emagged > 0) + user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) src.emagged = 0 src.req_access = list(access_security) visible_message("[user] repairs \the [src]!") return return else + user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) switch(W.damtype) if("fire") src.health -= W.force * 0.75 diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 4764dcd5479..0a5cf895545 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -153,11 +153,8 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca if((istype(O, /obj/item) || istype(O, /obj/structure)) && !is_type_in_list(O, protected_objects)) - O.loc = src - name = O.name - desc = O.desc - icon = O.icon - icon_state = O.icon_state + O.forceMove(src) + appearance = O icon_living = icon_state if(istype(O, /obj/structure)) @@ -192,4 +189,4 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca if(istype(L)) if(prob(15)) L.Weaken(1) - L.visible_message("\the [src] knocks down \the [L]!") \ No newline at end of file + L.visible_message("\the [src] knocks down \the [L]!") diff --git a/html/changelogs/alberyk-PR-386.yml b/html/changelogs/alberyk-PR-386.yml new file mode 100644 index 00000000000..3f4626a00a7 --- /dev/null +++ b/html/changelogs/alberyk-PR-386.yml @@ -0,0 +1,6 @@ +author: Alberyk + +delete-after: True + +changes: + - bugfix: "Fixed chairs, beds and stools animated by the staff of animation having no sprites."