mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into fluff
Conflicts: code/modules/mob/living/silicon/robot/drone/drone.dm
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
src.ExtinguishMob()
|
||||
if(src.buckled)
|
||||
src.buckled.unbuckle()
|
||||
src.buckled.unbuckle_mob()
|
||||
if(src.pulling && src.bloodcrawl == BLOODCRAWL_EAT)
|
||||
if(istype(src.pulling, /mob/living/))
|
||||
var/mob/living/victim = src.pulling
|
||||
|
||||
@@ -179,9 +179,6 @@
|
||||
/mob/living/carbon/alien/IsAdvancedToolUser()
|
||||
return has_fine_manipulation
|
||||
|
||||
/mob/living/carbon/alien/Process_Spaceslipping()
|
||||
return 0 // Don't slip in space.
|
||||
|
||||
/mob/living/carbon/alien/Stat()
|
||||
|
||||
statpanel("Status")
|
||||
|
||||
@@ -481,19 +481,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
item.layer = initial(item.layer)
|
||||
src.visible_message("\red [src] has thrown [item].")
|
||||
|
||||
if(!src.lastarea)
|
||||
src.lastarea = get_area(src.loc)
|
||||
if((istype(src.loc, /turf/space)) || (src.lastarea.has_gravity == 0))
|
||||
src.inertia_dir = get_dir(target, src)
|
||||
step(src, inertia_dir)
|
||||
|
||||
|
||||
/*
|
||||
if(istype(src.loc, /turf/space) || (src.flags & NOGRAV)) //they're in space, move em one space in the opposite direction
|
||||
src.inertia_dir = get_dir(target, src)
|
||||
step(src, inertia_dir)
|
||||
*/
|
||||
|
||||
newtonian_move(get_dir(target, src))
|
||||
|
||||
item.throw_at(target, item.throw_range, item.throw_speed, src)
|
||||
/*
|
||||
@@ -529,6 +517,8 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
update_inv_wear_mask(0)
|
||||
else if(I == handcuffed)
|
||||
handcuffed = null
|
||||
if(buckled && buckled.buckle_requires_restraints)
|
||||
buckled.unbuckle_mob()
|
||||
update_inv_handcuffed(1)
|
||||
else if(I == legcuffed)
|
||||
legcuffed = null
|
||||
@@ -677,6 +667,9 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
/mob/living/carbon/proc/canBeHandcuffed()
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/fall(forced)
|
||||
loc.handle_fall(src, forced)//it's loc so it doesn't call the mob's handle_fall which does nothing
|
||||
|
||||
/mob/living/carbon/is_muzzled()
|
||||
return(istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
|
||||
@@ -686,7 +679,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
return -6
|
||||
else
|
||||
return initial(pixel_y)
|
||||
|
||||
|
||||
/mob/living/carbon/get_all_slots()
|
||||
return list(l_hand,
|
||||
r_hand,
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
..(new_loc, "Stok")
|
||||
|
||||
/mob/living/carbon/human/Bump(atom/movable/AM as mob|obj, yes)
|
||||
if ((!( yes ) || now_pushing))
|
||||
if ((!( yes ) || now_pushing || buckled))
|
||||
return
|
||||
now_pushing = 1
|
||||
if (ismob(AM))
|
||||
|
||||
@@ -396,23 +396,4 @@ This function restores all organs.
|
||||
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
|
||||
updatehealth()
|
||||
hud_updateflag |= 1 << HEALTH_HUD
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
// incredibly important stuff follows
|
||||
/mob/living/carbon/human/fall(var/forced)
|
||||
..()
|
||||
if(forced)
|
||||
playsound(loc, "bodyfall", 50, 1, -1)
|
||||
/* if(head)
|
||||
var/multiplier = 1
|
||||
if(stat || (status_flags & FAKEDEATH))
|
||||
multiplier = 2
|
||||
var/obj/item/clothing/head/H = head
|
||||
if(!istype(H) || prob(H.loose * multiplier))
|
||||
unEquip(H)
|
||||
if(prob(60))
|
||||
step_rand(H)
|
||||
if(!stat)
|
||||
src << "<span class='warning'>Your [H] fell off!</span>" */
|
||||
return 1
|
||||
@@ -193,7 +193,7 @@ emp_act
|
||||
var/turf/picked = pick(turfs)
|
||||
if(!isturf(picked)) return
|
||||
if(buckled)
|
||||
buckled.unbuckle()
|
||||
buckled.unbuckle_mob()
|
||||
src.loc = picked
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
if(species.slowdown)
|
||||
tally = species.slowdown
|
||||
|
||||
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
|
||||
if(!has_gravity(src))
|
||||
return -1 // It's hard to be slowed down in space by... anything
|
||||
|
||||
if(flying) return -1
|
||||
|
||||
@@ -62,44 +63,18 @@
|
||||
|
||||
return (tally+config.human_delay)
|
||||
|
||||
/mob/living/carbon/human/Process_Spacemove(var/check_drift = 0)
|
||||
//Can we act
|
||||
if(restrained()) return 0
|
||||
/mob/living/carbon/human/Process_Spacemove(movement_dir = 0)
|
||||
|
||||
//Are we flying?
|
||||
if(flying)
|
||||
inertia_dir = 0
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
//Do we have a working jetpack
|
||||
if(istype(back, /obj/item/weapon/tank/jetpack))
|
||||
if(istype(back, /obj/item/weapon/tank/jetpack) && isturf(loc)) //Second check is so you can't use a jetpack in a mech
|
||||
var/obj/item/weapon/tank/jetpack/J = back
|
||||
if(((!check_drift) || (check_drift && J.stabilization_on)) && (!lying) && (J.allow_thrust(0.01, src)))
|
||||
inertia_dir = 0
|
||||
if((movement_dir || J.stabilization_on) && J.allow_thrust(0.01, src))
|
||||
return 1
|
||||
//If no working jetpack or magboots then use the other checks
|
||||
if(..()) return 1
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/carbon/human/Process_Spaceslipping(var/prob_slip = 5)
|
||||
//If knocked out we might just hit it and stop. This makes it possible to get dead bodies and such.
|
||||
if(stat)
|
||||
prob_slip = 0 // Changing this to zero to make it line up with the comment, and also, make more sense.
|
||||
|
||||
//Do we have magboots or such on if so no slip
|
||||
if(istype(shoes, /obj/item/clothing/shoes/magboots) && (shoes.flags & NOSLIP))
|
||||
prob_slip = 0
|
||||
|
||||
//Check hands and mod slip
|
||||
if(!l_hand) prob_slip -= 2
|
||||
else if(l_hand.w_class <= 2) prob_slip -= 1
|
||||
if (!r_hand) prob_slip -= 2
|
||||
else if(r_hand.w_class <= 2) prob_slip -= 1
|
||||
|
||||
prob_slip = round(prob_slip)
|
||||
return(prob_slip)
|
||||
|
||||
/mob/living/carbon/human/mob_has_gravity()
|
||||
. = ..()
|
||||
if(!.)
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
step(AM, t)
|
||||
now_pushing = null
|
||||
|
||||
/mob/living/carbon/slime/Process_Spacemove()
|
||||
/mob/living/carbon/slime/Process_Spacemove(var/movement_dir = 0)
|
||||
return 2
|
||||
|
||||
/mob/living/carbon/slime/Stat()
|
||||
|
||||
@@ -399,9 +399,12 @@
|
||||
|
||||
return
|
||||
|
||||
/mob/living/Move(a, b, flag)
|
||||
if (buckled)
|
||||
return
|
||||
/mob/living/Move(atom/newloc, direct)
|
||||
if (buckled && buckled.loc != newloc)
|
||||
if (!buckled.anchored)
|
||||
return buckled.Move(newloc, direct)
|
||||
else
|
||||
return 0
|
||||
|
||||
if (restrained())
|
||||
stop_pulling()
|
||||
@@ -412,7 +415,7 @@
|
||||
for(var/mob/living/M in range(src, 1))
|
||||
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
|
||||
t7 = null
|
||||
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
|
||||
if(t7 && pulling && (get_dist(src, pulling) <= 1 || pulling.loc == loc))
|
||||
var/turf/T = loc
|
||||
. = ..()
|
||||
|
||||
@@ -460,17 +463,12 @@
|
||||
var/turf/location = M.loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_blood()
|
||||
|
||||
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
M.start_pulling(t)
|
||||
pulling.Move(T, get_dir(pulling, T))
|
||||
if(M)
|
||||
M.start_pulling(t)
|
||||
else
|
||||
if (pulling)
|
||||
if (istype(pulling, /obj/structure/window/full))
|
||||
for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
|
||||
stop_pulling()
|
||||
if (pulling)
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
pulling.Move(T, get_dir(pulling, T))
|
||||
else
|
||||
stop_pulling()
|
||||
. = ..()
|
||||
@@ -639,10 +637,10 @@
|
||||
for(var/mob/O in viewers(C))
|
||||
O.show_message("\red <B>[usr] manages to unbuckle themself!</B>", 1)
|
||||
C << "\blue You successfully unbuckle yourself."
|
||||
C.buckled.manual_unbuckle(C)
|
||||
C.buckled.user_unbuckle_mob(C,C)
|
||||
|
||||
else
|
||||
L.buckled.manual_unbuckle(L)
|
||||
L.buckled.user_unbuckle_mob(L,L)
|
||||
|
||||
/* resist_closet() allows a mob to break out of a welded/locked closet
|
||||
*/////
|
||||
@@ -779,6 +777,8 @@
|
||||
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
qdel(CM.handcuffed)
|
||||
CM.handcuffed = null
|
||||
if(CM.buckled && CM.buckled.buckle_requires_restraints)
|
||||
CM.buckled.unbuckle_mob()
|
||||
CM.update_inv_handcuffed()
|
||||
return
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
/mob/living/proc/run_armor_check(var/def_zone = null, var/attack_flag = "melee", var/absorb_text = null, var/soften_text = null, armour_penetration, penetrated_text)
|
||||
var/armor = getarmor(def_zone, attack_flag)
|
||||
|
||||
|
||||
//the if "armor" check is because this is used for everything on /living, including humans
|
||||
if(armor && armor < 100 && armour_penetration) // Armor with 100+ protection can not be penetrated for admin items
|
||||
armor = max(0, armor - armour_penetration)
|
||||
@@ -368,3 +368,7 @@
|
||||
else*///This is an example of how you can make special types of grabs simply based on direction.
|
||||
if(!supress_message)
|
||||
visible_message("<span class='warning'>[user] has grabbed [src] passively!</span>")
|
||||
|
||||
/mob/living/incapacitated()
|
||||
if(stat || paralysis || stunned || weakened || restrained())
|
||||
return 1
|
||||
|
||||
@@ -76,15 +76,15 @@
|
||||
|
||||
aiCamera = new/obj/item/device/camera/siliconcam/drone_camera(src)
|
||||
additional_law_channels["Drone"] = ";"
|
||||
|
||||
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
|
||||
|
||||
//Redefining some robot procs...
|
||||
/mob/living/silicon/robot/drone/SetName(pickedName as text)
|
||||
// Would prefer to call the grandparent proc but this isn't possible, so..
|
||||
real_name = pickedName
|
||||
name = real_name
|
||||
|
||||
name = real_name
|
||||
|
||||
//Redefining some robot procs...
|
||||
/mob/living/silicon/robot/drone/updatename()
|
||||
real_name = "maintenance drone ([rand(100,999)])"
|
||||
@@ -127,13 +127,13 @@
|
||||
if(!allowed(usr))
|
||||
user << "\red Access denied."
|
||||
return
|
||||
|
||||
|
||||
var/delta = (world.time / 10) - last_reboot
|
||||
if(reboot_cooldown > delta)
|
||||
var/cooldown_time = round(reboot_cooldown - ((world.time / 10) - last_reboot), 1)
|
||||
usr << "\red The reboot system is currently offline. Please wait another [cooldown_time] seconds."
|
||||
return
|
||||
|
||||
|
||||
user.visible_message("\red \the [user] swipes \his ID card through \the [src], attempting to reboot it.", "\red You swipe your ID card through \the [src], attempting to reboot it.")
|
||||
last_reboot = world.time / 10
|
||||
var/drones = 0
|
||||
@@ -225,10 +225,6 @@
|
||||
|
||||
..(gibbed)
|
||||
|
||||
//DRONE MOVEMENT.
|
||||
/mob/living/silicon/robot/drone/Process_Spaceslipping(var/prob_slip)
|
||||
//TODO: Consider making a magboot item for drones to equip. ~Z
|
||||
return 0
|
||||
|
||||
//CONSOLE PROCS
|
||||
/mob/living/silicon/robot/drone/proc/law_resync()
|
||||
@@ -338,4 +334,4 @@
|
||||
src.verbs |= silicon_subsystems
|
||||
|
||||
/mob/living/silicon/robot/drone/remove_robot_verbs()
|
||||
src.verbs -= silicon_subsystems
|
||||
src.verbs -= silicon_subsystems
|
||||
@@ -1,9 +1,4 @@
|
||||
/mob/living/silicon/robot/Process_Spaceslipping(var/prob_slip)
|
||||
if(module && (istype(module,/obj/item/weapon/robot_module/drone)))
|
||||
return 0
|
||||
..(prob_slip)
|
||||
|
||||
/mob/living/silicon/robot/Process_Spacemove()
|
||||
/mob/living/silicon/robot/Process_Spacemove(var/movement_dir = 0)
|
||||
if(module)
|
||||
for(var/obj/item/weapon/tank/jetpack/J in module.modules)
|
||||
if(J && istype(J, /obj/item/weapon/tank/jetpack))
|
||||
@@ -24,7 +19,7 @@
|
||||
|
||||
/mob/living/silicon/robot/Move()
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/silicon/robot/mob_negates_gravity()
|
||||
return magpulse
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
attack_sound = 'sound/weapons/tap.ogg'
|
||||
construct_spells = list(/obj/effect/proc_holder/spell/targeted/smoke/disable)
|
||||
|
||||
/mob/living/simple_animal/construct/harvester/Process_Spacemove(var/check_drift = 0)
|
||||
/mob/living/simple_animal/construct/harvester/Process_Spacemove(var/movement_dir = 0)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -30,8 +30,10 @@
|
||||
if(isturf(src.loc) && !resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc.
|
||||
turns_since_move++
|
||||
if(turns_since_move >= turns_per_move)
|
||||
Move(get_step(src,pick(4,8)))
|
||||
turns_since_move = 0
|
||||
var/east_vs_west = pick(4, 8)
|
||||
if(Process_Spacemove(east_vs_west))
|
||||
Move(get_step(src, east_vs_west), east_vs_west)
|
||||
turns_since_move = 0
|
||||
regenerate_icons()
|
||||
|
||||
//COFFEE! SQUEEEEEEEEE!
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
target = M
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/bear/Process_Spacemove(var/check_drift = 0)
|
||||
/mob/living/simple_animal/hostile/bear/Process_Spacemove(var/movement_dir = 0)
|
||||
return 1 //No drifting in space for space bears!
|
||||
|
||||
/mob/living/simple_animal/hostile/bear/FindTarget()
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
faction = list("carp")
|
||||
flying = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/Process_Spacemove(var/check_drift = 0)
|
||||
/mob/living/simple_animal/hostile/carp/Process_Spacemove(var/movement_dir = 0)
|
||||
return 1 //No drifting in space for space carp! //original comments do not steal
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/FindTarget()
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
faction = list("faithless")
|
||||
|
||||
/mob/living/simple_animal/hostile/faithless/Process_Spacemove(var/check_drift = 0)
|
||||
/mob/living/simple_animal/hostile/faithless/Process_Spacemove(var/movement_dir = 0)
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/hostile/faithless/FindTarget()
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
corpse = /obj/effect/landmark/mobcorpse/syndicatecommando
|
||||
speed = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/space/Process_Spacemove(var/check_drift = 0)
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/space/Process_Spacemove(var/movement_dir = 0)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/ranged
|
||||
@@ -132,7 +132,7 @@
|
||||
corpse = /obj/effect/landmark/mobcorpse/syndicatecommando
|
||||
speed = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/ranged/space/Process_Spacemove(var/check_drift = 0)
|
||||
/mob/living/simple_animal/hostile/syndicate/ranged/space/Process_Spacemove(var/movement_dir = 0)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -130,8 +130,10 @@
|
||||
turns_since_move++
|
||||
if(turns_since_move >= turns_per_move)
|
||||
if(!(stop_automated_movement_when_pulled && pulledby)) //Soma animals don't move when pulled
|
||||
Move(get_step(src,pick(cardinal)))
|
||||
turns_since_move = 0
|
||||
var/anydir = pick(cardinal)
|
||||
if(Process_Spacemove(anydir))
|
||||
Move(get_step(src,anydir), anydir)
|
||||
turns_since_move = 0
|
||||
|
||||
//Speaking
|
||||
if(!client && speak_chance && (ckey == null))
|
||||
|
||||
+18
-62
@@ -135,6 +135,9 @@
|
||||
/mob/proc/restrained()
|
||||
return
|
||||
|
||||
/mob/proc/incapacitated()
|
||||
return
|
||||
|
||||
//This proc is called whenever someone clicks an inventory ui slot.
|
||||
/mob/proc/attack_ui(slot)
|
||||
var/obj/item/W = get_active_hand()
|
||||
@@ -989,76 +992,29 @@ var/list/slot_equipment_priority = list( \
|
||||
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
|
||||
/mob/proc/update_canmove()
|
||||
var/ko = weakened || paralysis || stat || (status_flags & FAKEDEATH)
|
||||
if(ko || resting || buckled)
|
||||
canmove = 0
|
||||
if(!lying)
|
||||
if(resting) //Presuming that you're resting on a bed, which would look goofy lying the wrong way
|
||||
lying = 90
|
||||
else
|
||||
lying = pick(90, 270) //180 looks like shit since BYOND inverts rather than turns in that case
|
||||
else if(stunned)
|
||||
drop_l_hand()
|
||||
var/buckle_lying = !(buckled && !buckled.buckle_lying)
|
||||
if(ko || resting || stunned)
|
||||
drop_r_hand()
|
||||
canmove = 0
|
||||
drop_l_hand()
|
||||
else
|
||||
lying = 0
|
||||
canmove = 1
|
||||
var/is_movable
|
||||
if(buckled && istype(buckled))
|
||||
is_movable = buckled.movable
|
||||
|
||||
if(istype(buckled, /obj/vehicle))
|
||||
var/obj/vehicle/V = buckled
|
||||
if(stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH))
|
||||
lying = 90
|
||||
canmove = 0
|
||||
pixel_y = V.mob_offset_y - 5
|
||||
else
|
||||
lying = 0
|
||||
canmove = 1
|
||||
pixel_y = V.mob_offset_y
|
||||
else if(buckled && (!buckled.movable))
|
||||
anchored = 1
|
||||
canmove = 0
|
||||
if( istype(buckled,/obj/structure/stool/bed/chair) )
|
||||
lying = 0
|
||||
else
|
||||
lying = 90
|
||||
else if(buckled && is_movable)
|
||||
anchored = 0
|
||||
canmove = 1
|
||||
lying = 0
|
||||
else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH))
|
||||
lying = 90
|
||||
canmove = 0
|
||||
else if( stunned )
|
||||
drop_l_hand()
|
||||
drop_r_hand()
|
||||
canmove = 0
|
||||
if(buckled)
|
||||
lying = 90 * buckle_lying
|
||||
else
|
||||
lying = 0
|
||||
canmove = 1
|
||||
|
||||
if(lying)
|
||||
density = 0
|
||||
drop_l_hand()
|
||||
drop_r_hand()
|
||||
else
|
||||
density = 1
|
||||
|
||||
//Temporarily moved here from the various life() procs
|
||||
//I'm fixing stuff incrementally so this will likely find a better home.
|
||||
//It just makes sense for now. ~Carn
|
||||
|
||||
if(lying != lying_prev)
|
||||
if(lying && !lying_prev)
|
||||
if((ko || resting) && !lying)
|
||||
fall(ko)
|
||||
|
||||
if(update_icon) //forces a full overlay update
|
||||
update_icon = 0
|
||||
regenerate_icons()
|
||||
canmove = !(ko || resting || stunned || buckled)
|
||||
density = !lying
|
||||
if(lying)
|
||||
if(layer == initial(layer))
|
||||
layer = MOB_LAYER - 0.2
|
||||
else
|
||||
if(layer == MOB_LAYER - 0.2)
|
||||
layer = initial(layer)
|
||||
|
||||
update_transform()
|
||||
lying_prev = lying
|
||||
return canmove
|
||||
|
||||
/mob/proc/fall(var/forced)
|
||||
|
||||
@@ -142,8 +142,6 @@
|
||||
|
||||
var/emote_cd = 0 // Used to supress emote spamming. 1 if on CD, 2 if disabled by admin (manually set), else 0
|
||||
|
||||
var/inertia_dir = 0
|
||||
|
||||
var/music_lastplayed = "null"
|
||||
|
||||
var/job = null//Living
|
||||
|
||||
@@ -127,41 +127,6 @@
|
||||
return
|
||||
|
||||
|
||||
/atom/movable/Move(NewLoc, direct)
|
||||
if (direct & (direct - 1))
|
||||
if (direct & 1)
|
||||
if (direct & 4)
|
||||
if (step(src, NORTH))
|
||||
step(src, EAST)
|
||||
else
|
||||
if (step(src, EAST))
|
||||
step(src, NORTH)
|
||||
else
|
||||
if (direct & 8)
|
||||
if (step(src, NORTH))
|
||||
step(src, WEST)
|
||||
else
|
||||
if (step(src, WEST))
|
||||
step(src, NORTH)
|
||||
else
|
||||
if (direct & 2)
|
||||
if (direct & 4)
|
||||
if (step(src, SOUTH))
|
||||
step(src, EAST)
|
||||
else
|
||||
if (step(src, EAST))
|
||||
step(src, SOUTH)
|
||||
else
|
||||
if (direct & 8)
|
||||
if (step(src, SOUTH))
|
||||
step(src, WEST)
|
||||
else
|
||||
if (step(src, WEST))
|
||||
step(src, SOUTH)
|
||||
else
|
||||
. = ..()
|
||||
return
|
||||
|
||||
|
||||
/client/proc/Move_object(direct)
|
||||
if(mob && mob.control_object)
|
||||
@@ -225,13 +190,15 @@
|
||||
|
||||
if(Process_Grab()) return
|
||||
|
||||
if(mob.buckled) //if we're buckled to something, tell it we moved.
|
||||
return mob.buckled.relaymove(mob, direct)
|
||||
|
||||
if(mob.remote_control) //we're controlling something, our movement is relayed to it
|
||||
return mob.remote_control.relaymove(mob, direct)
|
||||
|
||||
if(isAI(mob))
|
||||
return AIMove(n,direct,mob)
|
||||
|
||||
return AIMove(n,direct,mob)
|
||||
|
||||
if(!mob.canmove)
|
||||
return
|
||||
|
||||
@@ -241,14 +208,13 @@
|
||||
if(!mob.lastarea)
|
||||
mob.lastarea = get_area(mob.loc)
|
||||
|
||||
if((istype(mob.loc, /turf/space)) || ((mob.lastarea.has_gravity == 0) && (!istype(mob.loc, /obj/spacepod)))) // spacepods shouldn't get affected by changes in gravity
|
||||
if(!mob.Process_Spacemove(0)) return 0
|
||||
|
||||
|
||||
if(isobj(mob.loc) || ismob(mob.loc))//Inside an object, tell it we moved
|
||||
var/atom/O = mob.loc
|
||||
return O.relaymove(mob, direct)
|
||||
|
||||
if(!mob.Process_Spacemove(direct))
|
||||
return 0
|
||||
|
||||
if(isturf(mob.loc))
|
||||
|
||||
if(mob.restrained())//Why being pulled while cuffed prevents you from moving
|
||||
@@ -280,24 +246,6 @@
|
||||
var/tickcomp = ((1/(world.tick_lag))*1.3)
|
||||
move_delay = move_delay + tickcomp
|
||||
|
||||
if(istype(mob.buckled, /obj/vehicle) || istype(mob.buckled, /obj/structure/stool/bed/chair/cart))
|
||||
return mob.buckled.relaymove(mob,direct)
|
||||
|
||||
if(mob.pulledby || mob.buckled) // Wheelchair driving!
|
||||
if(istype(mob.loc, /turf/space))
|
||||
return // No wheelchair driving in space
|
||||
if(istype(mob.pulledby, /obj/structure/stool/bed/chair/wheelchair))
|
||||
return mob.pulledby.relaymove(mob, direct)
|
||||
else if(istype(mob.buckled, /obj/structure/stool/bed/chair/wheelchair))
|
||||
if(ishuman(mob.buckled))
|
||||
var/mob/living/carbon/human/driver = mob.buckled
|
||||
var/obj/item/organ/external/l_hand = driver.get_organ("l_hand")
|
||||
var/obj/item/organ/external/r_hand = driver.get_organ("r_hand")
|
||||
if((!l_hand || (l_hand.status & ORGAN_DESTROYED)) && (!r_hand || (r_hand.status & ORGAN_DESTROYED)))
|
||||
return // No hands to drive your chair? Tough luck!
|
||||
move_delay += 2
|
||||
return mob.buckled.relaymove(mob,direct)
|
||||
|
||||
//We are now going to move
|
||||
moving = 1
|
||||
//Something with pulling things
|
||||
@@ -335,7 +283,7 @@
|
||||
|
||||
else if(mob.confused)
|
||||
step(mob, pick(cardinal))
|
||||
mob.last_movement=world.time
|
||||
mob.last_movement = world.time
|
||||
else
|
||||
. = ..()
|
||||
mob.last_movement=world.time
|
||||
@@ -348,6 +296,8 @@
|
||||
G.adjust_position()
|
||||
|
||||
moving = 0
|
||||
if(mob && .)
|
||||
mob.throwing = 0
|
||||
|
||||
return .
|
||||
|
||||
@@ -450,62 +400,44 @@
|
||||
///Called by /client/Move()
|
||||
///For moving in space
|
||||
///Return 1 for movement 0 for none
|
||||
/mob/proc/Process_Spacemove(var/check_drift = 0)
|
||||
//First check to see if we can do things
|
||||
if(restrained())
|
||||
return 0
|
||||
/mob/Process_Spacemove(var/movement_dir = 0)
|
||||
|
||||
/*
|
||||
if(istype(src,/mob/living/carbon))
|
||||
if(src.l_hand && src.r_hand)
|
||||
return 0
|
||||
*/
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
var/dense_object = 0
|
||||
for(var/turf/turf in oview(1,src))
|
||||
if(istype(turf,/turf/space))
|
||||
var/atom/movable/dense_object_backup
|
||||
for(var/atom/A in orange(1, get_turf(src)))
|
||||
if(isarea(A))
|
||||
continue
|
||||
|
||||
if(!turf.density && !mob_negates_gravity())
|
||||
continue
|
||||
else if(isturf(A))
|
||||
var/turf/turf = A
|
||||
if(istype(turf,/turf/space))
|
||||
continue
|
||||
|
||||
if(!turf.density && !mob_negates_gravity())
|
||||
continue
|
||||
|
||||
return 1
|
||||
|
||||
else
|
||||
var/atom/movable/AM = A
|
||||
if(AM == buckled) //Kind of unnecessary but let's just be sure
|
||||
continue
|
||||
if(AM.density)
|
||||
if(AM.anchored)
|
||||
return 1
|
||||
if(pulling == AM)
|
||||
continue
|
||||
dense_object_backup = AM
|
||||
|
||||
if(movement_dir && dense_object_backup)
|
||||
if(dense_object_backup.newtonian_move(turn(movement_dir, 180))) //You're pushing off something movable, so it moves
|
||||
src << "<span class='info'>You push off of [dense_object_backup] to propel yourself.</span>"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
if(istype(turf,/turf/simulated/floor) && (src.flags & NOGRAV))
|
||||
continue
|
||||
*/
|
||||
|
||||
|
||||
dense_object++
|
||||
break
|
||||
|
||||
if(!dense_object && (locate(/obj/structure/lattice) in oview(1, src)))
|
||||
dense_object++
|
||||
|
||||
//Lastly attempt to locate any dense objects we could push off of
|
||||
//TODO: If we implement objects drifing in space this needs to really push them
|
||||
//Due to a few issues only anchored and dense objects will now work.
|
||||
if(!dense_object)
|
||||
for(var/obj/O in oview(1, src))
|
||||
if((O) && (O.density) && (O.anchored))
|
||||
dense_object++
|
||||
break
|
||||
|
||||
//Nothing to push off of so end here
|
||||
if(!dense_object)
|
||||
return 0
|
||||
|
||||
//Check to see if we slipped
|
||||
if(prob(Process_Spaceslipping(5)))
|
||||
src << "\blue <B>You slipped!</B>"
|
||||
src.inertia_dir = src.last_move
|
||||
step(src, src.inertia_dir)
|
||||
return 0
|
||||
|
||||
//If not then we can reset inertia and move
|
||||
inertia_dir = 0
|
||||
return 1
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/proc/mob_has_gravity(turf/T)
|
||||
return has_gravity(src, T)
|
||||
@@ -513,14 +445,5 @@
|
||||
/mob/proc/mob_negates_gravity()
|
||||
return 0
|
||||
|
||||
/mob/proc/Process_Spaceslipping(var/prob_slip = 5)
|
||||
//Setup slipage
|
||||
//If knocked out we might just hit it and stop. This makes it possible to get dead bodies and such.
|
||||
if(stat)
|
||||
prob_slip = 0 // Changing this to zero to make it line up with the comment.
|
||||
|
||||
prob_slip = round(prob_slip)
|
||||
return(prob_slip)
|
||||
|
||||
/mob/proc/update_gravity()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user