Merge pull request #3326 from Citadel-Station-13/upstream-merge-31176
[MIRROR] loc -- > forcemove
This commit is contained in:
@@ -167,7 +167,7 @@
|
||||
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
|
||||
mmi.forceMove(T)
|
||||
if(mmi.brainmob)
|
||||
if(mmi.brainmob.stat == DEAD)
|
||||
mmi.brainmob.stat = CONSCIOUS
|
||||
@@ -770,24 +770,24 @@
|
||||
/mob/living/silicon/robot/proc/deconstruct()
|
||||
var/turf/T = get_turf(src)
|
||||
if (robot_suit)
|
||||
robot_suit.loc = T
|
||||
robot_suit.l_leg.loc = T
|
||||
robot_suit.forceMove(T)
|
||||
robot_suit.l_leg.forceMove(T)
|
||||
robot_suit.l_leg = null
|
||||
robot_suit.r_leg.loc = T
|
||||
robot_suit.r_leg.forceMove(T)
|
||||
robot_suit.r_leg = null
|
||||
new /obj/item/stack/cable_coil(T, robot_suit.chest.wired)
|
||||
robot_suit.chest.loc = T
|
||||
robot_suit.chest.forceMove(T)
|
||||
robot_suit.chest.wired = 0
|
||||
robot_suit.chest = null
|
||||
robot_suit.l_arm.loc = T
|
||||
robot_suit.l_arm.forceMove(T)
|
||||
robot_suit.l_arm = null
|
||||
robot_suit.r_arm.loc = T
|
||||
robot_suit.r_arm.forceMove(T)
|
||||
robot_suit.r_arm = null
|
||||
robot_suit.head.loc = T
|
||||
robot_suit.head.flash1.loc = T
|
||||
robot_suit.head.forceMove(T)
|
||||
robot_suit.head.flash1.forceMove(T)
|
||||
robot_suit.head.flash1.burn_out()
|
||||
robot_suit.head.flash1 = null
|
||||
robot_suit.head.flash2.loc = T
|
||||
robot_suit.head.flash2.forceMove(T)
|
||||
robot_suit.head.flash2.burn_out()
|
||||
robot_suit.head.flash2 = null
|
||||
robot_suit.head = null
|
||||
@@ -806,7 +806,7 @@
|
||||
var/obj/item/device/assembly/flash/handheld/F = new /obj/item/device/assembly/flash/handheld(T)
|
||||
F.burn_out()
|
||||
if (cell) //Sanity check.
|
||||
cell.loc = T
|
||||
cell.forceMove(T)
|
||||
cell = null
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@ All ShuttleMove procs go here
|
||||
var/turf/T = loc
|
||||
if(level==1)
|
||||
hide(T.intact)
|
||||
|
||||
|
||||
/obj/structure/shuttle/beforeShuttleMove(turf/newT, rotation, move_mode)
|
||||
. = ..()
|
||||
if(. & MOVE_AREA)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
tempL.Remove(attempt)
|
||||
|
||||
if(!success)
|
||||
target.loc = pick(L)
|
||||
target.forceMove(L)
|
||||
playsound(get_turf(user), sound2, 50,1)
|
||||
|
||||
return
|
||||
|
||||
@@ -142,31 +142,23 @@
|
||||
/mob/living/proc/infernalphaseout()
|
||||
dust_animation()
|
||||
spawn_dust()
|
||||
src.visible_message("<span class='warning'>[src] disappears in a flashfire!</span>")
|
||||
visible_message("<span class='warning'>[src] disappears in a flashfire!</span>")
|
||||
playsound(get_turf(src), 'sound/magic/enter_blood.ogg', 100, 1, -1)
|
||||
var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(loc)
|
||||
src.ExtinguishMob()
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob(src,force=1)
|
||||
if(has_buckled_mobs())
|
||||
unbuckle_all_mobs(force=1)
|
||||
if(pulledby)
|
||||
pulledby.stop_pulling()
|
||||
if(pulling)
|
||||
stop_pulling()
|
||||
src.loc = holder
|
||||
src.holder = holder
|
||||
src.notransform = 0
|
||||
ExtinguishMob()
|
||||
forceMove(holder)
|
||||
holder = holder
|
||||
notransform = 0
|
||||
fakefireextinguish()
|
||||
|
||||
/mob/living/proc/infernalphasein()
|
||||
if(src.notransform)
|
||||
if(notransform)
|
||||
to_chat(src, "<span class='warning'>You're too busy to jaunt in.</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
fakefire()
|
||||
src.loc = get_turf(src)
|
||||
src.client.eye = src
|
||||
src.visible_message("<span class='warning'><B>[src] appears in a fiery blaze!</B></span>")
|
||||
forceMove(drop_location())
|
||||
client.eye = src
|
||||
visible_message("<span class='warning'><B>[src] appears in a fiery blaze!</B></span>")
|
||||
playsound(get_turf(src), 'sound/magic/exit_blood.ogg', 100, 1, -1)
|
||||
addtimer(CALLBACK(src, .proc/fakefireextinguish), 15, TIMER_UNIQUE)
|
||||
|
||||
|
||||
@@ -57,14 +57,14 @@
|
||||
|
||||
var/current_loc = user.loc
|
||||
|
||||
projectile.loc = current_loc
|
||||
projectile.forceMove(current_loc)
|
||||
|
||||
for(var/i = 0,i < proj_lifespan,i++)
|
||||
if(!projectile)
|
||||
break
|
||||
|
||||
if(proj_insubstantial)
|
||||
projectile.loc = get_step(projectile, projectile.dir)
|
||||
projectile.forceMove(get_step(projectile, projectile.dir))
|
||||
else
|
||||
step(projectile, projectile.dir)
|
||||
|
||||
|
||||
@@ -28,14 +28,7 @@
|
||||
var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt(mobloc)
|
||||
new jaunt_out_type(mobloc, target.dir)
|
||||
target.ExtinguishMob()
|
||||
if(target.buckled)
|
||||
target.buckled.unbuckle_mob(target,force=1)
|
||||
if(target.pulledby)
|
||||
target.pulledby.stop_pulling()
|
||||
target.stop_pulling()
|
||||
if(target.has_buckled_mobs())
|
||||
target.unbuckle_all_mobs(force=1)
|
||||
target.loc = holder
|
||||
target.forceMove(holder)
|
||||
target.reset_perspective(holder)
|
||||
target.notransform=0 //mob is safely inside holder now, no need for protection.
|
||||
jaunt_steam(mobloc)
|
||||
@@ -92,7 +85,7 @@
|
||||
var/turf/newLoc = get_step(src,direction)
|
||||
setDir(direction)
|
||||
if(!(newLoc.flags_1 & NOJAUNT_1))
|
||||
loc = newLoc
|
||||
forceMove(newLoc)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Some strange aura is blocking the way!</span>")
|
||||
movedelay = world.time + movespeed
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
var/current_loc = user.loc
|
||||
|
||||
projectile.loc = current_loc
|
||||
projectile.forceMove(current_loc)
|
||||
|
||||
for(var/i = 0,i < proj_lifespan,i++)
|
||||
if(!projectile)
|
||||
@@ -56,12 +56,12 @@
|
||||
if(proj_homing)
|
||||
if(proj_insubstantial)
|
||||
projectile.setDir(get_dir(projectile,target))
|
||||
projectile.loc = get_step_to(projectile,target)
|
||||
projectile.forceMove(get_step_to(projectile,target))
|
||||
else
|
||||
step_to(projectile,target)
|
||||
else
|
||||
if(proj_insubstantial)
|
||||
projectile.loc = get_step(projectile,dir)
|
||||
projectile.forceMove(get_step(projectile,dir))
|
||||
else
|
||||
step(projectile,dir)
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
if(issilicon(M)) //Items in silicons warp the whole silicon
|
||||
M.loc.visible_message("<span class='warning'>[M] suddenly disappears!</span>")
|
||||
M.loc = L.loc
|
||||
M.forceMove(L.loc)
|
||||
M.loc.visible_message("<span class='caution'>[M] suddenly appears!</span>")
|
||||
item_to_retrieve = null
|
||||
break
|
||||
@@ -101,7 +101,7 @@
|
||||
if(item_to_retrieve.loc)
|
||||
item_to_retrieve.loc.visible_message("<span class='warning'>The [item_to_retrieve.name] suddenly disappears!</span>")
|
||||
if(!L.put_in_hands(item_to_retrieve))
|
||||
item_to_retrieve.loc = L.loc
|
||||
item_to_retrieve.forceMove(L.loc)
|
||||
item_to_retrieve.loc.visible_message("<span class='caution'>The [item_to_retrieve.name] suddenly appears!</span>")
|
||||
playsound(get_turf(L), 'sound/magic/summonitems_generic.ogg', 50, 1)
|
||||
else
|
||||
|
||||
@@ -41,9 +41,5 @@
|
||||
return
|
||||
|
||||
if(!target.Move(picked))
|
||||
if(target.buckled)
|
||||
target.buckled.unbuckle_mob(target,force=1)
|
||||
if(target.has_buckled_mobs())
|
||||
target.unbuckle_all_mobs(force=1)
|
||||
target.loc = picked
|
||||
target.forceMove(picked)
|
||||
playsound(get_turf(user), sound2, 50,1)
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
/datum/surgery/implant_removal
|
||||
name = "implant removal"
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/extract_implant, /datum/surgery_step/close)
|
||||
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
possible_locs = list("chest")
|
||||
|
||||
|
||||
//extract implant
|
||||
/datum/surgery_step/extract_implant
|
||||
name = "extract implant"
|
||||
implements = list(/obj/item/hemostat = 100, /obj/item/crowbar = 65)
|
||||
time = 64
|
||||
var/obj/item/implant/I = null
|
||||
|
||||
/datum/surgery_step/extract_implant/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
for(var/obj/item/O in target.implants)
|
||||
I = O
|
||||
break
|
||||
if(I)
|
||||
user.visible_message("[user] begins to extract [I] from [target]'s [target_zone].", "<span class='notice'>You begin to extract [I] from [target]'s [target_zone]...</span>")
|
||||
else
|
||||
user.visible_message("[user] looks for an implant in [target]'s [target_zone].", "<span class='notice'>You look for an implant in [target]'s [target_zone]...</span>")
|
||||
|
||||
/datum/surgery_step/extract_implant/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if(I)
|
||||
user.visible_message("[user] successfully removes [I] from [target]'s [target_zone]!", "<span class='notice'>You successfully remove [I] from [target]'s [target_zone].</span>")
|
||||
I.removed(target)
|
||||
|
||||
var/obj/item/implantcase/case
|
||||
for(var/obj/item/implantcase/ic in user.held_items)
|
||||
case = ic
|
||||
break
|
||||
if(!case)
|
||||
case = locate(/obj/item/implantcase) in get_turf(target)
|
||||
if(case && !case.imp)
|
||||
case.imp = I
|
||||
I.loc = case
|
||||
case.update_icon()
|
||||
user.visible_message("[user] places [I] into [case]!", "<span class='notice'>You place [I] into [case].</span>")
|
||||
else
|
||||
qdel(I)
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't find anything in [target]'s [target_zone]!</span>")
|
||||
return 1
|
||||
|
||||
/datum/surgery/implant_removal/mechanic
|
||||
name = "implant removal"
|
||||
requires_bodypart_type = BODYPART_ROBOTIC
|
||||
steps = list(
|
||||
/datum/surgery_step/mechanic_open,
|
||||
/datum/surgery_step/open_hatch,
|
||||
/datum/surgery_step/mechanic_unwrench,
|
||||
/datum/surgery_step/extract_implant,
|
||||
/datum/surgery_step/mechanic_wrench,
|
||||
/datum/surgery_step/mechanic_close)
|
||||
/datum/surgery/implant_removal
|
||||
name = "implant removal"
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/extract_implant, /datum/surgery_step/close)
|
||||
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
possible_locs = list("chest")
|
||||
|
||||
|
||||
//extract implant
|
||||
/datum/surgery_step/extract_implant
|
||||
name = "extract implant"
|
||||
implements = list(/obj/item/hemostat = 100, /obj/item/crowbar = 65)
|
||||
time = 64
|
||||
var/obj/item/implant/I = null
|
||||
|
||||
/datum/surgery_step/extract_implant/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
for(var/obj/item/O in target.implants)
|
||||
I = O
|
||||
break
|
||||
if(I)
|
||||
user.visible_message("[user] begins to extract [I] from [target]'s [target_zone].", "<span class='notice'>You begin to extract [I] from [target]'s [target_zone]...</span>")
|
||||
else
|
||||
user.visible_message("[user] looks for an implant in [target]'s [target_zone].", "<span class='notice'>You look for an implant in [target]'s [target_zone]...</span>")
|
||||
|
||||
/datum/surgery_step/extract_implant/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if(I)
|
||||
user.visible_message("[user] successfully removes [I] from [target]'s [target_zone]!", "<span class='notice'>You successfully remove [I] from [target]'s [target_zone].</span>")
|
||||
I.removed(target)
|
||||
|
||||
var/obj/item/implantcase/case
|
||||
for(var/obj/item/implantcase/ic in user.held_items)
|
||||
case = ic
|
||||
break
|
||||
if(!case)
|
||||
case = locate(/obj/item/implantcase) in get_turf(target)
|
||||
if(case && !case.imp)
|
||||
case.imp = I
|
||||
I.loc = case
|
||||
case.update_icon()
|
||||
user.visible_message("[user] places [I] into [case]!", "<span class='notice'>You place [I] into [case].</span>")
|
||||
else
|
||||
qdel(I)
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't find anything in [target]'s [target_zone]!</span>")
|
||||
return 1
|
||||
|
||||
/datum/surgery/implant_removal/mechanic
|
||||
name = "implant removal"
|
||||
requires_bodypart_type = BODYPART_ROBOTIC
|
||||
steps = list(
|
||||
/datum/surgery_step/mechanic_open,
|
||||
/datum/surgery_step/open_hatch,
|
||||
/datum/surgery_step/mechanic_unwrench,
|
||||
/datum/surgery_step/extract_implant,
|
||||
/datum/surgery_step/mechanic_wrench,
|
||||
/datum/surgery_step/mechanic_close)
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
/datum/surgery/lipoplasty
|
||||
name = "lipoplasty"
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/cut_fat, /datum/surgery_step/remove_fat, /datum/surgery_step/close)
|
||||
possible_locs = list("chest")
|
||||
|
||||
/datum/surgery/lipoplasty/can_start(mob/user, mob/living/carbon/target)
|
||||
if(target.disabilities & FAT)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
//cut fat
|
||||
/datum/surgery_step/cut_fat
|
||||
name = "cut excess fat"
|
||||
/datum/surgery/lipoplasty
|
||||
name = "lipoplasty"
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/cut_fat, /datum/surgery_step/remove_fat, /datum/surgery_step/close)
|
||||
possible_locs = list("chest")
|
||||
|
||||
/datum/surgery/lipoplasty/can_start(mob/user, mob/living/carbon/target)
|
||||
if(target.disabilities & FAT)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
//cut fat
|
||||
/datum/surgery_step/cut_fat
|
||||
name = "cut excess fat"
|
||||
implements = list(/obj/item/circular_saw = 100, /obj/item/melee/transforming/energy/sword/cyborg/saw = 100, /obj/item/hatchet = 35, /obj/item/kitchen/knife/butcher = 25)
|
||||
time = 64
|
||||
|
||||
/datum/surgery_step/cut_fat/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] begins to cut away [target]'s excess fat.", "<span class='notice'>You begin to cut away [target]'s excess fat...</span>")
|
||||
|
||||
/datum/surgery_step/cut_fat/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] cuts [target]'s excess fat loose!", "<span class='notice'>You cut [target]'s excess fat loose.</span>")
|
||||
return 1
|
||||
|
||||
//remove fat
|
||||
/datum/surgery_step/remove_fat
|
||||
name = "remove loose fat"
|
||||
implements = list(/obj/item/retractor = 100, /obj/item/screwdriver = 45, /obj/item/wirecutters = 35)
|
||||
time = 32
|
||||
|
||||
/datum/surgery_step/remove_fat/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] begins to extract [target]'s loose fat!", "<span class='notice'>You begin to extract [target]'s loose fat...</span>")
|
||||
|
||||
/datum/surgery_step/remove_fat/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] extracts [target]'s fat!", "<span class='notice'>You extract [target]'s fat.</span>")
|
||||
target.overeatduration = 0 //patient is unfatted
|
||||
var/removednutriment = target.nutrition
|
||||
target.nutrition = NUTRITION_LEVEL_WELL_FED
|
||||
removednutriment -= 450 //whatever was removed goes into the meat
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/typeofmeat = /obj/item/reagent_containers/food/snacks/meat/slab/human
|
||||
|
||||
if(H.dna && H.dna.species)
|
||||
typeofmeat = H.dna.species.meat
|
||||
|
||||
var/obj/item/reagent_containers/food/snacks/meat/slab/human/newmeat = new typeofmeat
|
||||
newmeat.name = "fatty meat"
|
||||
newmeat.desc = "Extremely fatty tissue taken from a patient."
|
||||
newmeat.subjectname = H.real_name
|
||||
newmeat.subjectjob = H.job
|
||||
newmeat.reagents.add_reagent ("nutriment", (removednutriment / 15)) //To balance with nutriment_factor of nutriment
|
||||
newmeat.loc = target.loc
|
||||
return 1
|
||||
time = 64
|
||||
|
||||
/datum/surgery_step/cut_fat/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] begins to cut away [target]'s excess fat.", "<span class='notice'>You begin to cut away [target]'s excess fat...</span>")
|
||||
|
||||
/datum/surgery_step/cut_fat/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] cuts [target]'s excess fat loose!", "<span class='notice'>You cut [target]'s excess fat loose.</span>")
|
||||
return 1
|
||||
|
||||
//remove fat
|
||||
/datum/surgery_step/remove_fat
|
||||
name = "remove loose fat"
|
||||
implements = list(/obj/item/retractor = 100, /obj/item/screwdriver = 45, /obj/item/wirecutters = 35)
|
||||
time = 32
|
||||
|
||||
/datum/surgery_step/remove_fat/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] begins to extract [target]'s loose fat!", "<span class='notice'>You begin to extract [target]'s loose fat...</span>")
|
||||
|
||||
/datum/surgery_step/remove_fat/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] extracts [target]'s fat!", "<span class='notice'>You extract [target]'s fat.</span>")
|
||||
target.overeatduration = 0 //patient is unfatted
|
||||
var/removednutriment = target.nutrition
|
||||
target.nutrition = NUTRITION_LEVEL_WELL_FED
|
||||
removednutriment -= 450 //whatever was removed goes into the meat
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/typeofmeat = /obj/item/reagent_containers/food/snacks/meat/slab/human
|
||||
|
||||
if(H.dna && H.dna.species)
|
||||
typeofmeat = H.dna.species.meat
|
||||
|
||||
var/obj/item/reagent_containers/food/snacks/meat/slab/human/newmeat = new typeofmeat
|
||||
newmeat.name = "fatty meat"
|
||||
newmeat.desc = "Extremely fatty tissue taken from a patient."
|
||||
newmeat.subjectname = H.real_name
|
||||
newmeat.subjectjob = H.job
|
||||
newmeat.reagents.add_reagent ("nutriment", (removednutriment / 15)) //To balance with nutriment_factor of nutriment
|
||||
newmeat.forceMove(target.loc)
|
||||
return 1
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
if(..())
|
||||
return 1
|
||||
else if(mybag)
|
||||
mybag.loc = get_turf(user)
|
||||
mybag.forceMove(get_turf(user))
|
||||
user.put_in_hands(mybag)
|
||||
mybag = null
|
||||
update_icon()
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
/obj/vehicle/space/speedbike/speedwagon/Collide(atom/movable/A)
|
||||
. = ..()
|
||||
if(A.density && has_buckled_mobs())
|
||||
var/atom/throw_target = get_edge_target_turf(A, src.dir)
|
||||
var/atom/throw_target = get_edge_target_turf(A, dir)
|
||||
if(crash_all)
|
||||
A.throw_at(throw_target, 4, 3)
|
||||
visible_message("<span class='danger'>[src] crashes into [A]!</span>")
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
/obj/vehicle/space/speedbike/speedwagon/Moved()
|
||||
. = ..()
|
||||
if(src.has_buckled_mobs())
|
||||
if(has_buckled_mobs())
|
||||
for(var/atom/A in range(2, src))
|
||||
if(!(A in src.buckled_mobs))
|
||||
if(!(A in buckled_mobs))
|
||||
Collide(A)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
if(A.density)
|
||||
if(A != src && A != M)
|
||||
return
|
||||
M.loc = get_turf(src)
|
||||
M.forceMove(get_turf(src))
|
||||
..()
|
||||
if(user.client)
|
||||
user.client.change_view(view_range)
|
||||
|
||||
Reference in New Issue
Block a user