Addendum to: r1655

#Added an icon helper procs library by Lummox Jr.
#Added more icon+overlay functionality by DarkCampainger. Both can be found under icon_procs.dm.
#Added continuous beam code by Gunbuddy to atom.dm. You can now create continuous beams of energy/magic/monkeys/whatever. For instance, pAI cords. It's really awesome.
#Like optical camo? Well I have good news. New stealth "graphic." May need some fine tuning depending on player/coder preference. It's also a little slow to change (due to update_clothing()). With that said, it's a lot cooler than what we had before. Check it out.
#Added the getIconMask() and AddCamoOverlay() procs for the above.
#Added animated satic filter icons by Koil to icons.
#New force wall and shield icons. Shield icons moved to effects.dmi.
#Changed up the abandoned mining station.
#Moved a few carp spawn points closer to the station. Added a few more.

Ninjas:
No longer spawn whoknowswhere like they did at times before.
Get a unique stealth graphic. Yup. Also, small chance of failure.
New energy net icon and effects. Energy net now uses the beam code mentioned above. It will now check for stealth.
Fixed some graphical icon issues with ninja suit. Added a female black jumpsuit to icons for this reason. Added icon directions to ninja effects.
Some more general code cleanup.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1664 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
noisomehollow@lycos.com
2011-06-05 09:25:15 +00:00
parent d67f72c5db
commit fe889a3e8d
25 changed files with 3136 additions and 2250 deletions

View File

@@ -136,5 +136,70 @@ obj
src.moved_recently = 1
return
////////////
/*
Beam code by Gunbuddy
Beam() proc will only allow one beam to come from a source at a time. Attempting to call it more than
once at a time per source will cause graphical errors.
Also, the icon used for the beam will have to be vertical and 32x32.
The math involved assumes that the icon is vertical to begin with so unless you want to adjust the math,
its easier to just keep the beam vertical.
*/
/atom/proc/Beam(atom/BeamTarget,icon_state="b_beam",icon='beam.dmi',time=50, maxdistance=10)
//BeamTarget represents the target for the beam, basically just means the other end.
//Time is the duration to draw the beam
//Icon is obviously which icon to use for the beam, default is beam.dmi
//Icon_state is what icon state is used. Default is b_beam which is a blue beam.
//Maxdistance is the longest range the beam will persist before it gives up.
var/EndTime=world.time+time
while(BeamTarget&&world.time<EndTime&&get_dist(src,BeamTarget)<maxdistance&&z==BeamTarget.z)
//If the BeamTarget gets deleted, the time expires, or the BeamTarget gets out
//of range or to another z-level, then the beam will stop. Otherwise it will
//continue to draw.
dir=get_dir(src,BeamTarget) //Causes the source of the beam to rotate to continuosly face the BeamTarget.
for(var/obj/overlay/beam/O in orange(10,src)) //This section erases the previously drawn beam because I found it was easier to
if(O.BeamSource==src) //just draw another instance of the beam instead of trying to manipulate all the
del O //pieces to a new orientation.
var/Angle=round(Get_Angle(src,BeamTarget))
var/icon/I=new(icon,icon_state)
I.Turn(Angle)
var/DX=(32*BeamTarget.x+BeamTarget.pixel_x)-(32*x+pixel_x)
var/DY=(32*BeamTarget.y+BeamTarget.pixel_y)-(32*y+pixel_y)
var/N=0
var/length=round(sqrt((DX)**2+(DY)**2))
for(N,N<length,N+=32)
var/obj/overlay/beam/X=new(loc)
X.BeamSource=src
if(N+32>length)
var/icon/II=new(icon,icon_state)
II.DrawBox(null,1,(length-N),32,32)
II.Turn(Angle)
X.icon=II
else X.icon=I
var/Pixel_x=round(sin(Angle)+32*sin(Angle)*(N+16)/32)
var/Pixel_y=round(cos(Angle)+32*cos(Angle)*(N+16)/32)
if(DX==0) Pixel_x=0
if(DY==0) Pixel_y=0
if(Pixel_x>32)
for(var/a=0, a<=Pixel_x,a+=32)
X.x++
Pixel_x-=32
if(Pixel_x<-32)
for(var/a=0, a>=Pixel_x,a-=32)
X.x--
Pixel_x+=32
if(Pixel_y>32)
for(var/a=0, a<=Pixel_y,a+=32)
X.y++
Pixel_y-=32
if(Pixel_y<-32)
for(var/a=0, a>=Pixel_y,a-=32)
X.y--
Pixel_y+=32
X.pixel_x=Pixel_x
X.pixel_y=Pixel_y
sleep(3) //Changing this to a lower value will cause the beam to follow more smoothly with movement, but it will also be more laggy.
//I've found that 3 ticks provided a nice balance for my use.
for(var/obj/overlay/beam/O in orange(10,src)) if(O.BeamSource==src) del O

View File

@@ -710,6 +710,15 @@
unacidable = 1
var/i_attached//Added for possible image attachments to objects. For hallucinations and the like.
/obj/overlay/beam//Not actually a projectile, just an effect.
name="beam"
icon='beam.dmi'
icon_state="b_beam"
var/tmp/atom/BeamSource
New()
..()
spawn(10) del src
/obj/portal
name = "portal"
icon = 'stationobjs.dmi'

View File

@@ -37,6 +37,13 @@
item_state = "bl_suit"
color = "black"
/obj/item/clothing/under/color/blackf
name = "Female Black Jumpsuit"
desc = "This one is a lady-size!"
icon_state = "black"
item_state = "bl_suit"
color = "blackf"
/obj/item/clothing/under/color/blue
name = "Blue Jumpsuit"
icon_state = "blue"

View File

@@ -363,21 +363,22 @@
if(degree < 315) return WEST
return NORTH|WEST
//Returns direction that the mob or whomever should be facing in relation to the target.
//This proc does not grant absolute direction and is mostly useful for 8dir sprite positioning.
//I personally used it with getline() to great effect.
/proc/get_dir_to(turf/start,turf/end)//N
var/xdiff = start.x - end.x//The sign is important.
var/ydiff = start.y - end.y
/proc/angle2text(var/degree)
return dir2text(angle2dir(degree))
var/direction_x = xdiff<1 ? 4:8//East - west
var/direction_y = ydiff<1 ? 1:2//North - south
var/direction_xy = xdiff==0 ? -4:0//If x is the same, subtract 4.
var/direction_yx = ydiff==0 ? -1:0//If y is the same, subtract 1.
var/direction_f = direction_x+direction_y+direction_xy+direction_yx//Finally direction tally.
direction_f = direction_f==0 ? 1:direction_f//If direction is 0(same spot), return north. Otherwise, direction.
return direction_f
/proc/Get_Angle(atom/movable/start,atom/movable/end)//For beams.
if(!start || !end) return 0
var/dy
var/dx
dy=(32*end.y+end.pixel_y)-(32*start.y+start.pixel_y)
dx=(32*end.x+end.pixel_x)-(32*start.x+start.pixel_x)
if(!dy)
return (dx>=0)?90:270
.=arctan(dx/dy)
if(dy<0)
.+=180
else if(dx<0)
.+=360
//Returns location. Returns null if no location was found.
/proc/get_teleport_loc(turf/location,mob/target,distance = 1, density = 0, errorx = 0, errory = 0, eoffsetx = 0, eoffsety = 0)
@@ -472,9 +473,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
return destination
/proc/angle2text(var/degree)
return dir2text(angle2dir(degree))
/proc/text_input(var/Message, var/Title, var/Default, var/length=MAX_MESSAGE_LEN)
return sanitize(input(Message, Title, Default) as text, length)
@@ -984,6 +982,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
/proc/between(var/low, var/middle, var/high)
return max(min(middle, high), low)
proc/arctan(x)
var/y=arcsin(x/sqrt(1+x*x))
return y
//returns random gauss number
proc/GaussRand(var/sigma)
var/x,y,rsq

View File

@@ -0,0 +1,568 @@
/*
IconProcs
by Lummox JR
Check the icon_procs_readme.dm for how they work.
*/
#define TO_HEX_DIGIT(n) ascii2text((n&15) + ((n&15)<10 ? 48 : 87))
icon
// Multiply all alpha values by this float
proc/ChangeOpacity(opacity = 1.0)
MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,opacity, 0,0,0,0)
// Convert to grayscale
proc/GrayScale()
MapColors(0.3,0.3,0.3, 0.59,0.59,0.59, 0.11,0.11,0.11, 0,0,0)
proc/ColorTone(tone)
GrayScale()
var/list/TONE = ReadRGB(tone)
var/gray = round(TONE[1]*0.3 + TONE[2]*0.59 + TONE[3]*0.11, 1)
var/icon/upper = (255-gray) ? new(src) : null
if(gray)
MapColors(255/gray,0,0, 0,255/gray,0, 0,0,255/gray, 0,0,0)
Blend(tone, ICON_MULTIPLY)
else SetIntensity(0)
if(255-gray)
upper.Blend(rgb(gray,gray,gray), ICON_SUBTRACT)
upper.MapColors((255-TONE[1])/(255-gray),0,0,0, 0,(255-TONE[2])/(255-gray),0,0, 0,0,(255-TONE[3])/(255-gray),0, 0,0,0,0, 0,0,0,1)
Blend(upper, ICON_ADD)
// Take the minimum color of two icons; combine transparency as if blending with ICON_ADD
proc/MinColors(icon)
var/icon/I = new(src)
I.Opaque()
I.Blend(icon, ICON_SUBTRACT)
Blend(I, ICON_SUBTRACT)
// Take the maximum color of two icons; combine opacity as if blending with ICON_OR
proc/MaxColors(icon)
var/icon/I
if(isicon(icon))
I = new(icon)
else
// solid color
I = new(src)
I.Blend("#000000", ICON_OVERLAY)
I.SwapColor("#000000", null)
I.Blend(icon, ICON_OVERLAY)
var/icon/J = new(src)
J.Opaque()
I.Blend(J, ICON_SUBTRACT)
Blend(I, ICON_OR)
// make this icon fully opaque--transparent pixels become black
proc/Opaque(background = "#000000")
SwapColor(null, background)
MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0, 0,0,0,1)
// Change a grayscale icon into a white icon where the original color becomes the alpha
// I.e., black -> transparent, gray -> translucent white, white -> solid white
proc/BecomeAlphaMask()
SwapColor(null, "#000000ff") // don't let transparent become gray
MapColors(0,0,0,0.3, 0,0,0,0.59, 0,0,0,0.11, 0,0,0,0, 1,1,1,0)
proc/UseAlphaMask(mask)
Opaque()
AddAlphaMask(mask)
proc/AddAlphaMask(mask)
var/icon/M = new(mask)
M.Blend("#ffffff", ICON_SUBTRACT)
// apply mask
Blend(M, ICON_ADD)
/*
HSV format is represented as "#hhhssvv" or "#hhhssvvaa"
Hue ranges from 0 to 0x5ff (1535)
0x000 = red
0x100 = yellow
0x200 = green
0x300 = cyan
0x400 = blue
0x500 = magenta
Saturation is from 0 to 0xff (255)
More saturation = more color
Less saturation = more gray
Value ranges from 0 to 0xff (255)
Higher value means brighter color
*/
proc/ReadRGB(rgb)
if(!rgb) return
// interpret the HSV or HSVA value
var/i=1,start=1
if(text2ascii(rgb) == 35) ++start // skip opening #
var/ch,which=0,r=0,g=0,b=0,alpha=0,usealpha
var/digits=0
for(i=start, i<=length(rgb), ++i)
ch = text2ascii(rgb, i)
if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102) break
++digits
if(digits == 8) break
var/single = digits < 6
if(digits != 3 && digits != 4 && digits != 6 && digits != 8) return
if(digits == 4 || digits == 8) usealpha = 1
for(i=start, digits>0, ++i)
ch = text2ascii(rgb, i)
if(ch >= 48 && ch <= 57) ch -= 48
else if(ch >= 65 && ch <= 70) ch -= 55
else if(ch >= 97 && ch <= 102) ch -= 87
else break
--digits
switch(which)
if(0)
r = (r << 4) | ch
if(single)
r |= r << 4
++which
else if(!(digits & 1)) ++which
if(1)
g = (g << 4) | ch
if(single)
g |= g << 4
++which
else if(!(digits & 1)) ++which
if(2)
b = (b << 4) | ch
if(single)
b |= b << 4
++which
else if(!(digits & 1)) ++which
if(3)
alpha = (alpha << 4) | ch
if(single) alpha |= alpha << 4
. = list(r, g, b)
if(usealpha) . += alpha
proc/ReadHSV(hsv)
if(!hsv) return
// interpret the HSV or HSVA value
var/i=1,start=1
if(text2ascii(hsv) == 35) ++start // skip opening #
var/ch,which=0,hue=0,sat=0,val=0,alpha=0,usealpha
var/digits=0
for(i=start, i<=length(hsv), ++i)
ch = text2ascii(hsv, i)
if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102) break
++digits
if(digits == 9) break
if(digits > 7) usealpha = 1
if(digits <= 4) ++which
if(digits <= 2) ++which
for(i=start, digits>0, ++i)
ch = text2ascii(hsv, i)
if(ch >= 48 && ch <= 57) ch -= 48
else if(ch >= 65 && ch <= 70) ch -= 55
else if(ch >= 97 && ch <= 102) ch -= 87
else break
--digits
switch(which)
if(0)
hue = (hue << 4) | ch
if(digits == (usealpha ? 6 : 4)) ++which
if(1)
sat = (sat << 4) | ch
if(digits == (usealpha ? 4 : 2)) ++which
if(2)
val = (val << 4) | ch
if(digits == (usealpha ? 2 : 0)) ++which
if(3)
alpha = (alpha << 4) | ch
. = list(hue, sat, val)
if(usealpha) . += alpha
proc/HSVtoRGB(hsv)
if(!hsv) return "#000000"
var/list/HSV = ReadHSV(hsv)
if(!HSV) return "#000000"
var/hue = HSV[1]
var/sat = HSV[2]
var/val = HSV[3]
// Compress hue into easier-to-manage range
hue -= hue >> 8
if(hue >= 0x5fa) hue -= 0x5fa
var/hi,mid,lo,r,g,b
hi = val
lo = round((255 - sat) * val / 255, 1)
mid = lo + round(abs(round(hue, 510) - hue) * (hi - lo) / 255, 1)
if(hue >= 765)
if(hue >= 1275) {r=hi; g=lo; b=mid}
else if(hue >= 1020) {r=mid; g=lo; b=hi }
else {r=lo; g=mid; b=hi }
else
if(hue >= 510) {r=lo; g=hi; b=mid}
else if(hue >= 255) {r=mid; g=hi; b=lo }
else {r=hi; g=mid; b=lo }
return (HSV.len > 3) ? rgb(r,g,b,HSV[4]) : rgb(r,g,b)
proc/RGBtoHSV(rgb)
if(!rgb) return "#0000000"
var/list/RGB = ReadRGB(rgb)
if(!RGB) return "#0000000"
var/r = RGB[1]
var/g = RGB[2]
var/b = RGB[3]
var/hi = max(r,g,b)
var/lo = min(r,g,b)
var/val = hi
var/sat = hi ? round((hi-lo) * 255 / hi, 1) : 0
var/hue = 0
if(sat)
var/dir
var/mid
if(hi == r)
if(lo == b) {hue=0; dir=1; mid=g}
else {hue=1535; dir=-1; mid=b}
else if(hi == g)
if(lo == r) {hue=512; dir=1; mid=b}
else {hue=511; dir=-1; mid=r}
else if(hi == b)
if(lo == g) {hue=1024; dir=1; mid=r}
else {hue=1023; dir=-1; mid=g}
hue += dir * round((mid-lo) * 255 / (hi-lo), 1)
return hsv(hue, sat, val, (RGB.len>3 ? RGB[4] : null))
proc/hsv(hue, sat, val, alpha)
if(hue < 0 || hue >= 1536) hue %= 1536
if(hue < 0) hue += 1536
if((hue & 0xFF) == 0xFF)
++hue
if(hue >= 1536) hue = 0
if(sat < 0) sat = 0
if(sat > 255) sat = 255
if(val < 0) val = 0
if(val > 255) val = 255
. = "#"
. += TO_HEX_DIGIT(hue >> 8)
. += TO_HEX_DIGIT(hue >> 4)
. += TO_HEX_DIGIT(hue)
. += TO_HEX_DIGIT(sat >> 4)
. += TO_HEX_DIGIT(sat)
. += TO_HEX_DIGIT(val >> 4)
. += TO_HEX_DIGIT(val)
if(!isnull(alpha))
if(alpha < 0) alpha = 0
if(alpha > 255) alpha = 255
. += TO_HEX_DIGIT(alpha >> 4)
. += TO_HEX_DIGIT(alpha)
/*
Smooth blend between HSV colors
amount=0 is the first color
amount=1 is the second color
amount=0.5 is directly between the two colors
amount<0 or amount>1 are allowed
*/
proc/BlendHSV(hsv1, hsv2, amount)
var/list/HSV1 = ReadHSV(hsv1)
var/list/HSV2 = ReadHSV(hsv2)
// add missing alpha if needed
if(HSV1.len < HSV2.len) HSV1 += 255
else if(HSV2.len < HSV1.len) HSV2 += 255
var/usealpha = HSV1.len > 3
// normalize hsv values in case anything is screwy
if(HSV1[1] > 1536) HSV1[1] %= 1536
if(HSV2[1] > 1536) HSV2[1] %= 1536
if(HSV1[1] < 0) HSV1[1] += 1536
if(HSV2[1] < 0) HSV2[1] += 1536
if(!HSV1[3]) {HSV1[1] = 0; HSV1[2] = 0}
if(!HSV2[3]) {HSV2[1] = 0; HSV2[2] = 0}
// no value for one color means don't change saturation
if(!HSV1[3]) HSV1[2] = HSV2[2]
if(!HSV2[3]) HSV2[2] = HSV1[2]
// no saturation for one color means don't change hues
if(!HSV1[2]) HSV1[1] = HSV2[1]
if(!HSV2[2]) HSV2[1] = HSV1[1]
// Compress hues into easier-to-manage range
HSV1[1] -= HSV1[1] >> 8
HSV2[1] -= HSV2[1] >> 8
var/hue_diff = HSV2[1] - HSV1[1]
if(hue_diff > 765) hue_diff -= 1530
else if(hue_diff <= -765) hue_diff += 1530
var/hue = round(HSV1[1] + hue_diff * amount, 1)
var/sat = round(HSV1[2] + (HSV2[2] - HSV1[2]) * amount, 1)
var/val = round(HSV1[3] + (HSV2[3] - HSV1[3]) * amount, 1)
var/alpha = usealpha ? round(HSV1[4] + (HSV2[4] - HSV1[4]) * amount, 1) : null
// normalize hue
if(hue < 0 || hue >= 1530) hue %= 1530
if(hue < 0) hue += 1530
// decompress hue
hue += round(hue / 255)
return hsv(hue, sat, val, alpha)
/*
Smooth blend between RGB colors
amount=0 is the first color
amount=1 is the second color
amount=0.5 is directly between the two colors
amount<0 or amount>1 are allowed
*/
proc/BlendRGB(rgb1, rgb2, amount)
var/list/RGB1 = ReadRGB(rgb1)
var/list/RGB2 = ReadRGB(rgb2)
// add missing alpha if needed
if(RGB1.len < RGB2.len) RGB1 += 255
else if(RGB2.len < RGB1.len) RGB2 += 255
var/usealpha = RGB1.len > 3
var/r = round(RGB1[1] + (RGB2[1] - RGB1[1]) * amount, 1)
var/g = round(RGB1[2] + (RGB2[2] - RGB1[2]) * amount, 1)
var/b = round(RGB1[3] + (RGB2[3] - RGB1[3]) * amount, 1)
var/alpha = usealpha ? round(RGB1[4] + (RGB2[4] - RGB1[4]) * amount, 1) : null
return isnull(alpha) ? rgb(r, g, b) : rgb(r, g, b, alpha)
proc/BlendRGBasHSV(rgb1, rgb2, amount)
return HSVtoRGB(RGBtoHSV(rgb1), RGBtoHSV(rgb2), amount)
proc/HueToAngle(hue)
// normalize hsv in case anything is screwy
if(hue < 0 || hue >= 1536) hue %= 1536
if(hue < 0) hue += 1536
// Compress hue into easier-to-manage range
hue -= hue >> 8
return hue / (1530/360)
proc/AngleToHue(angle)
// normalize hsv in case anything is screwy
if(angle < 0 || angle >= 360) angle -= 360 * round(angle / 360)
var/hue = angle * (1530/360)
// Decompress hue
hue += round(hue / 255)
return hue
// positive angle rotates forward through red->green->blue
proc/RotateHue(hsv, angle)
var/list/HSV = ReadHSV(hsv)
// normalize hsv in case anything is screwy
if(HSV[1] >= 1536) HSV[1] %= 1536
if(HSV[1] < 0) HSV[1] += 1536
// Compress hue into easier-to-manage range
HSV[1] -= HSV[1] >> 8
if(angle < 0 || angle >= 360) angle -= 360 * round(angle / 360)
HSV[1] = round(HSV[1] + angle * (1530/360), 1)
// normalize hue
if(HSV[1] < 0 || HSV[1] >= 1530) HSV[1] %= 1530
if(HSV[1] < 0) HSV[1] += 1530
// decompress hue
HSV[1] += round(HSV[1] / 255)
return hsv(HSV[1], HSV[2], HSV[3], (HSV.len > 3 ? HSV[4] : null))
// Convert an rgb color to grayscale
proc/GrayScale(rgb)
var/list/RGB = ReadRGB(rgb)
var/gray = RGB[1]*0.3 + RGB[2]*0.59 + RGB[3]*0.11
return (RGB.len > 3) ? rgb(gray, gray, gray, RGB[4]) : rgb(gray, gray, gray)
// Change grayscale color to black->tone->white range
proc/ColorTone(rgb, tone)
var/list/RGB = ReadRGB(rgb)
var/list/TONE = ReadRGB(tone)
var/gray = RGB[1]*0.3 + RGB[2]*0.59 + RGB[3]*0.11
var/tone_gray = TONE[1]*0.3 + TONE[2]*0.59 + TONE[3]*0.11
if(gray <= tone_gray) return BlendRGB("#000000", tone, gray/(tone_gray || 1))
else return BlendRGB(tone, "#ffffff", (gray-tone_gray)/((255-tone_gray) || 1))
/*
Get flat icon by DarkCampainger. As it says on the tin, will return an icon with all the overlays
as a single icon. Useful for when you want to manipulate an icon via the above as overlays are not normally included.
The _flatIcons list is a cache for generated icon files.
*/
// Associative list of [md5 values = Icon] for determining if the icon already exists
var/list/_flatIcons = list()
proc
getFlatIcon(atom/A, dir, cache=1) // 1 = use cache, 2 = override cache, 0 = ignore cache
// Layers will be a sorted list of icons/overlays, based on the order in which they are displayed
var/list/layers = list()
var/hash = "" // Hash of overlay combination
// Add the atom's icon itself
if(A.icon)
// Make a copy without pixel_x/y settings
var/image/copy = image(icon=A.icon,icon_state=A.icon_state,layer=A.layer,dir=A.dir)
layers[copy] = A.layer
// dir defaults to A's dir
if(!dir) dir = A.dir
// Loop through the underlays, then overlays, sorting them into the layers list
var
list/process = A.underlays // Current list being processed
pSet=0 // Which list is being processed: 0 = underlays, 1 = overlays
curIndex=1 // index of 'current' in list being processed
current // Current overlay being sorted
currentLayer // Calculated layer that overlay appears on (special case for FLOAT_LAYER)
compare // The overlay 'add' is being compared against
cmpIndex // The index in the layers list of 'compare'
while(TRUE)
if(curIndex<=process.len)
current = process[curIndex]
currentLayer = current:layer
if(currentLayer<0) // Special case for FLY_LAYER
ASSERT(currentLayer > -1000)
if(pSet == 0) // Underlay
currentLayer = A.layer+currentLayer/1000
else // Overlay
currentLayer = A.layer+(1000+currentLayer)/1000
// Sort add into layers list
for(cmpIndex=1,cmpIndex<=layers.len,cmpIndex++)
compare = layers[cmpIndex]
if(currentLayer < layers[compare]) // Associated value is the calculated layer
layers.Insert(cmpIndex,current)
layers[current] = currentLayer
break
if(cmpIndex>layers.len) // Reached end of list without inserting
layers[current]=currentLayer // Place at end
curIndex++
if(curIndex>process.len)
if(pSet == 0) // Switch to overlays
curIndex = 1
pSet = 1
process = A.overlays
else // All done
break
if(cache!=0) // If cache is NOT disabled
// Create a hash value to represent this specific flattened icon
for(var/I in layers)
hash += "\ref[I:icon],[I:icon_state],[I:dir ? I:dir : dir],[I:pixel_x],[I:pixel_y];_;"
hash=md5(hash)
if(cache!=2) // If NOT overriding cache
// Check if the icon has already been generated
for(var/h in _flatIcons)
if(h == hash)
// Icon already exists, just return that one
return _flatIcons[h]
var
// We start with a blank canvas, otherwise some icon procs crash silently
icon/flat = icon('effects.dmi', "icon_state"="nothing") // Final flattened icon
icon/add // Icon of overlay being added
// Current dimensions of flattened icon
flatX1=1;flatX2=flat.Width();flatY1=1;flatY2=flat.Height()
// Dimensions of overlay being added
addX1;addX2;addY1;addY2
for(var/I in layers)
if(I:icon)
if(I:icon_state)
// Has icon and state set
add = icon(I:icon, I:icon_state, dir, 1, 0)
else
if(A.icon_state in icon_states(I:icon))
// Inherits icon_state from atom
add = icon(I:icon, A.icon_state, dir, 1, 0)
else
// Uses default state ("")
add = icon(I:icon, null, dir, 1, 0)
else if(I:icon_state)
// Inherits icon from atom
add = icon(A.icon, I:icon_state, dir, 1, 0)
else
// Unknown
continue
// Find the new dimensions of the flat icon to fit the added overlay
addX1 = min(flatX1, I:pixel_x+1)
addX2 = max(flatX2, I:pixel_x+add.Width())
addY1 = min(flatY1, I:pixel_y+1)
addY2 = max(flatY2, I:pixel_y+add.Height())
if(addX1!=flatX1 || addX2!=flatX2 || addY1!=flatY1 || addY2!=flatY2)
// Resize the flattened icon so the new icon fits
flat.Crop(addX1-flatX1+1, addY1-flatY1+1, addX2-flatX1+1, addY2-flatY1+1)
flatX1=addX1;flatX2=addX2
flatY1=addY1;flatY2=addY2
// Blend the overlay into the flattened icon
flat.Blend(add,ICON_OVERLAY,I:pixel_x+2-flatX1,I:pixel_y+2-flatY1)
if(cache!=0) // If cache is NOT disabled
// Cache the generated icon in our list so we don't have to regenerate it
_flatIcons[hash] = flat
return flat
getIconMask(atom/A)//By yours truly. Creates a dynamic mask for a mob/whatever. /N
var/icon/alpha_mask = new(A.icon,A.icon_state)//So we want the default icon and icon state of A.
for(var/I in A.overlays)//For every image in overlays. var/image/I will not work, don't try it.
if(I:layer>A.layer) continue//If layer is greater than what we need, skip it.
var/icon/image_overlay = new(I:icon,I:icon_state)//Blend only works with icon objects.
//Also, icons cannot directly set icon_state. Slower than changing variables but whatever.
alpha_mask.Blend(image_overlay,ICON_OR)//OR so they are lumped together in a nice overlay.
return alpha_mask//And now return the mask.
/mob/proc/AddCamoOverlay(atom/A)//A is the atom which we are using as the overlay.
var/icon/opacity_icon = new(A.icon, A.icon_state)//Don't really care for overlays/underlays.
//Now we need to culculate overlays+underlays and add them together to form an image for a mask.
//var/icon/alpha_mask = getFlatIcon(src)//Accurate but SLOW. Not designed for running each tick. Could have other uses I guess.
var/icon/alpha_mask = getIconMask(src)//Which is why I created that proc. Also a little slow since it's blending a bunch of icons together but good enough.
opacity_icon.AddAlphaMask(alpha_mask)//Likely the main source of lag for this proc. Probably not designed to run each tick.
opacity_icon.ChangeOpacity(0.4)//Front end for MapColors so it's fast. 0.5 means half opacity and looks the best in my opinion.
for(var/i=0,i<5,i++)//And now we add it as overlays. It's faster than creating an icon and then merging it.
var/image/I = image("icon" = opacity_icon, "icon_state" = A.icon_state, "layer" = layer+0.8)//So it's above other stuff but below weapons and the like.
switch(i)//Now to determine offset so the result is somewhat blurred.
if(1)
I.pixel_x -= 1
if(2)
I.pixel_x += 1
if(3)
I.pixel_y -= 1
if(4)
I.pixel_y += 1
overlays += I//And finally add the overlay.

View File

@@ -0,0 +1,214 @@
/*
IconProcs README
A BYOND library for manipulating icons and colors
by Lummox JR
version 1.0
The IconProcs library was made to make a lot of common icon operations much easier. BYOND's icon manipulation
routines are very capable but some of the advanced capabilities like using alpha transparency can be unintuitive to beginners.
CHANGING ICONS
Several new procs have been added to the /icon datum to simplify working with icons. To use them,
remember you first need to setup an /icon var like so:
var/icon/my_icon = new('iconfile.dmi')
icon/ChangeOpacity(amount = 1)
A very common operation in DM is to try to make an icon more or less transparent. Making an icon more
transparent is usually much easier than making it less so, however. This proc basically is a frontend
for MapColors() which can change opacity any way you like, in much the same way that SetIntensity()
can make an icon lighter or darker. If amount is 0.5, the opacity of the icon will be cut in half.
If amount is 2, opacity is doubled and anything more than half-opaque will become fully opaque.
icon/GrayScale()
Converts the icon to grayscale instead of a fully colored icon. Alpha values are left intact.
icon/ColorTone(tone)
Similar to GrayScale(), this proc converts the icon to a range of black -> tone -> white, where tone is an
RGB color (its alpha is ignored). This can be used to create a sepia tone or similar effects.
See also the global ColorTone() proc.
icon/MinColors(icon)
The icon is blended with a second icon where the minimum of each RGB pixel is the result.
Transparency may increase, as if the icons were blended with ICON_ADD. You may supply a color in place of an icon.
icon/MaxColors(icon)
The icon is blended with a second icon where the maximum of each RGB pixel is the result.
Opacity may increase, as if the icons were blended with ICON_OR. You may supply a color in place of an icon.
icon/Opaque(background = "#000000")
All alpha values are set to 255 throughout the icon. Transparent pixels become black, or whatever background color you specify.
icon/BecomeAlphaMask()
You can convert a simple grayscale icon into an alpha mask to use with other icons very easily with this proc.
The black parts become transparent, the white parts stay white, and anything in between becomes a translucent shade of white.
icon/AddAlphaMask(mask)
The alpha values of the mask icon will be blended with the current icon. Anywhere the mask is opaque,
the current icon is untouched. Anywhere the mask is transparent, the current icon becomes transparent.
Where the mask is translucent, the current icon becomes more transparent.
icon/UseAlphaMask(mask, mode)
Sometimes you may want to take the alpha values from one icon and use them on a different icon.
This proc will do that. Just supply the icon whose alpha mask you want to use, and src will change
so it has the same colors as before but uses the mask for opacity.
COLOR MANAGEMENT AND HSV
RGB isn't the only way to represent color. Sometimes it's more useful to work with a model called HSV, which stands for hue, saturation, and value.
* The hue of a color describes where it is along the color wheel. It goes from red to yellow to green to
cyan to blue to magenta and back to red.
* The saturation of a color is how much color is in it. A color with low saturation will be more gray,
and with no saturation at all it is a shade of gray.
* The value of a color determines how bright it is. A high-value color is vivid, moderate value is dark,
and no value at all is black.
Just as BYOND uses "#rrggbb" to represent RGB values, a similar format is used for HSV: "#hhhssvv". The hue is three
hex digits because it ranges from 0 to 0x5FF.
* 0 to 0xFF - red to yellow
* 0x100 to 0x1FF - yellow to green
* 0x200 to 0x2FF - green to cyan
* 0x300 to 0x3FF - cyan to blue
* 0x400 to 0x4FF - blue to magenta
* 0x500 to 0x5FF - magenta to red
Knowing this, you can figure out that red is "#000ffff" in HSV format, which is hue 0 (red), saturation 255 (as colorful as possible),
value 255 (as bright as possible). Green is "#200ffff" and blue is "#400ffff".
More than one HSV color can match the same RGB color.
Here are some procs you can use for color management:
ReadRGB(rgb)
Takes an RGB string like "#ffaa55" and converts it to a list such as list(255,170,85). If an RGBA format is used
that includes alpha, the list will have a fourth item for the alpha value.
hsv(hue, sat, val, apha)
Counterpart to rgb(), this takes the values you input and converts them to a string in "#hhhssvv" or "#hhhssvvaa"
format. Alpha is not included in the result if null.
ReadHSV(rgb)
Takes an HSV string like "#100FF80" and converts it to a list such as list(256,255,128). If an HSVA format is used that
includes alpha, the list will have a fourth item for the alpha value.
RGBtoHSV(rgb)
Takes an RGB or RGBA string like "#ffaa55" and converts it into an HSV or HSVA color such as "#080aaff".
HSVtoRGB(hsv)
Takes an HSV or HSVA string like "#080aaff" and converts it into an RGB or RGBA color such as "#ff55aa".
BlendRGB(rgb1, rgb2, amount)
Blends between two RGB or RGBA colors using regular RGB blending. If amount is 0, the first color is the result;
if 1, the second color is the result. 0.5 produces an average of the two. Values outside the 0 to 1 range are allowed as well.
The returned value is an RGB or RGBA color.
BlendHSV(hsv1, hsv2, amount)
Blends between two HSV or HSVA colors using HSV blending, which tends to produce nicer results than regular RGB
blending because the brightness of the color is left intact. If amount is 0, the first color is the result; if 1,
the second color is the result. 0.5 produces an average of the two. Values outside the 0 to 1 range are allowed as well.
The returned value is an HSV or HSVA color.
BlendRGBasHSV(rgb1, rgb2, amount)
Like BlendHSV(), but the colors used and the return value are RGB or RGBA colors. The blending is done in HSV form.
HueToAngle(hue)
Converts a hue to an angle range of 0 to 360. Angle 0 is red, 120 is green, and 240 is blue.
AngleToHue(hue)
Converts an angle to a hue in the valid range.
RotateHue(hsv, angle)
Takes an HSV or HSVA value and rotates the hue forward through red, green, and blue by an angle from 0 to 360.
(Rotating red by 60<36> produces yellow.) The result is another HSV or HSVA color with the same saturation and value
as the original, but a different hue.
GrayScale(rgb)
Takes an RGB or RGBA color and converts it to grayscale. Returns an RGB or RGBA string.
ColorTone(rgb, tone)
Similar to GrayScale(), this proc converts an RGB or RGBA color to a range of black -> tone -> white instead of
using strict shades of gray. The tone value is an RGB color; any alpha value is ignored.
*/
/*
Get Flat Icon DEMO by DarkCampainger
This is a test for the get flat icon proc, modified approprietly for icons and their states.
Probably not a good idea to run this unless you want to see how the proc works in detail.
mob
icon = 'old_or_unused.dmi'
icon_state = "green"
Login()
// Testing image underlays
underlays += image(icon='old_or_unused.dmi',icon_state="red")
underlays += image(icon='old_or_unused.dmi',icon_state="red", pixel_x = 32)
underlays += image(icon='old_or_unused.dmi',icon_state="red", pixel_x = -32)
// Testing image overlays
overlays += image(icon='old_or_unused.dmi',icon_state="green", pixel_x = 32, pixel_y = -32)
overlays += image(icon='old_or_unused.dmi',icon_state="green", pixel_x = 32, pixel_y = 32)
overlays += image(icon='old_or_unused.dmi',icon_state="green", pixel_x = -32, pixel_y = -32)
// Testing icon file overlays (defaults to mob's state)
overlays += '_flat_demoIcons2.dmi'
// Testing icon_state overlays (defaults to mob's icon)
overlays += "white"
// Testing dynamic icon overlays
var/icon/I = icon('old_or_unused.dmi', icon_state="aqua")
I.Shift(NORTH,16,1)
overlays+=I
// Testing dynamic image overlays
I=image(icon=I,pixel_x = -32, pixel_y = 32)
overlays+=I
// Testing object types (and layers)
overlays+=/obj/overlayTest
loc = locate (10,10,1)
verb
Browse_Icon()
set name = "1. Browse Icon"
// Give it a name for the cache
var/iconName = "[ckey(src.name)]_flattened.dmi"
// Send the icon to src's local cache
src<<browse_rsc(getFlatIcon(src), iconName)
// Display the icon in their browser
src<<browse("<body bgcolor='#000000'><p><img src='[iconName]'></p></body>")
Output_Icon()
set name = "2. Output Icon"
src<<"Icon is: \icon[getFlatIcon(src)]"
Label_Icon()
set name = "3. Label Icon"
// Give it a name for the cache
var/iconName = "[ckey(src.name)]_flattened.dmi"
// Copy the file to the rsc manually
var/icon/I = fcopy_rsc(getFlatIcon(src))
// Send the icon to src's local cache
src<<browse_rsc(I, iconName)
// Update the label to show it
winset(src,"imageLabel","image='\ref[I]'");
Add_Overlay()
set name = "4. Add Overlay"
overlays += image(icon='old_or_unused.dmi',icon_state="yellow",pixel_x = rand(-64,32), pixel_y = rand(-64,32))
Stress_Test()
set name = "5. Stress Test"
for(var/i = 0 to 1000)
// The third parameter forces it to generate a new one, even if it's already cached
getFlatIcon(src,0,2)
if(prob(5))
Add_Overlay()
Browse_Icon()
Cache_Test()
set name = "6. Cache Test"
for(var/i = 0 to 1000)
getFlatIcon(src)
Browse_Icon()
obj/overlayTest
icon = 'old_or_unused.dmi'
icon_state = "blue"
pixel_x = -24
pixel_y = 24
layer = TURF_LAYER // Should appear below the rest of the overlays
world
view = "7x7"
maxx = 20
maxy = 20
maxz = 1
*/

View File

@@ -81,7 +81,7 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
if(destination&&istype(mobloc, /turf))
spawn(0)
playsound(U.loc, "sparks", 50, 1)
anim(mobloc,src,'mob.dmi',,"phaseout")
anim(mobloc,src,'mob.dmi',,"phaseout",,U.dir)
handle_teleport_grab(destination, U)
U.loc = destination
@@ -90,7 +90,7 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
spark_system.start()
playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, "sparks", 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein")
anim(U.loc,U,'mob.dmi',,"phasein",,U.dir)
spawn(0)
destination.kill_creatures(U)//Any living mobs in teleport area are gibbed. Check turf procs for how it does it.
@@ -115,7 +115,7 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
if(!T.density&&istype(mobloc, /turf))
spawn(0)
playsound(U.loc, 'sparks4.ogg', 50, 1)
anim(mobloc,src,'mob.dmi',,"phaseout")
anim(mobloc,src,'mob.dmi',,"phaseout",,U.dir)
handle_teleport_grab(T, U)
U.loc = T
@@ -124,7 +124,7 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
spark_system.start()
playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, 'sparks2.ogg', 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein")
anim(U.loc,U,'mob.dmi',,"phasein",,U.dir)
spawn(0)//Any living mobs in teleport area are gibbed.
T.kill_creatures(U)
@@ -228,17 +228,17 @@ Must right click on a mob to activate.*/
set src = usr.contents
var/C = 200
if(!ninjacost(C)&&iscarbon(M))
if(!ninjacost(C,1)&&iscarbon(M))
var/mob/living/carbon/human/U = affecting
if(M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame.
//if(M)//DEBUG
if(!locate(/obj/effects/energy_net) in M.loc)//Check if they are already being affected by an energy net.
for(var/turf/T in getline(U.loc, M.loc))
if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy.
U << "You may not use an energy net through solid obstacles!"
return
if(T==U.loc||T==M.loc) continue
spawn(0)
anim(T,M,'projectiles.dmi',"energy",,,get_dir_to(U.loc,M.loc))
spawn(0)
U.Beam(M,"n_beam",,15)
M.anchored = 1//Anchors them so they can't move.
U.say("Get over here!")
var/obj/effects/energy_net/E = new /obj/effects/energy_net(M.loc)
@@ -301,11 +301,9 @@ Or otherwise known as anime mode. Which also happens to be ridiculously powerful
var/mob/living/carbon/human/U = affecting
if(!U.incorporeal_move)
U.incorporeal_move = 2
U.density = 0
U << "\blue You will now phase through solid matter."
else
U.incorporeal_move = 0
U.density = 1
U << "\blue You will no-longer phase through solid matter."
return
@@ -325,7 +323,7 @@ Or otherwise known as anime mode. Which also happens to be ridiculously powerful
U.say("Ai Satsugai!")
spawn(0)
playsound(U.loc, "sparks", 50, 1)
anim(mobloc,U,'mob.dmi',,"phaseout")
anim(mobloc,U,'mob.dmi',,"phaseout",,U.dir)
spawn(0)
for(var/turf/T in getline(mobloc, destination))
@@ -333,7 +331,7 @@ Or otherwise known as anime mode. Which also happens to be ridiculously powerful
T.kill_creatures(U)
if(T==mobloc||T==destination) continue
spawn(0)
anim(T,U,'mob.dmi',,"phasein")
anim(T,U,'mob.dmi',,"phasein",,U.dir)
handle_teleport_grab(destination, U)
U.loc = destination
@@ -342,7 +340,7 @@ Or otherwise known as anime mode. Which also happens to be ridiculously powerful
spark_system.start()
playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, "sparks", 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein")
anim(U.loc,U,'mob.dmi',,"phasein",,U.dir)
s_coold = 1
else
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
@@ -397,14 +395,14 @@ This is so anime it hurts. But that's the point.*/
var/turf/picked = locate(locx,locy,mobloc.z)
spawn(0)
playsound(U.loc, "sparks", 50, 1)
anim(mobloc,U,'mob.dmi',,"phaseout")
anim(mobloc,U,'mob.dmi',,"phaseout",,U.dir)
spawn(0)
var/limit = 4
for(var/turf/T in oview(5))
if(prob(20))
spawn(0)
anim(T,U,'mob.dmi',,"phasein")
anim(T,U,'mob.dmi',,"phasein",,U.dir)
limit--
if(limit<=0) break
@@ -416,7 +414,7 @@ This is so anime it hurts. But that's the point.*/
spark_system.start()
playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, "sparks", 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein")
anim(U.loc,U,'mob.dmi',,"phasein",,U.dir)
s_coold = 1
else
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."

View File

@@ -19,6 +19,7 @@ ________________________________________________________________________________
verbs += /obj/item/clothing/suit/space/space_ninja/proc/init//suit initialize verb
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_instruction//for AIs
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_holo
//verbs += /obj/item/clothing/suit/space/space_ninja/proc/display_verb_procs//DEBUG. Doesn't work.
spark_system = new /datum/effects/system/spark_spread()//spark initialize
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -147,7 +148,7 @@ ________________________________________________________________________________
/obj/item/clothing/suit/space/space_ninja/proc/ninitialize(delay = s_delay, mob/living/carbon/human/U = loc)
if(U.mind&&U.mind.assigned_role=="MODE"&&!s_initialized&&!s_busy)//Shouldn't be busy... but anything is possible I guess.
s_busy = 1
for(var/i = 0,i<7,i++)
for(var/i,i<7,i++)
switch(i)
if(0)
U << "\blue Now initializing..."
@@ -489,10 +490,7 @@ ________________________________________________________________________________
if(spideros<=9)
spideros=0
else
spideros = round(spideros/10)//Best way to do this, flooring to nearest integer. As an example, another way of doing it is attached below:
// var/temp = num2text(spideros)
// var/return_to = copytext(temp, 1, (length(temp)))//length has to be to the length of the thing because by default it's length+1
// spideros = text2num(return_to)//Maximum length here is 6. Use (return_to, X) to specify larger strings if needed.
spideros = round(spideros/10)//Best way to do this, flooring to nearest integer.
if("Stealth")
toggle_stealth()
@@ -563,7 +561,7 @@ ________________________________________________________________________________
if( !(U.stat||U.wear_suit!=src||!s_initialized) )
if( !(cell.charge<=1||s_busy) )
s_busy = 1
for(var/i = 0, i<4, i++)
for(var/i, i<4, i++)
switch(i)
if(0)
U << "\blue Engaging mode...\n\black<b>CODE NAME</b>: \red <b>KAMIKAZE</b>"
@@ -617,7 +615,7 @@ ________________________________________________________________________________
if(confirm == "Yes"&&AI)
if(A.laws.zeroth)//Gives a few seconds to re-upload the AI somewhere before it takes full control.
s_busy = 1
for(var/i=0,i<5,i++)
for(var/i,i<5,i++)
if(AI==A)
switch(i)
if(0)
@@ -681,7 +679,7 @@ ________________________________________________________________________________
if(!hologram)//If there is not already a hologram.
hologram = new(T)//Spawn a blank effect at the location.
hologram.invisibility = 101//So that it doesn't show up, ever. This also means one could attach a number of images to a single obj and display them differently to differnet people.
hologram.dir = get_dir_to(T,affecting.loc)
hologram.dir = get_dir(T,affecting.loc)
var/image/I = image('mob.dmi',hologram,"ai-holo")//Attach an image to object.
hologram.i_attached = I//To attach the image in order to later reference.
AI << I
@@ -772,14 +770,6 @@ ________________________________________________________________________________
var/total_reagent_transfer//Keep track of this stuff.
for(var/reagent_id in reagent_list)
var/datum/reagent/R = I.reagents.has_reagent(reagent_id)//Mostly to pull up the name of the reagent after calculating. Also easier to use than writing long proc paths.
/* if(reagents.get_reagent_amount(reagent_id)<r_maxamount+(reagent_id == "radium"?(a_boost*a_transfer):0)&&I.reagents.get_reagent_amount(reagent_id)>=a_transfer)//Radium is always special.
//Here we determine how much reagent will actually transfer if there is enough to transfer or there is a need of transfer. Minimum of max amount available (using a_transfer) or amount needed.
var/amount_to_transfer = min( (r_maxamount+(reagent_id == "radium"?(a_boost*a_transfer):0)-reagents.get_reagent_amount(reagent_id)) ,(round(I.reagents.get_reagent_amount(reagent_id)/a_transfer))*a_transfer)//In the end here, we round the amount available, then multiply it again.
total_reagent_transfer += amount_to_transfer//Add to total reagent trans.
I.reagents.remove_reagent(reagent_id, amount_to_transfer)//Remove from beaker.
reagents.add_reagent(reagent_id, amount_to_transfer)//Add to suit. Reactions are not important.
U << "Added [amount_to_transfer] units of [reagent_id]."//Fix the id label.
*/
if(R&&reagents.get_reagent_amount(reagent_id)<r_maxamount+(reagent_id == "radium"?(a_boost*a_transfer):0)&&R.volume>=a_transfer)//Radium is always special.
//Here we determine how much reagent will actually transfer if there is enough to transfer or there is a need of transfer. Minimum of max amount available (using a_transfer) or amount needed.
var/amount_to_transfer = min( (r_maxamount+(reagent_id == "radium"?(a_boost*a_transfer):0)-reagents.get_reagent_amount(reagent_id)) ,(round(R.volume/a_transfer))*a_transfer)//In the end here, we round the amount available, then multiply it again.
@@ -795,30 +785,11 @@ ________________________________________________________________________________
/obj/item/clothing/suit/space/space_ninja/proc/toggle_stealth()
var/mob/living/carbon/human/U = affecting
/* This was a test for a new cloaking system. WIP.
if(!s_active)
spawn(0)
anim(U.loc,U,'mob.dmi',,"cloak")
var/image/I = image('mob.dmi',affecting,"ninjatest2")
for(var/mob/O in oviewers(U, null))
O << "[U.name] vanishes into thin air!"
I.override = 1
affecting << I
s_active = !s_active
else
spawn(0)
anim(U.loc,U,'mob.dmi',,"uncloak")
for(var/mob/O in oviewers(U, null))
O << "[U.name] appears from thin air!"
s_active = !s_active
*/
if(s_active)
cancel_stealth()
else
spawn(0)
anim(U.loc,U,'mob.dmi',,"cloak")
anim(U.loc,U,'mob.dmi',,"cloak",,U.dir)
s_active=!s_active
U << "\blue You are now invisible to normal detection."
for(var/mob/O in oviewers(U))
@@ -829,7 +800,7 @@ ________________________________________________________________________________
var/mob/living/carbon/human/U = affecting
if(s_active)
spawn(0)
anim(U.loc,U,'mob.dmi',,"uncloak")
anim(U.loc,U,'mob.dmi',,"uncloak",,U.dir)
s_active=!s_active
U << "\blue You are now visible."
for(var/mob/O in oviewers(U))
@@ -1174,38 +1145,21 @@ ________________________________________________________________________________
var/chance = rand(1,100)
switch(chance)
if(1 to 50)//High chance of a regular name.
var/g = pick(0,1)
var/first = null
var/last = pick(last_names)
if(g==0)
first = pick(first_names_female)
else
first = pick(first_names_male)
voice = "[first] [last]"
voice = "[rand(0,1)==1?pick(first_names_female):pick(first_names_male)] [pick(last_names)]"
if(51 to 80)//Smaller chance of a clown name.
var/first = pick(clown_names)
voice = "[first]"
voice = "[pick(clown_names)]"
if(81 to 90)//Small chance of a wizard name.
var/first = pick(wizard_first)
var/last = pick(wizard_second)
voice = "[first] [last]"
voice = "[pick(wizard_first)] [pick(wizard_second)]"
if(91 to 100)//Small chance of an existing crew name.
var/list/names = new()
var/names[] = new()
for(var/mob/living/carbon/human/M in world)
if(M==U||!M.client||!M.real_name) continue
names.Add(M)
if(!names.len)
voice = "Cuban Pete"//Smallest chance to be the man.
else
var/mob/picked = pick(names)
voice = picked.real_name
names.Add(M.real_name)
voice = !names.len ? "Cuban Pete" : pick(names)
U << "You are now mimicking <B>[voice]</B>."
else
if(voice!="Unknown")
U << "You deactivate the voice synthesizer."
voice = "Unknown"
else
U << "The voice synthesizer is already deactivated."
U << "The voice synthesizer is [voice!="Unknown"?"now":"already"] deactivated."
voice = "Unknown"
return
/obj/item/clothing/mask/gas/voice/space_ninja/proc/switchm()
@@ -1238,7 +1192,6 @@ ________________________________________________________________________________
..()
var/mode
var/voice
switch(mode)
if(0)
mode = "Scouter"
@@ -1248,12 +1201,8 @@ ________________________________________________________________________________
mode = "Thermal Scanner"
if(3)
mode = "Meson Scanner"
if(vchange==0)
voice = "inactive"
else
voice = "active"
usr << "<B>[mode]</B> is active."//Leaving usr here since it may be on the floor or on a person.
usr << "Voice mimicking algorithm is set to <B>[voice]</B>."
usr << "Voice mimicking algorithm is set <B>[!vchange?"inactive":"active"]</B>."
/*
===================================================================================
@@ -1262,11 +1211,8 @@ ________________________________________________________________________________
*/
/*
HerpA:
I'm not really sure what you want this to do.
For now it will teleport people to the prison after 30 seconds. (Check the process() proc to change where teleport goes)
It will teleport people to the prison after 30 seconds. (Check the process() proc to change where teleport goes)
It is possible to destroy the net by the occupant or someone else.
The sprite for the net is kind of ugly but I couldn't come up with a better one.
*/
/obj/effects/energy_net
@@ -1300,6 +1246,7 @@ The sprite for the net is kind of ugly but I couldn't come up with a better one.
process(var/mob/living/carbon/M as mob)
var/check = 30//30 seconds before teleportation. Could be extended I guess.
var/mob_name = affecting.name//Since they will report as null if terminated before teleport.
//The person can still try and attack the net when inside.
while(!isnull(M)&&!isnull(src)&&check>0)//While M and net exist, and 30 seconds have not passed.
check--
@@ -1307,7 +1254,7 @@ The sprite for the net is kind of ugly but I couldn't come up with a better one.
if(isnull(M)||M.loc!=loc)//If mob is gone or not at the location.
if(!isnull(master))//As long as they still exist.
master << "\red <b>ERROR</b>: \black unable to locate [affecting]. Procedure terminated."
master << "\red <b>ERROR</b>: \black unable to locate [mob_name]. Procedure terminated."
del(src)//Get rid of the net.
return
@@ -1315,7 +1262,7 @@ The sprite for the net is kind of ugly but I couldn't come up with a better one.
//No need to check for countdown here since while() broke, it's implicit that it finished.
spawn(0)
playsound(M.loc, 'sparks4.ogg', 50, 1)
anim(M.loc,M,'mob.dmi',,"phaseout")
anim(M.loc,M,'mob.dmi',,"phaseout",,M.dir)
density = 0//Make the net pass-through.
invisibility = 101//Make the net invisible so all the animations can play out.
@@ -1326,9 +1273,9 @@ The sprite for the net is kind of ugly but I couldn't come up with a better one.
var/datum/effects/system/spark_spread/spark_system = new /datum/effects/system/spark_spread()
spark_system.set_up(5, 0, M.loc)
spark_system.start()
playsound(M.loc, 'Deconstruct.ogg', 50, 1)
playsound(M.loc, 'phasein.ogg', 25, 1)
playsound(M.loc, 'sparks2.ogg', 50, 1)
anim(M.loc,M,'mob.dmi',,"phasein")
anim(M.loc,M,'mob.dmi',,"phasein",,M.dir)
del(src)//Wait for everything to finish, delete the net. Else it will stop everything once net is deleted, including the spawn(0).
for(var/mob/O in viewers(src, 3))
@@ -1361,10 +1308,7 @@ The sprite for the net is kind of ugly but I couldn't come up with a better one.
if(2.0)
health-=50
if(3.0)
if (prob(50))
health-=50
else
health-=25
health-=prob(50)?50:25
healthcheck()
return

View File

@@ -178,7 +178,10 @@ client/proc/create_space_ninja(obj/spawn_point)
/mob/living/carbon/human/proc/equip_space_ninja()
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
equip_if_possible(R, slot_ears)
equip_if_possible(new /obj/item/clothing/under/color/black(src), slot_w_uniform)
if(gender==FEMALE)
equip_if_possible(new /obj/item/clothing/under/color/blackf(src), slot_w_uniform)
else
equip_if_possible(new /obj/item/clothing/under/color/black(src), slot_w_uniform)
equip_if_possible(new /obj/item/clothing/shoes/space_ninja(src), slot_shoes)
equip_if_possible(new /obj/item/clothing/suit/space/space_ninja(src), slot_wear_suit)
equip_if_possible(new /obj/item/clothing/gloves/space_ninja(src), slot_gloves)
@@ -258,6 +261,35 @@ client/proc/create_space_ninja(obj/spawn_point)
n_gloves.candrain=0
n_gloves.draining=0
//Allows the mob to grab a stealth icon.
/mob/proc/NinjaStealthActive(atom/A)//A is the atom which we are using as the overlay.
invisibility = 2//Set ninja invis to 2.
var/icon/opacity_icon = new(A.icon, A.icon_state)
var/icon/alpha_mask = getIconMask(src)
var/icon/alpha_mask_2 = new('effects.dmi', "wave1")
alpha_mask.AddAlphaMask(alpha_mask_2)
opacity_icon.AddAlphaMask(alpha_mask)
for(var/i=0,i<5,i++)//And now we add it as overlays. It's faster than creating an icon and then merging it.
var/image/I = image("icon" = opacity_icon, "icon_state" = A.icon_state, "layer" = layer+0.8)//So it's above other stuff but below weapons and the like.
switch(i)//Now to determine offset so the result is somewhat blurred.
if(1)
I.pixel_x -= 1
if(2)
I.pixel_x += 1
if(3)
I.pixel_y -= 1
if(4)
I.pixel_y += 1
overlays += I//And finally add the overlay.
overlays += image("icon"='effects.dmi',"icon_state" ="electricity","layer" = layer+0.9)
//When ninja steal malfunctions.
/mob/proc/NinjaStealthMalf()
invisibility = 0//Set ninja invis to 0.
overlays += image("icon"='effects.dmi',"icon_state" ="electricity","layer" = layer+0.9)
playsound(loc, 'stealthoff.ogg', 75, 1)
//=======//GENERIC VERB MODIFIERS//=======//
/obj/item/clothing/suit/space/space_ninja/proc/grant_equip_verbs()
@@ -352,7 +384,6 @@ client/proc/create_space_ninja(obj/spawn_point)
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
U.incorporeal_move = 0
U.density = 1
kamikaze = 0
k_unlock = 0
U << "\blue Disengaging mode...\n\black<b>CODE NAME</b>: \red <b>KAMIKAZE</b>"
@@ -375,6 +406,29 @@ client/proc/create_space_ninja(obj/spawn_point)
//=======//OLD & UNUSED//=======//
/*
Deprecated. get_dir() does the same thing. Still a nice proc.
Returns direction that the mob or whomever should be facing in relation to the target.
This proc does not grant absolute direction and is mostly useful for 8dir sprite positioning.
I personally used it with getline() to great effect.
/proc/get_dir_to(turf/start,turf/end)//N
var/xdiff = start.x - end.x//The sign is important.
var/ydiff = start.y - end.y
var/direction_x = xdiff<1 ? 4:8//East - west
var/direction_y = ydiff<1 ? 1:2//North - south
var/direction_xy = xdiff==0 ? -4:0//If x is the same, subtract 4.
var/direction_yx = ydiff==0 ? -1:0//If y is the same, subtract 1.
var/direction_f = direction_x+direction_y+direction_xy+direction_yx//Finally direction tally.
direction_f = direction_f==0 ? 1:direction_f//If direction is 0(same spot), return north. Otherwise, direction.
return direction_f
Alternative and inferior method of calculating spideros.
var/temp = num2text(spideros)
var/return_to = copytext(temp, 1, (length(temp)))//length has to be to the length of the thing because by default it's length+1
spideros = text2num(return_to)//Maximum length here is 6. Use (return_to, X) to specify larger strings if needed.
//Old way of draining from wire.
/obj/item/clothing/gloves/space_ninja/proc/drain_wire()
set name = "Drain From Wire"
@@ -488,6 +542,14 @@ BYOND fixed the verb bugs so this is no longer necessary. I prefer verb panels.
//=======//DEBUG//=======//
/obj/item/clothing/suit/space/space_ninja/proc/display_verb_procs()
//DEBUG
//Does nothing at the moment. I am trying to see if it's possible to mess around with verbs as variables.
//for(var/P in verbs)
// if(P.set.name)
// usr << "[P.set.name], path: [P]"
return
/*
Most of these are at various points of incomplete.

View File

@@ -123,8 +123,8 @@
/obj/forcefield
desc = "A space wizard's magic wall."
name = "FORCEWALL"
icon = 'mob.dmi'
icon_state = "shield"
icon = 'effects.dmi'
icon_state = "m_shield"
anchored = 1.0
opacity = 0
density = 1

View File

@@ -4,14 +4,14 @@
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
if(src.name == "alien")
src.name = text("alien ([rand(1, 1000)])")
src.real_name = src.name
if(name == "alien")
name = text("alien ([rand(1, 1000)])")
real_name = name
spawn (1)
if(!istype(src, /mob/living/carbon/alien/humanoid/queen))
src.stand_icon = new /icon('alien.dmi', "alien_s")
src.lying_icon = new /icon('alien.dmi', "alien_l")
src.icon = src.stand_icon
stand_icon = new /icon('alien.dmi', "alien_s")
lying_icon = new /icon('alien.dmi', "alien_l")
icon = stand_icon
update_clothing()
src << "\blue Your icons have been generated!"
..()
@@ -20,23 +20,23 @@
//This is fine, works the same as a human
/mob/living/carbon/alien/humanoid/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || src.now_pushing))
if ((!( yes ) || now_pushing))
return
src.now_pushing = 0
now_pushing = 0
..()
if (!istype(AM, /atom/movable))
return
if (!src.now_pushing)
src.now_pushing = 1
if (!now_pushing)
now_pushing = 1
if (!AM.anchored)
var/t = get_dir(src, AM)
if (istype(AM, /obj/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
for(var/obj/window/win in get_step(AM,t))
src.now_pushing = 0
now_pushing = 0
return
step(AM, t)
src.now_pushing = null
now_pushing = null
return
return
@@ -55,14 +55,14 @@
..()
statpanel("Status")
if (src.client && src.client.holder)
if (client && client.holder)
stat(null, "([x], [y], [z])")
stat(null, "Intent: [src.a_intent]")
stat(null, "Move Mode: [src.m_intent]")
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")
if (src.client.statpanel == "Status")
stat(null, "Plasma Stored: [src.toxloss]")
if (client.statpanel == "Status")
stat(null, "Plasma Stored: [toxloss]")
/mob/living/carbon/alien/humanoid/bullet_act(flag, A as obj)
var/shielded = 0
@@ -81,57 +81,57 @@
if ((shielded && flag != "bullet"))
if (!flag)
src << "\blue Your shield was disturbed by a laser!"
if(src.paralysis <= 12) src.paralysis = 12
src.updatehealth()
if(paralysis <= 12) paralysis = 12
updatehealth()
if (locate(/obj/item/weapon/grab, src))
var/mob/safe = null
if (istype(src.l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = src.l_hand
if ((G.state == 3 && get_dir(src, A) == src.dir))
if (istype(l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = l_hand
if ((G.state == 3 && get_dir(src, A) == dir))
safe = G.affecting
if (istype(src.r_hand, /obj/item/weapon/grab))
var/obj/item/weapon.grab/G = src.r_hand
if ((G.state == 3 && get_dir(src, A) == src.dir))
if (istype(r_hand, /obj/item/weapon/grab))
var/obj/item/weapon.grab/G = r_hand
if ((G.state == 3 && get_dir(src, A) == dir))
safe = G.affecting
if (safe)
return safe.bullet_act(flag, A)
switch(flag)//Did these people not know that switch is a function that exists? I swear, half of the code ignores switch completely.
if(PROJECTILE_BULLET)
var/d = 51
if (src.stat != 2)
src.bruteloss += d
src.updatehealth()
if (stat != 2)
bruteloss += d
updatehealth()
if (prob(50)&&weakened <= 5)
src.weakened = 5
weakened = 5
if(PROJECTILE_TASER)
if (prob(75) && src.stunned <= 10)
src.stunned = 10
if (prob(75) && stunned <= 10)
stunned = 10
else
src.weakened = 10
weakened = 10
if(PROJECTILE_DART)//Nothing is supposed to happen, just making sure it's listed.
if(PROJECTILE_LASER)
var/d = 20
// if (!src.eye_blurry) src.eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
if (prob(25)) src.stunned++
if (src.stat != 2)
src.bruteloss += d
src.updatehealth()
// if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
if (prob(25)) stunned++
if (stat != 2)
bruteloss += d
updatehealth()
if (prob(25))
src.stunned = 1
stunned = 1
if(PROJECTILE_PULSE)
var/d = 40
if (src.stat != 2)
src.bruteloss += d
src.updatehealth()
if (stat != 2)
bruteloss += d
updatehealth()
if (prob(50))
src.stunned = min(src.stunned, 5)
stunned = min(stunned, 5)
if(PROJECTILE_BOLT)
src.toxloss += 3
src.radiation += 100
src.updatehealth()
src.drowsyness += 5
toxloss += 3
radiation += 100
updatehealth()
drowsyness += 5
return
/mob/living/carbon/alien/humanoid/emp_act(severity)
@@ -142,15 +142,14 @@
..()
/mob/living/carbon/alien/humanoid/ex_act(severity)
flick("flash", src.flash)
flick("flash", flash)
if (src.stat == 2 && src.client)
src.gib(1)
if (stat == 2 && client)
gib(1)
return
else if (src.stat == 2 && !src.client)
var/virus = src.virus
gibs(src.loc, virus)
else if (stat == 2 && !client)
gibs(loc, virus)
del(src)
return
@@ -165,7 +164,7 @@
switch (severity)
if (1.0)
b_loss += 500
src.gib(1)
gib(1)
return
if (2.0)
@@ -174,39 +173,39 @@
f_loss += 60
src.ear_damage += 30
src.ear_deaf += 120
ear_damage += 30
ear_deaf += 120
if(3.0)
b_loss += 30
if (prob(50) && !shielded)
src.paralysis += 1
src.ear_damage += 15
src.ear_deaf += 60
paralysis += 1
ear_damage += 15
ear_deaf += 60
src.bruteloss += b_loss
src.fireloss += f_loss
bruteloss += b_loss
fireloss += f_loss
src.updatehealth()
updatehealth()
/mob/living/carbon/alien/humanoid/blob_act()
if (src.stat == 2)
if (stat == 2)
return
var/shielded = 0
for(var/obj/item/device/shield/S in src)
if (S.active)
shielded = 1
var/damage = null
if (src.stat != 2)
if (stat != 2)
damage = rand(30,40)
if(shielded)
damage /= 4
src.show_message("\red The magma splashes on you!")
show_message("\red The magma splashes on you!")
src.fireloss += damage
fireloss += damage
return
@@ -226,7 +225,7 @@
l_hand = null
/mob/living/carbon/alien/humanoid/db_click(text, t1)
var/obj/item/W = src.equipped()
var/obj/item/W = equipped()
var/emptyHand = (W == null)
if ((!emptyHand) && (!istype(W, /obj/item)))
return
@@ -238,55 +237,55 @@
//if emptyhand then wear the suit, no bedsheet clothes for the alien
if("o_clothing")
if (src.wear_suit)
if (wear_suit)
if (emptyHand)
src.wear_suit.DblClick()
wear_suit.DblClick()
return
if (( istype(W, /obj/alien/skin_suit) ))
src.u_equip(W)
src.head = W
u_equip(W)
head = W
return
return
/* if (!( istype(W, /obj/item/clothing/suit) ))
return
src.u_equip(W)
src.wear_suit = W
u_equip(W)
wear_suit = W
W.equipped(src, text)
*/
if("head")
if (src.head)
if (head)
if (emptyHand)
src.head.DblClick()
head.DblClick()
return
if (( istype(W, /obj/alien/head) ))
src.u_equip(W)
src.head = W
u_equip(W)
head = W
return
return
/* if (!( istype(W, /obj/item/clothing/head) ))
return
src.u_equip(W)
src.head = W
u_equip(W)
head = W
W.equipped(src, text)
*/
if("storage1")
if (src.l_store)
if (l_store)
if (emptyHand)
src.l_store.DblClick()
l_store.DblClick()
return
if ((!( istype(W, /obj/item) ) || W.w_class > 3))
return
src.u_equip(W)
src.l_store = W
u_equip(W)
l_store = W
if("storage2")
if (src.r_store)
if (r_store)
if (emptyHand)
src.r_store.DblClick()
r_store.DblClick()
return
if ((!( istype(W, /obj/item) ) || W.w_class > 3))
return
src.u_equip(W)
src.r_store = W
u_equip(W)
r_store = W
else
return
@@ -294,51 +293,51 @@
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (src.health > 0)
src.bruteloss += (istype(O, /obj/meteor/small) ? 10 : 25)
src.fireloss += 30
if (health > 0)
bruteloss += (istype(O, /obj/meteor/small) ? 10 : 25)
fireloss += 30
src.updatehealth()
updatehealth()
return
/mob/living/carbon/alien/humanoid/Move(a, b, flag)
if (src.buckled)
if (buckled)
return 0
if (src.restrained())
src.pulling = null
if (restrained())
pulling = null
var/t7 = 1
if (src.restrained())
if (restrained())
for(var/mob/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
t7 = null
if ((t7 && (src.pulling && ((get_dist(src, src.pulling) <= 1 || src.pulling.loc == src.loc) && (src.client && src.client.moving)))))
var/turf/T = src.loc
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
var/turf/T = loc
. = ..()
if (src.pulling && src.pulling.loc)
if(!( isturf(src.pulling.loc) ))
src.pulling = null
if (pulling && pulling.loc)
if(!( isturf(pulling.loc) ))
pulling = null
return
else
if(Debug)
diary <<"src.pulling disappeared? at __LINE__ in mob.dm - src.pulling = [src.pulling]"
diary <<"pulling disappeared? at __LINE__ in mob.dm - pulling = [pulling]"
diary <<"REPORT THIS"
/////
if(src.pulling && src.pulling.anchored)
src.pulling = null
if(pulling && pulling.anchored)
pulling = null
return
if (!src.restrained())
var/diag = get_dir(src, src.pulling)
if (!restrained())
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(src, src.pulling) > 1 || diag))
if (ismob(src.pulling))
var/mob/M = src.pulling
if ((get_dist(src, pulling) > 1 || diag))
if (ismob(pulling))
var/mob/M = pulling
var/ok = 1
if (locate(/obj/item/weapon/grab, M.grabbed_by))
if (prob(75))
@@ -356,144 +355,144 @@
var/t = M.pulling
M.pulling = null
step(src.pulling, get_dir(src.pulling.loc, T))
step(pulling, get_dir(pulling.loc, T))
M.pulling = t
else
if (src.pulling)
if (istype(src.pulling, /obj/window))
if(src.pulling:ini_dir == NORTHWEST || src.pulling:ini_dir == NORTHEAST || src.pulling:ini_dir == SOUTHWEST || src.pulling:ini_dir == SOUTHEAST)
for(var/obj/window/win in get_step(src.pulling,get_dir(src.pulling.loc, T)))
src.pulling = null
if (src.pulling)
step(src.pulling, get_dir(src.pulling.loc, T))
if (pulling)
if (istype(pulling, /obj/window))
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
for(var/obj/window/win in get_step(pulling,get_dir(pulling.loc, T)))
pulling = null
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
src.pulling = null
pulling = null
. = ..()
if ((src.s_active && !( s_active in src.contents ) ))
src.s_active.close(src)
if ((s_active && !( s_active in contents ) ))
s_active.close(src)
return
/mob/living/carbon/alien/humanoid/update_clothing()
..()
if (src.monkeyizing)
if (monkeyizing)
return
src.overlays = null
overlays = null
if(src.buckled)
if(istype(src.buckled, /obj/stool/bed))
src.lying = 1
if(buckled)
if(istype(buckled, /obj/stool/bed))
lying = 1
else
src.lying = 0
lying = 0
// Automatically drop anything in store / id / belt if you're not wearing a uniform.
if (src.zone_sel)
src.zone_sel.overlays = null
src.zone_sel.overlays += src.body_standing
src.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", src.zone_sel.selecting))
if (zone_sel)
zone_sel.overlays = null
zone_sel.overlays += body_standing
zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", zone_sel.selecting))
if (src.lying)
if(src.update_icon)
src.icon = src.lying_icon
if (lying)
if(update_icon)
icon = lying_icon
src.overlays += src.body_lying
overlays += body_lying
if (src.face_lying)
src.overlays += src.face_lying
if (face_lying)
overlays += face_lying
else
if(src.update_icon)
src.icon = src.stand_icon
if(update_icon)
icon = stand_icon
src.overlays += src.body_standing
overlays += body_standing
if (src.face_standing)
src.overlays += src.face_standing
if (face_standing)
overlays += face_standing
// Uniform
if (src.client)
src.client.screen -= src.hud_used.other
src.client.screen -= src.hud_used.intents
src.client.screen -= src.hud_used.mov_int
if (client)
client.screen -= hud_used.other
client.screen -= hud_used.intents
client.screen -= hud_used.mov_int
// ???
if (src.client && src.other)
src.client.screen += src.hud_used.other
if (client && other)
client.screen += hud_used.other
if (src.client)
if (src.i_select)
if (src.intent)
src.client.screen += src.hud_used.intents
if (client)
if (i_select)
if (intent)
client.screen += hud_used.intents
var/list/L = dd_text2list(src.intent, ",")
var/list/L = dd_text2list(intent, ",")
L[1] += ":-11"
src.i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
else
src.i_select.screen_loc = null
if (src.m_select)
if (src.m_int)
src.client.screen += src.hud_used.mov_int
i_select.screen_loc = null
if (m_select)
if (m_int)
client.screen += hud_used.mov_int
var/list/L = dd_text2list(src.m_int, ",")
var/list/L = dd_text2list(m_int, ",")
L[1] += ":-11"
src.m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
else
src.m_select.screen_loc = null
m_select.screen_loc = null
if (src.wear_suit)
var/t1 = src.wear_suit.item_state
if (wear_suit)
var/t1 = wear_suit.item_state
if (!t1)
t1 = src.wear_suit.icon_state
src.overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( src.lying ) ? null : "2")), "layer" = MOB_LAYER)
if (src.wear_suit.blood_DNA)
if (istype(src.wear_suit, /obj/item/clothing/suit/armor))
src.overlays += image("icon" = 'blood.dmi', "icon_state" = "armorblood[!src.lying ? "" : "2"]", "layer" = MOB_LAYER)
t1 = wear_suit.icon_state
overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
if (wear_suit.blood_DNA)
if (istype(wear_suit, /obj/item/clothing/suit/armor))
overlays += image("icon" = 'blood.dmi', "icon_state" = "armorblood[!lying ? "" : "2"]", "layer" = MOB_LAYER)
else
src.overlays += image("icon" = 'blood.dmi', "icon_state" = "suitblood[!src.lying ? "" : "2"]", "layer" = MOB_LAYER)
src.wear_suit.screen_loc = ui_iclothing
if (istype(src.wear_suit, /obj/item/clothing/suit/straight_jacket))
if (src.handcuffed)
src.handcuffed.loc = src.loc
src.handcuffed.layer = initial(src.handcuffed.layer)
src.handcuffed = null
if ((src.l_hand || src.r_hand))
var/h = src.hand
src.hand = 1
overlays += image("icon" = 'blood.dmi', "icon_state" = "suitblood[!lying ? "" : "2"]", "layer" = MOB_LAYER)
wear_suit.screen_loc = ui_iclothing
if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
if (handcuffed)
handcuffed.loc = loc
handcuffed.layer = initial(handcuffed.layer)
handcuffed = null
if ((l_hand || r_hand))
var/h = hand
hand = 1
drop_item()
src.hand = 0
hand = 0
drop_item()
src.hand = h
hand = h
// Head
if (src.head)
var/t1 = src.head.item_state
if (head)
var/t1 = head.item_state
if (!t1)
t1 = src.head.icon_state
src.overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( src.lying ) ? null : "2")), "layer" = MOB_LAYER)
if (src.head.blood_DNA)
src.overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood[!src.lying ? "" : "2"]", "layer" = MOB_LAYER)
src.head.screen_loc = ui_oclothing
t1 = head.icon_state
overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
if (head.blood_DNA)
overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood[!lying ? "" : "2"]", "layer" = MOB_LAYER)
head.screen_loc = ui_oclothing
if (src.l_store)
src.l_store.screen_loc = ui_storage1
if (l_store)
l_store.screen_loc = ui_storage1
if (src.r_store)
src.r_store.screen_loc = ui_storage2
if (r_store)
r_store.screen_loc = ui_storage2
if (src.client)
src.client.screen -= src.contents
src.client.screen += src.contents
if (client)
client.screen -= contents
client.screen += contents
if (src.r_hand)
src.overlays += image("icon" = 'items_righthand.dmi', "icon_state" = src.r_hand.item_state ? src.r_hand.item_state : src.r_hand.icon_state, "layer" = MOB_LAYER+1)
if (r_hand)
overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = MOB_LAYER+1)
src.r_hand.screen_loc = ui_id
r_hand.screen_loc = ui_id
if (src.l_hand)
src.overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = src.l_hand.item_state ? src.l_hand.item_state : src.l_hand.icon_state, "layer" = MOB_LAYER+1)
if (l_hand)
overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = MOB_LAYER+1)
src.l_hand.screen_loc = ui_belt
l_hand.screen_loc = ui_belt
@@ -508,21 +507,21 @@
shielded = 2
break
if (shielded == 2 || src.alien_invis)
src.invisibility = 2
if (shielded == 2 || alien_invis)
invisibility = 2
//New stealth. Hopefully doesn't lag too much. /N
if(istype(loc, /turf))//If they are standing on a turf.
AddCamoOverlay(loc)//Overlay camo.
else
src.invisibility = 0
if (shielded || src.alien_invis)
src.overlays += image("icon" = 'mob.dmi', "icon_state" = "shield", "layer" = MOB_LAYER)
invisibility = 0
for (var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
spawn (0)
src.show_inv(M)
show_inv(M)
return
src.last_b_state = src.stat
last_b_state = stat
/mob/living/carbon/alien/humanoid/hand_p(mob/M as mob)
if (!ticker)
@@ -532,13 +531,13 @@
if (M.a_intent == "hurt")
if (istype(M.wear_mask, /obj/item/clothing/mask/muzzle))
return
if (src.health > 0)
if (health > 0)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
bruteloss += rand(1, 3)
src.updatehealth()
updatehealth()
return
/mob/living/carbon/alien/humanoid/attack_paw(mob/living/carbon/monkey/M as mob)
@@ -548,7 +547,7 @@
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
@@ -556,17 +555,17 @@
switch(M.a_intent)
if ("help")
src.help_shake_act(M)
help_shake_act(M)
else
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
if (src.health > 0)
playsound(src.loc, 'bite.ogg', 50, 1, -1)
if (health > 0)
playsound(loc, 'bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
src.bruteloss += rand(1, 3)
src.updatehealth()
bruteloss += rand(1, 3)
updatehealth()
return
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
@@ -574,7 +573,7 @@
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
@@ -583,12 +582,12 @@
if(M.gloves && M.gloves.elecgen == 1)//Stungloves. Any contact will stun the alien.
if(M.gloves.uses > 0)
M.gloves.uses--
if (src.weakened < 5)
src.weakened = 5
if (src.stuttering < 5)
src.stuttering = 5
if (src.stunned < 5)
src.stunned = 5
if (weakened < 5)
weakened = 5
if (stuttering < 5)
stuttering = 5
if (stunned < 5)
stunned = 5
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
@@ -596,20 +595,20 @@
switch(M.a_intent)
if ("help")
if (src.health > 0)
src.help_shake_act(M)
if (health > 0)
help_shake_act(M)
else
if (M.health >= -75.0)
if (((M.head && M.head.flags & 4) || ((M.wear_mask && !( M.wear_mask.flags & 32 )) || ((src.head && src.head.flags & 4) || (src.wear_mask && !( src.wear_mask.flags & 32 ))))))
if (((M.head && M.head.flags & 4) || ((M.wear_mask && !( M.wear_mask.flags & 32 )) || ((head && head.flags & 4) || (wear_mask && !( wear_mask.flags & 32 ))))))
M << "\blue <B>Remove that mask!</B>"
return
var/obj/equip_e/human/O = new /obj/equip_e/human( )
O.source = M
O.target = src
O.s_loc = M.loc
O.t_loc = src.loc
O.t_loc = loc
O.place = "CPR"
src.requests += O
requests += O
spawn( 0 )
O.process()
return
@@ -625,9 +624,9 @@
M.r_hand = G
G.layer = 20
G.affecting = src
src.grabbed_by += G
grabbed_by += G
G.synch()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
@@ -638,46 +637,46 @@
if (M.mutations & HULK)//HULK SMASH
damage += 14
spawn(0)
src.paralysis += 5
paralysis += 5
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(src.loc, "punch", 25, 1, -1)
playsound(loc, "punch", 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
if (damage > 9||prob(5))//Regular humans have a very small chance of weakening an alien.
if (src.weakened < 10)
src.weakened = rand(1,5)
if (weakened < 10)
weakened = rand(1,5)
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
src.bruteloss += damage
src.updatehealth()
bruteloss += damage
updatehealth()
else
playsound(src.loc, 'punchmiss.ogg', 25, 1, -1)
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
if ("disarm")
if (!src.lying)
if (!lying)
var/randn = rand(1, 100)
if (randn <= 5)//Very small chance to push an alien down.
src.weakened = 2
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
weakened = 2
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has pushed down []!</B>", M, src), 1)
else
if (randn <= 50)
src.drop_item()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
drop_item()
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed []!</B>", M, src), 1)
else
playsound(src.loc, 'punchmiss.ogg', 25, 1, -1)
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to disarm []!</B>", M, src), 1)
@@ -693,7 +692,7 @@ In all, this is a lot like the monkey code. /N
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
@@ -702,31 +701,31 @@ In all, this is a lot like the monkey code. /N
switch(M.a_intent)
if ("help")
src.sleeping = 0
src.resting = 0
if (src.paralysis >= 3) src.paralysis -= 3
if (src.stunned >= 3) src.stunned -= 3
if (src.weakened >= 3) src.weakened -= 3
sleeping = 0
resting = 0
if (paralysis >= 3) paralysis -= 3
if (stunned >= 3) stunned -= 3
if (weakened >= 3) weakened -= 3
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M.name] nuzzles [] trying to wake it up!", src), 1)
else
if (src.health > 0)
playsound(src.loc, 'bite.ogg', 50, 1, -1)
if (health > 0)
playsound(loc, 'bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
src.bruteloss += damage
src.updatehealth()
bruteloss += damage
updatehealth()
else
M << "\green <B>[src.name] is too injured for that.</B>"
M << "\green <B>[name] is too injured for that.</B>"
return
/mob/living/carbon/alien/humanoid/restrained()
if (src.handcuffed)
if (handcuffed)
return 1
return 0
@@ -738,25 +737,25 @@ In all, this is a lot like the monkey code. /N
user.machine = src
var/dat = {"
<B><HR><FONT size=3>[src.name]</FONT></B>
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(src.l_hand ? text("[]", src.l_hand) : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(src.r_hand ? text("[]", src.r_hand) : "Nothing")]</A>
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(src.head ? text("[]", src.head) : "Nothing")]</A>
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(src.wear_suit ? text("[]", src.wear_suit) : "Nothing")]</A>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? text("[]", l_hand) : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? text("[]", r_hand) : "Nothing")]</A>
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? text("[]", head) : "Nothing")]</A>
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? text("[]", wear_suit) : "Nothing")]</A>
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
<BR><A href='?src=\ref[user];mach_close=mob[src.name]'>Close</A>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[src.name];size=340x480"))
onclose(user, "mob[src.name]")
user << browse(dat, text("window=mob[name];size=340x480"))
onclose(user, "mob[name]")
return
/mob/living/carbon/alien/humanoid/updatehealth()
if (src.nodamage == 0)
if (nodamage == 0)
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
src.health = 100 - src.oxyloss - src.fireloss - src.bruteloss
health = 100 - oxyloss - fireloss - bruteloss
else
src.health = 100
src.stat = 0
health = 100
stat = 0

View File

@@ -3,9 +3,9 @@
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
if(src.name == "alien larva")
src.name = text("alien larva ([rand(1, 1000)])")
src.real_name = src.name
if(name == "alien larva")
name = text("alien larva ([rand(1, 1000)])")
real_name = name
spawn (1)
update_clothing()
src << "\blue Your icons have been generated!"
@@ -17,9 +17,9 @@
/mob/living/carbon/alien/larva/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || src.now_pushing))
if ((!( yes ) || now_pushing))
return
src.now_pushing = 1
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
@@ -27,18 +27,18 @@
for(var/mob/M in viewers(src, null))
if(M.client)
M << "\red <B>[src] fails to push [tmob]'s fat ass out of the way.</B>"
src.now_pushing = 0
now_pushing = 0
return
src.now_pushing = 0
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( src.now_pushing ))
src.now_pushing = 1
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
step(AM, t)
src.now_pushing = null
now_pushing = null
return
return
@@ -47,28 +47,28 @@
..()
statpanel("Status")
if (src.client && src.client.holder)
if (client && client.holder)
stat(null, "([x], [y], [z])")
stat(null, "Intent: [src.a_intent]")
stat(null, "Move Mode: [src.m_intent]")
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")
if (src.client.statpanel == "Status")
stat(null, "Progress: [src.amount_grown]/200")
stat(null, "Plasma Stored: [src.toxloss]")
if (client.statpanel == "Status")
stat(null, "Progress: [amount_grown]/200")
stat(null, "Plasma Stored: [toxloss]")
//This is okay I guess unless we add alien shields or something. Should be cleaned up a bit.
/mob/living/carbon/alien/larva/bullet_act(flag, A as obj)
if (locate(/obj/item/weapon/grab, src))
var/mob/safe = null
if (istype(src.l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = src.l_hand
if ((G.state == 3 && get_dir(src, A) == src.dir))
if (istype(l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = l_hand
if ((G.state == 3 && get_dir(src, A) == dir))
safe = G.affecting
if (istype(src.r_hand, /obj/item/weapon/grab))
var/obj/item/weapon.grab/G = src.r_hand
if ((G.state == 3 && get_dir(src, A) == src.dir))
if (istype(r_hand, /obj/item/weapon/grab))
var/obj/item/weapon.grab/G = r_hand
if ((G.state == 3 && get_dir(src, A) == dir))
safe = G.affecting
if (safe)
return safe.bullet_act(flag, A)
@@ -76,49 +76,49 @@
if(PROJECTILE_BULLET)
var/d = 51
if (src.stat != 2)
src.bruteloss += d
if (stat != 2)
bruteloss += d
src.updatehealth()
updatehealth()
if (prob(50))
if(src.weakened <= 5) src.weakened = 5
if(weakened <= 5) weakened = 5
return
if(PROJECTILE_TASER)
if (prob(75) && src.stunned <= 10)
src.stunned = 10
if (prob(75) && stunned <= 10)
stunned = 10
else
src.weakened = 10
if (src.stuttering < 10)
src.stuttering = 10
weakened = 10
if (stuttering < 10)
stuttering = 10
if(PROJECTILE_DART)
return
if(PROJECTILE_LASER)
var/d = 20
// if (!src.eye_blurry) src.eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
if (prob(25)) src.stunned++
// if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff./ It really doesn't make any sense. /N
if (prob(25)) stunned++
if (src.stat != 2)
src.bruteloss += d
if (stat != 2)
bruteloss += d
src.updatehealth()
updatehealth()
if (prob(25))
src.stunned = 1
stunned = 1
if(PROJECTILE_PULSE)
var/d = 40
if (src.stat != 2)
src.bruteloss += d
if (stat != 2)
bruteloss += d
src.updatehealth()
updatehealth()
if (prob(50))
src.stunned = min(src.stunned, 5)
stunned = min(stunned, 5)
if(PROJECTILE_BOLT)
src.toxloss += 3
src.radiation += 100
src.updatehealth()
src.stuttering += 5
src.drowsyness += 5
toxloss += 3
radiation += 100
updatehealth()
stuttering += 5
drowsyness += 5
return
/mob/living/carbon/alien/larva/emp_act(severity)
@@ -126,15 +126,14 @@
/mob/living/carbon/alien/larva/ex_act(severity)
flick("flash", src.flash)
flick("flash", flash)
if (src.stat == 2 && src.client)
src.gib(1)
if (stat == 2 && client)
gib(1)
return
else if (src.stat == 2 && !src.client)
var/virus = src.virus
gibs(src.loc, virus)
else if (stat == 2 && !client)
gibs(loc, virus)
del(src)
return
@@ -143,7 +142,7 @@
switch (severity)
if (1.0)
b_loss += 500
src.gib(1)
gib(1)
return
if (2.0)
@@ -152,42 +151,42 @@
f_loss += 60
src.ear_damage += 30
src.ear_deaf += 120
ear_damage += 30
ear_deaf += 120
if(3.0)
b_loss += 30
if (prob(50))
src.paralysis += 1
src.ear_damage += 15
src.ear_deaf += 60
paralysis += 1
ear_damage += 15
ear_deaf += 60
src.bruteloss += b_loss
src.fireloss += f_loss
bruteloss += b_loss
fireloss += f_loss
src.updatehealth()
updatehealth()
/mob/living/carbon/alien/larva/blob_act()
if (src.stat == 2)
if (stat == 2)
return
var/shielded = 0
var/damage = null
if (src.stat != 2)
if (stat != 2)
damage = rand(10,30)
if(shielded)
damage /= 4
//src.paralysis += 1
//paralysis += 1
src.show_message("\red The magma splashes on you!")
show_message("\red The magma splashes on you!")
src.fireloss += damage
fireloss += damage
src.updatehealth()
updatehealth()
return
//can't unequip since it can't equip anything
@@ -202,46 +201,46 @@
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (src.health > 0)
src.bruteloss += (istype(O, /obj/meteor/small) ? 10 : 25)
src.fireloss += 30
if (health > 0)
bruteloss += (istype(O, /obj/meteor/small) ? 10 : 25)
fireloss += 30
src.updatehealth()
updatehealth()
return
/mob/living/carbon/alien/larva/Move(a, b, flag)
var/t7 = 1
if (src.restrained())
if (restrained())
for(var/mob/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
t7 = null
if ((t7 && (src.pulling && ((get_dist(src, src.pulling) <= 1 || src.pulling.loc == src.loc) && (src.client && src.client.moving)))))
var/turf/T = src.loc
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
var/turf/T = loc
. = ..()
if (src.pulling && src.pulling.loc)
if(!( isturf(src.pulling.loc) ))
src.pulling = null
if (pulling && pulling.loc)
if(!( isturf(pulling.loc) ))
pulling = null
return
else
if(Debug)
diary <<"src.pulling disappeared? at __LINE__ in mob.dm - src.pulling = [src.pulling]"
diary <<"pulling disappeared? at __LINE__ in mob.dm - pulling = [pulling]"
diary <<"REPORT THIS"
/////
if(src.pulling && src.pulling.anchored)
src.pulling = null
if(pulling && pulling.anchored)
pulling = null
return
if (!src.restrained())
var/diag = get_dir(src, src.pulling)
if (!restrained())
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(src, src.pulling) > 1 || diag))
if (ismob(src.pulling))
var/mob/M = src.pulling
if ((get_dist(src, pulling) > 1 || diag))
if (ismob(pulling))
var/mob/M = pulling
var/ok = 1
if (locate(/obj/item/weapon/grab, M.grabbed_by))
if (prob(75))
@@ -258,57 +257,56 @@
if (ok)
var/t = M.pulling
M.pulling = null
step(src.pulling, get_dir(src.pulling.loc, T))
step(pulling, get_dir(pulling.loc, T))
M.pulling = t
else
if (src.pulling)
step(src.pulling, get_dir(src.pulling.loc, T))
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
src.pulling = null
pulling = null
. = ..()
if ((src.s_active && !( s_active in src.contents ) ))
src.s_active.close(src)
if ((s_active && !( s_active in contents ) ))
s_active.close(src)
return
/mob/living/carbon/alien/larva/update_clothing()
..()
if (src.monkeyizing)
if (monkeyizing)
return
if (src.client)
if (src.i_select)
if (src.intent)
src.client.screen += src.hud_used.intents
if (client)
if (i_select)
if (intent)
client.screen += hud_used.intents
var/list/L = dd_text2list(src.intent, ",")
var/list/L = dd_text2list(intent, ",")
L[1] += ":-11"
src.i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
else
src.i_select.screen_loc = null
if (src.m_select)
if (src.m_int)
src.client.screen += src.hud_used.mov_int
i_select.screen_loc = null
if (m_select)
if (m_int)
client.screen += hud_used.mov_int
var/list/L = dd_text2list(src.m_int, ",")
var/list/L = dd_text2list(m_int, ",")
L[1] += ":-11"
src.m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
else
src.m_select.screen_loc = null
m_select.screen_loc = null
if (src.alien_invis)
src.invisibility = 2
if (alien_invis)
invisibility = 2
if(istype(loc, /turf))//If they are standing on a turf.
AddCamoOverlay(loc)//Overlay camo.
else
src.invisibility = 0
if (src.alien_invis)
src.overlays += image("icon" = 'mob.dmi', "icon_state" = "shield", "layer" = MOB_LAYER)
invisibility = 0
for (var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
spawn (0)
src.show_inv(M)
show_inv(M)
return
@@ -320,16 +318,16 @@
if (M.a_intent == "hurt")
if (istype(M.wear_mask, /obj/item/clothing/mask/muzzle))
return
if (src.health > 0)
if (health > 0)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
var/damage = rand(1, 3)
src.bruteloss += damage
bruteloss += damage
src.updatehealth()
updatehealth()
return
@@ -340,7 +338,7 @@
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
@@ -348,17 +346,17 @@
switch(M.a_intent)
if ("help")
src.help_shake_act(M)
help_shake_act(M)
else
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
if (src.health > 0)
playsound(src.loc, 'bite.ogg', 50, 1, -1)
if (health > 0)
playsound(loc, 'bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
src.bruteloss += rand(1, 3)
src.updatehealth()
bruteloss += rand(1, 3)
updatehealth()
return
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob)
@@ -366,7 +364,7 @@
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
@@ -375,12 +373,12 @@
if(M.gloves && M.gloves.elecgen == 1)//Stungloves. Any contact will stun the alien.
if(M.gloves.uses > 0)
M.gloves.uses--
if (src.weakened < 5)
src.weakened = 5
if (src.stuttering < 5)
src.stuttering = 5
if (src.stunned < 5)
src.stunned = 5
if (weakened < 5)
weakened = 5
if (stuttering < 5)
stuttering = 5
if (stunned < 5)
stunned = 5
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
@@ -388,8 +386,8 @@
switch(M.a_intent)
if ("help")
if (src.health > 0)
src.help_shake_act(M)
if (health > 0)
help_shake_act(M)
else
if (M.health >= -75.0)
if ((M.head && M.head.flags & 4) || (M.wear_mask && !( M.wear_mask.flags & 32 )) )
@@ -399,9 +397,9 @@
O.source = M
O.target = src
O.s_loc = M.loc
O.t_loc = src.loc
O.t_loc = loc
O.place = "CPR"
src.requests += O
requests += O
spawn( 0 )
O.process()
return
@@ -417,9 +415,9 @@
M.r_hand = G
G.layer = 20
G.affecting = src
src.grabbed_by += G
grabbed_by += G
G.synch()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
@@ -430,24 +428,24 @@
if (M.mutations & HULK)
damage += 5
spawn(0)
src.paralysis += 1
paralysis += 1
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(src.loc, "punch", 25, 1, -1)
playsound(loc, "punch", 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
if (damage > 4.9)
if (src.weakened < 10)
src.weakened = rand(10, 15)
if (weakened < 10)
weakened = rand(10, 15)
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
src.bruteloss += damage
src.updatehealth()
bruteloss += damage
updatehealth()
else
playsound(src.loc, 'punchmiss.ogg', 25, 1, -1)
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
@@ -458,7 +456,7 @@
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
@@ -467,26 +465,26 @@
switch(M.a_intent)
if ("help")
src.sleeping = 0
src.resting = 0
if (src.paralysis >= 3) src.paralysis -= 3
if (src.stunned >= 3) src.stunned -= 3
if (src.weakened >= 3) src.weakened -= 3
sleeping = 0
resting = 0
if (paralysis >= 3) paralysis -= 3
if (stunned >= 3) stunned -= 3
if (weakened >= 3) weakened -= 3
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M.name] nuzzles [] trying to wake it up!", src), 1)
else
if (src.health > 0)
playsound(src.loc, 'bite.ogg', 50, 1, -1)
if (health > 0)
playsound(loc, 'bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
src.bruteloss += damage
src.updatehealth()
bruteloss += damage
updatehealth()
else
M << "\green <B>[src.name] is too injured for that.</B>"
M << "\green <B>[name] is too injured for that.</B>"
return
/mob/living/carbon/alien/larva/restrained()
@@ -503,29 +501,29 @@
user.machine = src
var/dat = {"
<B><HR><FONT size=3>[src.name]</FONT></B>
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR><BR>
<BR><A href='?src=\ref[user];mach_close=mob[src.name]'>Close</A>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[src.name];size=340x480"))
onclose(user, "mob[src.name]")
user << browse(dat, text("window=mob[name];size=340x480"))
onclose(user, "mob[name]")
return
/mob/living/carbon/alien/larva/updatehealth()
if (src.nodamage == 0)
if (nodamage == 0)
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
src.health = 25 - src.oxyloss - src.fireloss - src.bruteloss
health = 25 - oxyloss - fireloss - bruteloss
else
src.health = 25
src.stat = 0
health = 25
stat = 0
/* Commented out because it's duplicated in life.dm
/mob/living/carbon/alien/larva/proc/grow() // Larvae can grow into full fledged Xenos if they survive long enough -- TLE
if(src.icon_state == "larva_l" && !src.canmove) // This is a shit death check. It is made of shit and death. Fix later.
if(icon_state == "larva_l" && !canmove) // This is a shit death check. It is made of shit and death. Fix later.
return
else
var/mob/living/carbon/alien/humanoid/A = new(src.loc)
A.key = src.key
var/mob/living/carbon/alien/humanoid/A = new(loc)
A.key = key
del(src) */

View File

@@ -1365,15 +1365,24 @@
break
if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_active)
shielded = 2
shielded = 3
if (shielded == 2)
invisibility = 2
else
invisibility = 0
if (shielded)
overlays += image("icon" = 'mob.dmi', "icon_state" = "shield", "layer" = MOB_LAYER)
switch(shielded)
if(1)
overlays += image("icon" = 'effects.dmi', "icon_state" = "shield", "layer" = MOB_LAYER+1)
if(2)
invisibility = 2
//New stealth. Hopefully doesn't lag too much. /N
if(istype(loc, /turf))//If they are standing on a turf.
AddCamoOverlay(loc)//Overlay camo.
if(3)
if(istype(loc, /turf))
if(prob(90))//Ninjas may flick into view once in a while if they are stealthed.
NinjaStealthActive(loc)
else
NinjaStealthMalf()
else
invisibility = 0
for (var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))

View File

@@ -2,47 +2,47 @@
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
if (!(src.dna))
if(src.gender == NEUTER)
src.gender = pick(MALE, FEMALE)
src.dna = new /datum/dna( null )
src.dna.uni_identity = "00600200A00E0110148FC01300B009"
src.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
src.dna.unique_enzymes = md5(src.name)
if (!(dna))
if(gender == NEUTER)
gender = pick(MALE, FEMALE)
dna = new /datum/dna( null )
dna.uni_identity = "00600200A00E0110148FC01300B009"
dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
dna.unique_enzymes = md5(name)
//////////blah
var/gendervar
if (src.gender == "male")
if (gender == "male")
gendervar = add_zero2(num2hex((rand(1,2049)),1), 3)
else
gendervar = add_zero2(num2hex((rand(2051,4094)),1), 3)
src.dna.uni_identity += gendervar
src.dna.uni_identity += "12C"
src.dna.uni_identity += "4E2"
dna.uni_identity += gendervar
dna.uni_identity += "12C"
dna.uni_identity += "4E2"
if(src.name == "monkey")
src.name = text("monkey ([rand(1, 1000)])")
src.real_name = src.name
if(name == "monkey")
name = text("monkey ([rand(1, 1000)])")
real_name = name
..()
return
/mob/living/carbon/monkey/movement_delay()
var/tally = 0
if(src.reagents)
if(src.reagents.has_reagent("hyperzine")) return -1
if(reagents)
if(reagents.has_reagent("hyperzine")) return -1
var/health_deficiency = (100 - src.health)
var/health_deficiency = (100 - health)
if(health_deficiency >= 45) tally += (health_deficiency / 25)
if (src.bodytemperature < 283.222)
tally += (283.222 - src.bodytemperature) / 10 * 1.75
if (bodytemperature < 283.222)
tally += (283.222 - bodytemperature) / 10 * 1.75
return tally
/mob/living/carbon/monkey/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || src.now_pushing))
if ((!( yes ) || now_pushing))
return
src.now_pushing = 1
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
@@ -50,23 +50,23 @@
for(var/mob/M in viewers(src, null))
if(M.client)
M << "\red <B>[src] fails to push [tmob]'s fat ass out of the way.</B>"
src.now_pushing = 0
now_pushing = 0
return
src.now_pushing = 0
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( src.now_pushing ))
src.now_pushing = 1
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
for(var/obj/window/win in get_step(AM,t))
src.now_pushing = 0
now_pushing = 0
return
step(AM, t)
src.now_pushing = null
now_pushing = null
return
return
@@ -74,7 +74,7 @@
..()
if (href_list["mach_close"])
var/t1 = text("window=[]", href_list["mach_close"])
src.machine = null
machine = null
src << browse(null, t1)
if ((href_list["item"] && !( usr.stat ) && !( usr.restrained() ) && in_range(src, usr) ))
var/obj/equip_e/monkey/O = new /obj/equip_e/monkey( )
@@ -82,9 +82,9 @@
O.target = src
O.item = usr.equipped()
O.s_loc = usr.loc
O.t_loc = src.loc
O.t_loc = loc
O.place = href_list["item"]
src.requests += O
requests += O
spawn( 0 )
O.process()
return
@@ -94,16 +94,16 @@
/mob/living/carbon/monkey/meteorhit(obj/O as obj)
for(var/mob/M in viewers(src, null))
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (src.health > 0)
if (health > 0)
var/shielded = 0
for(var/obj/item/device/shield/S in src)
if (S.active)
shielded = 1
else
src.bruteloss += 30
bruteloss += 30
if ((O.icon_state == "flaming" && !( shielded )))
src.fireloss += 40
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
fireloss += 40
health = 100 - oxyloss - toxloss - fireloss - bruteloss
return
/mob/living/carbon/monkey/bullet_act(flag)
@@ -122,8 +122,8 @@
if (stuttering < 10)
stuttering = 10
else if (flag == PROJECTILE_DART)
src.weakened += 5
src.toxloss += 10
weakened += 5
toxloss += 10
else if(flag == PROJECTILE_LASER)
if (!eye_blurry) eye_blurry = 4 //This stuff makes no sense but lasers need a buff.
if (prob(25)) stunned++
@@ -152,14 +152,14 @@
return
/mob/living/carbon/monkey/hand_p(mob/M as mob)
if ((M.a_intent == "hurt" && !( istype(src.wear_mask, /obj/item/clothing/mask/muzzle) )))
if ((prob(75) && src.health > 0))
if ((M.a_intent == "hurt" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) )))
if ((prob(75) && health > 0))
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
var/damage = rand(1, 5)
if (src.mutations & HULK) damage += 10
src.bruteloss += damage
src.updatehealth()
if (mutations & HULK) damage += 10
bruteloss += damage
updatehealth()
else
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has attempted to bite []!</B>", src), 1)
@@ -169,19 +169,19 @@
..()
if (M.a_intent == "help")
src.help_shake_act(M)
help_shake_act(M)
else
if ((M.a_intent == "hurt" && !( istype(src.wear_mask, /obj/item/clothing/mask/muzzle) )))
if ((prob(75) && src.health > 0))
playsound(src.loc, 'bite.ogg', 50, 1, -1)
if ((M.a_intent == "hurt" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) )))
if ((prob(75) && health > 0))
playsound(loc, 'bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M.name] has bit [src.name]!</B>", 1)
O.show_message("\red <B>[M.name] has bit [name]!</B>", 1)
var/damage = rand(1, 5)
src.bruteloss += damage
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
bruteloss += damage
health = 100 - oxyloss - toxloss - fireloss - bruteloss
else
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M.name] has attempted to bite [src.name]!</B>", 1)
O.show_message("\red <B>[M.name] has attempted to bite [name]!</B>", 1)
return
/mob/living/carbon/monkey/attack_hand(mob/living/carbon/human/M as mob)
@@ -189,18 +189,18 @@
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
if ((M:gloves && M:gloves.elecgen == 1 && M.a_intent == "hurt") /*&& (!istype(src:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
if(M:gloves.uses > 0)
M:gloves.uses--
if (src.weakened < 5)
src.weakened = 5
if (src.stuttering < 5)
src.stuttering = 5
if (src.stunned < 5)
src.stunned = 5
if (weakened < 5)
weakened = 5
if (stuttering < 5)
stuttering = 5
if (stunned < 5)
stunned = 5
for(var/mob/O in viewers(src, null))
if (O.client)
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2)
@@ -210,32 +210,32 @@
return
if (M.a_intent == "help")
src.help_shake_act(M)
help_shake_act(M)
else
if (M.a_intent == "hurt")
if ((prob(75) && src.health > 0))
if ((prob(75) && health > 0))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has punched [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has punched [name]!</B>", M), 1)
playsound(src.loc, "punch", 25, 1, -1)
playsound(loc, "punch", 25, 1, -1)
var/damage = rand(5, 10)
if (prob(40))
damage = rand(10, 15)
if (src.paralysis < 5)
src.paralysis = rand(10, 15)
if (paralysis < 5)
paralysis = rand(10, 15)
spawn( 0 )
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has knocked out [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has knocked out [name]!</B>", M), 1)
return
src.bruteloss += damage
src.updatehealth()
bruteloss += damage
updatehealth()
else
playsound(src.loc, 'punchmiss.ogg', 25, 1, -1)
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to punch [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has attempted to punch [name]!</B>", M), 1)
else
if (M.a_intent == "grab")
if (M == src)
@@ -248,25 +248,25 @@
M.r_hand = G
G.layer = 20
G.affecting = src
src.grabbed_by += G
grabbed_by += G
G.synch()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [src.name] passively!", M), 1)
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
else
if (!( src.paralysis ))
if (!( paralysis ))
if (prob(25))
src.paralysis = 2
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
paralysis = 2
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has pushed down [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has pushed down [name]!</B>", M), 1)
else
drop_item()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
return
/mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
@@ -274,7 +274,7 @@
M << "You cannot attack people before the game has started."
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
@@ -285,27 +285,27 @@
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if ("hurt")
if ((prob(95) && src.health > 0))
playsound(src.loc, 'slice.ogg', 25, 1, -1)
if ((prob(95) && health > 0))
playsound(loc, 'slice.ogg', 25, 1, -1)
var/damage = rand(15, 30)
if (damage >= 25)
damage = rand(20, 40)
if (src.paralysis < 15)
src.paralysis = rand(10, 15)
if (paralysis < 15)
paralysis = rand(10, 15)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has wounded [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has wounded [name]!</B>", M), 1)
else
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed [src.name]!</B>", M), 1)
src.bruteloss += damage
src.updatehealth()
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
bruteloss += damage
updatehealth()
else
playsound(src.loc, 'slashmiss.ogg', 25, 1, -1)
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to lunge at [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
if ("grab")
if (M == src)
@@ -318,168 +318,168 @@
M.r_hand = G
G.layer = 20
G.affecting = src
src.grabbed_by += G
grabbed_by += G
G.synch()
playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1)
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [src.name] passively!", M), 1)
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
if ("disarm")
playsound(src.loc, 'pierce.ogg', 25, 1, -1)
playsound(loc, 'pierce.ogg', 25, 1, -1)
var/damage = 5
if(prob(95))
src.weakened = rand(10, 15)
weakened = rand(10, 15)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down [src.name]!</B>", M), 1)
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
else
drop_item()
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [src.name]!</B>", M), 1)
src.bruteloss += damage
src.updatehealth()
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
bruteloss += damage
updatehealth()
return
/mob/living/carbon/monkey/Stat()
..()
statpanel("Status")
stat(null, text("Intent: []", src.a_intent))
stat(null, text("Move Mode: []", src.m_intent))
stat(null, text("Intent: []", a_intent))
stat(null, text("Move Mode: []", m_intent))
if(client && mind)
if (src.client.statpanel == "Status")
if (src.mind.special_role == "Changeling")
stat("Chemical Storage", src.chem_charges)
if (client.statpanel == "Status")
if (mind.special_role == "Changeling")
stat("Chemical Storage", chem_charges)
return
/mob/living/carbon/monkey/update_clothing()
if(src.buckled)
if(istype(src.buckled, /obj/stool/bed))
src.lying = 1
if(buckled)
if(istype(buckled, /obj/stool/bed))
lying = 1
else
src.lying = 0
lying = 0
if(src.update_icon) // Skie
if(update_icon) // Skie
..()
for(var/i in src.overlays)
src.overlays -= i
for(var/i in overlays)
overlays -= i
if (!( src.lying ))
src.icon_state = "monkey1"
if (!( lying ))
icon_state = "monkey1"
else
src.icon_state = "monkey0"
icon_state = "monkey0"
if (src.wear_mask)
if (istype(src.wear_mask, /obj/item/clothing/mask))
var/t1 = src.wear_mask.icon_state
src.overlays += image("icon" = 'monkey.dmi', "icon_state" = text("[][]", t1, (!( src.lying ) ? null : "2")), "layer" = src.layer)
src.wear_mask.screen_loc = ui_mask
if (wear_mask)
if (istype(wear_mask, /obj/item/clothing/mask))
var/t1 = wear_mask.icon_state
overlays += image("icon" = 'monkey.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = layer)
wear_mask.screen_loc = ui_mask
if (src.r_hand)
if(src.update_icon)
src.overlays += image("icon" = 'items_righthand.dmi', "icon_state" = src.r_hand.item_state ? src.r_hand.item_state : src.r_hand.icon_state, "layer" = src.layer)
src.r_hand.screen_loc = ui_rhand
if (r_hand)
if(update_icon)
overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = layer)
r_hand.screen_loc = ui_rhand
if (src.l_hand)
if(src.update_icon)
src.overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = src.l_hand.item_state ? src.l_hand.item_state : src.l_hand.icon_state, "layer" = src.layer)
src.l_hand.screen_loc = ui_lhand
if (l_hand)
if(update_icon)
overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = layer)
l_hand.screen_loc = ui_lhand
if (src.back)
var/t1 = src.back.icon_state //apparently tables make me upset and cause my dreams to shatter
src.overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( src.lying ) ? null : "2")), "layer" = src.layer)
src.back.screen_loc = ui_back
if (back)
var/t1 = back.icon_state //apparently tables make me upset and cause my dreams to shatter
overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = layer)
back.screen_loc = ui_back
if (src.handcuffed && src.update_icon)
src.pulling = null
if (!( src.lying ))
src.overlays += image("icon" = 'monkey.dmi', "icon_state" = "handcuff1", "layer" = src.layer)
if (handcuffed && update_icon)
pulling = null
if (!( lying ))
overlays += image("icon" = 'monkey.dmi', "icon_state" = "handcuff1", "layer" = layer)
else
src.overlays += image("icon" = 'monkey.dmi', "icon_state" = "handcuff2", "layer" = src.layer)
overlays += image("icon" = 'monkey.dmi', "icon_state" = "handcuff2", "layer" = layer)
if (src.client)
src.client.screen -= src.contents
src.client.screen += src.contents
src.client.screen -= src.hud_used.m_ints
src.client.screen -= src.hud_used.mov_int
if (src.i_select)
if (src.intent)
src.client.screen += src.hud_used.m_ints
if (client)
client.screen -= contents
client.screen += contents
client.screen -= hud_used.m_ints
client.screen -= hud_used.mov_int
if (i_select)
if (intent)
client.screen += hud_used.m_ints
var/list/L = dd_text2list(src.intent, ",")
var/list/L = dd_text2list(intent, ",")
L[1] += ":-11"
src.i_select.screen_loc = dd_list2text(L,",") //ICONS, FUCKING SHIT
i_select.screen_loc = dd_list2text(L,",") //ICONS, FUCKING SHIT//What
else
src.i_select.screen_loc = null
if (src.m_select)
if (src.m_int)
src.client.screen += src.hud_used.mov_int
i_select.screen_loc = null
if (m_select)
if (m_int)
client.screen += hud_used.mov_int
var/list/L = dd_text2list(src.m_int, ",")
var/list/L = dd_text2list(m_int, ",")
L[1] += ":-11"
src.m_select.screen_loc = dd_list2text(L,",") //ICONS, FUCKING SHIT
m_select.screen_loc = dd_list2text(L,",") //ICONS, FUCKING SHIT//the fuck
else
src.m_select.screen_loc = null
m_select.screen_loc = null
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
spawn( 0 )
src.show_inv(M)
show_inv(M)
return
return
/mob/living/carbon/monkey/Move()
if ((!( src.buckled ) || src.buckled.loc != src.loc))
src.buckled = null
if (src.buckled)
if ((!( buckled ) || buckled.loc != loc))
buckled = null
if (buckled)
return
if (src.restrained())
src.pulling = null
if (restrained())
pulling = null
var/t7 = 1
if (src.restrained())
if (restrained())
for(var/mob/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
return 0
if ((t7 && src.pulling && get_dist(src, src.pulling) <= 1))
if (src.pulling.anchored)
src.pulling = null
var/T = src.loc
if ((t7 && pulling && get_dist(src, pulling) <= 1))
if (pulling.anchored)
pulling = null
var/T = loc
. = ..()
if (!( isturf(src.pulling.loc) ))
src.pulling = null
if (!( isturf(pulling.loc) ))
pulling = null
return
if (!( src.restrained() ))
var/diag = get_dir(src, src.pulling)
if (!( restrained() ))
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((ismob(src.pulling) && (get_dist(src, src.pulling) > 1 || diag)))
if (istype(src.pulling, src.type))
var/mob/M = src.pulling
if ((ismob(pulling) && (get_dist(src, pulling) > 1 || diag)))
if (istype(pulling, type))
var/mob/M = pulling
var/mob/t = M.pulling
M.pulling = null
step(src.pulling, get_dir(src.pulling.loc, T))
step(pulling, get_dir(pulling.loc, T))
M.pulling = t
else
if (src.pulling)
if (istype(src.pulling, /obj/window))
if(src.pulling:ini_dir == NORTHWEST || src.pulling:ini_dir == NORTHEAST || src.pulling:ini_dir == SOUTHWEST || src.pulling:ini_dir == SOUTHEAST)
for(var/obj/window/win in get_step(src.pulling,get_dir(src.pulling.loc, T)))
src.pulling = null
if (src.pulling)
step(src.pulling, get_dir(src.pulling.loc, T))
if (pulling)
if (istype(pulling, /obj/window))
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
for(var/obj/window/win in get_step(pulling,get_dir(pulling.loc, T)))
pulling = null
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
src.pulling = null
pulling = null
. = ..()
if ((src.s_active && !( src.contents.Find(src.s_active) )))
src.s_active.close(src)
if ((s_active && !( contents.Find(s_active) )))
s_active.close(src)
return
/mob/living/carbon/monkey/verb/removeinternal()
set name = "Remove Internals"
set category = "IC"
src.internal = null
internal = null
return
/mob/living/carbon/monkey/var/co2overloadtime = null
@@ -490,213 +490,213 @@
..()
/mob/living/carbon/monkey/ex_act(severity)
flick("flash", src.flash)
flick("flash", flash)
switch(severity)
if(1.0)
if (src.stat != 2)
src.bruteloss += 200
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
if (stat != 2)
bruteloss += 200
health = 100 - oxyloss - toxloss - fireloss - bruteloss
if(2.0)
if (src.stat != 2)
src.bruteloss += 60
src.fireloss += 60
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
if (stat != 2)
bruteloss += 60
fireloss += 60
health = 100 - oxyloss - toxloss - fireloss - bruteloss
if(3.0)
if (src.stat != 2)
src.bruteloss += 30
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
if (stat != 2)
bruteloss += 30
health = 100 - oxyloss - toxloss - fireloss - bruteloss
if (prob(50))
src.paralysis += 10
paralysis += 10
else
return
/mob/living/carbon/monkey/blob_act()
if (src.stat != 2)
src.fireloss += 60
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
if (stat != 2)
fireloss += 60
health = 100 - oxyloss - toxloss - fireloss - bruteloss
if (prob(50))
src.paralysis += 10
paralysis += 10
/obj/equip_e/monkey/process()
if (src.item)
src.item.add_fingerprint(src.source)
if (!( src.item ))
switch(src.place)
if (item)
item.add_fingerprint(source)
if (!( item ))
switch(place)
if("head")
if (!( src.target.wear_mask ))
if (!( target.wear_mask ))
del(src)
return
if("l_hand")
if (!( src.target.l_hand ))
if (!( target.l_hand ))
del(src)
return
if("r_hand")
if (!( src.target.r_hand ))
if (!( target.r_hand ))
del(src)
return
if("back")
if (!( src.target.back ))
if (!( target.back ))
del(src)
return
if("handcuff")
if (!( src.target.handcuffed ))
if (!( target.handcuffed ))
del(src)
return
if("internal")
if ((!( (istype(src.target.wear_mask, /obj/item/clothing/mask) && istype(src.target.back, /obj/item/weapon/tank) && !( src.target.internal )) ) && !( src.target.internal )))
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && istype(target.back, /obj/item/weapon/tank) && !( target.internal )) ) && !( target.internal )))
del(src)
return
if (src.item)
for(var/mob/O in viewers(src.target, null))
if (item)
for(var/mob/O in viewers(target, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] is trying to put a [] on []</B>", src.source, src.item, src.target), 1)
O.show_message(text("\red <B>[] is trying to put a [] on []</B>", source, item, target), 1)
else
var/message = null
switch(src.place)
switch(place)
if("mask")
if(istype(src.target.wear_mask, /obj/item/clothing)&&!src.target.wear_mask:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", src.source, src.target.wear_mask, src.target)
if(istype(target.wear_mask, /obj/item/clothing)&&!target.wear_mask:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.wear_mask, target)
else
message = text("\red <B>[] is trying to take off \a [] from []'s head!</B>", src.source, src.target.wear_mask, src.target)
message = text("\red <B>[] is trying to take off \a [] from []'s head!</B>", source, target.wear_mask, target)
if("l_hand")
message = text("\red <B>[] is trying to take off a [] from []'s left hand!</B>", src.source, src.target.l_hand, src.target)
message = text("\red <B>[] is trying to take off a [] from []'s left hand!</B>", source, target.l_hand, target)
if("r_hand")
message = text("\red <B>[] is trying to take off a [] from []'s right hand!</B>", src.source, src.target.r_hand, src.target)
message = text("\red <B>[] is trying to take off a [] from []'s right hand!</B>", source, target.r_hand, target)
if("back")
message = text("\red <B>[] is trying to take off a [] from []'s back!</B>", src.source, src.target.back, src.target)
message = text("\red <B>[] is trying to take off a [] from []'s back!</B>", source, target.back, target)
if("handcuff")
message = text("\red <B>[] is trying to unhandcuff []!</B>", src.source, src.target)
message = text("\red <B>[] is trying to unhandcuff []!</B>", source, target)
if("internal")
if (src.target.internal)
message = text("\red <B>[] is trying to remove []'s internals</B>", src.source, src.target)
if (target.internal)
message = text("\red <B>[] is trying to remove []'s internals</B>", source, target)
else
message = text("\red <B>[] is trying to set on []'s internals.</B>", src.source, src.target)
message = text("\red <B>[] is trying to set on []'s internals.</B>", source, target)
else
for(var/mob/M in viewers(src.target, null))
for(var/mob/M in viewers(target, null))
M.show_message(message, 1)
spawn( 30 )
src.done()
done()
return
return
/obj/equip_e/monkey/done()
if(!src.source || !src.target) return
if(src.source.loc != src.s_loc) return
if(src.target.loc != src.t_loc) return
if(LinkBlocked(src.s_loc,src.t_loc)) return
if(src.item && src.source.equipped() != src.item) return
if ((src.source.restrained() || src.source.stat)) return
switch(src.place)
if(!source || !target) return
if(source.loc != s_loc) return
if(target.loc != t_loc) return
if(LinkBlocked(s_loc,t_loc)) return
if(item && source.equipped() != item) return
if ((source.restrained() || source.stat)) return
switch(place)
if("mask")
if (src.target.wear_mask)
if(istype(src.target.wear_mask, /obj/item/clothing)&& !src.target.wear_mask:canremove)
if (target.wear_mask)
if(istype(target.wear_mask, /obj/item/clothing)&& !target.wear_mask:canremove)
return
var/obj/item/W = src.target.wear_mask
src.target.u_equip(W)
if (src.target.client)
src.target.client.screen -= W
var/obj/item/W = target.wear_mask
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = src.target.loc
W.dropped(src.target)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(src.source)
W.add_fingerprint(source)
else
if (istype(src.item, /obj/item/clothing/mask))
src.source.drop_item()
src.loc = src.target
src.item.layer = 20
src.target.wear_mask = src.item
src.item.loc = src.target
if (istype(item, /obj/item/clothing/mask))
source.drop_item()
loc = target
item.layer = 20
target.wear_mask = item
item.loc = target
if("l_hand")
if (src.target.l_hand)
var/obj/item/W = src.target.l_hand
src.target.u_equip(W)
if (src.target.client)
src.target.client.screen -= W
if (target.l_hand)
var/obj/item/W = target.l_hand
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = src.target.loc
W.dropped(src.target)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(src.source)
W.add_fingerprint(source)
else
if (istype(src.item, /obj/item))
src.source.drop_item()
src.loc = src.target
src.item.layer = 20
src.target.l_hand = src.item
src.item.loc = src.target
if (istype(item, /obj/item))
source.drop_item()
loc = target
item.layer = 20
target.l_hand = item
item.loc = target
if("r_hand")
if (src.target.r_hand)
var/obj/item/W = src.target.r_hand
src.target.u_equip(W)
if (src.target.client)
src.target.client.screen -= W
if (target.r_hand)
var/obj/item/W = target.r_hand
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = src.target.loc
W.dropped(src.target)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(src.source)
W.add_fingerprint(source)
else
if (istype(src.item, /obj/item))
src.source.drop_item()
src.loc = src.target
src.item.layer = 20
src.target.r_hand = src.item
src.item.loc = src.target
if (istype(item, /obj/item))
source.drop_item()
loc = target
item.layer = 20
target.r_hand = item
item.loc = target
if("back")
if (src.target.back)
var/obj/item/W = src.target.back
src.target.u_equip(W)
if (src.target.client)
src.target.client.screen -= W
if (target.back)
var/obj/item/W = target.back
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = src.target.loc
W.dropped(src.target)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(src.source)
W.add_fingerprint(source)
else
if ((istype(src.item, /obj/item) && src.item.flags & 1))
src.source.drop_item()
src.loc = src.target
src.item.layer = 20
src.target.back = src.item
src.item.loc = src.target
if ((istype(item, /obj/item) && item.flags & 1))
source.drop_item()
loc = target
item.layer = 20
target.back = item
item.loc = target
if("handcuff")
if (src.target.handcuffed)
var/obj/item/W = src.target.handcuffed
src.target.u_equip(W)
if (src.target.client)
src.target.client.screen -= W
if (target.handcuffed)
var/obj/item/W = target.handcuffed
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = src.target.loc
W.dropped(src.target)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(src.source)
W.add_fingerprint(source)
else
if (istype(src.item, /obj/item/weapon/handcuffs))
src.source.drop_item()
src.target.handcuffed = src.item
src.item.loc = src.target
if (istype(item, /obj/item/weapon/handcuffs))
source.drop_item()
target.handcuffed = item
item.loc = target
if("internal")
if (src.target.internal)
src.target.internal.add_fingerprint(src.source)
src.target.internal = null
if (target.internal)
target.internal.add_fingerprint(source)
target.internal = null
else
if (src.target.internal)
src.target.internal = null
if (!( istype(src.target.wear_mask, /obj/item/clothing/mask) ))
if (target.internal)
target.internal = null
if (!( istype(target.wear_mask, /obj/item/clothing/mask) ))
return
else
if (istype(src.target.back, /obj/item/weapon/tank))
src.target.internal = src.target.back
src.target.internal.add_fingerprint(src.source)
for(var/mob/M in viewers(src.target, 1))
if (istype(target.back, /obj/item/weapon/tank))
target.internal = target.back
target.internal.add_fingerprint(source)
for(var/mob/M in viewers(target, 1))
if ((M.client && !( M.blinded )))
M.show_message(text("[] is now running on internals.", src.target), 1)
M.show_message(text("[] is now running on internals.", target), 1)
else
src.source.update_clothing()
src.target.update_clothing()
source.update_clothing()
target.update_clothing()
del(src)
return

View File

@@ -1769,12 +1769,12 @@ proc/isobserver(A)
var/limit = 2//For only two trailing shadows.
for(var/turf/T in getline(mobloc, mob.loc))
spawn(0)
anim(T,mob,'mob.dmi',,"shadow")
anim(T,mob,'mob.dmi',,"shadow",,mob.dir)
limit--
if(limit<=0) break
else
spawn(0)
anim(mobloc,mob,'mob.dmi',,"shadow")
anim(mobloc,mob,'mob.dmi',,"shadow",,mob.dir)
mob.loc = get_step(mob, direct)
mob.dir = direct
return

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 186 KiB

BIN
icons/effects/static.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 124 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -130,7 +130,6 @@
#define FILE_DIR "icons/turf"
#define FILE_DIR "interface"
#define FILE_DIR "maps"
#define FILE_DIR "maps/backup"
#define FILE_DIR "sound"
#define FILE_DIR "sound/ambience"
#define FILE_DIR "sound/announcer"
@@ -279,6 +278,7 @@
#include "code\defines\procs\forum_activation.dm"
#include "code\defines\procs\gamehelpers.dm"
#include "code\defines\procs\helpers.dm"
#include "code\defines\procs\icon_procs.dm"
#include "code\defines\procs\logging.dm"
#include "code\defines\procs\religion_name.dm"
#include "code\defines\procs\station_name.dm"