From d990b71da26ed2a07b34fd83a6fffc6136ea47c6 Mon Sep 17 00:00:00 2001 From: Rohesie Date: Tue, 8 Jun 2021 16:07:34 -0300 Subject: [PATCH] set_anchored() (#59532) --- code/game/machinery/deployable.dm | 2 +- code/game/objects/structures/manned_turret.dm | 4 ++-- .../antagonists/eldritch_cult/eldritch_structures.dm | 2 +- .../machinery/portable/portable_atmospherics.dm | 4 ++-- code/modules/capture_the_flag/capture_the_flag.dm | 8 ++++---- .../food_and_drinks/kitchen_machinery/food_cart.dm | 4 ++-- code/modules/mining/aux_base.dm | 2 +- code/modules/mob/living/silicon/ai/death.dm | 2 +- code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm | 2 +- code/modules/mob/living/simple_animal/bot/firebot.dm | 2 +- code/modules/mob/living/simple_animal/bot/honkbot.dm | 8 ++++---- code/modules/mob/living/simple_animal/bot/secbot.dm | 8 ++++---- code/modules/plumbing/ducts.dm | 2 +- code/modules/plumbing/plumbers/_plumb_machinery.dm | 2 +- .../reagents/chemistry/reagents/impure_reagents.dm | 2 +- .../reagents/chemistry/reagents/unique/eigenstasium.dm | 2 +- code/modules/reagents/reagent_dispenser.dm | 2 +- code/modules/vending/_vending.dm | 2 +- 18 files changed, 30 insertions(+), 30 deletions(-) diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 5ca54d26af1..b0f42775d0d 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -136,7 +136,7 @@ /obj/structure/barricade/security/proc/deploy() icon_state = "barrier1" density = TRUE - anchored = TRUE + set_anchored(TRUE) if(deploy_message) visible_message("[src] deploys!") diff --git a/code/game/objects/structures/manned_turret.dm b/code/game/objects/structures/manned_turret.dm index ccac75806c7..00db0bf6867 100644 --- a/code/game/objects/structures/manned_turret.dm +++ b/code/game/objects/structures/manned_turret.dm @@ -39,7 +39,7 @@ buckled_mob.pixel_y = buckled_mob.base_pixel_y if(buckled_mob.client) buckled_mob.client.view_size.resetToDefault() - anchored = FALSE + set_anchored(FALSE) . = ..() STOP_PROCESSING(SSfastprocess, src) @@ -63,7 +63,7 @@ layer = ABOVE_MOB_LAYER setDir(SOUTH) playsound(src,'sound/mecha/mechmove01.ogg', 50, TRUE) - anchored = TRUE + set_anchored(TRUE) if(M.client) M.client.view_size.setTo(view_range) START_PROCESSING(SSfastprocess, src) diff --git a/code/modules/antagonists/eldritch_cult/eldritch_structures.dm b/code/modules/antagonists/eldritch_cult/eldritch_structures.dm index 2b5055366e5..faf4dcddafc 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_structures.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_structures.dm @@ -40,7 +40,7 @@ if(istype(I,/obj/item/forbidden_book)) playsound(src, 'sound/misc/desecration-02.ogg', 75, TRUE) - anchored = !anchored + set_anchored(!anchored) to_chat(user,"You [anchored == FALSE ? "unanchor" : "anchor"] the crucible") return diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm index e5d66e3538d..2716ceff13b 100644 --- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm +++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm @@ -77,7 +77,7 @@ var/datum/pipeline/connected_port_parent = connected_port.parents[1] connected_port_parent.reconcile_air() - anchored = TRUE //Prevent movement + set_anchored(TRUE) //Prevent movement pixel_x = new_port.pixel_x pixel_y = new_port.pixel_y @@ -96,7 +96,7 @@ /obj/machinery/portable_atmospherics/proc/disconnect() if(!connected_port) return FALSE - anchored = FALSE + set_anchored(FALSE) connected_port.connected_device = null connected_port = null pixel_x = 0 diff --git a/code/modules/capture_the_flag/capture_the_flag.dm b/code/modules/capture_the_flag/capture_the_flag.dm index 4f593896f05..6328e9ea397 100644 --- a/code/modules/capture_the_flag/capture_the_flag.dm +++ b/code/modules/capture_the_flag/capture_the_flag.dm @@ -81,10 +81,10 @@ if(istype(mob_area, game_area)) to_chat(M, "\The [initial(src.name)] has been taken!") STOP_PROCESSING(SSobj, src) - anchored = FALSE //normal checks need this to be FALSE to pass + anchored = FALSE // Hacky usage that bypasses set_anchored(), because normal checks need this to be FALSE to pass . = ..() //this is the actual normal item checks if(.) //only apply these flag passives - anchored = TRUE + anchored = TRUE // Avoid directly assigning to anchored and prefer to use set_anchored() on normal circumstances. return //passing means the user picked up the flag so we can now apply this user.set_anchored(TRUE) @@ -92,7 +92,7 @@ /obj/item/ctf/dropped(mob/user) ..() - user.set_anchored(FALSE) + user.anchored = FALSE // Hacky usage that bypasses set_anchored() user.status_flags |= CANPUSH reset_cooldown = world.time + 20 SECONDS START_PROCESSING(SSobj, src) @@ -100,7 +100,7 @@ var/area/mob_area = get_area(M) if(istype(mob_area, game_area)) to_chat(M, "\The [initial(name)] has been dropped!") - anchored = TRUE + anchored = TRUE // Avoid directly assigning to anchored and prefer to use set_anchored() on normal circumstances. /obj/item/ctf/red diff --git a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm index ed34c178fad..52cde7b9467 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm @@ -55,7 +55,7 @@ var/obj/object = o UnregisterSignal(object, COMSIG_MOVABLE_MOVED) object.forceMove(src) - anchored = FALSE + set_anchored(FALSE) unpacked = FALSE /obj/machinery/food_cart/proc/unpack(mob/user) @@ -65,7 +65,7 @@ to_chat(user, "There isn't enough room to unpack here! Bad spaces were marked in red.") return visible_message("[src] expands into a full stand.") - anchored = TRUE + set_anchored(TRUE) var/iteration = 1 var/turf/grabbed_turf = get_step(get_turf(src), EAST) for(var/angle in list(0, -45, -45, 45)) diff --git a/code/modules/mining/aux_base.dm b/code/modules/mining/aux_base.dm index 0ae32d893db..bb11e236253 100644 --- a/code/modules/mining/aux_base.dm +++ b/code/modules/mining/aux_base.dm @@ -428,7 +428,7 @@ aux_base_console.set_mining_mode() //Lets the colony park the shuttle there, now that it has a dock. to_chat(user, "Mining shuttle calibration successful! Shuttle interface available at base console.") - anchored = TRUE //Locks in place to mark the landing zone. + set_anchored(TRUE) //Locks in place to mark the landing zone. playsound(loc, 'sound/machines/ping.ogg', 50, FALSE) log_shuttle("[key_name(usr)] has registered the mining shuttle beacon at [COORD(landing_spot)].") diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index 892d593b821..ea8f56545ef 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -19,7 +19,7 @@ cameraFollow = null - anchored = FALSE //unbolt floorbolts + set_anchored(FALSE) //unbolt floorbolts move_resist = MOVE_FORCE_NORMAL if(eyeobj) diff --git a/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm b/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm index 142f8c028c4..85a9d919430 100644 --- a/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm +++ b/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm @@ -98,7 +98,7 @@ bot_patrol() /mob/living/simple_animal/bot/secbot/grievous/look_for_perp() - anchored = FALSE + set_anchored(FALSE) var/judgement_criteria = judgement_criteria() for (var/mob/living/carbon/C in view(7,src)) //Let's find us a criminal if((C.stat) || (C.handcuffed)) diff --git a/code/modules/mob/living/simple_animal/bot/firebot.dm b/code/modules/mob/living/simple_animal/bot/firebot.dm index 9eaa13a9a8d..6659216d393 100644 --- a/code/modules/mob/living/simple_animal/bot/firebot.dm +++ b/code/modules/mob/living/simple_animal/bot/firebot.dm @@ -92,7 +92,7 @@ target_fire = null old_target_fire = null ignore_list = list() - anchored = FALSE + set_anchored(FALSE) update_appearance() /mob/living/simple_animal/bot/firebot/proc/soft_reset() diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index 0eee07ec26b..1586fb0a80f 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -73,7 +73,7 @@ ..() target = null oldtarget_name = null - anchored = FALSE + set_anchored(FALSE) walk_to(src,0) last_found = world.time limiting_spam = FALSE @@ -284,7 +284,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"}, return /mob/living/simple_animal/bot/honkbot/proc/back_to_idle() - anchored = FALSE + set_anchored(FALSE) mode = BOT_IDLE target = null last_found = world.time @@ -292,13 +292,13 @@ Maintenance panel panel is [open ? "opened" : "closed"]"}, INVOKE_ASYNC(src, .proc/handle_automated_action) //responds quickly /mob/living/simple_animal/bot/honkbot/proc/back_to_hunt() - anchored = FALSE + set_anchored(FALSE) frustration = 0 mode = BOT_HUNT INVOKE_ASYNC(src, .proc/handle_automated_action) // responds quickly /mob/living/simple_animal/bot/honkbot/proc/look_for_perp() - anchored = FALSE + set_anchored(FALSE) for (var/mob/living/carbon/C in view(7,src)) if((C.stat) || (C.handcuffed)) continue diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 25b934c6b2f..53f9f7707b8 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -110,7 +110,7 @@ ..() target = null oldtarget_name = null - anchored = FALSE + set_anchored(FALSE) walk_to(src,0) last_found = world.time @@ -409,7 +409,7 @@ Auto Patrol: []"}, return /mob/living/simple_animal/bot/secbot/proc/back_to_idle() - anchored = FALSE + set_anchored(FALSE) mode = BOT_IDLE target = null last_found = world.time @@ -417,14 +417,14 @@ Auto Patrol: []"}, INVOKE_ASYNC(src, .proc/handle_automated_action) /mob/living/simple_animal/bot/secbot/proc/back_to_hunt() - anchored = FALSE + set_anchored(FALSE) frustration = 0 mode = BOT_HUNT INVOKE_ASYNC(src, .proc/handle_automated_action) // look for a criminal in view of the bot /mob/living/simple_animal/bot/secbot/proc/look_for_perp() - anchored = FALSE + set_anchored(FALSE) var/judgement_criteria = judgement_criteria() for (var/mob/living/carbon/C in view(7,src)) //Let's find us a criminal if((C.stat) || (C.handcuffed)) diff --git a/code/modules/plumbing/ducts.dm b/code/modules/plumbing/ducts.dm index 1d1e005a48a..a93040120e7 100644 --- a/code/modules/plumbing/ducts.dm +++ b/code/modules/plumbing/ducts.dm @@ -292,7 +292,7 @@ All the important duct code: /obj/machinery/duct/doMove(destination) . = ..() disconnect_duct() - anchored = FALSE + set_anchored(FALSE) /obj/machinery/duct/Destroy() disconnect_duct() diff --git a/code/modules/plumbing/plumbers/_plumb_machinery.dm b/code/modules/plumbing/plumbers/_plumb_machinery.dm index 42dcdbf1843..03cc30a4f07 100644 --- a/code/modules/plumbing/plumbers/_plumb_machinery.dm +++ b/code/modules/plumbing/plumbers/_plumb_machinery.dm @@ -19,7 +19,7 @@ /obj/machinery/plumbing/Initialize(mapload, bolt = TRUE) . = ..() - anchored = bolt + set_anchored(bolt) create_reagents(buffer, reagent_flags) AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS, null, CALLBACK(src, .proc/can_be_rotated)) diff --git a/code/modules/reagents/chemistry/reagents/impure_reagents.dm b/code/modules/reagents/chemistry/reagents/impure_reagents.dm index bd912389776..55a4f60258c 100644 --- a/code/modules/reagents/chemistry/reagents/impure_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/impure_reagents.dm @@ -100,7 +100,7 @@ /datum/reagent/inverse/cryostylane/on_mob_add(mob/living/carbon/owner, amount) cube = new /obj/structure/ice_stasis(get_turf(owner)) cube.color = COLOR_CYAN - cube.anchored = TRUE + cube.set_anchored(TRUE) owner.forceMove(cube) owner.apply_status_effect(STATUS_EFFECT_STASIS, STASIS_CHEMICAL_EFFECT) cryostylane_alert = owner.throw_alert("cryostylane_alert", /atom/movable/screen/alert/status_effect/freon/cryostylane) diff --git a/code/modules/reagents/chemistry/reagents/unique/eigenstasium.dm b/code/modules/reagents/chemistry/reagents/unique/eigenstasium.dm index 2ee6227b078..fe58e7db304 100644 --- a/code/modules/reagents/chemistry/reagents/unique/eigenstasium.dm +++ b/code/modules/reagents/chemistry/reagents/unique/eigenstasium.dm @@ -60,7 +60,7 @@ eigenstate.add_atom_colour(LIGHT_COLOR_LIGHT_CYAN, FIXED_COLOUR_PRIORITY) eigenstate.mouse_opacity = MOUSE_OPACITY_TRANSPARENT//So you can't click on it. eigenstate.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them. - eigenstate.anchored = 1//So space wind cannot drag it. + eigenstate.set_anchored(TRUE) //So space wind cannot drag it. eigenstate.name = "[living_mob.name]'s eigenstate"//If someone decides to right click. eigenstate.set_light(2) //hologram lighting diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 574164f4a81..839c4cdfa32 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -38,7 +38,7 @@ reagents.trans_to(new_tank, reagents.total_volume) new_tank.name = "stationary [name]" new_tank.update_appearance(UPDATE_OVERLAYS) - new_tank.anchored = anchored + new_tank.set_anchored(anchored) qdel(src) return FALSE else diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 9c7c9106ea8..c4f27e2d009 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -1271,7 +1271,7 @@ GLOBAL_LIST_EMPTY(vending_products) . = ..() //starts in a state where you can move it panel_open = TRUE - anchored = FALSE + set_anchored(FALSE) add_overlay("[initial(icon_state)]-panel") //and references the deity name = "[GLOB.deity]'s Consecrated Vendor"