set_anchored() (#59532)

This commit is contained in:
Rohesie
2021-06-08 12:07:34 -07:00
committed by GitHub
parent 7a40decc0c
commit d990b71da2
18 changed files with 30 additions and 30 deletions
+1 -1
View File
@@ -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("<span class='warning'>[src] deploys!</span>")
@@ -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)
@@ -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,"<span class='notice'>You [anchored == FALSE ? "unanchor" : "anchor"] the crucible</span>")
return
@@ -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
@@ -81,10 +81,10 @@
if(istype(mob_area, game_area))
to_chat(M, "<span class='userdanger'>\The [initial(src.name)] has been taken!</span>")
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, "<span class='userdanger'>\The [initial(name)] has been dropped!</span>")
anchored = TRUE
anchored = TRUE // Avoid directly assigning to anchored and prefer to use set_anchored() on normal circumstances.
/obj/item/ctf/red
@@ -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, "<span class='warning'>There isn't enough room to unpack here! Bad spaces were marked in red.</span>")
return
visible_message("<span class='notice'>[src] expands into a full stand.</span>")
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))
+1 -1
View File
@@ -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, "<span class='notice'>Mining shuttle calibration successful! Shuttle interface available at base console.</span>")
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)].")
+1 -1
View File
@@ -19,7 +19,7 @@
cameraFollow = null
anchored = FALSE //unbolt floorbolts
set_anchored(FALSE) //unbolt floorbolts
move_resist = MOVE_FORCE_NORMAL
if(eyeobj)
@@ -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))
@@ -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()
@@ -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
@@ -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))
+1 -1
View File
@@ -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()
@@ -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))
@@ -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)
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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"