diff --git a/code/datums/ai/basic_mobs/basic_subtrees/flee_target.dm b/code/datums/ai/basic_mobs/basic_subtrees/flee_target.dm index 3d593286484512..dcd1c54c71b1bd 100644 --- a/code/datums/ai/basic_mobs/basic_subtrees/flee_target.dm +++ b/code/datums/ai/basic_mobs/basic_subtrees/flee_target.dm @@ -10,7 +10,7 @@ /datum/ai_planning_subtree/flee_target/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick) . = ..() var/atom/flee_from = controller.blackboard[target_key] - if (controller.blackboard[BB_BASIC_MOB_STOP_FLEEING] || QDELETED(flee_from)) + if(!should_flee(controller, flee_from)) return if(!should_flee(controller, flee_from)) return diff --git a/code/game/machinery/scanner_gate.dm b/code/game/machinery/scanner_gate.dm index 34f3ceb2ad2abc..ce5158828ca06a 100644 --- a/code/game/machinery/scanner_gate.dm +++ b/code/game/machinery/scanner_gate.dm @@ -17,7 +17,7 @@ #define SCANGATE_POD "pod" #define SCANGATE_GOLEM "golem" #define SCANGATE_ZOMBIE "zombie" -//SKYRAT EDIT BEGIN - MORE SCANNER GATE OPTIONS +//SKYRAT EDIT ADDITION BEGIN - MORE SCANNER GATE OPTIONS #define SCANGATE_MAMMAL "mammal" #define SCANGATE_VOX "vox" #define SCANGATE_AQUATIC "aquatic" @@ -30,9 +30,8 @@ #define SCANGATE_TESHARI "teshari" #define SCANGATE_HEMOPHAGE "hemophage" #define SCANGATE_SNAIL "snail" - #define SCANGATE_GENDER "Gender" -//SKYRAT EDIT END - MORE SCANNER GATE OPTIONS +//SKYRAT EDIT ADDITION END - MORE SCANNER GATE OPTIONS /obj/machinery/scanner_gate name = "scanner gate" @@ -62,7 +61,7 @@ var/light_fail = FALSE ///Does the scanner ignore light_pass and light_fail for sending signals? var/ignore_signals = FALSE - var/detect_gender = "male" //SKYRAT EDIT - MORE SCANNER GATE OPTIONS + var/detect_gender = "male" //SKYRAT EDIT ADDITION - MORE SCANNER GATE OPTIONS ///Modifier to the chance of scanner being false positive/negative var/minus_false_beep = 0 ///Base false positive/negative chance @@ -113,13 +112,13 @@ return CONTEXTUAL_SCREENTIP_SET -/obj/machinery/scanner_gate/proc/on_entered(datum/source, atom/movable/AM) +/obj/machinery/scanner_gate/proc/on_entered(datum/source, atom/movable/thing) SIGNAL_HANDLER - INVOKE_ASYNC(src, PROC_REF(auto_scan), AM) + INVOKE_ASYNC(src, PROC_REF(auto_scan), thing) -/obj/machinery/scanner_gate/proc/auto_scan(atom/movable/AM) - if(!(machine_stat & (BROKEN|NOPOWER)) && isliving(AM) & (!panel_open)) - perform_scan(AM) +/obj/machinery/scanner_gate/proc/auto_scan(atom/movable/thing) + if(!(machine_stat & (BROKEN|NOPOWER)) && anchored && !panel_open) + perform_scan(thing) /obj/machinery/scanner_gate/proc/set_scanline(type, duration) cut_overlays() @@ -141,8 +140,8 @@ return ITEM_INTERACT_SUCCESS return NONE -/obj/machinery/scanner_gate/attackby(obj/item/W, mob/user, params) - var/obj/item/card/id/card = W.GetID() +/obj/machinery/scanner_gate/attackby(obj/item/attacking_item, mob/user, params) + var/obj/item/card/id/card = attacking_item.GetID() if(card) if(locked) if(allowed(user)) @@ -150,16 +149,16 @@ req_access = list() to_chat(user, span_notice("You unlock [src].")) else if(!(obj_flags & EMAGGED)) - to_chat(user, span_notice("You lock [src] with [W].")) - var/list/access = W.GetAccess() + to_chat(user, span_notice("You lock [src] with [attacking_item].")) + var/list/access = attacking_item.GetAccess() req_access = access locked = TRUE else - to_chat(user, span_warning("You try to lock [src] with [W], but nothing happens.")) + to_chat(user, span_warning("You try to lock [src] with [attacking_item], but nothing happens.")) else - if(!locked && default_deconstruction_screwdriver(user, "[initial(icon_state)]_open", initial(icon_state), W)) + if(!locked && default_deconstruction_screwdriver(user, "[initial(icon_state)]_open", initial(icon_state), attacking_item)) return - if(panel_open && is_wire_tool(W)) + if(panel_open && is_wire_tool(attacking_item)) wires.interact(user) return ..() @@ -190,7 +189,7 @@ balloon_alert(user, "id checker disabled") return TRUE -/obj/machinery/scanner_gate/proc/perform_scan(mob/living/M) +/obj/machinery/scanner_gate/proc/perform_scan(atom/movable/thing) var/beep = FALSE var/color = null var/detected_thing = null @@ -198,26 +197,28 @@ if(SCANGATE_NONE) return if(SCANGATE_WANTED) - if(ishuman(M)) + if(ishuman(thing)) detected_thing = "Warrant" - var/mob/living/carbon/human/H = M - var/perpname = H.get_face_name(H.get_id_name()) + var/mob/living/carbon/human/scanned_human = thing + var/perpname = scanned_human.get_face_name(scanned_human.get_id_name()) var/datum/record/crew/target = find_record(perpname) if(!target || (target.wanted_status == WANTED_ARREST)) beep = TRUE if(SCANGATE_MINDSHIELD) detected_thing = "Mindshield" - if(HAS_TRAIT(M, TRAIT_MINDSHIELD)) - beep = TRUE + if(ishuman(thing)) + var/mob/living/carbon/human/scanned_human = thing + if(HAS_TRAIT(scanned_human, TRAIT_MINDSHIELD)) + beep = TRUE if(SCANGATE_DISEASE) detected_thing = "[disease_threshold] infection" - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(get_disease_severity_value(C.check_virus()) >= get_disease_severity_value(disease_threshold)) + if(iscarbon(thing)) + var/mob/living/carbon/scanned_carbon = thing + if(get_disease_severity_value(scanned_carbon.check_virus()) >= get_disease_severity_value(disease_threshold)) beep = TRUE if(SCANGATE_SPECIES) - if(ishuman(M)) - var/mob/living/carbon/human/H = M + if(ishuman(thing)) + var/mob/living/carbon/human/scanned_human = thing var/datum/species/scan_species = /datum/species/human switch(detect_species) if(SCANGATE_LIZARD) @@ -273,37 +274,51 @@ if(SCANGATE_SNAIL) scan_species = /datum/species/snail //SKYRAT EDIT END - MORE SCANNER GATE OPTIONS - if(is_species(H, scan_species)) + if(is_species(scanned_human, scan_species)) beep = TRUE if(detect_species == SCANGATE_ZOMBIE) //Can detect dormant zombies detected_thing = "Romerol infection" - if(H.get_organ_slot(ORGAN_SLOT_ZOMBIE)) + if(scanned_human.get_organ_slot(ORGAN_SLOT_ZOMBIE)) beep = TRUE if(SCANGATE_GUNS) - for(var/I in M.get_contents()) - detected_thing = "Weapons" - if(isgun(I)) - beep = TRUE - break + detected_thing = "Weapons" + if(isgun(thing)) + beep = TRUE + else if(ishuman(thing)) + var/mob/living/carbon/human/scanned_human = thing + var/obj/item/card/id/idcard = scanned_human.get_idcard(hand_first = FALSE) + for(var/obj/item/scanned_item in scanned_human.get_all_contents_skipping_traits(TRAIT_CONTRABAND_BLOCKER)) + if(isgun(scanned_item)) + if((!HAS_TRAIT(scanned_human, TRAIT_MINDSHIELD)) && (isnull(idcard) || !(ACCESS_WEAPONS in idcard.access))) // mindshield or ID card with weapons access, like bartender + beep = TRUE + break + say("[detected_thing] detection bypassed.") + break + else + for(var/obj/item/content in thing.get_all_contents_skipping_traits(TRAIT_CONTRABAND_BLOCKER)) + if(isgun(content)) + beep = TRUE + break if(SCANGATE_NUTRITION) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.nutrition <= detect_nutrition && detect_nutrition == NUTRITION_LEVEL_STARVING) + if(ishuman(thing)) + var/mob/living/carbon/human/scanned_human = thing + if(scanned_human.nutrition <= detect_nutrition && detect_nutrition == NUTRITION_LEVEL_STARVING) beep = TRUE detected_thing = "Starvation" - if(H.nutrition >= detect_nutrition && detect_nutrition == NUTRITION_LEVEL_FAT) + if(scanned_human.nutrition >= detect_nutrition && detect_nutrition == NUTRITION_LEVEL_FAT) beep = TRUE detected_thing = "Obesity" //SKYRAT EDIT BEGIN - MORE SCANNER GATE OPTIONS if(SCANGATE_GENDER) - if(ishuman(M)) - var/mob/living/carbon/human/scanned_human = M + detected_thing = detect_gender + if(ishuman(thing)) + var/mob/living/carbon/human/scanned_human = thing if((scanned_human.gender in list("male", "female"))) //funny thing: nb people will always get by the scan B) if(scanned_human.gender == detect_gender) beep = TRUE //SKYRAT EDIT END - MORE SCANNER GATE OPTIONS if(SCANGATE_CONTRABAND) - for(var/obj/item/content in M.get_all_contents_skipping_traits(TRAIT_CONTRABAND_BLOCKER)) + for(var/obj/item/content in thing.get_all_contents_skipping_traits(TRAIT_CONTRABAND_BLOCKER)) detected_thing = "Contraband" if(content.is_contraband()) beep = TRUE @@ -319,18 +334,18 @@ if(beep) alarm_beep(detected_thing) - SEND_SIGNAL(src, COMSIG_SCANGATE_PASS_TRIGGER, M) + SEND_SIGNAL(src, COMSIG_SCANGATE_PASS_TRIGGER, thing) if(!ignore_signals) color = wires.get_color_of_wire(WIRE_ACCEPT) var/obj/item/assembly/assembly = wires.get_attached(color) assembly?.activate() else - SEND_SIGNAL(src, COMSIG_SCANGATE_PASS_NO_TRIGGER, M) + SEND_SIGNAL(src, COMSIG_SCANGATE_PASS_NO_TRIGGER, thing) if(!ignore_signals) color = wires.get_color_of_wire(WIRE_DENY) var/obj/item/assembly/assembly = wires.get_attached(color) assembly?.activate() - set_scanline("scanning", 10) + set_scanline("scanning", 1 SECONDS) use_energy(active_power_usage) @@ -342,7 +357,7 @@ say("[detected_thing][reverse ? " not " : " "]detected!!") COOLDOWN_START(src, next_beep, 2 SECONDS) - playsound(src, 'sound/machines/scanbuzz.ogg', 100, FALSE) + playsound(source = src, soundin = 'sound/machines/scanbuzz.ogg', vol = 30, vary = FALSE, extrarange = MEDIUM_RANGE_SOUND_EXTRARANGE, falloff_distance = 4) set_scanline("alarm", 2 SECONDS) /obj/machinery/scanner_gate/can_interact(mob/user) diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 194d9682901007..9d5df98386b0d1 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -145,22 +145,30 @@ if(user.combat_mode) return NONE + return try_heal_loop(interacting_with, user) + +/obj/item/weldingtool/proc/try_heal_loop(atom/interacting_with, mob/living/user, repeating = FALSE) var/mob/living/carbon/human/attacked_humanoid = interacting_with var/obj/item/bodypart/affecting = attacked_humanoid.get_bodypart(check_zone(user.zone_selected)) if(isnull(affecting) || !IS_ROBOTIC_LIMB(affecting)) return NONE - var/use_delay = 1 SECONDS // SKYRAT EDIT: ORIGINAL 0 + if (!affecting.get_damage()) + return + user.visible_message(span_notice("[user] starts to fix some of the dents on [attacked_humanoid == user ? user.p_their() : "[attacked_humanoid]'s"] [affecting.name]."), + span_notice("You start fixing some of the dents on [attacked_humanoid == user ? "your" : "[attacked_humanoid]'s"] [affecting.name].")) + var/use_delay = 1 SECONDS // SKYRAT EDIT - original repeating ? 1 SECONDS : 0 if(user == attacked_humanoid) - user.visible_message(span_notice("[user] starts to fix some of the dents on [attacked_humanoid]'s [affecting.name]."), - span_notice("You start fixing some of the dents on [attacked_humanoid == user ? "your" : "[attacked_humanoid]'s"] [affecting.name].")) use_delay = 5 SECONDS if(!use_tool(attacked_humanoid, user, use_delay, volume=50, amount=1)) return ITEM_INTERACT_BLOCKING - attacked_humanoid.item_heal(user, brute_heal = 15, burn_heal = 0, heal_message_brute = "dents", heal_message_burn = "burnt wires", required_bodytype = BODYTYPE_ROBOTIC) + if (!attacked_humanoid.item_heal(user, brute_heal = 15, burn_heal = 0, heal_message_brute = "dents", heal_message_burn = "burnt wires", required_bodytype = BODYTYPE_ROBOTIC)) + return ITEM_INTERACT_BLOCKING + + INVOKE_ASYNC(src, PROC_REF(try_heal_loop), interacting_with, user, TRUE) return ITEM_INTERACT_SUCCESS /obj/item/weldingtool/afterattack(atom/target, mob/user, click_parameters) diff --git a/code/modules/mob/living/basic/space_fauna/carp/carp_ai_rift_actions.dm b/code/modules/mob/living/basic/space_fauna/carp/carp_ai_rift_actions.dm index da672832a0a9ed..f104d3566b347b 100644 --- a/code/modules/mob/living/basic/space_fauna/carp/carp_ai_rift_actions.dm +++ b/code/modules/mob/living/basic/space_fauna/carp/carp_ai_rift_actions.dm @@ -47,9 +47,7 @@ /datum/ai_planning_subtree/make_carp_rift/aggressive_teleport/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick) var/atom/movable/target = controller.blackboard[BB_BASIC_MOB_CURRENT_TARGET] - if(QDELETED(target) || !controller.blackboard[BB_CARPS_FEAR_FISHERMAN] || !HAS_TRAIT(target, TRAIT_SCARY_FISHERMAN)) - return ..() - if (controller.blackboard[BB_BASIC_MOB_STOP_FLEEING]) + if(!QDELETED(target) && controller.blackboard[BB_CARPS_FEAR_FISHERMAN] && HAS_TRAIT(target, TRAIT_SCARY_FISHERMAN)) return return ..() diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index eb487f0d37e980..608ddd9c42c8d5 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -565,28 +565,44 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri // General procedures /////////////////////////////////// //you can use wires to heal robotics -/obj/item/stack/cable_coil/attack(mob/living/carbon/human/H, mob/user) - if(!istype(H)) - return ..() - var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected)) - if(affecting && IS_ROBOTIC_LIMB(affecting)) - if(user == H) - user.visible_message(span_notice("[user] starts to fix some of the wires in [H]'s [affecting.name]."), span_notice("You start fixing some of the wires in [H == user ? "your" : "[H]'s"] [affecting.name].")) - /* SKYRAT EDIT START - ORIGINAL: - if(!do_after(user, 5 SECONDS, H)) - return - */ - // SKYRAT EDIT CHANGE START - if(!do_after(user, (user == H ? self_delay : other_delay))) - return - // SKYRAT EDIT CHANGE END - if(H.item_heal(user, 0, 15, "dents", "burnt wires", BODYTYPE_ROBOTIC)) - user.visible_message(span_green("[user] fixes some of the wires in to [H]'s [affecting.name]."), span_green("You fix some of the wires in [H == user ? "your" : "[H]'s"] [affecting.name].")) // SKYRAT EDIT ADD - use(1) +/obj/item/stack/cable_coil/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + if(!ishuman(interacting_with)) + return NONE + + if(user.combat_mode) + return NONE + + return try_heal_loop(interacting_with, user) + +/obj/item/stack/cable_coil/proc/try_heal_loop(atom/interacting_with, mob/living/user, repeating = FALSE) + var/mob/living/carbon/human/attacked_humanoid = interacting_with + var/obj/item/bodypart/affecting = attacked_humanoid.get_bodypart(check_zone(user.zone_selected)) + if(isnull(affecting) || !IS_ROBOTIC_LIMB(affecting)) + return NONE + + if (!affecting.get_damage()) return + + user.visible_message(span_notice("[user] starts to fix some of the wires in [attacked_humanoid == user ? user.p_their() : "[attacked_humanoid]'s"] [affecting.name]."), + span_notice("You start fixing some of the wires in [attacked_humanoid == user ? "your" : "[attacked_humanoid]'s"] [affecting.name].")) + + var/use_delay = repeating ? 1 SECONDS : 0 + if(user == attacked_humanoid) + use_delay = self_delay // SKYRAT EDIT CHANGE - ORIGINAL: use_delay = 5 SECONDS + // SKYRAT EDIT ADDITION START else - return ..() + use_delay = other_delay + // SKYRAT EDIT ADDITION END + + if(!do_after(user, use_delay, attacked_humanoid)) + return ITEM_INTERACT_BLOCKING + + if (!attacked_humanoid.item_heal(user, brute_heal = 0, burn_heal = 15, heal_message_brute = "dents", heal_message_burn = "burnt wires", required_bodytype = BODYTYPE_ROBOTIC)) + return ITEM_INTERACT_BLOCKING + + if (use(1) && amount > 0) + INVOKE_ASYNC(src, PROC_REF(try_heal_loop), interacting_with, user, TRUE) /////////////////////////////////////////////// // Cable laying procedures @@ -605,7 +621,7 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri to_chat(user, span_warning("There is no cable left!")) return - if(get_dist(T,user) > 1) // Too far + if(get_dist(T,user) > 1) to_chat(user, span_warning("You can't lay cable at a place that far away!")) return diff --git a/html/changelogs/AutoChangeLog-pr-29154.yml b/html/changelogs/AutoChangeLog-pr-29154.yml new file mode 100644 index 00000000000000..d9a8763280dff6 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-29154.yml @@ -0,0 +1,7 @@ +author: "LT3" +delete-after: True +changes: + - bugfix: "Scanner gate now detects items thrown through it" + - bugfix: "Scanner gate does not alarm for guns on players with mindshield" + - bugfix: "Scanner gate does not alarm for guns on players with weapons ID card access" + - sound: "Reduced volume of scanner gate alarm" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-29200.yml b/html/changelogs/AutoChangeLog-pr-29200.yml new file mode 100644 index 00000000000000..05677adbc2e55c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-29200.yml @@ -0,0 +1,5 @@ +author: "SkyratBot" +delete-after: True +changes: + - qol: "Cable coil and welding tool healing now loops similarly to sutures/meshes" + - bugfix: "Fixed cable coil/welding tool heal message not displaying when healing someone else" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-29242.yml b/html/changelogs/AutoChangeLog-pr-29242.yml deleted file mode 100644 index 84f50ba363b6f6..00000000000000 --- a/html/changelogs/AutoChangeLog-pr-29242.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: "SkyratBot" -delete-after: True -changes: - - bugfix: "Circuit UI scale no longer has weird rounding" - - bugfix: "Circuit UI no longer gets covered by components menu" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-29249.yml b/html/changelogs/AutoChangeLog-pr-29249.yml deleted file mode 100644 index a91b2354fc33df..00000000000000 --- a/html/changelogs/AutoChangeLog-pr-29249.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "SkyratBot" -delete-after: True -changes: - - spellcheck: "fixed many incorrect spellings of Waffle Corp and Donk Co." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-29250.yml b/html/changelogs/AutoChangeLog-pr-29250.yml deleted file mode 100644 index 802bf7fdc9c82e..00000000000000 --- a/html/changelogs/AutoChangeLog-pr-29250.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: "Odairu" -delete-after: True -changes: - - bugfix: "PT can do ordnance now" - - qol: "Added a new item, long range PDA." \ No newline at end of file diff --git a/html/changelogs/archive/2024-08.yml b/html/changelogs/archive/2024-08.yml index 21c5563703836c..aeb462cf72a503 100644 --- a/html/changelogs/archive/2024-08.yml +++ b/html/changelogs/archive/2024-08.yml @@ -276,3 +276,11 @@ SkyratBot: - bugfix: Fixed Charlie MOD installer not installing MODsuit unless you have a backpack to drop +2024-08-11: + Odairu: + - bugfix: PT can do ordnance now + - qol: Added a new item, long range PDA. + SkyratBot: + - spellcheck: fixed many incorrect spellings of Waffle Corp and Donk Co. + - bugfix: Circuit UI scale no longer has weird rounding + - bugfix: Circuit UI no longer gets covered by components menu