From 292837a24839c408dd6035d8a88911a65f2d7c84 Mon Sep 17 00:00:00 2001 From: Kole6738 Date: Mon, 4 Jan 2016 18:36:32 -0800 Subject: [PATCH 1/3] Prevent flipping a coin if wired Fixes graphical bug #14343 with extreme overkill. If the coin has an attached wire, it won't flip. Someone else might want to instead fix the animation so that the wire moves with the coin. --- code/modules/mining/ores_coins.dm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index d7302441fad..aa160e975c6 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -349,6 +349,10 @@ var/oldloc = loc sleep(15) if(loc == oldloc && user && !user.incapacitated()) - user.visible_message("[user] has flipped [src]. It lands on [coinflip].", \ - "You flip [src]. It lands on [coinflip].", \ - "You hear the clattering of loose change.") \ No newline at end of file + if(string_attached) //does the coin have a wire attached + user << "The coin won't flip very well with something attached!" //call out the user for failing physics 101 + return //do not flip the coin + else + user.visible_message("[user] has flipped [src]. It lands on [coinflip].", \ + "You flip [src]. It lands on [coinflip].", \ + "You hear the clattering of loose change.") From f88595d0733a76cbfe325ee1a453d5b7e14df9f6 Mon Sep 17 00:00:00 2001 From: Kole6738 Date: Tue, 5 Jan 2016 15:25:21 -0800 Subject: [PATCH 2/3] Thanks --- code/modules/mining/ores_coins.dm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index aa160e975c6..71fb8e5c887 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -341,6 +341,10 @@ /obj/item/weapon/coin/attack_self(mob/user) if(cooldown < world.time - 15) + if(string_attached) //does the coin have a wire attached + user << "The coin won't flip very well with something attached!" //Tell user it will not flip + return //do not flip the coin + else var/coinflip = pick(sideslist) cooldown = world.time flick("coin_[cmineral]_flip", src) @@ -349,10 +353,6 @@ var/oldloc = loc sleep(15) if(loc == oldloc && user && !user.incapacitated()) - if(string_attached) //does the coin have a wire attached - user << "The coin won't flip very well with something attached!" //call out the user for failing physics 101 - return //do not flip the coin - else - user.visible_message("[user] has flipped [src]. It lands on [coinflip].", \ - "You flip [src]. It lands on [coinflip].", \ - "You hear the clattering of loose change.") + user.visible_message("[user] has flipped [src]. It lands on [coinflip].", \ + "You flip [src]. It lands on [coinflip].", \ + "You hear the clattering of loose change.") From d20194a546a7c402ada7a954be2dc8e706fd2cd6 Mon Sep 17 00:00:00 2001 From: Kole6738 Date: Tue, 5 Jan 2016 18:28:31 -0800 Subject: [PATCH 3/3] removes else --- code/modules/mining/ores_coins.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index 71fb8e5c887..f3cc75ce5d4 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -344,7 +344,6 @@ if(string_attached) //does the coin have a wire attached user << "The coin won't flip very well with something attached!" //Tell user it will not flip return //do not flip the coin - else var/coinflip = pick(sideslist) cooldown = world.time flick("coin_[cmineral]_flip", src)