From a25365cc210acee67b6ea5f2e5bd350e1641b05f Mon Sep 17 00:00:00 2001 From: Miauw Date: Sat, 13 Jun 2015 20:24:52 +0200 Subject: [PATCH 1/3] Several tweaks to AI camera balance: * Camera alarms will now trigger when the first EMP runs out. * Bullets can now damage cameras. * Makes the force required to damage cameras >= 10 instead of > 10. * Adds two camera-related tips. --- code/game/machinery/camera/camera.dm | 9 +++++++-- config/tips.txt | 2 ++ html/changelogs/Miauw-AINerfTweaks.yml | 6 ++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 html/changelogs/Miauw-AINerfTweaks.yml diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index ae2204f9da3..713dbe2c4cc 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -73,6 +73,7 @@ var/thisemp = emped //Take note of which EMP this proc is for spawn(900) if(loc) //qdel limbo + triggerCameraAlarm() //camera alarm triggers even if multiple EMPs are in effect. if(emped == thisemp) //Only fix it if the camera hasn't been EMP'd again network = previous_network icon_state = initial(icon_state) @@ -80,7 +81,6 @@ if(can_use()) cameranet.addCamera(src) emped = 0 //Resets the consecutive EMP count - triggerCameraAlarm() spawn(100) cancelCameraAlarm() for(var/mob/O in mob_list) @@ -226,7 +226,7 @@ L.laser_act(src, user) else - if(W.force > 10) //fairly simplistic, but will do for now. + if(W.force >= 10) //fairly simplistic, but will do for now. user.changeNext_move(CLICK_CD_MELEE) visible_message("[user] hits [src] with [W]!", "You hit [src] with [W]!") health = max(0, health - W.force) @@ -345,6 +345,11 @@ busy = 0 return 0 +/obj/machinery/camera/bullet_act(var/obj/item/projectile/proj) + if(proj.damage_type == BRUTE) + health = max(0, health - proj.damage) + if(!health && status) + deactivate(user, 1) /obj/machinery/camera/portable //Cameras which are placed inside of things, such as helmets. var/turf/prev_turf diff --git a/config/tips.txt b/config/tips.txt index dd6b2f23f85..1aee3639101 100644 --- a/config/tips.txt +++ b/config/tips.txt @@ -85,3 +85,5 @@ You can use . or # instead of : for radio channels. Building this habit reduces While pulling something, clicking on a tile with an empty hand will move it to that tile. No more getting stuck in maint while dragging something! Things that override clicks like decks of cards or paper bins can still be picked up by dragging them to your character. Equipped things that override click can be unequipped by dragging it to an empty hand. In the job selection menu, from the lobby, you can use right click on the "Low/Medium/High" priority button to make it cycle backwards. +If you stay out of camera range for 10 seconds, the AI's track on you will break. +You can shoot cameras with bullets to disable them remotely. diff --git a/html/changelogs/Miauw-AINerfTweaks.yml b/html/changelogs/Miauw-AINerfTweaks.yml new file mode 100644 index 00000000000..925b65cc6de --- /dev/null +++ b/html/changelogs/Miauw-AINerfTweaks.yml @@ -0,0 +1,6 @@ +author: Miauw +delete-after: True +changes: + - tweak: "Bullets can now damage cameras." + - tweak: "Camera alarms now trigger 90 seconds after the first EMP pulse, instead of when all EMP pulses run out." + - tweak: "Makes the force required to damage cameras greater than or equal to ten instead of greater than ten." From 964476ccc983ada721f6b4bc123d9fac75106ae3 Mon Sep 17 00:00:00 2001 From: Miauw Date: Sat, 13 Jun 2015 20:35:30 +0200 Subject: [PATCH 2/3] Some more tweaks: * Camera alarms now trigger on brute-force disabling. * The AI is no longer spammed when tracking people outside range. --- code/game/machinery/camera/camera.dm | 7 ++++--- code/game/machinery/camera/tracking.dm | 10 ++++++---- config/tips.txt | 1 + html/changelogs/Miauw-AINerfTweaks.yml | 1 + 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 713dbe2c4cc..d4b1be398e5 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -8,7 +8,7 @@ active_power_usage = 10 layer = 5 - var/health = 50 + var/health = 30 var/list/network = list("SS13") var/c_tag = null var/c_tag_order = 999 @@ -231,6 +231,7 @@ visible_message("[user] hits [src] with [W]!", "You hit [src] with [W]!") health = max(0, health - W.force) if(!health && status) + triggerCameraAlarm() deactivate(user, 1) return @@ -271,7 +272,6 @@ for(var/mob/living/silicon/S in mob_list) S.triggerAlarm("Camera", get_area(src), list(src), src) - /obj/machinery/camera/proc/cancelCameraAlarm() alarm_on = 0 for(var/mob/living/silicon/S in mob_list) @@ -349,7 +349,8 @@ if(proj.damage_type == BRUTE) health = max(0, health - proj.damage) if(!health && status) - deactivate(user, 1) + triggerCameraAlarm() + deactivate(null, 1) /obj/machinery/camera/portable //Cameras which are placed inside of things, such as helmets. var/turf/prev_turf diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 759082e598b..a7c980a05ef 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -105,16 +105,18 @@ var/cameraticks = 0 spawn(0) - while (U.cameraFollow == target) - if (U.cameraFollow == null) + while(U.cameraFollow == target) + if(U.cameraFollow == null) return - if (!target.can_track(usr)) + if(!target.can_track(usr)) U.tracking = 1 - U << "Target is not near any active cameras." + if(!cameraticks) + U << "Target is not near any active cameras. Attempting to reacquire..." cameraticks++ if(cameraticks > 9) U.cameraFollow = null + U << "Unable to reacquire, cancelling track..." tracking = 0 return else diff --git a/config/tips.txt b/config/tips.txt index 1aee3639101..04ea4ab50d0 100644 --- a/config/tips.txt +++ b/config/tips.txt @@ -87,3 +87,4 @@ Things that override clicks like decks of cards or paper bins can still be picke In the job selection menu, from the lobby, you can use right click on the "Low/Medium/High" priority button to make it cycle backwards. If you stay out of camera range for 10 seconds, the AI's track on you will break. You can shoot cameras with bullets to disable them remotely. +Disabling a camera with wirecutters will not cause a camera alarm, but bludgeoning it will. diff --git a/html/changelogs/Miauw-AINerfTweaks.yml b/html/changelogs/Miauw-AINerfTweaks.yml index 925b65cc6de..02b290595d3 100644 --- a/html/changelogs/Miauw-AINerfTweaks.yml +++ b/html/changelogs/Miauw-AINerfTweaks.yml @@ -4,3 +4,4 @@ changes: - tweak: "Bullets can now damage cameras." - tweak: "Camera alarms now trigger 90 seconds after the first EMP pulse, instead of when all EMP pulses run out." - tweak: "Makes the force required to damage cameras greater than or equal to ten instead of greater than ten." + - tweak: "Camera alarms now trigger when cameras are disabled with brute force or bullets." \ No newline at end of file From a01f5abda90e646651bb1e566ba2a7dc5e85b65f Mon Sep 17 00:00:00 2001 From: Miauw Date: Wed, 17 Jun 2015 19:22:53 +0200 Subject: [PATCH 3/3] Makes disabling cameras actually work. --- code/game/machinery/camera/camera.dm | 5 +++-- code/game/machinery/camera/tracking.dm | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index d4b1be398e5..c6748849914 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -8,7 +8,7 @@ active_power_usage = 10 layer = 5 - var/health = 30 + var/health = 50 var/list/network = list("SS13") var/c_tag = null var/c_tag_order = 999 @@ -230,6 +230,7 @@ user.changeNext_move(CLICK_CD_MELEE) visible_message("[user] hits [src] with [W]!", "You hit [src] with [W]!") health = max(0, health - W.force) + user.do_attack_animation(src) if(!health && status) triggerCameraAlarm() deactivate(user, 1) @@ -245,7 +246,6 @@ else visible_message("\The [src] deactivates!") icon_state = "[initial(icon_state)]1" - else if(user) visible_message("[user] reactivates [src]!") @@ -257,6 +257,7 @@ spawn(100) cancelCameraAlarm() playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) + cameranet.updateChunk(x, y, z) // now disconnect anyone using the camera //Apparently, this will disconnect anyone even if the camera was re-activated. diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index a7c980a05ef..0dfc5d045d0 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -120,6 +120,7 @@ tracking = 0 return else + sleep(10) continue else