Mobs will now slowly bop up and down while in zero gravity.

Conflicts:
	code/game/area/areas.dm
	code/game/turfs/turf.dm
	code/modules/clothing/shoes/magboots.dm
	code/modules/mob/living/carbon/human/human_movement.dm
	code/modules/mob/living/living.dm
	code/modules/mob/living/living_defines.dm
	code/modules/mob/mob_movement.dm
	code/modules/power/gravitygenerator.dm
This commit is contained in:
Giacomand
2014-05-09 00:00:44 +01:00
committed by ZomgPonies
parent 25853d7d79
commit f32f2b329f
8 changed files with 73 additions and 32 deletions
@@ -104,3 +104,12 @@
prob_slip = round(prob_slip)
return(prob_slip)
/mob/living/carbon/human/mob_has_gravity()
. = ..()
if(!.)
if(mob_negates_gravity())
. = 1
/mob/living/carbon/human/mob_negates_gravity()
return shoes && shoes.negates_gravity()
+13
View File
@@ -705,3 +705,16 @@
CM.drop_from_inventory(CM.legcuffed)
CM.legcuffed = null
CM.update_inv_legcuffed()
/mob/living/update_gravity(has_gravity)
if(!ticker)
return
float(!has_gravity)
/mob/living/proc/float(on)
if(on && !floating)
animate(src, pixel_y = 2, time = 10, loop = -1)
floating = 1
else if(!on && floating)
animate(src, pixel_y = initial(pixel_y), time = 10)
floating = 0
@@ -42,3 +42,4 @@
var/specialsauce = 0 //Has this person consumed enough special sauce? IF so they're a ticking time bomb of death.
var/implanting = 0 //Used for the mind-slave implant
var/silent = null //Can't talk. Value goes down every life proc.
var/floating = 0
+11 -10
View File
@@ -424,14 +424,8 @@
if(istype(turf,/turf/space))
continue
if(istype(src,/mob/living/carbon/human/)) // Only humans can wear magboots, so we give them a chance to.
if((istype(turf,/turf/simulated/floor)) && (src.lastarea.has_gravity == 0) && !(istype(src:shoes, /obj/item/clothing/shoes/magboots) && (src:shoes:flags & NOSLIP)))
continue
else
if((istype(turf,/turf/simulated/floor)) && (src.lastarea.has_gravity == 0)) // No one else gets a chance.
continue
if(!turf.density && !mob_negates_gravity())
continue
@@ -460,18 +454,22 @@
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
/mob/proc/mob_has_gravity(turf/T)
return has_gravity(src, T)
/mob/proc/mob_negates_gravity()
return 0
/mob/proc/Process_Spaceslipping(var/prob_slip = 5)
//Setup slipage
@@ -481,3 +479,6 @@
prob_slip = round(prob_slip)
return(prob_slip)
/mob/proc/update_gravity()
return