ID:263079
 
Code:
            Click()
if(get_dist(src, usr) > 1) return
var/obj/tool/WC = /obj/tool/Watering_Can
var/obj/tool/H = /obj/tool/Hoe
for(WC in usr.contents)
if(WC.suffix == "Equipped")
src.icon_state = "wet dirt"
src.is_wet = 1
for(H in usr.contents)
if(H.suffix == "Equipped")
src.icon_state = "tilled dirt"
if(src.is_wet == 1)
src.icon_state = "wet tilled dirt"
if(is_night)
src.icon_state = "tilled wet night"


Problem description:
When using the WC, it confuses the icon_states set for H and does "tilled wet night" instead of "wet dirt".

You're setting is_wet to 1, then starting another loop which checks if(is_wet)
In response to Mysame
I just noticed that the spacing was off, *Edits*.

Anyway, that shouldn't matter (now that the spacing is right) because that should only come into effect only when "H" is has the suffix "Equipped", correct? I think so, but I'm tired and not thinking straight right now -_-;.
Pyro_dragons wrote:
Code:
>             Click()
> if(get_dist(src, usr) > 1) return
> var/obj/tool/WC = /obj/tool/Watering_Can
> var/obj/tool/H = /obj/tool/Hoe
> for(WC in usr.contents)
> if(WC.suffix == "Equipped")
> src.icon_state = "wet dirt"
> src.is_wet = 1
> for(H in usr.contents)
> if(H.suffix == "Equipped")
> src.icon_state = "tilled dirt"
> if(src.is_wet == 1)
> src.icon_state = "wet tilled dirt"
> if(is_night)
> src.icon_state = "tilled wet night"

Problem description:
When using the WC, it confuses the icon_states set for H and does "tilled wet night" instead of "wet dirt".


Use RETURN