From 622adb4ba5f8cd90b7fc533a9c5ccd0f9eb3b18a Mon Sep 17 00:00:00 2001 From: S34NW <12197162+S34NW@users.noreply.github.com> Date: Fri, 24 Sep 2021 11:07:31 +0100 Subject: [PATCH 1/5] makes uncuttable fences dismantlable --- code/game/objects/structures/fence.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index 21ad71f329f..a8a961d5447 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -3,6 +3,7 @@ #define CUT_TIME 100 #define CLIMB_TIME 150 +#define FULL_CUT_TIME 300 #define NO_HOLE 0 //section is intact #define MEDIUM_HOLE 1 //medium hole in the section - can climb through @@ -89,8 +90,11 @@ if(shock(user, 100)) return if(!cuttable) - to_chat(user, "This section of the fence can't be cut!") - return + if(W.use_tool(src, user, FULL_CUT_TIME * W.toolspeed, volume = W.tool_volume)) + visible_message("\The [user] completely dismantles \the [src].") + to_chat(user, "You completely take apart \the [src].") + qdel(src) + return if(invulnerable) to_chat(user, "This fence is too strong to cut through!") return @@ -208,6 +212,7 @@ #undef CUT_TIME #undef CLIMB_TIME +#undef FULL_CUT_TIME #undef NO_HOLE #undef MEDIUM_HOLE From 215ec7cbe3a479ae2f6e35029b55fe83ee91c96c Mon Sep 17 00:00:00 2001 From: S34NW <12197162+S34NW@users.noreply.github.com> Date: Fri, 24 Sep 2021 11:11:38 +0100 Subject: [PATCH 2/5] return nesting mistake --- code/game/objects/structures/fence.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index a8a961d5447..0cc1bb3014e 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -94,7 +94,7 @@ visible_message("\The [user] completely dismantles \the [src].") to_chat(user, "You completely take apart \the [src].") qdel(src) - return + return if(invulnerable) to_chat(user, "This fence is too strong to cut through!") return From f45117b9fe431f7c15b3dfb524af441e6c32308f Mon Sep 17 00:00:00 2001 From: S34NW <12197162+S34NW@users.noreply.github.com> Date: Fri, 24 Sep 2021 11:41:03 +0100 Subject: [PATCH 3/5] farie review --- code/game/objects/structures/fence.dm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index 0cc1bb3014e..37f5ba560c2 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -89,15 +89,17 @@ . = TRUE if(shock(user, 100)) return - if(!cuttable) - if(W.use_tool(src, user, FULL_CUT_TIME * W.toolspeed, volume = W.tool_volume)) - visible_message("\The [user] completely dismantles \the [src].") - to_chat(user, "You completely take apart \the [src].") - qdel(src) - return if(invulnerable) to_chat(user, "This fence is too strong to cut through!") return + if(!cuttable) + visible_message("[user] starts dismantling [src] with [W].") + to_chat(user, "You start dismantling [src] with [W].") + if(W.use_tool(src, user, FULL_CUT_TIME * W.toolspeed, volume = W.tool_volume)) + visible_message("[user] completely dismantles [src].") + to_chat(user, "You completely dismantle [src].") + qdel(src) + return var/current_stage = hole_size user.visible_message("\The [user] starts cutting through \the [src] with \the [W].",\ "You start cutting through \the [src] with \the [W].") From 01720b93bb0d0872ad08a884e0476414a8bb8488 Mon Sep 17 00:00:00 2001 From: S34NW <12197162+S34NW@users.noreply.github.com> Date: Fri, 24 Sep 2021 12:06:45 +0100 Subject: [PATCH 4/5] farie pt2 --- code/game/objects/structures/fence.dm | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index 37f5ba560c2..edbfb310b49 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -93,30 +93,30 @@ to_chat(user, "This fence is too strong to cut through!") return if(!cuttable) - visible_message("[user] starts dismantling [src] with [W].") - to_chat(user, "You start dismantling [src] with [W].") + user.visible_message("[user] starts dismantling [src] with [W].",\ + "You start dismantling [src] with [W].") if(W.use_tool(src, user, FULL_CUT_TIME * W.toolspeed, volume = W.tool_volume)) - visible_message("[user] completely dismantles [src].") - to_chat(user, "You completely dismantle [src].") + user.visible_message("[user] completely dismantles [src].",\ + "You completely dismantle [src].") qdel(src) return var/current_stage = hole_size - user.visible_message("\The [user] starts cutting through \the [src] with \the [W].",\ - "You start cutting through \the [src] with \the [W].") + user.visible_message("[user] starts cutting through [src] with [W].",\ + "You start cutting through [src] with [W].") if(W.use_tool(src, user, CUT_TIME * W.toolspeed, volume = W.tool_volume)) if(current_stage == hole_size) switch(hole_size) if(NO_HOLE) - visible_message("\The [user] cuts into \the [src] some more.") - to_chat(user, "You could probably fit yourself through that hole now. Although climbing through would be much faster if you made it even bigger.") + user.visible_message("[user] cuts into [src] some more.",\ + "You could probably fit yourself through that hole now. Although climbing through would be much faster if you made it even bigger.") hole_size = MEDIUM_HOLE if(MEDIUM_HOLE) - visible_message("\The [user] completely cuts through \the [src].") - to_chat(user, "The hole in \the [src] is now big enough to walk through.") + user.visible_message("[user] completely cuts through [src].",\ + "The hole in [src] is now big enough to walk through.") hole_size = LARGE_HOLE if(LARGE_HOLE) - visible_message("\The [user] completely dismantles \the [src].") - to_chat(user, "You completely take apart \the [src].") + user.visible_message("[user] completely dismantles [src].",\ + "You completely take apart [src].") qdel(src) return update_cut_status() From 6b36aabfc05ee9409466057bca999aaeec3da63c Mon Sep 17 00:00:00 2001 From: S34N <12197162+S34NW@users.noreply.github.com> Date: Fri, 24 Sep 2021 14:45:23 +0100 Subject: [PATCH 5/5] Update code/game/objects/structures/fence.dm Co-authored-by: Farie82 --- code/game/objects/structures/fence.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index edbfb310b49..103ae32b58c 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -95,7 +95,7 @@ if(!cuttable) user.visible_message("[user] starts dismantling [src] with [W].",\ "You start dismantling [src] with [W].") - if(W.use_tool(src, user, FULL_CUT_TIME * W.toolspeed, volume = W.tool_volume)) + if(W.use_tool(src, user, FULL_CUT_TIME, volume = W.tool_volume)) user.visible_message("[user] completely dismantles [src].",\ "You completely dismantle [src].") qdel(src)