From a852d3f314e335f7d3bb90850b43599d7b12b4a9 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Tue, 10 Jan 2017 18:28:40 -0800 Subject: [PATCH 1/3] Fixes a garrote runtime --- code/game/objects/items/weapons/garrote.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm index 22b589c7517..a48bc19d512 100644 --- a/code/game/objects/items/weapons/garrote.dm +++ b/code/game/objects/items/weapons/garrote.dm @@ -107,6 +107,12 @@ return /obj/item/weapon/twohanded/garrote/process() + if(!strangling) + // Our mark got gibbed or similar + update_icon() + processing_objects.Remove(src) + return + if(!istype(loc, /mob/living/carbon/human)) strangling = null From bfdd22dcd9613dd4434c2c7586c748116659f5f4 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Tue, 10 Jan 2017 18:59:33 -0800 Subject: [PATCH 2/3] Fixes a few limb removal runtimes --- code/modules/surgery/organs/subtypes/standard.dm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/modules/surgery/organs/subtypes/standard.dm b/code/modules/surgery/organs/subtypes/standard.dm index faa6c403355..62ae8c78d66 100644 --- a/code/modules/surgery/organs/subtypes/standard.dm +++ b/code/modules/surgery/organs/subtypes/standard.dm @@ -103,7 +103,7 @@ can_stand = 1 /obj/item/organ/external/foot/remove() - if(owner.shoes) owner.unEquip(owner.shoes) + if(owner && owner.shoes) owner.unEquip(owner.shoes) . = ..() /obj/item/organ/external/foot/right @@ -128,12 +128,13 @@ can_grasp = 1 /obj/item/organ/external/hand/remove() - if(owner.gloves) - owner.unEquip(owner.gloves) - if(owner.l_hand) - owner.unEquip(owner.l_hand,1) - if(owner.r_hand) - owner.unEquip(owner.r_hand,1) + if(owner) + if(owner.gloves) + owner.unEquip(owner.gloves) + if(owner.l_hand) + owner.unEquip(owner.l_hand,1) + if(owner.r_hand) + owner.unEquip(owner.r_hand,1) . = ..() From 3e141ebbb7722736a1857fa431832c4350f9e1ab Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Tue, 10 Jan 2017 19:10:24 -0800 Subject: [PATCH 3/3] Mining drones now are able to use meson sight again Mining drones now can activate mesons --- code/modules/mining/equipment_locker.dm | 34 +++++++++++++++++++------ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index fb98f3a8c15..e573c20840e 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -737,6 +737,7 @@ healable = 0 var/mode = MINEDRONE_COLLECT var/light_on = 0 + var/mesons_active var/datum/action/innate/minedrone/toggle_light/toggle_light_action var/datum/action/innate/minedrone/toggle_meson_vision/toggle_meson_vision_action @@ -863,6 +864,28 @@ mode = MINEDRONE_COLLECT SetCollectBehavior() + +/mob/living/simple_animal/hostile/mining_drone/update_sight() + if(!client) + return + if(stat == DEAD) + grant_death_vision() + return + + if(mesons_active) + sight |= SEE_TURFS + see_invisible = SEE_INVISIBLE_MINIMUM + else + sight &= ~SEE_TURFS + see_invisible = SEE_INVISIBLE_LIVING + + see_in_dark = initial(see_in_dark) + + if(client.eye != src) + var/atom/A = client.eye + if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. + return + //Actions for sentient minebots /datum/action/innate/minedrone @@ -889,15 +912,10 @@ /datum/action/innate/minedrone/toggle_meson_vision/Activate() var/mob/living/simple_animal/hostile/mining_drone/user = owner + user.mesons_active = !user.mesons_active + user.update_sight() - if(user.sight & SEE_TURFS) - user.sight &= ~SEE_TURFS - user.see_invisible = SEE_INVISIBLE_LIVING - else - user.sight |= SEE_TURFS - user.see_invisible = SEE_INVISIBLE_MINIMUM - - to_chat(user, "You toggle your meson vision [(user.sight & SEE_TURFS) ? "on" : "off"].") + to_chat(user, "You toggle your meson vision [(user.mesons_active) ? "on" : "off"].") /datum/action/innate/minedrone/toggle_mode name = "Toggle Mode"