Merge remote-tracking branch 'upstream/master' into sec-rifle

This commit is contained in:
Fox-McCloud
2016-01-03 22:35:28 -05:00
170 changed files with 19726 additions and 18103 deletions
+3 -1
View File
@@ -56,7 +56,9 @@
/turf/simulated/New()
..()
levelupdate()
if(smooth)
smooth_icon(src)
visibilityChanged()
if(!blocks_air)
air = new
+10 -8
View File
@@ -55,14 +55,16 @@
#define HAS_SOCKS 4
//Species Body Flags
#define FEET_CLAWS 1
#define FEET_PADDED 2
#define FEET_NOSLIP 4
#define HAS_TAIL 8
#define HAS_SKIN_TONE 16
#define HAS_SKIN_COLOR 32
#define TAIL_WAGGING 64
#define NO_EYES 128
#define FEET_CLAWS 1
#define FEET_PADDED 2
#define FEET_NOSLIP 4
#define HAS_HEAD_ACCESSORY 8
#define HAS_TAIL 16
#define HAS_SKIN_TONE 32
#define HAS_SKIN_COLOR 64
#define HAS_MARKINGS 128
#define TAIL_WAGGING 256
#define NO_EYES 512
//Species Diet Flags
#define DIET_CARN 1
+1
View File
@@ -65,5 +65,6 @@ var/global/list/special_roles = list(
ROLE_DEMON,
ROLE_SENTIENT,
ROLE_POSIBRAIN,
ROLE_REVENANT,
ROLE_GUARDIAN,
)
+4
View File
@@ -4,6 +4,10 @@
//////////////////////////
/proc/makeDatumRefLists()
//markings
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, marking_styles_list)
//head accessory
init_sprite_accessory_subtypes(/datum/sprite_accessory/head_accessory, head_accessory_styles_list)
//hair
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair, hair_styles_list, hair_styles_male_list, hair_styles_female_list)
//facial hair
+203
View File
@@ -0,0 +1,203 @@
//Redefinitions of the diagonal directions so they can be stored in one var without conflicts
#define N_NORTH 2
#define N_SOUTH 4
#define N_EAST 16
#define N_WEST 256
#define N_NORTHEAST 32
#define N_NORTHWEST 512
#define N_SOUTHEAST 64
#define N_SOUTHWEST 1024
#define SMOOTH_FALSE 0 //not smooth
#define SMOOTH_TRUE 1 //smooths with exact specified types or just itself
#define SMOOTH_MORE 2 //smooths with all subtypes of specified types or just itself
/atom/var/smooth = SMOOTH_FALSE
/atom/var/top_left_corner
/atom/var/top_right_corner
/atom/var/bottom_left_corner
/atom/var/bottom_right_corner
/atom/var/can_be_unanchored = 0
/atom/var/list/canSmoothWith = null // TYPE PATHS I CAN SMOOTH WITH~~~~~ If this is null and atom is smooth, it smooths only with itself
//generic (by snowflake) tile smoothing code; smooth your icons with this!
/*
Each tile is divided in 4 corners, each corner has an image associated to it; the tile is then overlayed by these 4 images
To use this, just set your atom's 'smooth' var to 1. If your atom can be moved/unanchored, set its 'can_be_unanchored' var to 1.
If you don't want your atom's icon to smooth with anything but atoms of the same type, set the list 'canSmoothWith' to null;
Otherwise, put all types you want the atom icon to smooth with in 'canSmoothWith' INCLUDING THE TYPE OF THE ATOM ITSELF.
Each atom has its own icon file with all the possible corner states. See 'smooth_wall.dmi' for a template.
*/
/proc/calculate_adjacencies(atom/A)
if(!A.loc)
return 0
var/adjacencies = 0
if(A.can_be_unanchored)
var/atom/movable/AM = A
if(!AM.anchored)
return 0
for(var/direction in alldirs)
AM = find_type_in_direction(A, direction)
if(istype(AM))
if(AM.anchored)
adjacencies |= 1 << direction
else
if(AM)
adjacencies |= 1 << direction
else
for(var/direction in alldirs)
if(find_type_in_direction(A, direction))
adjacencies |= 1 << direction
return adjacencies
/proc/smooth_icon(atom/A)
if(qdeleted(A))
return
spawn(0) //don't remove this, otherwise smoothing breaks
if(A && A.smooth)
var/adjacencies = calculate_adjacencies(A)
//NW CORNER
var/nw = "1-i"
if((adjacencies & N_NORTH) && (adjacencies & N_WEST))
if(adjacencies & N_NORTHWEST)
nw = "1-f"
else
nw = "1-nw"
else
if(adjacencies & N_NORTH)
nw = "1-n"
else if(adjacencies & N_WEST)
nw = "1-w"
//NE CORNER
var/ne = "2-i"
if((adjacencies & N_NORTH) && (adjacencies & N_EAST))
if(adjacencies & N_NORTHEAST)
ne = "2-f"
else
ne = "2-ne"
else
if(adjacencies & N_NORTH)
ne = "2-n"
else if(adjacencies & N_EAST)
ne = "2-e"
//SW CORNER
var/sw = "3-i"
if((adjacencies & N_SOUTH) && (adjacencies & N_WEST))
if(adjacencies & N_SOUTHWEST)
sw = "3-f"
else
sw = "3-sw"
else
if(adjacencies & N_SOUTH)
sw = "3-s"
else if(adjacencies & N_WEST)
sw = "3-w"
//SE CORNER
var/se = "4-i"
if((adjacencies & N_SOUTH) && (adjacencies & N_EAST))
if(adjacencies & N_SOUTHEAST)
se = "4-f"
else
se = "4-se"
else
if(adjacencies & N_SOUTH)
se = "4-s"
else if(adjacencies & N_EAST)
se = "4-e"
if(A.top_left_corner != nw)
A.overlays -= A.top_left_corner
A.top_left_corner = nw
A.overlays += nw
if(A.top_right_corner != ne)
A.overlays -= A.top_right_corner
A.top_right_corner = ne
A.overlays += ne
if(A.bottom_right_corner != sw)
A.overlays -= A.bottom_right_corner
A.bottom_right_corner = sw
A.overlays += sw
if(A.bottom_left_corner != se)
A.overlays -= A.bottom_left_corner
A.bottom_left_corner = se
A.overlays += se
/proc/find_type_in_direction(atom/source, direction, range=1)
var/x_offset = 0
var/y_offset = 0
if(direction & NORTH)
y_offset = range
else if(direction & SOUTH)
y_offset -= range
if(direction & EAST)
x_offset = range
else if(direction & WEST)
x_offset -= range
var/turf/target_turf = locate(source.x + x_offset, source.y + y_offset, source.z)
if(source.canSmoothWith)
var/atom/A
if(source.smooth == SMOOTH_MORE)
for(var/a_type in source.canSmoothWith)
if( istype(target_turf, a_type) )
return target_turf
A = locate(a_type) in target_turf
if(A)
return A
return null
for(var/a_type in source.canSmoothWith)
if(a_type == target_turf.type)
return target_turf
A = locate(a_type) in target_turf
if(A && A.type == a_type)
return A
return null
else
if(isturf(source))
return source.type == target_turf.type ? target_turf : null
var/atom/A = locate(source.type) in target_turf
return A && A.type == source.type ? A : null
//Icon smoothing helpers
/proc/smooth_icon_neighbors(atom/A)
for(var/V in orange(1,A))
var/atom/T = V
if(T.smooth)
smooth_icon(T)
/proc/smooth_zlevel(var/zlevel)
var/list/away_turfs = block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel))
for(var/V in away_turfs)
var/turf/T = V
if(T.smooth)
smooth_icon(T)
for(var/R in T)
var/atom/A = R
if(A.smooth)
smooth_icon(A)
/atom/proc/clear_smooth_overlays()
overlays -= top_left_corner
top_left_corner = null
overlays -= top_right_corner
top_right_corner = null
overlays -= bottom_right_corner
bottom_right_corner = null
overlays -= bottom_left_corner
bottom_left_corner = null
+145 -145
View File
@@ -634,168 +634,168 @@ as a single icon. Useful for when you want to manipulate an icon via the above a
The _flatIcons list is a cache for generated icon files.
*/
proc // Creates a single icon from a given /atom or /image. Only the first argument is required.
getFlatIcon(image/A, defdir=2, deficon=null, defstate="", defblend=BLEND_DEFAULT)
// We start with a blank canvas, otherwise some icon procs crash silently
var/icon/flat = icon('icons/effects/effects.dmi', "icon_state"="nothing") // Final flattened icon
if(!A)
return flat
if(A.alpha <= 0)
return flat
var/noIcon = FALSE
// Creates a single icon from a given /atom or /image. Only the first argument is required.
/proc/getFlatIcon(image/A, defdir=2, deficon=null, defstate="", defblend=BLEND_DEFAULT)
// We start with a blank canvas, otherwise some icon procs crash silently
var/icon/flat = icon('icons/effects/effects.dmi', "icon_state"="nothing") // Final flattened icon
if(!A)
return flat
if(A.alpha <= 0)
return flat
var/noIcon = FALSE
var/curicon
if(A.icon)
curicon = A.icon
var/curicon
if(A.icon)
curicon = A.icon
else
curicon = deficon
if(!curicon)
noIcon = TRUE // Do not render this object.
var/curstate
if(A.icon_state)
curstate = A.icon_state
else
curstate = defstate
if(!noIcon && !(curstate in icon_states(curicon)))
if("" in icon_states(curicon))
curstate = ""
else
curicon = deficon
if(!curicon)
noIcon = TRUE // Do not render this object.
var/curstate
if(A.icon_state)
curstate = A.icon_state
else
curstate = defstate
var/curdir
if(A.dir != 2)
curdir = A.dir
else
curdir = defdir
if(!noIcon && !(curstate in icon_states(curicon)))
if("" in icon_states(curicon))
curstate = ""
else
noIcon = TRUE // Do not render this object.
var/curblend
if(A.blend_mode == BLEND_DEFAULT)
curblend = defblend
else
curblend = A.blend_mode
var/curdir
if(A.dir != 2)
curdir = A.dir
else
curdir = defdir
// Layers will be a sorted list of icons/overlays, based on the order in which they are displayed
var/list/layers = list()
var/image/copy
// Add the atom's icon itself, without pixel_x/y offsets.
if(!noIcon)
copy = image(icon=curicon, icon_state=curstate, layer=A.layer, dir=curdir)
copy.color = A.color
copy.alpha = A.alpha
copy.blend_mode = curblend
layers[copy] = A.layer
var/curblend
if(A.blend_mode == BLEND_DEFAULT)
curblend = defblend
else
curblend = A.blend_mode
// Layers will be a sorted list of icons/overlays, based on the order in which they are displayed
var/list/layers = list()
var/image/copy
// Add the atom's icon itself, without pixel_x/y offsets.
if(!noIcon)
copy = image(icon=curicon, icon_state=curstate, layer=A.layer, dir=curdir)
copy.color = A.color
copy.alpha = A.alpha
copy.blend_mode = curblend
layers[copy] = A.layer
// Loop through the underlays, then overlays, sorting them into the layers list
var/list/process = A.underlays // Current list being processed
var/pSet=0 // Which list is being processed: 0 = underlays, 1 = overlays
var/curIndex=1 // index of 'current' in list being processed
var/current // Current overlay being sorted
var/currentLayer // Calculated layer that overlay appears on (special case for FLOAT_LAYER)
var/compare // The overlay 'add' is being compared against
var/cmpIndex // The index in the layers list of 'compare'
while(TRUE)
if(curIndex<=process.len)
current = process[curIndex]
if(!current)
curIndex++ //Skip this bad layer item
continue
currentLayer = current:layer
if(currentLayer<0) // Special case for FLY_LAYER
if(currentLayer <= -1000) return flat
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
var/icon/add // Icon of overlay being added
// Current dimensions of flattened icon
var/{flatX1=1;flatX2=flat.Width();flatY1=1;flatY2=flat.Height()}
// Dimensions of overlay being added
var/{addX1;addX2;addY1;addY2}
for(var/I in layers)
if(I:alpha == 0)
// Loop through the underlays, then overlays, sorting them into the layers list
var/list/process = A.underlays // Current list being processed
var/pSet=0 // Which list is being processed: 0 = underlays, 1 = overlays
var/curIndex=1 // index of 'current' in list being processed
var/current // Current overlay being sorted
var/currentLayer // Calculated layer that overlay appears on (special case for FLOAT_LAYER)
var/compare // The overlay 'add' is being compared against
var/cmpIndex // The index in the layers list of 'compare'
while(TRUE)
if(curIndex<=process.len)
current = process[curIndex]
if(!current)
curIndex++ //Skip this bad layer item
continue
currentLayer = current:layer
if(currentLayer<0) // Special case for FLY_LAYER
if(currentLayer <= -1000) return flat
if(pSet == 0) // Underlay
currentLayer = A.layer+currentLayer/1000
else // Overlay
currentLayer = A.layer+(1000+currentLayer)/1000
if(I == copy) // 'I' is an /image based on the object being flattened.
curblend = BLEND_OVERLAY
add = icon(I:icon, I:icon_state, I:dir)
// This checks for a silent failure mode of the icon routine. If the requested dir
// doesn't exist in this icon state it returns a 32x32 icon with 0 alpha.
if (I:dir != SOUTH && add.Width() == 32 && add.Height() == 32)
// Check every pixel for blank (computationally expensive, but the process is limited
// by the amount of film on the station, only happens when we hit something that's
// turned, and bails at the very first pixel it sees.
var/blankpixel;
for(var/y;y<=32;y++)
for(var/x;x<32;x++)
blankpixel = isnull(add.GetPixel(x,y))
if(!blankpixel)
break
// 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
var/icon/add // Icon of overlay being added
// Current dimensions of flattened icon
var/{flatX1=1;flatX2=flat.Width();flatY1=1;flatY2=flat.Height()}
// Dimensions of overlay being added
var/{addX1;addX2;addY1;addY2}
for(var/I in layers)
if(I:alpha == 0)
continue
if(I == copy) // 'I' is an /image based on the object being flattened.
curblend = BLEND_OVERLAY
add = icon(I:icon, I:icon_state, I:dir)
// This checks for a silent failure mode of the icon routine. If the requested dir
// doesn't exist in this icon state it returns a 32x32 icon with 0 alpha.
if (I:dir != SOUTH && add.Width() == 32 && add.Height() == 32)
// Check every pixel for blank (computationally expensive, but the process is limited
// by the amount of film on the station, only happens when we hit something that's
// turned, and bails at the very first pixel it sees.
var/blankpixel;
for(var/y;y<=32;y++)
for(var/x;x<32;x++)
blankpixel = isnull(add.GetPixel(x,y))
if(!blankpixel)
break
// If we ALWAYS returned a null (which happens when GetPixel encounters something with alpha 0)
if (blankpixel)
// Pull the default direction.
add = icon(I:icon, I:icon_state)
else // 'I' is an appearance object.
add = getFlatIcon(new/image(I), curdir, curicon, curstate, curblend)
if(!blankpixel)
break
// If we ALWAYS returned a null (which happens when GetPixel encounters something with alpha 0)
if (blankpixel)
// Pull the default direction.
add = icon(I:icon, I:icon_state)
else // 'I' is an appearance object.
add = getFlatIcon(new/image(I), curdir, curicon, curstate, curblend)
// 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())
// 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
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, blendMode2iconMode(curblend), I:pixel_x + 2 - flatX1, I:pixel_y + 2 - flatY1)
// Blend the overlay into the flattened icon
flat.Blend(add, blendMode2iconMode(curblend), I:pixel_x + 2 - flatX1, I:pixel_y + 2 - flatY1)
if(A.color)
flat.Blend(A.color, ICON_MULTIPLY)
if(A.alpha < 255)
flat.Blend(rgb(255, 255, 255, A.alpha), ICON_MULTIPLY)
if(A.color)
flat.Blend(A.color, ICON_MULTIPLY)
if(A.alpha < 255)
flat.Blend(rgb(255, 255, 255, A.alpha), ICON_MULTIPLY)
return icon(flat, "", SOUTH)
return icon(flat, "", SOUTH)
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.
/proc/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.
+1 -1
View File
@@ -1455,7 +1455,7 @@ proc/rotate_icon(file, state, step = 1, aa = FALSE)
var w, h, w2, h2
if(aa)
aa ++
aa++
w = base.Width()
w2 = w * aa
h = base.Height()
+4
View File
@@ -1,4 +1,8 @@
//Preferences stuff
//Head accessory styles
var/global/list/head_accessory_styles_list = list() //stores /datum/sprite_accessory/head_accessory indexed by name
//Marking styles
var/global/list/marking_styles_list = list() //stores /datum/sprite_accessory/horns indexed by name
//Hairstyles
var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name
var/global/list/hair_styles_male_list = list()
+1 -1
View File
@@ -120,7 +120,7 @@ var/global/datum/controller/process/air_system/air_master
/datum/controller/process/air_system/proc/process_excited_groups()
last_excited = excited_groups.len
for(var/datum/excited_group/EG in excited_groups)
EG.breakdown_cooldown ++
EG.breakdown_cooldown++
if(EG.breakdown_cooldown == 10)
EG.self_breakdown()
SCHECK
+19 -1
View File
@@ -173,12 +173,30 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
hair_s.Blend(rgb(H.r_hair, H.g_hair, H.b_hair), ICON_ADD)
eyes_s.Blend(hair_s, ICON_OVERLAY)
//Head Accessory
if(H.species.bodyflags & HAS_HEAD_ACCESSORY)
var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[H.ha_style]
if(head_accessory_style && head_accessory_style.species_allowed)
var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s")
head_accessory_s.Blend(rgb(H.r_headacc, H.g_headacc, H.b_headacc), ICON_ADD)
eyes_s.Blend(head_accessory_s, ICON_OVERLAY)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[H.f_style]
if(facial_hair_style)
if(facial_hair_style && facial_hair_style.species_allowed)
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
facial_s.Blend(rgb(H.r_facial, H.g_facial, H.b_facial), ICON_ADD)
eyes_s.Blend(facial_s, ICON_OVERLAY)
//Markings
if(H.species.bodyflags & HAS_MARKINGS)
var/datum/sprite_accessory/marking_style = marking_styles_list[H.m_style]
if(marking_style && marking_style.species_allowed)
var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s")
markings_s.Blend(rgb(H.r_markings, H.g_markings, H.b_markings), ICON_ADD)
eyes_s.Blend(markings_s, ICON_OVERLAY)
preview_icon.Blend(eyes_s, ICON_OVERLAY)
var/icon/clothes_s = null
switch(H.mind.assigned_role)
+69 -33
View File
@@ -17,23 +17,32 @@
#define DNA_HARD_BOUNDS list(1,3490,3500,4095)
// UI Indices (can change to mutblock style, if desired)
#define DNA_UI_HAIR_R 1
#define DNA_UI_HAIR_G 2
#define DNA_UI_HAIR_B 3
#define DNA_UI_BEARD_R 4
#define DNA_UI_BEARD_G 5
#define DNA_UI_BEARD_B 6
#define DNA_UI_SKIN_TONE 7
#define DNA_UI_SKIN_R 8
#define DNA_UI_SKIN_G 9
#define DNA_UI_SKIN_B 10
#define DNA_UI_EYES_R 11
#define DNA_UI_EYES_G 12
#define DNA_UI_EYES_B 13
#define DNA_UI_GENDER 14
#define DNA_UI_BEARD_STYLE 15
#define DNA_UI_HAIR_STYLE 16
#define DNA_UI_LENGTH 16 // Update this when you add something, or you WILL break shit.
#define DNA_UI_HAIR_R 1
#define DNA_UI_HAIR_G 2
#define DNA_UI_HAIR_B 3
#define DNA_UI_BEARD_R 4
#define DNA_UI_BEARD_G 5
#define DNA_UI_BEARD_B 6
#define DNA_UI_SKIN_TONE 7
#define DNA_UI_SKIN_R 8
#define DNA_UI_SKIN_G 9
#define DNA_UI_SKIN_B 10
#define DNA_UI_HACC_R 11
#define DNA_UI_HACC_G 12
#define DNA_UI_HACC_B 13
#define DNA_UI_MARK_R 14
#define DNA_UI_MARK_G 15
#define DNA_UI_MARK_B 16
#define DNA_UI_EYES_R 17
#define DNA_UI_EYES_G 18
#define DNA_UI_EYES_B 19
#define DNA_UI_GENDER 20
#define DNA_UI_BEARD_STYLE 21
#define DNA_UI_HAIR_STYLE 22
/*#define DNA_UI_BACC_STYLE 23*/
#define DNA_UI_HACC_STYLE 23
#define DNA_UI_MARK_STYLE 24
#define DNA_UI_LENGTH 24 // Update this when you add something, or you WILL break shit.
#define DNA_SE_LENGTH 55 // Was STRUCDNASIZE, size 27. 15 new blocks added = 42, plus room to grow.
@@ -133,28 +142,55 @@ var/global/list/bad_blocks[0]
character.f_style = "Shaved"
var/beard = facial_hair_styles_list.Find(character.f_style)
SetUIValueRange(DNA_UI_HAIR_R, character.r_hair, 255, 1)
SetUIValueRange(DNA_UI_HAIR_G, character.g_hair, 255, 1)
SetUIValueRange(DNA_UI_HAIR_B, character.b_hair, 255, 1)
// Head Accessory
if(!character.ha_style)
character.ha_style = "None"
var/headacc = head_accessory_styles_list.Find(character.ha_style)
SetUIValueRange(DNA_UI_BEARD_R, character.r_facial, 255, 1)
SetUIValueRange(DNA_UI_BEARD_G, character.g_facial, 255, 1)
SetUIValueRange(DNA_UI_BEARD_B, character.b_facial, 255, 1)
/*// Body Accessory
if(!character.body_accessory)
character.body_accessory = null
var/bodyacc = character.body_accessory*/
SetUIValueRange(DNA_UI_EYES_R, character.r_eyes, 255, 1)
SetUIValueRange(DNA_UI_EYES_G, character.g_eyes, 255, 1)
SetUIValueRange(DNA_UI_EYES_B, character.b_eyes, 255, 1)
// Markings
if(!character.m_style)
character.m_style = "None"
var/marks = marking_styles_list.Find(character.m_style)
SetUIValueRange(DNA_UI_SKIN_R, character.r_skin, 255, 1)
SetUIValueRange(DNA_UI_SKIN_G, character.g_skin, 255, 1)
SetUIValueRange(DNA_UI_SKIN_B, character.b_skin, 255, 1)
SetUIValueRange(DNA_UI_HAIR_R, character.r_hair, 255, 1)
SetUIValueRange(DNA_UI_HAIR_G, character.g_hair, 255, 1)
SetUIValueRange(DNA_UI_HAIR_B, character.b_hair, 255, 1)
SetUIValueRange(DNA_UI_SKIN_TONE, 35-character.s_tone, 220, 1) // Value can be negative.
SetUIValueRange(DNA_UI_BEARD_R, character.r_facial, 255, 1)
SetUIValueRange(DNA_UI_BEARD_G, character.g_facial, 255, 1)
SetUIValueRange(DNA_UI_BEARD_B, character.b_facial, 255, 1)
SetUIState(DNA_UI_GENDER, character.gender!=MALE, 1)
SetUIValueRange(DNA_UI_EYES_R, character.r_eyes, 255, 1)
SetUIValueRange(DNA_UI_EYES_G, character.g_eyes, 255, 1)
SetUIValueRange(DNA_UI_EYES_B, character.b_eyes, 255, 1)
SetUIValueRange(DNA_UI_SKIN_R, character.r_skin, 255, 1)
SetUIValueRange(DNA_UI_SKIN_G, character.g_skin, 255, 1)
SetUIValueRange(DNA_UI_SKIN_B, character.b_skin, 255, 1)
SetUIValueRange(DNA_UI_HACC_R, character.r_headacc, 255, 1)
SetUIValueRange(DNA_UI_HACC_G, character.g_headacc, 255, 1)
SetUIValueRange(DNA_UI_HACC_B, character.b_headacc, 255, 1)
SetUIValueRange(DNA_UI_MARK_R, character.r_markings, 255, 1)
SetUIValueRange(DNA_UI_MARK_G, character.g_markings, 255, 1)
SetUIValueRange(DNA_UI_MARK_B, character.b_markings, 255, 1)
SetUIValueRange(DNA_UI_SKIN_TONE, 35-character.s_tone, 220, 1) // Value can be negative.
SetUIState(DNA_UI_GENDER, character.gender!=MALE, 1)
SetUIValueRange(DNA_UI_HAIR_STYLE, hair, hair_styles_list.len, 1)
SetUIValueRange(DNA_UI_BEARD_STYLE, beard, facial_hair_styles_list.len, 1)
/*SetUIValueRange(DNA_UI_BACC_STYLE, bodyacc, facial_hair_styles_list.len, 1)*/
SetUIValueRange(DNA_UI_HACC_STYLE, headacc, head_accessory_styles_list.len, 1)
SetUIValueRange(DNA_UI_MARK_STYLE, marks, marking_styles_list.len, 1)
SetUIValueRange(DNA_UI_HAIR_STYLE, hair, hair_styles_list.len, 1)
SetUIValueRange(DNA_UI_BEARD_STYLE, beard, facial_hair_styles_list.len,1)
UpdateUI()
+35 -12
View File
@@ -131,21 +131,31 @@
src.dna.UpdateUI()
dna.check_integrity()
var/mob/living/carbon/human/H = src
H.r_hair = dna.GetUIValueRange(DNA_UI_HAIR_R, 255)
H.g_hair = dna.GetUIValueRange(DNA_UI_HAIR_G, 255)
H.b_hair = dna.GetUIValueRange(DNA_UI_HAIR_B, 255)
H.r_hair = dna.GetUIValueRange(DNA_UI_HAIR_R, 255)
H.g_hair = dna.GetUIValueRange(DNA_UI_HAIR_G, 255)
H.b_hair = dna.GetUIValueRange(DNA_UI_HAIR_B, 255)
H.r_facial = dna.GetUIValueRange(DNA_UI_BEARD_R, 255)
H.g_facial = dna.GetUIValueRange(DNA_UI_BEARD_G, 255)
H.b_facial = dna.GetUIValueRange(DNA_UI_BEARD_B, 255)
H.r_facial = dna.GetUIValueRange(DNA_UI_BEARD_R, 255)
H.g_facial = dna.GetUIValueRange(DNA_UI_BEARD_G, 255)
H.b_facial = dna.GetUIValueRange(DNA_UI_BEARD_B, 255)
H.r_skin = dna.GetUIValueRange(DNA_UI_SKIN_R, 255)
H.g_skin = dna.GetUIValueRange(DNA_UI_SKIN_G, 255)
H.b_skin = dna.GetUIValueRange(DNA_UI_SKIN_B, 255)
H.r_eyes = dna.GetUIValueRange(DNA_UI_EYES_R, 255)
H.g_eyes = dna.GetUIValueRange(DNA_UI_EYES_G, 255)
H.b_eyes = dna.GetUIValueRange(DNA_UI_EYES_B, 255)
H.r_headacc = dna.GetUIValueRange(DNA_UI_HACC_R, 255)
H.g_headacc = dna.GetUIValueRange(DNA_UI_HACC_G, 255)
H.b_headacc = dna.GetUIValueRange(DNA_UI_HACC_B, 255)
H.r_markings = dna.GetUIValueRange(DNA_UI_MARK_R, 255)
H.g_markings = dna.GetUIValueRange(DNA_UI_MARK_G, 255)
H.b_markings = dna.GetUIValueRange(DNA_UI_MARK_B, 255)
H.r_skin = dna.GetUIValueRange(DNA_UI_SKIN_R, 255)
H.g_skin = dna.GetUIValueRange(DNA_UI_SKIN_G, 255)
H.b_skin = dna.GetUIValueRange(DNA_UI_SKIN_B, 255)
H.r_eyes = dna.GetUIValueRange(DNA_UI_EYES_R, 255)
H.g_eyes = dna.GetUIValueRange(DNA_UI_EYES_G, 255)
H.b_eyes = dna.GetUIValueRange(DNA_UI_EYES_B, 255)
H.update_eyes()
H.s_tone = 35 - dna.GetUIValueRange(DNA_UI_SKIN_TONE, 220) // Value can be negative.
@@ -165,9 +175,22 @@
if((0 < beard) && (beard <= facial_hair_styles_list.len))
H.f_style = facial_hair_styles_list[beard]
//Head Accessories
var/headacc = dna.GetUIValueRange(DNA_UI_HACC_STYLE,head_accessory_styles_list.len)
if((0 < headacc) && (headacc <= head_accessory_styles_list.len))
H.ha_style = head_accessory_styles_list[headacc]
//Markings
var/marks = dna.GetUIValueRange(DNA_UI_MARK_STYLE,marking_styles_list.len)
if((0 < marks) && (marks <= marking_styles_list.len))
H.m_style = marking_styles_list[marks]
H.force_update_limbs()
H.update_eyes()
H.update_hair()
H.update_fhair()
H.update_markings()
H.update_head_accessory()
return 1
else
+2 -2
View File
@@ -126,7 +126,7 @@ var/list/blob_nodes = list()
spawn(300)
burst_blob(blob, 1)
else
burst ++
burst++
log_admin("[key_name(C)] was in space when attempting to burst as a blob.")
message_admins("[key_name_admin(C)] was in space when attempting to burst as a blob.")
C.gib()
@@ -134,7 +134,7 @@ var/list/blob_nodes = list()
check_finished() //Still needed in case we can't make any blobs
else if(blob_client && location)
burst ++
burst++
C.gib()
var/obj/effect/blob/core/core = new(location, 200, blob_client, blob_point_rate)
if(core.overmind && core.overmind.mind)
@@ -70,6 +70,7 @@
H.update_inv_wear_suit()
H.update_inv_head()
H.update_hair()
H.update_fhair()
if(blood_on_castoff)
var/turf/simulated/T = get_turf(H)
+2 -2
View File
@@ -295,13 +295,13 @@
. = 0
for(var/mob/new_player/P in player_list)
if(P.client && P.ready)
. ++
.++
/datum/game_mode/proc/num_players_started()
. = 0
for(var/mob/living/carbon/human/H in player_list)
if(H.client)
. ++
.++
///////////////////////////////////
//Keeps track of all living heads//
+2 -2
View File
@@ -1281,11 +1281,11 @@ datum
if (ticker.current_state == GAME_STATE_SETTING_UP)
for(var/mob/new_player/P in world)
if(P.client && P.ready && P.mind!=owner)
n_p ++
n_p++
else if (ticker.current_state == GAME_STATE_PLAYING)
for(var/mob/living/carbon/human/P in world)
if(P.client && !(P.mind in ticker.mode.changelings) && P.mind!=owner)
n_p ++
n_p++
target_amount = min(target_amount, n_p)
explanation_text = "Absorb [target_amount] compatible genomes."
+2 -2
View File
@@ -696,13 +696,13 @@ datum/objective/absorb
if(P.client && P.ready && P.mind != owner)
if(P.client.prefs && (P.client.prefs.species == "Vox" || P.client.prefs.species == "Slime People" || P.client.prefs.species == "Machine")) // Special check for species that can't be absorbed. No better solution.
continue
n_p ++
n_p++
else if (ticker.current_state == GAME_STATE_PLAYING)
for(var/mob/living/carbon/human/P in player_list)
if(P.species.flags & NO_SCAN)
continue
if(P.client && !(P.mind in ticker.mode.changelings) && P.mind!=owner)
n_p ++
n_p++
target_amount = min(target_amount, n_p)
explanation_text = "Absorb [target_amount] compatible genomes."
+1
View File
@@ -334,6 +334,7 @@ var/global/list/multiverse = list()
domutcheck(M, null)
M.update_body()
M.update_hair()
M.update_fhair()
equip_copy(M)
+3 -2
View File
@@ -119,7 +119,7 @@
/obj/machinery/alarm/monitor
report_danger_level = 0
/obj/machinery/alarm/monitor/server
preset = AALARM_PRESET_SERVER
@@ -763,7 +763,8 @@
data["name"] = sanitize(name)
data["ref"] = "\ref[src]"
data["danger"] = max(danger_level, alarm_area.atmosalm)
data["area"] = sanitize(get_area(src))
var/area/Area = get_area(src)
data["area"] = sanitize(Area.name)
var/turf/pos = get_turf(src)
data["x"] = pos.x
data["y"] = pos.y
+1 -1
View File
@@ -307,7 +307,7 @@
F.ReplaceWithLattice()
visible_message("<span class='danger'>[src] makes an excited booping sound.</span>")
spawn(50)
amount ++
amount++
anchored = 0
mode = BOT_IDLE
target = null
@@ -328,18 +328,17 @@
/turf/simulated/floor/holofloor/grass
name = "Lush Grass"
icon_state = "grass1"
floor_tile = new/obj/item/stack/tile/grass
floor_tile = /obj/item/stack/tile/grass
New()
floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well.
/turf/simulated/floor/holofloor/grass/New()
..()
spawn(1)
update_icon()
/turf/simulated/floor/holofloor/grass/update_icon()
..()
if(!(icon_state in list("grass1", "grass2", "grass3", "grass4", "sand")))
icon_state = "grass[pick("1","2","3","4")]"
..()
spawn(4)
update_icon()
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
/turf/simulated/floor/holofloor/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
return
@@ -437,7 +437,10 @@
user << "Under directive 7-10, [station_name()] is quarantined until further notice."
return
shuttle_master.emergency.request(null, 1, null, " Automatic Crew Transfer", 0)
if(seclevel2num(get_security_level()) == SEC_LEVEL_RED) // There is a serious threat we gotta move no time to give them five minutes.
shuttle_master.emergency.request(null, 0.5, null, " Automatic Crew Transfer", 1)
else
shuttle_master.emergency.request(null, 1, null, " Automatic Crew Transfer", 0)
if(user)
log_game("[key_name(user)] has called the shuttle.")
message_admins("[key_name_admin(user)] has called the shuttle - [formatJumpTo(user)].", 1)
+1 -1
View File
@@ -315,7 +315,7 @@
if(href_list["operation"])
switch(href_list["operation"])
if("plusspeed")
speed ++
speed++
if(speed > 10)
speed = 10
if("minusspeed")
@@ -25,25 +25,25 @@
if(istype(P, /obj/item/weapon/screwdriver))
user << "You unfasten the bolts."
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
construct_op ++
construct_op++
if(1)
if(istype(P, /obj/item/weapon/screwdriver))
user << "You fasten the bolts."
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
construct_op --
construct_op--
if(istype(P, /obj/item/weapon/wrench))
user << "You dislodge the external plating."
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
construct_op ++
construct_op++
if(2)
if(istype(P, /obj/item/weapon/wrench))
user << "You secure the external plating."
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
construct_op --
construct_op--
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "You remove the cables."
construct_op ++
construct_op++
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( user.loc )
A.amount = 5
stat |= BROKEN // the machine's been borked!
@@ -56,7 +56,7 @@
if(A.amount <= 0)
user.drop_item()
qdel(A)
construct_op --
construct_op--
stat &= ~BROKEN // the machine's not borked anymore!
if(istype(P, /obj/item/weapon/crowbar))
user << "You begin prying out the circuit board other components..."
@@ -164,9 +164,9 @@
var/datum/browser/popup = new(user, "traffic_control", "Telecommunication Traffic Control", 700, 500)
//codemirror
popup.add_script("codemirror-compressed", 'nano/js/codemirror-compressed.js') // A custom compressed JS file of codemirror, with CSS highlighting
popup.add_stylesheet("codemirror", 'nano/css/codemirror.css') // this CSS sheet is common to all UIs, so all UIs can use codemirror
popup.add_stylesheet("lesser-dark", 'nano/css/lesser-dark.css') //CSS styling for codemirror, dark theme
popup.add_script("codemirror-compressed", 'nano/codemirror/codemirror-compressed.js') // A custom minified JavaScript file of CodeMirror, with the following plugins: CSS Mode, NTSL Mode, CSS-hint addon, Search addon, Sublime Keymap.
popup.add_stylesheet("codemirror", 'nano/codemirror/codemirror.css') // A CSS sheet containing the basic stylings and formatting information for CodeMirror.
popup.add_stylesheet("lesser-dark", 'nano/codemirror/lesser-dark.css') // A theme for CodeMirror to use, which closely resembles the rest of the NanoUI style.
popup.set_content(dat)
popup.open()
@@ -344,9 +344,9 @@
proc/dismantleFloor(var/turf/new_turf)
if(istype(new_turf, /turf/simulated/floor))
var/turf/simulated/floor/T = new_turf
if(!T.is_plating())
if(!istype(T, /turf/simulated/floor/plating))
if(!T.broken && !T.burnt)
new T.floor_tile.type(T)
new T.floor_tile(T)
T.make_plating()
return !new_turf.intact
+13 -17
View File
@@ -17,6 +17,7 @@
/obj/structure/alien/resin
name = "resin"
desc = "Looks like some kind of thick resin."
icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi'
icon_state = "resin"
density = 1
opacity = 1
@@ -24,51 +25,46 @@
canSmoothWith = list(/obj/structure/alien/resin)
var/health = 200
var/resintype = null
smooth = SMOOTH_TRUE
/obj/structure/alien/resin/New(location)
relativewall_neighbours()
..()
air_update_turf(1)
return
/obj/structure/alien/resin/Destroy()
var/turf/T = loc
loc = null
T.relativewall_neighbours()
return ..()
/obj/structure/alien/resin/Move()
var/turf/T = loc
..()
move_update_air(T)
/obj/structure/alien/resin/CanAtmosPass()
return !density
/obj/structure/alien/resin/wall
name = "resin wall"
desc = "Thick resin solidified into a wall."
icon_state = "wall0" //same as resin, but consistency ho!
icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi'
icon_state = "resin" //same as resin, but consistency ho!
resintype = "wall"
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
/obj/structure/alien/resin/wall/New()
..()
relativewall_neighbours()
/obj/structure/alien/resin/wall/BlockSuperconductivity()
return 1
/obj/structure/alien/resin/wall/shadowling //For chrysalis
name = "chrysalis wall"
desc = "Some sort of purple substance in an egglike shape. It pulses and throbs from within and seems impenetrable."
health = INFINITY
icon_state = "wall0"
/obj/structure/alien/resin/membrane
name = "resin membrane"
desc = "Resin just thin enough to let light pass through."
icon_state = "membrane0"
icon = 'icons/obj/smooth_structures/alien/resin_membrane.dmi'
icon_state = "membrane"
opacity = 0
health = 120
resintype = "membrane"
/obj/structure/alien/resin/membrane/New()
relativewall_neighbours()
..()
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
/obj/structure/alien/resin/proc/healthcheck()
if(health <=0)
@@ -1,25 +0,0 @@
/obj/item/stack/tile/plasteel
name = "floor tiles"
gender = PLURAL
singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon"
icon_state = "tile"
force = 6
materials = list(MAT_METAL=500)
throwforce = 10
throw_speed = 3
throw_range = 7
/obj/item/stack/tile/plasteel/New(var/loc, var/amount=null)
..()
src.pixel_x = rand(1, 14)
src.pixel_y = rand(1, 14)
return
/obj/item/stack/tile/plasteel/proc/build(turf/S as turf)
if (istype(S,/turf/space))
S.ChangeTurf(/turf/simulated/floor/plating/airless)
else
S.ChangeTurf(/turf/simulated/floor/plating)
return
@@ -18,6 +18,8 @@
throw_range = 20
max_amount = 60
flags = CONDUCT
var/turf_type = null
var/mineralType = null
/*
* Grass
@@ -29,6 +31,7 @@
desc = "A patch of grass like they often use on golf courses"
icon_state = "tile_grass"
origin_tech = "biotech=1"
turf_type = /turf/simulated/floor/grass
/*
* Wood
@@ -39,6 +42,7 @@
singular_name = "wood floor tile"
desc = "an easy to fit wood floor tile"
icon_state = "tile-wood"
turf_type = /turf/simulated/floor/wood
/*
* Carpets
@@ -48,3 +52,22 @@
singular_name = "carpet"
desc = "A piece of carpet. It is the same size as a floor tile"
icon_state = "tile-carpet"
turf_type = /turf/simulated/floor/carpet
/*
* Plasteel
*/
/obj/item/stack/tile/plasteel
name = "floor tiles"
gender = PLURAL
singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon."
icon_state = "tile"
force = 6
materials = list(MAT_METAL=500)
throwforce = 10
throw_speed = 3
throw_range = 7
flags = CONDUCT
turf_type = /turf/simulated/floor/plasteel
mineralType = "metal"
+2 -2
View File
@@ -105,7 +105,7 @@
user.visible_message("<span class='notice'>[user] shaves his facial hair clean with the [src].</span>", \
"<span class='notice'>You finish shaving with the [src]. Fast and clean!</span>")
H.f_style = "Shaved"
H.update_hair()
H.update_fhair()
playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1)
else
var/turf/user_loc = user.loc
@@ -117,7 +117,7 @@
user.visible_message("<span class='danger'>[user] shaves off [H]'s facial hair with \the [src].</span>", \
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
H.f_style = "Shaved"
H.update_hair()
H.update_fhair()
playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1)
if(user.zone_sel.selecting == "head")
if(!get_location_accessible(H, "head"))
@@ -40,18 +40,23 @@
if(crit_fail)
user << "\red The Bluespace generator isn't working."
return
if(istype(W, /obj/item/weapon/storage/backpack/holding) && !W.crit_fail)
investigate_log("has become a singularity. Caused by [user.key]","singulo")
user << "\red The Bluespace interfaces of the two devices catastrophically malfunction!"
qdel(W)
var/obj/singularity/singulo = new /obj/singularity (get_turf(src))
singulo.energy = 300 //should make it a bit bigger~
message_admins("[key_name_admin(user)] detonated a bag of holding")
log_game("[key_name(user)] detonated a bag of holding")
qdel(src)
return
..()
else if(istype(W, /obj/item/weapon/storage/backpack/holding) && !W.crit_fail)
var/response = alert(user, "Are you sure you want to put the bag of holding inside another bag of holding?","Are you sure you want to die?","Yes","No")
if(response == "Yes")
user.visible_message("<span class='warning'>[user] grins as he begins to put a Bag of Holding into a Bag of Holding!</span>", "<span class='warning'>You begin to put the Bag of Holding into the Bag of Holding!</span>")
if(do_after(user,30,target=src))
investigate_log("has become a singularity. Caused by [user.key]","singulo")
user.visible_message("<span class='warning'>[user] erupts in evil laughter as he puts the Bag of Holding into another Bag of Holding!</span>", "<span class='warning'>You can't help yourself from laughing as you put the Bag of Holding into another Bag of Holding, complete darkness surrounding you</span>","<span class='warning'> You hear the sound of scientific evil brewing! </span>")
qdel(W)
var/obj/singularity/singulo = new /obj/singularity(get_turf(user))
singulo.energy = 300 //To give it a small boost
message_admins("[key_name_admin(user)] detonated a bag of holding <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
log_game("[key_name(user)] detonated a bag of holding")
qdel(src)
else
user.visible_message("After careful consideration, [user] has decided that putting a Bag of Holding inside another Bag of Holding would not yield the ideal outcome","You come to the realization that this might not be the greatest idea")
else
. = ..()
proc/failcheck(mob/user as mob)
if (prob(src.reliability)) return 1 //No failure
@@ -105,6 +105,7 @@
/obj/item/weapon/storage/belt/medical/response_team
/obj/item/weapon/storage/belt/medical/response_team/New()
..()
new /obj/item/weapon/reagent_containers/pill/salbutamol(src)
new /obj/item/weapon/reagent_containers/pill/salbutamol(src)
new /obj/item/weapon/reagent_containers/pill/charcoal(src)
+6
View File
@@ -29,6 +29,10 @@
/obj/structure/New()
..()
if(smooth)
smooth_icon(src)
smooth_icon_neighbors(src)
icon_state = ""
if(climbable)
verbs += /obj/structure/proc/climb_on
if(ticker)
@@ -37,6 +41,8 @@
/obj/structure/Destroy()
if(ticker)
cameranet.updateVisibility(src)
if(smooth)
smooth_icon_neighbors(src)
return ..()
/obj/structure/proc/climb_on()
+58 -39
View File
@@ -10,7 +10,7 @@
name = "wall"
desc = "A huge chunk of metal used to seperate rooms."
anchored = 1
icon = 'icons/turf/walls.dmi'
icon = 'icons/turf/walls/wall.dmi'
var/mineral = "metal"
var/walltype = "metal"
var/opening = 0
@@ -19,36 +19,12 @@
canSmoothWith = list(
/turf/simulated/wall,
/turf/simulated/wall/r_wall,
/obj/structure/falsewall,
/obj/structure/falsewall/reinforced // WHY DO WE SMOOTH WITH FALSE R-WALLS WHEN WE DON'T SMOOTH WITH REAL R-WALLS.
)
/obj/structure/falsewall/New()
..()
relativewall_neighbours()
/obj/structure/falsewall/Destroy()
var/temploc = loc
loc = null
for(var/turf/simulated/wall/W in range(temploc,1))
W.relativewall()
for(var/obj/structure/falsewall/W in range(temploc,1))
W.relativewall()
return ..()
/obj/structure/falsewall/relativewall()
if(!density)
icon_state = "[walltype]fwall_open"
return
var/junction = findSmoothingNeighbors()
icon_state = "[walltype][junction]"
return
/obj/structure/falsewall/reinforced, // WHY DO WE SMOOTH WITH FALSE R-WALLS WHEN WE DON'T SMOOTH WITH REAL R-WALLS. //because we do smooth with real r-walls now
/turf/simulated/wall/rust,
/turf/simulated/wall/r_wall/rust)
smooth = SMOOTH_TRUE
/obj/structure/falsewall/attack_hand(mob/user)
if(opening)
@@ -75,17 +51,19 @@
/obj/structure/falsewall/proc/do_the_flick()
if(density)
flick("[walltype]fwall_opening", src)
smooth = SMOOTH_FALSE
clear_smooth_overlays()
icon_state = "fwall_opening"
else
flick("[walltype]fwall_closing", src)
icon_state = "fwall_closing"
/obj/structure/falsewall/update_icon(relativewall = 1)//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
/obj/structure/falsewall/update_icon()
if(density)
icon_state = "[walltype]0"
if(relativewall)
relativewall()
smooth = SMOOTH_TRUE
smooth_icon(src)
icon_state = ""
else
icon_state = "[walltype]fwall_open"
icon_state = "fwall_open"
/obj/structure/falsewall/proc/ChangeToWall(delete = 1)
var/turf/T = get_turf(src)
@@ -147,6 +125,7 @@
/obj/structure/falsewall/reinforced
name = "reinforced wall"
desc = "A huge chunk of reinforced metal used to seperate rooms."
icon = 'icons/turf/walls/reinforced_wall.dmi'
icon_state = "r_wall"
walltype = "rwall"
@@ -164,11 +143,13 @@
/obj/structure/falsewall/uranium
name = "uranium wall"
desc = "A wall with uranium plating. This is probably a bad idea."
icon = 'icons/turf/walls/uranium_wall.dmi'
icon_state = ""
mineral = "uranium"
walltype = "uranium"
var/active = null
var/last_event = 0
canSmoothWith = list(/obj/structure/falsewall/uranium, /turf/simulated/wall/mineral/uranium)
/obj/structure/falsewall/uranium/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
radiate()
@@ -197,30 +178,39 @@
/obj/structure/falsewall/gold
name = "gold wall"
desc = "A wall with gold plating. Swag!"
icon = 'icons/turf/walls/gold_wall.dmi'
icon_state = ""
mineral = "gold"
walltype = "gold"
canSmoothWith = list(/obj/structure/falsewall/gold, /turf/simulated/wall/mineral/gold)
/obj/structure/falsewall/silver
name = "silver wall"
desc = "A wall with silver plating. Shiny."
icon = 'icons/turf/walls/silver_wall.dmi'
icon_state = ""
mineral = "silver"
walltype = "silver"
canSmoothWith = list(/obj/structure/falsewall/silver, /turf/simulated/wall/mineral/silver)
/obj/structure/falsewall/diamond
name = "diamond wall"
desc = "A wall with diamond plating. You monster."
icon = 'icons/turf/walls/diamond_wall.dmi'
icon_state = ""
mineral = "diamond"
walltype = "diamond"
canSmoothWith = list(/obj/structure/falsewall/diamond, /turf/simulated/wall/mineral/diamond)
/obj/structure/falsewall/plasma
name = "plasma wall"
desc = "A wall with plasma plating. This is definately a bad idea."
icon = 'icons/turf/walls/plasma_wall.dmi'
icon_state = ""
mineral = "plasma"
walltype = "plasma"
canSmoothWith = list(/obj/structure/falsewall/plasma, /turf/simulated/wall/mineral/plasma, /turf/simulated/wall/mineral/alien)
/obj/structure/falsewall/plasma/attackby(obj/item/weapon/W, mob/user, params)
if(is_hot(W) > 300)
@@ -240,13 +230,24 @@
if(exposed_temperature > 300)
burnbabyburn()
//-----------wtf?-----------start
/obj/structure/falsewall/alien
name = "alien wall"
desc = "A strange-looking alien wall."
icon = 'icons/turf/walls/plasma_wall.dmi'
icon_state = ""
mineral = "alien"
walltype = "alien"
canSmoothWith = list(/obj/structure/falsewall/alien, /turf/simulated/wall/mineral/alien)
/obj/structure/falsewall/clown
name = "bananium wall"
desc = "A wall with bananium plating. Honk!"
icon = 'icons/turf/walls/bananium_wall.dmi'
icon_state = ""
mineral = "clown"
walltype = "clown"
canSmoothWith = list(/obj/structure/falsewall/clown, /turf/simulated/wall/mineral/clown)
/obj/structure/falsewall/sandstone
name = "sandstone wall"
@@ -254,4 +255,22 @@
icon_state = ""
mineral = "sandstone"
walltype = "sandstone"
//------------wtf?------------end
canSmoothWith = list(/obj/structure/falsewall/sandstone, /turf/simulated/wall/mineral/sandstone)
/obj/structure/falsewall/wood
name = "wooden wall"
desc = "A wall with wooden plating. Stiff."
icon = 'icons/turf/walls/wood_wall.dmi'
icon_state = ""
mineral = "wood"
walltype = "wood"
canSmoothWith = list(/obj/structure/falsewall/wood, /turf/simulated/wall/mineral/wood)
/obj/structure/falsewall/iron
name = "rough metal wall"
desc = "A wall with rough metal plating."
icon = 'icons/turf/walls/iron_wall.dmi'
icon_state = ""
mineral = "metal"
walltype = "iron"
canSmoothWith = list(/obj/structure/falsewall/iron, /turf/simulated/wall/mineral/iron)
+49 -282
View File
@@ -13,7 +13,7 @@
/obj/structure/table
name = "table"
desc = "A square piece of metal standing on four metal legs. It can not move."
icon = 'icons/obj/structures.dmi'
icon = 'icons/obj/smooth_structures/table.dmi'
icon_state = "table"
density = 1
anchored = 1.0
@@ -25,12 +25,8 @@
var/flipped = 0
var/health = 100
var/busy = 0
/obj/structure/table/proc/update_adjacent()
for(var/direction in list(1,2,4,8,5,6,9,10))
if(locate(/obj/structure/table,get_step(src,direction)))
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
T.update_icon()
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced)
/obj/structure/table/New()
..()
@@ -38,11 +34,6 @@
if(T != src)
qdel(T)
update_icon()
update_adjacent()
/obj/structure/table/Destroy()
update_adjacent()
return ..()
/obj/structure/table/proc/destroy()
new parts(loc)
@@ -50,6 +41,10 @@
qdel(src)
/obj/structure/table/update_icon()
if(smooth && !flipped)
smooth_icon(src)
smooth_icon_neighbors(src)
if(flipped)
var/type = 0
var/tabledirs = 0
@@ -65,214 +60,9 @@
base = "rtable"
icon_state = "[base]flip[type]"
if (type==1)
if (tabledirs & turn(dir,90))
icon_state = icon_state+"-"
if (tabledirs & turn(dir,-90))
icon_state = icon_state+"+"
return 1
spawn(2) //So it properly updates when deleting
var/dir_sum = 0
for(var/direction in list(1,2,4,8,5,6,9,10))
var/skip_sum = 0
for(var/obj/structure/window/W in src.loc)
if(W.dir == direction) //So smooth tables don't go smooth through windows
skip_sum = 1
continue
var/inv_direction //inverse direction
switch(direction)
if(1)
inv_direction = 2
if(2)
inv_direction = 1
if(4)
inv_direction = 8
if(8)
inv_direction = 4
if(5)
inv_direction = 10
if(6)
inv_direction = 9
if(9)
inv_direction = 6
if(10)
inv_direction = 5
for(var/obj/structure/window/W in get_step(src,direction))
if(W.dir == inv_direction) //So smooth tables don't go smooth through windows when the window is on the other table's tile
skip_sum = 1
continue
if(!skip_sum) //means there is a window between the two tiles in this direction
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
if(T && !T.flipped)
if(direction <5)
dir_sum += direction
else
if(direction == 5) //This permits the use of all table directions. (Set up so clockwise around the central table is a higher value, from north)
dir_sum += 16
if(direction == 6)
dir_sum += 32
if(direction == 8) //Aherp and Aderp. Jezes I am stupid. -- SkyMarshal
dir_sum += 8
if(direction == 10)
dir_sum += 64
if(direction == 9)
dir_sum += 128
var/table_type = 0 //stand_alone table
if(dir_sum%16 in cardinal)
table_type = 1 //endtable
dir_sum %= 16
if(dir_sum%16 in list(3,12))
table_type = 2 //1 tile thick, streight table
if(dir_sum%16 == 3) //3 doesn't exist as a dir
dir_sum = 2
if(dir_sum%16 == 12) //12 doesn't exist as a dir.
dir_sum = 4
if(dir_sum%16 in list(5,6,9,10))
if(locate(/obj/structure/table,get_step(src.loc,dir_sum%16)))
table_type = 3 //full table (not the 1 tile thick one, but one of the 'tabledir' tables)
else
table_type = 2 //1 tile thick, corner table (treated the same as streight tables in code later on)
dir_sum %= 16
if(dir_sum%16 in list(13,14,7,11)) //Three-way intersection
table_type = 5 //full table as three-way intersections are not sprited, would require 64 sprites to handle all combinations. TOO BAD -- SkyMarshal
switch(dir_sum%16) //Begin computation of the special type tables. --SkyMarshal
if(7)
if(dir_sum == 23)
table_type = 6
dir_sum = 8
else if(dir_sum == 39)
dir_sum = 4
table_type = 6
else if(dir_sum == 55 || dir_sum == 119 || dir_sum == 247 || dir_sum == 183)
dir_sum = 4
table_type = 3
else
dir_sum = 4
if(11)
if(dir_sum == 75)
dir_sum = 5
table_type = 6
else if(dir_sum == 139)
dir_sum = 9
table_type = 6
else if(dir_sum == 203 || dir_sum == 219 || dir_sum == 251 || dir_sum == 235)
dir_sum = 8
table_type = 3
else
dir_sum = 8
if(13)
if(dir_sum == 29)
dir_sum = 10
table_type = 6
else if(dir_sum == 141)
dir_sum = 6
table_type = 6
else if(dir_sum == 189 || dir_sum == 221 || dir_sum == 253 || dir_sum == 157)
dir_sum = 1
table_type = 3
else
dir_sum = 1
if(14)
if(dir_sum == 46)
dir_sum = 1
table_type = 6
else if(dir_sum == 78)
dir_sum = 2
table_type = 6
else if(dir_sum == 110 || dir_sum == 254 || dir_sum == 238 || dir_sum == 126)
dir_sum = 2
table_type = 3
else
dir_sum = 2 //These translate the dir_sum to the correct dirs from the 'tabledir' icon_state.
if(dir_sum%16 == 15)
table_type = 4 //4-way intersection, the 'middle' table sprites will be used.
if(istype(src,/obj/structure/table/reinforced))
switch(table_type)
if(0)
icon_state = "reinf_table"
if(1)
icon_state = "reinf_1tileendtable"
if(2)
icon_state = "reinf_1tilethick"
if(3)
icon_state = "reinf_tabledir"
if(4)
icon_state = "reinf_middle"
if(5)
icon_state = "reinf_tabledir2"
if(6)
icon_state = "reinf_tabledir3"
else if(istype(src,/obj/structure/table/woodentable/poker))
switch(table_type)
if(0)
icon_state = "pokertable_table"
if(1)
icon_state = "pokertable_1tileendtable"
if(2)
icon_state = "pokertable_1tilethick"
if(3)
icon_state = "pokertable_tabledir"
if(4)
icon_state = "pokertable_middle"
if(5)
icon_state = "pokertable_tabledir2"
if(6)
icon_state = "pokertable_tabledir3"
else if(istype(src,/obj/structure/table/woodentable))
switch(table_type)
if(0)
icon_state = "wood_table"
if(1)
icon_state = "wood_1tileendtable"
if(2)
icon_state = "wood_1tilethick"
if(3)
icon_state = "wood_tabledir"
if(4)
icon_state = "wood_middle"
if(5)
icon_state = "wood_tabledir2"
if(6)
icon_state = "wood_tabledir3"
else if(istype(src,/obj/structure/table/glass))
switch(table_type)
if(0)
icon_state = "glass_table"
if(1)
icon_state = "glass_table_1tileendtable"
if(2)
icon_state = "glass_table_1tilethick"
if(3)
icon_state = "glass_table_dir"
if(4)
icon_state = "glass_table_middle"
if(5)
icon_state = "glass_tabledir2"
if(6)
icon_state = "glass_tabledir3"
else
switch(table_type)
if(0)
icon_state = "table"
if(1)
icon_state = "table_1tileendtable"
if(2)
icon_state = "table_1tilethick"
if(3)
icon_state = "tabledir"
if(4)
icon_state = "table_middle"
if(5)
icon_state = "tabledir2"
if(6)
icon_state = "tabledir3"
if (dir_sum in list(1,2,4,8,5,6,9,10))
dir = dir_sum
else
dir = 2
/obj/structure/table/ex_act(severity)
switch(severity)
@@ -395,27 +185,30 @@
step(O, get_dir(O, src))
return
/obj/structure/table/proc/tablepush(obj/item/I, mob/user)
if(get_dist(src, user) < 2)
var/obj/item/weapon/grab/G = I
if(G.affecting.buckled)
user << "<span class='warning'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return 0
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='warning'>You need a better grip to do that!</span>"
return 0
if(!G.confirm())
return 0
G.affecting.forceMove(get_turf(src))
G.affecting.Weaken(5)
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
add_logs(G.affecting, G.assailant, "pushed onto a table")
qdel(I)
return 1
qdel(I)
/obj/structure/table/attackby(obj/item/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if (istype(G.affecting, /mob/living))
var/mob/living/M = G.affecting
if (G.state < 2)
if(user.a_intent == I_HARM)
if (prob(15)) M.Weaken(5)
M.apply_damage(8,def_zone = "head")
visible_message("\red [G.assailant] slams [G.affecting]'s face against \the [src]!")
playsound(src.loc, 'sound/weapons/tablehit1.ogg', 50, 1)
else
user << "\red You need a better grip to do that!"
return
else
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on \the [src].")
qdel(W)
return
if (istype(W, /obj/item/weapon/grab))
tablepush(W, user)
return
if (istype(W, /obj/item/weapon/wrench))
user << "\blue Now disassembling table"
@@ -523,7 +316,6 @@
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,D))
T.flip(direction)
update_icon()
update_adjacent()
return 1
@@ -549,7 +341,6 @@
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,D))
T.unflip()
update_icon()
update_adjacent()
return 1
@@ -559,9 +350,11 @@
/obj/structure/table/woodentable
name = "wooden table"
desc = "Do not apply fire to this. Rumour says it burns easily."
icon = 'icons/obj/smooth_structures/wood_table.dmi'
icon_state = "wood_table"
parts = /obj/item/weapon/table_parts/wood
health = 50
canSmoothWith = list(/obj/structure/table/woodentable, /obj/structure/table/woodentable/poker)
/obj/structure/table/woodentable/attackby(obj/item/I as obj, mob/user as mob, params)
@@ -574,20 +367,9 @@
if (istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
if(G.affecting.buckled)
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='notice'>You need a better grip to do that!</span>"
return
if(!G.confirm())
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
qdel(I)
tablepush(I, user)
return
if (istype(I, /obj/item/weapon/wrench))
user << "\blue Now disassembling the wooden table"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
@@ -628,26 +410,17 @@
/obj/structure/table/woodentable/poker //No specialties, Just a mapping object.
name = "gambling table"
desc = "A seedy table for seedy dealings in seedy places."
icon = 'icons/obj/smooth_structures/poker_table.dmi'
icon_state = "pokertable"
canSmoothWith = list(/obj/structure/table/woodentable/poker, /obj/structure/table/woodentable)
/obj/structure/table/woodentable/poker/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(G.affecting.buckled)
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='notice'>You need a better grip to do that!</span>"
return
if(!G.confirm())
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
qdel(W)
tablepush(W, user)
return
if (istype(W, /obj/item/weapon/wrench))
user << "\blue Now disassembling the wooden table"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
@@ -721,38 +494,30 @@
/obj/structure/table/glass
name = "glass table"
desc = "Looks fragile. You should totally flip it. It is begging for it."
icon = 'icons/obj/smooth_structures/glass_table.dmi'
icon_state = "glass_table"
parts = /obj/item/weapon/table_parts/glass
health = 10
canSmoothWith = null
/obj/structure/table/glass/flip(var/direction)
src.collapse()
/obj/structure/table/glass/proc/collapse() //glass table collapse is called twice in this code, more efficent to just have a proc
src.visible_message("<span class='warning'>\The [src] shatters, and the frame collapses!</span>", "<span class='warning'>You hear metal collapsing and glass shattering.</span>")
playsound(src.loc, "shatter", 50, 1)
new /obj/item/weapon/table_parts/glass(loc)
new /obj/item/weapon/shard(loc)
if(prob(50)) //50% chance to spawn two shards
new /obj/item/weapon/shard(loc)
qdel(src)
/obj/structure/table/glass/tablepush(obj/item/I, mob/user)
if(..())
collapse()
/obj/structure/table/glass/attackby(obj/item/I as obj, mob/user as mob, params)
if (istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
if(G.affecting.buckled)
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='notice'>You need a better grip to do that!</span>"
return
if(!G.confirm())
return
G.affecting.loc = src.loc
G.affecting.Weaken(7)
visible_message("<span class='warning'>[G.assailant] smashes [G.affecting] onto \the [src]!</span>")
qdel(I)
src.collapse()
tablepush(I, user)
return
if (istype(I, /obj/item/weapon/wrench))
@@ -800,10 +565,12 @@
/obj/structure/table/reinforced
name = "reinforced table"
desc = "A version of the four legged table. It is stronger."
icon_state = "reinf_table"
icon = 'icons/obj/smooth_structures/reinforced_table.dmi'
icon_state = "r_table"
health = 200
var/status = 2
parts = /obj/item/weapon/table_parts/reinforced
canSmoothWith = list(/obj/structure/table/reinforced, /obj/structure/table)
/obj/structure/table/reinforced/flip(var/direction)
if (status == 2)
+3
View File
@@ -157,3 +157,6 @@
else if( istype(M, /mob/living/silicon/robot ))
new /obj/effect/decal/cleanable/blood/oil(src)
/turf/simulated/ChangeTurf(var/path)
. = ..()
smooth_icon_neighbors(src)
+71 -486
View File
@@ -19,9 +19,6 @@ var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3
var/list/wood_icons = list("wood","wood-broken")
/turf/simulated/floor
//Note to coders, the 'intact' var can no longer be used to determine if the floor is a plating or not.
//Use the is_plating(), is_plasteel_floor() and is_light_floor() procs instead. --Errorage
name = "floor"
icon = 'icons/turf/floors.dmi'
icon_state = "floor"
@@ -33,8 +30,10 @@ var/list/wood_icons = list("wood","wood-broken")
var/lava = 0
var/broken = 0
var/burnt = 0
var/mineral = "metal"
var/obj/item/stack/tile/floor_tile = new/obj/item/stack/tile/plasteel
var/floor_tile = null //tile that this floor drops
var/obj/item/stack/tile/builtin_tile = null //needed for performance reasons when the singularity rips off floor tiles
var/list/broken_states = list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5")
var/list/burnt_states = list()
/turf/simulated/floor/New()
@@ -43,12 +42,17 @@ var/list/wood_icons = list("wood","wood-broken")
icon_regular_floor = "floor"
else
icon_regular_floor = icon_state
if(floor_tile)
builtin_tile = new floor_tile
spawn(5)
update_visuals()
/turf/simulated/floor/Destroy()
if(floor_tile)
qdel(floor_tile)
floor_tile = null
if(builtin_tile)
qdel(builtin_tile)
builtin_tile = null
return ..()
@@ -87,10 +91,6 @@ var/list/wood_icons = list("wood","wood-broken")
/turf/simulated/floor/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(!burnt && prob(5))
burn_tile()
else if(prob(1) && !is_plating())
make_plating()
burn_tile()
return
/turf/simulated/floor/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume)
var/dir_to = get_dir(src, adj_turf)
@@ -103,496 +103,68 @@ var/list/wood_icons = list("wood","wood-broken")
return
/turf/simulated/floor/proc/update_icon()
if(lava)
return
if(air)
update_visuals()
if(is_plasteel_floor())
if(!broken && !burnt)
icon_state = icon_regular_floor
else if(is_plating())
if(!broken && !burnt)
icon_state = icon_plating //Because asteroids are 'platings' too.
footstep_sounds = list(
"human" = list('sound/effects/footstep/plating_human.ogg'),
"xeno" = list('sound/effects/footstep/plating_xeno.ogg')
)
else if(is_light_floor())
var/obj/item/stack/tile/light/T = floor_tile
if(T.on)
switch(T.state)
if(LIGHTFLOOR_ON)
icon_state = "light_on"
set_light(5,null,LIGHT_COLOR_LIGHTBLUE)
if(LIGHTFLOOR_WHITE)
icon_state = "light_on-w"
set_light(5,null,LIGHT_COLOR_WHITE)
if(LIGHTFLOOR_RED)
icon_state = "light_on-r"
set_light(5,null,LIGHT_COLOR_RED)
if(LIGHTFLOOR_GREEN)
icon_state = "light_on-g"
set_light(5,null,LIGHT_COLOR_PURE_GREEN)
if(LIGHTFLOOR_YELLOW)
icon_state = "light_on-y"
set_light(5,null,"#FFFF00")
if(LIGHTFLOOR_BLUE)
icon_state = "light_on-b"
set_light(5,null,LIGHT_COLOR_DARKBLUE)
if(LIGHTFLOOR_PURPLE)
icon_state = "light_on-p"
set_light(5,null,LIGHT_COLOR_PURPLE)
else
icon_state = "light_off"
set_light(0)
else
set_light(0)
icon_state = "light_off"
else if(is_grass_floor())
if(!broken && !burnt)
if(!(icon_state in list("grass1","grass2","grass3","grass4")))
icon_state = "grass[pick("1","2","3","4")]"
else if(is_carpet_floor())
if(!broken && !burnt)
if(icon_state == "carpet")
var/connectdir = 0
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
if(FF.is_carpet_floor())
connectdir |= direction
//Check the diagonal connections for corners, where you have, for example, connections both north and east. In this case it checks for a north-east connection to determine whether to add a corner marker or not.
var/diagonalconnect = 0 //1 = NE; 2 = SE; 4 = NW; 8 = SW
//Northeast
if(connectdir & NORTH && connectdir & EAST)
if(istype(get_step(src,NORTHEAST),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,NORTHEAST)
if(FF.is_carpet_floor())
diagonalconnect |= 1
//Southeast
if(connectdir & SOUTH && connectdir & EAST)
if(istype(get_step(src,SOUTHEAST),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,SOUTHEAST)
if(FF.is_carpet_floor())
diagonalconnect |= 2
//Northwest
if(connectdir & NORTH && connectdir & WEST)
if(istype(get_step(src,NORTHWEST),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,NORTHWEST)
if(FF.is_carpet_floor())
diagonalconnect |= 4
//Southwest
if(connectdir & SOUTH && connectdir & WEST)
if(istype(get_step(src,SOUTHWEST),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,SOUTHWEST)
if(FF.is_carpet_floor())
diagonalconnect |= 8
icon_state = "carpet[connectdir]-[diagonalconnect]"
footstep_sounds = list(
"human" = list('sound/effects/footstep/carpet_human.ogg'),
"xeno" = list('sound/effects/footstep/carpet_xeno.ogg')
)
else if(is_wood_floor())
if(!broken && !burnt)
if( !(icon_state in wood_icons) )
icon_state = "wood"
footstep_sounds = list(
"human" = list('sound/effects/footstep/wood_all.ogg'), //@RonaldVanWonderen of Freesound.org
"xeno" = list('sound/effects/footstep/wood_all.ogg') //@RonaldVanWonderen of Freesound.org
)
/turf/simulated/floor/return_siding_icon_state()
..()
if(is_grass_floor())
var/dir_sum = 0
for(var/direction in cardinal)
var/turf/T = get_step(src,direction)
if(!(T.is_grass_floor()))
dir_sum += direction
if(dir_sum)
return "wood_siding[dir_sum]"
else
return 0
/turf/simulated/floor/attack_hand(mob/user as mob)
if (is_light_floor())
var/obj/item/stack/tile/light/T = floor_tile
T.on = !T.on
update_icon()
..()
return 1
/turf/simulated/floor/proc/gets_drilled()
return
/turf/simulated/floor/proc/break_tile_to_plating()
if(!is_plating())
make_plating()
break_tile()
/turf/simulated/floor/is_plasteel_floor()
if(istype(floor_tile,/obj/item/stack/tile/plasteel))
return 1
else
return 0
/turf/simulated/floor/is_light_floor()
if(istype(floor_tile,/obj/item/stack/tile/light))
return 1
else
return 0
/turf/simulated/floor/is_grass_floor()
if(istype(floor_tile,/obj/item/stack/tile/grass))
return 1
else
return 0
/turf/simulated/floor/is_wood_floor()
if(istype(floor_tile,/obj/item/stack/tile/wood))
return 1
else
return 0
/turf/simulated/floor/is_carpet_floor()
if(istype(floor_tile,/obj/item/stack/tile/carpet))
return 1
else
return 0
/turf/simulated/floor/is_catwalk()
return 0
/turf/simulated/floor/is_plating()
if(!floor_tile && !is_catwalk())
return 1
return 0
var/turf/simulated/floor/plating/T = make_plating()
T.break_tile()
/turf/simulated/floor/proc/break_tile()
if(istype(src,/turf/simulated/floor/engine)) return
if(istype(src,/turf/simulated/floor/mech_bay_recharge_floor))
src.ChangeTurf(/turf/simulated/floor/plating)
if(broken) return
if(is_plasteel_floor())
src.icon_state = "damaged[pick(1,2,3,4,5)]"
broken = 1
else if(is_light_floor())
src.icon_state = "light_broken"
broken = 1
else if(is_plating())
src.icon_state = "platingdmg[pick(1,2,3)]"
broken = 1
else if(is_wood_floor())
src.icon_state = "wood-broken"
broken = 1
else if(is_carpet_floor())
src.icon_state = "carpet-broken"
broken = 1
else if(is_grass_floor())
src.icon_state = "sand[pick("1","2","3")]"
broken = 1
if(broken)
return
icon_state = pick(broken_states)
broken = 1
/turf/simulated/floor/burn_tile()
if(istype(src,/turf/simulated/floor/engine)) return
if(istype(src,/turf/simulated/floor/plating/airless/asteroid)) return//Asteroid tiles don't burn
if(broken || burnt) return
if(is_plasteel_floor())
src.icon_state = "damaged[pick(1,2,3,4,5)]"
burnt = 1
else if(is_plasteel_floor())
src.icon_state = "floorscorched[pick(1,2)]"
burnt = 1
else if(is_plating())
src.icon_state = "panelscorched"
burnt = 1
else if(is_wood_floor())
src.icon_state = "wood-broken"
burnt = 1
else if(is_carpet_floor())
src.icon_state = "carpet-broken"
burnt = 1
else if(is_grass_floor())
src.icon_state = "sand[pick("1","2","3")]"
burnt = 1
if(broken || burnt)
return
if(burnt_states.len)
icon_state = pick(burnt_states)
else
icon_state = pick(broken_states)
burnt = 1
//This proc will delete the floor_tile and the update_iocn() proc will then change the icon_state of the turf
//This proc auto corrects the grass tiles' siding.
/turf/simulated/floor/proc/make_plating()
if(istype(src,/turf/simulated/floor/engine)) return
if(is_catwalk()) return
return ChangeTurf(/turf/simulated/floor/plating)
if(is_grass_floor())
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
else if(is_carpet_floor())
spawn(5)
if(src)
for(var/direction in list(1,2,4,8,5,6,9,10))
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
/turf/simulated/floor/ChangeTurf(turf/simulated/floor/T)
if(!istype(src,/turf/simulated/floor)) return ..() //fucking turfs switch the fucking src of the fucking running procs
if(!ispath(T,/turf/simulated/floor)) return ..()
var/old_icon = icon_regular_floor
var/old_dir = dir
var/turf/simulated/floor/W = ..()
W.icon_regular_floor = old_icon
W.dir = old_dir
W.update_icon()
return W
if(!floor_tile) return
qdel(floor_tile)
icon_plating = "plating"
set_light(0)
floor_tile = null
intact = 0
broken = 0
burnt = 0
update_icon()
levelupdate()
//This proc will make the turf a plasteel floor tile. The expected argument is the tile to make the turf with
//If none is given it will make a new object. dropping or unequipping must be handled before or after calling
//this proc.
/turf/simulated/floor/proc/make_plasteel_floor(var/obj/item/stack/tile/plasteel/T = null)
broken = 0
burnt = 0
intact = 1
set_light(0)
if(T)
if(istype(T,/obj/item/stack/tile/plasteel))
floor_tile = T
if (icon_regular_floor)
icon_state = icon_regular_floor
else
icon_state = "floor"
icon_regular_floor = icon_state
update_icon()
levelupdate()
return
//if you gave a valid parameter, it won't get thisf ar.
floor_tile = new/obj/item/stack/tile/plasteel
icon_state = "floor"
icon_regular_floor = icon_state
update_icon()
levelupdate()
//This proc will make the turf a light floor tile. The expected argument is the tile to make the turf with
//If none is given it will make a new object. dropping or unequipping must be handled before or after calling
//this proc.
/turf/simulated/floor/proc/make_light_floor(var/obj/item/stack/tile/light/T = null)
broken = 0
burnt = 0
intact = 1
if(T)
if(istype(T,/obj/item/stack/tile/light))
floor_tile = T
update_icon()
levelupdate()
return
//if you gave a valid parameter, it won't get thisf ar.
floor_tile = new/obj/item/stack/tile/light
update_icon()
levelupdate()
//This proc will make a turf into a grass patch. Fun eh? Insert the grass tile to be used as the argument
//If no argument is given a new one will be made.
/turf/simulated/floor/proc/make_grass_floor(var/obj/item/stack/tile/grass/T = null)
broken = 0
burnt = 0
intact = 1
if(T)
if(istype(T,/obj/item/stack/tile/grass))
floor_tile = T
update_icon()
levelupdate()
return
//if you gave a valid parameter, it won't get thisf ar.
floor_tile = new/obj/item/stack/tile/grass
update_icon()
levelupdate()
//This proc will make a turf into a wood floor. Fun eh? Insert the wood tile to be used as the argument
//If no argument is given a new one will be made.
/turf/simulated/floor/proc/make_wood_floor(var/obj/item/stack/tile/wood/T = null)
broken = 0
burnt = 0
intact = 1
if(T)
if(istype(T,/obj/item/stack/tile/wood))
floor_tile = T
update_icon()
levelupdate()
return
//if you gave a valid parameter, it won't get thisf ar.
floor_tile = new/obj/item/stack/tile/wood
update_icon()
levelupdate()
//This proc will make a turf into a carpet floor. Fun eh? Insert the carpet tile to be used as the argument
//If no argument is given a new one will be made.
/turf/simulated/floor/proc/make_carpet_floor(var/obj/item/stack/tile/carpet/T = null)
broken = 0
burnt = 0
intact = 1
if(T)
if(istype(T,/obj/item/stack/tile/carpet))
floor_tile = T
update_icon()
levelupdate()
return
//if you gave a valid parameter, it won't get thisf ar.
floor_tile = new/obj/item/stack/tile/carpet
update_icon()
levelupdate()
/turf/simulated/floor/attackby(obj/item/C as obj, mob/user as mob, params)
if(!C || !user)
return 0
if(istype(C,/obj/item/weapon/light/bulb)) //only for light tiles
if(is_light_floor())
var/obj/item/stack/tile/light/T = floor_tile
if(T.state)
user.drop_item(C)
qdel(C)
T.state = C //fixing it by bashing it with a light bulb, fun eh?
update_icon()
user << "<span class='notice'>You replace the light bulb.</span>"
else
user << "<span class='notice'>The light bulb seems fine, no need to replace it.</span>"
if(istype(C, /obj/item/weapon/crowbar) && (!(is_plating())) && (!is_catwalk()))
return 1
if(..())
return 1
if(intact && istype(C, /obj/item/weapon/crowbar))
if(broken || burnt)
user << "<span class='notice'>You remove the broken plating.</span>"
broken = 0
burnt = 0
user << "<span class='danger'>You remove the broken plating.</span>"
else
if(is_wood_floor())
if(istype(src, /turf/simulated/floor/wood))
user << "<span class='danger'>You forcefully pry off the planks, destroying them in the process.</span>"
else
user << "<span class='notice'>You remove the [floor_tile.name].</span>"
new floor_tile.type(src)
user << "<span class='danger'>You remove the floor tile.</span>"
builtin_tile.loc = src
builtin_tile = null //deassociate tile, it no longer belongs to this turf
make_plating()
// Can't play sounds from areas. - N3X
playsound(src, 'sound/items/Crowbar.ogg', 80, 1)
return
if(istype(C, /obj/item/weapon/screwdriver))
if(is_wood_floor())
if(broken || burnt)
return
else
if(is_wood_floor())
user << "<span class='notice'>You unscrew the planks.</span>"
new floor_tile.type(src)
make_plating()
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
else if(is_catwalk())
if(broken) return
user << "<span class='notice'>You unscrew the catwalk's rods.</span>"
new /obj/item/stack/rods(src, 2)
ReplaceWithLattice()
for(var/direction in cardinal)
var/turf/T = get_step(src,direction)
if(T.is_catwalk())
var/turf/simulated/floor/plating/airless/catwalk/CW=T
CW.update_icon(0)
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
return
if(istype(C, /obj/item/stack/rods))
var/obj/item/stack/rods/R = C
if (is_plating())
if (R.amount >= 2)
user << "<span class='notice'>Reinforcing the floor...</span>"
if(do_after(user, 30, target = src) && R && R.amount >= 2 && is_plating())
ChangeTurf(/turf/simulated/floor/engine)
playsound(src, 'sound/items/Deconstruct.ogg', 80, 1)
R.use(2)
return
else
user << "<span class='warning'>You need more rods.</span>"
else if (is_catwalk())
user << "<span class='warning'>The entire thing is 100% rods already, it doesn't need any more.</span>"
else
user << "<span class='warning'>You must remove the plating first.</span>"
return
if(istype(C, /obj/item/stack/tile))
if (is_catwalk())
user << "<span class='warning'>The catwalk is too primitive to support tiling.</span>"
if(is_plating())
if(!broken && !burnt)
var/obj/item/stack/tile/T = C
floor_tile = new T.type
intact = 1
if(istype(T,/obj/item/stack/tile/light))
var/obj/item/stack/tile/light/L = T
var/obj/item/stack/tile/light/F = floor_tile
F.state = L.state
F.on = L.on
if(istype(T,/obj/item/stack/tile/grass))
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding gets updated properly
else if(istype(T,/obj/item/stack/tile/carpet))
for(var/direction in list(1,2,4,8,5,6,9,10))
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding gets updated properly
T.use(1)
update_icon()
levelupdate()
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
else
user << "<span class='warning'>This section is too damaged to support a tile. Use a welder to fix the damage.</span>"
if(istype(C, /obj/item/stack/cable_coil))
if(is_plating() || is_catwalk())
var/obj/item/stack/cable_coil/coil = C
coil.turf_place(src, user)
else
user << "<span class='warning'>You must remove the plating first.</span>"
if(istype(C, /obj/item/weapon/shovel))
if(is_grass_floor())
new /obj/item/weapon/ore/glass(src)
new /obj/item/weapon/ore/glass(src) //Make some sand if you shovel grass
user << "<span class='notice'>You shovel the grass.</span>"
make_plating()
else
user << "<span class='warning'>You cannot shovel this.</span>"
if(istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/welder = C
if(welder.isOn() && (is_plating()))
if(broken || burnt)
if(welder.remove_fuel(0,user))
user << "<span class='notice'>You fix some dents on the broken plating.</span>"
playsound(src, 'sound/items/Welder.ogg', 80, 1)
icon_state = "plating"
burnt = 0
broken = 0
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
if(istype(C,/obj/item/pipe))
return 1
if(istype(C, /obj/item/pipe))
var/obj/item/pipe/P = C
if(P.pipe_type != -1) // ANY PIPE
user.visible_message( \
@@ -614,21 +186,34 @@ var/list/wood_icons = list("wood","wood-broken")
P.y = src.y
P.z = src.z
P.loc = src
return 1
return 0
/turf/simulated/floor/singularity_pull(S, current_size)
if(current_size == STAGE_THREE)
if(prob(30))
make_plating()
if(builtin_tile)
builtin_tile.loc = src
builtin_tile = null
make_plating()
else if(current_size == STAGE_FOUR)
if(prob(50))
make_plating()
if(builtin_tile)
builtin_tile.loc = src
builtin_tile = null
make_plating()
else if(current_size >= STAGE_FIVE)
if(prob(70))
make_plating()
else
if(prob(50))
ReplaceWithLattice()
if(builtin_tile)
if(prob(70))
builtin_tile.loc = src
builtin_tile = null
make_plating()
else if(prob(50))
ReplaceWithLattice()
/turf/simulated/floor/narsie_act()
if(prob(20))
ChangeTurf(/turf/simulated/floor/engine/cult)
ChangeTurf(/turf/simulated/floor/engine/cult)
/turf/simulated/floor/can_have_cabling()
return !burnt & !broken
@@ -0,0 +1,85 @@
/turf/simulated/floor/wood
icon_state = "wood"
floor_tile = /obj/item/stack/tile/wood
broken_states = list("wood-broken", "wood-broken2", "wood-broken3", "wood-broken4", "wood-broken5", "wood-broken6", "wood-broken7")
footstep_sounds = list(
"human" = list('sound/effects/footstep/wood_all.ogg'), //@RonaldVanWonderen of Freesound.org
"xeno" = list('sound/effects/footstep/wood_all.ogg') //@RonaldVanWonderen of Freesound.org
)
/turf/simulated/floor/wood/attackby(obj/item/C, mob/user, params)
if(..())
return
if(istype(C, /obj/item/weapon/screwdriver))
if(broken || burnt)
return
user << "<span class='danger'>You unscrew the planks.</span>"
new floor_tile(src)
make_plating()
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
return
/turf/simulated/floor/grass
name = "grass patch"
icon_state = "grass1"
floor_tile = /obj/item/stack/tile/grass
broken_states = list("sand")
/turf/simulated/floor/grass/New()
..()
spawn(1)
update_icon()
/turf/simulated/floor/grass/update_icon()
..()
if(!(icon_state in list("grass1", "grass2", "grass3", "grass4", "sand")))
icon_state = "grass[pick("1","2","3","4")]"
/turf/simulated/floor/grass/attackby(obj/item/C, mob/user, params)
if(..())
return
if(istype(C, /obj/item/weapon/shovel))
new /obj/item/weapon/ore/glass(src)
new /obj/item/weapon/ore/glass(src) //Make some sand if you shovel grass
user << "<span class='notice'>You shovel the grass.</span>"
make_plating()
/turf/simulated/floor/carpet
name = "Carpet"
icon = 'icons/turf/floors/carpet.dmi'
icon_state = "carpet"
floor_tile = /obj/item/stack/tile/carpet
broken_states = list("damaged")
smooth = SMOOTH_TRUE
canSmoothWith = null
footstep_sounds = list(
"human" = list('sound/effects/footstep/carpet_human.ogg'),
"xeno" = list('sound/effects/footstep/carpet_xeno.ogg')
)
/turf/simulated/floor/carpet/New()
..()
spawn(1)
update_icon()
/turf/simulated/floor/carpet/update_icon()
if(!..())
return 0
if(!broken && !burnt)
if(smooth)
smooth_icon(src)
else
make_plating()
if(smooth)
smooth_icon_neighbors(src)
/turf/simulated/floor/carpet/break_tile()
broken = 1
update_icon()
/turf/simulated/floor/carpet/burn_tile()
burnt = 1
update_icon()
@@ -0,0 +1,68 @@
/turf/simulated/floor/light
name = "Light floor"
light_range = 5
icon_state = "light_on"
floor_tile = /obj/item/stack/tile/light
broken_states = list("light_broken")
/turf/simulated/floor/light/New()
..()
update_icon()
/turf/simulated/floor/light/update_icon()
..()
if(istype(builtin_tile, /obj/item/stack/tile/light))
var/obj/item/stack/tile/light/T = builtin_tile
if(T.on)
switch(T.state)
if(LIGHTFLOOR_ON)
icon_state = "light_on"
set_light(5,null,LIGHT_COLOR_LIGHTBLUE)
if(LIGHTFLOOR_WHITE)
icon_state = "light_on-w"
set_light(5,null,LIGHT_COLOR_WHITE)
if(LIGHTFLOOR_RED)
icon_state = "light_on-r"
set_light(5,null,LIGHT_COLOR_RED)
if(LIGHTFLOOR_GREEN)
icon_state = "light_on-g"
set_light(5,null,LIGHT_COLOR_PURE_GREEN)
if(LIGHTFLOOR_YELLOW)
icon_state = "light_on-y"
set_light(5,null,"#FFFF00")
if(LIGHTFLOOR_BLUE)
icon_state = "light_on-b"
set_light(5,null,LIGHT_COLOR_DARKBLUE)
if(LIGHTFLOOR_PURPLE)
icon_state = "light_on-p"
set_light(5,null,LIGHT_COLOR_PURPLE)
else
icon_state = "light_off"
set_light(0)
else
set_light(0)
icon_state = "light_off"
/turf/simulated/floor/light/ChangeTurf(turf/T)
set_light(0)
..()
/turf/simulated/floor/light/attack_hand(mob/user)
if(istype(builtin_tile, /obj/item/stack/tile/light))
var/obj/item/stack/tile/light/T = builtin_tile
T.on = !T.on
update_icon()
/turf/simulated/floor/light/attackby(obj/item/C, mob/user, params)
if(..())
return
if(istype(C,/obj/item/weapon/light/bulb)) //only for light tiles
if(istype(builtin_tile, /obj/item/stack/tile/light))
var/obj/item/stack/tile/light/T = builtin_tile
if(T.state)
qdel(C)
T.state = C //fixing it by bashing it with a light bulb, fun eh?
update_icon()
user << "<span class='notice'>You replace the light bulb.</span>"
else
user << "<span class='notice'>The light bulb seems fine, no need to replace it.</span>"
@@ -0,0 +1,57 @@
/turf/simulated/floor/vault
icon = 'icons/turf/floors.dmi'
icon_state = "rockvault"
smooth = SMOOTH_FALSE
/turf/simulated/floor/vault/New(location, vtype)
..()
icon_state = "[vtype]vault"
/turf/simulated/wall/vault
icon = 'icons/turf/walls.dmi'
icon_state = "rockvault"
smooth = SMOOTH_FALSE
/turf/simulated/wall/vault/New(location, vtype)
..()
icon_state = "[vtype]vault"
/turf/simulated/floor/bluegrid
icon = 'icons/turf/floors.dmi'
icon_state = "bcircuit"
/turf/simulated/floor/greengrid
icon = 'icons/turf/floors.dmi'
icon_state = "gcircuit"
/turf/simulated/floor/greengrid/airless
icon_state = "gcircuit"
name = "airless floor"
oxygen = 0.01
nitrogen = 0.01
temperature = TCMB
/turf/simulated/floor/greengrid/airless/New()
..()
name = "floor"
/turf/simulated/floor/beach
name = "beach"
icon = 'icons/misc/beach.dmi'
/turf/simulated/floor/beach/sand
name = "sand"
icon_state = "sand"
/turf/simulated/floor/beach/coastline
name = "coastline"
icon = 'icons/misc/beach2.dmi'
icon_state = "sandwater"
/turf/simulated/floor/beach/water
name = "water"
icon_state = "water"
/turf/simulated/floor/beach/water/New()
..()
overlays += image("icon"='icons/misc/beach.dmi',"icon_state"="water5","layer"=MOB_LAYER+0.1)
@@ -0,0 +1,18 @@
/turf/simulated/floor/plasteel
icon_state = "floor"
floor_tile = /obj/item/stack/tile/plasteel
broken_states = list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5")
burnt_states = list("floorscorched1", "floorscorched2")
/turf/simulated/floor/plasteel/update_icon()
if(!..())
return 0
if(!broken && !burnt)
icon_state = icon_regular_floor
/turf/simulated/floor/plasteel/goonplaque
icon_state = "plaque"
name = "Commemorative Plaque"
desc = "\"This is a plaque in honour of our comrades on the G4407 Stations. Hopefully TG4407 model can live up to your fame and fortune.\" Scratched in beneath that is a crude image of a meteor and a spaceman. The spaceman is laughing. The meteor is exploding."
//TODO: Make subtypes for all normal turf icons
+244
View File
@@ -0,0 +1,244 @@
/turf/simulated/floor/plating
name = "plating"
icon_state = "plating"
intact = 0
floor_tile = null
broken_states = list("platingdmg1", "platingdmg2", "platingdmg3")
burnt_states = list("panelscorched")
footstep_sounds = list(
"human" = list('sound/effects/footstep/plating_human.ogg'),
"xeno" = list('sound/effects/footstep/plating_xeno.ogg')
)
/turf/simulated/floor/plating/New()
..()
icon_plating = icon_state
/turf/simulated/floor/plating/update_icon()
if(!..())
return
if(!broken && !burnt)
icon_state = icon_plating //Because asteroids are 'platings' too.
/turf/simulated/floor/plating/attackby(obj/item/C, mob/user, params)
if(..())
return 1
if(istype(C, /obj/item/stack/rods))
if(broken || burnt)
user << "<span class='warning'>Repair the plating first!</span>"
return
var/obj/item/stack/rods/R = C
if (R.get_amount() < 2)
user << "<span class='warning'>You need two rods to make a reinforced floor!</span>"
return
else
user << "<span class='notice'>You begin reinforcing the floor...</span>"
if(do_after(user, 30, target = src))
if (R.get_amount() >= 2 && !istype(src, /turf/simulated/floor/engine))
ChangeTurf(/turf/simulated/floor/engine)
playsound(src, 'sound/items/Deconstruct.ogg', 80, 1)
R.use(2)
user << "<span class='notice'>You reinforce the floor.</span>"
return
else if(istype(C, /obj/item/stack/tile))
if(!broken && !burnt)
var/obj/item/stack/tile/W = C
if(!W.use(1))
return
ChangeTurf(W.turf_type)
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
else
user << "<span class='warning'>This section is too damaged to support a tile! Use a welder to fix the damage.</span>"
else if(istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/welder = C
if( welder.isOn() && (broken || burnt) )
if(welder.remove_fuel(0,user))
user << "<span class='danger'>You fix some dents on the broken plating.</span>"
playsound(src, 'sound/items/Welder.ogg', 80, 1)
icon_state = icon_plating
burnt = 0
broken = 0
/turf/simulated/floor/plating/airless
icon_state = "plating"
name = "airless plating"
oxygen = 0.01
nitrogen = 0.01
temperature = TCMB
/turf/simulated/floor/plating/airless/New()
..()
name = "plating"
/turf/simulated/floor/plating/airless/catwalk
icon = 'icons/turf/catwalks.dmi'
icon_state = "Floor3"
name = "catwalk"
desc = "Cats really don't like these things."
/turf/simulated/floor/engine
name = "reinforced floor"
icon_state = "engine"
thermal_conductivity = 0.025
heat_capacity = 325000
floor_tile = /obj/item/stack/rods
/turf/simulated/floor/engine/break_tile()
return //unbreakable
/turf/simulated/floor/engine/burn_tile()
return //unburnable
/turf/simulated/floor/engine/make_plating(var/force = 0)
if(force)
..()
return //unplateable
/turf/simulated/floor/engine/attackby(obj/item/weapon/C as obj, mob/user as mob, params)
if(!C || !user)
return
if(istype(C, /obj/item/weapon/wrench))
user << "<span class='notice'>You begin removing rods...</span>"
playsound(src, 'sound/items/Ratchet.ogg', 80, 1)
if(do_after(user, 30, target = src))
if(!istype(src, /turf/simulated/floor/engine))
return
new /obj/item/stack/rods(src, 2)
ChangeTurf(/turf/simulated/floor/plating)
return
/turf/simulated/floor/engine/ex_act(severity,target)
switch(severity)
if(1)
if(prob(80))
ReplaceWithLattice()
else if(prob(50))
qdel(src)
else
if(builtin_tile)
builtin_tile.loc = src
builtin_tile = null
make_plating(1)
if(2)
if(prob(50))
make_plating(1)
/turf/simulated/floor/engine/cult
name = "engraved floor"
icon_state = "cult"
/turf/simulated/floor/engine/cult/narsie_act()
return
/turf/simulated/floor/engine/n20/New()
..()
var/datum/gas_mixture/adding = new
var/datum/gas/sleeping_agent/trace_gas = new
trace_gas.moles = 6000
adding.trace_gases += trace_gas
adding.temperature = T20C
assume_air(adding)
/turf/simulated/floor/engine/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
if(prob(30))
make_plating() //does not actually do anything
else
if(prob(30))
ReplaceWithLattice()
/turf/simulated/floor/engine/vacuum
name = "vacuum floor"
icon_state = "engine"
oxygen = 0
nitrogen = 0
temperature = TCMB
/turf/simulated/floor/plating/ironsand/New()
..()
name = "Iron Sand"
icon_state = "ironsand[rand(1,15)]"
/turf/simulated/floor/plating/snow
name = "snow"
icon = 'icons/turf/snow.dmi'
icon_state = "snow"
/turf/simulated/floor/plating/snow/ex_act(severity)
return
/turf/simulated/floor/snow
name = "snow"
icon = 'icons/turf/snow.dmi'
icon_state = "snow"
/turf/simulated/floor/snow/ex_act(severity)
return
// CATWALKS
// Space and plating, all in one buggy fucking turf!
// These are *so* fucking bad it makes me want to kill myself
/turf/simulated/floor/plating/airless/catwalk
icon = 'icons/turf/catwalks.dmi'
icon_state = "catwalk0"
name = "catwalk"
desc = "Cats really don't like these things."
temperature = TCMB
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 700000
/turf/simulated/floor/plating/airless/catwalk/New()
..()
set_light(4) //starlight
name = "catwalk"
update_icon(1)
/turf/simulated/floor/plating/airless/catwalk/update_icon(var/propogate=1)
underlays.Cut()
underlays += new /icon('icons/turf/space.dmi',"[((x + y) ^ ~(x * y) + z) % 25]")
var/dirs = 0
for(var/direction in cardinal)
var/turf/T = get_step(src,direction)
if(istype(T, /turf/simulated/floor/plating/airless/catwalk))
var/turf/simulated/floor/plating/airless/catwalk/C=T
dirs |= direction
if(propogate)
C.update_icon(0)
icon_state="catwalk[dirs]"
/turf/simulated/floor/plating/airless/catwalk/attackby(obj/item/C, mob/user, params)
if(..())
return
if(!broken && isscrewdriver(C))
user << "<span class='notice'>You unscrew the catwalk's rods.</span>"
new /obj/item/stack/rods(src, 2)
ReplaceWithLattice()
for(var/direction in cardinal)
var/turf/T = get_step(src,direction)
if(istype(T, /turf/simulated/floor/plating/airless/catwalk))
var/turf/simulated/floor/plating/airless/catwalk/CW=T
CW.update_icon(0)
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
/turf/simulated/floor/airless
icon_state = "floor"
name = "airless floor"
oxygen = 0.01
nitrogen = 0.01
temperature = TCMB
/turf/simulated/floor/airless/New()
..()
name = "floor"
-414
View File
@@ -1,414 +0,0 @@
/turf/simulated/floor/airless
icon_state = "floor"
name = "airless floor"
oxygen = 0.01
nitrogen = 0.01
temperature = TCMB
New()
..()
name = "floor"
/turf/simulated/floor/light
name = "Light floor"
light_range = 5
icon_state = "light_on"
floor_tile = new/obj/item/stack/tile/light
New()
floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well.
var/n = name //just in case commands rename it in the ..() call
..()
spawn(4)
if(src)
update_icon()
name = n
/turf/simulated/floor/wood
name = "floor"
icon_state = "wood"
floor_tile = new/obj/item/stack/tile/wood
footstep_sounds = list(
"human" = list('sound/effects/footstep/wood_all.ogg'), //@RonaldVanWonderen of Freesound.org
"xeno" = list('sound/effects/footstep/wood_all.ogg') //@RonaldVanWonderen of Freesound.org
)
/turf/simulated/floor/vault
icon_state = "rockvault"
New(location,type)
..()
icon_state = "[type]vault"
/turf/simulated/wall/vault
icon_state = "rockvault"
New(location,type)
..()
icon_state = "[type]vault"
/turf/simulated/floor/engine
name = "reinforced floor"
icon_state = "engine"
thermal_conductivity = 0.025
heat_capacity = 325000
/turf/simulated/floor/engine/New()
..()
spawn(20) //engine floors tend to have gas on them
update_icon()
/turf/simulated/floor/engine/break_tile()
return //unbreakable
/turf/simulated/floor/engine/burn_tile()
return //unburnable
/turf/simulated/floor/engine/make_plating(var/force = 0)
if(force)
..()
return //unplateable
/turf/simulated/floor/engine/attackby(obj/item/weapon/C as obj, mob/user as mob, params)
if(!C || !user)
return
if(istype(C, /obj/item/weapon/wrench))
user << "<span class='notice'>You begin removing rods...</span>"
playsound(src, 'sound/items/Ratchet.ogg', 80, 1)
if(do_after(user, 30, target = src))
new /obj/item/stack/rods(src, 2)
ChangeTurf(/turf/simulated/floor/plating)
return
/turf/simulated/floor/engine/ex_act(severity,target)
switch(severity)
if(1.0)
if(prob(80))
ReplaceWithLattice()
else if(prob(50))
qdel(src)
else
make_plating(1)
if(2.0)
if(prob(50))
make_plating(1)
/turf/simulated/floor/engine/cult
name = "engraved floor"
icon_state = "cult"
/turf/simulated/floor/engine/cult/narsie_act()
return
/turf/simulated/floor/engine/n20/New()
..()
var/datum/gas_mixture/adding = new
var/datum/gas/sleeping_agent/trace_gas = new
trace_gas.moles = 6000
adding.trace_gases += trace_gas
adding.temperature = T20C
assume_air(adding)
/turf/simulated/floor/engine/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
if(prob(30))
make_plating()
else
if(prob(30))
ReplaceWithLattice()
/turf/simulated/floor/engine/vacuum
name = "vacuum floor"
icon_state = "engine"
oxygen = 0
nitrogen = 0
temperature = TCMB
/turf/simulated/floor/plating
name = "plating"
icon_state = "plating"
floor_tile = null
intact = 0
footstep_sounds = list(
"human" = list('sound/effects/footstep/plating_human.ogg'),
"xeno" = list('sound/effects/footstep/plating_xeno.ogg')
)
/turf/simulated/floor/plating/airless
icon_state = "plating"
name = "airless plating"
oxygen = 0.01
nitrogen = 0.01
temperature = TCMB
New()
..()
name = "plating"
/turf/simulated/floor/plating/airless/catwalk
icon = 'icons/turf/catwalks.dmi'
icon_state = "Floor3"
name = "catwalk"
desc = "Cats really don't like these things."
/turf/simulated/floor/bluegrid
icon = 'icons/turf/floors.dmi'
icon_state = "bcircuit"
/turf/simulated/floor/greengrid
icon = 'icons/turf/floors.dmi'
icon_state = "gcircuit"
/turf/simulated/floor/greengrid/airless
icon_state = "gcircuit"
name = "airless floor"
oxygen = 0.01
nitrogen = 0.01
temperature = TCMB
New()
..()
name = "floor"
/turf/simulated/shuttle
name = "shuttle"
icon = 'icons/turf/shuttle.dmi'
thermal_conductivity = 0.05
heat_capacity = 0
layer = 2
/turf/simulated/shuttle/wall
name = "wall"
icon_state = "wall1"
opacity = 1
density = 1
blocks_air = 1
//sub-type to be used for interior shuttle walls
//won't get an underlay of the destination turf on shuttle move
/turf/simulated/shuttle/wall/interior/copyTurf(turf/T)
if(T.type != type)
T.ChangeTurf(type)
if(underlays.len)
T.underlays = underlays
if(T.icon_state != icon_state)
T.icon_state = icon_state
if(T.icon != icon)
T.icon = icon
if(T.color != color)
T.color = color
if(T.dir != dir)
T.dir = dir
T.transform = transform
return T
/turf/simulated/shuttle/wall/copyTurf(turf/T)
. = ..()
T.transform = transform
//why don't shuttle walls habe smoothwall? now i gotta do rotation the dirty way
/turf/simulated/shuttle/wall/shuttleRotate(rotation)
var/matrix/M = transform
M.Turn(rotation)
transform = M
/turf/simulated/shuttle/floor
name = "floor"
icon_state = "floor"
/turf/simulated/shuttle/plating
name = "plating"
icon = 'icons/turf/floors.dmi'
icon_state = "plating"
/turf/simulated/shuttle/plating/vox //Vox skipjack plating
oxygen = 0
nitrogen = MOLES_N2STANDARD + MOLES_O2STANDARD
/turf/simulated/shuttle/floor4 // Added this floor tile so that I have a seperate turf to check in the shuttle -- Polymorph
name = "brig floor" // Also added it into the 2x3 brig area of the shuttle.
icon_state = "floor4"
/turf/simulated/shuttle/floor4/vox //Vox skipjack floors
name = "skipjack floor"
oxygen = 0
nitrogen = MOLES_N2STANDARD + MOLES_O2STANDARD
/turf/simulated/floor/beach
name = "beach"
icon = 'icons/misc/beach.dmi'
/turf/simulated/floor/beach/sand
name = "sand"
icon_state = "sand"
/turf/simulated/floor/beach/coastline
name = "coastline"
icon = 'icons/misc/beach2.dmi'
icon_state = "sandwater"
/turf/simulated/floor/beach/water
name = "water"
icon_state = "water"
/turf/simulated/floor/beach/water/New()
..()
overlays += image("icon"='icons/misc/beach.dmi',"icon_state"="water5","layer"=MOB_LAYER+0.1)
/turf/simulated/floor/grass
name = "grass patch"
icon_state = "grass1"
floor_tile = new/obj/item/stack/tile/grass
New()
floor_tile.New() //I guess New() isn't ran on objects spawned without the definition of a turf to house them, ah well.
icon_state = "grass[pick("1","2","3","4")]"
..()
spawn(4)
if(src)
update_icon()
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
/turf/simulated/floor/carpet
name = "carpet"
icon_state = "carpet"
floor_tile = new/obj/item/stack/tile/carpet
footstep_sounds = list(
"human" = list('sound/effects/footstep/carpet_human.ogg'),
"xeno" = list('sound/effects/footstep/carpet_xeno.ogg')
)
New()
floor_tile.New() //I guess New() isn't ran on objects spawned without the definition of a turf to house them, ah well.
if(!icon_state)
icon_state = "carpet"
..()
spawn(4)
if(src)
update_icon()
for(var/direction in list(1,2,4,8,5,6,9,10))
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
/turf/simulated/floor/plating/ironsand/New()
..()
name = "Iron Sand"
icon_state = "ironsand[rand(1,15)]"
/turf/simulated/floor/plating/snow
name = "snow"
icon = 'icons/turf/snow.dmi'
icon_state = "snow"
/turf/simulated/floor/plating/snow/ex_act(severity)
return
/turf/simulated/floor/snow
name = "snow"
icon = 'icons/turf/snow.dmi'
icon_state = "snow"
/turf/simulated/floor/snow/ex_act(severity)
return
// CATWALKS
// Space and plating, all in one buggy fucking turf!
/turf/simulated/floor/plating/airless/catwalk
icon = 'icons/turf/catwalks.dmi'
icon_state = "catwalk0"
name = "catwalk"
desc = "Cats really don't like these things."
temperature = TCMB
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 700000
// accepts_lighting=0 // Don't apply overlays
New()
..()
set_light(4) //starlight
name = "catwalk"
update_icon(1)
update_icon(var/propogate=1)
underlays.Cut()
underlays += new /icon('icons/turf/space.dmi',"[((x + y) ^ ~(x * y) + z) % 25]")
var/dirs = 0
for(var/direction in cardinal)
var/turf/T = get_step(src,direction)
if(T.is_catwalk())
var/turf/simulated/floor/plating/airless/catwalk/C=T
dirs |= direction
if(propogate)
C.update_icon(0)
icon_state="catwalk[dirs]"
is_catwalk()
return 1
/** ACT UNSIMULATED! **/
/*
assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
qdel(giver)
return 0
return_air()
//Create gas mixture to hold data for passing
var/datum/gas_mixture/GM = new
GM.oxygen = oxygen
GM.carbon_dioxide = carbon_dioxide
GM.nitrogen = nitrogen
GM.toxins = toxins
GM.temperature = temperature
GM.update_values()
return GM
// For new turfs
copy_air_from(var/turf/T)
oxygen = T.oxygen
carbon_dioxide = T.carbon_dioxide
nitrogen = T.nitrogen
toxins = T.toxins
temperature = T.temperature
remove_air(amount as num)
var/datum/gas_mixture/GM = new
var/sum = oxygen + carbon_dioxide + nitrogen + toxins
if(sum>0)
GM.oxygen = (oxygen/sum)*amount
GM.carbon_dioxide = (carbon_dioxide/sum)*amount
GM.nitrogen = (nitrogen/sum)*amount
GM.toxins = (toxins/sum)*amount
GM.temperature = temperature
GM.update_values()
return GM
*/
+64
View File
@@ -0,0 +1,64 @@
/turf/simulated/shuttle
name = "shuttle"
icon = 'icons/turf/shuttle.dmi'
thermal_conductivity = 0.05
heat_capacity = 0
layer = 2
/turf/simulated/shuttle/wall
name = "wall"
icon_state = "wall1"
opacity = 1
density = 1
blocks_air = 1
//sub-type to be used for interior shuttle walls
//won't get an underlay of the destination turf on shuttle move
/turf/simulated/shuttle/wall/interior/copyTurf(turf/T)
if(T.type != type)
T.ChangeTurf(type)
if(underlays.len)
T.underlays = underlays
if(T.icon_state != icon_state)
T.icon_state = icon_state
if(T.icon != icon)
T.icon = icon
if(T.color != color)
T.color = color
if(T.dir != dir)
T.dir = dir
T.transform = transform
return T
/turf/simulated/shuttle/wall/copyTurf(turf/T)
. = ..()
T.transform = transform
//why don't shuttle walls habe smoothwall? now i gotta do rotation the dirty way
/turf/simulated/shuttle/wall/shuttleRotate(rotation)
var/matrix/M = transform
M.Turn(rotation)
transform = M
/turf/simulated/shuttle/floor
name = "floor"
icon_state = "floor"
/turf/simulated/shuttle/plating
name = "plating"
icon = 'icons/turf/floors.dmi'
icon_state = "plating"
/turf/simulated/shuttle/plating/vox //Vox skipjack plating
oxygen = 0
nitrogen = MOLES_N2STANDARD + MOLES_O2STANDARD
/turf/simulated/shuttle/floor4 // Added this floor tile so that I have a seperate turf to check in the shuttle -- Polymorph
name = "brig floor" // Also added it into the 2x3 brig area of the shuttle.
icon_state = "floor4"
/turf/simulated/shuttle/floor4/vox //Vox skipjack floors
name = "skipjack floor"
oxygen = 0
nitrogen = MOLES_N2STANDARD + MOLES_O2STANDARD
+8 -9
View File
@@ -1,7 +1,8 @@
/turf/simulated/wall
name = "wall"
desc = "A huge chunk of metal used to seperate rooms."
icon = 'icons/turf/walls.dmi'
icon = 'icons/turf/walls/wall.dmi'
icon_state = "wall"
var/mineral = "metal"
var/rotting = 0
@@ -25,22 +26,20 @@
var/hardness = 40 //lower numbers are harder. Used to determine the probability of a hulk smashing through.
var/engraving, engraving_quality //engraving on the wall
var/del_suppress_resmoothing = 0 // Do not resmooth neighbors on Destroy. (smoothwall.dm)
canSmoothWith = list(
/turf/simulated/wall,
/turf/simulated/wall/r_wall,
/obj/structure/falsewall,
/obj/structure/falsewall/reinforced // WHY DO WE SMOOTH WITH FALSE R-WALLS WHEN WE DON'T SMOOTH WITH REAL R-WALLS.
)
/obj/structure/falsewall/reinforced,
/turf/simulated/wall/rust,
/turf/simulated/wall/r_wall/rust)
smooth = SMOOTH_TRUE
/turf/simulated/wall/ChangeTurf(var/newtype)
for(var/obj/effect/E in src)
if(E.name == "Wallrot")
qdel(E)
var/dsr=0
if(del_suppress_resmoothing) dsr=1
..(newtype)
if(!dsr)
relativewall_neighbours(sko=1)
. = ..(newtype)
//Appearance
+51 -13
View File
@@ -4,55 +4,69 @@
icon_state = ""
var/last_event = 0
var/active = null
canSmoothWith = null
smooth = SMOOTH_TRUE
/turf/simulated/wall/mineral/gold
name = "gold wall"
desc = "A wall with gold plating. Swag!"
icon_state = "gold0"
icon = 'icons/turf/walls/gold_wall.dmi'
icon_state = "gold"
walltype = "gold"
mineral = "gold"
explosion_block = 0 //gold is a soft metal you dingus.
//var/electro = 1
//var/shocked = null
explosion_block = 0 //gold is a soft metal you dingus.
canSmoothWith = list(/turf/simulated/wall/mineral/gold, /obj/structure/falsewall/gold)
/turf/simulated/wall/mineral/silver
name = "silver wall"
desc = "A wall with silver plating. Shiny!"
icon_state = "silver0"
icon = 'icons/turf/walls/silver_wall.dmi'
icon_state = "silver"
walltype = "silver"
mineral = "silver"
//var/electro = 0.75
//var/shocked = null
canSmoothWith = list(/turf/simulated/wall/mineral/silver, /obj/structure/falsewall/silver)
/turf/simulated/wall/mineral/diamond
name = "diamond wall"
desc = "A wall with diamond plating. You monster."
icon_state = "diamond0"
icon = 'icons/turf/walls/diamond_wall.dmi'
icon_state = "diamond"
walltype = "diamond"
mineral = "diamond"
explosion_block = 3
canSmoothWith = list(/turf/simulated/wall/mineral/diamond, /obj/structure/falsewall/diamond)
/turf/simulated/wall/mineral/clown
name = "bananium wall"
desc = "A wall with bananium plating. Honk!"
icon_state = "clown0"
walltype = "clown"
icon = 'icons/turf/walls/bananium_wall.dmi'
icon_state = "bananium"
walltype = "bananium"
mineral = "clown"
canSmoothWith = list(/turf/simulated/wall/mineral/clown, /obj/structure/falsewall/clown)
/turf/simulated/wall/mineral/sandstone
name = "sandstone wall"
desc = "A wall with sandstone plating."
icon_state = "sandstone0"
icon = 'icons/turf/walls/sandstone_wall.dmi'
icon_state = "sandstone"
walltype = "sandstone"
mineral = "sandstone"
explosion_block = 0
canSmoothWith = list(/turf/simulated/wall/mineral/sandstone, /obj/structure/falsewall/sandstone)
/turf/simulated/wall/mineral/uranium
name = "uranium wall"
desc = "A wall with uranium plating. This is probably a bad idea."
icon_state = "uranium0"
icon = 'icons/turf/walls/uranium_wall.dmi'
icon_state = "uranium"
walltype = "uranium"
mineral = "uranium"
canSmoothWith = list(/turf/simulated/wall/mineral/uranium, /obj/structure/falsewall/uranium)
/turf/simulated/wall/mineral/uranium/proc/radiate()
if(!active)
@@ -82,10 +96,12 @@
/turf/simulated/wall/mineral/plasma
name = "plasma wall"
desc = "A wall with plasma plating. This is definately a bad idea."
icon_state = "plasma0"
icon = 'icons/turf/walls/plasma_wall.dmi'
icon_state = "plasma"
walltype = "plasma"
mineral = "plasma"
thermal_conductivity = 0.04
canSmoothWith = list(/turf/simulated/wall/mineral/plasma, /obj/structure/falsewall/plasma)
/turf/simulated/wall/mineral/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
@@ -134,7 +150,29 @@
/turf/simulated/wall/mineral/alien
name = "alien wall"
desc = "An strange-looking alien wall."
icon_state = "plasma0"
walltype = "plasma"
mineral = "plasma"
desc = "A strange-looking alien wall."
icon = 'icons/turf/walls/plasma_wall.dmi'
icon_state = "plasma"
walltype = "alien"
mineral = "alien"
canSmoothWith = list(/turf/simulated/wall/mineral/alien, /obj/structure/falsewall/alien)
/turf/simulated/wall/mineral/wood
name = "wooden wall"
desc = "A wall with wooden plating. Stiff."
icon = 'icons/turf/walls/wood_wall.dmi'
icon_state = "wood"
walltype = "wood"
mineral = "wood"
hardness = 70
explosion_block = 0
canSmoothWith = list(/turf/simulated/wall/mineral/wood, /obj/structure/falsewall/wood)
/turf/simulated/wall/mineral/iron
name = "rough metal wall"
desc = "A wall with rough metal plating."
icon = 'icons/turf/walls/iron_wall.dmi'
icon_state = "iron"
walltype = "iron"
mineral = "rods"
canSmoothWith = list(/turf/simulated/wall/mineral/iron, /obj/structure/falsewall/iron)
+4
View File
@@ -1,8 +1,10 @@
/turf/simulated/wall/cult
name = "wall"
desc = "The patterns engraved on the wall seem to shift as you try to focus on them. You feel sick"
icon = 'icons/turf/walls/cult_wall.dmi'
icon_state = "cult"
walltype = "cult"
canSmoothWith = null
/turf/simulated/wall/cult/narsie_act()
return
@@ -10,11 +12,13 @@
/turf/simulated/wall/rust
name = "rusted wall"
desc = "A rusted metal wall."
icon = 'icons/turf/walls/rusty_wall.dmi'
icon_state = "arust"
walltype = "arust"
/turf/simulated/wall/r_wall/rust
name = "rusted reinforced wall"
desc = "A huge chunk of rusted reinforced metal."
icon = 'icons/turf/walls/rusty_reinforced_wall.dmi'
icon_state = "rrust"
walltype = "rrust"
+25 -13
View File
@@ -1,6 +1,7 @@
/turf/simulated/wall/r_wall
name = "reinforced wall"
desc = "A huge chunk of reinforced metal used to seperate rooms."
icon = 'icons/turf/walls/reinforced_wall.dmi'
icon_state = "r_wall"
opacity = 1
density = 1
@@ -83,7 +84,7 @@
if(istype(W, /obj/item/weapon/wirecutters))
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
d_state = 1
icon_state = "r_wall-1"
update_icon()
new /obj/item/stack/rods(src)
user << "<span class='notice'>You cut the outer grille.</span>"
return
@@ -95,7 +96,7 @@
if(do_after(user, 40, target = src) && d_state == 1)
d_state = 2
icon_state = "r_wall-2"
update_icon()
user << "<span class='notice'>You remove the support lines.</span>"
return
@@ -104,8 +105,8 @@
var/obj/item/stack/O = W
if(O.use(1))
d_state = 0
icon_state = "r_wall"
relativewall_neighbours() //call smoothwall stuff
update_icon()
src.icon_state = "r_wall"
user << "<span class='notice'>You replace the outer grille.</span>"
else
user << "<span class='warning'>You don't have enough rods for that!</span>"
@@ -119,7 +120,7 @@
if(do_after(user, 60, target = src) && d_state == 2)
d_state = 3
icon_state = "r_wall-3"
update_icon()
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
else
@@ -132,7 +133,7 @@
if(do_after(user, 40, target = src) && d_state == 2)
d_state = 3
icon_state = "r_wall-3"
update_icon()
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
return
@@ -143,7 +144,7 @@
if(do_after(user, 100, target = src) && d_state == 3)
d_state = 4
icon_state = "r_wall-4"
update_icon()
user << "<span class='notice'>You pry off the cover.</span>"
return
@@ -154,7 +155,7 @@
if(do_after(user, 40, target = src) && d_state == 4)
d_state = 5
icon_state = "r_wall-5"
update_icon()
user << "<span class='notice'>You remove the bolts anchoring the support rods.</span>"
return
@@ -167,7 +168,7 @@
if(do_after(user, 100, target = src) && d_state == 5)
d_state = 6
icon_state = "r_wall-6"
update_icon()
new /obj/item/stack/rods(src)
user << "<span class='notice'>The support rods drop out as you cut them loose from the frame.</span>"
else
@@ -180,7 +181,7 @@
if(do_after(user, 70, target = src) && d_state == 5)
d_state = 6
icon_state = "r_wall-6"
update_icon()
new /obj/item/stack/rods( src )
user << "<span class='notice'>The support rods drop out as you cut them loose from the frame.</span>"
return
@@ -224,8 +225,8 @@
return
d_state = 0
icon_state = "r_wall"
relativewall_neighbours() //call smoothwall stuff
update_icon()
smooth_icon_neighbors(src)
user << "<span class='notice'>You repair the last of the damage.</span>"
@@ -281,4 +282,15 @@
/turf/simulated/wall/r_wall/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
if(prob(30))
dismantle_wall()
dismantle_wall()
/turf/simulated/wall/r_wall/update_icon()
. = ..()
if(d_state)
icon_state = "r_wall-[d_state]"
smooth = SMOOTH_FALSE
clear_smooth_overlays()
else
smooth = SMOOTH_TRUE
icon_state = ""
+23 -24
View File
@@ -32,41 +32,40 @@
set_light(0)
/turf/space/attackby(obj/item/C as obj, mob/user as mob, params)
if (istype(C, /obj/item/stack/rods))
..()
if(istype(C, /obj/item/stack/rods))
var/obj/item/stack/rods/R = C
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L)
if(R.amount < 2)
user << "\red You don't have enough rods to do that."
return
user << "\blue You begin to build a catwalk."
if(do_after(user,30, target = src))
if(R.use(1))
user << "<span class='notice'>You begin constructing catwalk...</span>"
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
user << "\blue You build a catwalk!"
R.use(2)
ChangeTurf(/turf/simulated/floor/plating/airless/catwalk)
qdel(L)
return
user << "\blue Constructing support lattice ..."
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
ReplaceWithLattice()
R.use(1)
ChangeTurf(/turf/simulated/floor/plating/airless/catwalk)
else
user << "<span class='warning'>You need two rods to build a catwalk!</span>"
return
if(R.use(1))
user << "<span class='notice'>Constructing support lattice...</span>"
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
ReplaceWithLattice()
else
user << "<span class='warning'>You need one rod to build a lattice.</span>"
return
if (istype(C, /obj/item/stack/tile/plasteel))
if(istype(C, /obj/item/stack/tile/plasteel))
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L)
var/obj/item/stack/tile/plasteel/S = C
qdel(L)
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
S.build(src)
S.use(1)
return
if(S.use(1))
qdel(L)
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
user << "<span class='notice'>You build a floor.</span>"
ChangeTurf(/turf/simulated/floor/plating)
else
user << "<span class='warning'>You need one floor tile to build a floor!</span>"
else
user << "\red The plating is going to need some support."
return
user << "<span class='warning'>The plating is going to need some support! Place metal rods first.</span>"
/turf/space/Entered(atom/movable/A as mob|obj)
..()
+19 -21
View File
@@ -3,7 +3,6 @@
level = 1
luminosity = 1
//for floors, use is_plating(), is_plasteel_floor() and is_light_floor()
var/intact = 1
//Properties for open tiles (/floor)
@@ -119,25 +118,6 @@
/turf/proc/adjacent_fire_act(turf/simulated/floor/source, temperature, volume)
return
/turf/proc/is_plating()
return 0
/turf/proc/is_asteroid_floor()
return 0
/turf/proc/is_plasteel_floor()
return 0
/turf/proc/is_light_floor()
return 0
/turf/proc/is_grass_floor()
return 0
/turf/proc/is_wood_floor()
return 0
/turf/proc/is_carpet_floor()
return 0
/turf/proc/is_catwalk()
return 0
/turf/proc/return_siding_icon_state() //used for grass floors, which have siding.
return 0
/turf/proc/levelupdate()
for(var/obj/O in src)
if(O.level == 1)
@@ -214,7 +194,7 @@
aco += S.air.carbon_dioxide
atox += S.air.toxins
atemp += S.air.temperature
turf_count ++
turf_count++
air.oxygen = (aoxy/max(turf_count,1))//Averages contents of the turfs, ignoring walls and the like
air.nitrogen = (anitro/max(turf_count,1))
air.carbon_dioxide = (aco/max(turf_count,1))
@@ -365,3 +345,21 @@
if(lighting_overlay)
return lighting_overlay.get_clamped_lum()
return 1
/turf/attackby(obj/item/C, mob/user, params)
if(can_lay_cable() && istype(C, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/coil = C
for(var/obj/structure/cable/LC in src)
if((LC.d1==0)||(LC.d2==0))
LC.attackby(C,user)
return
coil.place_turf(src, user)
return 1
return 0
/turf/proc/can_have_cabling()
return 1
/turf/proc/can_lay_cable()
return can_have_cabling() & !intact
+3
View File
@@ -4,6 +4,9 @@
oxygen = MOLES_O2STANDARD
nitrogen = MOLES_N2STANDARD
/turf/unsimulated/can_lay_cable()
return 0
/turf/unsimulated/floor/plating/snow
name = "snow"
icon = 'icons/turf/snow.dmi'
+1 -1
View File
@@ -13,4 +13,4 @@
/turf/unsimulated/floor/snow
name = "snow"
icon = 'icons/turf/snow.dmi'
icon_state = "snow"
icon_state = "snow"
+1 -1
View File
@@ -4,7 +4,7 @@ world/IsBanned(key,address,computer_id)
log_access("Failed Login (invalid data): [key] [address]-[computer_id]")
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, please try again. Error message: Your computer provided invalid or blank information to the server on connection (BYOND Username, IP, and Computer ID). Provided information for reference: Username: '[key]' IP: '[address]' Computer ID: '[computer_id]'. If you continue to get this error, please restart byond or contact byond support.")
if (computer_id == 2147483647) //this cid causes stickybans to go haywire
if (text2num(computer_id) == 2147483647) //this cid causes stickybans to go haywire
log_access("Failed Login (invalid cid): [key] [address]-[computer_id]")
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided an invalid Computer ID.")
var/admin = 0
+15 -16
View File
@@ -187,21 +187,21 @@ proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE)
//DEFINITIONS FOR ASSET DATUMS START HERE.
/datum/asset/simple/paper
assets = list(
"large_stamp-clown.png" = 'icons/paper_icons/large_stamp-clown.png',
"large_stamp-deny.png" = 'icons/paper_icons/large_stamp-deny.png',
"large_stamp-ok.png" = 'icons/paper_icons/large_stamp-ok.png',
"large_stamp-hop.png" = 'icons/paper_icons/large_stamp-hop.png',
"large_stamp-cmo.png" = 'icons/paper_icons/large_stamp-cmo.png',
"large_stamp-ce.png" = 'icons/paper_icons/large_stamp-ce.png',
"large_stamp-hos.png" = 'icons/paper_icons/large_stamp-hos.png',
"large_stamp-rd.png" = 'icons/paper_icons/large_stamp-rd.png',
"large_stamp-cap.png" = 'icons/paper_icons/large_stamp-cap.png',
"large_stamp-qm.png" = 'icons/paper_icons/large_stamp-qm.png',
"large_stamp-law.png" = 'icons/paper_icons/large_stamp-law.png',
"large_stamp-cent.png" = 'icons/paper_icons/large_stamp-cent.png',
"large_stamp-clown.png" = 'icons/paper_icons/large_stamp-clown.png',
"large_stamp-deny.png" = 'icons/paper_icons/large_stamp-deny.png',
"large_stamp-ok.png" = 'icons/paper_icons/large_stamp-ok.png',
"large_stamp-hop.png" = 'icons/paper_icons/large_stamp-hop.png',
"large_stamp-cmo.png" = 'icons/paper_icons/large_stamp-cmo.png',
"large_stamp-ce.png" = 'icons/paper_icons/large_stamp-ce.png',
"large_stamp-hos.png" = 'icons/paper_icons/large_stamp-hos.png',
"large_stamp-rd.png" = 'icons/paper_icons/large_stamp-rd.png',
"large_stamp-cap.png" = 'icons/paper_icons/large_stamp-cap.png',
"large_stamp-qm.png" = 'icons/paper_icons/large_stamp-qm.png',
"large_stamp-law.png" = 'icons/paper_icons/large_stamp-law.png',
"large_stamp-cent.png" = 'icons/paper_icons/large_stamp-cent.png',
"large_stamp-syndicate.png" = 'icons/paper_icons/large_stamp-syndicate.png',
"talisman.png" = 'icons/paper_icons/talisman.png',
"ntlogo.png" = 'icons/paper_icons/ntlogo.png'
"talisman.png" = 'icons/paper_icons/talisman.png',
"ntlogo.png" = 'icons/paper_icons/ntlogo.png'
)
/datum/asset/nanoui
@@ -209,8 +209,7 @@ proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE)
var/list/common_dirs = list(
"nano/assets/",
"nano/css/",
"nano/js/",
"nano/codemirror/",
"nano/images/",
"nano/layouts/"
)
+80
View File
@@ -97,6 +97,14 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
var/undershirt = "Nude" //undershirt type
var/socks = "Nude" //socks type
var/backbag = 2 //backpack type
var/ha_style = "None" //Head accessory style
var/r_headacc = 0 //Head accessory colour
var/g_headacc = 0 //Head accessory colour
var/b_headacc = 0 //Head accessory colour
var/m_style = "None" //Marking style
var/r_markings = 0 //Marking colour
var/g_markings = 0 //Marking colour
var/b_markings = 0 //Marking colour
var/h_style = "Bald" //Hair type
var/r_hair = 0 //Hair color
var/g_hair = 0 //Hair color
@@ -341,6 +349,18 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
dat += "[TextPreview(flavor_text)]...<br>"
dat += "<br>"
if((species in list("Unathi", "Vulpkanin", "Tajaran"))) //Species that have head accessories.
var/headaccessoryname = "Head Accessory"
if(species == "Unathi")
headaccessoryname = "Horns"
dat += "<br><b>[headaccessoryname]</b><br>"
dat += "<a href='?_src_=prefs;preference=headaccessory;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_headacc, 2)][num2hex(g_headacc, 2)][num2hex(b_headacc, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_headacc, 2)][num2hex(g_headacc, 2)][num2hex(b_headacc)]'><tr><td>__</td></tr></table></font> "
dat += "Style: <a href='?_src_=prefs;preference=ha_style;task=input'>[ha_style]</a><br>"
dat += "<br><b>Body Markings</b><br>"
dat += "<a href='?_src_=prefs;preference=markings;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_markings, 2)][num2hex(g_markings, 2)][num2hex(b_markings, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_markings, 2)][num2hex(g_markings, 2)][num2hex(b_markings)]'><tr><td>__</td></tr></table></font> "
dat += "<br>Style: <a href='?_src_=prefs;preference=m_style;task=input'>[m_style]</a><br>"
var/hairname = "Hair"
if(species == "Machine")
hairname = "Frame Color"
@@ -1112,6 +1132,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
s_tone = 0
ha_style = "None" // No Vulp ears on Unathi
m_style = "None" // No Unathi markings on Tajara
body_accessory = null //no vulpatail on humans damnit
if("speciesprefs")//oldvox code
speciesprefs = !speciesprefs
@@ -1172,6 +1195,52 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if(new_h_style)
h_style = new_h_style
if("headaccessory")
if((species in list("Unathi", "Vulpkanin", "Tajaran"))) // Species with head accessories
var/input = "Choose the colour of your your character's head accessory:"
var/new_head_accessory = input(user, input, "Character Preference", rgb(r_headacc, g_headacc, b_headacc)) as color|null
if(new_head_accessory)
r_headacc = hex2num(copytext(new_head_accessory, 2, 4))
g_headacc = hex2num(copytext(new_head_accessory, 4, 6))
b_headacc = hex2num(copytext(new_head_accessory, 6, 8))
if("ha_style")
if((species in list("Unathi", "Vulpkanin", "Tajaran"))) // Species with head accessories
var/list/valid_head_accessory_styles = list()
for(var/head_accessory_style in head_accessory_styles_list)
var/datum/sprite_accessory/H = head_accessory_styles_list[head_accessory_style]
if( !(species in H.species_allowed))
continue
valid_head_accessory_styles[head_accessory_style] = head_accessory_styles_list[head_accessory_style]
var/new_head_accessory_style = input(user, "Choose the style of your character's head accessory:", "Character Preference") as null|anything in valid_head_accessory_styles
if(new_head_accessory_style)
ha_style = new_head_accessory_style
if("markings")
if((species in list("Unathi", "Vulpkanin", "Tajaran"))) // Species with markings
var/input = "Choose the colour of your your character's body markings:"
var/new_markings = input(user, input, "Character Preference", rgb(r_markings, g_markings, b_markings)) as color|null
if(new_markings)
r_markings = hex2num(copytext(new_markings, 2, 4))
g_markings = hex2num(copytext(new_markings, 4, 6))
b_markings = hex2num(copytext(new_markings, 6, 8))
if("m_style")
if((species in list("Unathi", "Vulpkanin", "Tajaran"))) // Species with markings
var/list/valid_markings = list()
for(var/markingstyle in marking_styles_list)
var/datum/sprite_accessory/M = marking_styles_list[markingstyle]
if( !(species in M.species_allowed))
continue
valid_markings[markingstyle] = marking_styles_list[markingstyle]
var/new_marking_style = input(user, "Choose the style of your character's body markings:", "Character Preference") as null|anything in valid_markings
if(new_marking_style)
m_style = new_marking_style
if("body_accessory")
var/list/possible_body_accessories = list()
if(check_rights(R_ADMIN, 1, user))
@@ -1597,6 +1666,17 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
character.undershirt = undershirt
character.socks = socks
if(character.species.bodyflags & HAS_HEAD_ACCESSORY)
character.r_headacc = r_headacc
character.g_headacc = g_headacc
character.b_headacc = b_headacc
character.ha_style = ha_style
if(character.species.bodyflags & HAS_MARKINGS)
character.r_markings = r_markings
character.g_markings = g_markings
character.b_markings = b_markings
character.m_style = m_style
if(body_accessory)
character.body_accessory = body_accessory_by_name["[body_accessory]"]
+74 -36
View File
@@ -108,6 +108,16 @@
skin_red,
skin_green,
skin_blue,
markings_red,
markings_green,
markings_blue,
head_accessory_red,
head_accessory_green,
head_accessory_blue,
hair_style_name,
facial_style_name,
marking_style_name,
head_accessory_style_name,
hair_style_name,
facial_style_name,
eyes_red,
@@ -170,47 +180,55 @@
r_skin = text2num(query.item[15])
g_skin = text2num(query.item[16])
b_skin = text2num(query.item[17])
h_style = query.item[18]
f_style = query.item[19]
r_eyes = text2num(query.item[20])
g_eyes = text2num(query.item[21])
b_eyes = text2num(query.item[22])
underwear = query.item[23]
undershirt = query.item[24]
backbag = text2num(query.item[25])
b_type = query.item[26]
r_markings = text2num(query.item[18])
g_markings = text2num(query.item[19])
b_markings = text2num(query.item[20])
r_headacc = text2num(query.item[21])
g_headacc = text2num(query.item[22])
b_headacc = text2num(query.item[23])
h_style = query.item[24]
f_style = query.item[25]
m_style = query.item[26]
ha_style = query.item[27]
r_eyes = text2num(query.item[28])
g_eyes = text2num(query.item[29])
b_eyes = text2num(query.item[30])
underwear = query.item[31]
undershirt = query.item[32]
backbag = text2num(query.item[33])
b_type = query.item[34]
//Jobs
alternate_option = text2num(query.item[27])
job_support_high = text2num(query.item[28])
job_support_med = text2num(query.item[29])
job_support_low = text2num(query.item[30])
job_medsci_high = text2num(query.item[31])
job_medsci_med = text2num(query.item[32])
job_medsci_low = text2num(query.item[33])
job_engsec_high = text2num(query.item[34])
job_engsec_med = text2num(query.item[35])
job_engsec_low = text2num(query.item[36])
job_karma_high = text2num(query.item[37])
job_karma_med = text2num(query.item[38])
job_karma_low = text2num(query.item[39])
alternate_option = text2num(query.item[35])
job_support_high = text2num(query.item[36])
job_support_med = text2num(query.item[37])
job_support_low = text2num(query.item[38])
job_medsci_high = text2num(query.item[39])
job_medsci_med = text2num(query.item[40])
job_medsci_low = text2num(query.item[41])
job_engsec_high = text2num(query.item[42])
job_engsec_med = text2num(query.item[43])
job_engsec_low = text2num(query.item[44])
job_karma_high = text2num(query.item[45])
job_karma_med = text2num(query.item[46])
job_karma_low = text2num(query.item[47])
//Miscellaneous
flavor_text = query.item[40]
med_record = query.item[41]
sec_record = query.item[42]
gen_record = query.item[43]
disabilities = text2num(query.item[44])
player_alt_titles = params2list(query.item[45])
organ_data = params2list(query.item[46])
rlimb_data = params2list(query.item[47])
nanotrasen_relation = query.item[48]
speciesprefs = text2num(query.item[49])
flavor_text = query.item[48]
med_record = query.item[49]
sec_record = query.item[50]
gen_record = query.item[51]
disabilities = text2num(query.item[52])
player_alt_titles = params2list(query.item[53])
organ_data = params2list(query.item[54])
rlimb_data = params2list(query.item[55])
nanotrasen_relation = query.item[56]
speciesprefs = text2num(query.item[57])
//socks
socks = query.item[50]
body_accessory = query.item[51]
socks = query.item[58]
body_accessory = query.item[59]
//Sanitize
metadata = sanitize_text(metadata, initial(metadata))
@@ -233,8 +251,16 @@
r_skin = sanitize_integer(r_skin, 0, 255, initial(r_skin))
g_skin = sanitize_integer(g_skin, 0, 255, initial(g_skin))
b_skin = sanitize_integer(b_skin, 0, 255, initial(b_skin))
r_markings = sanitize_integer(r_markings, 0, 255, initial(r_markings))
g_markings = sanitize_integer(g_markings, 0, 255, initial(g_markings))
b_markings = sanitize_integer(b_markings, 0, 255, initial(b_markings))
r_headacc = sanitize_integer(r_headacc, 0, 255, initial(r_headacc))
g_headacc = sanitize_integer(g_headacc, 0, 255, initial(g_headacc))
b_headacc = sanitize_integer(b_headacc, 0, 255, initial(b_headacc))
h_style = sanitize_inlist(h_style, hair_styles_list, initial(h_style))
f_style = sanitize_inlist(f_style, facial_hair_styles_list, initial(f_style))
m_style = sanitize_inlist(m_style, marking_styles_list, initial(m_style))
ha_style = sanitize_inlist(ha_style, head_accessory_styles_list, initial(ha_style))
r_eyes = sanitize_integer(r_eyes, 0, 255, initial(r_eyes))
g_eyes = sanitize_integer(g_eyes, 0, 255, initial(g_eyes))
b_eyes = sanitize_integer(b_eyes, 0, 255, initial(b_eyes))
@@ -300,8 +326,16 @@
skin_red='[r_skin]',
skin_green='[g_skin]',
skin_blue='[b_skin]',
markings_red='[r_markings]',
markings_green='[g_markings]',
markings_blue='[b_markings]',
head_accessory_red='[r_headacc]',
head_accessory_green='[g_headacc]',
head_accessory_blue='[b_headacc]',
hair_style_name='[sql_sanitize_text(h_style)]',
facial_style_name='[sql_sanitize_text(f_style)]',
marking_style_name='[sql_sanitize_text(m_style)]',
head_accessory_style_name='[sql_sanitize_text(ha_style)]',
eyes_red='[r_eyes]',
eyes_green='[g_eyes]',
eyes_blue='[b_eyes]',
@@ -351,7 +385,9 @@
hair_red, hair_green, hair_blue,
facial_red, facial_green, facial_blue,
skin_tone, skin_red, skin_green, skin_blue,
hair_style_name, facial_style_name,
markings_red, markings_green, markings_blue,
head_accessory_red, head_accessory_green, head_accessory_blue,
hair_style_name, facial_style_name, marking_style_name, head_accessory_style_name,
eyes_red, eyes_green, eyes_blue,
underwear, undershirt,
backbag, b_type, alternate_option,
@@ -370,7 +406,9 @@
'[r_hair]', '[g_hair]', '[b_hair]',
'[r_facial]', '[g_facial]', '[b_facial]',
'[s_tone]', '[r_skin]', '[g_skin]', '[b_skin]',
'[sql_sanitize_text(h_style)]', '[sql_sanitize_text(f_style)]',
'[r_markings]', '[g_markings]', '[b_markings]',
'[r_headacc]', '[g_headacc]', '[b_headacc]',
'[sql_sanitize_text(h_style)]', '[sql_sanitize_text(f_style)]', '[sql_sanitize_text(m_style)]', '[sql_sanitize_text(ha_style)]',
'[r_eyes]', '[g_eyes]', '[b_eyes]',
'[underwear]', '[undershirt]',
'[backbag]', '[b_type]', '[alternate_option]',
+3 -3
View File
@@ -178,7 +178,7 @@
fish_count = 0
for(var/fish in fish_list)
if(fish)
fish_count ++
fish_count++
//Check if the water level can support the current number of fish
if((fish_count * 50) > water_level)
@@ -196,7 +196,7 @@
if(fish_count >=2 && egg_count < max_fish) //Need at least 2 fish to breed, but won't breed if there are as many eggs as max_fish
if(food_level > 2 && filth_level <=5) //Breeding is going to use extra food, and the filth_level shouldn't be too high
if(prob(((fish_count - 2) * 5)+10)) //Chances increase with each additional fish, 10% base + 5% per additional fish
egg_count ++ //A new set of eggs were laid, increase egg_count
egg_count++ //A new set of eggs were laid, increase egg_count
egg_list.Add(select_egg_type()) //Add the new egg to the egg_list for storage
food_level -= 2 //Remove extra food for the breeding process
@@ -305,7 +305,7 @@
//Check if we were passed a fish type
if(type)
fish_list.Add("[type]") //Add a fish of the specified type
fish_count ++ //Increase fish_count to reflect the introduction of a fish, so the everything else works fine
fish_count++ //Increase fish_count to reflect the introduction of a fish, so the everything else works fine
//Announce the new fish
src.visible_message("A new [type] has hatched in \the [src]!")
//Null type fish are dud eggs, give a message to inform the player
+6
View File
@@ -33,6 +33,7 @@
// Mechanical concerns.
var/health = 0 // Plant health.
var/lastproduce = 0 // Last time tray was harvested
var/current_cycle = 0 // Used for tracking number of cycles for aging
var/lastcycle = 0 // Cycle timing/tracking var.
var/cycledelay = 150 // Delay per cycle.
var/closed_system // If set, the tray will attempt to take atmos from a pipe.
@@ -350,6 +351,7 @@
seed = null
dead = 0
age = 0
lastproduce = 0
sampled = 0
mutation_mod = 0
@@ -369,6 +371,7 @@
sampled = 0
age = 0
lastproduce = 0
yield_mod = 0
mutation_mod = 0
@@ -389,6 +392,7 @@
health = seed.get_trait(TRAIT_ENDURANCE)
lastcycle = world.time
harvest = 0
lastproduce = 0
weedlevel = 0
pestlevel = 0
sampled = 0
@@ -544,6 +548,7 @@
age = 0
health = seed.get_trait(TRAIT_ENDURANCE)
lastcycle = world.time
lastproduce = 0
harvest = 0
weedlevel = 0
@@ -705,6 +710,7 @@
seed = S.seed //Grab the seed datum.
dead = 0
age = 1
lastproduce = 0
//Snowflakey, maybe move this to the seed datum
health = (istype(S, /obj/item/seeds/cutting) ? round(seed.get_trait(TRAIT_ENDURANCE)/rand(2,5)) : seed.get_trait(TRAIT_ENDURANCE))
lastcycle = world.time
@@ -35,7 +35,10 @@
return
// Advance plant age.
if(prob(30)) age += 1 * HYDRO_SPEED_MULTIPLIER
current_cycle++
if(current_cycle == 3)
age += 1 * HYDRO_SPEED_MULTIPLIER
current_cycle = 0
//Highly mutable plants have a chance of mutating every tick.
if(seed.get_trait(TRAIT_IMMUTABLE) == -1)
@@ -87,7 +87,7 @@
/mob/living/carbon/alien/humanoid/update_fire()
overlays -= overlays_standing[X_FIRE_LAYER]
if(on_fire)
overlays_standing[X_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -X_FIRE_LAYER)
overlays_standing[X_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning", "layer"= -X_FIRE_LAYER)
overlays += overlays_standing[X_FIRE_LAYER]
return
else
@@ -54,7 +54,7 @@
f_style = facial_hair_style
update_hair()
update_fhair()
return 1
/mob/living/carbon/human/proc/reset_hair()
@@ -74,6 +74,7 @@
f_style = "Shaved"
update_hair()
update_fhair()
/mob/living/carbon/human/proc/change_eye_color(var/red, var/green, var/blue)
if(red == r_eyes && green == g_eyes && blue == b_eyes)
@@ -106,7 +107,7 @@
g_facial = green
b_facial = blue
update_hair()
update_fhair()
return 1
/mob/living/carbon/human/proc/change_skin_color(var/red, var/green, var/blue)
@@ -91,6 +91,8 @@ var/global/list/body_accessory_by_species = list("None" = null)
icon = 'icons/mob/body_accessory.dmi'
animated_icon = 'icons/mob/body_accessory.dmi'
blend_mode = ICON_ADD
icon_state = "null"
animated_icon_state = "null"
/datum/body_accessory/tail/try_restrictions(var/mob/living/carbon/human/H)
if(!H.wear_suit || !(H.wear_suit.flags_inv & HIDETAIL) && !istype(H.wear_suit, /obj/item/clothing/suit/space))
@@ -125,4 +127,4 @@ var/global/list/body_accessory_by_species = list("None" = null)
icon_state = "vulptail5"
animated_icon_state = "vulptail5_a"
allowed_species = list("Vulpkanin")
allowed_species = list("Vulpkanin")
@@ -150,6 +150,7 @@
f_style = "Shaved"
if(h_style)
h_style = "Bald"
update_fhair(0)
update_hair(0)
mutations.Add(SKELETON)
@@ -166,6 +167,7 @@
f_style = "Shaved" //we only change the icon_state of the hair datum, so it doesn't mess up their UI/UE
if(h_style)
h_style = "Bald"
update_fhair(0)
update_hair(0)
mutations.Add(HUSK)
@@ -1,12 +1,25 @@
/mob/living/carbon/human
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPLOYAL_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,NATIONS_HUD)
//Marking colour and style
var/r_markings = 0
var/g_markings = 0
var/b_markings = 0
var/m_style = "None"
//Hair colour and style
var/r_hair = 0
var/g_hair = 0
var/b_hair = 0
var/h_style = "Bald"
//Head accessory colour and style
var/r_headacc = 0
var/g_headacc = 0
var/b_headacc = 0
var/ha_style = "None"
//Facial hair colour and style
var/r_facial = 0
var/g_facial = 0
@@ -143,6 +143,7 @@
head = null
if(I.flags & BLOCKHAIR || I.flags & BLOCKHEADHAIR)
update_hair() //rebuild hair
update_fhair()
update_inv_head()
else if(I == r_ear)
r_ear = null
@@ -160,6 +161,7 @@
wear_mask = null
if(I.flags & BLOCKHAIR || I.flags & BLOCKHEADHAIR)
update_hair() //rebuild hair
update_fhair()
if(internal)
if(internals)
internals.icon_state = "internal0"
+3 -2
View File
@@ -150,8 +150,9 @@
/mob/living/carbon/human/handle_message_mode(var/message_mode, var/message, var/verb, var/speaking, var/used_radios, var/alt_name)
switch(message_mode)
if("intercom")
for(var/obj/item/device/radio/intercom/I in view(1, null))
I.talk_into(src, message, verb, speaking)
for(var/obj/item/device/radio/intercom/I in view(1, src))
spawn(0)
I.talk_into(src, message, null, verb, speaking)
used_radios += I
if("headset")
@@ -24,8 +24,6 @@
return message
/datum/species/plasmaman/equip(var/mob/living/carbon/human/H)
H.fire_sprite = "Plasmaman"
// Unequip existing suits and hats.
H.unEquip(H.wear_suit)
H.unEquip(H.head)
@@ -40,7 +40,7 @@
flags = HAS_LIPS
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_CLAWS | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING
bodyflags = FEET_CLAWS | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING
dietflags = DIET_CARN
cold_level_1 = 280 //Default 260 - Lower is better
@@ -95,7 +95,7 @@
flags = HAS_LIPS | CAN_BE_FAT
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_PADDED | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING
bodyflags = FEET_PADDED | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING
dietflags = DIET_OMNI
reagent_tag = PROCESS_ORG
flesh_color = "#AFA59E"
@@ -130,7 +130,7 @@
flags = HAS_LIPS
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_PADDED | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING
bodyflags = FEET_PADDED | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING
dietflags = DIET_OMNI
reagent_tag = PROCESS_ORG
flesh_color = "#966464"
@@ -106,30 +106,33 @@ Please contact me on #coderbus IRC. ~Carn x
//Human Overlays Indexes/////////
#define MUTANTRACE_LAYER 1
#define MUTATIONS_LAYER 2
#define DAMAGE_LAYER 3
#define UNIFORM_LAYER 4
#define ID_LAYER 5
#define SHOES_LAYER 6
#define GLOVES_LAYER 7
#define EARS_LAYER 8
#define SUIT_LAYER 9
#define GLASSES_LAYER 10
#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt?
#define TAIL_LAYER 12 //bs12 specific. this hack is probably gonna come back to haunt me
#define SUIT_STORE_LAYER 13
#define BACK_LAYER 14
#define HAIR_LAYER 15 //TODO: make part of head layer?
#define FACEMASK_LAYER 16
#define HEAD_LAYER 17
#define COLLAR_LAYER 18
#define HANDCUFF_LAYER 19
#define LEGCUFF_LAYER 20
#define L_HAND_LAYER 21
#define R_HAND_LAYER 22
#define TARGETED_LAYER 23 //BS12: Layer for the target overlay from weapon targeting system
#define FIRE_LAYER 24 //If you're on fire
#define TOTAL_LAYERS 24
#define MARKINGS_LAYER 2
#define MUTATIONS_LAYER 3
#define DAMAGE_LAYER 4
#define UNIFORM_LAYER 5
#define ID_LAYER 6
#define SHOES_LAYER 7
#define GLOVES_LAYER 8
#define EARS_LAYER 9
#define SUIT_LAYER 10
#define GLASSES_LAYER 11
#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt?
#define TAIL_LAYER 13 //bs12 specific. this hack is probably gonna come back to haunt me
#define SUIT_STORE_LAYER 14
#define BACK_LAYER 15
#define HAIR_LAYER 16 //TODO: make part of head layer?
#define HEAD_ACCESSORY_LAYER 17
#define FHAIR_LAYER 18
#define FACEMASK_LAYER 19
#define HEAD_LAYER 20
#define COLLAR_LAYER 21
#define HANDCUFF_LAYER 22
#define LEGCUFF_LAYER 23
#define L_HAND_LAYER 24
#define R_HAND_LAYER 25
#define TARGETED_LAYER 26 //BS12: Layer for the target overlay from weapon targeting system
#define FIRE_LAYER 27 //If you're on fire
#define TOTAL_LAYERS 27
@@ -350,6 +353,75 @@ var/global/list/damage_icon_parts = list()
//tail
update_tail_layer(0)
//head accessory
update_head_accessory(0)
//markings
update_markings(0)
//hair
update_hair(0)
update_fhair(0)
//MARKINGS OVERLAY
/mob/living/carbon/human/proc/update_markings(var/update_icons=1)
//Reset our markings
overlays_standing[MARKINGS_LAYER] = null
var/obj/item/organ/external/chest/chest_organ = get_organ("chest")
if(!chest_organ || chest_organ.is_stump() || (chest_organ.status & ORGAN_DESTROYED) )
if(update_icons) update_icons()
return
//base icons
var/icon/markings_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s")
if(m_style && (src.species.bodyflags & HAS_MARKINGS))
var/datum/sprite_accessory/marking_style = marking_styles_list[m_style]
if(marking_style && marking_style.species_allowed)
if(src.species.name in marking_style.species_allowed)
var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s")
if(marking_style.do_colouration)
markings_s.Blend(rgb(r_markings, g_markings, b_markings), ICON_ADD)
markings_standing.Blend(markings_s, ICON_OVERLAY)
else
//warning("Invalid m_style for [species.name]: [m_style]")
overlays_standing[MARKINGS_LAYER] = image(markings_standing)
if(update_icons) update_icons()
//HEAD ACCESSORY OVERLAY
/mob/living/carbon/human/proc/update_head_accessory(var/update_icons=1)
//Reset our head accessory
overlays_standing[HEAD_ACCESSORY_LAYER] = null
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) )
if(update_icons) update_icons()
return
//masks and helmets can obscure our head accessory
if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)))
if(update_icons) update_icons()
return
//base icons
var/icon/head_accessory_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s")
if(ha_style && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic()) && (src.species.bodyflags & HAS_HEAD_ACCESSORY)))
var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[ha_style]
if(head_accessory_style && head_accessory_style.species_allowed)
if(src.species.name in head_accessory_style.species_allowed)
var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s")
if(head_accessory_style.do_colouration)
head_accessory_s.Blend(rgb(r_headacc, g_headacc, b_headacc), ICON_ADD)
head_accessory_standing.Blend(head_accessory_s, ICON_OVERLAY)
else
//warning("Invalid ha_style for [species.name]: [ha_style]")
overlays_standing[HEAD_ACCESSORY_LAYER] = image(head_accessory_standing)
if(update_icons) update_icons()
//HAIR OVERLAY
@@ -367,6 +439,41 @@ var/global/list/damage_icon_parts = list()
if(update_icons) update_icons()
return
//base icons
var/icon/hair_standing = new /icon('icons/mob/human_face.dmi',"bald_s")
if(h_style && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic())))
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
if(hair_style && hair_style.species_allowed)
if(src.species.name in hair_style.species_allowed)
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
if(hair_style.do_colouration)
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
hair_standing.Blend(hair_s, ICON_OVERLAY)
else
//warning("Invalid h_style for [species.name]: [h_style]")
overlays_standing[HAIR_LAYER] = image(hair_standing)
if(update_icons) update_icons()
//FACIAL HAIR OVERLAY
/mob/living/carbon/human/proc/update_fhair(var/update_icons=1)
//Reset our facial hair
overlays_standing[FHAIR_LAYER] = null
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) )
if(update_icons) update_icons()
return
//masks and helmets can obscure our facial hair, unless we're a synthetic
if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)))
if(update_icons) update_icons()
return
//base icons
var/icon/face_standing = new /icon('icons/mob/human_face.dmi',"bald_s")
@@ -381,19 +488,7 @@ var/global/list/damage_icon_parts = list()
else
//warning("Invalid f_style for [species.name]: [f_style]")
if(h_style && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic())))
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
if(hair_style && hair_style.species_allowed)
if(src.species.name in hair_style.species_allowed)
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
if(hair_style.do_colouration)
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
face_standing.Blend(hair_s, ICON_OVERLAY)
else
//warning("Invalid h_style for [species.name]: [h_style]")
overlays_standing[HAIR_LAYER] = image(face_standing)
overlays_standing[FHAIR_LAYER] = image(face_standing)
if(update_icons) update_icons()
@@ -457,6 +552,7 @@ var/global/list/damage_icon_parts = list()
skeleton = null
update_hair(0)
update_fhair(0)
if(update_icons) update_icons()
//Call when target overlay should be added/removed
@@ -485,6 +581,8 @@ var/global/list/damage_icon_parts = list()
update_mutations(0)
update_body(0)
update_hair(0)
update_head_accessory(0)
update_fhair(0)
update_mutantrace(0)
update_inv_w_uniform(0,0)
update_inv_wear_id(0)
@@ -1016,6 +1114,7 @@ var/global/list/damage_icon_parts = list()
//Human Overlays Indexes/////////
#undef MUTANTRACE_LAYER
#undef MARKINGS_LAYER
#undef MUTATIONS_LAYER
#undef DAMAGE_LAYER
#undef UNIFORM_LAYER
@@ -1032,6 +1131,8 @@ var/global/list/damage_icon_parts = list()
#undef BACK_LAYER
#undef HAIR_LAYER
#undef HEAD_LAYER
#undef HEAD_ACCESSORY_LAYER
#undef FHAIR_LAYER
#undef COLLAR_LAYER
#undef HANDCUFF_LAYER
#undef LEGCUFF_LAYER
+1
View File
@@ -97,6 +97,7 @@
// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching.
// Stop! ... Hammertime! ~Carn
// I touched them without asking... I'm soooo edgy ~Erro (added nodamage checks)
// no ~Tigerkitty
/mob/living/proc/getBruteLoss()
return bruteloss
@@ -305,9 +305,9 @@
return
/mob/living/silicon/robot/update_fire()
overlays -= image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing")
overlays -= image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning")
if(on_fire)
overlays += image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing")
overlays += image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning")
/mob/living/silicon/robot/fire_act()
if(!on_fire) //Silicons don't gain stacks from hotspots, but hotspots can ignite them
+2 -1
View File
@@ -112,7 +112,7 @@
if(self_message && M==src)
msg = self_message
M.show_message(msg, 2, deaf_message, 1)
// based on say code
var/omsg = replacetext(message, "<B>[src]</B> ", "")
var/list/listening_obj = new
@@ -177,6 +177,7 @@
if(ishuman(src) && W == src:head)
src:update_hair()
src:update_fhair()
/mob/proc/put_in_any_hand_if_possible(obj/item/W as obj, del_on_fail = 0, disable_warning = 1, redraw_mob = 1)
if(equip_to_slot_if_possible(W, slot_l_hand, del_on_fail, disable_warning, redraw_mob))
@@ -248,36 +248,53 @@ datum/preferences
else
preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
//Body Markings
if(current_species && (current_species.bodyflags & HAS_MARKINGS))
var/datum/sprite_accessory/marking_style = marking_styles_list[m_style]
if(marking_style && marking_style.species_allowed)
var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s")
markings_s.Blend(rgb(r_markings, g_markings, b_markings), ICON_ADD)
preview_icon.Blend(markings_s, ICON_OVERLAY)
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = current_species ? current_species.eyes : "eyes_s")
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
if(hair_style)
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
eyes_s.Blend(hair_s, ICON_OVERLAY)
//Head Accessory
if(current_species && (current_species.bodyflags & HAS_HEAD_ACCESSORY))
var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[ha_style]
if(head_accessory_style && head_accessory_style.species_allowed)
var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s")
head_accessory_s.Blend(rgb(r_headacc, g_headacc, b_headacc), ICON_ADD)
eyes_s.Blend(head_accessory_s, ICON_OVERLAY)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
if(facial_hair_style)
if(facial_hair_style && facial_hair_style.species_allowed)
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
eyes_s.Blend(facial_s, ICON_OVERLAY)
var/icon/underwear_s = null
if(underwear && current_species.clothing_flags & HAS_UNDERWEAR)
if(underwear && (current_species.clothing_flags & HAS_UNDERWEAR))
var/datum/sprite_accessory/underwear/U = underwear_list[underwear]
if(U)
underwear_s = new/icon(U.icon, "uw_[U.icon_state]_s", ICON_OVERLAY)
var/icon/undershirt_s = null
if(undershirt && current_species.clothing_flags & HAS_UNDERSHIRT)
if(undershirt && (current_species.clothing_flags & HAS_UNDERSHIRT))
var/datum/sprite_accessory/undershirt/U2 = undershirt_list[undershirt]
if(U2)
undershirt_s = new/icon(U2.icon, "us_[U2.icon_state]_s", ICON_OVERLAY)
var/icon/socks_s = null
if(socks && current_species.clothing_flags & HAS_SOCKS)
if(socks && (current_species.clothing_flags & HAS_SOCKS))
var/datum/sprite_accessory/socks/U3 = socks_list[socks]
if(U3)
socks_s = new/icon(U3.icon, "sk_[U3.icon_state]_s", ICON_OVERLAY)
@@ -804,8 +821,6 @@ datum/preferences
else if(backbag == 3 || backbag == 4)
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
if(!(current_species.bodyflags & NO_EYES))
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(underwear_s)
preview_icon.Blend(underwear_s, ICON_OVERLAY)
if(undershirt_s)
@@ -814,6 +829,8 @@ datum/preferences
preview_icon.Blend(socks_s, ICON_OVERLAY)
if(clothes_s)
preview_icon.Blend(clothes_s, ICON_OVERLAY)
if(!(current_species.bodyflags & NO_EYES))
preview_icon.Blend(eyes_s, ICON_OVERLAY)
preview_icon_front = new(preview_icon, dir = SOUTH)
preview_icon_side = new(preview_icon, dir = WEST)
+178 -31
View File
@@ -584,25 +584,6 @@
*/
/datum/sprite_accessory/hair
una_spines_long
name = "Long Unathi Spines"
icon_state = "soghun_longspines"
species_allowed = list("Unathi")
una_spines_short
name = "Short Unathi Spines"
icon_state = "soghun_shortspines"
species_allowed = list("Unathi")
una_frills_long
name = "Long Unathi Frills"
icon_state = "soghun_longfrills"
species_allowed = list("Unathi")
una_frills_short
name = "Short Unathi Frills"
icon_state = "soghun_shortfrills"
species_allowed = list("Unathi")
una_horns
name = "Unathi Horns"
@@ -645,11 +626,6 @@
species_allowed = list("Skrell")
gender = FEMALE
taj_ears
name = "Tajaran Ears"
icon_state = "ears_plain"
species_allowed = list("Tajaran")
taj_ears_clean
name = "Tajara Clean"
icon_state = "hair_clean"
@@ -892,6 +868,8 @@
/datum/sprite_accessory/facial_hair
//Tajara
taj_sideburns
name = "Tajara Sideburns"
icon_state = "facial_sideburns"
@@ -922,6 +900,8 @@
icon_state = "facial_smallstache"
species_allowed = list("Tajaran")
//Vox
vox_colonel
name = "Vox Colonel Beard"
icon_state = "vox_colonel"
@@ -957,12 +937,6 @@
species_allowed = list("Vulpkanin")
gender = NEUTER
vulp_earfluff
name = "Earfluff"
icon_state = "vulp_facial_earfluff"
species_allowed = list("Vulpkanin")
gender = NEUTER
vulp_mask
name = "Mask"
icon_state = "vulp_facial_mask"
@@ -993,6 +967,51 @@
species_allowed = list("Vulpkanin")
gender = NEUTER
//Unathi
una_spines_long
name = "Long Spines"
icon_state = "soghun_longspines"
species_allowed = list("Unathi")
gender = NEUTER
una_spines_short
name = "Short Spines"
icon_state = "soghun_shortspines"
species_allowed = list("Unathi")
gender = NEUTER
una_frills_long
name = "Long Frills"
icon_state = "soghun_longfrills"
species_allowed = list("Unathi")
gender = NEUTER
una_frills_short
name = "Short Frills"
icon_state = "soghun_shortfrills"
species_allowed = list("Unathi")
gender = NEUTER
una_frills_webbed_long
name = "Long Webbed Frills"
icon_state = "soghun_longfrills_webbed"
species_allowed = list("Unathi")
gender = NEUTER
una_frills_webbed_short
name = "Short Webbed Frills"
icon_state = "soghun_shortfrills_webbed"
species_allowed = list("Unathi")
gender = NEUTER
una_frills_webbed_aquatic
name = "Aquatic Frills"
icon_state = "soghun_aquaticfrills_webbed"
species_allowed = list("Unathi")
gender = NEUTER
//skin styles - WIP
//going to have to re-integrate this with surgery
//let the icon_state hold an icon preview for now
@@ -1518,4 +1537,132 @@
name = "Vox Fishnets"
icon_state = "vox_fishnet"
gender = NEUTER
species_allowed = list("Vox")
species_allowed = list("Vox")
/* HEAD ACCESSORY */
/datum/sprite_accessory/head_accessory
icon = 'icons/mob/body_accessory.dmi'
species_allowed = list("Unathi", "Vulpkanin", "Tajaran")
icon_state = "accessory_none"
/datum/sprite_accessory/head_accessory/none
name = "None"
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington","Vox")
icon_state = "accessory_none"
/datum/sprite_accessory/head_accessory/simple
name = "Simple"
species_allowed = list("Unathi")
icon_state = "horns_simple"
/datum/sprite_accessory/head_accessory/short
name = "Short"
species_allowed = list("Unathi")
icon_state = "horns_short"
/datum/sprite_accessory/head_accessory/curled
name = "Curled"
species_allowed = list("Unathi")
icon_state = "horns_curled"
/datum/sprite_accessory/head_accessory/ram
name = "Ram"
species_allowed = list("Unathi")
icon_state = "horns_ram"
/datum/sprite_accessory/head_accessory/vulp_earfluff
icon = 'icons/mob/human_face.dmi'
name = "Vulpkanin Earfluff"
icon_state = "vulp_facial_earfluff"
species_allowed = list("Vulpkanin")
/datum/sprite_accessory/head_accessory/vulp_blaze
icon = 'icons/mob/human_face.dmi'
name = "Blaze"
icon_state = "vulp_facial_blaze"
species_allowed = list("Vulpkanin")
/datum/sprite_accessory/head_accessory/vulp_vulpine
icon = 'icons/mob/human_face.dmi'
name = "Vulpine"
icon_state = "vulp_facial_vulpine"
species_allowed = list("Vulpkanin")
/datum/sprite_accessory/head_accessory/vulp_mask
icon = 'icons/mob/human_face.dmi'
name = "Mask"
icon_state = "vulp_facial_mask"
species_allowed = list("Vulpkanin")
/datum/sprite_accessory/head_accessory/vulp_patch
icon = 'icons/mob/human_face.dmi'
name = "Patch"
icon_state = "vulp_facial_patch"
species_allowed = list("Vulpkanin")
/datum/sprite_accessory/head_accessory/vulp_ruff
icon = 'icons/mob/human_face.dmi'
name = "Ruff"
icon_state = "vulp_facial_ruff"
species_allowed = list("Vulpkanin")
/datum/sprite_accessory/head_accessory/vulp_kita
icon = 'icons/mob/human_face.dmi'
name = "Kita"
icon_state = "vulp_facial_kita"
species_allowed = list("Vulpkanin")
/datum/sprite_accessory/head_accessory/vulp_swift
icon = 'icons/mob/human_face.dmi'
name = "Swift"
icon_state = "vulp_facial_swift"
species_allowed = list("Vulpkanin")
/datum/sprite_accessory/head_accessory/taj_ears
icon = 'icons/mob/human_face.dmi'
name = "Tajaran Ears"
icon_state = "ears_plain"
species_allowed = list("Tajaran")
/* BODY MARKINGS */
/datum/sprite_accessory/body_markings
icon = 'icons/mob/body_accessory.dmi'
species_allowed = list("Unathi", "Tajaran", "Vulpkanin")
icon_state = "accessory_none"
/datum/sprite_accessory/body_markings/none
name = "None"
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington","Vox")
icon_state = "accessory_none"
/datum/sprite_accessory/body_markings/stripe
name = "Stripe"
species_allowed = list("Unathi")
icon_state = "markings_stripe"
/datum/sprite_accessory/body_markings/tiger
name = "Tiger Body"
species_allowed = list("Unathi", "Tajaran", "Vulpkanin")
icon_state = "markings_tiger"
/datum/sprite_accessory/body_markings/tigerhead
name = "Tiger Body + Head"
species_allowed = list("Unathi", "Tajaran", "Vulpkanin")
icon_state = "markings_tigerhead"
/datum/sprite_accessory/body_markings/tigerheadface_taj
name = "Tajaran Tiger Body + Head + Face"
species_allowed = list("Tajaran")
icon_state = "markings_tigerheadface_taj"
/datum/sprite_accessory/body_markings/tigerheadface_vulp
name = "Vulpkanin Tiger Body + Head + Face"
species_allowed = list("Vulpkanin")
icon_state = "markings_tigerheadface_vulp"
/datum/sprite_accessory/body_markings/tigerheadface_una
name = "Unathi Tiger Body + Head + Face"
species_allowed = list("Unathi")
icon_state = "markings_tigerheadface_una"
+6 -7
View File
@@ -106,14 +106,13 @@ nanoui is used to open and update nano browser uis
*/
/datum/nanoui/proc/add_common_assets()
add_script("libraries.min.js") // A JS file comprising of jQuery, doT.js and jQuery Timer libraries (compressed together)
add_script("nano.js") // A JS file of the NanoUI JavaScript concatenated into one file.
add_stylesheet("shared.css") // this CSS sheet is common to all UIs
add_stylesheet("icons.css") // this CSS sheet is common to all UIs
add_script("nano.js") // A JS file of the NanoUI JavaScript compressed into one file.
add_stylesheet("nanoui.css") // Concatenated CSS sheet common to all UIs, contains all of the standard NanoUI styling.
//codemirror
add_script("codemirror-compressed.js") // A custom compressed JS file of codemirror, with CSS highlighting
add_stylesheet("codemirror.css") // this CSS sheet is common to all UIs, so all UIs can use codemirror
add_stylesheet("cm_lesser-dark.css") //CSS styling for codemirror, dark theme
// CodeMirror
add_script("codemirror-compressed.js") // A custom minified JavaScript file of CodeMirror, with the following plugins: CSS Mode, NTSL Mode, CSS-hint addon, Search addon, Sublime Keymap.
add_stylesheet("codemirror.css") // A CSS sheet containing the basic stylings and formatting information for CodeMirror.
add_stylesheet("cm_lesser-dark.css") // A theme for CodeMirror to use, which closely resembles the rest of the NanoUI style.
/**
* Set the current status (also known as visibility) of this ui.
+1
View File
@@ -147,6 +147,7 @@
owner.unEquip(owner.wear_mask)
spawn(1)
owner.update_hair()
owner.update_fhair()
..()
/obj/item/organ/external/head/take_damage(brute, burn, sharp, edge, used_weapon = null, list/forbidden_limbs = list())
+22 -59
View File
@@ -634,81 +634,43 @@ obj/structure/cable/proc/cableColor(var/colorC)
// Cable laying procedures
//////////////////////////////////////////////
/obj/item/stack/cable_coil/proc/get_new_cable(location)
var/obj/structure/cable/C = new(location)
C.cableColor(color)
return C
// called when cable_coil is clicked on a turf/simulated/floor
/obj/item/stack/cable_coil/proc/turf_place(turf/simulated/floor/F, mob/user)
/obj/item/stack/cable_coil/proc/place_turf(turf/T, mob/user)
if(!isturf(user.loc))
return
if(!T.can_have_cabling())
user << "<span class='warning'>You can only lay cables on catwalks and plating!</span>"
return
if(get_amount() < 1) // Out of cable
user << "There is no cable left."
user << "<span class='warning'>There is no cable left!</span>"
return
if(get_dist(F,user) > 1) // Too far
user << "You can't lay cable at a place that far away."
return
if(F.intact) // Ff floor is intact, complain
user << "You can't lay cable there unless the floor tiles are removed."
if(get_dist(T,user) > 1) // Too far
user << "<span class='warning'>You can't lay cable at a place that far away!</span>"
return
else
var/dirn
if(user.loc == F)
if(user.loc == T)
dirn = user.dir // if laying on the tile we're on, lay in the direction we're facing
else
dirn = get_dir(F, user)
dirn = get_dir(T, user)
for(var/obj/structure/cable/LC in F)
if((LC.d1 == dirn && LC.d2 == 0 ) || ( LC.d2 == dirn && LC.d1 == 0))
user << "<span class='warning'>There's already a cable at that position.</span>"
return
///// Z-Level Stuff
// check if the target is open space
/* if(istype(F, /turf/simulated/floor/open))
for(var/obj/structure/cable/LC in F)
if((LC.d1 == dirn && LC.d2 == 11 ) || ( LC.d2 == dirn && LC.d1 == 11))
user << "<span class='warning'>There's already a cable at that position.</span>"
return
var/turf/simulated/floor/open/temp = F
var/obj/structure/cable/C = new(F)
var/obj/structure/cable/D = new(temp.floorbelow)
C.cableColor(color)
C.d1 = 11
C.d2 = dirn
C.add_fingerprint(user)
C.updateicon()
var/datum/powernet/PN = new()
PN.add_cable(C)
C.mergeConnectedNetworks(C.d2)
C.mergeConnectedNetworksOnTurf()
D.cableColor(color)
D.d1 = 12
D.d2 = 0
D.add_fingerprint(user)
D.updateicon()
PN.add_cable(D)
D.mergeConnectedNetworksOnTurf()
// do the normal stuff
else */
///// Z-Level Stuff
for(var/obj/structure/cable/LC in F)
if((LC.d1 == dirn && LC.d2 == 0 ) || ( LC.d2 == dirn && LC.d1 == 0))
user << "There's already a cable at that position."
for(var/obj/structure/cable/LC in T)
if(LC.d2 == dirn && LC.d1 == 0)
user << "<span class='warning'>There's already a cable at that position!</span>"
return
var/obj/structure/cable/C = new(F)
C.cableColor(color)
var/obj/structure/cable/C = get_new_cable(T)
//set up the new cable
C.d1 = 0 //it's a O-X node cable
@@ -728,6 +690,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
use(1)
if (C.shock(user, 50))
if (prob(50)) //fail
new/obj/item/stack/cable_coil(C.loc, 1, C.color)
@@ -751,7 +714,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
if(U == T) //if clicked on the turf we're standing on, try to put a cable in the direction we're facing
turf_place(T,user)
place_turf(T,user)
return
var/dirn = get_dir(C, user)
+1 -1
View File
@@ -132,7 +132,7 @@
if(get_dist(src, user) > 1)
return
coil.turf_place(T, user)
coil.place_turf(T, user)
return
else
..()
+1 -1
View File
@@ -186,7 +186,7 @@
src.last_shot = world.time
if(src.shot_number < 3)
src.fire_delay = 2
src.shot_number ++
src.shot_number++
else
src.fire_delay = rand(minimum_fire_delay,maximum_fire_delay)
src.shot_number = 0
+4 -1
View File
@@ -27,7 +27,7 @@ datum/reagent/carpet
color = "#701345"
/datum/reagent/carpet/reaction_turf(var/turf/simulated/T, var/volume)
if(T.is_plating() || T.is_plasteel_floor())
if(istype(T, /turf/simulated/floor/plating) || istype(T, /turf/simulated/floor/plasteel))
var/turf/simulated/floor/F = T
F.ChangeTurf(/turf/simulated/floor/carpet)
..()
@@ -204,6 +204,7 @@ datum/reagent/hair_dye/reaction_mob(var/mob/living/M, var/volume)
H.g_hair = rand(0,255)
H.b_hair = rand(0,255)
H.update_hair()
H.update_fhair()
..()
return
@@ -229,6 +230,7 @@ datum/reagent/hairgrownium/reaction_mob(var/mob/living/M, var/volume)
H.h_style = random_hair_style(H.gender, H.species)
H.f_style = random_facial_hair_style(H.gender, H.species)
H.update_hair()
H.update_fhair()
..()
return
@@ -256,6 +258,7 @@ datum/reagent/super_hairgrownium/on_mob_life(var/mob/living/M as mob)
H.h_style = "Very Long Hair"
H.f_style = "Very Long Beard"
H.update_hair()
H.update_fhair()
if(!H.wear_mask || H.wear_mask && !istype(H.wear_mask, /obj/item/clothing/mask/fakemoustache))
if(H.wear_mask)
H.unEquip(H.wear_mask)
@@ -358,3 +358,33 @@ datum/design/AAC
build_type = IMPRINTER
materials = list(MAT_GLASS = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/atmos_automation
//Shield Generators//
/datum/design/shield_gen_ex
name = "Circuit Design (Experimental hull shield generator)"
desc = "Allows for the construction of circuit boards used to build an experimental hull shield generator."
id = "shield_gen_ex"
req_tech = list("bluespace" = 4, "plasmatech" = 3)
build_type = IMPRINTER
materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_DIAMOND = 10000, MAT_GOLD = 10000)
build_path = /obj/item/weapon/circuitboard/shield_gen_ex
/datum/design/shield_gen
name = "Circuit Design (Experimental shield generator)"
desc = "Allows for the construction of circuit boards used to build an experimental shield generator."
id = "shield_gen"
req_tech = list("bluespace" = 4, "plasmatech" = 3)
build_type = IMPRINTER
materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_DIAMOND = 10000, MAT_GOLD = 10000)
build_path = /obj/item/weapon/circuitboard/shield_gen
/datum/design/shield_cap
name = "Circuit Design (Experimental shield capacitor)"
desc = "Allows for the construction of circuit boards used to build an experimental shielding capacitor."
id = "shield_cap"
req_tech = list("magnets" = 3, "powerstorage" = 4)
build_type = IMPRINTER
materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_DIAMOND = 10000, MAT_GOLD = 10000)
build_path = /obj/item/weapon/circuitboard/shield_cap
@@ -16,15 +16,6 @@
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/stack/cable_coil" = 5)
datum/design/shield_gen_ex
name = "Circuit Design (Experimental hull shield generator)"
desc = "Allows for the construction of circuit boards used to build an experimental hull shield generator."
id = "shield_gen"
req_tech = list("bluespace" = 4, "plasmatech" = 3)
build_type = IMPRINTER
materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_PLASMA = 10000, MAT_DIAMOND = 5000, MAT_GOLD = 10000)
build_path = "/obj/machinery/shield_gen/external"
////////////////////////////////////////
// Shield Generator
@@ -42,15 +33,6 @@ datum/design/shield_gen_ex
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/stack/cable_coil" = 5)
datum/design/shield_gen
name = "Circuit Design (Experimental shield generator)"
desc = "Allows for the construction of circuit boards used to build an experimental shield generator."
id = "shield_gen"
req_tech = list("bluespace" = 4, "plasmatech" = 3)
build_type = IMPRINTER
materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_PLASMA = 10000, MAT_DIAMOND = 5000, MAT_GOLD = 10000)
build_path = "/obj/machinery/shield_gen/external"
////////////////////////////////////////
// Shield Capacitor
@@ -67,12 +49,3 @@ datum/design/shield_gen
"/obj/item/weapon/stock_parts/subspace/analyzer" = 1,
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/stack/cable_coil" = 5)
datum/design/shield_cap
name = "Circuit Design (Experimental shield capacitor)"
desc = "Allows for the construction of circuit boards used to build an experimental shielding capacitor."
id = "shield_cap"
req_tech = list("magnets" = 3, "powerstorage" = 4)
build_type = IMPRINTER
materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_PLASMA = 10000, MAT_DIAMOND = 5000, MAT_SILVER = 10000)
build_path = "/obj/machinery/shield_gen/external"
+4
View File
@@ -301,6 +301,10 @@
//rotate our direction
dir = angle2dir(rotation+dir2angle(dir))
//resmooth if need be.
if(smooth)
smooth_icon(src)
//rotate the pixel offsets too.
if (pixel_x || pixel_y)
if (rotation < 0)
+2 -2
View File
@@ -593,7 +593,7 @@
if(H.species.name == "Human" && !(H.f_style == "Elvis Sideburns"))
spawn(50)
H.f_style = "Elvis Sideburns"
H.update_hair()
H.update_fhair()
/obj/item/clothing/glasses/virussunglasses
@@ -805,7 +805,7 @@ var/list/compatible_mobs = list(/mob/living/carbon/human)
H << "<span class='warning'>Your chin and neck itch!.</span>"
spawn(50)
H.f_style = "Full Beard"
H.update_hair()
H.update_fhair()
/datum/disease2/effect/bloodynose
name = "Intranasal Hemorrhage"