.loc = to forceMove() (#4937)

As requested, this PR is changed to only include all .loc = to forceMove() changes.
This commit is contained in:
BurgerLUA
2018-08-04 01:48:58 +03:00
committed by Erki
parent 187613428e
commit 8519dcc393
376 changed files with 968 additions and 1261 deletions
@@ -134,7 +134,7 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player)
var/obj/O = locate("landmark*Observer-Start")
if(istype(O))
src << "<span class='notice'>Now teleporting.</span>"
observer.loc = O.loc
observer.forceMove(O.loc)
else
src << "<span class='danger'>Could not locate an observer spawn point. Use the Teleport verb to jump to the station map.</span>"
observer.timeofdeath = world.time // Set the time of death so that the respawn timer works correctly.
@@ -316,7 +316,7 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player)
var/obj/structure/AIcore/deactivated/C = empty_playable_ai_cores[1]
empty_playable_ai_cores -= C
character.loc = C.loc
character.forceMove(C.loc)
AnnounceCyborg(character, rank, "has been downloaded to the empty core in \the [character.loc.loc]")
SSticker.mode.handle_latejoin(character)
@@ -331,7 +331,7 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player)
character.lastarea = get_area(loc)
// Moving wheelchair if they have one
if(character.buckled && istype(character.buckled, /obj/structure/bed/chair/wheelchair))
character.buckled.loc = character.loc
character.buckled.forceMove(character.loc)
character.buckled.set_dir(character.dir)
SSticker.mode.handle_latejoin(character)
-7
View File
@@ -102,19 +102,12 @@ var/list/holder_mob_icon_cache = list()
M.Released()
contained = null
var/mob/L = get_holding_mob()
if (L)
L.drop_from_inventory(src)
qdel(src)
//Similar to above function, but will not deposit things in any container, only directly on a turf.
//Can be called safely anywhere. Notably on holders held or worn on a mob
/obj/item/weapon/holder/proc/release_to_floor()
var/turf/T = get_turf(src)
var/mob/L = get_holding_mob()
if (L)
L.drop_from_inventory(src)
for(var/mob/M in contents)
M.forceMove(T) //if the holder was placed into a disposal, this should place the animal in the disposal
+13 -15
View File
@@ -142,32 +142,30 @@ var/list/slot_equipment_priority = list( \
// Removes an item from inventory and places it in the target atom.
// If canremove or other conditions need to be checked then use unEquip instead.
/mob/proc/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
/mob/proc/drop_from_inventory(var/obj/item/W, var/atom/target = null)
if(W)
if(!Target)
Target = loc
if(!target)
target = loc
remove_from_mob(W)
if(!(W && W.loc)) return 1 // self destroying objects (tk, grabs)
W.forceMove(Target)
if(!(W && W.loc))
return 1
W.forceMove(target)
update_icons()
return 1
return 0
//Drops the item in our left hand
/mob/proc/drop_l_hand(var/atom/Target)
return drop_from_inventory(l_hand, Target)
/mob/proc/drop_l_hand(var/atom/target)
return drop_from_inventory(l_hand, target)
//Drops the item in our right hand
/mob/proc/drop_r_hand(var/atom/Target)
return drop_from_inventory(r_hand, Target)
/mob/proc/drop_r_hand(var/atom/target)
return drop_from_inventory(r_hand, target)
//Drops the item in our active hand. TODO: rename this to drop_active_hand or something
/mob/proc/drop_item(var/atom/Target)
if(hand) return drop_l_hand(Target)
else return drop_r_hand(Target)
/mob/proc/drop_item(var/atom/target)
if(hand) return drop_l_hand(target)
else return drop_r_hand(target)
/*
Removes the object from any slots the mob might have, calling the appropriate icon update proc.
+1 -2
View File
@@ -379,13 +379,12 @@ var/list/cleanbot_types // Going to use this to generate a list of types once th
/obj/item/weapon/bucket_sensor/attackby(var/obj/item/O, var/mob/user)
..()
if(istype(O, /obj/item/robot_parts/l_arm) || istype(O, /obj/item/robot_parts/r_arm))
user.drop_item()
user.drop_from_inventory(O,get_turf(src))
qdel(O)
var/turf/T = get_turf(loc)
var/mob/living/bot/cleanbot/A = new /mob/living/bot/cleanbot(T)
A.name = created_name
user << "<span class='notice'>You add the robot arm to the bucket and sensor assembly. Beep boop!</span>"
user.drop_from_inventory(src)
qdel(src)
else if(istype(O, /obj/item/weapon/pen))
+6 -7
View File
@@ -88,7 +88,7 @@
switch(build_step)
if(0, 1)
if(istype(W, /obj/item/robot_parts/l_leg) || istype(W, /obj/item/robot_parts/r_leg))
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
build_step++
user << "<span class='notice'>You add the robot leg to [src].</span>"
@@ -103,7 +103,7 @@
if(2)
if(istype(W, /obj/item/clothing/suit/storage/vest))
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
build_step++
user << "<span class='notice'>You add the armor to [src].</span>"
@@ -122,7 +122,7 @@
return 1
if(4)
if(istype(W, /obj/item/clothing/head/helmet))
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
build_step++
user << "<span class='notice'>You add the helmet to [src].</span>"
@@ -133,7 +133,7 @@
if(5)
if(isprox(W))
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
build_step++
user << "<span class='notice'>You add the prox sensor to [src].</span>"
@@ -163,7 +163,7 @@
user << "<span class='notice'>You add [W] to [src].</span>"
item_state = "ed209_taser"
icon_state = "ed209_taser"
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
return 1
@@ -184,8 +184,7 @@
user << "<span class='notice'>You complete the ED-209.</span>"
var/turf/T = get_turf(src)
new /mob/living/bot/secbot/ed209(T,created_name,lasercolor)
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
user.drop_from_inventory(src)
qdel(src)
return 1
+2 -5
View File
@@ -266,7 +266,7 @@
new /obj/item/device/analyzer/plant_analyzer(Tsec)
if(tank)
tank.loc = Tsec
tank.forceMove(Tsec)
if(prob(50))
new /obj/item/robot_parts/l_arm(Tsec)
@@ -324,7 +324,6 @@
user << "You add the robot arm to [src]."
loc = A //Place the water tank into the assembly, it will be needed for the finished bot
user.drop_from_inventory(S)
qdel(S)
/obj/item/weapon/farmbot_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -333,7 +332,6 @@
build_step++
user << "You add the plant analyzer to [src]."
name = "farmbot assembly"
user.remove_from_mob(W)
qdel(W)
return 1
@@ -341,7 +339,6 @@
build_step++
user << "You add a bucket to [src]."
name = "farmbot assembly with bucket"
user.remove_from_mob(W)
qdel(W)
return 1//Prevents the object's afterattack from executing and causing runtime errors
@@ -358,7 +355,7 @@
user << "You complete the Farmbot! Beep boop."
var/mob/living/bot/farmbot/S = new /mob/living/bot/farmbot(get_turf(src))
for(var/obj/structure/reagent_dispensers/watertank/wTank in contents)
wTank.loc = S
wTank.forceMove(S)
S.tank = wTank
S.name = created_name
user.remove_from_mob(W)
-3
View File
@@ -314,7 +314,6 @@
var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles
user.put_in_hands(B)
user << "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>"
user.drop_from_inventory(src)
qdel(src)
else
user << "<span class='warning'>You need 10 floor tiles for a floorbot.</span>"
@@ -340,7 +339,6 @@
B.created_name = created_name
user.put_in_hands(B)
user << "<span class='notice'>You add the sensor to the toolbox and tiles!</span>"
user.drop_from_inventory(src)
qdel(src)
return 1
else if (istype(W, /obj/item/weapon/pen))
@@ -371,7 +369,6 @@
var/mob/living/bot/floorbot/A = new /mob/living/bot/floorbot(T)
A.name = created_name
user << "<span class='notice'>You add the robot arm to the odd looking toolbox assembly! Boop beep!</span>"
user.drop_from_inventory(src)
qdel(src)
return 1
else if(istype(W, /obj/item/weapon/pen))
+5 -8
View File
@@ -171,8 +171,7 @@
user << "<span class='notice'>There is already a beaker loaded.</span>"
return
user.drop_item()
O.loc = src
user.drop_from_inventory(O,src)
reagent_glass = O
user << "<span class='notice'>You insert [O].</span>"
return 1
@@ -216,7 +215,7 @@
else if (href_list["eject"] && (!isnull(reagent_glass)))
if(!locked)
reagent_glass.loc = get_turf(src)
reagent_glass.forceMove(get_turf(src))
reagent_glass = null
else
usr << "<span class='notice'>You cannot eject the beaker because the panel is locked.</span>"
@@ -257,7 +256,7 @@
new /obj/item/robot_parts/l_arm(Tsec)
if(reagent_glass)
reagent_glass.loc = Tsec
reagent_glass.forceMove(Tsec)
reagent_glass = null
spark(src, 3, alldirs)
@@ -329,7 +328,6 @@
qdel(S)
user.put_in_hands(A)
user << "<span class='notice'>You add the robot arm to the first aid kit.</span>"
user.drop_from_inventory(src)
qdel(src)
/obj/item/weapon/firstaid_arm_assembly
@@ -360,7 +358,7 @@
switch(build_step)
if(0)
if(istype(W, /obj/item/device/healthanalyzer))
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
build_step++
user << "<span class='notice'>You add the health sensor to [src].</span>"
@@ -370,13 +368,12 @@
if(1)
if(isprox(W))
user.drop_item()
user.drop_from_inventory(W,get_turf(src))
qdel(W)
user << "<span class='notice'>You complete the Medibot! Beep boop.</span>"
var/turf/T = get_turf(src)
var/mob/living/bot/medbot/S = new /mob/living/bot/medbot(T)
S.skin = skin
S.name = created_name
user.drop_from_inventory(src)
qdel(src)
return 1
+3 -3
View File
@@ -552,28 +552,28 @@
return 1
else if(isprox(O) && (build_step == 1))
user.drop_item()
build_step = 2
user << "You add \the [O] to [src]."
add_overlay("hs_eye")
name = "helmet/signaler/prox sensor assembly"
user.drop_from_inventory(O,get_turf(src))
qdel(O)
return 1
else if((istype(O, /obj/item/robot_parts/l_arm) || istype(O, /obj/item/robot_parts/r_arm)) && build_step == 2)
user.drop_item()
build_step = 3
user << "You add \the [O] to [src]."
name = "helmet/signaler/prox sensor/robot arm assembly"
add_overlay("hs_arm")
user.drop_from_inventory(O,get_turf(src))
qdel(O)
return 1
else if(istype(O, /obj/item/weapon/melee/baton) && build_step == 3)
user.drop_item()
user << "You complete the Securitron! Beep boop."
var/mob/living/bot/secbot/S = new /mob/living/bot/secbot(get_turf(src))
S.name = created_name
user.drop_from_inventory(O,get_turf(src))
qdel(O)
qdel(src)
return 1
@@ -19,7 +19,7 @@
get_scooped(H)
return
else if(H.a_intent == "grab" && hat && !(H.l_hand && H.r_hand))
hat.loc = get_turf(src)
hat.forceMove(get_turf(src))
H.put_in_hands(hat)
H.visible_message("<span class='danger'>\The [H] removes \the [src]'s [hat].</span>")
hat = null
@@ -127,7 +127,7 @@
return
/mob/living/carbon/alien/diona/put_in_hands(var/obj/item/W) // No hands.
W.loc = get_turf(src)
W.forceMove(get_turf(src))
return 1
@@ -137,7 +137,7 @@
src << "<span class='notice'>You feel your being twine with that of \the [D] as it merges with your biomass.</span>"
for(var/obj/O in D.contents)
D.drop_from_inventory(O)
D.loc = src
D.forceMove(src)
D.stat = CONSCIOUS
status_flags |= PASSEMOTES
@@ -175,7 +175,7 @@
gestalt.nutrition -= NYMPH_ABSORB_NUTRITION//Preventing an exploit with repeatedly absorbing and splitting
split_languages(gestalt)
src.loc = get_turf(src)
src.forceMove(get_turf(src))
stat = CONSCIOUS
gestalt = null
update_verbs()
@@ -12,7 +12,7 @@
if(istype(loc,/obj/item/weapon/holder/diona))
var/obj/item/weapon/holder/diona/L = loc
src.loc = L.loc
src.forceMove(L.loc)
qdel(L)
return "Diona"
@@ -76,7 +76,6 @@
//Although we are still host, these nymphs become neighbors, not contents
for(var/mob/living/carbon/alien/diona/D in contents)
D.forceMove(adult)
D.loc = adult
D.gestalt = adult
D.stat = CONSCIOUS
@@ -84,7 +83,6 @@
//Our mind is already in the gestalt, this is really just transferring our empty body
src.nutrition = 0
src.forceMove(adult)
src.loc = adult
src.stat = CONSCIOUS
src.gestalt = adult
@@ -52,7 +52,7 @@
var/obj/item/organ/external/E = pick(H.organs)
src << "<span class='danger'>You burrow deeply into \the [H]'s [E.name]!</span>"
var/obj/item/weapon/holder/holder = new (loc)
src.loc = holder
src.forceMove(holder)
holder.name = src.name
E.embed(holder,0,"\The [src] burrows deeply into \the [H]'s [E.name]!")
@@ -102,9 +102,9 @@
affected = organ
break
affected.implants -= holder
holder.loc = get_turf(holder)
holder.forceMove(get_turf(holder))
else
src.loc = get_turf(src)
src.forceMove(get_turf(src))
if(affected)
src << "<span class='danger'>You crawl out of \the [H]'s [affected.name] and plop to the ground.</span>"
else
+5 -5
View File
@@ -51,15 +51,15 @@
brainmob = B.brainmob
B.brainmob = null
brainmob.loc = src
brainmob.forceMove(src)
brainmob.container = src
brainmob.stat = 0
dead_mob_list -= brainmob//Update dem lists
living_mob_list += brainmob
user.drop_item()
brainobj = B
brainobj.loc = src
user.drop_from_inventory(brainobj,src)
name = "Man-Machine Interface: [brainmob.real_name]"
icon_state = "mmi_full"
@@ -92,13 +92,13 @@
user << "<span class='notice'>You upend the MMI, spilling the brain onto the floor.</span>"
var/obj/item/organ/brain/brain
if (brainobj) //Pull brain organ out of MMI.
brainobj.loc = user.loc
brainobj.forceMove(user.loc)
brain = brainobj
brainobj = null
else //Or make a new one if empty.
brain = new(user.loc)
brainmob.container = null//Reset brainmob mmi var.
brainmob.loc = brain//Throw mob into brain.
brainmob.forceMove(brain)//Throw mob into brain.
living_mob_list -= brainmob//Get outta here
brain.brainmob = brainmob//Set the brain to use the brainmob
brainmob = null//Set mmi brainmob var to null
+2 -2
View File
@@ -68,7 +68,7 @@
if(prob(src.getBruteLoss() - 50))
for(var/atom/movable/A in stomach_contents)
A.loc = loc
A.forceMove(loc)
LAZYREMOVE(stomach_contents, A)
src.gib()
@@ -76,7 +76,7 @@
for(var/mob/M in src)
if(M in src.stomach_contents)
LAZYREMOVE(src.stomach_contents, M)
M.loc = src.loc
M.forceMove(src.loc)
for(var/mob/N in viewers(src, null))
if(N.client)
N.show_message(text("<span class='danger'>[M] bursts out of [src]!</span>"), 2)
@@ -1524,7 +1524,7 @@
"<span class='danger'>You pop [S]'s [current_limb.joint] back in!</span>")
current_limb.undislocate()
/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/target = null)
if(W in organs)
return
..()
@@ -41,7 +41,7 @@ emp_act
var/obj/item/weapon/SP = new P.shrapnel_type()
SP.name = (P.name != "shrapnel")? "[P.name] shrapnel" : "shrapnel"
SP.desc = "[SP.desc] It looks like it was fired from [P.shot_from]."
SP.loc = organ
SP.forceMove(organ)
organ.embed(SP)
return (..(P , def_zone))
@@ -400,7 +400,7 @@ emp_act
var/turf/T = near_wall(dir,2)
if(T)
src.loc = T
src.forceMove(T)
visible_message("<span class='warning'>[src] is pinned to the wall by [O]!</span>","<span class='warning'>You are pinned to the wall by [O]!</span>")
src.anchored = 1
src.pinned += O
@@ -408,7 +408,6 @@ This saves us from having to call add_fingerprint() any time something is put in
/mob/living/carbon/human/put_in_l_hand(var/obj/item/W)
if(!..() || l_hand)
return 0
W.forceMove(src)
l_hand = W
W.equipped(src,slot_l_hand)
@@ -419,7 +418,6 @@ This saves us from having to call add_fingerprint() any time something is put in
/mob/living/carbon/human/put_in_r_hand(var/obj/item/W)
if(!..() || r_hand)
return 0
W.forceMove(src)
r_hand = W
W.equipped(src,slot_r_hand)
+1 -1
View File
@@ -736,7 +736,7 @@ default behaviour is:
layer = UNDERDOOR
underdoor = 1
/mob/living/carbon/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
/mob/living/carbon/drop_from_inventory(var/obj/item/W, var/atom/target = null)
if(W in internal_organs)
return
..()
+2 -2
View File
@@ -214,13 +214,13 @@
var/turf/T = near_wall(dir,2)
if(T)
src.loc = T
src.forceMove(T)
visible_message("<span class='warning'>[src] is pinned to the wall by [O]!</span>","<span class='warning'>You are pinned to the wall by [O]!</span>")
src.anchored = 1
src.pinned += O
/mob/living/proc/embed(var/obj/O, var/def_zone=null)
O.loc = src
O.forceMove(src)
src.embedded += O
src.verbs += /mob/proc/yank_out_object
+3 -2
View File
@@ -35,7 +35,7 @@ var/controlling
return 0
src.host = host
src.loc = host
src.forceMove(host)
host.parasites.Add(src)
if(client) client.eye = host
@@ -96,7 +96,8 @@ var/controlling
/mob/living/parasite/meme/death()
// make sure the mob is on the actual map before gibbing
if(host) src.loc = host.loc
if(host)
src.forceMove(host.loc)
src.stat = 2
..()
qdel(src)
+1 -1
View File
@@ -2,7 +2,7 @@
if(card)
card.removePersonality()
if(gibbed)
src.loc = get_turf(card)
src.forceMove(get_turf(card))
qdel(card)
else
close_up()
+5 -6
View File
@@ -462,15 +462,14 @@
if(istype(H))
var/mob/living/M = H.loc
if(istype(M))
M.drop_from_inventory(H)
H.loc = get_turf(src)
src.loc = get_turf(H)
M.drop_from_inventory(H,get_turf(src))
else
H.forceMove(get_turf(src))
src.forceMove(get_turf(H))
// Move us into the card and move the card to the ground.
src.loc = card
card.loc = get_turf(card)
src.forceMove(card)
card.forceMove(card.loc)
card.forceMove(get_turf(card))
canmove = 1
resting = 0
icon_state = "[chassis]"
@@ -99,7 +99,7 @@
..()
tank = new/obj/item/weapon/tank/jetpack/carbondioxide/synthetic
owner.internals = tank
tank.loc = owner
tank.forceMove(owner)
owner.jetpack = tank
/datum/robot_component/jetpack/uninstall()
@@ -89,7 +89,7 @@
/mob/living/silicon/robot/drone/Destroy()
if(hat)
hat.loc = get_turf(src)
hat.forceMove(get_turf(src))
return ..()
/mob/living/silicon/robot/drone/construction
@@ -26,7 +26,7 @@
get_scooped(H)
return
else if(H.a_intent == "grab" && hat && !(H.l_hand && H.r_hand))
hat.loc = get_turf(src)
hat.forceMove(get_turf(src))
H.put_in_hands(hat)
H.visible_message("<span class='danger'>\The [H] removes \the [src]'s [hat].</span>")
hat = null
@@ -63,7 +63,7 @@
if(istype(I,typepath))
if (feedback)
user << "You collect \the [I]."
I.loc = src
I.forceMove(src)
wrapped = I
update_icon()
return 1
@@ -270,20 +270,20 @@
//If our active module is a gripper, drop the thing in it.
//Otherwise do nothing. We don't drop our modules
/mob/living/silicon/robot/drop_item(var/atom/Target)
/mob/living/silicon/robot/drop_item(var/atom/target)
if (istype(module_active, /obj/item/weapon/gripper))
var/obj/item/weapon/gripper/G = module_active
G.drop(Target)
G.drop(target)
/mob/living/silicon/robot/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
/mob/living/silicon/robot/drop_from_inventory(var/obj/item/W, var/atom/target = null)
if(W)
if(!Target)
Target = loc
if(!target)
target = loc
if (istype(W.loc, /obj/item/weapon/gripper))
var/obj/item/weapon/gripper/G = W.loc
G.drop(Target)
G.drop(target)
return 1
return 0
@@ -243,7 +243,8 @@
/mob/living/silicon/robot/Destroy()
if(mmi && mind)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside.
var/turf/T = get_turf(loc)//To hopefully prevent run time errors.
if(T) mmi.loc = T
if(T)
mmi.forceMove(T)
if(mmi.brainmob)
mind.transfer_to(mmi.brainmob)
else
@@ -665,7 +666,7 @@
I.brute = C.brute_damage
I.burn = C.electronics_damage
I.loc = src.loc
I.forceMove(src.loc)
if(C.installed == 1)
C.uninstall()
@@ -687,9 +688,9 @@
storage = null
else
user << "You install \the [W]"
user.drop_item()
storage = W
W.forceMove(src)
user.drop_from_inventory(W,src)
recalculate_synth_capacities()
else if (istype(W, /obj/item/weapon/cell) && opened) // trying to put a cell inside
@@ -701,8 +702,7 @@
else if(W.w_class != 3)
user << "\The [W] is too [W.w_class < 3? "small" : "large"] to fit here."
else
user.drop_item()
W.loc = src
user.drop_from_inventory(W,src)
cell = W
user << "You insert the power cell."
@@ -762,8 +762,7 @@
else
if(U.action(src))
usr << "You apply the upgrade to [src]!"
usr.drop_item()
U.loc = src
user.drop_from_inventory(U,src)
else
usr << "Upgrade error!"
@@ -69,7 +69,7 @@
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 1)
if(response == "Eject")
if(loaded_item)
loaded_item.loc = get_turf(src)
loaded_item.forceMove(get_turf(src))
desc = initial(desc)
icon_state = initial(icon_state)
loaded_item = null
@@ -161,7 +161,7 @@
if(host.mind)
borers.remove_antagonist(host.mind)
src.loc = get_turf(host)
src.forceMove(get_turf(host))
reset_view(null)
machine = null
@@ -109,7 +109,7 @@
src.host = M
src.host.status_flags |= PASSEMOTES
src.loc = M
src.forceMove(M)
//Update their traitor status.
if(host.mind)
@@ -132,7 +132,7 @@
qdel(animation)
var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade( T.loc )
S.loc = src //put shade in stone
S.forceMove(src) //put shade in stone
S.status_flags |= GODMODE //So they won't die inside the stone somehow
S.canmove = 0//Can't move out of the soul stone
S.name = "Shade of [T.real_name]"
@@ -168,7 +168,7 @@
U << "<span class='danger'>Capture failed!</span>: The soul stone has already been imprinted with [src.imprinted]'s mind!"
return
T.loc = src //put shade in stone
T.forceMove(src) //put shade in stone
T.status_flags |= GODMODE
T.canmove = 0
T.health = T.maxHealth
@@ -262,7 +262,7 @@
span("notice", "\The [user] feeds \the [O] to \the [name]! It clucks happily."),
span("notice", "You feed \the [O] to \the [name]! It clucks happily."),
"You hear a cluck.")
user.drop_item()
user.drop_from_inventory(O,get_turf(src))
qdel(O)
eggsleft += rand(1, 4)
else
@@ -84,11 +84,10 @@
positronic = 1
add_language("Robot Talk")
user.drop_item()
src.mmi = O
src.transfer_personality(O)
O.loc = src
user.drop_from_inventory(O,src)
src.update_icon()
return 1
@@ -123,7 +122,7 @@
user << "<span class='notice'>You swipe your access card and pop the brain out of \the [src].</span>"
eject_brain()
if(held_item)
held_item.loc = src.loc
held_item.forceMove(src.loc)
held_item = null
return 1
else
@@ -172,7 +171,7 @@
if(mmi)
var/turf/T = get_turf(loc)
if(T)
mmi.loc = T
mmi.forceMove(T)
if(mind) mind.transfer_to(mmi.brainmob)
mmi = null
real_name = initial(real_name)
@@ -203,7 +202,7 @@
camera.status = 0
if (held_item)
held_item.loc = src.loc
held_item.forceMove(src.loc)
held_item = null
eject_brain()
@@ -229,7 +228,7 @@
"<span class='danger'>You launch \the [held_item]!</span>", \
"You hear a skittering noise and a thump!")
var/obj/item/weapon/grenade/G = held_item
G.loc = src.loc
G.forceMove(src.loc)
G.prime()
held_item = null
return 1
@@ -238,7 +237,7 @@
"<span class='notice'>You drop \the [held_item].</span>", \
"You hear a skittering noise and a soft thump.")
held_item.loc = src.loc
held_item.forceMove(src.loc)
held_item = null
return 1
@@ -267,7 +266,7 @@
for(var/obj/item/I in view(1, src))
if(selection == I)
held_item = selection
selection.loc = src
selection.forceMove(src)
visible_message("<span class='notice'>\The [src] scoops up \the [held_item].</span>", \
"<span class='notice'>You grab \the [held_item].</span>", \
"You hear a skittering noise and a clink.")
@@ -65,7 +65,7 @@
/mob/living/simple_animal/hostile/mimic/crate/Initialize()
. = ..()
for(var/obj/item/I in loc)
I.loc = src
I.forceMove(src)
/mob/living/simple_animal/hostile/mimic/crate/DestroySurroundings()
..()
@@ -111,7 +111,7 @@
var/obj/structure/closet/crate/C = new(get_turf(src))
// Put loot in crate
for(var/obj/O in src)
O.loc = C
O.forceMove(C)
..()
/mob/living/simple_animal/hostile/mimic/crate/AttackingTarget()
@@ -143,7 +143,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
/mob/living/simple_animal/hostile/mimic/copy/death()
for(var/atom/movable/M in src)
M.loc = get_turf(src)
M.forceMove(get_turf(src))
..()
/mob/living/simple_animal/hostile/mimic/copy/ListTargets()
+10 -11
View File
@@ -110,7 +110,7 @@
/mob/living/simple_animal/parrot/death()
if(held_item)
held_item.loc = src.loc
held_item.forceMove(src.loc)
held_item = null
walk(src,0)
..()
@@ -155,7 +155,7 @@
src.say("[pick(available_channels)] BAWWWWWK LEAVE THE HEADSET BAWKKKKK!")
else
src.say("BAWWWWWK LEAVE THE HEADSET BAWKKKKK!")
ears.loc = src.loc
ears.forceMove(src.loc)
ears = null
for(var/possible_phrase in speak)
if(copytext(possible_phrase,1,3) in department_radio_keys)
@@ -186,8 +186,7 @@
var/obj/item/device/radio/headset/headset_to_add = item_to_add
usr.drop_item()
headset_to_add.loc = src
usr.drop_from_inventory(headset_to_add,src)
src.ears = headset_to_add
usr << "You fit the headset onto [src]."
@@ -408,7 +407,7 @@
else //This should ensure that we only grab the item we want, and make sure it's not already collected on our perch
if(!parrot_perch || parrot_interest.loc != parrot_perch.loc)
held_item = parrot_interest
parrot_interest.loc = src
parrot_interest.forceMove(src)
visible_message("[src] grabs the [held_item]!", "<span class='notice'>You grab the [held_item]!</span>", "You hear the sounds of wings flapping furiously.")
parrot_interest = null
@@ -427,7 +426,7 @@
return
if(in_range(src, parrot_perch))
src.loc = parrot_perch.loc
src.forceMove(parrot_perch.loc)
drop_held_item()
parrot_state = PARROT_PERCH
icon_state = "parrot_sit"
@@ -581,7 +580,7 @@
continue
held_item = I
I.loc = src
I.forceMove(src)
visible_message("[src] grabs the [held_item]!", "<span class='notice'>You grab the [held_item]!</span>", "You hear the sounds of wings flapping furiously.")
return held_item
@@ -612,7 +611,7 @@
if(stolen_item)
C.remove_from_mob(stolen_item)
held_item = stolen_item
stolen_item.loc = src
stolen_item.forceMove(src)
visible_message("[src] grabs the [held_item] out of [C]'s hand!", "<span class='notice'>You snag the [held_item] out of [C]'s hand!</span>", "You hear the sounds of wings flapping furiously.")
return held_item
@@ -646,7 +645,7 @@
if(!drop_gently)
if(istype(held_item, /obj/item/weapon/grenade))
var/obj/item/weapon/grenade/G = held_item
G.loc = src.loc
G.forceMove(src.loc)
G.prime()
src << "You let go of the [held_item]!"
held_item = null
@@ -654,7 +653,7 @@
src << "You drop the [held_item]."
held_item.loc = src.loc
held_item.forceMove(src.loc)
held_item = null
return 1
@@ -670,7 +669,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 = "parrot_sit"
return
src << "<span class='warning'>There is no perch nearby to sit on.</span>"
@@ -514,7 +514,7 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
return verb
/mob/living/simple_animal/put_in_hands(var/obj/item/W) // No hands.
W.loc = get_turf(src)
W.forceMove(get_turf(src))
return 1
// Harvest an animal's delicious byproducts
+2 -2
View File
@@ -210,12 +210,12 @@
shift = -10
adir = assailant.dir
affecting.set_dir(assailant.dir)
affecting.loc = assailant.loc
affecting.forceMove(assailant.loc)
if(GRAB_KILL)
shift = 0
adir = 1
affecting.set_dir(SOUTH) //face up
affecting.loc = assailant.loc
affecting.forceMove(assailant.loc)
switch(adir)
if(NORTH)
-2
View File
@@ -107,8 +107,6 @@
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Headbutted by [attacker.name] ([attacker.ckey])</font>")
msg_admin_attack("[key_name(attacker)] has headbutted [key_name(target)]",ckey=key_name(attacker),ckey_target=key_name(target))
attacker.drop_from_inventory(src)
src.loc = null
qdel(src)
return
+2 -2
View File
@@ -136,7 +136,7 @@
if (sloc.name == "AI")
loc_landmark = sloc
O.loc = loc_landmark.loc
O.forceMove(loc_landmark.loc)
O.on_mob_init()
@@ -181,7 +181,7 @@
else
O.key = key
O.loc = loc
O.forceMove(loc)
O.job = "Cyborg"
if(O.mind.assigned_role == "Cyborg")
if(O.mind.role_alt_title == "Android")