absolutely disgusting

This commit is contained in:
D3athrow
2015-08-14 21:31:38 -05:00
parent 734bc60513
commit 4819a30550
4 changed files with 65 additions and 17 deletions

View File

@@ -319,6 +319,25 @@ var/global/list/PDA_Manifest = list()
desc = "You can't resist."
// name = ""
/obj/effect/sleeping
var/sleeptime
icon_state = "empty"
name = "Sleepy time"
var/datum/mind/owner
/obj/effect/sleeping/New(loc, ourtime, mind)
..()
sleeptime = ourtime
owner = mind
/obj/effect/sleeping/Crossed(atom/movable/A)
if(sleeptime > world.time)
if(ismob(A))
var/mob/living/L = A
if(L.mind != owner)
if(!L.stat) L.playsound_local(src, 'sound/effects/fall2.ogg', 100, 0, 0, 0, 0)
L.Paralyse(round(((sleeptime - world.time)/10)/2, 1))
/obj/effect/spawner
name = "object spawner"

View File

@@ -170,13 +170,6 @@
if(ismob(Obj))
if(Obj.areaMaster && Obj.areaMaster.has_gravity == 0)
inertial_drift(Obj)
if(sleeping)
if(sleeping <= world.time) sleeping = 0
var/mob/living/L = Obj
if(!iswizard(L))
if(!L.stat) L.playsound_local(src, 'sound/effects/fall2.ogg', 100, 0, 0, 0, 0)
L.Paralyse(round(((sleeping - world.time)/10)/2, 1))
/*
if(Obj.flags & NOGRAV)
inertial_drift(Obj)

View File

@@ -11,7 +11,7 @@
/mob/living/carbon/alien/larva/Life()
set invisibility = 0
//set background = 1
if (!loc) return
if (monkeyizing)
return

View File

@@ -16,9 +16,14 @@
level_max = list(Sp_TOTAL = 0, Sp_SPEED = 0, Sp_POWER = 0)
hud_state = "wiz_sleep"
var/image/aoe_underlay
var/list/oureffects = list()
/spell/aoe_turf/fall/New()
..()
buildimage()
/spell/aoe_turf/fall/proc/buildimage()
aoe_underlay = image(icon = 'icons/effects/640x640.dmi', icon_state = "fall", layer = 2.1)
aoe_underlay.transform /= 50
aoe_underlay.pixel_x = -304
@@ -26,18 +31,20 @@
aoe_underlay.mouse_opacity = 0
/spell/aoe_turf/fall/cast(list/targets)
/*spawn(120)
del(aoe_underlay)
buildimage()*/
spawn()
aoe_underlay.loc = get_turf(usr)
var/turf/T = get_turf(usr)
for(var/client/C in clients)
C.images += aoe_underlay
spawn(220)
C.images -= aoe_underlay
animate(aoe_underlay, transform = null, time = 2)
if(C.mob)
C.mob.see_fall(T)
//animate(aoe_underlay, transform = null, time = 2)
playsound(usr, 'sound/effects/fall.ogg', 100, 0, 0, 0, 0)
spawn(3)
var/sleepfor = world.time + 100
for(var/turf/T in targets)
T.sleeping = sleepfor
oureffects += getFromPool(/obj/effect/sleeping, T, sleepfor, usr:mind)
for(var/mob/living/L in T)
spawn()
if(L == usr) continue
@@ -47,7 +54,36 @@
/spell/aoe_turf/fall/after_cast(list/targets)
spawn(100)
animate(aoe_underlay, transform = aoe_underlay.transform / 50, time = 2)
//animate(aoe_underlay, transform = aoe_underlay.transform / 50, time = 2)
for(var/client/C in clients)
if(C.mob)
C.mob.see_fall()
for(var/obj/effect/sleeping/S in oureffects)
returnToPool(S)
oureffects -= S
return
/mob/var/image/fallimage
/mob/proc/see_fall(var/turf/T)
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/proc/see_rift() called tick#: [world.time]")
var/turf/T_mob = get_turf(src)
if(!T && fallimage)
animate(fallimage, transform = fallimage.transform / 50, time = 2)
sleep(2)
aoe_underlay.loc = src
return
del(fallimage)
return
if((T.z == T_mob.z) && (get_dist(T,T_mob) <= 15))// &&!(T in view(T_mob)))
if(!fallimage)
fallimage = image(icon = 'icons/effects/640x640.dmi', icon_state = "fall", layer = 2.1)
fallimage.transform /= 50
fallimage.mouse_opacity = 0
var/new_x = 32 * (T.x - T_mob.x) - 304
var/new_y = 32 * (T.y - T_mob.y) - 304
fallimage.pixel_x = new_x
fallimage.pixel_y = new_y
fallimage.loc = T_mob
src << fallimage
animate(fallimage, transform = null, time = 2)