From 95ea7c110ce9452ba9b98107f87a09e6e9bd0671 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Fri, 15 May 2015 13:10:50 +0930 Subject: [PATCH 1/3] Fixes several wall issues. --- code/game/turfs/simulated/wall_icon.dm | 14 +++++++++----- code/game/turfs/simulated/walls.dm | 22 +++++++++++++--------- code/modules/materials/materials.dm | 3 +++ 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/code/game/turfs/simulated/wall_icon.dm b/code/game/turfs/simulated/wall_icon.dm index b02311ee98..1adaba850f 100644 --- a/code/game/turfs/simulated/wall_icon.dm +++ b/code/game/turfs/simulated/wall_icon.dm @@ -69,6 +69,7 @@ /turf/simulated/wall/proc/set_material(var/material/newmaterial, var/material/newrmaterial) material = newmaterial reinf_material = newrmaterial + update_material() check_relatives() check_relatives(1) @@ -85,7 +86,10 @@ else set_wall_state("[material.icon_base]fwall_open") - var/overlay = round(damage / material.integrity * damage_overlays.len) + 1 + var/dmg_amt = material.integrity + if(reinf_material) + dmg_amt += reinf_material.integrity + var/overlay = round(damage / dmg_amt * damage_overlays.len) + 1 if(overlay > damage_overlays.len) overlay = damage_overlays.len if(density) @@ -115,11 +119,11 @@ var/turf/simulated/wall/T = get_step(src, checkdir) if(!istype(T) || !T.material) continue - if(T.material && can_join_with(T)) - if(update_self) + if(update_self) + if(can_join_with(T)) junction |= get_dir(src,T) //Not too sure why, but using checkdir just breaks walls. - else - T.check_relatives(1) + else + T.check_relatives(1) if(!isnull(junction)) set_wall_state("[material.icon_base][junction]") return diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 4596512fe4..72df25cfbe 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -144,15 +144,15 @@ var/list/global/wall_cache = list() return ..() -/turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0) +/turf/simulated/wall/proc/dismantle_wall(var/devastated, var/explode, var/no_product) playsound(src, 'sound/items/Welder.ogg', 100, 1) - if(reinf_material) - reinf_material.place_dismantled_girder(src, reinf_material) - reinf_material.place_dismantled_product(src,devastated) - else - material.place_dismantled_girder(src) - material.place_dismantled_product(src,devastated) + if(!no_product) + if(reinf_material) + reinf_material.place_dismantled_girder(src, reinf_material) + else + material.place_dismantled_girder(src) + material.place_dismantled_product(src,devastated) for(var/obj/O in src.contents) //Eject contents! if(istype(O,/obj/structure/sign/poster)) @@ -161,6 +161,11 @@ var/list/global/wall_cache = list() else O.loc = src + clear_plants() + material = name_to_material["placeholder"] + reinf_material = null + check_relatives() + ChangeTurf(/turf/simulated/floor/plating) /turf/simulated/wall/ex_act(severity) @@ -275,6 +280,5 @@ var/list/global/wall_cache = list() ..() /turf/simulated/wall/Destroy() - clear_plants() - check_relatives() + dismantle_wall(null,null,1) ..() \ No newline at end of file diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 04e8d485ba..3c1b3c87c2 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -40,6 +40,9 @@ var/list/name_to_material if(!display_name) display_name = name +/material/placeholder + name = "placeholder" + /material/proc/place_dismantled_girder(var/turf/target, var/material/reinf_material) var/obj/structure/girder/G = new(target) if(reinf_material) From 30cda10bb33b3cb515f912b27130525293284ff3 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Fri, 15 May 2015 13:43:28 +0930 Subject: [PATCH 2/3] Fixes #9226 --- code/modules/hydroponics/spreading/spreading_response.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm index 6a93ecaeea..9d99a212f6 100644 --- a/code/modules/hydroponics/spreading/spreading_response.dm +++ b/code/modules/hydroponics/spreading/spreading_response.dm @@ -13,8 +13,10 @@ spawn(1) entangle(M) -/obj/effect/plant/attack_hand(mob/user as mob) - // Todo, cause damage. +/obj/effect/plant/attack_hand(var/mob/user) + manual_unbuckle(user) + +/obj/effect/plant/attack_generic(var/mob/user) manual_unbuckle(user) /obj/effect/plant/proc/trodden_on(var/mob/living/victim) @@ -76,7 +78,7 @@ if(can_grab) src.visible_message("Tendrils lash out from \the [src] and drag \the [victim] in!") victim.loc = src.loc - + //entangling people if(victim.loc == src.loc) buckle_mob(victim) From fe3f16995997796bd91441b93c588059aaaa45a3 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Fri, 15 May 2015 13:53:01 +0930 Subject: [PATCH 3/3] Fixes #9234 --- code/modules/hydroponics/seed_machines.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index 864b56cc28..b1d3134344 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -88,7 +88,7 @@ if(S.seed && S.seed.get_trait(TRAIT_IMMUTABLE) > 0) user << "That seed is not compatible with our genetics technology." else - user.remove_from_mob(W) + user.drop_from_inventory(W) W.loc = src seed = W user << "You load [W] into [src]." @@ -120,7 +120,7 @@ user << "That disk does not have any gene data loaded." return - user.remove_from_mob(W) + user.drop_from_inventory(W) W.loc = src loaded_disk = W user << "You load [W] into [src]."