From 2d6e01b54742bebc3f8fa7c4652636acbfe0fa12 Mon Sep 17 00:00:00 2001 From: AnturK Date: Tue, 19 May 2015 17:43:47 +0200 Subject: [PATCH 1/3] Fixes statues moving in front of mechs --- code/modules/mob/living/simple_animal/hostile/statue.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 29dcdd93ebc..c35fcf76c67 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -119,6 +119,10 @@ if(M.client && CanAttack(M) && !issilicon(M)) if(!M.eye_blind) return M + for(var/obj/mecha/M in view(world.view + 1, check)) //assuming if you can see them they can see you + if(M.occupant && M.occupant.client) + if(!M.occupant.eye_blind) + return M.occupant return null // Cannot talk From 18dfa26419152f6790018971f95c446eccce570d Mon Sep 17 00:00:00 2001 From: AnturK Date: Tue, 19 May 2015 18:15:47 +0200 Subject: [PATCH 2/3] Fixes renamed wielded items reverting to inital name --- code/game/objects/items/weapons/twohanded.dm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 1eb1666ab39..e86736fbef4 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -31,7 +31,11 @@ if(!wielded || !user) return wielded = 0 force = force_unwielded - name = "[initial(name)]" + var/sf = findtext(name," (Wielded)") + if(sf) + name = copytext(name,1,sf) + else //something wrong + name = "[initial(name)]" update_icon() user << "You are now carrying the [name] with one hand." if(unwieldsound) @@ -51,21 +55,21 @@ return wielded = 1 force = force_wielded - name = "[initial(name)] (Wielded)" + name = "[name] (Wielded)" update_icon() - user << "You grab the [initial(name)] with both hands." + user << "You grab the [name] with both hands." if (wieldsound) playsound(loc, wieldsound, 50, 1) var/obj/item/weapon/twohanded/offhand/O = new(user) ////Let's reserve his other hand~ - O.name = "[initial(name)] - offhand" - O.desc = "Your second grip on the [initial(name)]" + O.name = "[name] - offhand" + O.desc = "Your second grip on the [name]" user.put_in_inactive_hand(O) return /obj/item/weapon/twohanded/mob_can_equip(M as mob, slot) //Cannot equip wielded items. if(wielded) - M << "Unwield the [initial(name)] first!" + M << "Unwield the [name] first!" return 0 return ..() From 8461818c4a01762f6bedf7e5e0bfb2e78a097e9e Mon Sep 17 00:00:00 2001 From: AnturK Date: Tue, 19 May 2015 19:59:34 +0200 Subject: [PATCH 3/3] Fixes statues not being able to attack/move in darkness --- .../mob/living/simple_animal/hostile/statue.dm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index c35fcf76c67..d61fbfa6706 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -81,7 +81,7 @@ GiveTarget(watching) /mob/living/simple_animal/hostile/statue/AttackingTarget() - if(can_be_seen()) + if(can_be_seen(get_turf(loc))) if(client) src << "You cannot attack, there are eyes on you!" return @@ -89,11 +89,11 @@ ..() /mob/living/simple_animal/hostile/statue/DestroySurroundings() - if(!can_be_seen()) + if(!can_be_seen(get_turf(loc))) ..() /mob/living/simple_animal/hostile/statue/face_atom() - if(!can_be_seen()) + if(!can_be_seen(get_turf(loc))) ..() /mob/living/simple_animal/hostile/statue/proc/can_be_seen(var/turf/destination) @@ -102,11 +102,10 @@ // Check for darkness var/turf/T = get_turf(loc) if(T && destination) - // Don't check it twice if our destination is the tile we are on or we can't even get to our destination + if(T.lighting_lumcount<1 && destination.lighting_lumcount<1) // No one can see us in the darkness, right? + return null if(T == destination) destination = null - else if(!T.lighting_lumcount && !destination.lighting_lumcount) // No one can see us in the darkness, right? - return null // We aren't in darkness, loop for viewers. var/list/check_list = list(src)