somebody toucha mah spaghet

This commit is contained in:
datlo
2019-01-08 09:34:41 +00:00
parent 4e10283b00
commit 35f13a850f
@@ -45,7 +45,7 @@
eject_all()
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
QDEL_NULL(active_dummy)
to_chat(usr, "<span class='notice'>You deactivate \the [src].</span>")
to_chat(usr, "<span class='notice'>You deactivate [src].</span>")
var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src))
T.icon = 'icons/effects/effects.dmi'
flick("emppulse",T)
@@ -58,7 +58,7 @@
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(usr.loc)
C.activate(O, usr, saved_icon, saved_icon_state, saved_overlays, saved_underlays, src)
qdel(O)
to_chat(usr, "<span class='notice'>You activate \the [src].</span>")
to_chat(usr, "<span class='notice'>You activate [src].</span>")
var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src))
T.icon = 'icons/effects/effects.dmi'
flick("emppulse",T)
@@ -159,11 +159,11 @@
var/activationCost = 300
var/activationUpkeep = 50
var/disguise = "landmate"
var/mob/living/silicon/robot/syndicate/saboteur/user
var/mob/living/silicon/robot/syndicate/saboteur/S
/obj/item/borg_chameleon/Destroy()
if(user)
user.cham_proj = null
if(S)
S.cham_proj = null
return ..()
/obj/item/borg_chameleon/dropped(mob/user)
@@ -186,45 +186,49 @@
/obj/item/borg_chameleon/proc/toggle(mob/living/silicon/robot/syndicate/saboteur/user)
if(active)
playsound(src, 'sound/effects/pop.ogg', 100, 1, -6)
to_chat(user, "<span class='notice'>You deactivate \the [src].</span>")
to_chat(user, "<span class='notice'>You deactivate [src].</span>")
deactivate(user)
else
to_chat(user, "<span class='notice'>You activate \the [src].</span>")
to_chat(user, "<span class='notice'>You activate [src].</span>")
var/start = user.filters.len
var/X,Y,rsq,i,f
for(i=1, i<=7, ++i)
var/X
var/Y
var/rsq
var/i
var/f
for(i in 1 to 7)
do
X = 60*rand() - 30
Y = 60*rand() - 30
rsq = X*X + Y*Y
while(rsq<100 || rsq>900)
user.filters += filter(type="wave", x=X, y=Y, size=rand()*2.5+0.5, offset=rand())
for(i=1, i<=7, ++i)
X = 60 * rand() - 30
Y = 60 * rand() - 30
rsq = X * X + Y * Y
while(rsq < 100 || rsq > 900)
user.filters += filter(type = "wave", x = X, y = Y, size = rand() * 2.5 + 0.5, offset = rand())
for(i in 1 to 7)
f = user.filters[start+i]
animate(f, offset=f:offset, time=0, loop=3, flags=ANIMATION_PARALLEL)
animate(offset=f:offset-1, time=rand()*20+10)
if (do_after(user, 50, target=user) && user.cell.use(activationCost))
animate(f, offset = f:offset, time = 0, loop = 3, flags = ANIMATION_PARALLEL)
animate(offset = f:offset - 1, time = rand() * 20 + 10)
if (do_after(user, 50, target = user) && user.cell.use(activationCost))
playsound(src, 'sound/effects/bamf.ogg', 100, 1, -6)
to_chat(user, "<span class='notice'>You are now disguised as a Nanotrasen engineering cyborg.</span>")
activate(user)
else
to_chat(user, "<span class='warning'>The chameleon field fizzles.</span>")
do_sparks(3, FALSE, user)
for(i=1, i<=min(7, user.filters.len), ++i) // removing filters that are animating does nothing, we gotta stop the animations first
f = user.filters[start+i]
for(i in 1 to min(7, user.filters.len)) // removing filters that are animating does nothing, we gotta stop the animations first
f = user.filters[start + i]
animate(f)
user.filters = null
/obj/item/borg_chameleon/process()
if(user)
if(!user.cell || !user.cell.use(activationUpkeep))
disrupt(user)
if(S)
if(!S.cell || !S.cell.use(activationUpkeep))
disrupt(S)
else
return PROCESS_KILL
/obj/item/borg_chameleon/proc/activate(mob/living/silicon/robot/syndicate/saboteur/user)
processing_objects.Add(src)
src.user = user
S = user
user.base_icon = disguise
user.icon_state = disguise
user.cham_proj = src
@@ -233,11 +237,11 @@
/obj/item/borg_chameleon/proc/deactivate(mob/living/silicon/robot/syndicate/saboteur/user)
processing_objects.Remove(src)
S = user
user.base_icon = initial(user.base_icon)
user.icon_state = initial(user.icon_state)
active = FALSE
user.update_icons()
src.user = user
/obj/item/borg_chameleon/proc/disrupt(mob/living/silicon/robot/syndicate/saboteur/user)
if(active)