mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +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:
@@ -83,7 +83,7 @@
|
||||
phaseanim.master = user
|
||||
user.ExtinguishMob()
|
||||
if(user.buckled)
|
||||
user.buckled.unbuckle()
|
||||
user.buckled.unbuckle_mob()
|
||||
user.loc = holder
|
||||
flick("chronophase", phaseanim)
|
||||
spawn(7)
|
||||
|
||||
@@ -67,18 +67,17 @@
|
||||
var/last_tick = 0
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/plant
|
||||
|
||||
var/mob/living/buckled_mob = null
|
||||
var/movable = 0
|
||||
|
||||
/obj/effect/plant/Destroy()
|
||||
if(buckled_mob)
|
||||
unbuckle()
|
||||
unbuckle_mob()
|
||||
if(plant_controller)
|
||||
plant_controller.remove_plant(src)
|
||||
for(var/obj/effect/plant/neighbor in range(1,src))
|
||||
plant_controller.add_plant(neighbor)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/effect/plant/single
|
||||
spread_chance = 0
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/obj/effect/plant/attack_hand(mob/user as mob)
|
||||
// Todo, cause damage.
|
||||
manual_unbuckle(user)
|
||||
user_unbuckle_mob(user, user)
|
||||
|
||||
/obj/effect/plant/proc/trodden_on(var/mob/living/victim)
|
||||
if(!is_mature())
|
||||
@@ -26,37 +26,6 @@
|
||||
seed.do_thorns(victim,src)
|
||||
seed.do_sting(victim,src,pick("r_foot","l_foot","r_leg","l_leg"))
|
||||
|
||||
/obj/effect/plant/proc/unbuckle()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
buckled_mob.update_canmove()
|
||||
buckled_mob = null
|
||||
return
|
||||
|
||||
/obj/effect/plant/proc/manual_unbuckle(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
if(prob(seed ? min(max(0,100 - seed.get_trait(TRAIT_POTENCY)/2),100) : 50))
|
||||
if(buckled_mob.buckled == src)
|
||||
if(buckled_mob != user)
|
||||
buckled_mob.visible_message(\
|
||||
"<span class='notice'>[user.name] frees [buckled_mob.name] from \the [src].</span>",\
|
||||
"<span class='notice'>[user.name] frees you from \the [src].</span>",\
|
||||
"<span class='warning'>You hear shredding and ripping.</span>")
|
||||
else
|
||||
buckled_mob.visible_message(\
|
||||
"<span class='notice'>[buckled_mob.name] struggles free of \the [src].</span>",\
|
||||
"<span class='notice'>You untangle \the [src] from around yourself.</span>",\
|
||||
"<span class='warning'>You hear shredding and ripping.</span>")
|
||||
unbuckle()
|
||||
else
|
||||
var/text = pick("rip","tear","pull")
|
||||
user.visible_message(\
|
||||
"<span class='notice'>[user.name] [text]s at \the [src].</span>",\
|
||||
"<span class='notice'>You [text] at \the [src].</span>",\
|
||||
"<span class='warning'>You hear shredding and ripping.</span>")
|
||||
return
|
||||
|
||||
/obj/effect/plant/proc/entangle(var/mob/living/victim)
|
||||
|
||||
@@ -79,7 +48,6 @@
|
||||
|
||||
//entangling people
|
||||
if(victim.loc == src.loc)
|
||||
victim.buckled = src
|
||||
victim.update_canmove()
|
||||
buckled_mob = victim
|
||||
victim << "<span class='danger'>Tendrils [pick("wind", "tangle", "tighten")] around you!</span>"
|
||||
can_buckle = 1
|
||||
buckle_mob(victim)
|
||||
@@ -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
|
||||
|
||||
@@ -268,6 +268,8 @@
|
||||
|
||||
step(src, movement_dir)
|
||||
|
||||
/obj/singularity/Process_Spacemove() //The singularity stops drifting for no man!
|
||||
return 0
|
||||
|
||||
/obj/singularity/proc/check_turfs_in(var/direction = 0, var/step = 0)
|
||||
if(!direction)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
var/can_flashlight = 0
|
||||
var/heavy_weapon = 0
|
||||
var/randomspread = 0
|
||||
|
||||
|
||||
var/burst_size = 1
|
||||
|
||||
proc/ready_to_fire()
|
||||
@@ -186,6 +186,7 @@
|
||||
user.drop_item()
|
||||
break
|
||||
|
||||
user.newtonian_move(get_dir(target, user))
|
||||
update_icon()
|
||||
if(user.hand)
|
||||
user.update_inv_l_hand()
|
||||
|
||||
@@ -89,8 +89,8 @@
|
||||
return L.apply_effects(stun, weaken, paralyze, irradiate, slur, stutter, eyeblur, drowsy, agony, blocked, stamina, jitter)
|
||||
|
||||
proc/OnFired() //if assigned, allows for code when the projectile gets fired
|
||||
return 1
|
||||
|
||||
return 1
|
||||
|
||||
proc/check_fire(var/mob/living/target as mob, var/mob/living/user as mob) //Checks if you can hit them or not.
|
||||
if(!istype(target) || !istype(user))
|
||||
return 0
|
||||
@@ -137,7 +137,7 @@
|
||||
var/mob/living/carbon/human/H = A
|
||||
var/obj/item/organ/external/organ = H.get_organ(check_zone(def_zone))
|
||||
if(isnull(organ))
|
||||
return
|
||||
return
|
||||
if(silenced)
|
||||
playsound(loc, hitsound, 5, 1, -1)
|
||||
M << "\red You've been shot in the [parse_zone(def_zone)] by the [src.name]!"
|
||||
@@ -189,6 +189,11 @@
|
||||
return 1
|
||||
|
||||
|
||||
Process_Spacemove(var/movement_dir = 0)
|
||||
return 1 //Bullets don't drift in space
|
||||
|
||||
|
||||
|
||||
process(var/setAngle)
|
||||
if(setAngle) Angle = setAngle
|
||||
if(!legacy)
|
||||
@@ -332,7 +337,7 @@
|
||||
M = locate() in get_step(src,target)
|
||||
if(istype(M))
|
||||
return 1
|
||||
|
||||
|
||||
/proc/check_trajectory(atom/target as mob|obj, atom/firer as mob|obj, var/pass_flags=PASSTABLE|PASSGLASS|PASSGRILLE, flags=null) //Checks if you can hit them or not.
|
||||
if(!istype(target) || !istype(firer))
|
||||
return 0
|
||||
@@ -343,4 +348,4 @@
|
||||
trace.pass_flags = pass_flags //And the pass flags to that of the real projectile...
|
||||
var/output = trace.process() //Test it!
|
||||
qdel(trace) //No need for it anymore
|
||||
return output //Send it back to the gun!
|
||||
return output //Send it back to the gun!
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
|
||||
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
user.changeNext_move(CLICK_CD_RANGE*2)
|
||||
user.newtonian_move(get_dir(A, user))
|
||||
|
||||
if(reagents.has_reagent("sacid"))
|
||||
msg_admin_attack("[key_name_admin(user)] fired sulphuric acid from \a [src].")
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
throwSmoke(src.loc)
|
||||
if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
|
||||
visible_message("<span class='warning'>[src] melts [exp_on], ionizing the air around it!</span>")
|
||||
empulse(src.loc, 4, 6)
|
||||
empulse(src.loc, 4, 0) //change this to 4,6 once the EXPERI-Mentor is moved.
|
||||
investigate_log("Experimentor has generated an Electromagnetic Pulse.", "experimentor")
|
||||
ejectItem(TRUE)
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1,36 +1,11 @@
|
||||
|
||||
/obj/mecha/working/hoverpod
|
||||
name = "hover pod"
|
||||
icon_state = "engineering_pod"
|
||||
desc = "Stubby and round, it has a human sized access hatch on the top."
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/hoverpod
|
||||
|
||||
//duplicate of parent proc, but without space drifting
|
||||
/obj/mecha/working/hoverpod/dyndomove(direction)
|
||||
if(!can_move)
|
||||
return 0
|
||||
if(src.pr_inertial_movement.active())
|
||||
return 0
|
||||
if(!has_charge(step_energy_drain))
|
||||
return 0
|
||||
var/move_result = 0
|
||||
if(hasInternalDamage(MECHA_INT_CONTROL_LOST))
|
||||
move_result = mechsteprand()
|
||||
else if(src.dir!=direction)
|
||||
move_result = mechturn(direction)
|
||||
else
|
||||
move_result = mechstep(direction)
|
||||
if(move_result)
|
||||
can_move = 0
|
||||
use_power(step_energy_drain)
|
||||
/*if(istype(src.loc, /turf/space))
|
||||
if(!src.check_for_support())
|
||||
src.pr_inertial_movement.start(list(src,direction))
|
||||
src.log_message("Movement control lost. Inertial movement started.")*/
|
||||
if(do_after(step_in, target = src))
|
||||
can_move = 1
|
||||
return 1
|
||||
return 0
|
||||
/obj/mecha/working/hoverpod/Process_Spacemove(var/movement_dir = 0)
|
||||
return 1 // puts the hover in hoverpod
|
||||
|
||||
//these three procs overriden to play different sounds
|
||||
/obj/mecha/working/hoverpod/mechturn(direction)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
if(prob(100 * weakness))
|
||||
user << "\red You are suddenly zapped away elsewhere!"
|
||||
if (user.buckled)
|
||||
user.buckled.unbuckle()
|
||||
user.buckled.unbuckle_mob()
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
||||
sparks.set_up(3, 0, get_turf(user))
|
||||
@@ -27,7 +27,7 @@
|
||||
if(prob(100 * weakness))
|
||||
M << "\red You are displaced by a strange force!"
|
||||
if(M.buckled)
|
||||
M.buckled.unbuckle()
|
||||
M.buckled.unbuckle_mob()
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
||||
sparks.set_up(3, 0, get_turf(M))
|
||||
@@ -46,7 +46,7 @@
|
||||
if(prob(100 * weakness))
|
||||
M << "\red You are displaced by a strange force!"
|
||||
if(M.buckled)
|
||||
M.buckled.unbuckle()
|
||||
M.buckled.unbuckle_mob()
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
||||
sparks.set_up(3, 0, get_turf(M))
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
for(var/turf/T in dstturfs)
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
AM.Move(D, SOUTH)
|
||||
if(istype(T, /turf/simulated))
|
||||
qdel(T)
|
||||
|
||||
|
||||
@@ -36,6 +36,15 @@
|
||||
unattach()
|
||||
return 0
|
||||
|
||||
/obj/vehicle/train/can_move()
|
||||
if(!is_train_head())
|
||||
return 1 //towed objects do not need power to Move()
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/vehicle/train/Bump(atom/Obstacle)
|
||||
if(!istype(Obstacle, /atom/movable))
|
||||
return
|
||||
|
||||
@@ -44,20 +44,10 @@
|
||||
key = new()
|
||||
|
||||
/obj/vehicle/train/ambulance/engine/Move()
|
||||
if(on && cell.charge < charge_use)
|
||||
turn_off()
|
||||
update_stats()
|
||||
if(load && is_train_head())
|
||||
load << "The drive motor briefly whines, then drones to a stop."
|
||||
|
||||
if(is_train_head() && !on)
|
||||
return 0
|
||||
|
||||
. = ..()
|
||||
handle_rotation()
|
||||
update_mob()
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/train/ambulance/trolley/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(open && istype(W, /obj/item/weapon/wirecutters))
|
||||
passenger_allowed = !passenger_allowed
|
||||
@@ -176,7 +166,7 @@
|
||||
return 0
|
||||
|
||||
if(is_train_head())
|
||||
if(direction == reverse_direction(dir))
|
||||
if(direction == reverse_direction(dir) && tow) //can reverse with no tow
|
||||
return 0
|
||||
if(Move(get_step(src, direction)))
|
||||
return 1
|
||||
|
||||
@@ -47,18 +47,6 @@
|
||||
overlays += I
|
||||
turn_off() //so engine verbs are correctly set
|
||||
|
||||
/obj/vehicle/train/cargo/engine/Move()
|
||||
if(on && cell.charge < charge_use)
|
||||
turn_off()
|
||||
update_stats()
|
||||
if(load && is_train_head())
|
||||
load << "The drive motor briefly whines, then drones to a stop."
|
||||
|
||||
if(is_train_head() && !on)
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/train/cargo/trolley/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(open && istype(W, /obj/item/weapon/wirecutters))
|
||||
passenger_allowed = !passenger_allowed
|
||||
|
||||
@@ -51,20 +51,10 @@
|
||||
R.my_atom = src
|
||||
|
||||
/obj/vehicle/train/janitor/engine/Move()
|
||||
if(on && cell.charge < charge_use)
|
||||
turn_off()
|
||||
update_stats()
|
||||
if(load && is_train_head())
|
||||
load << "The drive motor briefly whines, then drones to a stop."
|
||||
|
||||
if(is_train_head() && !on)
|
||||
return 0
|
||||
|
||||
. = ..()
|
||||
handle_rotation()
|
||||
update_mob()
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/train/janitor/trolley/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(openTop)
|
||||
W.loc = src
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
animate_movement=1
|
||||
light_range = 3
|
||||
|
||||
buckle_lying = 0
|
||||
|
||||
var/attack_log = null
|
||||
var/on = 0
|
||||
var/health = 0 //do not forget to set health for your vehicle!
|
||||
@@ -40,10 +42,7 @@
|
||||
//spawn the cell you want in each vehicle
|
||||
|
||||
/obj/vehicle/Move()
|
||||
if(world.time > l_move_time + move_delay)
|
||||
if(on && powered && cell.charge < charge_use)
|
||||
turn_off()
|
||||
|
||||
if(can_move())
|
||||
var/init_anc = anchored
|
||||
anchored = 0
|
||||
if(!..())
|
||||
@@ -63,6 +62,23 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/vehicle/proc/can_move()
|
||||
if(world.time <= l_move_time + move_delay)
|
||||
return 0
|
||||
|
||||
if(!on || !powered)
|
||||
return 0
|
||||
|
||||
if(on && powered && cell.charge < charge_use)
|
||||
turn_off()
|
||||
return 0
|
||||
|
||||
if(istype(loc, /turf/space))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/vehicle/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/hand_labeler))
|
||||
return
|
||||
@@ -222,19 +238,19 @@
|
||||
|
||||
/obj/vehicle/proc/powercheck()
|
||||
if(!cell && !powered)
|
||||
return
|
||||
return 0
|
||||
|
||||
if(!cell && powered)
|
||||
turn_off()
|
||||
return
|
||||
return 0
|
||||
|
||||
if(cell.charge < charge_use)
|
||||
turn_off()
|
||||
return
|
||||
return 0
|
||||
|
||||
if(cell && powered)
|
||||
turn_on()
|
||||
return
|
||||
return 1
|
||||
|
||||
/obj/vehicle/proc/insert_cell(var/obj/item/weapon/stock_parts/cell/C, var/mob/living/carbon/human/H)
|
||||
if(cell)
|
||||
|
||||
Reference in New Issue
Block a user