mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 12:13:06 +00:00
Merge pull request #11105 from PsiOmegaDelta/150914-ForcedWheelchair
Converts some loc = to forceMove()
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
set_dir(direction)
|
||||
if(pulling) // Driver
|
||||
if(pulling.loc == src.loc) // We moved onto the wheelchair? Revert!
|
||||
pulling.loc = T
|
||||
pulling.forceMove(T)
|
||||
else
|
||||
spawn(0)
|
||||
if(get_dist(src, pulling) > 1) // We are too far away? Losing control.
|
||||
@@ -107,7 +107,7 @@
|
||||
pulling = null
|
||||
else
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
|
||||
src.forceMove(occupant.loc) // Failsafe to make sure the wheelchair stays beneath the occupant after driving
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
|
||||
if (pulling)
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
|
||||
if(target)
|
||||
var/obj/item/firing = new fabrication_type()
|
||||
firing.loc = get_turf(src)
|
||||
firing.forceMove(get_turf(src))
|
||||
H.visible_message("<span class='danger'>[H] launches \a [firing]!</span>")
|
||||
firing.throw_at(target,fire_force,fire_distance)
|
||||
else
|
||||
@@ -233,7 +233,7 @@
|
||||
H << "<span class='danger'>Your hands are full."
|
||||
else
|
||||
var/obj/item/new_weapon = new fabrication_type()
|
||||
new_weapon.loc = H
|
||||
new_weapon.forceMove(H)
|
||||
H << "<font color='blue'><b>You quickly fabricate \a [new_weapon].</b></font>"
|
||||
H.put_in_hands(new_weapon)
|
||||
|
||||
|
||||
@@ -68,9 +68,9 @@
|
||||
if(!verb_holder)
|
||||
verb_holder = new(src)
|
||||
if(integrated_ai)
|
||||
verb_holder.loc = integrated_ai
|
||||
verb_holder.forceMove(integrated_ai)
|
||||
else
|
||||
verb_holder.loc = src
|
||||
verb_holder.forceMove(src)
|
||||
|
||||
/obj/item/rig_module/ai_container/accepts_item(var/obj/item/input_device, var/mob/living/user)
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
else if(user)
|
||||
user.put_in_hands(ai_card)
|
||||
else
|
||||
ai_card.loc = get_turf(src)
|
||||
ai_card.forceMove(get_turf(src))
|
||||
ai_card = null
|
||||
integrated_ai = null
|
||||
update_verb_holder()
|
||||
@@ -209,7 +209,7 @@
|
||||
return 0
|
||||
else
|
||||
user.drop_from_inventory(ai)
|
||||
ai.loc = src
|
||||
ai.forceMove(src)
|
||||
ai_card = ai
|
||||
ai_mob << "<font color='blue'>You have been transferred to \the [holder]'s [src].</font>"
|
||||
user << "<font color='blue'>You load [ai_mob] into \the [holder]'s [src].</font>"
|
||||
|
||||
@@ -123,13 +123,13 @@
|
||||
H << "<span class='warning'>You cannot teleport to a location with solid objects.</span>"
|
||||
|
||||
phase_out(H,get_turf(H))
|
||||
H.loc = T
|
||||
H.forceMove(T)
|
||||
phase_in(H,get_turf(H))
|
||||
|
||||
for(var/obj/item/weapon/grab/G in H.contents)
|
||||
if(G.affecting)
|
||||
phase_out(G.affecting,get_turf(G.affecting))
|
||||
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)
|
||||
G.affecting.forceMove(locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z))
|
||||
phase_in(G.affecting,get_turf(G.affecting))
|
||||
|
||||
return 1
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
if(istype(piece.loc, /mob/living))
|
||||
M = piece.loc
|
||||
M.drop_from_inventory(piece)
|
||||
piece.loc = src
|
||||
piece.forceMove(src)
|
||||
|
||||
if(!istype(wearer) || loc != wearer || wearer.back != src || canremove || !cell || cell.charge <= 0)
|
||||
if(!cell || cell.charge <= 0)
|
||||
@@ -558,7 +558,7 @@
|
||||
if(M && M.back == src)
|
||||
M.back = null
|
||||
M.drop_from_inventory(src)
|
||||
src.loc = get_turf(src)
|
||||
src.forceMove(get_turf(src))
|
||||
return
|
||||
|
||||
if(istype(M) && M.back == src)
|
||||
@@ -614,10 +614,10 @@
|
||||
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "retract" : "retracts"] swiftly.</b></font>"
|
||||
use_obj.canremove = 1
|
||||
holder.drop_from_inventory(use_obj)
|
||||
use_obj.loc = get_turf(src)
|
||||
use_obj.forceMove(get_turf(src))
|
||||
use_obj.dropped()
|
||||
use_obj.canremove = 0
|
||||
use_obj.loc = src
|
||||
use_obj.forceMove(src)
|
||||
|
||||
else if (deploy_mode != ONLY_RETRACT)
|
||||
if(check_slot)
|
||||
@@ -625,9 +625,9 @@
|
||||
H << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.</span>"
|
||||
return
|
||||
else
|
||||
use_obj.loc = H
|
||||
use_obj.forceMove(H)
|
||||
if(!H.equip_to_slot_if_possible(use_obj, equip_to, 0))
|
||||
use_obj.loc = src
|
||||
use_obj.forceMove(src)
|
||||
else
|
||||
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</b></span>"
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
user.drop_from_inventory(W)
|
||||
air_supply = W
|
||||
W.loc = src
|
||||
W.forceMove(src)
|
||||
user << "You slot [W] into [src] and tighten the connecting valve."
|
||||
return
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
user << "You install \the [mod] into \the [src]."
|
||||
user.drop_from_inventory(mod)
|
||||
installed_modules |= mod
|
||||
mod.loc = src
|
||||
mod.forceMove(src)
|
||||
mod.installed(src)
|
||||
update_icon()
|
||||
return 1
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
user << "You jack \the [W] into \the [src]'s battery mount."
|
||||
user.drop_from_inventory(W)
|
||||
W.loc = src
|
||||
W.forceMove(src)
|
||||
src.cell = W
|
||||
return
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
return
|
||||
|
||||
if(user.r_hand && user.l_hand)
|
||||
air_supply.loc = get_turf(user)
|
||||
air_supply.forceMove(get_turf(user))
|
||||
else
|
||||
user.put_in_hands(air_supply)
|
||||
user << "You detach and remove \the [air_supply]."
|
||||
@@ -147,9 +147,9 @@
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
module.deactivate()
|
||||
if(user.r_hand && user.l_hand)
|
||||
cell.loc = get_turf(user)
|
||||
cell.forceMove(get_turf(user))
|
||||
else
|
||||
cell.loc = user.put_in_hands(cell)
|
||||
cell.forceMove(user.put_in_hands(cell))
|
||||
cell = null
|
||||
else
|
||||
user << "There is nothing loaded in that mount."
|
||||
@@ -172,7 +172,7 @@
|
||||
|
||||
var/obj/item/rig_module/removed = possible_removals[removal_choice]
|
||||
user << "You detatch \the [removed] from \the [src]."
|
||||
removed.loc = get_turf(src)
|
||||
removed.forceMove(get_turf(src))
|
||||
removed.removed()
|
||||
installed_modules -= removed
|
||||
update_icon()
|
||||
|
||||
@@ -78,13 +78,13 @@ var/list/slot_equipment_priority = list( \
|
||||
if(istype(src.back,/obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/backpack = src.back
|
||||
if(backpack.contents.len < backpack.storage_slots)
|
||||
newitem.loc = src.back
|
||||
newitem.forceMove(src.back)
|
||||
return 1
|
||||
|
||||
// Try to place it in any item that can store stuff, on the mob.
|
||||
for(var/obj/item/weapon/storage/S in src.contents)
|
||||
if (S.contents.len < S.storage_slots)
|
||||
newitem.loc = S
|
||||
newitem.forceMove(S)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -106,7 +106,7 @@ var/list/slot_equipment_priority = list( \
|
||||
if(lying) return 0
|
||||
if(!istype(W)) return 0
|
||||
if(!l_hand)
|
||||
W.loc = src //TODO: move to equipped?
|
||||
W.forceMove(src) //TODO: move to equipped?
|
||||
l_hand = W
|
||||
W.layer = 20 //TODO: move to equipped?
|
||||
// l_hand.screen_loc = ui_lhand
|
||||
@@ -122,7 +122,7 @@ var/list/slot_equipment_priority = list( \
|
||||
if(lying) return 0
|
||||
if(!istype(W)) return 0
|
||||
if(!r_hand)
|
||||
W.loc = src
|
||||
W.forceMove(src)
|
||||
r_hand = W
|
||||
W.layer = 20
|
||||
// r_hand.screen_loc = ui_rhand
|
||||
@@ -157,7 +157,7 @@ var/list/slot_equipment_priority = list( \
|
||||
update_inv_r_hand()
|
||||
return 1
|
||||
else
|
||||
W.loc = get_turf(src)
|
||||
W.forceMove(get_turf(src))
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped()
|
||||
return 0
|
||||
@@ -245,7 +245,7 @@ var/list/slot_equipment_priority = list( \
|
||||
O.screen_loc = null
|
||||
if(istype(O, /obj/item))
|
||||
var/obj/item/I = O
|
||||
I.loc = src.loc
|
||||
I.forceMove(src.loc)
|
||||
I.dropped(src)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -87,8 +87,8 @@ default behaviour is:
|
||||
|
||||
if((tmob.mob_always_swap || (tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained())) && tmob.canmove && canmove && !dense && can_move_mob(tmob, 1, 0)) // mutual brohugs all around!
|
||||
var/turf/oldloc = loc
|
||||
loc = tmob.loc
|
||||
tmob.loc = oldloc
|
||||
forceMove(tmob.loc)
|
||||
tmob.forceMove(oldloc)
|
||||
now_pushing = 0
|
||||
for(var/mob/living/carbon/slime/slime in view(1,tmob))
|
||||
if(slime.Victim == tmob)
|
||||
@@ -606,7 +606,7 @@ default behaviour is:
|
||||
src << "<span class='warning'>You wriggle out of [M]'s grip!</span>"
|
||||
else if(istype(H.loc,/obj/item))
|
||||
src << "<span class='warning'>You struggle free of [H.loc].</span>"
|
||||
H.loc = get_turf(H)
|
||||
H.forceMove(get_turf(H))
|
||||
|
||||
if(istype(M))
|
||||
for(var/atom/A in M.contents)
|
||||
|
||||
@@ -940,7 +940,7 @@ mob/proc/yank_out_object()
|
||||
var/mob/living/carbon/human/human_user = U
|
||||
human_user.bloody_hands(H)
|
||||
|
||||
selection.loc = get_turf(src)
|
||||
selection.forceMove(get_turf(src))
|
||||
if(!(U.l_hand && U.r_hand))
|
||||
U.put_in_hands(selection)
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
if(!mob.control_object) return
|
||||
mob.control_object.dir = direct
|
||||
else
|
||||
mob.control_object.loc = get_step(mob.control_object,direct)
|
||||
mob.control_object.forceMove(get_step(mob.control_object,direct))
|
||||
return
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
mob << "<span class='warning'>You cannot get past holy grounds while you are in this plane of existence!</span>"
|
||||
return
|
||||
else
|
||||
mob.loc = get_step(mob, direct)
|
||||
mob.forceMove(get_step(mob, direct))
|
||||
mob.dir = direct
|
||||
if(2)
|
||||
if(prob(50))
|
||||
@@ -402,7 +402,7 @@
|
||||
return
|
||||
else
|
||||
return
|
||||
mob.loc = locate(locx,locy,mobloc.z)
|
||||
mob.forceMove(locate(locx,locy,mobloc.z))
|
||||
spawn(0)
|
||||
var/limit = 2//For only two trailing shadows.
|
||||
for(var/turf/T in getline(mobloc, mob.loc))
|
||||
@@ -413,7 +413,7 @@
|
||||
else
|
||||
spawn(0)
|
||||
anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,mob.dir)
|
||||
mob.loc = get_step(mob, direct)
|
||||
mob.forceMove(get_step(mob, direct))
|
||||
mob.dir = direct
|
||||
// Crossed is always a bit iffy
|
||||
for(var/obj/S in mob.loc)
|
||||
|
||||
Reference in New Issue
Block a user