Finishes the forceMove port

This commit is contained in:
vuonojenmustaturska
2017-12-14 23:39:34 +02:00
committed by CitadelStationBot
parent a22b225015
commit fcceb5ec77
110 changed files with 364 additions and 239 deletions
+1 -1
View File
@@ -95,7 +95,7 @@
var/obj/docking_port/stationary/SM = S
if(SM.id == "emergency_home")
var/new_dir = turn(SM.dir, 180)
SM.loc = get_ranged_target_turf(SM, new_dir, rand(3,15))
SM.forceMove(get_ranged_target_turf(SM, new_dir, rand(3,15)))
break
qdel(src)
+2 -2
View File
@@ -1307,7 +1307,7 @@
if(alert(usr, "Send [key_name(M)] to Prison?", "Message", "Yes", "No") != "Yes")
return
M.loc = pick(GLOB.prisonwarp)
M.forceMove(pick(GLOB.prisonwarp))
to_chat(M, "<span class='adminnotice'>You have been sent to Prison!</span>")
log_admin("[key_name(usr)] has sent [key_name(M)] to Prison!")
@@ -1543,7 +1543,7 @@
C.admin_ghost()
var/mob/dead/observer/A = C.mob
A.ManualFollow(AM)
else if(href_list["admingetmovable"])
if(!check_rights(R_ADMIN))
return
+2 -2
View File
@@ -34,7 +34,7 @@
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
usr.loc = T
usr.forceMove(T)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Turf") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
@@ -137,7 +137,7 @@
admin_ticket_log(M, msg)
if(M)
M.forceMove(get_turf(usr))
usr.loc = M.loc
usr.forceMove(M.loc)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Get Key") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/sendmob(mob/M in sortmobs())
+1 -1
View File
@@ -737,7 +737,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
Plasma.air_contents.gases[/datum/gas/plasma][MOLES] = 70
Rad.drainratio = 0
Rad.loaded_tank = Plasma
Plasma.loc = Rad
Plasma.forceMove(Rad)
if(!Rad.active)
Rad.toggle_power()
+2 -2
View File
@@ -88,10 +88,10 @@
return 0
if(a_left)
a_left.holder = null
a_left.loc = T
a_left.forceMove(T)
if(a_right)
a_right.holder = null
a_right.loc = T
a_right.forceMove(T)
qdel(src)
else
..()
+33
View File
@@ -7,6 +7,7 @@
var/obj/item/device/electropack/part2 = null
w_class = WEIGHT_CLASS_HUGE
flags_1 = CONDUCT_1
<<<<<<< HEAD
/obj/item/assembly/shock_kit/Destroy()
qdel(part1)
@@ -40,3 +41,35 @@
var/obj/structure/chair/e_chair/C = loc
C.shock()
return
=======
/obj/item/assembly/shock_kit/Destroy()
qdel(part1)
qdel(part2)
return ..()
/obj/item/assembly/shock_kit/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench))
part1.forceMove(drop_location())
part2.forceMove(drop_location())
part1.master = null
part2.master = null
part1 = null
part2 = null
qdel(src)
return
add_fingerprint(user)
return
/obj/item/assembly/shock_kit/attack_self(mob/user)
part1.attack_self(user)
part2.attack_self(user)
add_fingerprint(user)
return
/obj/item/assembly/shock_kit/receive_signal()
if(istype(loc, /obj/structure/chair/e_chair))
var/obj/structure/chair/e_chair/C = loc
C.shock()
return
>>>>>>> 5233ec1... Finishes the forceMove port (#33519)
@@ -135,7 +135,7 @@
investigate_log("was set to [pump.target_pressure] kPa by [key_name(usr)].", INVESTIGATE_ATMOS)
if("eject")
if(holding)
holding.loc = get_turf(src)
holding.forceMove(drop_location())
holding = null
. = TRUE
update_icon()
@@ -96,7 +96,7 @@
. = TRUE
if("eject")
if(holding)
holding.loc = get_turf(src)
holding.forceMove(drop_location())
holding = null
. = TRUE
if("toggle_filter")
+1 -1
View File
@@ -283,7 +283,7 @@
for(var/obj/item/device/flashlight/seclite/S in src)
to_chat(user, "<span class='notice'>You unscrew the seclite from [src].</span>")
F = null
S.loc = get_turf(user)
S.forceMove(user.drop_location())
update_helmlight(user)
S.update_brightness(user)
update_icon()
@@ -98,7 +98,7 @@
I.flags_1 &= ~NODROP_1
if(camera)
camera.remove_target_ui()
camera.loc = user
camera.forceMove(user)
teleport_now.UpdateButtonIcon()
/obj/item/clothing/suit/space/chronos/proc/chronowalk(atom/location)
@@ -278,19 +278,19 @@
if(loc == user)
forceMove(get_turf(user))
if(user.client && user.client.eye != src)
src.loc = get_turf(user)
src.forceMove(user.drop_location())
user.reset_perspective(src)
user.set_machine(src)
var/atom/step = get_step(src, direction)
if(step)
if((step.x <= TRANSITIONEDGE) || (step.x >= (world.maxx - TRANSITIONEDGE - 1)) || (step.y <= TRANSITIONEDGE) || (step.y >= (world.maxy - TRANSITIONEDGE - 1)))
if(!src.Move(step))
src.loc = step
src.forceMove(step)
else
src.loc = step
src.forceMove(step)
if((x == holder.x) && (y == holder.y) && (z == holder.z))
remove_target_ui()
loc = user
forceMove(user)
else if(!target_ui)
create_target_ui()
phase_time = world.time + phase_time_length
+1 -1
View File
@@ -136,7 +136,7 @@
return
jetpack.turn_off()
jetpack.loc = get_turf(src)
jetpack.forceMove(drop_location())
jetpack = null
to_chat(user, "<span class='notice'>You successfully remove the jetpack from [src].</span>")
+3 -3
View File
@@ -15,11 +15,11 @@
if(U.pockets) // storage items conflict
return FALSE
pockets.loc = U
pockets.forceMove(U)
U.pockets = pockets
U.attached_accessory = src
loc = U
forceMove(U)
layer = FLOAT_LAYER
plane = FLOAT_PLANE
if(minimize_when_attached)
@@ -39,7 +39,7 @@
/obj/item/clothing/accessory/proc/detach(obj/item/clothing/under/U, user)
if(pockets && pockets == U.pockets)
pockets.loc = src
pockets.forceMove(src)
U.pockets = null
for(var/armor_type in armor)
+1 -1
View File
@@ -187,7 +187,7 @@
ASSERT(H)
usr.visible_message("\The [usr] plays \the [card.name].")
H.loc = get_step(usr,usr.dir)
H.forceMove(get_step(usr,usr.dir))
src.update_icon()
+2 -2
View File
@@ -146,7 +146,7 @@
timer = rand(1,15)
/mob/living/simple_animal/shade/howling_ghost/proc/EtherealMove(direction)
loc = get_step(src, direction)
forceMove(get_step(src, direction))
setDir(direction)
/mob/living/simple_animal/shade/howling_ghost/proc/roam()
@@ -220,7 +220,7 @@
timer = rand(5,15)
playsound(M.loc, pick('sound/spookoween/scary_horn.ogg','sound/spookoween/scary_horn2.ogg', 'sound/spookoween/scary_horn3.ogg'), 300, 1)
spawn(12)
loc = M.loc
forceMove(M.loc)
/mob/living/simple_animal/hostile/retaliate/clown/insane/MoveToTarget()
stalk(target)
+1 -1
View File
@@ -113,7 +113,7 @@
if(user.grab_state < GRAB_AGGRESSIVE)
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
return
L.loc = src.loc
L.forceMove(loc)
L.Knockdown(100)
visible_message("<span class='danger'>[user] dunks [L] into \the [src]!</span>")
user.stop_pulling()
+13 -8
View File
@@ -178,7 +178,7 @@
bees -= B
B.beehome = null
if(B.loc == src)
B.loc = get_turf(src)
B.forceMove(drop_location())
relocated++
if(relocated)
to_chat(user, "<span class='warning'>This queen has a different reagent to some of the bees who live here, those bees will not return to this apiary!</span>")
@@ -201,7 +201,7 @@
if(B.isqueen)
continue
if(B.loc == src)
B.loc = get_turf(src)
B.forceMove(drop_location())
B.target = user
bees = TRUE
if(bees)
@@ -221,7 +221,7 @@
var/obj/item/honey_frame/HF = pick_n_take(honey_frames)
if(HF)
if(!user.put_in_active_hand(HF))
HF.loc = get_turf(src)
HF.forceMove(drop_location())
visible_message("<span class='notice'>[user] removes a frame from the apiary.</span>")
var/amtH = HF.honeycomb_capacity
@@ -229,7 +229,7 @@
while(honeycombs.len && amtH) //let's pretend you always grab the frame with the most honeycomb on it
var/obj/item/reagent_containers/honeycomb/HC = pick_n_take(honeycombs)
if(HC)
HC.loc = get_turf(user)
HC.forceMove(drop_location())
amtH--
fallen++
if(fallen)
@@ -241,12 +241,12 @@
to_chat(user, "<span class='warning'>There is no queen bee to remove!</span>")
return
var/obj/item/queen_bee/QB = new()
queen_bee.loc = QB
queen_bee.forceMove(QB)
bees -= queen_bee
QB.queen = queen_bee
QB.name = queen_bee.name
if(!user.put_in_active_hand(QB))
QB.loc = get_turf(src)
QB.forceMove(drop_location())
visible_message("<span class='notice'>[user] removes the queen from the apiary.</span>")
queen_bee = null
@@ -254,8 +254,13 @@
new /obj/item/stack/sheet/mineral/wood (loc, 20)
for(var/mob/living/simple_animal/hostile/poison/bees/B in bees)
if(B.loc == src)
B.loc = get_turf(src)
B.forceMove(drop_location())
for(var/obj/item/honey_frame/HF in honey_frames)
if(HF.loc == src)
<<<<<<< HEAD
HF.loc = get_turf(src)
qdel(src)
qdel(src)
=======
HF.forceMove(drop_location())
qdel(src)
>>>>>>> 5233ec1... Finishes the forceMove port (#33519)
+1 -1
View File
@@ -78,7 +78,7 @@
if(default_deconstruction_screwdriver(user, "biogen-empty-o", "biogen-empty", O))
if(beaker)
var/obj/item/reagent_containers/glass/B = beaker
B.loc = loc
B.forceMove(drop_location())
beaker = null
update_icon()
return
+3 -3
View File
@@ -260,7 +260,7 @@
if(href_list["eject_seed"] && !operation)
if (seed)
seed.loc = src.loc
seed.forceMove(drop_location())
seed.verb_pickup()
seed = null
update_genes()
@@ -275,7 +275,7 @@
update_icon()
else if(href_list["eject_disk"] && !operation)
if (disk)
disk.loc = src.loc
disk.forceMove(drop_location())
disk.verb_pickup()
disk = null
update_genes()
@@ -368,7 +368,7 @@
/obj/machinery/plantgenes/proc/insert_seed(obj/item/seeds/S)
if(!istype(S) || seed)
return
S.loc = src
S.forceMove(src)
seed = S
update_genes()
update_icon()
+1 -1
View File
@@ -108,7 +108,7 @@
var/needs_update = 0 // Checks if the icon needs updating so we don't redraw empty trays every time
if(myseed && (myseed.loc != src))
myseed.loc = src
myseed.forceMove(src)
if(self_sustaining)
adjustNutri(1)
+3 -3
View File
@@ -17,7 +17,7 @@
return
while(t_amount < t_max)
var/obj/item/seeds/t_prod = F.seed.Copy()
t_prod.loc = seedloc
t_prod.forceMove(seedloc)
t_amount++
qdel(O)
return 1
@@ -29,7 +29,7 @@
return
while(t_amount < t_max)
var/obj/item/seeds/t_prod = F.seed.Copy()
t_prod.loc = seedloc
t_prod.forceMove(seedloc)
t_amount++
qdel(O)
return 1
@@ -168,7 +168,7 @@
for (var/obj/T in contents)//Now we find the seed we need to vend
var/obj/item/seeds/O = T
if (O.plantname == href_list["name"] && O.lifespan == href_list["li"] && O.endurance == href_list["en"] && O.maturation == href_list["ma"] && O.production == href_list["pr"] && O.yield == href_list["yi"] && O.potency == href_list["pot"])
O.loc = src.loc
O.forceMove(drop_location())
break
src.updateUsrDialog()
+3 -3
View File
@@ -49,7 +49,7 @@
anchored = TRUE
for(var/obj/item/I in loc)
if(istype(I, /obj/item/book))
I.loc = src
I.forceMove(src)
update_icon()
@@ -123,7 +123,7 @@
if(!user.get_active_held_item())
user.put_in_hands(choice)
else
choice.loc = get_turf(src)
choice.forceMove(drop_location())
update_icon()
@@ -289,7 +289,7 @@
user.put_in_hands(B)
return
else
B.loc = src.loc
B.forceMove(drop_location())
qdel(src)
return
return
+2 -2
View File
@@ -541,7 +541,7 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
cache = null
if(href_list["eject"])
for(var/obj/item/book/B in contents)
B.loc = src.loc
B.forceMove(drop_location())
src.add_fingerprint(usr)
src.updateUsrDialog()
return
@@ -589,4 +589,4 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
B.icon_state = "book[rand(1,7)]"
qdel(P)
else
P.loc = loc
P.forceMove(drop_location())
@@ -172,7 +172,7 @@
to_chat(M, "<span class='notice'>Your vision returns to normal.</span>")
wisp.stop_orbit()
wisp.loc = src
wisp.forceMove(src)
icon_state = "lantern-blue"
SSblackbox.record_feedback("tally", "wisp_lantern", 1, "Returned")
@@ -412,7 +412,7 @@
/obj/item/device/shared_storage/attackby(obj/item/W, mob/user, params)
if(bag)
bag.loc = user
bag.forceMove(user)
bag.attackby(W, user, params)
@@ -421,7 +421,7 @@
return
if(loc == user && user.back && user.back == src)
if(bag)
bag.loc = user
bag.forceMove(user)
bag.attack_hand(user)
else
..()
+3 -3
View File
@@ -29,7 +29,7 @@
icon_state = "fitnesslifter2"
user.setDir(SOUTH)
user.Stun(80)
user.loc = src.loc
user.forceMove(src.loc)
var/bragmessage = pick("pushing it to the limit","going into overdrive","burning with determination","rising up to the challenge", "getting strong now","getting ripped")
user.visible_message("<B>[user] is [bragmessage]!</B>")
var/lifts = 0
@@ -67,7 +67,7 @@
icon_state = "fitnessweight-c"
user.setDir(SOUTH)
user.Stun(80)
user.loc = src.loc
user.forceMove(src.loc)
var/mutable_appearance/swole_overlay = mutable_appearance(icon, "fitnessweight-w", WALL_OBJ_LAYER)
add_overlay(swole_overlay)
var/bragmessage = pick("pushing it to the limit","going into overdrive","burning with determination","rising up to the challenge", "getting strong now","getting ripped")
@@ -93,4 +93,4 @@
var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!")
icon_state = "fitnessweight"
cut_overlay(swole_overlay)
to_chat(user, "[finishmessage]")
to_chat(user, "[finishmessage]")
+1 -1
View File
@@ -88,7 +88,7 @@
stack_list[inp.type] = s
var/obj/item/stack/sheet/storage = stack_list[inp.type]
storage.amount += inp.amount //Stack the sheets
inp.loc = null //Let the old sheet garbage collect
qdel(inp) //Let the old sheet garbage collect
while(storage.amount > stack_amt) //Get rid of excessive stackage
var/obj/item/stack/sheet/out = new inp.type()
out.amount = stack_amt
+13
View File
@@ -6,6 +6,7 @@
anchored = TRUE
status_flags = GODMODE // You can't damage it.
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
<<<<<<< HEAD
see_in_dark = 7
invisibility = INVISIBILITY_ABSTRACT // No one can see us
sight = SEE_SELF
@@ -13,3 +14,15 @@
/mob/camera/experience_pressure_difference()
return
=======
see_in_dark = 7
invisibility = INVISIBILITY_ABSTRACT // No one can see us
sight = SEE_SELF
move_on_shuttle = 0
/mob/camera/experience_pressure_difference()
return
/mob/camera/forceMove(atom/destination)
loc = destination
>>>>>>> 5233ec1... Finishes the forceMove port (#33519)
+3
View File
@@ -24,6 +24,9 @@ INITIALIZE_IMMEDIATE(/mob/dead)
/mob/dead/ConveyorMove() //lol
return
/mob/dead/forceMove(atom/destination)
loc = destination
/mob/dead/Stat()
..()
@@ -21,9 +21,9 @@
S.Fade(TRUE)
if(length(GLOB.newplayer_start))
loc = pick(GLOB.newplayer_start)
forceMove(pick(GLOB.newplayer_start))
else
loc = locate(1,1,1)
forceMove(locate(1,1,1))
ComponentInitialize()
@@ -282,7 +282,7 @@
var/obj/effect/landmark/observer_start/O = locate(/obj/effect/landmark/observer_start) in GLOB.landmarks_list
to_chat(src, "<span class='notice'>Now teleporting.</span>")
if (O)
observer.loc = O.loc
observer.forceMove(O.loc)
else
to_chat(src, "<span class='notice'>Teleporting failed. Ahelp an admin please</span>")
stack_trace("There's no freaking observer landmark available on this map or you're making observers before the map is initialised")
+5 -5
View File
@@ -109,7 +109,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
else
T = locate(round(world.maxx/2), round(world.maxy/2), ZLEVEL_STATION_PRIMARY) //middle of the station
loc = T
forceMove(T)
if(!name) //To prevent nameless ghosts
name = random_unique_name(gender)
@@ -288,10 +288,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/oldloc = loc
if(NewLoc)
loc = NewLoc
forceMove(NewLoc)
update_parallax_contents()
else
loc = get_turf(src) //Get out of closets and such as a ghost
forceMove(get_turf(src)) //Get out of closets and such as a ghost
if((direct & NORTH) && y < world.maxy)
y++
else if((direct & SOUTH) && y > 1)
@@ -371,7 +371,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!L || !L.len)
to_chat(usr, "No area available.")
usr.loc = pick(L)
usr.forceMove(pick(L))
update_parallax_contents()
/mob/dead/observer/verb/follow()
@@ -445,7 +445,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/turf/T = get_turf(M) //Turf of the destination mob
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
A.loc = T
A.forceMove(T)
A.update_parallax_contents()
else
to_chat(A, "This mob is not located in the game world.")
+3 -3
View File
@@ -57,7 +57,7 @@
brainmob = newbrain.brainmob
newbrain.brainmob = null
brainmob.loc = src
brainmob.forceMove(src)
brainmob.container = src
if(!newbrain.damaged_brain) // the brain organ hasn't been beaten to death.
brainmob.stat = CONSCIOUS //we manually revive the brain mob
@@ -90,7 +90,7 @@
/obj/item/device/mmi/proc/eject_brain(mob/user)
brainmob.container = null //Reset brainmob mmi var.
brainmob.loc = brain //Throw mob into brain.
brainmob.forceMove(brain) //Throw mob into brain.
brainmob.stat = DEAD
brainmob.emp_damage = 0
brainmob.reset_perspective() //so the brainmob follows the brain organ instead of the mmi. And to update our vision
@@ -120,7 +120,7 @@
if(ishuman(L))
var/mob/living/carbon/human/H = L
var/obj/item/organ/brain/newbrain = H.getorgan(/obj/item/organ/brain)
newbrain.loc = src
newbrain.forceMove(src)
brain = newbrain
else if(!brain)
brain = new(src)
+1 -1
View File
@@ -157,7 +157,7 @@ GLOBAL_VAR(posibrain_notify_cooldown)
new_name = pick(possible_names)
brainmob.name = "[new_name]-[rand(100, 999)]"
brainmob.real_name = brainmob.name
brainmob.loc = src
brainmob.forceMove(src)
brainmob.container = src
if(autoping)
ping_ghosts("created", TRUE)
@@ -277,7 +277,7 @@ Doesn't work on other aliens/AI.*/
if(user.stomach_contents.len)
for(var/atom/movable/A in user.stomach_contents)
user.stomach_contents.Remove(A)
A.loc = user.loc
A.forceMove(user.drop_location())
if(isliving(A))
var/mob/M = A
M.reset_perspective()
@@ -106,7 +106,7 @@
for(var/atom/movable/A in stomach_contents)
stomach_contents.Remove(A)
new_xeno.stomach_contents.Add(A)
A.loc = new_xeno
A.forceMove(new_xeno)
..()
//For alien evolution/promotion/queen finder procs. Checks for an active alien of that type
+6 -6
View File
@@ -38,7 +38,7 @@
if(prob(src.getBruteLoss() - 50))
for(var/atom/movable/A in stomach_contents)
A.loc = loc
A.forceMove(drop_location())
stomach_contents.Remove(A)
src.gib()
@@ -332,7 +332,7 @@
if (client)
client.screen -= W
if (W)
W.loc = loc
W.forceMove(drop_location())
W.dropped(src)
if (W)
W.layer = initial(W.layer)
@@ -345,7 +345,7 @@
if (client)
client.screen -= W
if (W)
W.loc = loc
W.forceMove(drop_location())
W.dropped(src)
if (W)
W.layer = initial(W.layer)
@@ -372,7 +372,7 @@
else
if(I == handcuffed)
handcuffed.loc = loc
handcuffed.forceMove(drop_location())
handcuffed.dropped(src)
handcuffed = null
if(buckled && buckled.buckle_requires_restraints)
@@ -380,7 +380,7 @@
update_handcuffed()
return
if(I == legcuffed)
legcuffed.loc = loc
legcuffed.forceMove(drop_location())
legcuffed.dropped()
legcuffed = null
update_inv_legcuffed()
@@ -786,7 +786,7 @@
if(prob(50))
organs_amt++
O.Remove(src)
O.loc = get_turf(src)
O.forceMove(drop_location())
if(organs_amt)
to_chat(user, "<span class='notice'>You retrieve some of [src]\'s internal organs!</span>")
@@ -131,7 +131,7 @@
var/obj/item/bodypart/L = pick(bodyparts)
L.embedded_objects |= I
I.add_mob_blood(src)//it embedded itself in you, of course it's bloody!
I.loc = src
I.forceMove(src)
L.receive_damage(I.w_class*I.embedded_impact_pain_multiplier)
visible_message("<span class='danger'>[I] embeds itself in [src]'s [L.name]!</span>","<span class='userdanger'>[I] embeds itself in your [L.name]!</span>")
hitpush = FALSE
@@ -219,7 +219,7 @@
if(prob(25))
var/cType = pick(list(SNPC_BRUTE,SNPC_STEALTH,SNPC_MARTYR,SNPC_PSYCHO))
T.makeTraitor(cType)
T.loc = pick(get_area_turfs(T.job2area(T.myjob)))
T.forceMove(pick(get_area_turfs(T.job2area(T.myjob))))
if(choice == "Custom")
var/cjob = input("Choose Job") as null|anything in SSjob.occupations
if(cjob)
@@ -256,7 +256,7 @@
var/doTele = input("Place the SNPC in their department?") as null|anything in list("Yes","No")
if(doTele)
if(doTele == "Yes")
T.loc = pick(get_area_turfs(T.job2area(T.myjob)))
T.forceMove(pick(get_area_turfs(T.job2area(T.myjob))))
/mob/living/carbon/human/interactive/proc/doSetup()
Path_ID = new /obj/item/card/id(src)
@@ -506,7 +506,7 @@
var/list/slots = list ("left pocket" = slot_l_store,"right pocket" = slot_r_store,"left hand" = slot_hands,"right hand" = slot_hands)
if(hands)
slots = list ("left hand" = slot_hands,"right hand" = slot_hands)
G.loc = src
G.forceMove(src)
if(G.force && G.force > best_force)
best_force = G.force
equip_in_one_of_slots(G, slots)
@@ -931,7 +931,7 @@
/mob/living/carbon/human/interactive/proc/npcDrop(var/obj/item/A,var/blacklist = 0)
if(blacklist)
blacklistItems += A
A.loc = get_turf(src) // drop item works inconsistently
A.forceMove(drop_location()) // drop item works inconsistently
enforce_hands()
update_icons()
@@ -956,7 +956,7 @@
retal_target = traitorTarget
else
var/obj/item/I = traitorTarget
I.loc = get_turf(traitorTarget) // pull it outta them
I.forceMove(get_turf(I)) // pull it outta them
else
take_to_slot(traitorTarget)
if(SNPC_MARTYR)
@@ -1315,7 +1315,7 @@
customEmote("[src] [pick("gibbers","drools","slobbers","claps wildly","spits")], grabbing various foodstuffs from [SF] and sticking them in it's mouth!")
for(var/obj/item/A in SF.contents)
if(prob(smartness/2))
A.loc = src
A.forceMove(src)
if(foundCustom)
@@ -1398,7 +1398,7 @@
if(!Adjacent(toGrab))
tryWalk(toGrab)
else
toGrab.loc = src
toGrab.forceMove(src)
if(finishedList.len > 0)
var/obj/structure/table/reinforced/RT
@@ -1563,7 +1563,7 @@
var/obj/item/W = main_hand
W.attack(TARGET,src)
else
G.loc = get_turf(src) // drop item works inconsistently
G.forceMove(drop_location()) // drop item works inconsistently
enforce_hands()
update_icons()
else
+1 -1
View File
@@ -314,7 +314,7 @@
if(prob(I.embedded_fall_chance))
BP.receive_damage(I.w_class*I.embedded_fall_pain_multiplier)
BP.embedded_objects -= I
I.loc = get_turf(src)
I.forceMove(drop_location())
visible_message("<span class='danger'>[I] falls out of [name]'s [BP.name]!</span>","<span class='userdanger'>[I] falls out of your [BP.name]!</span>")
if(!has_embedded_objects())
clear_alert("embeddedobject")
+1 -1
View File
@@ -117,7 +117,7 @@
job = "AI"
eyeobj.ai = src
eyeobj.loc = src.loc
eyeobj.forceMove(src.loc)
rename_self("ai")
holo_icon = getHologramIcon(icon('icons/mob/ai.dmi',"default"))
@@ -135,7 +135,7 @@
switch(remove_from)
if("head")
if(inventory_head)
inventory_head.loc = src.loc
inventory_head.forceMove(drop_location())
inventory_head = null
update_corgi_fluff()
regenerate_icons()
@@ -144,7 +144,7 @@
return
if("back")
if(inventory_back)
inventory_back.loc = src.loc
inventory_back.forceMove(drop_location())
inventory_back = null
update_corgi_fluff()
regenerate_icons()
@@ -67,7 +67,7 @@
L.dropItemToGround(src)
contents -= drone
drone.loc = get_turf(src)
drone.forceMove(drop_location())
drone.reset_perspective()
drone.setDir(SOUTH )//Looks better
drone.visible_message("<span class='warning'>[drone] uncurls!</span>")
@@ -127,7 +127,7 @@
/mob/living/simple_animal/parrot/death(gibbed)
if(held_item)
held_item.loc = src.loc
held_item.forceMove(drop_location())
held_item = null
walk(src,0)
@@ -702,7 +702,7 @@
continue
held_item = I
I.loc = src
I.forceMove(src)
visible_message("[src] grabs [held_item]!", "<span class='notice'>You grab [held_item]!</span>", "<span class='italics'>You hear the sounds of wings flapping furiously.</span>")
return held_item
@@ -777,7 +777,7 @@
if(!drop_gently)
if(istype(held_item, /obj/item/grenade))
var/obj/item/grenade/G = held_item
G.loc = src.loc
G.forceMove(drop_location())
G.prime()
to_chat(src, "You let go of [held_item]!")
held_item = null
@@ -785,7 +785,7 @@
to_chat(src, "You drop [held_item].")
held_item.loc = src.loc
held_item.forceMove(drop_location())
held_item = null
return 1
@@ -801,7 +801,7 @@
for(var/atom/movable/AM in view(src,1))
for(var/perch_path in desired_perches)
if(istype(AM, perch_path))
src.loc = AM.loc
src.forceMove(AM.loc)
icon_state = icon_sit
return
to_chat(src, "<span class='warning'>There is no perch nearby to sit on!</span>")
@@ -838,7 +838,7 @@
/mob/living/simple_animal/parrot/proc/perch_on_human(mob/living/carbon/human/H)
if(!H)
return
loc = get_turf(H)
forceMove(get_turf(H))
H.buckle_mob(src, force=1)
pixel_y = 9
pixel_x = pick(-8,8) //pick left or right shoulder
@@ -996,7 +996,7 @@
return
var/datum/disease/parrot_possession/P = new
P.parrot = src
loc = H
forceMove(H)
H.ForceContractDisease(P)
parrot_interest = null
H.visible_message("<span class='danger'>[src] dive bombs into [H]'s chest and vanishes!</span>", "<span class='userdanger'>[src] dive bombs into your chest, vanishing! This can't be good!</span>")
+2 -2
View File
@@ -107,7 +107,7 @@
return
mob.control_object.setDir(direct)
else
mob.control_object.loc = get_step(mob.control_object,direct)
mob.control_object.forceMove(get_step(mob.control_object,direct))
return
#define MOVEMENT_DELAY_BUFFER 0.75
@@ -186,7 +186,7 @@
if(LAZYLEN(mob.user_movement_hooks))
for(var/obj/O in mob.user_movement_hooks)
O.intercept_user_move(direct, mob, n, oldloc)
var/atom/movable/P = mob.pulling
if(P && !ismob(P) && P.density)
mob.dir = turn(mob.dir, 180)
+2 -6
View File
@@ -58,7 +58,6 @@
O.suiciding = suiciding
if(hellbound)
O.hellbound = hellbound
O.loc = loc
O.a_intent = INTENT_HARM
//keep viruses?
@@ -113,7 +112,7 @@
var/obj/item/bodypart/chest/torso = O.get_bodypart("chest")
if(cavity_object)
torso.cavity_item = cavity_object //cavity item is given to the new chest
cavity_object.loc = O
cavity_object.forceMove(O)
for(var/missing_zone in missing_bodyparts_zones)
var/obj/item/bodypart/BP = O.get_bodypart(missing_zone)
@@ -220,8 +219,6 @@
if(hellbound)
O.hellbound = hellbound
O.loc = loc
//keep viruses?
if (tr_flags & TR_KEEPVIRUS)
O.viruses = viruses
@@ -276,7 +273,7 @@
var/obj/item/bodypart/chest/torso = get_bodypart("chest")
if(cavity_object)
torso.cavity_item = cavity_object //cavity item is given to the new chest
cavity_object.loc = O
cavity_object.forceMove(O)
for(var/missing_zone in missing_bodyparts_zones)
var/obj/item/bodypart/BP = O.get_bodypart(missing_zone)
@@ -401,7 +398,6 @@
R.mmi.brainmob.real_name = real_name //the name of the brain inside the cyborg is the robotized human's name.
R.mmi.brainmob.name = real_name
R.loc = loc
R.job = "Cyborg"
R.notify_ai(NEW_BORG)
+2 -2
View File
@@ -73,7 +73,7 @@
if(href_list["pen"])
if(haspen)
haspen.loc = usr.loc
haspen.forceMove(usr.loc)
usr.put_in_hands(haspen)
haspen = null
@@ -96,7 +96,7 @@
if(href_list["remove"])
var/obj/item/P = locate(href_list["remove"])
if(istype(P) && P.loc == src)
P.loc = usr.loc
P.forceMove(usr.loc)
usr.put_in_hands(P)
if(P == toppaper)
toppaper = null
+1 -1
View File
@@ -62,7 +62,7 @@
if(href_list["remove"])
var/obj/item/I = locate(href_list["remove"])
if(istype(I) && I.loc == src)
I.loc = usr.loc
I.forceMove(usr.loc)
usr.put_in_hands(I)
if(href_list["read"])
+5 -5
View File
@@ -247,10 +247,10 @@
/obj/machinery/photocopier/proc/remove_photocopy(obj/item/O, mob/user)
if(!issilicon(user)) //surprised this check didn't exist before, putting stuff in AI's hand is bad
O.loc = user.loc
O.forceMove(user.loc)
user.put_in_hands(O)
else
O.loc = src.loc
O.forceMove(drop_location())
to_chat(user, "<span class='notice'>You take [O] out of [src].</span>")
/obj/machinery/photocopier/attackby(obj/item/O, mob/user, params)
@@ -338,16 +338,16 @@
else
user.visible_message("<span class='warning'>[user] puts [target] onto the photocopier!</span>", "<span class='notice'>You put [target] onto the photocopier.</span>")
target.loc = get_turf(src)
target.forceMove(drop_location())
ass = target
if(photocopy)
photocopy.loc = src.loc
photocopy.forceMove(drop_location())
visible_message("<span class='warning'>[photocopy] is shoved out of the way by [ass]!</span>")
photocopy = null
else if(copy)
copy.loc = src.loc
copy.forceMove(drop_location())
visible_message("<span class='warning'>[copy] is shoved out of the way by [ass]!</span>")
copy = null
updateUsrDialog()
+1 -1
View File
@@ -339,7 +339,7 @@
if(href_list["ejectjar"])
if(fueljar)
fueljar.loc = src.loc
fueljar.forceMove(drop_location())
fueljar = null
//fueljar.control_unit = null currently it does not care where it is
//update_icon() when we have the icon for it
+1 -1
View File
@@ -972,7 +972,7 @@
else
to_chat(occupier, "<span class='danger'>Primary core damaged, unable to return core processes.</span>")
if(forced)
occupier.loc = src.loc
occupier.forceMove(drop_location())
occupier.death()
occupier.gib()
for(var/obj/item/pinpointer/nuke/P in GLOB.pinpointer_list)
+1 -1
View File
@@ -427,7 +427,7 @@ By design, d1 is the smallest direction and d2 is the highest
var/obj/O = P_list[1]
// remove the cut cable from its turf and powernet, so that it doesn't get count in propagate_network worklist
if(remove)
loc = null
moveToNullspace()
powernet.remove_cable(src) //remove the cut cable from its powernet
addtimer(CALLBACK(O, .proc/auto_propogate_cut_cable, O), 0) //so we don't rebuild the network X times when singulo/explosion destroys a line of X cables
+1 -1
View File
@@ -132,7 +132,7 @@
var/obj/item/tank/internals/plasma/Z = src.loaded_tank
if (!Z)
return
Z.loc = get_turf(src)
Z.forceMove(drop_location())
Z.layer = initial(Z.layer)
Z.plane = initial(Z.plane)
src.loaded_tank = null
@@ -285,9 +285,8 @@ field_generator power level display
var/field_dir = get_dir(T,get_step(G.loc, NSEW))
T = get_step(T, NSEW)
if(!locate(/obj/machinery/field/containment) in T)
var/obj/machinery/field/containment/CF = new/obj/machinery/field/containment()
var/obj/machinery/field/containment/CF = new(T)
CF.set_master(src,G)
CF.loc = T
CF.setDir(field_dir)
fields += CF
G.fields += CF
+2 -2
View File
@@ -419,7 +419,7 @@
new /obj/item/shard( src.loc )
var/obj/item/circuitboard/computer/solar_control/M = new /obj/item/circuitboard/computer/solar_control( A )
for (var/obj/C in src)
C.loc = src.loc
C.forceMove(drop_location())
A.circuit = M
A.state = 3
A.icon_state = "3"
@@ -430,7 +430,7 @@
var/obj/structure/frame/computer/A = new /obj/structure/frame/computer( src.loc )
var/obj/item/circuitboard/computer/solar_control/M = new /obj/item/circuitboard/computer/solar_control( A )
for (var/obj/C in src)
C.loc = src.loc
C.forceMove(drop_location())
A.circuit = M
A.state = 4
A.icon_state = "4"
+2 -2
View File
@@ -47,7 +47,7 @@
S.glass_type = /obj/item/stack/sheet/glass
S.tracker = 1
S.anchored = TRUE
S.loc = src
S.forceMove(src)
update_icon()
//updates the tracker icon and the facing angle for the control computer
@@ -94,4 +94,4 @@
// Tracker Electronic
/obj/item/electronics/tracker
name = "tracker electronics"
name = "tracker electronics"
@@ -7,7 +7,7 @@
/obj/item/ammo_casing/caseless/fire_casing(atom/target, mob/living/user, params, distro, quiet, zone_override, spread)
if (..()) //successfully firing
loc = null
moveToNullspace()
return 1
else
return 0
@@ -51,10 +51,10 @@
var/obj/item/ammo_casing/bullet = stored_ammo[i]
if(!bullet || !bullet.BB) // found a spent ammo
stored_ammo[i] = R
R.loc = src
R.forceMove(src)
if(bullet)
bullet.loc = get_turf(src.loc)
bullet.forceMove(drop_location())
return 1
return 0
+2 -3
View File
@@ -77,9 +77,8 @@
..()
var/obj/item/gun/G = locate(/obj/item/gun) in contents
if(G)
G.loc = loc
qdel(G.pin)
G.pin = null
G.forceMove(loc)
QDEL_NULL(G.pin)
visible_message("[G] can now fit a new pin, but the old one was destroyed in the process.", null, null, 3)
qdel(src)
+2 -3
View File
@@ -107,13 +107,13 @@
/obj/item/gun/ballistic/attack_self(mob/living/user)
var/obj/item/ammo_casing/AC = chambered //Find chambered round
if(magazine)
magazine.loc = get_turf(src.loc)
magazine.forceMove(drop_location())
user.put_in_hands(magazine)
magazine.update_icon()
magazine = null
to_chat(user, "<span class='notice'>You pull the magazine out of \the [src].</span>")
else if(chambered)
AC.loc = get_turf(src)
AC.forceMove(drop_location())
AC.SpinAnimation(10, 1)
chambered = null
to_chat(user, "<span class='notice'>You unload the round from \the [src]'s chamber.</span>")
@@ -216,4 +216,3 @@
desc = "A foreign knock-off suppressor, it feels flimsy, cheap, and brittle. Still fits all weapons."
icon = 'icons/obj/guns/projectile.dmi'
icon_state = "suppressor"
@@ -325,7 +325,7 @@
else if(cover_open && magazine)
//drop the mag
magazine.update_icon()
magazine.loc = get_turf(src.loc)
magazine.forceMove(drop_location())
user.put_in_hands(magazine)
magazine = null
update_icon()
@@ -39,7 +39,7 @@
var/obj/item/ammo_casing/CB
CB = magazine.get_round(0)
if(CB)
CB.loc = get_turf(src.loc)
CB.forceMove(drop_location())
CB.SpinAnimation(10, 1)
CB.update_icon()
num_unloaded++
@@ -289,7 +289,7 @@
var/obj/item/ammo_casing/CB
CB = magazine.get_round(0)
chambered = null
CB.loc = get_turf(src.loc)
CB.forceMove(drop_location())
CB.update_icon()
num_unloaded++
if (num_unloaded)
@@ -56,7 +56,7 @@
/obj/item/gun/ballistic/shotgun/proc/pump_unload(mob/M)
if(chambered)//We have a shell in the chamber
chambered.loc = get_turf(src)//Eject casing
chambered.forceMove(drop_location())//Eject casing
chambered.SpinAnimation(5, 1)
chambered = null
+3 -3
View File
@@ -502,11 +502,11 @@
if(!do_pierce)
return FALSE
if(pierced[target]) //we already pierced them go away
loc = get_turf(target)
forceMove(get_turf(target))
return TRUE
if(isclosedturf(target))
if(wall_pierce++ < wall_pierce_amount)
loc = target
forceMove(target)
if(prob(wall_devastate))
if(iswallturf(target))
var/turf/closed/wall/W = target
@@ -522,7 +522,7 @@
var/obj/O = AM
O.take_damage((impact_structure_damage + aoe_structure_damage) * structure_bleed_coeff * get_damage_coeff(AM), BURN, "energy", FALSE)
pierced[AM] = TRUE
loc = get_turf(AM)
forceMove(AM.drop_location())
structure_pierce++
return TRUE
return FALSE
+2 -2
View File
@@ -42,7 +42,7 @@
if(!S)
return 0
S.loc = user.loc
S.forceMove(user.loc)
syringes.Remove(S)
to_chat(user, "<span class='notice'>You unload [S] from \the [src].</span>")
@@ -101,4 +101,4 @@
return TRUE
else
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
return FALSE
return FALSE
@@ -100,7 +100,7 @@
/obj/item/projectile/meteor/Collide(atom/A)
if(A == firer)
loc = A.loc
forceMove(A.loc)
return
A.ex_act(EXPLODE_HEAVY)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
@@ -612,4 +612,3 @@
knockdown = 0
nodamage = TRUE
return ..()
+2 -2
View File
@@ -29,7 +29,7 @@
if(make_from)
setDir(make_from.dir)
make_from.loc = null
make_from.moveToNullspace()
stored = make_from
pressure_charging = FALSE // newly built disposal bins start with pump off
else
@@ -471,7 +471,7 @@
if(isobj(AM))
var/obj/O = AM
O.loc = src
O.forceMove(src)
else if(ismob(AM))
var/mob/M = AM
if(prob(2)) // to prevent mobs being stuck in infinite loops
+3 -3
View File
@@ -219,8 +219,8 @@
return
var/turf/dropturf = get_turf(pick(view(1,src)))
if(!dropturf) //Failsafe to prevent the object being lost in the void forever.
dropturf = get_turf(src)
loaded_item.loc = dropturf
dropturf = drop_location()
loaded_item.forceMove(dropturf)
if(delete)
qdel(loaded_item)
loaded_item = null
@@ -510,7 +510,7 @@
throwSmoke(loc)
if(trackedRuntime)
throwSmoke(trackedRuntime.loc)
trackedRuntime.loc = loc
trackedRuntime.forceMove(drop_location())
investigate_log("Experimentor has stolen Runtime!", INVESTIGATE_EXPERIMENTOR)
else
new /mob/living/simple_animal/pet/cat(loc)
+1 -2
View File
@@ -119,7 +119,7 @@
return
if(!my_port)
my_port = new /obj/docking_port/stationary()
my_port = new(locate(eyeobj.x - x_offset, eyeobj.y - y_offset, eyeobj.z))
my_port.name = shuttlePortName
my_port.id = shuttlePortId
my_port.height = shuttle_port.height
@@ -128,7 +128,6 @@
my_port.dwidth = shuttle_port.dwidth
my_port.hidden = shuttle_port.hidden
my_port.dir = the_eye.dir
my_port.loc = locate(eyeobj.x - x_offset, eyeobj.y - y_offset, eyeobj.z)
if(current_user.client)
current_user.client.images -= the_eye.placed_images
@@ -142,11 +142,11 @@
//when a limb is dropped, the internal organs are removed from the mob and put into the limb
/obj/item/organ/proc/transfer_to_limb(obj/item/bodypart/LB, mob/living/carbon/C)
Remove(C)
loc = LB
forceMove(LB)
/obj/item/organ/brain/transfer_to_limb(obj/item/bodypart/head/LB, mob/living/carbon/human/C)
Remove(C) //Changeling brain concerns are now handled in Remove
loc = LB
forceMove(LB)
LB.brain = src
if(brainmob)
LB.brainmob = brainmob
@@ -265,7 +265,7 @@
attach_limb(C, special)
/obj/item/bodypart/proc/attach_limb(mob/living/carbon/C, special)
loc = null
moveToNullspace()
owner = C
C.bodyparts += src
if(held_index)