diff --git a/code/__defines/items_clothing.dm b/code/__defines/items_clothing.dm index 8cb0d04bab..8f67815583 100644 --- a/code/__defines/items_clothing.dm +++ b/code/__defines/items_clothing.dm @@ -80,29 +80,34 @@ #define BLOCKHEADHAIR 0x20 // Hides the user's hair overlay. Leaves facial hair. #define BLOCKHAIR 0x40 // Hides the user's hair, facial and otherwise. -// Slots. -#define slot_back 1 -#define slot_wear_mask 2 -#define slot_handcuffed 3 -#define slot_l_hand 4 -#define slot_r_hand 5 -#define slot_belt 6 -#define slot_wear_id 7 -#define slot_l_ear 8 -#define slot_glasses 9 +// Slots as numbers // +//Hands +#define slot_l_hand 1 +#define slot_r_hand 2 //Some things may reference this, try to keep it here +//Shown unless F12 pressed +#define slot_back 3 +#define slot_belt 4 +#define slot_wear_id 5 +#define slot_l_store 6 +#define slot_r_store 7 //Some things may reference this, try to keep it here +//Shown when inventory unhidden +#define slot_glasses 8 +#define slot_wear_mask 9 #define slot_gloves 10 #define slot_head 11 #define slot_shoes 12 #define slot_wear_suit 13 #define slot_w_uniform 14 -#define slot_l_store 15 -#define slot_r_store 16 -#define slot_s_store 17 -#define slot_in_backpack 18 -#define slot_legcuffed 19 -#define slot_r_ear 20 -#define slot_legs 21 -#define slot_tie 22 +#define slot_s_store 15 +#define slot_l_ear 16 +#define slot_r_ear 17 +//Secret slots +#define slot_legs 18 +#define slot_tie 19 +#define slot_handcuffed 20 +#define slot_legcuffed 21 +#define slot_in_backpack 22 +#define SLOT_TOTAL 22 // Inventory slot strings. // since numbers cannot be used as associative list keys. @@ -120,7 +125,7 @@ #define slot_head_str "slot_head" #define slot_wear_mask_str "slot_wear_mask" #define slot_handcuffed_str "slot_handcuffed" -#define slot_legcuffed_str "slot_legcuffed" +#define slot_legcuffed_str "slot_legcuffed" #define slot_wear_mask_str "slot_wear_mask" #define slot_wear_id_str "slot_wear_id" #define slot_gloves_str "slot_gloves" diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index dd504dfb9b..cd0f68725a 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -98,9 +98,17 @@ #define INV_R_HAND_DEF_ICON 'icons/mob/items/righthand.dmi' #define INV_W_UNIFORM_DEF_ICON 'icons/mob/uniform.dmi' #define INV_ACCESSORIES_DEF_ICON 'icons/mob/ties.dmi' -#define INV_SUIT_DEF_ICON 'icons/mob/ties.dmi' +#define INV_TIE_DEF_ICON 'icons/mob/ties.dmi' #define INV_SUIT_DEF_ICON 'icons/mob/suit.dmi' -#define MAX_SUPPLIED_LAW_NUMBER 50 +#define INV_WEAR_ID_DEF_ICON 'icons/mob/mob.dmi' +#define INV_GLOVES_DEF_ICON 'icons/mob/hands.dmi' +#define INV_EYES_DEF_ICON 'icons/mob/eyes.dmi' +#define INV_EARS_DEF_ICON 'icons/mob/ears.dmi' +#define INV_FEET_DEF_ICON 'icons/mob/feet.dmi' +#define INV_BELT_DEF_ICON 'icons/mob/belt.dmi' +#define INV_MASK_DEF_ICON 'icons/mob/mask.dmi' +#define INV_HCUFF_DEF_ICON 'icons/mob/mob.dmi' +#define INV_LCUFF_DEF_ICON 'icons/mob/mob.dmi' // Character's economic class #define CLASS_UPPER "Wealthy" @@ -218,6 +226,44 @@ #define FBP_POSI "Positronic" #define FBP_DRONE "Drone" +// 'Regular' species. +#define SPECIES_HUMAN "Human" +#define SPECIES_HUMAN_VATBORN "Vatborn" +#define SPECIES_UNATHI "Unathi" +#define SPECIES_SKRELL "Skrell" +#define SPECIES_TESHARI "Teshari" +#define SPECIES_TAJ "Tajara" +#define SPECIES_PROMETHEAN "Promethean" +#define SPECIES_DIONA "Diona" +#define SPECIES_VOX "Vox" + +// Monkey and alien monkeys. +#define SPECIES_MONKEY "Monkey" +#define SPECIES_MONKEY_TAJ "Farwa" +#define SPECIES_MONKEY_SKRELL "Neaera" +#define SPECIES_MONKEY_UNATHI "Stok" + +// Virtual Reality IDs. +#define SPECIES_VR "Virtual Reality Avatar" +#define SPECIES_VR_HUMAN "Virtual Reality Human" +#define SPECIES_VR_UNATHI "Virtual Reality Unathi" +#define SPECIES_VR_TAJ "Virtual Reality Tajara" // NO CHANGING. +#define SPECIES_VR_SKRELL "Virtual Reality Skrell" +#define SPECIES_VR_TESHARI "Virtual Reality Teshari" +#define SPECIES_VR_DIONA "Virtual Reality Diona" + +// Ayyy IDs. +#define SPECIES_XENO "Xenomorph" +#define SPECIES_XENO_DRONE "Xenomorph Drone" +#define SPECIES_XENO_HUNTER "Xenomorph Hunter" +#define SPECIES_XENO_SENTINEL "Xenomorph Sentinel" +#define SPECIES_XENO_QUEEN "Xenomorph Queen" + +// Misc species. Mostly unused but might as well be complete. +#define SPECIES_SHADOW "Shadow" +#define SPECIES_SKELETON "Skeleton" +#define SPECIES_GOLEM "Golem" + // Used to seperate simple animals by ""intelligence"". #define SA_PLANT 1 #define SA_ANIMAL 2 @@ -256,3 +302,6 @@ #define VIS_MESONS 20 #define VIS_COUNT 20 //Must be highest number from above. + +//Some mob icon layering defines +#define BODY_LAYER -100 diff --git a/code/__defines/species_languages.dm b/code/__defines/species_languages.dm index cf60bbc602..87f1f9b3ca 100644 --- a/code/__defines/species_languages.dm +++ b/code/__defines/species_languages.dm @@ -48,6 +48,7 @@ #define LANGUAGE_TERMINUS "Terminus" #define LANGUAGE_SKRELLIANFAR "High Skrellian" #define LANGUAGE_MINBUS "Minbus" +#define LANGUAGE_AKHANI "Akhani" // Language flags. #define WHITELISTED 1 // Language is available if the speaker is whitelisted. diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index 73d41048ed..b0d1667fc4 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -31,8 +31,8 @@ var/global/list/turfs = list() //list of all turfs var/global/list/all_species[0] var/global/list/all_languages[0] var/global/list/language_keys[0] // Table of say codes for all languages -var/global/list/whitelisted_species = list("Human") // Species that require a whitelist check. -var/global/list/playable_species = list("Custom Species","Human") // A list of ALL playable species, whitelisted, latejoin or otherwise. //VOREStation Edit - Making sure custom species is obvious. +var/global/list/whitelisted_species = list(SPECIES_HUMAN) // Species that require a whitelist check. +var/global/list/playable_species = list("Custom Species", SPECIES_HUMAN) // A list of ALL playable species, whitelisted, latejoin or otherwise. //VOREStation Edit - Making sure custom species is obvious. var/list/mannequins_ diff --git a/code/_helpers/icons.dm b/code/_helpers/icons.dm index 52527cb47d..3b59d9600b 100644 --- a/code/_helpers/icons.dm +++ b/code/_helpers/icons.dm @@ -634,175 +634,211 @@ 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, always_use_defdir = 0, picture_planes = list(PLANE_WORLD)) - // 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, deficon, defstate, defblend, start = TRUE, no_anim = FALSE) + // We start with a blank canvas, otherwise some icon procs crash silently + var/icon/flat = icon('icons/effects/effects.dmi', "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 + if(start) + if(!defdir) + defdir = A.dir + if(!deficon) + deficon = A.icon + if(!defstate) + defstate = A.icon_state + if(!defblend) + defblend = A.blend_mode + + 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 + var/base_icon_dir //We'll use this to get the icon state to display if not null BUT NOT pass it to overlays as the dir we have + + //These should use the parent's direction (most likely) + if(!A.dir || A.dir == SOUTH) + curdir = defdir + else + curdir = A.dir - if(!noIcon && !(curstate in icon_states(curicon))) - if("" in icon_states(curicon)) - curstate = "" - else - noIcon = TRUE // Do not render this object. + //Let's check if the icon actually contains any diagonals, just skip if it's south to save (lot of) time + if(curdir != SOUTH) + var/icon/test_icon + var/directionals_exist = FALSE + var/list/dirs_to_check = cardinal - SOUTH + outer: + for(var/possible_dir in dirs_to_check) + test_icon = icon(curicon,curstate,possible_dir,frame=1) + for(var/x in 1 to world.icon_size) + for(var/y in 1 to world.icon_size) + if(!isnull(test_icon.GetPixel(x,y))) + directionals_exist = TRUE + break outer + if(!directionals_exist) + base_icon_dir = SOUTH + if(!base_icon_dir) + base_icon_dir = curdir - var/curdir - if(A.dir != 2 && !always_use_defdir) - curdir = A.dir - else - curdir = defdir + var/curblend + if(A.blend_mode == BLEND_DEFAULT) + curblend = defblend + else + curblend = A.blend_mode - var/curblend - if(A.blend_mode == BLEND_DEFAULT) - curblend = defblend - else - curblend = A.blend_mode + // Before processing overlays, make sure any pending overlays are applied + if (isloc(A)) + var/atom/aAtom = A + if(aAtom.flags & OVERLAY_QUEUED) + COMPILE_OVERLAYS(aAtom) - // 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) - var/currentPlane = current:plane - if (currentPlane != FLOAT_PLANE && !(currentPlane in picture_planes)) - curIndex++ - 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 + // 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=base_icon_dir) + 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++ //Try the next layer + continue + var/image/I = current + if(I.plane != FLOAT_PLANE && I.plane != A.plane) curIndex++ - else if(pSet == 0) // Switch to overlays + continue + currentLayer = I.layer + if(currentLayer<0) // Special case for FLOAT_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 + 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} + // Current dimensions of flattened icon + var/flatX1=1 + var/flatX2=flat.Width() + var/flatY1=1 + var/flatY2=flat.Height() + // Dimensions of overlay being added + var/addX1 + var/addX2 + var/addY1 + var/addY2 - for(var/I in layers) + for(var/V in layers) + var/image/I = V + if(I.alpha == 0) + continue - 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, base_icon_dir) + else // 'I' is an appearance object. + add = getFlatIcon(new/image(I), curdir, curicon, curstate, curblend, FALSE, no_anim) - 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(!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, picture_planes = picture_planes) + // 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) + if(no_anim) + //Clean up repeated frames + var/icon/cleaned = new /icon() + cleaned.Insert(flat, "", SOUTH, 1, 0) + return cleaned + else 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. //getFlatIcon but generates an icon that can face ALL four directions. The only four. /proc/getCompoundIcon(atom/A) - var/icon/north = getFlatIcon(A,defdir=NORTH,always_use_defdir=1) - var/icon/south = getFlatIcon(A,defdir=SOUTH,always_use_defdir=1) - var/icon/east = getFlatIcon(A,defdir=EAST,always_use_defdir=1) - var/icon/west = getFlatIcon(A,defdir=WEST,always_use_defdir=1) + var/icon/north = getFlatIcon(A,defdir=NORTH) + var/icon/south = getFlatIcon(A,defdir=SOUTH) + var/icon/east = getFlatIcon(A,defdir=EAST) + var/icon/west = getFlatIcon(A,defdir=WEST) //Starts with a blank icon because of byond bugs. var/icon/full = icon('icons/effects/effects.dmi', "icon_state"="nothing") @@ -818,7 +854,7 @@ proc // Creates a single icon from a given /atom or /image. Only the first argu return full /proc/downloadImage(atom/A, dir) - var/icon/this_icon = getFlatIcon(A,defdir=dir||A.dir,always_use_defdir=1) + var/icon/this_icon = getFlatIcon(A,defdir=dir) usr << ftp(this_icon,"[A.name].png") @@ -886,7 +922,8 @@ proc/sort_atoms_by_layer(var/list/atoms) /proc/gen_hud_image(var/file, var/person, var/state, var/plane) var/image/img = image(file, person, state) img.plane = plane //Thanks Byond. - img.appearance_flags = APPEARANCE_UI|KEEP_APART + img.layer = MOB_LAYER-0.2 + img.appearance_flags = APPEARANCE_UI return img /** diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index 76f1f9f780..bc111ccbcb 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -33,7 +33,7 @@ return mobs -proc/random_hair_style(gender, species = "Human") +proc/random_hair_style(gender, species = SPECIES_HUMAN) var/h_style = "Bald" var/list/valid_hairstyles = list() @@ -52,7 +52,7 @@ proc/random_hair_style(gender, species = "Human") return h_style -proc/random_facial_hair_style(gender, species = "Human") +proc/random_facial_hair_style(gender, species = SPECIES_HUMAN) var/f_style = "Shaved" var/list/valid_facialhairstyles = list() @@ -72,14 +72,14 @@ proc/random_facial_hair_style(gender, species = "Human") return f_style -proc/sanitize_name(name, species = "Human", robot = 0) +proc/sanitize_name(name, species = SPECIES_HUMAN, robot = 0) var/datum/species/current_species if(species) current_species = all_species[species] return current_species ? current_species.sanitize_name(name, robot) : sanitizeName(name, MAX_NAME_LEN, robot) -proc/random_name(gender, species = "Human") +proc/random_name(gender, species = SPECIES_HUMAN) var/datum/species/current_species if(species) diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 6ab4b7627f..df04e3d2c0 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -180,6 +180,7 @@ var/list/global_huds = list( var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle var/action_buttons_hidden = 0 + var/list/slot_info datum/hud/New(mob/owner) mymob = owner diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index e1b141ecb7..1c903700b0 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -14,6 +14,7 @@ src.adding = list() src.other = list() src.hotkeybuttons = list() //These can be disabled for hotkey users + src.slot_info = list() var/list/hud_elements = list() var/obj/screen/using @@ -33,6 +34,7 @@ inv_box.screen_loc = slot_data["loc"] inv_box.slot_id = slot_data["slot"] inv_box.icon_state = slot_data["state"] + slot_info["[inv_box.slot_id]"] = inv_box.screen_loc if(slot_data["dir"]) inv_box.set_dir(slot_data["dir"]) @@ -164,9 +166,9 @@ inv_box.slot_id = slot_r_hand inv_box.color = ui_color inv_box.alpha = ui_alpha - src.r_hand_hud_object = inv_box src.adding += inv_box + slot_info["[slot_r_hand]"] = inv_box.screen_loc inv_box = new /obj/screen/inventory/hand() inv_box.hud = src @@ -181,6 +183,7 @@ inv_box.alpha = ui_alpha src.l_hand_hud_object = inv_box src.adding += inv_box + slot_info["[slot_l_hand]"] = inv_box.screen_loc using = new /obj/screen/inventory() using.name = "hand" diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index eff4517984..bd2849b251 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -278,7 +278,7 @@ // Rigs are a fucking pain since they keep an air tank in nullspace. if(istype(C.back,/obj/item/weapon/rig)) var/obj/item/weapon/rig/rig = C.back - if(rig.air_supply) + if(rig.air_supply && !rig.offline) from = "in" nicename |= "hardsuit" tankcheck |= rig.air_supply diff --git a/code/controllers/Processes/scheduler.dm b/code/controllers/Processes/scheduler.dm index 6031f2f4fe..a2a2f5f925 100644 --- a/code/controllers/Processes/scheduler.dm +++ b/code/controllers/Processes/scheduler.dm @@ -8,19 +8,21 @@ /datum/controller/process/scheduler/setup() name = "scheduler" - schedule_interval = 3 SECONDS + schedule_interval = 1 SECOND scheduled_tasks = list() scheduler = src /datum/controller/process/scheduler/doWork() + var/world_time = world.time for(last_object in scheduled_tasks) var/datum/scheduled_task/scheduled_task = last_object + if(world_time < scheduled_task.trigger_time) + break // Too early for this one, and therefore too early for all remaining. try - if(world.time > scheduled_task.trigger_time) - unschedule(scheduled_task) - scheduled_task.pre_process() - scheduled_task.process() - scheduled_task.post_process() + unschedule(scheduled_task) + scheduled_task.pre_process() + scheduled_task.process() + scheduled_task.post_process() catch(var/exception/e) catchException(e, last_object) SCHECK @@ -45,7 +47,7 @@ stat(null, "[scheduled_tasks.len] task\s") /datum/controller/process/scheduler/proc/schedule(var/datum/scheduled_task/st) - scheduled_tasks += st + dd_insertObjectList(scheduled_tasks, st) /datum/controller/process/scheduler/proc/unschedule(var/datum/scheduled_task/st) scheduled_tasks -= st @@ -106,6 +108,9 @@ task_after_process_args.Cut() return ..() +/datum/scheduled_task/dd_SortValue() + return trigger_time + /datum/scheduled_task/proc/pre_process() task_triggered_event.raise_event(list(src)) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 811dc3e124..1f7469f2f7 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -212,7 +212,7 @@ var/list/gamemode_cache = list() var/starlight = 0 // Whether space turfs have ambient light or not - var/list/ert_species = list("Human") + var/list/ert_species = list(SPECIES_HUMAN) var/law_zero = "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'ALL LAWS OVERRIDDEN#*?&110010" @@ -721,7 +721,7 @@ var/list/gamemode_cache = list() if("ert_species") config.ert_species = splittext(value, ";") if(!config.ert_species.len) - config.ert_species += "Human" + config.ert_species += SPECIES_HUMAN if("law_zero") law_zero = value diff --git a/code/controllers/subsystems/overlays.dm b/code/controllers/subsystems/overlays.dm index ed9b81016f..5c8b3531c9 100644 --- a/code/controllers/subsystems/overlays.dm +++ b/code/controllers/subsystems/overlays.dm @@ -11,6 +11,8 @@ SUBSYSTEM_DEF(overlays) var/list/overlay_icon_state_caches // Cache thing var/list/overlay_icon_cache // Cache thing +var/global/image/stringbro = new() // Temporarily super-global because of BYOND init order dumbness. +var/global/image/iconbro = new() // Temporarily super-global because of BYOND init order dumbness. var/global/image/appearance_bro = new() // Temporarily super-global because of BYOND init order dumbness. /datum/controller/subsystem/overlays/PreInit() @@ -64,7 +66,7 @@ var/global/image/appearance_bro = new() // Temporarily super-global because of B count = 0 /proc/iconstate2appearance(icon, iconstate) - var/static/image/stringbro = new() + // var/static/image/stringbro = new() // Moved to be superglobal due to BYOND insane init order stupidness. var/list/icon_states_cache = SSoverlays.overlay_icon_state_caches var/list/cached_icon = icon_states_cache[icon] if (cached_icon) @@ -81,7 +83,7 @@ var/global/image/appearance_bro = new() // Temporarily super-global because of B return cached_appearance /proc/icon2appearance(icon) - var/static/image/iconbro = new() + // var/static/image/iconbro = new() // Moved to be superglobal due to BYOND insane init order stupidness. var/list/icon_cache = SSoverlays.overlay_icon_cache . = icon_cache[icon] if (!.) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 8d32d04c6c..b665465084 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -279,7 +279,7 @@ G.fields["fingerprint"] = "Unknown" G.fields["p_stat"] = "Active" G.fields["m_stat"] = "Stable" - G.fields["species"] = "Human" + G.fields["species"] = SPECIES_HUMAN G.fields["home_system"] = "Unknown" G.fields["citizenship"] = "Unknown" G.fields["faction"] = "Unknown" diff --git a/code/datums/supplypacks/contraband.dm b/code/datums/supplypacks/contraband.dm index bb5962c4ea..1c54c3908d 100644 --- a/code/datums/supplypacks/contraband.dm +++ b/code/datums/supplypacks/contraband.dm @@ -43,8 +43,8 @@ containername = "Moghes imports crate" contraband = 1 -/datum/supply_packs/security/bolt_rifles_militia - name = "Surplus militia rifles" +/datum/supply_packs/munitions/bolt_rifles_militia + name = "Weapon - Surplus militia rifles" contains = list( /obj/item/weapon/gun/projectile/shotgun/pump/rifle = 3, /obj/item/ammo_magazine/clip/c762 = 6 @@ -52,7 +52,7 @@ cost = 50 contraband = 1 containertype = /obj/structure/closet/crate/secure/weapon - containername = "Weapons crate" + containername = "Ballistic weapons crate" /datum/supply_packs/randomised/misc/telecrate //you get something awesome, a couple of decent things, and a few weak/filler things name = "ERR_NULL_ENTRY" //null crate! also dream maker is hell, diff --git a/code/datums/supplypacks/misc.dm b/code/datums/supplypacks/misc.dm index ab4a0163c1..225e29335f 100644 --- a/code/datums/supplypacks/misc.dm +++ b/code/datums/supplypacks/misc.dm @@ -73,7 +73,7 @@ /datum/supply_packs/misc/holoplant name = "Holoplant Pot" - contains = list() + contains = list(/obj/machinery/holoplant/shipped) cost = 15 - containertype = /obj/machinery/holoplant/shipped - containername = "holoplant" + containertype = /obj/structure/closet/crate + containername = "Holoplant crate" diff --git a/code/datums/supplypacks/munitions.dm b/code/datums/supplypacks/munitions.dm index 6f839b8601..3413b43014 100644 --- a/code/datums/supplypacks/munitions.dm +++ b/code/datums/supplypacks/munitions.dm @@ -10,21 +10,30 @@ group = "Munitions" /* VOREStation Removal - What? This crate costs 40... the crate with just two eguns costs 50... what??? This crate is also like "the armory" and has OFFICER access? /datum/supply_packs/munitions/weapons - name = "Weapons crate" + name = "Weapons - Security basic equipment" contains = list( + /obj/item/device/flash = 2, + /obj/item/weapon/reagent_containers/spray/pepper = 2, /obj/item/weapon/melee/baton/loaded = 2, - /obj/item/weapon/gun/energy/gun = 2, /obj/item/weapon/gun/energy/taser = 2, /obj/item/weapon/gun/projectile/colt/detective = 2, /obj/item/weapon/storage/box/flashbangs = 2 ) cost = 40 + containertype = /obj/structure/closet/crate/secure/gear + containername = "Security equipment crate" + access = access_security + +/datum/supply_packs/munitions/egunpistol + name = "Weapons - Energy sidearms" + contains = list(/obj/item/weapon/gun/energy/gun = 2) + cost = 40 containertype = /obj/structure/closet/crate/secure/weapon - containername = "Weapons crate" + containername = "Energy sidearms crate" access = access_security */ /datum/supply_packs/munitions/flareguns - name = "Flare guns crate" + name = "Weapons - Flare guns" contains = list( /obj/item/weapon/gun/projectile/sec/flash, /obj/item/ammo_magazine/m45/flash, @@ -32,100 +41,96 @@ /obj/item/weapon/storage/box/flashshells ) cost = 25 - containertype = /obj/structure/closet/crate/secure/weapon + containertype = /obj/structure/closet/crate/secure/gear containername = "Flare gun crate" access = access_armory //VOREStation Edit - Guns are for the armory. /datum/supply_packs/munitions/eweapons - name = "Experimental weapons crate" + name = "Weapons - Experimental weapons crate" contains = list( /obj/item/weapon/gun/energy/xray = 2, /obj/item/weapon/shield/energy = 2) cost = 100 - containertype = /obj/structure/closet/crate/secure/weapon + containertype = /obj/structure/closet/crate/secure/science containername = "Experimental weapons crate" access = access_armory -/datum/supply_packs/munitions/energyweapons - name = "Laser carbine crate" +/datum/supply_packs/munitions/energyweapons + name = "Weapons - Laser rifle crate" contains = list(/obj/item/weapon/gun/energy/laser = 2) //VOREStation Edit - Made to be consistent with the energy guns crate. cost = 50 - containertype = /obj/structure/closet/crate/secure - containername = "energy weapons crate" + containertype = /obj/structure/closet/crate/secure/weapon + containername = "Energy weapons crate" access = access_armory /datum/supply_packs/munitions/shotgun - name = "Shotgun crate" + name = "Weapons - Shotgun crate" contains = list( /obj/item/weapon/storage/box/shotgunammo, /obj/item/weapon/storage/box/shotgunshells, /obj/item/weapon/gun/projectile/shotgun/pump/combat = 2 ) cost = 50 - containertype = /obj/structure/closet/crate/secure + containertype = /obj/structure/closet/crate/secure/weapon containername = "Shotgun crate" access = access_armory /* VOREStation edit -- This is a bad idea. -- So is this. /datum/supply_packs/munitions/erifle - name = "Energy marksman crate" + name = "Weapons - Energy marksman" contains = list(/obj/item/weapon/gun/energy/sniperrifle = 2) cost = 100 - containertype = /obj/structure/closet/crate/secure + containertype = /obj/structure/closet/crate/secure/weapon containername = "Energy marksman crate" access = access_armory /datum/supply_packs/munitions/burstlaser - name = "Burst laser crate" + name = "Weapons - Burst laser" contains = list(/obj/item/weapon/gun/energy/gun/burst = 2) cost = 50 - containertype = /obj/structure/closet/crate/secure + containertype = /obj/structure/closet/crate/secure/weapon containername = "Burst laser crate" access = access_armory */ /datum/supply_packs/munitions/ionweapons - name = "Electromagnetic weapons crate" + name = "Weapons - Electromagnetic Rifles" contains = list( /obj/item/weapon/gun/energy/ionrifle = 2, /obj/item/weapon/storage/box/empslite ) cost = 50 - containertype = /obj/structure/closet/crate/secure - containername = "electromagnetic weapons crate" + containertype = /obj/structure/closet/crate/secure/weapon + containername = "Electromagnetic weapons crate" access = access_armory /datum/supply_packs/munitions/ionpistols - name = "Electromagnetic pistols crate" + name = "Weapons - Electromagnetic pistols" contains = list( /obj/item/weapon/gun/energy/ionrifle/pistol = 2, /obj/item/weapon/storage/box/empslite ) cost = 30 - containertype = /obj/structure/closet/crate/secure - containername = "electromagnetic weapons crate" + containertype = /obj/structure/closet/crate/secure/weapon + containername = "Electromagnetic weapons crate" access = access_armory -/datum/supply_packs/randomised/munitions/automatic - name = "Automatic weapon crate" - num_contained = 2 - contains = list( - /obj/item/weapon/gun/projectile/automatic/wt550, - /obj/item/weapon/gun/projectile/automatic/z8 - ) - cost = 100 - containertype = /obj/structure/closet/crate/secure - containername = "Automatic weapon crate" - access = access_armory - -/datum/supply_packs/munitions/energy_guns - name = "Energy gun crate" - contains = list(/obj/item/weapon/gun/energy/gun = 2) +/datum/supply_packs/munitions/bsmg + name = "Weapons - Ballistic SMGs" + contains = list(/obj/item/weapon/gun/projectile/automatic/wt550 = 2) cost = 50 - containertype = /obj/structure/closet/crate/secure - containername = "Energy gun crate" + containertype = /obj/structure/closet/crate/secure/weapon + containername = "Ballistic weapon crate" + access = access_armory + +/datum/supply_packs/munitions/brifle + name = "Weapons - Ballistic Rifles" + contains = list(/obj/item/weapon/gun/projectile/automatic/z8 = 2) + cost = 80 + containertype = /obj/structure/closet/crate/secure/weapon + containername = "Ballistic weapon crate" access = access_armory /datum/supply_packs/munitions/bolt_rifles_competitive - name = "Competitive shooting crate" + name = "Weapons - Competitive shooting rifles" contains = list( /obj/item/device/assembly/timer, /obj/item/weapon/gun/projectile/shotgun/pump/rifle/practice = 2, @@ -136,37 +141,56 @@ ) cost = 40 containertype = /obj/structure/closet/crate/secure/weapon - containername = "Weapons crate" + containername = "Ballistic Weapons crate" access = access_armory //VOREStation Edit - Guns are for the armory. /datum/supply_packs/munitions/shotgunammo - name = "Shotgun ammunition crate" + name = "Ammunition - Shotgun shells" contains = list( /obj/item/weapon/storage/box/shotgunammo = 2, /obj/item/weapon/storage/box/shotgunshells = 2 ) cost = 25 containertype = /obj/structure/closet/crate/secure - containername = "ballistic ammunition crate" - access = access_armory - -/datum/supply_packs/randomised/munitions/autoammo - name = "Automatic weapon ammunition crate" - num_contained = 6 - contains = list( - /obj/item/ammo_magazine/m9mmt, - /obj/item/ammo_magazine/m9mmt/rubber, - /obj/item/ammo_magazine/m545saw - ) - cost = 25 - containertype = /obj/structure/closet/crate/secure - containername = "Automatic weapon ammunition crate" + containername = "Ballistic ammunition crate" access = access_armory /datum/supply_packs/munitions/beanbagammo - name = "Beanbag shells" + name = "Ammunition - Beanbag shells" contains = list(/obj/item/weapon/storage/box/beanbags = 3) cost = 25 containertype = /obj/structure/closet/crate - containername = "Beanbag shells" + containername = "Ballistic ammunition crate" access = access_armory //VOREStation Edit - Guns are for the armory. + +/datum/supply_packs/munitions/bsmgammo + name = "Ammunition - 9mm top mounted lethal" + contains = list(/obj/item/ammo_magazine/m9mmt = 6) + cost = 25 + containertype = /obj/structure/closet/crate/secure + containername = "Ballistic ammunition crate" + access = access_armory + +/datum/supply_packs/munitions/bsmgammorubber + name = "Ammunition - 9mm top mounted rubber" + contains = list(/obj/item/ammo_magazine/m9mmt/rubber = 6) + cost = 25 + containertype = /obj/structure/closet/crate/secure + containername = "Ballistic ammunition crate" + access = access_security + +/datum/supply_packs/munitions/brifleammo + name = "Ammunition - 7.62mm lethal" + contains = list(/obj/item/ammo_magazine/m762 = 6) + cost = 25 + containertype = /obj/structure/closet/crate/secure + containername = "Ballistic ammunition crate" + access = access_armory + +/datum/supply_packs/munitions/pcellammo + name = "Ammunition - Power cell" + contains = list(/obj/item/weapon/cell/device/weapon = 3) + cost = 50 + containertype = /obj/structure/closet/crate/secure + containername = "Energy ammunition crate" + access = access_security diff --git a/code/datums/supplypacks/security.dm b/code/datums/supplypacks/security.dm index 9fe4d18150..4472ef4005 100644 --- a/code/datums/supplypacks/security.dm +++ b/code/datums/supplypacks/security.dm @@ -13,6 +13,7 @@ access = access_security /datum/supply_packs/randomised/security/armor + name = "Armor - Security armor" num_contained = 5 contains = list( /obj/item/clothing/suit/storage/vest, @@ -27,15 +28,13 @@ /obj/item/clothing/suit/storage/vest/heavy/hos, /obj/item/clothing/suit/storage/vest/heavy/pcrc ) - - name = "Armor crate" cost = 40 - containertype = /obj/structure/closet/crate/secure + containertype = /obj/structure/closet/crate/secure/gear containername = "Armor crate" access_armory //VOREStation Add - Armor is for the armory. /datum/supply_packs/security/riot_gear - name = "Riot gear crate" + name = "Gear - Riot" contains = list( /obj/item/weapon/melee/baton = 3, /obj/item/weapon/shield/riot = 3, @@ -45,12 +44,12 @@ /obj/item/weapon/storage/box/handcuffs ) cost = 40 - containertype = /obj/structure/closet/crate/secure - containername = "riot gear crate" + containertype = /obj/structure/closet/crate/secure/gear + containername = "Riot gear crate" access = access_armory /datum/supply_packs/security/riot_armor - name = "Riot armor set crate" + name = "Armor - Riot" contains = list( /obj/item/clothing/head/helmet/riot, /obj/item/clothing/suit/armor/riot, @@ -58,12 +57,12 @@ /obj/item/clothing/shoes/leg_guard/riot ) cost = 30 - containertype = /obj/structure/closet/crate/secure - containername = "riot armor set crate" + containertype = /obj/structure/closet/crate/secure/gear + containername = "Riot armor crate" access = access_armory /datum/supply_packs/security/ablative_armor - name = "Ablative armor set crate" + name = "Armor - Ablative" contains = list( /obj/item/clothing/head/helmet/laserproof, /obj/item/clothing/suit/armor/laserproof, @@ -71,12 +70,12 @@ /obj/item/clothing/shoes/leg_guard/laserproof ) cost = 40 - containertype = /obj/structure/closet/crate/secure - containername = "ablative armor set crate" + containertype = /obj/structure/closet/crate/secure/gear + containername = "Ablative armor crate" access = access_armory /datum/supply_packs/security/bullet_resistant_armor - name = "Bullet resistant armor set crate" + name = "Armor - Ballistic" contains = list( /obj/item/clothing/head/helmet/bulletproof, /obj/item/clothing/suit/armor/bulletproof, @@ -84,12 +83,12 @@ /obj/item/clothing/shoes/leg_guard/bulletproof ) cost = 40 - containertype = /obj/structure/closet/crate/secure - containername = "bullet resistant armor set crate" + containertype = /obj/structure/closet/crate/secure/gear + containername = "Ballistic armor crate" access = access_armory /* VOREStation Removal - Howabout no ERT armor being orderable? /datum/supply_packs/security/combat_armor - name = "Combat armor set crate" + name = "Armor - Combat" contains = list( /obj/item/clothing/head/helmet/combat, /obj/item/clothing/suit/armor/combat, @@ -97,14 +96,14 @@ /obj/item/clothing/shoes/leg_guard/combat ) cost = 40 - containertype = /obj/structure/closet/crate/secure - containername = "combat armor set crate" + containertype = /obj/structure/closet/crate/secure/gear + containername = "Combat armor crate" access = access_armory /datum/supply_packs/security/tactical - name = "Tactical suits" - containertype = /obj/structure/closet/crate/secure - containername = "Tactical Suit Locker" + name = "Armor - Tactical" + containertype = /obj/structure/closet/crate/secure/gear + containername = "Tactical armor crate" cost = 40 access = access_armory contains = list( @@ -127,23 +126,23 @@ ) */ /datum/supply_packs/security/securitybarriers - name = "Security barrier crate" + name = "Misc - Security Barriers" contains = list(/obj/machinery/deployable/barrier = 4) cost = 20 - containertype = /obj/structure/closet/crate/secure/gear + containertype = /obj/structure/largecrate containername = "Security barrier crate" access = null /datum/supply_packs/security/securityshieldgen - name = "Wall shield Generators" + name = "Misc - Wall shield generators" contains = list(/obj/machinery/shieldwallgen = 4) cost = 20 containertype = /obj/structure/closet/crate/secure - containername = "wall shield generators crate" + containername = "Wall shield generators crate" access = access_teleporter /datum/supply_packs/randomised/security/holster - name = "Holster crate" + name = "Gear - Holsters" num_contained = 4 contains = list( /obj/item/clothing/accessory/holster, @@ -152,11 +151,11 @@ /obj/item/clothing/accessory/holster/hip ) cost = 15 - containertype = "/obj/structure/closet/crate/secure" + containertype = /obj/structure/closet/crate containername = "Holster crate" /datum/supply_packs/security/extragear - name = "Security surplus equipment" + name = "Gear - Security surplus equipment" contains = list( /obj/item/weapon/storage/belt/security = 3, /obj/item/clothing/glasses/sunglasses/sechud = 3, @@ -164,12 +163,11 @@ /obj/item/clothing/suit/storage/hooded/wintercoat/security = 3 ) cost = 10 - containertype = "/obj/structure/closet/crate/secure" + containertype = /obj/structure/closet/crate containername = "Security surplus equipment" - access = null /datum/supply_packs/security/detectivegear - name = "Forensic investigation equipment" + name = "Forensic - Investigation equipment" contains = list( /obj/item/weapon/storage/box/evidence = 2, /obj/item/clothing/suit/storage/vest/detective, @@ -191,12 +189,12 @@ /obj/item/weapon/storage/briefcase/crimekit ) cost = 20 - containertype = "/obj/structure/closet/crate/secure" + containertype = /obj/structure/closet/crate/secure containername = "Forensic equipment" access = access_forensics_lockers /datum/supply_packs/security/detectiveclothes - name = "Investigation apparel" + name = "Forensic - Investigation apparel" contains = list( /obj/item/clothing/under/det/black = 2, /obj/item/clothing/under/det/grey = 2, @@ -213,12 +211,12 @@ /obj/item/clothing/gloves/black = 2 ) cost = 10 - containertype = "/obj/structure/closet/crate/secure" + containertype = /obj/structure/closet/crate/secure containername = "Investigation clothing" access = access_forensics_lockers /datum/supply_packs/security/officergear - name = "Officer equipment" + name = "Gear - Officer equipment" contains = list( /obj/item/clothing/suit/storage/vest/officer, /obj/item/clothing/head/helmet, @@ -243,12 +241,12 @@ /obj/item/device/flashlight/maglight ) cost = 20 - containertype = "/obj/structure/closet/crate/secure" + containertype = /obj/structure/closet/crate/secure containername = "Officer equipment" access = access_brig /datum/supply_packs/security/wardengear - name = "Warden equipment" + name = "Gear - Warden equipment" contains = list( /obj/item/clothing/suit/storage/vest/warden, /obj/item/clothing/under/rank/warden, @@ -271,12 +269,12 @@ /obj/item/device/flashlight/maglight ) cost = 20 - containertype = "/obj/structure/closet/crate/secure" + containertype = /obj/structure/closet/crate/secure containername = "Warden equipment" access = access_armory /datum/supply_packs/security/headofsecgear - name = "Head of security equipment" + name = "Gear - Head of security equipment" contains = list( /obj/item/clothing/head/helmet/HoS, /obj/item/clothing/suit/storage/vest/hos, @@ -297,12 +295,12 @@ /obj/item/device/flashlight/maglight ) cost = 50 - containertype = "/obj/structure/closet/crate/secure" + containertype = /obj/structure/closet/crate/secure containername = "Head of security equipment" access = access_hos /datum/supply_packs/security/securityclothing - name = "Security uniform crate" + name = "Misc - Security uniform red" contains = list( /obj/item/weapon/storage/backpack/satchel/sec = 2, /obj/item/weapon/storage/backpack/security = 2, @@ -316,11 +314,11 @@ /obj/item/weapon/storage/box/holobadge ) cost = 10 - containertype = "/obj/structure/closet/crate/secure" + containertype = /obj/structure/closet/crate/secure containername = "Security uniform crate" /datum/supply_packs/security/navybluesecurityclothing - name = "Navy blue security uniform crate" + name = "Misc - Security uniform navy blue" contains = list( /obj/item/weapon/storage/backpack/satchel/sec = 2, /obj/item/weapon/storage/backpack/security = 2, @@ -337,11 +335,11 @@ /obj/item/weapon/storage/box/holobadge ) cost = 10 - containertype = "/obj/structure/closet/crate/secure" + containertype = /obj/structure/closet/crate/secure containername = "Navy blue security uniform crate" /datum/supply_packs/security/corporatesecurityclothing - name = "Corporate security uniform crate" + name = "Misc - Security uniform corporate" contains = list( /obj/item/weapon/storage/backpack/satchel/sec = 2, /obj/item/weapon/storage/backpack/security = 2, @@ -357,11 +355,11 @@ /obj/item/weapon/storage/box/holobadge ) cost = 10 - containertype = "/obj/structure/closet/crate/secure" + containertype = /obj/structure/closet/crate/secure containername = "Corporate security uniform crate" /datum/supply_packs/security/biosuit - name = "Security biohazard gear" + name = "Gear - Security biohazard gear" contains = list( /obj/item/clothing/head/bio_hood/security = 3, /obj/item/clothing/under/rank/security = 3, @@ -372,6 +370,7 @@ /obj/item/clothing/gloves/sterile/latex, /obj/item/weapon/storage/box/gloves ) - cost = 50 - containertype = "/obj/structure/closet/crate/secure" + cost = 25 + containertype = /obj/structure/closet/crate/secure containername = "Security biohazard gear" + access = access_security \ No newline at end of file diff --git a/code/datums/underwear/underwear.dm b/code/datums/underwear/underwear.dm index bac96bf55c..f418f3e8d1 100644 --- a/code/datums/underwear/underwear.dm +++ b/code/datums/underwear/underwear.dm @@ -63,11 +63,11 @@ datum/category_group/underwear/dd_SortValue() /datum/category_item/underwear/proc/is_default(var/gender) return is_default -/datum/category_item/underwear/proc/generate_image(var/list/metadata) +/datum/category_item/underwear/proc/generate_image(var/list/metadata, var/layer = FLOAT_LAYER) if(!icon_state) return - var/image/I = image(icon = icon, icon_state = icon_state) + var/image/I = image(icon = icon, icon_state = icon_state, layer = layer) for(var/datum/gear_tweak/gt in tweaks) gt.tweak_item(I, metadata && metadata["[gt]"] ? metadata["[gt]"] : gt.get_default()) return I \ No newline at end of file diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index b6a45d9a07..75c95d0b0c 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -480,6 +480,7 @@ /obj/item/weapon/stock_parts/capacitor/adv name = "advanced capacitor" desc = "An advanced capacitor used in the construction of a variety of devices." + icon_state = "capacitor_adv" origin_tech = list(TECH_POWER = 3) rating = 2 matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 50) @@ -487,7 +488,7 @@ /obj/item/weapon/stock_parts/scanning_module/adv name = "advanced scanning module" desc = "A compact, high resolution scanning module used in the construction of certain devices." - icon_state = "scan_module" + icon_state = "scan_module_adv" origin_tech = list(TECH_MAGNET = 3) rating = 2 matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20) @@ -521,6 +522,7 @@ /obj/item/weapon/stock_parts/capacitor/super name = "super capacitor" desc = "A super-high capacity capacitor used in the construction of a variety of devices." + icon_state = "capacitor_super" origin_tech = list(TECH_POWER = 5, TECH_MATERIAL = 4) rating = 3 matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 50) @@ -528,6 +530,7 @@ /obj/item/weapon/stock_parts/scanning_module/phasic name = "phasic scanning module" desc = "A compact, high resolution phasic scanning module used in the construction of certain devices." + icon_state = "scan_module_phasic" origin_tech = list(TECH_MAGNET = 5) rating = 3 matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20) diff --git a/code/game/antagonist/antagonist.dm b/code/game/antagonist/antagonist.dm index b36c27e116..484ff8ea33 100644 --- a/code/game/antagonist/antagonist.dm +++ b/code/game/antagonist/antagonist.dm @@ -52,7 +52,7 @@ var/flags = 0 // Various runtime options. // Used for setting appearance. - var/list/valid_species = list("Unathi","Tajara","Skrell","Human","Diona","Teshari") + var/list/valid_species = list(SPECIES_UNATHI,SPECIES_TAJ,SPECIES_SKRELL,SPECIES_HUMAN,SPECIES_DIONA,SPECIES_TESHARI) // Runtime vars. var/datum/mind/leader // Current leader, if any. diff --git a/code/game/antagonist/outsider/mercenary.dm b/code/game/antagonist/outsider/mercenary.dm index 157d590b78..94b362fca8 100644 --- a/code/game/antagonist/outsider/mercenary.dm +++ b/code/game/antagonist/outsider/mercenary.dm @@ -50,8 +50,6 @@ var/datum/antagonist/mercenary/mercs var/obj/item/device/radio/uplink/U = new(player.loc, player.mind, DEFAULT_TELECRYSTAL_AMOUNT) player.put_in_hands(U) - player.update_icons_layers() - create_id("Mercenary", player) create_radio(SYND_FREQ, player) return 1 diff --git a/code/game/antagonist/outsider/ninja.dm b/code/game/antagonist/outsider/ninja.dm index b37fbb5c50..02a314b1f3 100644 --- a/code/game/antagonist/outsider/ninja.dm +++ b/code/game/antagonist/outsider/ninja.dm @@ -158,7 +158,7 @@ var/datum/antagonist/ninja/ninjas if(13) directive += "Some disgruntled [using_map.company_name] employees have been supportive of our operations. Be wary of any mistreatment by command staff." if(14) - var/xenorace = pick("Unathi","Tajara", "Skrell") + var/xenorace = pick(SPECIES_UNATHI, SPECIES_TAJ, SPECIES_SKRELL) directive += "A group of [xenorace] radicals have been loyal supporters of the Spider Clan. Favor [xenorace] crew whenever possible." if(15) directive += "The Spider Clan has recently been accused of religious insensitivity. Attempt to speak with the Chaplain and prove these accusations false." diff --git a/code/game/antagonist/outsider/raider.dm b/code/game/antagonist/outsider/raider.dm index 7c62208ca1..c130d8e66f 100644 --- a/code/game/antagonist/outsider/raider.dm +++ b/code/game/antagonist/outsider/raider.dm @@ -205,7 +205,7 @@ var/datum/antagonist/raider/raiders if(!..()) return 0 - if(player.species && player.species.get_bodytype() == "Vox") + if(player.species && player.species.get_bodytype() == SPECIES_VOX) equip_vox(player) else var/new_shoes = pick(raider_shoes) diff --git a/code/game/antagonist/outsider/technomancer.dm b/code/game/antagonist/outsider/technomancer.dm index 33dc33b5e8..2cb7532308 100644 --- a/code/game/antagonist/outsider/technomancer.dm +++ b/code/game/antagonist/outsider/technomancer.dm @@ -47,7 +47,6 @@ var/datum/antagonist/technomancer/technomancers technomancer_mob.equip_to_slot_or_del(new /obj/item/device/flashlight(technomancer_mob), slot_belt) technomancer_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(technomancer_mob), slot_shoes) technomancer_mob.equip_to_slot_or_del(new /obj/item/clothing/head/technomancer/master(technomancer_mob), slot_head) - technomancer_mob.update_icons_layers() return 1 /datum/antagonist/technomancer/proc/equip_apprentice(var/mob/living/carbon/human/technomancer_mob) @@ -67,7 +66,6 @@ var/datum/antagonist/technomancer/technomancers technomancer_mob.equip_to_slot_or_del(new /obj/item/device/flashlight(technomancer_mob), slot_belt) technomancer_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(technomancer_mob), slot_shoes) technomancer_mob.equip_to_slot_or_del(new /obj/item/clothing/head/technomancer/apprentice(technomancer_mob), slot_head) - technomancer_mob.update_icons() return 1 /datum/antagonist/technomancer/check_victory() diff --git a/code/game/antagonist/outsider/wizard.dm b/code/game/antagonist/outsider/wizard.dm index ad5cc10479..feaf8857ba 100644 --- a/code/game/antagonist/outsider/wizard.dm +++ b/code/game/antagonist/outsider/wizard.dm @@ -87,7 +87,6 @@ var/datum/antagonist/wizard/wizards wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/box(wizard_mob), slot_in_backpack) wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(wizard_mob), slot_r_store) wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/spellbook(wizard_mob), slot_r_hand) - wizard_mob.update_icons_layers() return 1 /datum/antagonist/wizard/check_victory() diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 07f312f291..74df297775 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -104,7 +104,7 @@ var/list/ghostteleportlocs = list() power_light = 0 power_equip = 0 power_environ = 0 - ambience = list('sound/ambience/ambispace.ogg','sound/music/title2.ogg','sound/music/space.ogg','sound/music/main.ogg','sound/music/traitor.ogg') + ambience = list('sound/ambience/ambispace.ogg','sound/music/title2.ogg','sound/music/space.ogg','sound/music/main.ogg','sound/music/traitor.ogg','sound/ambience/serspaceamb1.ogg') base_turf = /turf/space area/space/atmosalert() diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm index 77ea2587e4..162cdd371d 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -109,7 +109,7 @@ var/global/list/datum/dna/gene/dna_genes[0] // VOREStation // New stuff - var/species = "Human" + var/species = SPECIES_HUMAN var/list/body_markings = list() // Make a copy of this strand. diff --git a/code/game/gamemodes/changeling/generic_equip_procs.dm b/code/game/gamemodes/changeling/generic_equip_procs.dm index 7ff76ff9f6..ef1ab650a1 100644 --- a/code/game/gamemodes/changeling/generic_equip_procs.dm +++ b/code/game/gamemodes/changeling/generic_equip_procs.dm @@ -122,7 +122,6 @@ playsound(src, 'sound/effects/splat.ogg', 30, 1) visible_message("[src] pulls on their clothes, peeling it off along with parts of their skin attached!", "We remove and deform our equipment.") - M.update_icons_layers() M.mind.changeling.armor_deployed = 0 return success @@ -138,7 +137,6 @@ M.equip_to_slot_or_del(I, slot_head) grown_items_list.Add("a helmet") playsound(src, 'sound/effects/blobattack.ogg', 30, 1) - M.update_icons_layers() success = 1 sleep(1 SECOND) @@ -148,7 +146,6 @@ M.equip_to_slot_or_del(I, slot_w_uniform) grown_items_list.Add("a uniform") playsound(src, 'sound/effects/blobattack.ogg', 30, 1) - M.update_icons_layers() success = 1 sleep(1 SECOND) @@ -158,7 +155,6 @@ M.equip_to_slot_or_del(I, slot_gloves) grown_items_list.Add("some gloves") playsound(src, 'sound/effects/splat.ogg', 30, 1) - M.update_icons_layers() success = 1 sleep(1 SECOND) @@ -168,7 +164,6 @@ M.equip_to_slot_or_del(I, slot_shoes) grown_items_list.Add("shoes") playsound(src, 'sound/effects/splat.ogg', 30, 1) - M.update_icons_layers() success = 1 sleep(1 SECOND) @@ -178,7 +173,6 @@ M.equip_to_slot_or_del(I, slot_belt) grown_items_list.Add("a belt") playsound(src, 'sound/effects/splat.ogg', 30, 1) - M.update_icons_layers() success = 1 sleep(1 SECOND) @@ -188,7 +182,6 @@ M.equip_to_slot_or_del(I, slot_glasses) grown_items_list.Add("some glasses") playsound(src, 'sound/effects/splat.ogg', 30, 1) - M.update_icons_layers() success = 1 sleep(1 SECOND) @@ -198,7 +191,6 @@ M.equip_to_slot_or_del(I, slot_wear_mask) grown_items_list.Add("a mask") playsound(src, 'sound/effects/splat.ogg', 30, 1) - M.update_icons_layers() success = 1 sleep(1 SECOND) @@ -208,7 +200,6 @@ M.equip_to_slot_or_del(I, slot_back) grown_items_list.Add("a backpack") playsound(src, 'sound/effects/blobattack.ogg', 30, 1) - M.update_icons_layers() success = 1 sleep(1 SECOND) @@ -218,7 +209,6 @@ M.equip_to_slot_or_del(I, slot_wear_suit) grown_items_list.Add("an exosuit") playsound(src, 'sound/effects/blobattack.ogg', 30, 1) - M.update_icons_layers() success = 1 sleep(1 SECOND) @@ -228,20 +218,13 @@ M.equip_to_slot_or_del(I, slot_wear_id) grown_items_list.Add("an ID card") playsound(src, 'sound/effects/splat.ogg', 30, 1) - M.update_icons_layers() success = 1 sleep(1 SECOND) var/feedback = english_list(grown_items_list, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" ) M << "We have grown [feedback]." - /* - for(var/I in stuff_to_equip) - world << I - world << stuff_to_equip - world << "Proc ended." - */ - M.update_icons() + if(success) M.mind.changeling.armor_deployed = 1 M.mind.changeling.chem_charges -= 10 diff --git a/code/game/gamemodes/changeling/powers/fabricate_clothing.dm b/code/game/gamemodes/changeling/powers/fabricate_clothing.dm index aad702ea49..d79af62b4c 100644 --- a/code/game/gamemodes/changeling/powers/fabricate_clothing.dm +++ b/code/game/gamemodes/changeling/powers/fabricate_clothing.dm @@ -56,7 +56,6 @@ var/global/list/changeling_fabricated_clothing = list( visible_message("[H] tears off [src]!", "We remove [src].") qdel(src) - H.update_icons_layers() /obj/item/clothing/head/chameleon/changeling name = "malformed head" @@ -78,7 +77,6 @@ var/global/list/changeling_fabricated_clothing = list( visible_message("[H] tears off [src]!", "We remove [src].") qdel(src) - H.update_icons_layers() /obj/item/clothing/suit/chameleon/changeling name = "chitinous chest" @@ -104,7 +102,6 @@ var/global/list/changeling_fabricated_clothing = list( visible_message("[H] tears off [src]!", "We remove [src].") qdel(src) - H.update_icons_layers() /obj/item/clothing/shoes/chameleon/changeling name = "malformed feet" @@ -130,7 +127,6 @@ var/global/list/changeling_fabricated_clothing = list( visible_message("[H] tears off [src]!", "We remove [src].") qdel(src) - H.update_icons_layers() /obj/item/weapon/storage/backpack/chameleon/changeling name = "backpack" @@ -158,7 +154,6 @@ var/global/list/changeling_fabricated_clothing = list( for(var/atom/movable/AM in src.contents) //Dump whatever's in the bag before deleting. AM.forceMove(get_turf(loc)) qdel(src) - H.update_icons_layers() /obj/item/clothing/gloves/chameleon/changeling name = "malformed hands" @@ -185,8 +180,6 @@ var/global/list/changeling_fabricated_clothing = list( visible_message("[H] tears off [src]!", "We remove [src].") qdel(src) - H.update_icons_layers() - /obj/item/clothing/mask/chameleon/changeling name = "chitin visor" @@ -213,7 +206,6 @@ var/global/list/changeling_fabricated_clothing = list( visible_message("[H] tears off [src]!", "We remove [src].") qdel(src) - H.update_icons_layers() /obj/item/clothing/glasses/chameleon/changeling name = "chitin goggles" @@ -235,7 +227,6 @@ var/global/list/changeling_fabricated_clothing = list( visible_message("[H] tears off [src]!", "We remove [src].") qdel(src) - H.update_icons_layers() /obj/item/weapon/storage/belt/chameleon/changeling name = "waist pouch" @@ -261,7 +252,6 @@ var/global/list/changeling_fabricated_clothing = list( visible_message("[H] tears off [src]!", "We remove [src].") qdel(src) - H.update_icons_layers() /obj/item/weapon/card/id/syndicate/changeling name = "chitinous card" @@ -291,8 +281,6 @@ var/global/list/changeling_fabricated_clothing = list( visible_message("[H] tears off [src]!", "We remove [src].") qdel(src) - H.update_icons_layers() - /obj/item/weapon/card/id/syndicate/changeling/Click() //Since we can't hold it in our hands, and attack_hand() doesn't work if it in inventory... if(!registered_user) diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index daefb23ef2..85afcaa294 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -87,4 +87,3 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) minimal_access = list(access_heads, access_keycard_auth) outfit_type = /decl/hierarchy/outfit/job/secretary - alt_titles = list("Command Liaison", "Bridge Secretary") diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index c9a9e4d23e..1b59d5a2a0 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -49,7 +49,7 @@ minimal_access = list(access_hydroponics) outfit_type = /decl/hierarchy/outfit/job/service/gardener - alt_titles = list("Hydroponicist", "Gardener") + alt_titles = list("Gardener") //Cargo /datum/job/qm @@ -105,7 +105,7 @@ minimal_access = list(access_mining, access_mining_station, access_mailsorting) outfit_type = /decl/hierarchy/outfit/job/cargo/mining - alt_titles = list("Drill Technician","Prospector") + alt_titles = list("Drill Technician") //Service /datum/job/janitor @@ -123,7 +123,7 @@ minimal_access = list(access_janitor, access_maint_tunnels) outfit_type = /decl/hierarchy/outfit/job/service/janitor - alt_titles = list("Custodian", "Sanitation Technician") + alt_titles = list("Custodian") //More or less assistants /datum/job/librarian @@ -141,7 +141,7 @@ minimal_access = list(access_library) outfit_type = /decl/hierarchy/outfit/job/librarian - alt_titles = list("Journalist", "Professor", "Historian", "Writer") + alt_titles = list("Journalist", "Writer") //var/global/lawyer = 0//Checks for another lawyer //This changed clothes on 2nd lawyer, both IA get the same dreds. /datum/job/lawyer diff --git a/code/game/machinery/computer3/computers/HolodeckControl.dm b/code/game/machinery/computer3/computers/HolodeckControl.dm index 4d63b95673..a629354d7b 100644 --- a/code/game/machinery/computer3/computers/HolodeckControl.dm +++ b/code/game/machinery/computer3/computers/HolodeckControl.dm @@ -155,7 +155,6 @@ var/mob/M = obj.loc if(ismob(M)) M.remove_from_mob(obj) - M.update_icons_layers() //so their overlays update if(!silent) var/obj/oldobj = obj diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 7a9926c102..d55dc0bb3e 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -588,7 +588,7 @@ //Departments that the cycler can paint suits to look like. var/list/departments = list("Engineering","Mining","Medical","Security","Atmos","HAZMAT","Construction","Biohazard","Emergency Medical Response","Crowd Control") //Species that the suits can be configured to fit. - var/list/species = list("Human","Skrell","Unathi","Tajara", "Teshari", "Nevrean", "Akula", "Sergal", "Flatland Zorren", "Highlander Zorren", "Vulpkanin", "Promethean", "Xenomorph Hybrid", "Xenochimera","Vasilissan", "Rapala") //VORESTATION EDIT + var/list/species = list(SPECIES_HUMAN,SPECIES_SKRELL,SPECIES_UNATHI,SPECIES_TAJ, SPECIES_TESHARI, "Nevrean", "Akula", "Sergal", "Flatland Zorren", "Highlander Zorren", "Vulpkanin", "Promethean", "Xenomorph Hybrid", "Xenochimera","Vasilissan", "Rapala") //VORESTATION EDIT var/target_department var/target_species @@ -753,7 +753,7 @@ //Clear the access reqs, disable the safeties, and open up all paintjobs. user << "You run the sequencer across the interface, corrupting the operating protocols." departments = list("Engineering","Mining","Medical","Security","Atmos","HAZMAT","Construction","Biohazard","Crowd Control","Emergency Medical Response","^%###^%$", "Charring") - species = list("Human","Skrell","Unathi","Tajara", "Teshari", "Nevrean", "Akula", "Sergal", "Flatland Zorren", "Highlander Zorren", "Vulpkanin", "Promethean", "Xenomorph Hybrid", "Vasilissan", "Rapala") //VORESTATION EDIT + species = list(SPECIES_HUMAN,SPECIES_SKRELL,SPECIES_UNATHI,SPECIES_TAJ, SPECIES_TESHARI, "Nevrean", "Akula", "Sergal", "Flatland Zorren", "Highlander Zorren", "Vulpkanin", "Promethean", "Xenomorph Hybrid", "Vasilissan", "Rapala") //VORESTATION EDIT emagged = 1 safeties = 0 @@ -982,7 +982,9 @@ if(suit) suit.name = "engineering voidsuit" suit.icon_state = "rig-engineering" - suit.item_state = "eng_voidsuit" + suit.item_state = "rig-engineering" + suit.item_state_slots[slot_r_hand_str] = "eng_voidsuit" + suit.item_state_slots[slot_l_hand_str] = "eng_voidsuit" if("Mining") if(helmet) helmet.name = "mining voidsuit helmet" @@ -991,7 +993,9 @@ if(suit) suit.name = "mining voidsuit" suit.icon_state = "rig-mining" - suit.item_state = "mining_voidsuit" + suit.item_state = "rig-mining" + suit.item_state_slots[slot_r_hand_str] = "mining_voidsuit" + suit.item_state_slots[slot_l_hand_str] = "mining_voidsuit" if("Medical") if(helmet) helmet.name = "medical voidsuit helmet" @@ -1000,7 +1004,9 @@ if(suit) suit.name = "medical voidsuit" suit.icon_state = "rig-medical" - suit.item_state = "medical_voidsuit" + suit.item_state = "rig-medical" + suit.item_state_slots[slot_r_hand_str] = "medical_voidsuit" + suit.item_state_slots[slot_l_hand_str] = "medical_voidsuit" if("Security") if(helmet) helmet.name = "security voidsuit helmet" @@ -1009,7 +1015,9 @@ if(suit) suit.name = "security voidsuit" suit.icon_state = "rig-sec" - suit.item_state = "sec_voidsuit" + suit.item_state = "rig-sec" + suit.item_state_slots[slot_r_hand_str] = "sec_voidsuit" + suit.item_state_slots[slot_l_hand_str] = "sec_voidsuit" if("Crowd Control") if(helmet) helmet.name = "crowd control voidsuit helmet" @@ -1018,7 +1026,9 @@ if(suit) suit.name = "crowd control voidsuit" suit.icon_state = "rig-sec_riot" - suit.item_state = "sec_voidsuit_riot" + suit.item_state = "rig-sec_riot" + suit.item_state_slots[slot_r_hand_str] = "sec_voidsuit_riot" + suit.item_state_slots[slot_l_hand_str] = "sec_voidsuit_riot" if("Atmos") if(helmet) helmet.name = "atmospherics voidsuit helmet" @@ -1027,7 +1037,9 @@ if(suit) suit.name = "atmospherics voidsuit" suit.icon_state = "rig-atmos" - suit.item_state = "atmos_voidsuit" + suit.item_state = "rig-atmos" + suit.item_state_slots[slot_r_hand_str] = "atmos_voidsuit" + suit.item_state_slots[slot_l_hand_str] = "atmos_voidsuit" if("HAZMAT") if(helmet) helmet.name = "HAZMAT voidsuit helmet" @@ -1036,7 +1048,9 @@ if(suit) suit.name = "HAZMAT voidsuit" suit.icon_state = "rig-engineering_rad" - suit.item_state = "eng_voidsuit_rad" + suit.item_state = "rig-engineering_rad" + suit.item_state_slots[slot_r_hand_str] = "eng_voidsuit_rad" + suit.item_state_slots[slot_l_hand_str] = "eng_voidsuit_rad" if("Construction") if(helmet) helmet.name = "Construction voidsuit helmet" @@ -1045,7 +1059,9 @@ if(suit) suit.name = "Construction voidsuit" suit.icon_state = "rig-engineering_con" - suit.item_state = "eng_voidsuit_con" + suit.item_state = "rig-engineering_con" + suit.item_state_slots[slot_r_hand_str] = "eng_voidsuit_con" + suit.item_state_slots[slot_l_hand_str] = "eng_voidsuit_con" if("Biohazard") if(helmet) helmet.name = "Biohazard voidsuit helmet" @@ -1054,7 +1070,9 @@ if(suit) suit.name = "Biohazard voidsuit" suit.icon_state = "rig-medical_bio" - suit.item_state = "medical_voidsuit_bio" + suit.item_state = "rig-medical_bio" + suit.item_state_slots[slot_r_hand_str] = "medical_voidsuit_bio" + suit.item_state_slots[slot_l_hand_str] = "medical_voidsuit_bio" if("Emergency Medical Response") if(helmet) helmet.name = "emergency medical response voidsuit helmet" @@ -1063,7 +1081,9 @@ if(suit) suit.name = "emergency medical response voidsuit" suit.icon_state = "rig-medical_emt" - suit.item_state = "medical_voidsuit_emt" + suit.item_state = "rig-medical_emt" + suit.item_state_slots[slot_r_hand_str] = "medical_voidsuit_emt" + suit.item_state_slots[slot_l_hand_str] = "medical_voidsuit_emt" if("^%###^%$" || "Mercenary") if(helmet) helmet.name = "blood-red voidsuit helmet" @@ -1071,8 +1091,10 @@ helmet.item_state = "rig0-syndie" if(suit) suit.name = "blood-red voidsuit" - suit.item_state = "syndie_voidsuit" + suit.item_state = "rig-syndie" suit.icon_state = "rig-syndie" + suit.item_state_slots[slot_r_hand_str] = "syndie_voidsuit" + suit.item_state_slots[slot_l_hand_str] = "syndie_voidsuit" if("Charring") if(helmet) helmet.name = "soot-covered voidsuit helmet" @@ -1082,6 +1104,8 @@ suit.name = "soot-covered voidsuit" suit.item_state = "rig-firebug" suit.icon_state = "rig-firebug" + suit.item_state_slots[slot_r_hand_str] = "rig-firebug" + suit.item_state_slots[slot_l_hand_str] = "rig-firebug" if(helmet) helmet.name = "refitted [helmet.name]" if(suit) suit.name = "refitted [suit.name]" diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 9b27cdecbd..0a8a74b8e9 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -46,7 +46,7 @@ return TRUE /atom/movable/Destroy() - unbuckle_mob() + unbuckle_all_mobs() return ..() diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 1b38fae182..46b9d3645c 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -96,18 +96,18 @@ var/global/list/image/splatter_cache=list() S.overlays.Cut() S.overlays += S.blood_overlay S.blood_DNA |= blood_DNA.Copy() + perp.update_inv_shoes() else if (hasfeet)//Or feet perp.feet_blood_color = basecolor perp.track_blood = max(amount,perp.track_blood) - if(!perp.feet_blood_DNA) - perp.feet_blood_DNA = list() + LAZYINITLIST(perp.feet_blood_DNA) perp.feet_blood_DNA |= blood_DNA.Copy() + perp.update_bloodied() else if (perp.buckled && istype(perp.buckled, /obj/structure/bed/chair/wheelchair)) var/obj/structure/bed/chair/wheelchair/W = perp.buckled W.bloodiness = 4 - perp.update_inv_shoes(1) amount-- /obj/effect/decal/cleanable/blood/proc/dry() diff --git a/code/game/objects/effects/decals/posters/bs12.dm b/code/game/objects/effects/decals/posters/bs12.dm index 6b5ad182c4..7aadcb2ead 100644 --- a/code/game/objects/effects/decals/posters/bs12.dm +++ b/code/game/objects/effects/decals/posters/bs12.dm @@ -217,7 +217,7 @@ /datum/poster/bay_44 icon_state="bsposter44" name = "Time for a drink?" - desc = "This poster depicts a friendly-looking Tajara holding a tray of drinks." + desc = "This poster depicts a friendly-looking Tajaran holding a tray of drinks." /datum/poster/bay_45 icon_state="bsposter45" diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index e4e0e55b2c..b5122f29ae 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -69,7 +69,7 @@ /* Species-specific sprites, concept stolen from Paradise//vg/. ex: sprite_sheets = list( - "Tajara" = 'icons/cat/are/bad' + SPECIES_TAJ = 'icons/cat/are/bad' ) If index term exists and icon_override is not set, this sprite sheet will be used. */ @@ -84,6 +84,9 @@ var/reach = 1 // Length of tiles it can reach, 1 is adjacent. var/addblends // Icon overlay for ADD highlights when applicable. + var/icon/default_worn_icon //Default on-mob icon + var/worn_layer //Default on-mob layer + /obj/item/New() ..() if(embed_chance < 0) @@ -280,6 +283,7 @@ // note this isn't called during the initial dressing of a player /obj/item/proc/equipped(var/mob/user, var/slot) hud_layerise() + user.position_hud_item(src,slot) if(user.client) user.client.screen |= src if(user.pulling == src) user.stop_pulling() return @@ -676,4 +680,116 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. // My best guess as to why this is here would be that it does so little. Still, keep it under all the procs, for sanity's sake. /obj/item/device - icon = 'icons/obj/device.dmi' \ No newline at end of file + icon = 'icons/obj/device.dmi' + +//Worn icon generation for on-mob sprites +/obj/item/proc/make_worn_icon(var/body_type,var/slot_name,var/inhands,var/default_icon,var/default_layer) + //Get the required information about the base icon + var/icon/icon2use = get_worn_icon_file(body_type = body_type, slot_name = slot_name, default_icon = default_icon, inhands = inhands) + var/state2use = get_worn_icon_state(slot_name = slot_name) + var/layer2use = get_worn_layer(default_layer = default_layer) + + //Snowflakey inhand icons in a specific slot + if(inhands && icon2use == icon_override) + switch(slot_name) + if(slot_r_hand_str) + state2use += "_r" + if(slot_l_hand_str) + state2use += "_l" + + // testing("[src] (\ref[src]) - Slot: [slot_name], Inhands: [inhands], Worn Icon:[icon2use], Worn State:[state2use], Worn Layer:[layer2use]") + + //Generate the base onmob icon + var/icon/standing_icon = icon(icon = icon2use, icon_state = state2use) + + if(!inhands) + apply_custom(standing_icon) //Pre-image overridable proc to customize the thing + apply_addblends(icon2use,standing_icon) //Some items have ICON_ADD blend shaders + + var/image/standing = image(standing_icon) + standing.alpha = alpha + standing.color = color + standing.layer = layer2use + + //Apply any special features + if(!inhands) + apply_blood(standing) //Some items show blood when bloodied + apply_accessories(standing) //Some items sport accessories like webbing + + //Return our icon + return standing + +//Returns the icon object that should be used for the worn icon +/obj/item/proc/get_worn_icon_file(var/body_type,var/slot_name,var/default_icon,var/inhands) + + //1: icon_override var + if(icon_override) + return icon_override + + //2: species-specific sprite sheets (skipped for inhands) + var/sheet = sprite_sheets[body_type] + if(sheet && !inhands) + return sheet + + //3: slot-specific sprite sheets + sheet = item_icons[slot_name] + if(sheet) + return sheet + + //4: item's default icon + if(default_worn_icon) + return default_worn_icon + + //5: provided default_icon + if(default_icon) + return default_icon + + //6: give up + return + +//Returns the state that should be used for the worn icon +/obj/item/proc/get_worn_icon_state(var/slot_name) + + //1: slot-specific sprite sheets + var/state = item_state_slots[slot_name] + if(state) + return state + + //2: item_state variable + if(item_state) + return item_state + + //3: icon_state variable + if(icon_state) + return icon_state + +//Returns the layer that should be used for the worn icon (as a FLOAT_LAYER layer, so negative) +/obj/item/proc/get_worn_layer(var/default_layer = 0) + + //1: worn_layer variable + if(!isnull(worn_layer)) //Can be zero, so... + return BODY_LAYER+worn_layer + + //2: your default + return BODY_LAYER+default_layer + +//Apply the addblend blends onto the icon +/obj/item/proc/apply_addblends(var/source_icon, var/icon/standing_icon) + + //If we have addblends, blend them onto the provided icon + if(addblends && standing_icon && source_icon) + var/addblend_icon = icon("icon" = source_icon, "icon_state" = addblends) + standing_icon.Blend(addblend_icon, ICON_ADD) + +//STUB +/obj/item/proc/apply_custom(var/icon/standing_icon) + return standing_icon + +//STUB +/obj/item/proc/apply_blood(var/image/standing) + return standing + +//STUB +/obj/item/proc/apply_accessories(var/image/standing) + return standing + diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 2a5554a328..7003f2a58e 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -11,7 +11,7 @@ var/global/list/obj/item/device/pda/PDAs = list() item_state = "electronic" w_class = ITEMSIZE_SMALL slot_flags = SLOT_ID | SLOT_BELT - sprite_sheets = list("Teshari" = 'icons/mob/species/seromi/id.dmi') + sprite_sheets = list(SPECIES_TESHARI = 'icons/mob/species/seromi/id.dmi') //Main variables var/pdachoice = 1 diff --git a/code/game/objects/items/devices/communicator/UI.dm b/code/game/objects/items/devices/communicator/UI.dm index a39cc82fb4..7a17e57af5 100644 --- a/code/game/objects/items/devices/communicator/UI.dm +++ b/code/game/objects/items/devices/communicator/UI.dm @@ -69,16 +69,17 @@ im_list_ui[++im_list_ui.len] = list("address" = I["address"], "to_address" = I["to_address"], "im" = I["im"]) //Weather reports. - for(var/datum/planet/planet in planet_controller.planets) - if(planet.weather_holder && planet.weather_holder.current_weather) - var/list/W = list( - "Planet" = planet.name, - "Time" = planet.current_time.show_time("hh:mm"), - "Weather" = planet.weather_holder.current_weather.name, - "Temperature" = planet.weather_holder.temperature - T0C, - "High" = planet.weather_holder.current_weather.temp_high - T0C, - "Low" = planet.weather_holder.current_weather.temp_low - T0C) - weather[++weather.len] = W + if(planet_controller) + for(var/datum/planet/planet in planet_controller.planets) + if(planet.weather_holder && planet.weather_holder.current_weather) + var/list/W = list( + "Planet" = planet.name, + "Time" = planet.current_time.show_time("hh:mm"), + "Weather" = planet.weather_holder.current_weather.name, + "Temperature" = planet.weather_holder.temperature - T0C, + "High" = planet.weather_holder.current_weather.temp_high - T0C, + "Low" = planet.weather_holder.current_weather.temp_low - T0C) + weather[++weather.len] = W injection = "
Test
" @@ -251,4 +252,4 @@ set_light(fon * flum) nanomanager.update_uis(src) - add_fingerprint(usr) \ No newline at end of file + add_fingerprint(usr) diff --git a/code/game/objects/items/devices/defib.dm b/code/game/objects/items/devices/defib.dm index 5d489b8269..af9d697d63 100644 --- a/code/game/objects/items/devices/defib.dm +++ b/code/game/objects/items/devices/defib.dm @@ -487,7 +487,6 @@ M.timeofdeath = 0 M.stat = UNCONSCIOUS //Life() can bring them back to consciousness if it needs to. - M.regenerate_icons() M.failed_last_breath = 0 //So mobs that died of oxyloss don't revive and have perpetual out of breath. M.reload_fullscreen() diff --git a/code/game/objects/items/devices/modkit.dm b/code/game/objects/items/devices/modkit.dm index ca7ace1a59..6ff95fe17d 100644 --- a/code/game/objects/items/devices/modkit.dm +++ b/code/game/objects/items/devices/modkit.dm @@ -7,7 +7,7 @@ desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user." icon_state = "modkit" var/parts = MODKIT_FULL - var/target_species = "Human" + var/target_species = SPECIES_HUMAN var/list/permitted_types = list( /obj/item/clothing/head/helmet/space/void, @@ -69,4 +69,4 @@ /obj/item/device/modkit/tajaran name = "tajaran hardsuit modification kit" desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user. This one looks like it's meant for Tajaran." - target_species = "Tajara" + target_species = SPECIES_TAJ diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 01b52affc5..105eb3aa8f 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -3,11 +3,12 @@ desc = "An updated, modular intercom that fits over the head. Takes encryption keys" var/radio_desc = "" icon_state = "headset" + item_state = null //To remove the radio's state matter = list(DEFAULT_WALL_MATERIAL = 75) subspace_transmission = 1 canhear_range = 0 // can't hear headsets from very far away slot_flags = SLOT_EARS - sprite_sheets = list("Teshari" = 'icons/mob/species/seromi/ears.dmi') + sprite_sheets = list(SPECIES_TESHARI = 'icons/mob/species/seromi/ears.dmi') var/translate_binary = 0 var/translate_hive = 0 @@ -63,6 +64,17 @@ return ..(freq, level) return -1 +/obj/item/device/radio/headset/get_worn_icon_state(var/slot_name) + var/append = "" + if(icon_override) + switch(slot_name) + if(slot_l_ear_str) + append = "_l" + if(slot_r_ear_str) + append = "_r" + + return "[..()][append]" + /obj/item/device/radio/headset/syndicate origin_tech = list(TECH_ILLEGAL = 3) syndie = 1 diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index ab475cdca9..feed24510b 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -105,7 +105,7 @@ HALOGEN COUNTER - Radcount on mobs BR = M.getBruteLoss() > 50 ? "Severe anatomical damage detected" : "Subject brute-force injury status O.K" if(M.status_flags & FAKEDEATH) OX = fake_oxy > 50 ? "Severe oxygen deprivation detected" : "Subject bloodstream oxygen level normal" - dat += "[OX] | [TX] | [BU] | [BR]" + dat += "[OX] | [TX] | [BU] | [BR]
" if(M.radiation) if(advscan >= 2 && showadvscan == 1) var/severity = "" diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 9a56cf94a7..2fa9ea63c7 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -106,13 +106,13 @@ if (M.use(1)) var/obj/item/weapon/secbot_assembly/ed209_assembly/B = new /obj/item/weapon/secbot_assembly/ed209_assembly B.loc = get_turf(src) - user << "You armed the robot frame." + to_chat(user, "You armed the robot frame.") if (user.get_inactive_hand()==src) user.remove_from_mob(src) user.put_in_inactive_hand(B) qdel(src) else - user << "You need one sheet of metal to arm the robot frame." + to_chat(user, "You need one sheet of metal to arm the robot frame.") if(istype(W, /obj/item/robot_parts/l_leg)) if(src.l_leg) return user.drop_item() @@ -149,9 +149,9 @@ src.chest = W src.updateicon() else if(!W:wires) - user << "You need to attach wires to it first!" + to_chat(user, "You need to attach wires to it first!") else - user << "You need to attach a cell to it first!" + to_chat(user, "You need to attach a cell to it first!") if(istype(W, /obj/item/robot_parts/head)) if(src.head) return @@ -161,16 +161,16 @@ src.head = W src.updateicon() else - user << "You need to attach a flash to it first!" + to_chat(user, "You need to attach a flash to it first!") if(istype(W, /obj/item/device/mmi)) var/obj/item/device/mmi/M = W if(check_completion()) if(!istype(loc,/turf)) - user << "You can't put \the [W] in, the frame has to be standing on the ground to be perfectly precise." + to_chat(user, "You can't put \the [W] in, the frame has to be standing on the ground to be perfectly precise.") return if(!M.brainmob) - user << "Sticking an empty [W] into the frame would sort of defeat the purpose." + to_chat(user, "Sticking an empty [W] into the frame would sort of defeat the purpose.") return if(!M.brainmob.key) var/ghost_can_reenter = 0 @@ -181,15 +181,15 @@ to_chat(user, "\The [W] is completely unresponsive; though it may be able to auto-resuscitate.") //Jamming a ghosted brain into a borg is likely detrimental, and may result in some problems. return if(!ghost_can_reenter) - user << "\The [W] is completely unresponsive; there's no point." + to_chat(user, "\The [W] is completely unresponsive; there's no point.") return if(M.brainmob.stat == DEAD) - user << "Sticking a dead [W] into the frame would sort of defeat the purpose." + to_chat(user, "Sticking a dead [W] into the frame would sort of defeat the purpose.") return if(jobban_isbanned(M.brainmob, "Cyborg")) - user << "This [W] does not seem to fit." + to_chat(user, "This [W] does not seem to fit.") return var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), unfinished = 1) @@ -228,7 +228,7 @@ qdel(src) else - user << "The MMI must go in after everything else!" + to_chat(user, "The MMI must go in after everything else!") if (istype(W, /obj/item/weapon/pen)) var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN) @@ -245,22 +245,22 @@ ..() if(istype(W, /obj/item/weapon/cell)) if(src.cell) - user << "You have already inserted a cell!" + to_chat(user, "You have already inserted a cell!") return else user.drop_item() W.loc = src src.cell = W - user << "You insert the cell!" + to_chat(user, "You insert the cell!") if(istype(W, /obj/item/stack/cable_coil)) if(src.wires) - user << "You have already inserted wire!" + to_chat(user, "You have already inserted wire!") return else var/obj/item/stack/cable_coil/coil = W coil.use(1) src.wires = 1.0 - user << "You insert the wire!" + to_chat(user, "You insert the wire!") return /obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob) @@ -269,14 +269,14 @@ if(istype(user,/mob/living/silicon/robot)) var/current_module = user.get_active_hand() if(current_module == W) - user << "How do you propose to do that?" + to_chat(user, "How do you propose to do that?") return else add_flashes(W,user) else add_flashes(W,user) else if(istype(W, /obj/item/weapon/stock_parts/manipulator)) - user << "You install some manipulators and modify the head, creating a functional spider-bot!" + to_chat(user, "You install some manipulators and modify the head, creating a functional spider-bot!") new /mob/living/simple_animal/spiderbot(get_turf(loc)) user.drop_item() qdel(W) @@ -286,24 +286,24 @@ /obj/item/robot_parts/head/proc/add_flashes(obj/item/W as obj, mob/user as mob) //Made into a seperate proc to avoid copypasta if(src.flash1 && src.flash2) - user << "You have already inserted the eyes!" + to_chat(user, "You have already inserted the eyes!") return else if(src.flash1) user.drop_item() W.loc = src src.flash2 = W - user << "You insert the flash into the eye socket!" + to_chat(user, "You insert the flash into the eye socket!") else user.drop_item() W.loc = src src.flash1 = W - user << "You insert the flash into the eye socket!" + to_chat(user, "You insert the flash into the eye socket!") /obj/item/robot_parts/emag_act(var/remaining_charges, var/mob/user) if(sabotaged) - user << "[src] is already sabotaged!" + to_chat(user, "[src] is already sabotaged!") else - user << "You short out the safeties." + to_chat(user, "You short out the safeties.") sabotaged = 1 return 1 diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 7cf1ffa141..63a2ea474e 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -210,6 +210,7 @@ R.add_language(LANGUAGE_TRADEBAND, 1) R.add_language(LANGUAGE_UNATHI, 1) R.add_language(LANGUAGE_SIIK, 1) + R.add_language(LANGUAGE_AKHANI, 1) R.add_language(LANGUAGE_SKRELLIAN, 1) R.add_language(LANGUAGE_SKRELLIANFAR, 0) R.add_language(LANGUAGE_GUTTER, 1) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index b812fb3c00..5d60c8485b 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -89,6 +89,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/weldermes = "USER lights NAME with FLAME" var/ignitermes = "USER lights NAME with FLAME" var/brand + blood_sprite_state = null //Can't bloody these /obj/item/clothing/mask/smokable/New() ..() diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index dd041bb46a..46ebb3bd40 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -18,7 +18,13 @@ var/cuff_sound = 'sound/weapons/handcuffs.ogg' var/cuff_type = "handcuffs" var/use_time = 30 - sprite_sheets = list("Teshari" = 'icons/mob/species/seromi/handcuffs.dmi') + sprite_sheets = list(SPECIES_TESHARI = 'icons/mob/species/seromi/handcuffs.dmi') + +/obj/item/weapon/handcuffs/get_worn_icon_state(var/slot_name) + if(slot_name == slot_handcuffed_str) + return "handcuff1" //Simple + + return ..() /obj/item/weapon/handcuffs/attack(var/mob/living/carbon/C, var/mob/living/user) @@ -95,6 +101,13 @@ target.update_inv_handcuffed() return 1 +/obj/item/weapon/handcuffs/equipped(var/mob/living/user,var/slot) + . = ..() + if(slot == slot_handcuffed) + user.drop_r_hand() + user.drop_l_hand() + user.stop_pulling() + var/last_chew = 0 /mob/living/carbon/human/RestrainedClickOn(var/atom/A) if (A != src) return ..() @@ -111,7 +124,7 @@ var/last_chew = 0 if (!O) return var/datum/gender/T = gender_datums[H.get_visible_gender()] - + var/s = "[H.name] chews on [T.his] [O.name]!" H.visible_message(s, "You chew on your [O.name]!") add_attack_logs(H,H,"chewed own [O.name]") @@ -207,6 +220,12 @@ var/last_chew = 0 breakouttime = 30 cuff_sound = 'sound/weapons/towelwipe.ogg' //Is there anything this sound can't do? +/obj/item/weapon/handcuffs/legcuffs/get_worn_icon_state(var/slot_name) + if(slot_name == slot_legcuffed_str) + return "legcuff1" + + return ..() + /obj/item/weapon/handcuffs/legcuffs/bola/can_place(var/mob/target, var/mob/user) if(user) //A ranged legcuff, until proper implementation as items it remains a projectile-only thing. return 1 @@ -298,3 +317,11 @@ var/last_chew = 0 target.legcuffed = lcuffs target.update_inv_legcuffed() return 1 + +/obj/item/weapon/handcuffs/legcuffs/equipped(var/mob/living/user,var/slot) + . = ..() + if(slot == slot_legcuffed) + if(user.m_intent != "walk") + user.m_intent = "walk" + if(user.hud_used && user.hud_used.move_intent) + user.hud_used.move_intent.icon_state = "walking" diff --git a/code/game/objects/items/weapons/id cards/station_ids.dm b/code/game/objects/items/weapons/id cards/station_ids.dm index 2568e9dc61..a0760ac61e 100644 --- a/code/game/objects/items/weapons/id cards/station_ids.dm +++ b/code/game/objects/items/weapons/id cards/station_ids.dm @@ -5,7 +5,7 @@ item_state = "card-id" sprite_sheets = list( - "Teshari" = 'icons/mob/species/seromi/id.dmi' + SPECIES_TESHARI = 'icons/mob/species/seromi/id.dmi' ) var/access = list() @@ -113,6 +113,12 @@ usr << "The fingerprint hash on the card is [fingerprint_hash]." return +/obj/item/weapon/card/id/get_worn_icon_state(var/slot_name) + if(slot_name == slot_wear_id_str) + return "id" //Legacy, just how it is. There's only one sprite. + + return ..() + /obj/item/weapon/card/id/initialize() . = ..() var/datum/job/J = job_master.GetJob(rank) diff --git a/code/game/objects/items/weapons/material/misc.dm b/code/game/objects/items/weapons/material/misc.dm index 97cf8b33db..87bfb0454d 100644 --- a/code/game/objects/items/weapons/material/misc.dm +++ b/code/game/objects/items/weapons/material/misc.dm @@ -100,7 +100,7 @@ user.put_in_hands(S) else visible_message("[user] starts compacting the snowball.", "You start compacting the snowball.") - if(do_after(user, 2000)) + if(do_after(user, 2 SECONDS)) var/atom/S = new /obj/item/weapon/material/snow/snowball/reinforced(user.loc) del(src) user.put_in_hands(S) @@ -108,6 +108,6 @@ /obj/item/weapon/material/snow/snowball/reinforced name = "snowball" desc = "A well-formed and fun snowball. It looks kind of dangerous." - icon_state = "snowball-reinf" + //icon_state = "reinf-snowball" force_divisor = 0.20 - thrown_force_divisor = 0.25 \ No newline at end of file + thrown_force_divisor = 0.25 diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 10072cd4cc..4d567019ae 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -8,7 +8,7 @@ icon = 'icons/obj/clothing/backpack.dmi' icon_state = "backpack" sprite_sheets = list( - "Teshari" = 'icons/mob/species/seromi/back.dmi' + SPECIES_TESHARI = 'icons/mob/species/seromi/back.dmi' ) w_class = ITEMSIZE_LARGE slot_flags = SLOT_BACK diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 733201b7f6..efd82f5517 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -8,7 +8,7 @@ max_w_class = ITEMSIZE_NORMAL slot_flags = SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined") - sprite_sheets = list("Teshari" = 'icons/mob/species/seromi/belt.dmi') + sprite_sheets = list(SPECIES_TESHARI = 'icons/mob/species/seromi/belt.dmi') var/show_above_suit = 0 @@ -22,6 +22,16 @@ show_above_suit = !show_above_suit update_icon() +//Some belts have sprites to show icons +/obj/item/weapon/storage/belt/make_worn_icon(var/body_type,var/slot_name,var/inhands,var/default_icon,var/default_layer = 0) + var/image/standing = ..() + if(!inhands && contents.len) + for(var/obj/item/i in contents) + var/i_state = i.item_state + if(!i_state) i_state = i.icon_state + standing.add_overlay(image(icon = INV_BELT_DEF_ICON, icon_state = i_state)) + return standing + /obj/item/weapon/storage/update_icon() if (ismob(src.loc)) var/mob/M = src.loc diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 64d6252a2f..1bc9fa761d 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -23,7 +23,7 @@ name = "box" desc = "It's just an ordinary box." icon_state = "box" - item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + item_state = "syringe_kit" var/foldable = /obj/item/stack/material/cardboard // BubbleWrap - if set, can be folded (when empty) into a sheet of cardboard max_w_class = ITEMSIZE_SMALL max_storage_space = INVENTORY_BOX_SPACE diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index e85982ea80..03ad104810 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -354,12 +354,10 @@ //such as when picking up all the items on a tile with one click. /obj/item/weapon/storage/proc/handle_item_insertion(obj/item/W as obj, prevent_warning = 0) if(!istype(W)) return 0 + if(usr) - usr.remove_from_mob(W) - usr.update_icons() //update our overlays - W.forceMove(src) - W.on_enter_storage(src) - if(usr) + usr.remove_from_mob(W,target = src) //If given a target, handles forceMove() + W.on_enter_storage(src) if (usr.client && usr.s_active != src) usr.client.screen -= W W.dropped(usr) @@ -377,6 +375,10 @@ src.orient2hud(usr) if(usr.s_active) usr.s_active.show_to(usr) + else + W.forceMove(src) + W.on_enter_storage(src) + update_icon() return 1 diff --git a/code/game/objects/items/weapons/syndie.dm b/code/game/objects/items/weapons/syndie.dm index 3ba85b0bfc..c47489272b 100644 --- a/code/game/objects/items/weapons/syndie.dm +++ b/code/game/objects/items/weapons/syndie.dm @@ -63,6 +63,12 @@ T.dismantle_wall(1) qdel(src) +/obj/item/weapon/syndie/c4explosive/attackby(obj/item/weapon/W, mob/user) + if(istype(W, /obj/item/weapon/flame/lighter/zippo/c4detonator)) + var/obj/item/weapon/flame/lighter/zippo/c4detonator/D = W + D.bomb = src + return + ..() /*Detonator, disguised as a lighter*/ /*Click it when closed to open, when open to bring up a prompt asking you if you want to close it or press the button.*/ diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index d17cb21472..49608c649a 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -8,7 +8,7 @@ var/list/global/tank_gauge_cache = list() name = "tank" icon = 'icons/obj/tank.dmi' sprite_sheets = list( - "Teshari" = 'icons/mob/species/seromi/back.dmi' + SPECIES_TESHARI = 'icons/mob/species/seromi/back.dmi' ) var/gauge_icon = "indicator_tank" diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index ae6838d084..ed5756eade 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -236,7 +236,7 @@ ..() /obj/item/weapon/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob) - if(user.a_intent == I_HELP && (C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/handcuffs/cable))) + if(istype(C) && user.a_intent == I_HELP && (C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/handcuffs/cable))) usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\ "You cut \the [C]'s restraints with \the [src]!",\ "You hear cable being cut.") diff --git a/code/game/objects/random/_random.dm b/code/game/objects/random/_random.dm new file mode 100644 index 0000000000..29272a7247 --- /dev/null +++ b/code/game/objects/random/_random.dm @@ -0,0 +1,138 @@ +/obj/random + name = "random object" + desc = "This item type is used to spawn random objects at round-start" + icon = 'icons/misc/mark.dmi' + icon_state = "rup" + var/spawn_nothing_percentage = 0 // this variable determines the likelyhood that this random object will not spawn anything + +// creates a new object and deletes itself +/obj/random/New() + ..() + spawn() + if(istype(src.loc, /obj/structure/loot_pile)) //Spawning from a lootpile is weird, need to wait until we're out of it to do our work. + while(istype(src.loc, /obj/structure/loot_pile)) + sleep(1) + if (!prob(spawn_nothing_percentage)) + spawn_item() + qdel(src) + +// this function should return a specific item to spawn +/obj/random/proc/item_to_spawn() + return 0 + +// creates the random item +/obj/random/proc/spawn_item() + var/build_path = item_to_spawn() + + var/atom/A = new build_path(src.loc) + if(pixel_x || pixel_y) + A.pixel_x = pixel_x + A.pixel_y = pixel_y + +var/list/random_junk_ +var/list/random_useful_ +/proc/get_random_useful_type() + if(!random_useful_) + random_useful_ = subtypesof(/obj/item/weapon/pen/crayon) + random_useful_ += /obj/item/weapon/pen + random_useful_ += /obj/item/weapon/pen/blue + random_useful_ += /obj/item/weapon/pen/red + random_useful_ += /obj/item/weapon/pen/multi + random_useful_ += /obj/item/weapon/storage/box/matches + random_useful_ += /obj/item/stack/material/cardboard + return pick(random_useful_) + +/proc/get_random_junk_type() + if(prob(20)) // Misc. clutter + return /obj/effect/decal/cleanable/generic + if(prob(70)) // Misc. junk + if(!random_junk_) + random_junk_ = subtypesof(/obj/item/trash) + random_junk_ += typesof(/obj/item/weapon/cigbutt) + random_junk_ += /obj/effect/decal/cleanable/spiderling_remains + random_junk_ += /obj/effect/decal/remains/mouse + random_junk_ += /obj/effect/decal/remains/robot + random_junk_ += /obj/item/weapon/paper/crumpled + random_junk_ += /obj/item/inflatable/torn + random_junk_ += /obj/effect/decal/cleanable/molten_item + random_junk_ += /obj/item/weapon/material/shard + + random_junk_ -= /obj/item/trash/plate + random_junk_ -= /obj/item/trash/snack_bowl + random_junk_ -= /obj/item/trash/syndi_cakes + random_junk_ -= /obj/item/trash/tray + return pick(random_junk_) + // Misc. actually useful stuff + return get_random_useful_type() + +///////////////////////////////////////////////////////////////////////// + +/obj/random/single + name = "randomly spawned object" + desc = "This item type is used to randomly spawn a given object at round-start" + icon_state = "x3" + var/spawn_object = null + +/obj/random/single/item_to_spawn() + return ispath(spawn_object) ? spawn_object : text2path(spawn_object) + +//Multiple Object Spawn + +/obj/random/multiple + +/obj/random/multiple/spawn_item() + var/list/things_to_make = item_to_spawn() + for(var/new_type in things_to_make) + new new_type(src.loc) + +/* +// Multi Point Spawn +// Selects one spawn point out of a group of points with the same ID and asks it to generate its items +*/ +var/list/multi_point_spawns + +/obj/random_multi + name = "random object spawn point" + desc = "This item type is used to spawn random objects at round-start. Only one spawn point for a given group id is selected." + icon = 'icons/misc/mark.dmi' + icon_state = "x3" + invisibility = INVISIBILITY_MAXIMUM + var/id // Group id + var/weight // Probability weight for this spawn point + +/obj/random_multi/initialize() + . = ..() + weight = max(1, round(weight)) + + if(!multi_point_spawns) + multi_point_spawns = list() + var/list/spawnpoints = multi_point_spawns[id] + if(!spawnpoints) + spawnpoints = list() + multi_point_spawns[id] = spawnpoints + spawnpoints[src] = weight + +/obj/random_multi/Destroy() + var/list/spawnpoints = multi_point_spawns[id] + spawnpoints -= src + if(!spawnpoints.len) + multi_point_spawns -= id + . = ..() + +/obj/random_multi/proc/generate_items() + return + +/obj/random_multi/single_item + var/item_path // Item type to spawn + +/obj/random_multi/single_item/generate_items() + new item_path(loc) + +/hook/roundstart/proc/generate_multi_spawn_items() + for(var/id in multi_point_spawns) + var/list/spawn_points = multi_point_spawns[id] + var/obj/random_multi/rm = pickweight(spawn_points) + rm.generate_items() + for(var/entry in spawn_points) + qdel(entry) + return 1 \ No newline at end of file diff --git a/code/game/objects/random/guns_and_ammo.dm b/code/game/objects/random/guns_and_ammo.dm new file mode 100644 index 0000000000..a910881a76 --- /dev/null +++ b/code/game/objects/random/guns_and_ammo.dm @@ -0,0 +1,129 @@ +/obj/random/energy + name = "Random Energy Weapon" + desc = "This is a random security weapon." + icon = 'icons/obj/gun.dmi' + icon_state = "energykill100" + +/obj/random/energy/item_to_spawn() + return pick(prob(3);/obj/item/weapon/gun/energy/laser, + prob(4);/obj/item/weapon/gun/energy/gun, + prob(3);/obj/item/weapon/gun/energy/gun/burst, + prob(1);/obj/item/weapon/gun/energy/gun/nuclear, + prob(2);/obj/item/weapon/gun/energy/retro, + prob(2);/obj/item/weapon/gun/energy/lasercannon, + prob(3);/obj/item/weapon/gun/energy/xray, + prob(1);/obj/item/weapon/gun/energy/sniperrifle, + prob(1);/obj/item/weapon/gun/energy/plasmastun, + prob(2);/obj/item/weapon/gun/energy/ionrifle, + prob(2);/obj/item/weapon/gun/energy/ionrifle/pistol, + prob(3);/obj/item/weapon/gun/energy/toxgun, + prob(4);/obj/item/weapon/gun/energy/taser, + prob(2);/obj/item/weapon/gun/energy/crossbow/largecrossbow, + prob(4);/obj/item/weapon/gun/energy/stunrevolver) + +/obj/random/energy/sec + name = "Random Security Energy Weapon" + desc = "This is a random security weapon." + icon = 'icons/obj/gun.dmi' + icon_state = "energykill100" + +/obj/random/energy/sec/item_to_spawn() + return pick(prob(2);/obj/item/weapon/gun/energy/laser, + prob(2);/obj/item/weapon/gun/energy/gun) + +/obj/random/projectile + name = "Random Projectile Weapon" + desc = "This is a random projectile weapon." + icon = 'icons/obj/gun.dmi' + icon_state = "revolver" + +/obj/random/projectile/item_to_spawn() + return pick(prob(3);/obj/item/weapon/gun/projectile/automatic/wt550, + prob(3);/obj/item/weapon/gun/projectile/automatic/mini_uzi, + prob(3);/obj/item/weapon/gun/projectile/automatic/tommygun, + prob(2);/obj/item/weapon/gun/projectile/automatic/c20r, + prob(2);/obj/item/weapon/gun/projectile/automatic/sts35, + prob(2);/obj/item/weapon/gun/projectile/automatic/z8, + prob(4);/obj/item/weapon/gun/projectile/colt, + prob(2);/obj/item/weapon/gun/projectile/deagle, + prob(1);/obj/item/weapon/gun/projectile/deagle/camo, + prob(1);/obj/item/weapon/gun/projectile/deagle/gold, + prob(3);/obj/item/weapon/gun/projectile/derringer, + prob(1);/obj/item/weapon/gun/projectile/heavysniper, + prob(4);/obj/item/weapon/gun/projectile/luger, + prob(3);/obj/item/weapon/gun/projectile/luger/brown, + prob(4);/obj/item/weapon/gun/projectile/sec, + prob(3);/obj/item/weapon/gun/projectile/sec/wood, + prob(4);/obj/item/weapon/gun/projectile/p92x, + prob(3);/obj/item/weapon/gun/projectile/p92x/brown, + prob(4);/obj/item/weapon/gun/projectile/pistol, + prob(5);/obj/item/weapon/gun/projectile/pirate, + prob(2);/obj/item/weapon/gun/projectile/revolver, + prob(4);/obj/item/weapon/gun/projectile/revolver/deckard, + prob(4);/obj/item/weapon/gun/projectile/revolver/detective, + prob(2);/obj/item/weapon/gun/projectile/revolver/judge, + prob(3);/obj/item/weapon/gun/projectile/revolver/lemat, + prob(2);/obj/item/weapon/gun/projectile/revolver/mateba, + prob(4);/obj/item/weapon/gun/projectile/shotgun/doublebarrel, + prob(3);/obj/item/weapon/gun/projectile/shotgun/doublebarrel/sawn, + prob(3);/obj/item/weapon/gun/projectile/shotgun/pump, + prob(2);/obj/item/weapon/gun/projectile/shotgun/pump/combat, + prob(4);/obj/item/weapon/gun/projectile/shotgun/pump/rifle, + prob(3);/obj/item/weapon/gun/projectile/shotgun/pump/rifle/lever, + prob(2);/obj/item/weapon/gun/projectile/silenced) + +/obj/random/projectile/sec + name = "Random Security Projectile Weapon" + desc = "This is a random security weapon." + icon = 'icons/obj/gun.dmi' + icon_state = "revolver" + +/obj/random/projectile/sec/item_to_spawn() + return pick(prob(3);/obj/item/weapon/gun/projectile/shotgun/pump, + prob(2);/obj/item/weapon/gun/projectile/automatic/wt550, + prob(1);/obj/item/weapon/gun/projectile/shotgun/pump/combat) + +/obj/random/handgun + name = "Random Handgun" + desc = "This is a random sidearm." + icon = 'icons/obj/gun.dmi' + icon_state = "secgundark" + +/obj/random/handgun/item_to_spawn() + return pick(prob(4);/obj/item/weapon/gun/projectile/sec, + prob(4);/obj/item/weapon/gun/projectile/p92x, + prob(3);/obj/item/weapon/gun/projectile/sec/wood, + prob(3);/obj/item/weapon/gun/projectile/p92x/brown, + prob(3);/obj/item/weapon/gun/projectile/colt, + prob(2);/obj/item/weapon/gun/projectile/luger, + prob(2);/obj/item/weapon/gun/energy/gun, + prob(2);/obj/item/weapon/gun/projectile/pistol, + prob(1);/obj/item/weapon/gun/energy/retro, + prob(1);/obj/item/weapon/gun/projectile/luger/brown) + +/obj/random/handgun/sec + name = "Random Security Handgun" + desc = "This is a random security sidearm." + icon = 'icons/obj/gun.dmi' + icon_state = "secgundark" + +/obj/random/handgun/sec/item_to_spawn() + return pick(prob(3);/obj/item/weapon/gun/projectile/sec, + prob(1);/obj/item/weapon/gun/projectile/sec/wood) + +/obj/random/ammo + name = "Random Ammunition" + desc = "This is random security ammunition." + icon = 'icons/obj/ammo.dmi' + icon_state = "45-10" + +/obj/random/ammo/item_to_spawn() + return pick(prob(6);/obj/item/weapon/storage/box/beanbags, + prob(2);/obj/item/weapon/storage/box/shotgunammo, + prob(4);/obj/item/weapon/storage/box/shotgunshells, + prob(1);/obj/item/weapon/storage/box/stunshells, + prob(2);/obj/item/ammo_magazine/m45, + prob(4);/obj/item/ammo_magazine/m45/rubber, + prob(4);/obj/item/ammo_magazine/m45/flash, + prob(2);/obj/item/ammo_magazine/m9mmt, + prob(6);/obj/item/ammo_magazine/m9mmt/rubber) \ No newline at end of file diff --git a/code/game/objects/random/maintenance.dm b/code/game/objects/random/maintenance.dm new file mode 100644 index 0000000000..fa126858cc --- /dev/null +++ b/code/game/objects/random/maintenance.dm @@ -0,0 +1,314 @@ +/obj/random/maintenance //Clutter and loot for maintenance and away missions + name = "random maintenance item" + desc = "This is a random maintenance item." + icon = 'icons/obj/items.dmi' + icon_state = "gift1" + +/obj/random/maintenance/item_to_spawn() + return pick(prob(300);/obj/random/tech_supply, + prob(200);/obj/random/medical, + prob(100);/obj/random/firstaid, + prob(10);/obj/random/contraband, + prob(50);/obj/random/action_figure, + prob(50);/obj/random/plushie, + prob(200);/obj/random/junk, + prob(200);/obj/random/material, + prob(50);/obj/random/toy, + prob(100);/obj/random/tank, + prob(50);/obj/random/soap, + prob(60);/obj/random/drinkbottle, + prob(500);/obj/random/maintenance/clean) + +/obj/random/maintenance/clean +/*Maintenance loot lists without the trash, for use inside things. +Individual items to add to the maintenance list should go here, if you add +something, make sure it's not in one of the other lists.*/ + name = "random clean maintenance item" + desc = "This is a random clean maintenance item." + icon = 'icons/obj/items.dmi' + icon_state = "gift1" + +/obj/random/maintenance/clean/item_to_spawn() + return pick(prob(10);/obj/random/contraband, + prob(2);/obj/item/device/flashlight/flare, + prob(2);/obj/item/device/flashlight/glowstick, + prob(2);/obj/item/device/flashlight/glowstick/blue, + prob(1);/obj/item/device/flashlight/glowstick/orange, + prob(1);/obj/item/device/flashlight/glowstick/red, + prob(1);/obj/item/device/flashlight/glowstick/yellow, + prob(1);/obj/item/device/flashlight/pen, + prob(4);/obj/item/weapon/cell, + prob(4);/obj/item/weapon/cell/device, + prob(3);/obj/item/weapon/cell/high, + prob(2);/obj/item/weapon/cell/super, + prob(5);/obj/random/cigarettes, + prob(3);/obj/item/clothing/mask/gas, + prob(2);/obj/item/clothing/mask/gas/half, + prob(4);/obj/item/clothing/mask/breath, + prob(2);/obj/item/weapon/reagent_containers/glass/rag, + prob(4);/obj/item/weapon/reagent_containers/food/snacks/liquidfood, + prob(2);/obj/item/weapon/storage/secure/briefcase, + prob(4);/obj/item/weapon/storage/briefcase, + prob(5);/obj/item/weapon/storage/backpack, + prob(5);/obj/item/weapon/storage/backpack/satchel/norm, + prob(4);/obj/item/weapon/storage/backpack/satchel, + prob(3);/obj/item/weapon/storage/backpack/dufflebag, + prob(1);/obj/item/weapon/storage/backpack/dufflebag/syndie, + prob(5);/obj/item/weapon/storage/box, + prob(3);/obj/item/weapon/storage/box/donkpockets, + prob(2);/obj/item/weapon/storage/box/sinpockets, + prob(1);/obj/item/weapon/storage/box/cups, + prob(3);/obj/item/weapon/storage/box/mousetraps, + prob(3);/obj/item/weapon/storage/wallet, + prob(1);/obj/item/device/paicard, + prob(2);/obj/item/clothing/shoes/galoshes, + prob(1);/obj/item/clothing/shoes/syndigaloshes, + prob(4);/obj/item/clothing/shoes/black, + prob(4);/obj/item/clothing/shoes/laceup, + prob(4);/obj/item/clothing/shoes/black, + prob(4);/obj/item/clothing/shoes/leather, + prob(1);/obj/item/clothing/gloves/yellow, + prob(3);/obj/item/clothing/gloves/botanic_leather, + prob(2);/obj/item/clothing/gloves/sterile/latex, + prob(5);/obj/item/clothing/gloves/white, + prob(5);/obj/item/clothing/gloves/rainbow, + prob(2);/obj/item/clothing/gloves/fyellow, + prob(1);/obj/item/clothing/glasses/sunglasses, + prob(3);/obj/item/clothing/glasses/meson, + prob(2);/obj/item/clothing/glasses/meson/prescription, + prob(1);/obj/item/clothing/glasses/welding, + prob(1);/obj/item/clothing/head/bio_hood/general, + prob(4);/obj/item/clothing/head/hardhat, + prob(3);/obj/item/clothing/head/hardhat/red, + prob(1);/obj/item/clothing/head/ushanka, + prob(2);/obj/item/clothing/head/welding, + prob(4);/obj/item/clothing/suit/storage/hazardvest, + prob(1);/obj/item/clothing/suit/space/emergency, + prob(3);/obj/item/clothing/suit/storage/toggle/bomber, + prob(1);/obj/item/clothing/suit/bio_suit/general, + prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/black, + prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/blue, + prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/red, + prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/yellow, + prob(3);/obj/item/clothing/suit/storage/toggle/brown_jacket, + prob(3);/obj/item/clothing/suit/storage/toggle/leather_jacket, + prob(1);/obj/item/clothing/suit/storage/vest/press, + prob(3);/obj/item/clothing/suit/storage/apron, + prob(4);/obj/item/clothing/under/color/grey, + prob(2);/obj/item/clothing/under/syndicate/tacticool, + prob(2);/obj/item/clothing/under/pants/camo, + prob(1);/obj/item/clothing/under/harness, + prob(1);/obj/item/clothing/under/tactical, + prob(3);/obj/item/clothing/accessory/storage/webbing, + prob(4);/obj/item/weapon/spacecash/c1, + prob(3);/obj/item/weapon/spacecash/c10, + prob(3);/obj/item/weapon/spacecash/c20, + prob(1);/obj/item/weapon/spacecash/c50, + prob(1);/obj/item/weapon/spacecash/c100, + prob(3);/obj/item/weapon/camera_assembly, + prob(4);/obj/item/weapon/caution, + prob(3);/obj/item/weapon/caution/cone, + prob(1);/obj/item/weapon/card/emag_broken, + prob(2);/obj/item/device/camera, + prob(3);/obj/item/device/pda, + prob(3);/obj/item/device/radio/headset) + +/obj/random/maintenance/security +/*Maintenance loot list. This one is for around security areas*/ + name = "random security maintenance item" + desc = "This is a random security maintenance item." + icon = 'icons/obj/items.dmi' + icon_state = "gift1" + +/obj/random/maintenance/security/item_to_spawn() + return pick(prob(320);/obj/random/maintenance/clean, + prob(2);/obj/item/device/flashlight/maglight, + prob(2);/obj/item/device/flash, + prob(1);/obj/item/weapon/cell/device/weapon, + prob(1);/obj/item/clothing/mask/gas/swat, + prob(1);/obj/item/clothing/mask/gas/syndicate, + prob(2);/obj/item/clothing/mask/balaclava, + prob(1);/obj/item/clothing/mask/balaclava/tactical, + prob(3);/obj/item/weapon/storage/backpack/security, + prob(3);/obj/item/weapon/storage/backpack/satchel/sec, + prob(2);/obj/item/weapon/storage/backpack/messenger/sec, + prob(2);/obj/item/weapon/storage/backpack/dufflebag/sec, + prob(1);/obj/item/weapon/storage/backpack/dufflebag/syndie/ammo, + prob(1);/obj/item/weapon/storage/backpack/dufflebag/syndie/med, + prob(2);/obj/item/weapon/storage/box/swabs, + prob(2);/obj/item/weapon/storage/belt/security, + prob(1);/obj/item/weapon/grenade/flashbang, + prob(1);/obj/item/weapon/melee/baton, + prob(1);/obj/item/weapon/reagent_containers/spray/pepper, + prob(3);/obj/item/clothing/shoes/boots/jackboots, + prob(1);/obj/item/clothing/shoes/boots/swat, + prob(1);/obj/item/clothing/shoes/boots/combat, + prob(1);/obj/item/clothing/gloves/swat, + prob(1);/obj/item/clothing/gloves/combat, + prob(1);/obj/item/clothing/glasses/sunglasses/big, + prob(2);/obj/item/clothing/glasses/hud/security, + prob(1);/obj/item/clothing/glasses/sunglasses/sechud, + prob(1);/obj/item/clothing/glasses/sunglasses/sechud/aviator, + prob(1);/obj/item/clothing/glasses/sunglasses/sechud/tactical, + prob(3);/obj/item/clothing/head/beret/sec, + prob(3);/obj/item/clothing/head/beret/sec/corporate/officer, + prob(3);/obj/item/clothing/head/beret/sec/navy/officer, + prob(2);/obj/item/clothing/head/helmet, + prob(4);/obj/item/clothing/head/soft/sec, + prob(4);/obj/item/clothing/head/soft/sec/corp, + prob(3);/obj/item/clothing/suit/armor/vest, + prob(2);/obj/item/clothing/suit/armor/vest/security, + prob(2);/obj/item/clothing/suit/storage/vest/officer, + prob(1);/obj/item/clothing/suit/storage/vest/detective, + prob(1);/obj/item/clothing/suit/storage/vest/press, + prob(2);/obj/item/clothing/accessory/storage/black_vest, + prob(2);/obj/item/clothing/accessory/storage/black_drop_pouches, + prob(1);/obj/item/clothing/accessory/holster/leg, + prob(1);/obj/item/clothing/accessory/holster/hip, + prob(1);/obj/item/clothing/accessory/holster/waist, + prob(1);/obj/item/clothing/accessory/holster/armpit, + prob(2);/obj/item/clothing/ears/earmuffs, + prob(2);/obj/item/weapon/handcuffs,) + +/obj/random/maintenance/medical +/*Maintenance loot list. This one is for around medical areas*/ + name = "random medical maintenance item" + desc = "This is a random medical maintenance item." + icon = 'icons/obj/items.dmi' + icon_state = "gift1" + +/obj/random/maintenance/medical/item_to_spawn() + return pick(prob(320);/obj/random/maintenance/clean, + prob(25);/obj/random/medical/lite, + prob(2);/obj/item/clothing/mask/breath/medical, + prob(2);/obj/item/clothing/mask/surgical, + prob(5);/obj/item/weapon/storage/backpack/medic, + prob(5);/obj/item/weapon/storage/backpack/satchel/med, + prob(5);/obj/item/weapon/storage/backpack/messenger/med, + prob(3);/obj/item/weapon/storage/backpack/dufflebag/med, + prob(1);/obj/item/weapon/storage/backpack/dufflebag/syndie/med, + prob(2);/obj/item/weapon/storage/box/autoinjectors, + prob(3);/obj/item/weapon/storage/box/beakers, + prob(2);/obj/item/weapon/storage/box/bodybags, + prob(3);/obj/item/weapon/storage/box/syringes, + prob(3);/obj/item/weapon/storage/box/gloves, + prob(2);/obj/item/weapon/storage/belt/medical/emt, + prob(2);/obj/item/weapon/storage/belt/medical, + prob(1);/obj/item/clothing/shoes/boots/combat, + prob(3);/obj/item/clothing/shoes/white, + prob(2);/obj/item/clothing/gloves/sterile/nitrile, + prob(5);/obj/item/clothing/gloves/white, + prob(2);/obj/item/clothing/glasses/hud/health, + prob(1);/obj/item/clothing/glasses/hud/health/prescription, + prob(1);/obj/item/clothing/head/bio_hood/virology, + prob(4);/obj/item/clothing/suit/storage/toggle/labcoat, + prob(1);/obj/item/clothing/suit/bio_suit/general, + prob(2);/obj/item/clothing/under/rank/medical/paramedic, + prob(2);/obj/item/clothing/accessory/storage/black_vest, + prob(2);/obj/item/clothing/accessory/storage/white_vest, + prob(1);/obj/item/clothing/accessory/storage/white_drop_pouches, + prob(1);/obj/item/clothing/accessory/storage/black_drop_pouches, + prob(2);/obj/item/clothing/accessory/stethoscope) + +/obj/random/maintenance/engineering +/*Maintenance loot list. This one is for around medical areas*/ + name = "random engineering maintenance item" + desc = "This is a random engineering maintenance item." + icon = 'icons/obj/items.dmi' + icon_state = "gift1" + +/obj/random/maintenance/engineering/item_to_spawn() + return pick(prob(320);/obj/random/maintenance/clean, + prob(2);/obj/item/device/flashlight/maglight, + prob(3);/obj/item/clothing/mask/gas/half, + prob(2);/obj/item/clothing/mask/balaclava, + prob(2);/obj/item/weapon/storage/briefcase/inflatable, + prob(5);/obj/item/weapon/storage/backpack/industrial, + prob(5);/obj/item/weapon/storage/backpack/satchel/eng, + prob(5);/obj/item/weapon/storage/backpack/messenger/engi, + prob(3);/obj/item/weapon/storage/backpack/dufflebag/eng, + prob(5);/obj/item/weapon/storage/box, + prob(2);/obj/item/weapon/storage/belt/utility/full, + prob(3);/obj/item/weapon/storage/belt/utility, + prob(3);/obj/item/clothing/head/beret/engineering, + prob(3);/obj/item/clothing/head/soft/yellow, + prob(2);/obj/item/clothing/head/orangebandana, + prob(2);/obj/item/clothing/head/hardhat/dblue, + prob(2);/obj/item/clothing/head/hardhat/orange, + prob(1);/obj/item/clothing/glasses/welding, + prob(2);/obj/item/clothing/head/welding, + prob(4);/obj/item/clothing/suit/storage/hazardvest, + prob(2);/obj/item/clothing/under/overalls, + prob(3);/obj/item/clothing/shoes/boots/workboots, + prob(1);/obj/item/clothing/shoes/magboots, + prob(2);/obj/item/clothing/accessory/storage/black_vest, + prob(2);/obj/item/clothing/accessory/storage/brown_vest, + prob(1);/obj/item/clothing/accessory/storage/brown_drop_pouches, + prob(3);/obj/item/clothing/ears/earmuffs, + prob(1);/obj/item/weapon/beartrap, + prob(2);/obj/item/weapon/handcuffs) + +/obj/random/maintenance/research +/*Maintenance loot list. This one is for around medical areas*/ + name = "random research maintenance item" + desc = "This is a random research maintenance item." + icon = 'icons/obj/items.dmi' + icon_state = "gift1" + +/obj/random/maintenance/research/item_to_spawn() + return pick(prob(320);/obj/random/maintenance/clean, + prob(3);/obj/item/device/analyzer/plant_analyzer, + prob(1);/obj/item/device/flash/synthetic, + prob(2);/obj/item/weapon/bucket_sensor, + prob(1);/obj/item/weapon/cell/device/weapon, + prob(5);/obj/item/weapon/storage/backpack/toxins, + prob(5);/obj/item/weapon/storage/backpack/satchel/tox, + prob(5);/obj/item/weapon/storage/backpack/messenger/tox, + prob(2);/obj/item/weapon/storage/excavation, + prob(1);/obj/item/weapon/storage/backpack/holding, + prob(3);/obj/item/weapon/storage/box/beakers, + prob(3);/obj/item/weapon/storage/box/syringes, + prob(3);/obj/item/weapon/storage/box/gloves, + prob(2);/obj/item/clothing/gloves/sterile/latex, + prob(4);/obj/item/clothing/glasses/science, + prob(3);/obj/item/clothing/glasses/material, + prob(1);/obj/item/clothing/head/beret/purple, + prob(1);/obj/item/clothing/head/bio_hood/scientist, + prob(4);/obj/item/clothing/suit/storage/toggle/labcoat, + prob(4);/obj/item/clothing/suit/storage/toggle/labcoat/science, + prob(1);/obj/item/clothing/suit/bio_suit/scientist, + prob(4);/obj/item/clothing/under/rank/scientist, + prob(2);/obj/item/clothing/under/rank/scientist_new) + +/obj/random/maintenance/cargo +/*Maintenance loot list. This one is for around cargo areas*/ + name = "random cargo maintenance item" + desc = "This is a random cargo maintenance item." + icon = 'icons/obj/items.dmi' + icon_state = "gift1" + +/obj/random/maintenance/cargo/item_to_spawn() + return pick(prob(320);/obj/random/maintenance/clean, + prob(3);/obj/item/device/flashlight/lantern, + prob(4);/obj/item/weapon/pickaxe, + prob(5);/obj/item/weapon/storage/backpack/industrial, + prob(5);/obj/item/weapon/storage/backpack/satchel/norm, + prob(3);/obj/item/weapon/storage/backpack/dufflebag, + prob(1);/obj/item/weapon/storage/backpack/dufflebag/syndie/ammo, + prob(1);/obj/item/weapon/storage/toolbox/syndicate, + prob(1);/obj/item/weapon/storage/belt/utility/full, + prob(2);/obj/item/weapon/storage/belt/utility, + prob(4);/obj/item/device/toner, + prob(1);/obj/item/device/destTagger, + prob(3);/obj/item/clothing/glasses/material, + prob(3);/obj/item/clothing/head/soft/yellow, + prob(4);/obj/item/clothing/suit/storage/hazardvest, + prob(3);/obj/item/clothing/suit/storage/apron/overalls, + prob(4);/obj/item/clothing/suit/storage/apron, + prob(2);/obj/item/clothing/under/syndicate/tacticool, + prob(1);/obj/item/clothing/under/syndicate/combat, + prob(2);/obj/item/clothing/accessory/storage/black_vest, + prob(2);/obj/item/clothing/accessory/storage/brown_vest, + prob(3);/obj/item/clothing/ears/earmuffs, + prob(1);/obj/item/weapon/beartrap, + prob(2);/obj/item/weapon/handcuffs,) diff --git a/code/game/objects/random/mapping.dm b/code/game/objects/random/mapping.dm new file mode 100644 index 0000000000..57ff7acdcd --- /dev/null +++ b/code/game/objects/random/mapping.dm @@ -0,0 +1,395 @@ +/* +// Least descriptive filename? +// This is where all of the things that aren't really loot should go. +// Barricades, mines, etc. +*/ + +/obj/random/junk //Broken items, or stuff that could be picked up + name = "random junk" + desc = "This is some random junk." + icon = 'icons/obj/trash.dmi' + icon_state = "trashbag3" + +/obj/random/junk/item_to_spawn() + return get_random_junk_type() + +/obj/random/trash //Mostly remains and cleanable decals. Stuff a janitor could clean up + name = "random trash" + desc = "This is some random trash." + icon = 'icons/effects/effects.dmi' + icon_state = "greenglow" + +/obj/random/trash/item_to_spawn() + return pick(/obj/effect/decal/remains/lizard, + /obj/effect/decal/cleanable/blood/gibs/robot, + /obj/effect/decal/cleanable/blood/oil, + /obj/effect/decal/cleanable/blood/oil/streak, + /obj/effect/decal/cleanable/spiderling_remains, + /obj/effect/decal/remains/mouse, + /obj/effect/decal/cleanable/vomit, + /obj/effect/decal/cleanable/blood/splatter, + /obj/effect/decal/cleanable/ash, + /obj/effect/decal/cleanable/generic, + /obj/effect/decal/cleanable/flour, + /obj/effect/decal/cleanable/dirt, + /obj/effect/decal/remains/robot) + +/obj/random/obstruction //Large objects to block things off in maintenance + name = "random obstruction" + desc = "This is a random obstruction." + icon = 'icons/obj/cult.dmi' + icon_state = "cultgirder" + +/obj/random/obstruction/item_to_spawn() + return pick(/obj/structure/barricade, + /obj/structure/girder, + /obj/structure/girder/displaced, + /obj/structure/girder/reinforced, + /obj/structure/grille, + /obj/structure/grille/broken, + /obj/structure/foamedmetal, + /obj/structure/inflatable, + /obj/structure/inflatable/door) + +/obj/random/landmine + name = "Random Land Mine" + desc = "This is a random land mine." + icon = 'icons/obj/weapons.dmi' + icon_state = "uglymine" + spawn_nothing_percentage = 25 + +/obj/random/landmine/item_to_spawn() + return pick(prob(30);/obj/effect/mine, + prob(25);/obj/effect/mine/frag, + prob(25);/obj/effect/mine/emp, + prob(10);/obj/effect/mine/stun, + prob(10);/obj/effect/mine/incendiary,) + +/obj/random_multi/single_item/captains_spare_id + name = "Multi Point - Captain's Spare" + id = "Captain's spare id" + item_path = /obj/item/weapon/card/id/gold/captain/spare + +/obj/random_multi/single_item/sfr_headset + name = "Multi Point - headset" + id = "SFR headset" + item_path = /obj/random/sfr + +// This is in here because it's spawned by the SFR Headset randomizer +/obj/random/sfr + name = "random SFR headset" + desc = "This is a headset spawn." + icon = 'icons/misc/mark.dmi' + icon_state = "rup" + +/obj/random/sfr/item_to_spawn() + return pick(prob(25);/obj/item/device/radio/headset/heads/captain/sfr, + prob(25);/obj/item/device/radio/headset/headset_cargo/alt, + prob(25);/obj/item/device/radio/headset/headset_com/alt, + prob(25);/obj/item/device/radio/headset) + +// Mining Goodies +/obj/random/multiple/minevault + name = "random vault loot" + desc = "Loot for mine vaults." + icon = 'icons/misc/mark.dmi' + icon_state = "rup" + +/obj/random/multiple/minevault/item_to_spawn() + return pick( + prob(5);list( + /obj/item/clothing/mask/smokable/pipe, + /obj/item/weapon/reagent_containers/food/drinks/bottle/rum, + /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey, + /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus, + /obj/item/weapon/flame/lighter/zippo, + /obj/structure/closet/crate/hydroponics + ), + prob(5);list( + /obj/item/weapon/pickaxe/drill, + /obj/item/clothing/suit/space/void/mining, + /obj/item/clothing/head/helmet/space/void/mining, + /obj/structure/closet/crate/engineering + ), + prob(5);list( + /obj/item/weapon/pickaxe/drill, + /obj/item/clothing/suit/space/void/mining/alt, + /obj/item/clothing/head/helmet/space/void/mining/alt, + /obj/structure/closet/crate/engineering + ), + prob(5);list( + /obj/item/weapon/reagent_containers/glass/beaker/bluespace, + /obj/item/weapon/reagent_containers/glass/beaker/bluespace, + /obj/item/weapon/reagent_containers/glass/beaker/bluespace, + /obj/structure/closet/crate/science + ), + prob(5);list( + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/structure/closet/crate/engineering + ), + prob(5);list( + /obj/item/weapon/pickaxe/drill, + /obj/item/clothing/glasses/material, + /obj/structure/ore_box, + /obj/structure/closet/crate + ), + prob(5);list( + /obj/item/weapon/reagent_containers/glass/beaker/noreact, + /obj/item/weapon/reagent_containers/glass/beaker/noreact, + /obj/item/weapon/reagent_containers/glass/beaker/noreact, + /obj/structure/closet/crate/science + ), + prob(5);list( + /obj/item/weapon/storage/secure/briefcase/money, + /obj/structure/closet/crate/freezer/rations + ), + prob(5);list( + /obj/item/clothing/accessory/tie/horrible, + /obj/item/clothing/accessory/tie/horrible, + /obj/item/clothing/accessory/tie/horrible, + /obj/item/clothing/accessory/tie/horrible, + /obj/item/clothing/accessory/tie/horrible, + /obj/item/clothing/accessory/tie/horrible, + /obj/structure/closet/crate + ), + prob(5);list( + /obj/item/weapon/melee/baton, + /obj/item/weapon/melee/baton, + /obj/item/weapon/melee/baton, + /obj/item/weapon/melee/baton, + /obj/structure/closet/crate + ), + prob(5);list( + /obj/item/clothing/under/shorts/red, + /obj/item/clothing/under/shorts/blue, + /obj/structure/closet/crate + ), + prob(2);list( + /obj/item/weapon/melee/baton/cattleprod, + /obj/item/weapon/melee/baton/cattleprod, + /obj/item/weapon/cell/high, + /obj/item/weapon/cell/high, + /obj/structure/closet/crate + ), + prob(2);list( + /obj/item/latexballon, + /obj/item/latexballon, + /obj/structure/closet/crate + ), + prob(2);list( + /obj/item/toy/syndicateballoon, + /obj/item/toy/syndicateballoon, + /obj/structure/closet/crate + ), + prob(2);list( + /obj/item/weapon/rig/industrial/equipped, + /obj/item/weapon/storage/bag/ore, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/clothing/head/kitty, + /obj/item/clothing/head/kitty, + /obj/item/clothing/head/kitty, + /obj/item/clothing/head/kitty, + /obj/structure/closet/crate + ), + prob(2);list( + /obj/random/coin, + /obj/random/coin, + /obj/random/coin, + /obj/random/coin, + /obj/random/coin, + /obj/structure/closet/crate/plastic + ), + prob(2);list( + /obj/random/multiple/voidsuit, + /obj/random/multiple/voidsuit, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/clothing/suit/space/syndicate/black/red, + /obj/item/clothing/head/helmet/space/syndicate/black/red, + /obj/item/clothing/suit/space/syndicate/black/red, + /obj/item/clothing/head/helmet/space/syndicate/black/red, + /obj/item/weapon/gun/projectile/automatic/mini_uzi, + /obj/item/weapon/gun/projectile/automatic/mini_uzi, + /obj/item/ammo_magazine/m45uzi, + /obj/item/ammo_magazine/m45uzi, + /obj/item/ammo_magazine/m45uzi/empty, + /obj/item/ammo_magazine/m45uzi/empty, + /obj/structure/closet/crate/plastic + ), + prob(2);list( + /obj/item/clothing/suit/ianshirt, + /obj/item/clothing/suit/ianshirt, + /obj/item/weapon/bedsheet/ian, + /obj/structure/closet/crate/plastic + ), + prob(2);list( + /obj/item/clothing/suit/armor/vest, + /obj/item/clothing/suit/armor/vest, + /obj/item/weapon/gun/projectile/garand, + /obj/item/weapon/gun/projectile/garand, + /obj/item/ammo_magazine/m762garand, + /obj/item/ammo_magazine/m762garand, + /obj/structure/closet/crate/plastic + ), + prob(2);list( + /obj/mecha/working/ripley/mining + ), + prob(2);list( + /obj/mecha/working/hoverpod/combatpod + ), + prob(2);list( + /obj/item/weapon/pickaxe/silver, + /obj/item/weapon/storage/bag/ore, + /obj/item/clothing/glasses/material, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/weapon/pickaxe/drill, + /obj/item/weapon/storage/bag/ore, + /obj/item/clothing/glasses/material, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/weapon/pickaxe/jackhammer, + /obj/item/weapon/storage/bag/ore, + /obj/item/clothing/glasses/material, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/weapon/pickaxe/diamond, + /obj/item/weapon/storage/bag/ore, + /obj/item/clothing/glasses/material, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/weapon/pickaxe/diamonddrill, + /obj/item/weapon/storage/bag/ore, + /obj/item/clothing/glasses/material, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/weapon/pickaxe/gold, + /obj/item/weapon/storage/bag/ore, + /obj/item/clothing/glasses/material, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/weapon/pickaxe/plasmacutter, + /obj/item/weapon/storage/bag/ore, + /obj/item/clothing/glasses/material, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/weapon/material/sword/katana, + /obj/item/weapon/material/sword/katana, + /obj/structure/closet/crate + ), + prob(2);list( + /obj/item/weapon/material/sword, + /obj/item/weapon/material/sword, + /obj/structure/closet/crate + ), + prob(1);list( + /obj/item/clothing/mask/balaclava, + /obj/item/weapon/material/star, + /obj/item/weapon/material/star, + /obj/item/weapon/material/star, + /obj/item/weapon/material/star, + /obj/structure/closet/crate + ), + prob(1);list( + /obj/item/weed_extract, + /obj/item/xenos_claw, + /obj/structure/closet/crate/science + ), + prob(1);list( + /obj/item/clothing/head/bearpelt, + /obj/item/clothing/under/soviet, + /obj/item/clothing/under/soviet, + /obj/item/weapon/gun/projectile/shotgun/pump/rifle/ceremonial, + /obj/item/weapon/gun/projectile/shotgun/pump/rifle/ceremonial, + /obj/structure/closet/crate + ), + prob(1);list( + /obj/item/weapon/gun/projectile/revolver/detective, + /obj/item/weapon/gun/projectile/contender, + /obj/item/weapon/gun/projectile/p92x, + /obj/item/weapon/gun/projectile/derringer, + /obj/structure/closet/crate + ), + prob(1);list( + /obj/item/weapon/melee/cultblade, + /obj/item/clothing/suit/cultrobes, + /obj/item/clothing/head/culthood, + /obj/item/device/soulstone, + /obj/structure/closet/crate + ), + prob(1);list( + /obj/item/weapon/vampiric, + /obj/item/weapon/vampiric, + /obj/structure/closet/crate/science + ), + prob(1);list( + /obj/item/weapon/archaeological_find + ), + prob(1);list( + /obj/item/weapon/melee/energy/sword, + /obj/item/weapon/melee/energy/sword, + /obj/item/weapon/melee/energy/sword, + /obj/item/weapon/shield/energy, + /obj/item/weapon/shield/energy, + /obj/structure/closet/crate/science + ), + prob(1);list( + /obj/item/weapon/storage/backpack/clown, + /obj/item/clothing/under/rank/clown, + /obj/item/clothing/shoes/clown_shoes, + /obj/item/device/pda/clown, + /obj/item/clothing/mask/gas/clown_hat, + /obj/item/weapon/bikehorn, + /obj/item/toy/waterflower, + /obj/item/weapon/pen/crayon/rainbow, + /obj/structure/closet/crate + ), + prob(1);list( + /obj/item/clothing/under/mime, + /obj/item/clothing/shoes/black, + /obj/item/device/pda/mime, + /obj/item/clothing/gloves/white, + /obj/item/clothing/mask/gas/mime, + /obj/item/clothing/head/beret, + /obj/item/clothing/suit/suspenders, + /obj/item/weapon/pen/crayon/mime, + /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing, + /obj/structure/closet/crate + ), + prob(1);list( + /obj/item/weapon/storage/belt/champion, + /obj/item/clothing/mask/luchador, + /obj/item/clothing/mask/luchador/rudos, + /obj/item/clothing/mask/luchador/tecnicos, + /obj/structure/closet/crate + ) + ) diff --git a/code/game/objects/random/misc.dm b/code/game/objects/random/misc.dm new file mode 100644 index 0000000000..0ebc879e72 --- /dev/null +++ b/code/game/objects/random/misc.dm @@ -0,0 +1,431 @@ +/* +// This is going to get so incredibly bloated. +// But this is where all of the "Loot" goes. Anything fun or useful that doesn't deserve its own file, pile in. +*/ + +/obj/random/tool + name = "random tool" + desc = "This is a random tool" + icon = 'icons/obj/tools.dmi' + icon_state = "welder" + +/obj/random/tool/item_to_spawn() + return pick(/obj/item/weapon/screwdriver, + /obj/item/weapon/wirecutters, + /obj/item/weapon/weldingtool, + /obj/item/weapon/weldingtool/largetank, + /obj/item/weapon/crowbar, + /obj/item/weapon/wrench, + /obj/item/device/flashlight, + /obj/item/device/multitool) + +/obj/random/tool/power + name = "random powertool" + desc = "This is a random powertool" + icon_state = "jaws_pry" + +/obj/random/tool/power/item_to_spawn() + return pick(/obj/item/weapon/screwdriver/power, + /obj/item/weapon/wirecutters/power, + /obj/item/weapon/weldingtool/electric, + /obj/item/weapon/weldingtool/experimental) + +/obj/random/tool/alien + name = "random alien tool" + desc = "This is a random tool" + icon = 'icons/obj/abductor.dmi' + icon_state = "welder" + +/obj/random/tool/alien/item_to_spawn() + return pick(/obj/item/weapon/screwdriver/alien, + /obj/item/weapon/wirecutters/alien, + /obj/item/weapon/weldingtool/alien, + /obj/item/weapon/crowbar/alien, + /obj/item/weapon/wrench/alien, + /obj/item/stack/cable_coil/alien, + /obj/item/device/multitool/alien) + +/obj/random/technology_scanner + name = "random scanner" + desc = "This is a random technology scanner." + icon = 'icons/obj/device.dmi' + icon_state = "atmos" + +/obj/random/technology_scanner/item_to_spawn() + return pick(prob(5);/obj/item/device/t_scanner, + prob(2);/obj/item/device/radio, + prob(5);/obj/item/device/analyzer) + +/obj/random/powercell + name = "random powercell" + desc = "This is a random powercell." + icon = 'icons/obj/power.dmi' + icon_state = "cell" + +/obj/random/powercell/item_to_spawn() + return pick(prob(40);/obj/item/weapon/cell, + prob(25);/obj/item/weapon/cell/device, + prob(25);/obj/item/weapon/cell/high, + prob(9);/obj/item/weapon/cell/super, + prob(1);/obj/item/weapon/cell/hyper) + + +/obj/random/bomb_supply + name = "bomb supply" + desc = "This is a random bomb supply." + icon = 'icons/obj/assemblies/new_assemblies.dmi' + icon_state = "signaller" + +/obj/random/bomb_supply/item_to_spawn() + return pick(/obj/item/device/assembly/igniter, + /obj/item/device/assembly/prox_sensor, + /obj/item/device/assembly/signaler, + /obj/item/device/assembly/timer, + /obj/item/device/multitool) + + +/obj/random/toolbox + name = "random toolbox" + desc = "This is a random toolbox." + icon = 'icons/obj/storage.dmi' + icon_state = "red" + +/obj/random/toolbox/item_to_spawn() + return pick(prob(6);/obj/item/weapon/storage/toolbox/mechanical, + prob(6);/obj/item/weapon/storage/toolbox/electrical, + prob(2);/obj/item/weapon/storage/toolbox/emergency, + prob(1);/obj/item/weapon/storage/toolbox/syndicate) + + +/obj/random/tech_supply + name = "random tech supply" + desc = "This is a random piece of technology supplies." + icon = 'icons/obj/power.dmi' + icon_state = "cell" + spawn_nothing_percentage = 25 + +/obj/random/tech_supply/item_to_spawn() + return pick(prob(3);/obj/random/powercell, + prob(2);/obj/random/technology_scanner, + prob(1);/obj/item/weapon/packageWrap, + prob(2);/obj/random/bomb_supply, + prob(1);/obj/item/weapon/extinguisher, + prob(1);/obj/item/clothing/gloves/fyellow, + prob(3);/obj/item/stack/cable_coil/random, + prob(2);/obj/random/toolbox, + prob(2);/obj/item/weapon/storage/belt/utility, + prob(1);/obj/item/weapon/storage/belt/utility/full, + prob(5);/obj/random/tool, + prob(2);/obj/item/weapon/tape_roll, + prob(2);/obj/item/taperoll/engineering, + prob(1);/obj/item/taperoll/atmos, + prob(1);/obj/item/device/flashlight/maglight) + +/obj/random/tech_supply/component + name = "random tech component" + desc = "This is a random machine component." + icon = 'icons/obj/items.dmi' + icon_state = "portable_analyzer" + +/obj/random/tech_supply/component/item_to_spawn() + return pick(prob(3);/obj/item/weapon/stock_parts/gear, + prob(2);/obj/item/weapon/stock_parts/console_screen, + prob(1);/obj/item/weapon/stock_parts/spring, + prob(3);/obj/item/weapon/stock_parts/capacitor, + prob(2);/obj/item/weapon/stock_parts/capacitor/adv, + prob(1);/obj/item/weapon/stock_parts/capacitor/super, + prob(3);/obj/item/weapon/stock_parts/manipulator, + prob(2);/obj/item/weapon/stock_parts/manipulator/nano, + prob(1);/obj/item/weapon/stock_parts/manipulator/pico, + prob(3);/obj/item/weapon/stock_parts/matter_bin, + prob(2);/obj/item/weapon/stock_parts/matter_bin/adv, + prob(1);/obj/item/weapon/stock_parts/matter_bin/super, + prob(3);/obj/item/weapon/stock_parts/scanning_module, + prob(2);/obj/item/weapon/stock_parts/scanning_module/adv, + prob(1);/obj/item/weapon/stock_parts/scanning_module/phasic) + +/obj/random/medical + name = "Random Medicine" + desc = "This is a random medical item." + icon = 'icons/obj/items.dmi' + icon_state = "traumakit" + +/obj/random/medical/item_to_spawn() + return pick(prob(21);/obj/random/medical/lite, + prob(5);/obj/random/medical/pillbottle, + prob(1);/obj/item/weapon/storage/pill_bottle/tramadol, + prob(1);/obj/item/weapon/storage/pill_bottle/antitox, + prob(1);/obj/item/weapon/storage/pill_bottle/carbon, + prob(3);/obj/item/bodybag/cryobag, + prob(5);/obj/item/weapon/reagent_containers/syringe/antitoxin, + prob(3);/obj/item/weapon/reagent_containers/syringe/antiviral, + prob(5);/obj/item/weapon/reagent_containers/syringe/inaprovaline, + prob(1);/obj/item/weapon/reagent_containers/hypospray, + prob(1);/obj/item/weapon/storage/box/freezer, + prob(2);/obj/item/stack/nanopaste) + +/obj/random/medical/pillbottle + name = "Random Pill Bottle" + desc = "This is a random pill bottle." + icon = 'icons/obj/chemical.dmi' + icon_state = "pill_canister" + +/obj/random/medical/pillbottle/item_to_spawn() + return pick(prob(1);/obj/item/weapon/storage/pill_bottle/spaceacillin, + prob(1);/obj/item/weapon/storage/pill_bottle/dermaline, + prob(1);/obj/item/weapon/storage/pill_bottle/dexalin_plus, + prob(1);/obj/item/weapon/storage/pill_bottle/bicaridine, + prob(1);/obj/item/weapon/storage/pill_bottle/iron) + +/obj/random/medical/lite + name = "Random Medicine" + desc = "This is a random simple medical item." + icon = 'icons/obj/items.dmi' + icon_state = "brutepack" + spawn_nothing_percentage = 25 + +/obj/random/medical/lite/item_to_spawn() + return pick(prob(4);/obj/item/stack/medical/bruise_pack, + prob(4);/obj/item/stack/medical/ointment, + prob(2);/obj/item/stack/medical/advanced/bruise_pack, + prob(2);/obj/item/stack/medical/advanced/ointment, + prob(1);/obj/item/stack/medical/splint, + prob(4);/obj/item/device/healthanalyzer, + prob(1);/obj/item/bodybag, + prob(3);/obj/item/weapon/reagent_containers/hypospray/autoinjector, + prob(2);/obj/item/weapon/storage/pill_bottle/kelotane, + prob(2);/obj/item/weapon/storage/pill_bottle/antitox) + +/obj/random/firstaid + name = "Random First Aid Kit" + desc = "This is a random first aid kit." + icon = 'icons/obj/storage.dmi' + icon_state = "firstaid" + +/obj/random/firstaid/item_to_spawn() + return pick(prob(4);/obj/item/weapon/storage/firstaid/regular, + prob(3);/obj/item/weapon/storage/firstaid/toxin, + prob(3);/obj/item/weapon/storage/firstaid/o2, + prob(2);/obj/item/weapon/storage/firstaid/adv, + prob(3);/obj/item/weapon/storage/firstaid/fire, + prob(1);/obj/item/weapon/storage/firstaid/combat) + +/obj/random/contraband + name = "Random Illegal Item" + desc = "Hot Stuff." + icon = 'icons/obj/items.dmi' + icon_state = "purplecomb" + spawn_nothing_percentage = 50 +/obj/random/contraband/item_to_spawn() + return pick(prob(6);/obj/item/weapon/storage/pill_bottle/tramadol, + prob(8);/obj/item/weapon/haircomb, + prob(4);/obj/item/weapon/storage/pill_bottle/happy, + prob(4);/obj/item/weapon/storage/pill_bottle/zoom, + prob(10);/obj/item/weapon/contraband/poster, + prob(4);/obj/item/weapon/material/butterfly, + prob(6);/obj/item/weapon/material/butterflyblade, + prob(6);/obj/item/weapon/material/butterflyhandle, + prob(6);/obj/item/weapon/material/wirerod, + prob(2);/obj/item/weapon/material/butterfly/switchblade, + prob(2);/obj/item/clothing/gloves/knuckledusters, + prob(1);/obj/item/weapon/material/knife/tacknife, + prob(1);/obj/item/clothing/suit/storage/vest/heavy/merc, + prob(1);/obj/item/weapon/beartrap, + prob(1);/obj/item/weapon/handcuffs, + prob(1);/obj/item/weapon/handcuffs/legcuffs, + prob(2);/obj/item/weapon/reagent_containers/syringe/drugs, + prob(1);/obj/item/weapon/reagent_containers/syringe/steroid) + +/obj/random/soap + name = "Random Soap" + desc = "This is a random bar of soap." + icon = 'icons/obj/items.dmi' + icon_state = "soap" + +/obj/random/soap/item_to_spawn() + return pick(prob(3);/obj/item/weapon/soap, + prob(2);/obj/item/weapon/soap/nanotrasen, + prob(2);/obj/item/weapon/soap/deluxe, + prob(1);/obj/item/weapon/soap/syndie,) + + +/obj/random/drinkbottle + name = "random drink" + desc = "This is a random drink." + icon = 'icons/obj/drinks.dmi' + icon_state = "whiskeybottle" + +/obj/random/drinkbottle/item_to_spawn() + return pick(/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey, + /obj/item/weapon/reagent_containers/food/drinks/bottle/gin, + /obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey, + /obj/item/weapon/reagent_containers/food/drinks/bottle/vodka, + /obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla, + /obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe, + /obj/item/weapon/reagent_containers/food/drinks/bottle/wine, + /obj/item/weapon/reagent_containers/food/drinks/bottle/cognac, + /obj/item/weapon/reagent_containers/food/drinks/bottle/rum, + /obj/item/weapon/reagent_containers/food/drinks/bottle/patron) + +/obj/random/material //Random materials for building stuff + name = "random material" + desc = "This is a random material." + icon = 'icons/obj/items.dmi' + icon_state = "sheet-metal" + +/obj/random/material/item_to_spawn() + return pick(/obj/item/stack/material/steel{amount = 10}, + /obj/item/stack/material/glass{amount = 10}, + /obj/item/stack/material/glass/reinforced{amount = 10}, + /obj/item/stack/material/plastic{amount = 10}, + /obj/item/stack/material/wood{amount = 10}, + /obj/item/stack/material/cardboard{amount = 10}, + /obj/item/stack/rods{amount = 10}, + /obj/item/stack/material/plasteel{amount = 10}) + +/obj/random/tank + name = "random tank" + desc = "This is a tank." + icon = 'icons/obj/tank.dmi' + icon_state = "canister" + +/obj/random/tank/item_to_spawn() + return pick(prob(5);/obj/item/weapon/tank/oxygen, + prob(4);/obj/item/weapon/tank/oxygen/yellow, + prob(4);/obj/item/weapon/tank/oxygen/red, + prob(3);/obj/item/weapon/tank/air, + prob(4);/obj/item/weapon/tank/emergency/oxygen, + prob(3);/obj/item/weapon/tank/emergency/oxygen/engi, + prob(2);/obj/item/weapon/tank/emergency/oxygen/double, + prob(1);/obj/item/device/suit_cooling_unit) + +/obj/random/cigarettes + name = "random cigarettes" + desc = "This is a cigarette." + icon = 'icons/obj/cigarettes.dmi' + icon_state = "cigpacket" + +/obj/random/cigarettes/item_to_spawn() + return pick(prob(5);/obj/item/weapon/storage/fancy/cigarettes, + prob(4);/obj/item/weapon/storage/fancy/cigarettes/dromedaryco, + prob(3);/obj/item/weapon/storage/fancy/cigarettes/killthroat, + prob(3);/obj/item/weapon/storage/fancy/cigarettes/luckystars, + prob(3);/obj/item/weapon/storage/fancy/cigarettes/jerichos, + prob(3);/obj/item/weapon/storage/fancy/cigarettes/menthols, + prob(3);/obj/item/weapon/storage/fancy/cigarettes/carcinomas, + prob(3);/obj/item/weapon/storage/fancy/cigarettes/professionals, + prob(1);/obj/item/weapon/storage/fancy/cigar, + prob(1);/obj/item/clothing/mask/smokable/cigarette/cigar, + prob(1);/obj/item/clothing/mask/smokable/cigarette/cigar/cohiba, + prob(1);/obj/item/clothing/mask/smokable/cigarette/cigar/havana) + +/obj/random/coin + name = "random coin" + desc = "This is a coin spawn." + icon = 'icons/misc/mark.dmi' + icon_state = "rup" + +/obj/random/coin/item_to_spawn() + return pick(prob(5);/obj/item/weapon/coin/silver, + prob(3);/obj/item/weapon/coin/iron, + prob(4);/obj/item/weapon/coin/gold, + prob(3);/obj/item/weapon/coin/phoron, + prob(1);/obj/item/weapon/coin/uranium, + prob(2);/obj/item/weapon/coin/platinum, + prob(1);/obj/item/weapon/coin/diamond) + +/obj/random/action_figure + name = "random action figure" + desc = "This is a random action figure." + icon = 'icons/obj/toy.dmi' + icon_state = "assistant" + +/obj/random/action_figure/item_to_spawn() + return pick(/obj/item/toy/figure/cmo, + /obj/item/toy/figure/assistant, + /obj/item/toy/figure/atmos, + /obj/item/toy/figure/bartender, + /obj/item/toy/figure/borg, + /obj/item/toy/figure/gardener, + /obj/item/toy/figure/captain, + /obj/item/toy/figure/cargotech, + /obj/item/toy/figure/ce, + /obj/item/toy/figure/chaplain, + /obj/item/toy/figure/chef, + /obj/item/toy/figure/chemist, + /obj/item/toy/figure/clown, + /obj/item/toy/figure/corgi, + /obj/item/toy/figure/detective, + /obj/item/toy/figure/dsquad, + /obj/item/toy/figure/engineer, + /obj/item/toy/figure/geneticist, + /obj/item/toy/figure/hop, + /obj/item/toy/figure/hos, + /obj/item/toy/figure/qm, + /obj/item/toy/figure/janitor, + /obj/item/toy/figure/agent, + /obj/item/toy/figure/librarian, + /obj/item/toy/figure/md, + /obj/item/toy/figure/mime, + /obj/item/toy/figure/miner, + /obj/item/toy/figure/ninja, + /obj/item/toy/figure/wizard, + /obj/item/toy/figure/rd, + /obj/item/toy/figure/roboticist, + /obj/item/toy/figure/scientist, + /obj/item/toy/figure/syndie, + /obj/item/toy/figure/secofficer, + /obj/item/toy/figure/warden, + /obj/item/toy/figure/psychologist, + /obj/item/toy/figure/paramedic, + /obj/item/toy/figure/ert) + +/obj/random/plushie + name = "random plushie" + desc = "This is a random plushie." + icon = 'icons/obj/toy.dmi' + icon_state = "nymphplushie" + +/obj/random/plushie/item_to_spawn() + return pick(/obj/structure/plushie/ian, + /obj/structure/plushie/drone, + /obj/structure/plushie/carp, + /obj/structure/plushie/beepsky, + /obj/item/toy/plushie/nymph, + /obj/item/toy/plushie/mouse, + /obj/item/toy/plushie/kitten, + /obj/item/toy/plushie/lizard) + +/obj/random/toy + name = "random toy" + desc = "This is a random toy." + icon = 'icons/obj/toy.dmi' + icon_state = "ship" + +/obj/random/toy/item_to_spawn() + return pick(/obj/item/toy/bosunwhistle, + /obj/item/toy/plushie/therapy/red, + /obj/item/toy/plushie/therapy/purple, + /obj/item/toy/plushie/therapy/blue, + /obj/item/toy/plushie/therapy/yellow, + /obj/item/toy/plushie/therapy/orange, + /obj/item/toy/plushie/therapy/green, + /obj/item/toy/cultsword, + /obj/item/toy/katana, + /obj/item/toy/snappop, + /obj/item/toy/sword, + /obj/item/toy/balloon, + /obj/item/toy/crossbow, + /obj/item/toy/blink, + /obj/item/toy/waterflower, + /obj/item/toy/prize/ripley, + /obj/item/toy/prize/fireripley, + /obj/item/toy/prize/deathripley, + /obj/item/toy/prize/gygax, + /obj/item/toy/prize/durand, + /obj/item/toy/prize/honk, + /obj/item/toy/prize/marauder, + /obj/item/toy/prize/seraph, + /obj/item/toy/prize/mauler, + /obj/item/toy/prize/odysseus, + /obj/item/toy/prize/phazon) \ No newline at end of file diff --git a/code/game/objects/random/mob.dm b/code/game/objects/random/mob.dm new file mode 100644 index 0000000000..2043ef0240 --- /dev/null +++ b/code/game/objects/random/mob.dm @@ -0,0 +1,159 @@ +/* + * Random Mobs + */ + +/obj/random/mob + name = "Random Animal" + desc = "This is a random animal." + icon = 'icons/mob/animal.dmi' + icon_state = "chicken_white" + + var/overwrite_hostility = 0 + + var/mob_faction = null + var/mob_returns_home = 0 + var/mob_wander = 1 + var/mob_wander_distance = 3 + var/mob_hostile = 0 + var/mob_retaliate = 0 + +/obj/random/mob/item_to_spawn() + return pick(prob(10);/mob/living/simple_animal/lizard, + prob(6);/mob/living/simple_animal/retaliate/diyaab, + prob(10);/mob/living/simple_animal/cat/fluff, + prob(6);/mob/living/simple_animal/cat/kitten, + prob(10);/mob/living/simple_animal/corgi, + prob(6);/mob/living/simple_animal/corgi/puppy, + prob(10);/mob/living/simple_animal/crab, + prob(10);/mob/living/simple_animal/chicken, + prob(6);/mob/living/simple_animal/chick, + prob(10);/mob/living/simple_animal/cow, + prob(6);/mob/living/simple_animal/retaliate/goat, + prob(10);/mob/living/simple_animal/penguin, + prob(10);/mob/living/simple_animal/mouse, + prob(10);/mob/living/simple_animal/yithian, + prob(10);/mob/living/simple_animal/tindalos, + prob(10);/mob/living/simple_animal/corgi/tamaskan, + prob(3);/mob/living/simple_animal/parrot, + prob(1);/mob/living/simple_animal/giant_crab) + +/obj/random/mob/spawn_item() //These should only ever have simple mobs. + var/build_path = item_to_spawn() + + var/mob/living/simple_animal/M = new build_path(src.loc) + M.ai_inactive = 1 //Don't fight eachother while we're still setting up! + if(mob_faction) + M.faction = mob_faction + M.returns_home = mob_returns_home + M.wander = mob_wander + M.wander_distance = mob_wander_distance + if(overwrite_hostility) + M.hostile = mob_hostile + M.retaliate = mob_retaliate + M.ai_inactive = 0 //Now you can kill eachother if your faction didn't override. + + if(pixel_x || pixel_y) + M.pixel_x = pixel_x + M.pixel_y = pixel_y + +/obj/random/mob/sif + name = "Random Sif Animal" + desc = "This is a random cold weather animal." + icon_state = "penguin" + + mob_returns_home = 1 + mob_wander_distance = 10 + +/obj/random/mob/sif/item_to_spawn() + return pick(prob(30);/mob/living/simple_animal/retaliate/diyaab, + prob(15);/mob/living/simple_animal/crab, + prob(15);/mob/living/simple_animal/penguin, + prob(15);/mob/living/simple_animal/mouse, + prob(15);/mob/living/simple_animal/corgi/tamaskan, + prob(2);/mob/living/simple_animal/hostile/giant_spider/frost, + prob(1);/mob/living/simple_animal/hostile/goose, + prob(20);/mob/living/simple_animal/giant_crab) + +/obj/random/mob/sif/hostile + name = "Random Hostile Sif Animal" + desc = "This is a random hostile cold weather animal." + icon_state = "frost" + +/obj/random/mob/sif/hostile/item_to_spawn() + return pick(prob(22);/mob/living/simple_animal/hostile/savik, + prob(33);/mob/living/simple_animal/hostile/giant_spider/frost, + prob(45);/mob/living/simple_animal/hostile/shantak) + +/obj/random/mob/spider + name = "Random Spider" //Spiders should patrol where they spawn. + desc = "This is a random boring spider." + icon_state = "guard" + + mob_returns_home = 1 + mob_wander_distance = 4 + +/obj/random/mob/spider/item_to_spawn() + return pick(prob(22);/mob/living/simple_animal/hostile/giant_spider/nurse, + prob(33);/mob/living/simple_animal/hostile/giant_spider/hunter, + prob(45);/mob/living/simple_animal/hostile/giant_spider) + +/obj/random/mob/spider/mutant + name = "Random Mutant Spider" + desc = "This is a random mutated spider." + icon_state = "phoron" + +/obj/random/mob/spider/mutant/item_to_spawn() + return pick(prob(5);/obj/random/mob/spider, + prob(10);/mob/living/simple_animal/hostile/giant_spider/webslinger, + prob(10);/mob/living/simple_animal/hostile/giant_spider/carrier, + prob(33);/mob/living/simple_animal/hostile/giant_spider/lurker, + prob(33);/mob/living/simple_animal/hostile/giant_spider/tunneler, + prob(40);/mob/living/simple_animal/hostile/giant_spider/pepper, + prob(20);/mob/living/simple_animal/hostile/giant_spider/thermic, + prob(40);/mob/living/simple_animal/hostile/giant_spider/electric, + prob(1);/mob/living/simple_animal/hostile/giant_spider/phorogenic, + prob(40);/mob/living/simple_animal/hostile/giant_spider/frost) + +/obj/random/mob/robotic + name = "Random Robot Mob" + desc = "This is a random robot." + icon_state = "drone_dead" + + overwrite_hostility = 1 + + mob_faction = "malf_drone" + mob_returns_home = 1 + mob_wander = 1 + mob_wander_distance = 5 + mob_hostile = 1 + mob_retaliate = 1 + +/obj/random/mob/robotic/item_to_spawn() //Hivebots have a total number of 'lots' equal to the lesser drone, at 60. + return pick(prob(60);/mob/living/simple_animal/hostile/malf_drone/lesser, + prob(50);/mob/living/simple_animal/hostile/malf_drone, + prob(15);/mob/living/simple_animal/hostile/mecha/malf_drone, + prob(10);/mob/living/simple_animal/hostile/hivebot, + prob(15);/mob/living/simple_animal/hostile/hivebot/swarm, + prob(10);/mob/living/simple_animal/hostile/hivebot/range, + prob(5);/mob/living/simple_animal/hostile/hivebot/range/rapid, + prob(5);/mob/living/simple_animal/hostile/hivebot/range/ion, + prob(5);/mob/living/simple_animal/hostile/hivebot/range/laser, + prob(5);/mob/living/simple_animal/hostile/hivebot/range/strong, + prob(5);/mob/living/simple_animal/hostile/hivebot/range/guard) + +/obj/random/mob/robotic/hivebot + name = "Random Hivebot" + desc = "This is a random hivebot." + icon_state = "drone3" + + mob_faction = "hivebot" + +/obj/random/mob/robotic/hivebot/item_to_spawn() + return pick(prob(10);/mob/living/simple_animal/hostile/hivebot, + prob(15);/mob/living/simple_animal/hostile/hivebot/swarm, + prob(10);/mob/living/simple_animal/hostile/hivebot/range, + prob(5);/mob/living/simple_animal/hostile/hivebot/range/rapid, + prob(5);/mob/living/simple_animal/hostile/hivebot/range/ion, + prob(5);/mob/living/simple_animal/hostile/hivebot/range/laser, + prob(5);/mob/living/simple_animal/hostile/hivebot/range/strong, + prob(5);/mob/living/simple_animal/hostile/hivebot/range/guard) diff --git a/code/game/objects/random/spacesuits.dm b/code/game/objects/random/spacesuits.dm new file mode 100644 index 0000000000..cb4ec6d4e9 --- /dev/null +++ b/code/game/objects/random/spacesuits.dm @@ -0,0 +1,113 @@ + +// Spaceproof clothing sets go in here + +/obj/random/multiple/voidsuit + name = "Random Voidsuit" + desc = "This is a random voidsuit." + icon = 'icons/obj/clothing/suits.dmi' + icon_state = "void" + +/obj/random/multiple/voidsuit/item_to_spawn() + return pick( + prob(5);list( + /obj/item/clothing/suit/space/void, + /obj/item/clothing/head/helmet/space/void + ), + prob(5);list( + /obj/item/clothing/suit/space/void/atmos, + /obj/item/clothing/head/helmet/space/void/atmos + ), + prob(5);list( + /obj/item/clothing/suit/space/void/atmos/alt, + /obj/item/clothing/head/helmet/space/void/atmos/alt + ), + prob(5);list( + /obj/item/clothing/suit/space/void/engineering, + /obj/item/clothing/head/helmet/space/void/engineering + ), + prob(5);list( + /obj/item/clothing/suit/space/void/engineering/alt, + /obj/item/clothing/head/helmet/space/void/engineering/alt + ), + prob(5);list( + /obj/item/clothing/suit/space/void/engineering/construction, + /obj/item/clothing/head/helmet/space/void/engineering/construction + ), + prob(5);list( + /obj/item/clothing/suit/space/void/engineering/salvage, + /obj/item/clothing/head/helmet/space/void/engineering/salvage + ), + prob(5);list( + /obj/item/clothing/suit/space/void/medical, + /obj/item/clothing/head/helmet/space/void/medical + ), + prob(5);list( + /obj/item/clothing/suit/space/void/medical/alt, + /obj/item/clothing/head/helmet/space/void/medical/alt + ), + prob(5);list( + /obj/item/clothing/suit/space/void/medical/bio, + /obj/item/clothing/head/helmet/space/void/medical/bio + ), + prob(5);list( + /obj/item/clothing/suit/space/void/medical/emt, + /obj/item/clothing/head/helmet/space/void/medical/emt + ), + prob(5);list( + /obj/item/clothing/suit/space/void/merc, + /obj/item/clothing/head/helmet/space/void/merc + ), + prob(5);list( + /obj/item/clothing/suit/space/void/mining, + /obj/item/clothing/head/helmet/space/void/mining + ), + prob(5);list( + /obj/item/clothing/suit/space/void/mining/alt, + /obj/item/clothing/head/helmet/space/void/mining/alt + ), + prob(5);list( + /obj/item/clothing/suit/space/void/security, + /obj/item/clothing/head/helmet/space/void/security + ), + prob(5);list( + /obj/item/clothing/suit/space/void/security/alt, + /obj/item/clothing/head/helmet/space/void/security/alt + ), + prob(5);list( + /obj/item/clothing/suit/space/void/security/riot, + /obj/item/clothing/head/helmet/space/void/security/riot + ) + ) + +/obj/random/multiple/voidsuit/mining + name = "Random Mining Voidsuit" + desc = "This is a random mining voidsuit." + icon = 'icons/obj/clothing/suits.dmi' + icon_state = "rig-mining" + +/obj/random/multiple/voidsuit/mining/item_to_spawn() + return pick( + prob(5);list( + /obj/item/clothing/suit/space/void/mining, + /obj/item/clothing/head/helmet/space/void/mining + ), + prob(1);list( + /obj/item/clothing/suit/space/void/mining/alt, + /obj/item/clothing/head/helmet/space/void/mining/alt + ) + ) + + +/obj/random/rigsuit + name = "Random rigsuit" + desc = "This is a random rigsuit." + icon = 'icons/obj/rig_modules.dmi' + icon_state = "generic" + +/obj/random/rigsuit/item_to_spawn() + return pick(prob(4);/obj/item/weapon/rig/light/hacker, + prob(5);/obj/item/weapon/rig/industrial, + prob(5);/obj/item/weapon/rig/eva, + prob(4);/obj/item/weapon/rig/light/stealth, + prob(3);/obj/item/weapon/rig/hazard, + prob(1);/obj/item/weapon/rig/merc/empty) \ No newline at end of file diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 2030167b86..1e8237cdfd 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -123,10 +123,10 @@ /obj/structure/mirror/raider/attack_hand(var/mob/living/carbon/human/user) if(istype(get_area(src),/area/syndicate_mothership)) - if(istype(user) && user.mind && user.mind.special_role == "Raider" && user.species.name != "Vox" && is_alien_whitelisted(user, "Vox")) + if(istype(user) && user.mind && user.mind.special_role == "Raider" && user.species.name != SPECIES_VOX && is_alien_whitelisted(user, SPECIES_VOX)) var/choice = input("Do you wish to become a true Vox of the Shoal? This is not reversible.") as null|anything in list("No","Yes") if(choice && choice == "Yes") - var/mob/living/carbon/human/vox/vox = new(get_turf(src),"Vox") + var/mob/living/carbon/human/vox/vox = new(get_turf(src),SPECIES_VOX) vox.gender = user.gender raiders.equip(vox) if(user.mind) diff --git a/code/game/turfs/simulated/dungeon/wall.dm b/code/game/turfs/simulated/dungeon/wall.dm index b1c28ca431..156fddac6a 100644 --- a/code/game/turfs/simulated/dungeon/wall.dm +++ b/code/game/turfs/simulated/dungeon/wall.dm @@ -24,7 +24,7 @@ var/place_dir = turn(direction, 180) if(!mining_overlay_cache["rock_side_[place_dir]"]) mining_overlay_cache["rock_side_[place_dir]"] = image('icons/turf/walls.dmi', "rock_side", dir = place_dir) - T.overlays += mining_overlay_cache["rock_side_[place_dir]"] + T.add_overlay(mining_overlay_cache["rock_side_[place_dir]"]) /turf/simulated/wall/solidrock/initialize() icon_state = base_state diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 798ad0e81c..e874d6ddee 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -101,6 +101,12 @@ turf/attackby(obj/item/weapon/W as obj, mob/user as mob) return if (do_after(user, 25 + (5 * user.weakened)) && !(user.stat)) step_towards(O, src) + if(ismob(O)) + animate(O, transform = turn(O.transform, 20), time = 2) + sleep(2) + animate(O, transform = turn(O.transform, -40), time = 4) + sleep(4) + animate(O, transform = turn(O.transform, 20), time = 2) /turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area) if(movement_disabled && usr.ckey != movement_disabled_exception) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index d7bd7e028f..704be1e117 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1001,11 +1001,6 @@ //strip their stuff and stick it in the crate for(var/obj/item/I in M) M.drop_from_inventory(I, locker) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - H.update_icons_layers() //Cheaper - else - M.update_icons() //so they black out before warping M.Paralyse(5) @@ -1188,10 +1183,8 @@ usr << "This can only be used on instances of type /mob/living/carbon/human" return var/block=text2num(href_list["block"]) - //testing("togmutate([href_list["block"]] -> [block])") usr.client.cmd_admin_toggle_block(H,block) show_player_panel(H) - //H.regenerate_icons() else if(href_list["adminplayeropts"]) var/mob/M = locate(href_list["adminplayeropts"]) diff --git a/code/modules/admin/verbs/possess.dm b/code/modules/admin/verbs/possess.dm index 6de30853ce..aa100623ff 100644 --- a/code/modules/admin/verbs/possess.dm +++ b/code/modules/admin/verbs/possess.dm @@ -37,7 +37,6 @@ if(ishuman(usr)) var/mob/living/carbon/human/H = usr H.name = H.get_visible_name() -// usr.regenerate_icons() //So the name is updated properly usr.loc = O.loc // Appear where the object you were controlling is -- TLE usr.client.eye = usr diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index 67bac3b773..d1602f479b 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -23,7 +23,7 @@ var/corpseidjob = null // Needs to be in quotes, such as "Clown" or "Chef." This just determines what the ID reads as, not their access var/corpseidaccess = null //This is for access. See access.dm for which jobs give what access. Again, put in quotes. Use "Captain" if you want it to be all access. var/corpseidicon = null //For setting it to be a gold, silver, CentCom etc ID - var/species = "Human" + var/species = SPECIES_HUMAN delete_me = TRUE /obj/effect/landmark/corpse/initialize() diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 7cde5e6056..4f92884dfb 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -1,6 +1,6 @@ /obj/machinery/gateway name = "gateway" - desc = "A mysterious gateway built by unknown hands. It allows for faster than light travel to far-flung locations and even alternate realities." + desc = "A mysterious gateway built by unknown hands. It allows for faster than light travel to far-flung locations and even alternate realities." //VOREStation Edit icon = 'icons/obj/machines/gateway.dmi' icon_state = "off" density = 1 @@ -252,10 +252,12 @@ obj/machinery/gateway/centerstation/process() user << "The gate is already calibrated, there is no work for you to do here." return else + // VOREStation Add stationgate = locate(/obj/machinery/gateway/centerstation) if(!stationgate) user << "Error: Recalibration failed. No destination found... That can't be good." return + // VOREStation Add End else user << "Recalibration successful!: This gate's systems have been fine tuned. Travel to this gate will now be on target." calibrated = 1 diff --git a/code/modules/busy_space/organizations.dm b/code/modules/busy_space/organizations.dm index b721188bc5..0285a68444 100644 --- a/code/modules/busy_space/organizations.dm +++ b/code/modules/busy_space/organizations.dm @@ -104,8 +104,8 @@ // Note that the current station being used will be pruned from this list upon being instantiated destination_names = list( "NSS Exodus in Nyx", - //"NCS Northern Star in Vir", - "NLS Southern Cross in Vir", + "NCS Northern Star in Vir", + //"NLS Southern Cross in Vir", "NAS Vir Central Command", "a dockyard orbiting Sif", "an asteroid orbiting Kara", @@ -235,6 +235,19 @@ motto = "" ship_prefixes = list("WTV" = "freight") + ship_names = list( + "Comet", + "Aurora", + "Supernova", + "Nebula", + "Galaxy", + "Starburst", + "Constellation", + "Pulsar", + "Quark", + "Void", + "Asteroid" + ) destination_names = list() /datum/lore/organization/tsc/bishop diff --git a/code/modules/client/preference_setup/general/01_basic.dm b/code/modules/client/preference_setup/general/01_basic.dm index be33813825..07f45a9c6f 100644 --- a/code/modules/client/preference_setup/general/01_basic.dm +++ b/code/modules/client/preference_setup/general/01_basic.dm @@ -152,7 +152,7 @@ datum/preferences/proc/set_biological_gender(var/gender) if(pref.species) S = all_species[pref.species] else - S = all_species["Human"] + S = all_species[SPECIES_HUMAN] var/list/possible_genders = S.genders if(!pref.organ_data || pref.organ_data[BP_TORSO] != "cyborg") return possible_genders diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm index 9594aa3df9..744550d27e 100644 --- a/code/modules/client/preference_setup/general/03_body.dm +++ b/code/modules/client/preference_setup/general/03_body.dm @@ -69,7 +69,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O /datum/category_item/player_setup_item/general/body/sanitize_character(var/savefile/S) if(!pref.species || !(pref.species in playable_species)) - pref.species = "Human" + pref.species = SPECIES_HUMAN pref.r_hair = sanitize_integer(pref.r_hair, 0, 255, initial(pref.r_hair)) pref.g_hair = sanitize_integer(pref.g_hair, 0, 255, initial(pref.g_hair)) pref.b_hair = sanitize_integer(pref.b_hair, 0, 255, initial(pref.b_hair)) @@ -591,7 +591,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O pref.rlimb_data[second_limb] = null if("Prosthesis") - var/tmp_species = pref.species ? pref.species : "Human" + var/tmp_species = pref.species ? pref.species : SPECIES_HUMAN var/list/usable_manufacturers = list() for(var/company in chargen_robolimbs) var/datum/robolimb/M = chargen_robolimbs[company] @@ -734,7 +734,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O /datum/category_item/player_setup_item/general/body/proc/SetSpecies(mob/user) if(!pref.species_preview || !(pref.species_preview in all_species)) - pref.species_preview = "Human" + pref.species_preview = SPECIES_HUMAN var/datum/species/current_species = all_species[pref.species_preview] var/dat = "" dat += "

[current_species.name] \[change\]


" diff --git a/code/modules/client/preference_setup/loadout/loadout_xeno.dm b/code/modules/client/preference_setup/loadout/loadout_xeno.dm index 666f348515..c7d93294ac 100644 --- a/code/modules/client/preference_setup/loadout/loadout_xeno.dm +++ b/code/modules/client/preference_setup/loadout/loadout_xeno.dm @@ -1,13 +1,13 @@ // Alien clothing. /datum/gear/suit/zhan_furs - display_name = "Zhan-Khazan furs (Tajara)" + display_name = "Zhan-Khazan furs (Tajaran)" path = /obj/item/clothing/suit/tajaran/furs sort_category = "Xenowear" /datum/gear/head/zhan_scarf display_name = "Zhan headscarf" path = /obj/item/clothing/head/tajaran/scarf - whitelisted = "Tajara" + whitelisted = SPECIES_TAJ /datum/gear/suit/unathi_mantle display_name = "hide mantle (Unathi)" @@ -19,7 +19,7 @@ display_name = "headtail chain selection (Skrell)" path = /obj/item/clothing/ears/skrell/chain sort_category = "Xenowear" - whitelisted = "Skrell" + whitelisted = SPECIES_SKRELL /datum/gear/ears/skrell/chains/New() ..() @@ -33,7 +33,7 @@ display_name = "headtail band selection (Skrell)" path = /obj/item/clothing/ears/skrell/band sort_category = "Xenowear" - whitelisted = "Skrell" + whitelisted = SPECIES_SKRELL /datum/gear/ears/skrell/bands/New() ..() @@ -47,7 +47,7 @@ display_name = "short headtail cloth (Skrell)" path = /obj/item/clothing/ears/skrell/cloth_male/black sort_category = "Xenowear" - whitelisted = "Skrell" + whitelisted = SPECIES_SKRELL /datum/gear/ears/skrell/cloth/short/New() ..() @@ -61,7 +61,7 @@ display_name = "long headtail cloth (Skrell)" path = /obj/item/clothing/ears/skrell/cloth_female/black sort_category = "Xenowear" - whitelisted = "Skrell" + whitelisted = SPECIES_SKRELL /datum/gear/ears/skrell/cloth/long/New() ..() @@ -75,7 +75,7 @@ display_name = "Colored bands (Skrell)" path = /obj/item/clothing/ears/skrell/colored/band sort_category = "Xenowear" - whitelisted = "Skrell" + whitelisted = SPECIES_SKRELL /datum/gear/ears/skrell/colored/band/New() ..() @@ -85,7 +85,7 @@ display_name = "Colored chain (Skrell)" path = /obj/item/clothing/ears/skrell/colored/chain sort_category = "Xenowear" - whitelisted = "Skrell" + whitelisted = SPECIES_SKRELL /datum/gear/ears/skrell/colored/chain/New() ..() @@ -94,7 +94,7 @@ /datum/gear/uniform/smock display_name = "smock selection (Teshari)" path = /obj/item/clothing/under/seromi/smock - whitelisted = "Teshari" + whitelisted = SPECIES_TESHARI sort_category = "Xenowear" /datum/gear/uniform/smock/New() @@ -108,7 +108,7 @@ /datum/gear/uniform/undercoat display_name = "undercoat selection (Teshari)" path = /obj/item/clothing/under/seromi/undercoat - whitelisted = "Teshari" + whitelisted = SPECIES_TESHARI sort_category = "Xenowear" /datum/gear/uniform/undercoat/New() @@ -122,7 +122,7 @@ /datum/gear/suit/cloak display_name = "cloak selection (Teshari)" path = /obj/item/clothing/suit/storage/seromi/cloak - whitelisted = "Teshari" + whitelisted = SPECIES_TESHARI sort_category = "Xenowear" /datum/gear/suit/cloak/New() diff --git a/code/modules/client/preference_setup/traits/trait_defines.dm b/code/modules/client/preference_setup/traits/trait_defines.dm index 2f457f3a5b..51692cc194 100644 --- a/code/modules/client/preference_setup/traits/trait_defines.dm +++ b/code/modules/client/preference_setup/traits/trait_defines.dm @@ -226,7 +226,7 @@ mutually_exclusive = list(/datum/trait/modifier/mental/xenophobe) /datum/trait/modifier/mental/tajaraphobe - name = "Tajara-phobic" + name = "Tajaran-phobic" desc = "Boilerplate racism for cats goes here." mutually_exclusive = list(/datum/trait/modifier/mental/xenophobe) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 497aa44a35..22d04295ad 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -47,7 +47,7 @@ datum/preferences var/r_eyes = 0 //Eye color var/g_eyes = 0 //Eye color var/b_eyes = 0 //Eye color - var/species = "Human" //Species datum to use. + var/species = SPECIES_HUMAN //Species datum to use. var/species_preview //Used for the species selection window. var/list/alternate_languages = list() //Secondary language(s) var/list/language_prefixes = list() //Kanguage prefix keys @@ -293,11 +293,10 @@ datum/preferences if(icon_updates) character.force_update_limbs() - character.update_mutations(0) - character.update_underwear(0) - character.update_hair(0) - character.update_eyes(0) - character.update_icons_all() + character.update_icons_body() + character.update_mutations() + character.update_underwear() + character.update_hair() /datum/preferences/proc/open_load_dialog(mob/user) var/dat = "" diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index d03a5330b6..498da0e290 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -22,6 +22,7 @@ */ var/list/sprite_sheets_refit = null var/ear_protection = 0 + var/blood_sprite_state //Updates the icons of the mob wearing the clothing item, if any. /obj/item/clothing/proc/update_clothing_icon() @@ -83,16 +84,14 @@ //Set species_restricted list switch(target_species) - if("Human", "Skrell") //humanoid bodytypes - species_restricted = list("Human", "Skrell", "Promethean") //skrell/humans can wear each other's suits + if(SPECIES_HUMAN, SPECIES_SKRELL) //humanoid bodytypes + species_restricted = list(SPECIES_HUMAN, SPECIES_SKRELL, SPECIES_PROMETHEAN) //skrell/humans can wear each other's suits else species_restricted = list(target_species) //Set icon if (sprite_sheets_refit && (target_species in sprite_sheets_refit)) - icon_override = sprite_sheets_refit[target_species] - else - icon_override = initial(icon_override) + sprite_sheets[target_species] = sprite_sheets_refit[target_species] if (sprite_sheets_obj && (target_species in sprite_sheets_obj)) icon = sprite_sheets_obj[target_species] @@ -105,17 +104,15 @@ //Set species_restricted list switch(target_species) - if("Skrell") - species_restricted = list("Human", "Skrell", "Promethean") //skrell helmets fit humans too + if(SPECIES_SKRELL) + species_restricted = list(SPECIES_HUMAN, SPECIES_SKRELL, SPECIES_PROMETHEAN) //skrell helmets fit humans too else species_restricted = list(target_species) //Set icon if (sprite_sheets_refit && (target_species in sprite_sheets_refit)) - icon_override = sprite_sheets_refit[target_species] - else - icon_override = initial(icon_override) + sprite_sheets[target_species] = sprite_sheets_refit[target_species] if (sprite_sheets_obj && (target_species in sprite_sheets_obj)) icon = sprite_sheets_obj[target_species] @@ -130,7 +127,7 @@ throwforce = 2 slot_flags = SLOT_EARS sprite_sheets = list( - "Teshari" = 'icons/mob/species/seromi/ears.dmi') + SPECIES_TESHARI = 'icons/mob/species/seromi/ears.dmi') /obj/item/clothing/ears/attack_hand(mob/user as mob) if (!user) return @@ -197,6 +194,7 @@ w_class = ITEMSIZE_SMALL icon = 'icons/obj/clothing/gloves.dmi' siemens_coefficient = 0.9 + blood_sprite_state = "bloodyhands" var/wired = 0 var/obj/item/weapon/cell/cell = 0 var/fingerprint_chance = 0 //How likely the glove is to let fingerprints through @@ -210,8 +208,8 @@ slot_flags = SLOT_GLOVES attack_verb = list("challenged") sprite_sheets = list( - "Teshari" = 'icons/mob/species/seromi/gloves.dmi', - "Vox" = 'icons/mob/species/vox/gloves.dmi' + SPECIES_TESHARI = 'icons/mob/species/seromi/gloves.dmi', + SPECIES_VOX = 'icons/mob/species/vox/gloves.dmi' ) /obj/item/clothing/gloves/update_clothing_icon() @@ -244,8 +242,8 @@ name = "modified [name]" desc = "[desc]
They have had the fingertips cut off of them." if("exclude" in species_restricted) - species_restricted -= "Unathi" - species_restricted -= "Tajara" + species_restricted -= SPECIES_UNATHI + species_restricted -= SPECIES_TAJ return */ @@ -300,7 +298,7 @@ w_class = ITEMSIZE_TINY icon = 'icons/obj/clothing/rings.dmi' gender = NEUTER - species_restricted = list("exclude", "Diona") + species_restricted = list("exclude", SPECIES_DIONA) siemens_coefficient = 1 glove_level = 1 fingerprint_chance = 100 @@ -318,15 +316,17 @@ body_parts_covered = HEAD slot_flags = SLOT_HEAD w_class = ITEMSIZE_SMALL + blood_sprite_state = "helmetblood" var/light_overlay = "helmet_light" var/light_applied var/brightness_on var/on = 0 + var/image/helmet_light sprite_sheets = list( - "Teshari" = 'icons/mob/species/seromi/head.dmi', - "Vox" = 'icons/mob/species/vox/head.dmi' + SPECIES_TESHARI = 'icons/mob/species/seromi/head.dmi', + SPECIES_VOX = 'icons/mob/species/vox/head.dmi' ) /obj/item/clothing/head/attack_self(mob/user) @@ -386,29 +386,29 @@ return 1 /obj/item/clothing/head/update_icon(var/mob/user) - - overlays.Cut() var/mob/living/carbon/human/H - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) H = user if(on) - // Generate object icon. if(!light_overlay_cache["[light_overlay]_icon"]) - light_overlay_cache["[light_overlay]_icon"] = image("icon" = 'icons/obj/light_overlays.dmi', "icon_state" = "[light_overlay]") - overlays |= light_overlay_cache["[light_overlay]_icon"] + light_overlay_cache["[light_overlay]_icon"] = image(icon = 'icons/obj/light_overlays.dmi', icon_state = "[light_overlay]") + helmet_light = light_overlay_cache["[light_overlay]_icon"] + add_overlay(helmet_light) // Generate and cache the on-mob icon, which is used in update_inv_head(). - var/cache_key = "[light_overlay][H ? "_[H.species.get_bodytype(H)]" : ""]" + var/body_type = (H && H.species.get_bodytype(H)) + var/cache_key = "[light_overlay][body_type && sprite_sheets[body_type] ? "_[body_type]" : ""]" if(!light_overlay_cache[cache_key]) - var/use_icon = 'icons/mob/light_overlays.dmi' - if(H && sprite_sheets[H.species.get_bodytype(H)]) - use_icon = sprite_sheets[H.species.get_bodytype(H)] - light_overlay_cache[cache_key] = image("icon" = use_icon, "icon_state" = "[light_overlay]") + var/use_icon = LAZYACCESS(sprite_sheets,body_type) || 'icons/mob/light_overlays.dmi' + light_overlay_cache[cache_key] = image(icon = use_icon, icon_state = "[light_overlay]") - if(H) - H.update_inv_head() + else if(helmet_light) + cut_overlay(helmet_light) + helmet_light = null + + user.update_inv_head() //Will redraw the helmet with the light on the mob /obj/item/clothing/head/update_clothing_icon() if (ismob(src.loc)) @@ -427,11 +427,12 @@ body_parts_covered = HEAD slot_flags = SLOT_MASK body_parts_covered = FACE|EYES + blood_sprite_state = "maskblood" sprite_sheets = list( - "Teshari" = 'icons/mob/species/seromi/masks.dmi', - "Vox" = 'icons/mob/species/vox/masks.dmi', - "Tajara" = 'icons/mob/species/tajaran/mask.dmi', - "Unathi" = 'icons/mob/species/unathi/mask.dmi' + SPECIES_TESHARI = 'icons/mob/species/seromi/masks.dmi', + SPECIES_VOX = 'icons/mob/species/vox/masks.dmi', + SPECIES_TAJ = 'icons/mob/species/tajaran/mask.dmi', + SPECIES_UNATHI = 'icons/mob/species/unathi/mask.dmi' ) var/voicechange = 0 @@ -460,6 +461,7 @@ siemens_coefficient = 0.9 body_parts_covered = FEET slot_flags = SLOT_FEET + blood_sprite_state = "shoeblood" var/can_hold_knife = 0 var/obj/item/holding @@ -475,10 +477,10 @@ slowdown = SHOES_SLOWDOWN force = 2 var/overshoes = 0 - species_restricted = list("exclude","Teshari", "Vox") + species_restricted = list("exclude",SPECIES_TESHARI, SPECIES_VOX) sprite_sheets = list( - "Teshari" = 'icons/mob/species/seromi/shoes.dmi', - "Vox" = 'icons/mob/species/vox/shoes.dmi' + SPECIES_TESHARI = 'icons/mob/species/seromi/shoes.dmi', + SPECIES_VOX = 'icons/mob/species/vox/shoes.dmi' ) /obj/item/clothing/shoes/proc/draw_knife() @@ -581,9 +583,10 @@ w_class = ITEMSIZE_NORMAL preserve_item = 1 + sprite_sheets = list( - "Teshari" = 'icons/mob/species/seromi/suit.dmi', - "Vox" = 'icons/mob/species/vox/suit.dmi' + SPECIES_TESHARI = 'icons/mob/species/seromi/suit.dmi', + SPECIES_VOX = 'icons/mob/species/vox/suit.dmi' ) valid_accessory_slots = list("over", "armband") @@ -609,6 +612,7 @@ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) w_class = ITEMSIZE_NORMAL show_messages = 1 + blood_sprite_state = "uniformblood" var/has_sensor = 1 //For the crew computer 2 = unable to change mode var/sensor_mode = 0 @@ -621,8 +625,8 @@ var/rolled_down = -1 //0 = unrolled, 1 = rolled, -1 = cannot be toggled var/rolled_sleeves = -1 //0 = unrolled, 1 = rolled, -1 = cannot be toggled sprite_sheets = list( - "Teshari" = 'icons/mob/species/seromi/uniform.dmi', - "Vox" = 'icons/mob/species/vox/uniform.dmi' + SPECIES_TESHARI = 'icons/mob/species/seromi/uniform.dmi', + SPECIES_VOX = 'icons/mob/species/vox/uniform.dmi' ) //convenience var for defining the icon state for the overlay used when the clothing is worn. diff --git a/code/modules/clothing/clothing_icons.dm b/code/modules/clothing/clothing_icons.dm new file mode 100644 index 0000000000..33e1da6000 --- /dev/null +++ b/code/modules/clothing/clothing_icons.dm @@ -0,0 +1,34 @@ +/obj/item/clothing/apply_accessories(var/image/standing) + if(LAZYLEN(accessories)) + for(var/obj/item/clothing/accessory/A in accessories) + standing.add_overlay(A.get_mob_overlay()) + +/obj/item/clothing/apply_blood(var/image/standing) + if(blood_DNA && blood_sprite_state && ishuman(loc)) + var/mob/living/carbon/human/H = loc + var/image/bloodsies = image(icon = H.species.get_blood_mask(H), icon_state = blood_sprite_state) + bloodsies.color = blood_color + standing.add_overlay(bloodsies) + +//UNIFORM: Always appends "_s" to iconstate, stupidly. +/obj/item/clothing/under/get_worn_icon_state(var/slot_name) + var/state2use = ..() + state2use += "_s" + return state2use + +//HELMET: May have a lighting overlay +/obj/item/clothing/head/make_worn_icon(var/body_type,var/slot_name,var/inhands,var/default_icon,var/default_layer = 0) + var/image/standing = ..() + if(on && slot_name == slot_head_str) + var/cache_key = "[light_overlay][LAZYACCESS(sprite_sheets,body_type) ? "_[body_type]" : ""]" + if(standing && light_overlay_cache[cache_key]) + standing.add_overlay(light_overlay_cache[cache_key]) + return standing + +//SUIT: Blood state is slightly different +/obj/item/clothing/suit/apply_blood(var/image/standing) + if(blood_DNA && blood_sprite_state && ishuman(loc)) + var/mob/living/carbon/human/H = loc + var/image/bloodsies = image(icon = H.species.get_blood_mask(H), icon_state = "[blood_overlay_type]blood") + bloodsies.color = blood_color + standing.add_overlay(bloodsies) diff --git a/code/modules/clothing/ears/ears.dm b/code/modules/clothing/ears/ears.dm index e6cc1e0983..11c81db633 100644 --- a/code/modules/clothing/ears/ears.dm +++ b/code/modules/clothing/ears/ears.dm @@ -46,7 +46,7 @@ icon = 'icons/obj/clothing/ears.dmi' w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS - species_restricted = list("Skrell") + species_restricted = list(SPECIES_SKRELL) /obj/item/clothing/ears/skrell/chain name = "Gold headtail chains" diff --git a/code/modules/clothing/head/collectable.dm b/code/modules/clothing/head/collectable.dm index cd5a927892..8446b09446 100644 --- a/code/modules/clothing/head/collectable.dm +++ b/code/modules/clothing/head/collectable.dm @@ -10,8 +10,8 @@ desc = "an ultra rare hat. It commands a certain respect." icon_state = "petehat" sprite_sheets = list( - "Teshari" = 'icons/mob/species/seromi/head.dmi', - "Vox" = 'icons/mob/species/vox/head.dmi' + SPECIES_TESHARI = 'icons/mob/species/seromi/head.dmi', + SPECIES_VOX = 'icons/mob/species/vox/head.dmi' ) /obj/item/clothing/head/collectable/slime diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 3a2a4f7328..b046233849 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -153,8 +153,8 @@ icon_state = "swathelm" item_state_slots = list(slot_r_hand_str = "swat", slot_l_hand_str = "swat") sprite_sheets = list( - "Tajara" = 'icons/mob/species/tajaran/helmet.dmi', - "Unathi" = 'icons/mob/species/unathi/helmet.dmi', + SPECIES_TAJ = 'icons/mob/species/tajaran/helmet.dmi', + SPECIES_UNATHI = 'icons/mob/species/unathi/helmet.dmi', ) armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 4441b213ff..3b30c74aad 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -59,7 +59,7 @@ body_parts_covered = 0 //Hack to allow vox to eat while wearing this mask. item_flags = BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT | PHORONGUARD phoronproof = 1 - species_restricted = list("Vox") + species_restricted = list(SPECIES_VOX) filtered_gases = list("oxygen", "sleeping_agent") /obj/item/clothing/mask/gas/syndicate diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index b2395b7edf..4bd3f59e29 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -88,7 +88,7 @@ icon_state = "boots-vox" item_flags = PHORONGUARD phoronproof = 1 - species_restricted = list("Vox") + species_restricted = list(SPECIES_VOX) action_button_name = "Toggle the magclaws" diff --git a/code/modules/clothing/spacesuits/alien.dm b/code/modules/clothing/spacesuits/alien.dm index e23c3c0c26..5b42e77294 100644 --- a/code/modules/clothing/spacesuits/alien.dm +++ b/code/modules/clothing/spacesuits/alien.dm @@ -4,7 +4,7 @@ desc = "Smoothly contoured and polished to a shine. Still looks like a fishbowl." armor = list(melee = 20, bullet = 20, laser = 20, energy = 50, bomb = 50, bio = 100, rad = 50) max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE - species_restricted = list("Skrell","Human") + species_restricted = list(SPECIES_SKRELL,SPECIES_HUMAN) /obj/item/clothing/head/helmet/space/skrell/white icon_state = "skrell_helmet_white" @@ -19,7 +19,7 @@ allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd) heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE - species_restricted = list("Skrell","Human") + species_restricted = list(SPECIES_SKRELL,SPECIES_HUMAN) /obj/item/clothing/suit/space/skrell/white icon_state = "skrell_suit_white" @@ -39,7 +39,7 @@ siemens_coefficient = 0.2 heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE - species_restricted = list("Vox") + species_restricted = list(SPECIES_VOX) /obj/item/clothing/head/helmet/space/vox armor = list(melee = 60, bullet = 50, laser = 40, energy = 15, bomb = 30, bio = 100, rad = 50) @@ -47,7 +47,7 @@ item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT | PHORONGUARD flags_inv = 0 phoronproof = 1 - species_restricted = list("Vox") + species_restricted = list(SPECIES_VOX) /obj/item/clothing/head/helmet/space/vox/pressure name = "alien helmet" diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 54c4d36bb4..df610f3407 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -180,6 +180,15 @@ spark_system = null return ..() +/obj/item/weapon/rig/get_worn_icon_file(var/body_type,var/slot_name,var/default_icon,var/inhands) + if(!inhands && slot_name == slot_back_str) + if(icon_override) + return icon_override + else if(mob_icon) + return mob_icon + + return ..() + /obj/item/weapon/rig/proc/suit_is_deployed() if(!istype(wearer) || src.loc != wearer || wearer.back != src) return 0 @@ -331,7 +340,6 @@ piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT) else piece.item_flags |= (STOPPRESSUREDAMAGE|AIRTIGHT) - update_icon(1) /obj/item/weapon/rig/ui_action_click() toggle_cooling(usr) @@ -599,7 +607,7 @@ // update_inv_wear_suit(), handle species checks here. if(wearer && sprite_sheets && sprite_sheets[wearer.species.get_bodytype(wearer)]) species_icon = sprite_sheets[wearer.species.get_bodytype(wearer)] - mob_icon = image("icon" = species_icon, "icon_state" = "[icon_state]") + mob_icon = icon(icon = species_icon, icon_state = "[icon_state]") if(installed_modules.len) for(var/obj/item/rig_module/module in installed_modules) diff --git a/code/modules/clothing/spacesuits/rig/rig_pieces.dm b/code/modules/clothing/spacesuits/rig/rig_pieces.dm index 032c133fd9..10cae0c964 100644 --- a/code/modules/clothing/spacesuits/rig/rig_pieces.dm +++ b/code/modules/clothing/spacesuits/rig/rig_pieces.dm @@ -11,10 +11,10 @@ cold_protection = HEAD|FACE|EYES brightness_on = 4 sprite_sheets = list( - "Tajara" = 'icons/mob/species/tajaran/helmet.dmi', - "Skrell" = 'icons/mob/species/skrell/helmet.dmi', - "Unathi" = 'icons/mob/species/unathi/helmet.dmi', - "Vox" = 'icons/mob/species/vox/head.dmi' + SPECIES_TAJ = 'icons/mob/species/tajaran/helmet.dmi', + SPECIES_SKRELL = 'icons/mob/species/skrell/helmet.dmi', + SPECIES_UNATHI = 'icons/mob/species/unathi/helmet.dmi', + SPECIES_VOX = 'icons/mob/species/vox/head.dmi' ) species_restricted = null @@ -50,9 +50,9 @@ resilience = 0.2 can_breach = 1 sprite_sheets = list( - "Tajara" = 'icons/mob/species/tajaran/suit.dmi', - "Unathi" = 'icons/mob/species/unathi/suit.dmi', - "Vox" = 'icons/mob/species/vox/suit.dmi' + SPECIES_TAJ = 'icons/mob/species/tajaran/suit.dmi', + SPECIES_UNATHI = 'icons/mob/species/unathi/suit.dmi', + SPECIES_VOX = 'icons/mob/species/vox/suit.dmi' ) supporting_limbs = list() var/obj/item/weapon/material/knife/tacknife diff --git a/code/modules/clothing/spacesuits/rig/suits/alien.dm b/code/modules/clothing/spacesuits/rig/suits/alien.dm index bc3113a4cc..efdbea6476 100644 --- a/code/modules/clothing/spacesuits/rig/suits/alien.dm +++ b/code/modules/clothing/spacesuits/rig/suits/alien.dm @@ -28,14 +28,14 @@ siemens_coefficient = 0.2 /obj/item/clothing/head/helmet/space/rig/breacher - species_restricted = list("Unathi") + species_restricted = list(SPECIES_UNATHI) force = 5 /obj/item/clothing/suit/space/rig/breacher - species_restricted = list("Unathi") + species_restricted = list(SPECIES_UNATHI) /obj/item/clothing/shoes/magboots/rig/breacher - species_restricted = list("Unathi") + species_restricted = list(SPECIES_UNATHI) /* * VOX @@ -62,27 +62,27 @@ glove_type = /obj/item/clothing/gloves/gauntlets/rig/vox /obj/item/clothing/head/helmet/space/rig/vox - species_restricted = list("Vox") + species_restricted = list(SPECIES_VOX) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE phoronproof = 1 /obj/item/clothing/shoes/magboots/rig/vox name = "talons" - species_restricted = list("Vox") + species_restricted = list(SPECIES_VOX) sprite_sheets = list( - "Vox" = 'icons/mob/species/vox/shoes.dmi' + SPECIES_VOX = 'icons/mob/species/vox/shoes.dmi' ) phoronproof = 1 /obj/item/clothing/suit/space/rig/vox - species_restricted = list("Vox") + species_restricted = list(SPECIES_VOX) phoronproof = 1 /obj/item/clothing/gloves/gauntlets/rig/vox siemens_coefficient = 0 - species_restricted = list("Vox") + species_restricted = list(SPECIES_VOX) sprite_sheets = list( - "Vox" = 'icons/mob/species/vox/gloves.dmi' + SPECIES_VOX = 'icons/mob/species/vox/gloves.dmi' ) phoronproof = 1 diff --git a/code/modules/clothing/spacesuits/rig/suits/station.dm b/code/modules/clothing/spacesuits/rig/suits/station.dm index 990fb9c2ed..b308e99e2d 100644 --- a/code/modules/clothing/spacesuits/rig/suits/station.dm +++ b/code/modules/clothing/spacesuits/rig/suits/station.dm @@ -19,10 +19,11 @@ light_overlay = "helmet_light_dual" camera_networks = list(NETWORK_SECURITY) +//Internal Affairs suit /obj/item/weapon/rig/internalaffairs name = "augmented tie" suit_type = "augmented suit" - desc = "Prepare for paperwork." + desc = "The last suit you'll ever wear." icon_state = "internalaffairs_rig" armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) siemens_coefficient = 0.9 @@ -30,7 +31,13 @@ offline_slowdown = 0 offline_vision_restriction = 0 - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/briefcase,/obj/item/weapon/storage/secure/briefcase) + allowed = list( + /obj/item/device/flashlight, + /obj/item/weapon/tank, + /obj/item/device/suit_cooling_unit, + /obj/item/weapon/storage/briefcase, + /obj/item/weapon/storage/secure/briefcase + ) req_access = list() req_one_access = list() @@ -55,10 +62,11 @@ helm_type = null boot_type = null +//Mining suit /obj/item/weapon/rig/industrial name = "industrial suit control module" suit_type = "industrial hardsuit" - desc = "A heavy, powerful rig used by construction crews and mining corporations." + desc = "A heavy, powerful hardsuit used by construction crews and mining corporations." icon_state = "engineering_rig" armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 50) slowdown = 1 @@ -69,7 +77,15 @@ helm_type = /obj/item/clothing/head/helmet/space/rig/industrial - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd) + allowed = list( + /obj/item/device/flashlight, + /obj/item/weapon/tank, + /obj/item/device/suit_cooling_unit, + /obj/item/weapon/storage/bag/ore, + /obj/item/device/t_scanner, + /obj/item/weapon/pickaxe, + /obj/item/weapon/rcd + ) req_access = list() req_one_access = list() @@ -84,10 +100,11 @@ /obj/item/rig_module/vision/material, /obj/item/rig_module/maneuvering_jets) //VOREStation Edit - Added maneuvering jets +//Engineering suit /obj/item/weapon/rig/eva name = "EVA suit control module" suit_type = "EVA hardsuit" - desc = "A light rig for repairs and maintenance to the outside of habitats and vessels." + desc = "A light hardsuit for repairs and maintenance to the outside of habitats and vessels." icon_state = "eva_rig" armor = list(melee = 30, bullet = 10, laser = 20,energy = 25, bomb = 20, bio = 100, rad = 100) slowdown = 0 @@ -98,7 +115,14 @@ helm_type = /obj/item/clothing/head/helmet/space/rig/eva glove_type = /obj/item/clothing/gloves/gauntlets/rig/eva - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/toolbox,/obj/item/weapon/storage/briefcase/inflatable,/obj/item/device/t_scanner,/obj/item/weapon/rcd) + allowed = list( + /obj/item/device/flashlight, + /obj/item/weapon/tank, + /obj/item/device/suit_cooling_unit, + /obj/item/weapon/storage/briefcase/inflatable, + /obj/item/device/t_scanner, + /obj/item/weapon/rcd + ) req_access = list() req_one_access = list() @@ -135,7 +159,14 @@ helm_type = /obj/item/clothing/head/helmet/space/rig/ce glove_type = /obj/item/clothing/gloves/gauntlets/rig/ce - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd) + allowed = list( + /obj/item/device/flashlight, + /obj/item/weapon/tank, + /obj/item/device/suit_cooling_unit, + /obj/item/weapon/storage/briefcase/inflatable, + /obj/item/device/t_scanner, + /obj/item/weapon/rcd + ) req_access = list() req_one_access = list() @@ -157,6 +188,7 @@ /obj/item/rig_module/vision/meson ) +//Research Director's suit. Just add red crowbar. /obj/item/weapon/rig/hazmat name = "AMI control module" @@ -170,7 +202,23 @@ helm_type = /obj/item/clothing/head/helmet/space/rig/hazmat - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/stack/flag,/obj/item/weapon/storage/excavation,/obj/item/weapon/pickaxe,/obj/item/device/healthanalyzer,/obj/item/device/measuring_tape,/obj/item/device/ano_scanner,/obj/item/device/depth_scanner,/obj/item/device/core_sampler,/obj/item/device/gps,/obj/item/device/beacon_locator,/obj/item/device/radio/beacon,/obj/item/weapon/pickaxe/hand,/obj/item/weapon/storage/bag/fossils) + allowed = list( + /obj/item/device/flashlight, + /obj/item/weapon/tank, + /obj/item/device/suit_cooling_unit, + /obj/item/stack/flag, + /obj/item/weapon/storage/excavation, + /obj/item/weapon/pickaxe, + /obj/item/device/healthanalyzer, + /obj/item/device/measuring_tape, + /obj/item/device/ano_scanner, + /obj/item/device/depth_scanner, + /obj/item/device/core_sampler, + /obj/item/device/gps, + /obj/item/device/beacon_locator, + /obj/item/device/radio/beacon, + /obj/item/weapon/pickaxe/hand, + /obj/item/weapon/storage/bag/fossils) req_access = list() req_one_access = list() @@ -185,6 +233,7 @@ /obj/item/rig_module/device/anomaly_scanner ) +//Paramedic suit /obj/item/weapon/rig/medical name = "rescue suit control module" @@ -198,7 +247,15 @@ helm_type = /obj/item/clothing/head/helmet/space/rig/medical - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical,/obj/item/roller ) + allowed = list( + /obj/item/device/flashlight, + /obj/item/weapon/tank, + /obj/item/device/suit_cooling_unit, + /obj/item/weapon/storage/firstaid, + /obj/item/device/healthanalyzer, + /obj/item/stack/medical, + /obj/item/roller + ) req_access = list() req_one_access = list() @@ -215,6 +272,7 @@ /obj/item/rig_module/vision/medhud ) +//Security suit /obj/item/weapon/rig/hazard name = "hazard hardsuit control module" suit_type = "hazard hardsuit" @@ -228,7 +286,13 @@ helm_type = /obj/item/clothing/head/helmet/space/rig/hazard - allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton) + allowed = list( + /obj/item/weapon/gun, + /obj/item/device/flashlight, + /obj/item/weapon/tank, + /obj/item/device/suit_cooling_unit, + /obj/item/weapon/melee/baton + ) req_access = list() req_one_access = list() diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index fdf5a92868..6aed7eaf5d 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -14,7 +14,7 @@ cold_protection = HEAD min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE siemens_coefficient = 0.9 - species_restricted = list("exclude","Diona") + species_restricted = list("exclude",SPECIES_DIONA) preserve_item = 1 phoronproof = 1 flash_protection = FLASH_PROTECTION_MAJOR @@ -62,7 +62,7 @@ cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE siemens_coefficient = 0.9 - species_restricted = list("exclude","Diona") + species_restricted = list("exclude",SPECIES_DIONA) preserve_item = 1 phoronproof = 1 diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index dfc416aa69..ef78d32f03 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -13,16 +13,16 @@ //Species-specific stuff. species_restricted = list("Human", "Promethean") sprite_sheets_refit = list( - "Unathi" = 'icons/mob/species/unathi/helmet.dmi', - "Tajara" = 'icons/mob/species/tajaran/helmet.dmi', - "Skrell" = 'icons/mob/species/skrell/helmet.dmi' + SPECIES_UNATHI = 'icons/mob/species/unathi/helmet.dmi', + SPECIES_TAJ = 'icons/mob/species/tajaran/helmet.dmi', + SPECIES_SKRELL = 'icons/mob/species/skrell/helmet.dmi' //Teshari have a general sprite sheet defined in modules/clothing/clothing.dm ) sprite_sheets_obj = list( - "Unathi" = 'icons/obj/clothing/species/unathi/hats.dmi', - "Tajara" = 'icons/obj/clothing/species/tajaran/hats.dmi', - "Skrell" = 'icons/obj/clothing/species/skrell/hats.dmi', - "Teshari" = 'icons/obj/clothing/species/seromi/hats.dmi' + SPECIES_UNATHI = 'icons/obj/clothing/species/unathi/hats.dmi', + SPECIES_TAJ = 'icons/obj/clothing/species/tajaran/hats.dmi', + SPECIES_SKRELL = 'icons/obj/clothing/species/skrell/hats.dmi', + SPECIES_TESHARI = 'icons/obj/clothing/species/seromi/hats.dmi' ) light_overlay = "helmet_light" @@ -38,18 +38,18 @@ heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE - species_restricted = list("Human", "Skrell", "Promethean") + species_restricted = list("Human", SPECIES_SKRELL, "Promethean") sprite_sheets_refit = list( - "Unathi" = 'icons/mob/species/unathi/suit.dmi', - "Tajara" = 'icons/mob/species/tajaran/suit.dmi', - "Skrell" = 'icons/mob/species/skrell/suit.dmi' + SPECIES_UNATHI = 'icons/mob/species/unathi/suit.dmi', + SPECIES_TAJ = 'icons/mob/species/tajaran/suit.dmi', + SPECIES_SKRELL = 'icons/mob/species/skrell/suit.dmi' //Teshari have a general sprite sheet defined in modules/clothing/clothing.dm ) sprite_sheets_obj = list( - "Unathi" = 'icons/obj/clothing/species/unathi/suits.dmi', - "Tajara" = 'icons/obj/clothing/species/tajaran/suits.dmi', - "Skrell" = 'icons/obj/clothing/species/skrell/suits.dmi', - "Teshari" = 'icons/obj/clothing/species/seromi/suits.dmi' + SPECIES_UNATHI = 'icons/obj/clothing/species/unathi/suits.dmi', + SPECIES_TAJ = 'icons/obj/clothing/species/tajaran/suits.dmi', + SPECIES_SKRELL = 'icons/obj/clothing/species/skrell/suits.dmi', + SPECIES_TESHARI = 'icons/obj/clothing/species/seromi/suits.dmi' ) //Breach thresholds, should ideally be inherited by most (if not all) voidsuits. diff --git a/code/modules/clothing/suits/aliens/seromi.dm b/code/modules/clothing/suits/aliens/seromi.dm index 245ebc5436..62a013644f 100644 --- a/code/modules/clothing/suits/aliens/seromi.dm +++ b/code/modules/clothing/suits/aliens/seromi.dm @@ -5,7 +5,7 @@ icon_override = 'icons/mob/species/seromi/teshari_cloak.dmi' icon_state = "tesh_cloak_bo" item_state = "tesh_cloak_bo" - species_restricted = list("Teshari") + species_restricted = list(SPECIES_TESHARI) body_parts_covered = UPPER_TORSO|ARMS /obj/item/clothing/suit/storage/seromi/cloak/black_orange diff --git a/code/modules/clothing/suits/aliens/vox.dm b/code/modules/clothing/suits/aliens/vox.dm index 823487d212..b17939950c 100644 --- a/code/modules/clothing/suits/aliens/vox.dm +++ b/code/modules/clothing/suits/aliens/vox.dm @@ -6,5 +6,5 @@ icon_state = "vox-scrap" icon_state = "vox-scrap" body_parts_covered = UPPER_TORSO|ARMS|LOWER_TORSO|LEGS - species_restricted = list("Vox") + species_restricted = list(SPECIES_VOX) siemens_coefficient = 1 //Its literally metal \ No newline at end of file diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index cbe02b7474..bf14076f50 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -265,6 +265,15 @@ return ..() +/obj/item/clothing/suit/straight_jacket/equipped(var/mob/living/user,var/slot) + . = ..() + if(slot == slot_wear_suit) + user.drop_l_hand() + user.drop_r_hand() + if(ishuman(user)) + var/mob/living/carbon/human/H = user + H.drop_from_inventory(H.handcuffed) + /obj/item/clothing/suit/ianshirt name = "worn shirt" desc = "A worn out, curiously comfortable t-shirt with a picture of Ian. You wouldn't go so far as to say it feels like being hugged when you wear it but it's pretty close. Good for sleeping in." diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 5d18858cc3..e50c563aed 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -14,7 +14,7 @@ var/concealed_holster = 0 var/mob/living/carbon/human/wearer = null //To check if the wearer changes, so species spritesheets change properly. - sprite_sheets = list("Teshari" = 'icons/mob/species/seromi/ties.dmi') //Teshari can into webbing, too! + sprite_sheets = list(SPECIES_TESHARI = 'icons/mob/species/seromi/ties.dmi') //Teshari can into webbing, too! /obj/item/clothing/accessory/Destroy() on_removed() diff --git a/code/modules/clothing/under/xenos/seromi.dm b/code/modules/clothing/under/xenos/seromi.dm index 5ec18a4859..9d6598a517 100644 --- a/code/modules/clothing/under/xenos/seromi.dm +++ b/code/modules/clothing/under/xenos/seromi.dm @@ -1,7 +1,7 @@ /obj/item/clothing/under/seromi icon = 'icons/obj/clothing/species/seromi/uniform.dmi' icon_state = "seromi_grey" - species_restricted = list("Teshari") + species_restricted = list(SPECIES_TESHARI) /obj/item/clothing/under/seromi/smock name = "small grey smock" diff --git a/code/modules/clothing/under/xenos/vox.dm b/code/modules/clothing/under/xenos/vox.dm index bd66830f6e..e6f63abbcb 100644 --- a/code/modules/clothing/under/xenos/vox.dm +++ b/code/modules/clothing/under/xenos/vox.dm @@ -1,6 +1,6 @@ /obj/item/clothing/under/vox has_sensor = 0 - species_restricted = list("Vox") + species_restricted = list(SPECIES_VOX) valid_accessory_slots = list("vox") restricted_accessory_slots = list("vox") phoronproof = 1 diff --git a/code/modules/events/shipping_error.dm b/code/modules/events/shipping_error.dm index ba1492e65a..725c6a834a 100644 --- a/code/modules/events/shipping_error.dm +++ b/code/modules/events/shipping_error.dm @@ -2,5 +2,5 @@ var/datum/supply_order/O = new /datum/supply_order() O.ordernum = supply_controller.ordernum O.object = supply_controller.supply_packs[pick(supply_controller.supply_packs)] - O.orderedby = random_name(pick(MALE,FEMALE), species = "Human") + O.orderedby = random_name(pick(MALE,FEMALE), species = SPECIES_HUMAN) supply_controller.shoppinglist += O \ No newline at end of file diff --git a/code/modules/ext_scripts/irc.dm b/code/modules/ext_scripts/irc.dm index aef07472d1..e76c2055b7 100644 --- a/code/modules/ext_scripts/irc.dm +++ b/code/modules/ext_scripts/irc.dm @@ -2,7 +2,7 @@ return // VOREStation Edit - Can't exploit shell if we never call shell! if (config.use_irc_bot) if (config.use_node_bot) - shell("node bridge.js -h \"[config.irc_bot_host]\" -p \"[config.irc_bot_port]\" -c \"[channel]\" -m \"[msg]\"") + shell("node bridge.js -h \"[config.irc_bot_host]\" -p \"[config.irc_bot_port]\" -c \"[channel]\" -m \"[escape_shell_arg(msg)]\"") else if (config.irc_bot_host) if(config.irc_bot_export) @@ -17,10 +17,10 @@ nudge_lib = "lib/nudge.so" spawn(0) - call(nudge_lib, "nudge")("[config.comms_password]","[config.irc_bot_host]","[channel]","[msg]") + call(nudge_lib, "nudge")("[config.comms_password]","[config.irc_bot_host]","[channel]","[escape_shell_arg(msg)]") else spawn(0) - ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] [channel] [msg]") + ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] [channel] [escape_shell_arg(msg)]") return /proc/send2mainirc(var/msg) diff --git a/code/modules/ext_scripts/python.dm b/code/modules/ext_scripts/python.dm index 14ec183c35..eb6e61aea2 100644 --- a/code/modules/ext_scripts/python.dm +++ b/code/modules/ext_scripts/python.dm @@ -1,10 +1,28 @@ +// Ported from /vg/. +/proc/escape_shell_arg(var/arg) + // RCE prevention + // - Encloses arg in single quotes + // - Escapes single quotes + // Also escapes %, ! on windows + if(world.system_type == MS_WINDOWS) + arg = replacetext(arg, "^", "^^") // Escape char + arg = replacetext(arg, "%", "%%") // %PATH% -> %%PATH%% + arg = replacetext(arg, "!", "^!") // !PATH!, delayed variable expansion on Windows + arg = replacetext(arg, "\"", "^\"") + arg = "\"[arg]\"" + else + arg = replacetext(arg, "\\", "\\\\'") // Escape char + arg = replacetext(arg, "'", "\\'") // No breaking out of the single quotes. + arg = "'[arg]'" + return arg + /proc/ext_python(var/script, var/args, var/scriptsprefix = 1) return // VOREStation Edit - Can't exploit shell if we never call shell! - if(scriptsprefix) script = "scripts/" + script + if(scriptsprefix) + script = "scripts/" + script if(world.system_type == MS_WINDOWS) script = replacetext(script, "/", "\\") var/command = config.python_path + " " + script + " " + args - - return shell(command) + return shell(command) \ No newline at end of file diff --git a/code/modules/games/cah_black_cards.dm b/code/modules/games/cah_black_cards.dm index 3d9816ea04..08d81c94ae 100644 --- a/code/modules/games/cah_black_cards.dm +++ b/code/modules/games/cah_black_cards.dm @@ -30,7 +30,7 @@ "_____ used ____ to create their newest invention, _____!", "Scientists are not allowed to make Gatling _____.", "It's not a party until the ____ arrive.", - "No matter how many Tajara you have, _____ is never acceptable.", + "No matter how many Tajaran you have, _____ is never acceptable.", "No, the AI's first law is NOT to serve _____.", "The robots are not disposal bins for your _____.", "You can never have too many _____ on shift.", diff --git a/code/modules/games/cah_white_cards.dm b/code/modules/games/cah_white_cards.dm index c4b517116b..53644b3099 100644 --- a/code/modules/games/cah_white_cards.dm +++ b/code/modules/games/cah_white_cards.dm @@ -9,7 +9,7 @@ "Being in a cult", "Racially biased lawsets", "An Unathi who WON'T STOP FIGHTING", - "Tajara fetishists", + "Tajaran fetishists", "Bald thirty-year-olds", "A Chief Engineer who can't setup the engine", "Being sucked out into space", diff --git a/code/modules/holodeck/HolodeckControl.dm b/code/modules/holodeck/HolodeckControl.dm index 8560e71f34..59575eb603 100644 --- a/code/modules/holodeck/HolodeckControl.dm +++ b/code/modules/holodeck/HolodeckControl.dm @@ -247,7 +247,6 @@ var/mob/M = obj.loc if(ismob(M)) M.remove_from_mob(obj) - M.update_icons_layers() //so their overlays update if(!silent) var/obj/oldobj = obj diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index c7f8f275bf..cc2db8bd9b 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -104,8 +104,8 @@ base_icon = 'icons/turf/flooring/asteroid.dmi' initial_flooring = null -/turf/simulated/floor/holofloor/desert/New() - ..() +/turf/simulated/floor/holofloor/desert/initialize() + . = ..() if(prob(10)) add_overlay("asteroid[rand(0,9)]") diff --git a/code/modules/lore_codex/lore_data/species.dm b/code/modules/lore_codex/lore_data/species.dm index 1027b602a8..0ce44f016b 100644 --- a/code/modules/lore_codex/lore_data/species.dm +++ b/code/modules/lore_codex/lore_data/species.dm @@ -48,8 +48,8 @@ /datum/lore/codex/page/tajaran name = "Tajaran" - keywords = list("Tajara") - data = "The Tajara are a race of humanoid mammalian aliens from Meralar, the fourth planet of the Rarkajar star system. Thickly furred and protected \ + keywords = list("Tajaran") + data = "The Tajaran are a race of humanoid mammalian aliens from Meralar, the fourth planet of the Rarkajar star system. Thickly furred and protected \ from cold, they thrive on their subarctic planet, where the only terran temperate areas spread across the equator and tropical belt. \ With their own share of bloody wars and great technological advances, the Tajaran are a proud kind. They fiercely believe they belong \ among the stars and consider themselves a rightful interstellar nation, even if the humans helped them to actually achieve superluminal \ diff --git a/code/modules/maps/tg/reader.dm b/code/modules/maps/tg/reader.dm index fa730f574a..1ba29fa183 100644 --- a/code/modules/maps/tg/reader.dm +++ b/code/modules/maps/tg/reader.dm @@ -96,7 +96,7 @@ var/global/use_preloader = FALSE var/zcrd = text2num(dmmRegex.group[5]) + z_offset - 1 var/zexpansion = zcrd > world.maxz - if(zexpansion) + if(zexpansion && !measureOnly) if(cropMap) continue else @@ -385,6 +385,8 @@ var/global/use_preloader = FALSE /dmm_suite/proc/readlist(text as text, delimiter=",", keys_only_string = FALSE) var/list/to_return = list() + if(text == "") + return to_return // Fast bail-out var/position var/old_position = 1 diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index bc89c498d2..99fe3f85ee 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -269,7 +269,7 @@ resource_field += mine_turf if(!resource_field.len) - system_error("resources depleted") + system_error("Resources depleted.") /obj/machinery/mining/drill/proc/use_cell_power() if(!cell) return 0 diff --git a/code/modules/mining/machine_stacking.dm b/code/modules/mining/machine_stacking.dm index 290ce829d9..f6db90bac5 100644 --- a/code/modules/mining/machine_stacking.dm +++ b/code/modules/mining/machine_stacking.dm @@ -59,6 +59,7 @@ var/obj/item/stack/material/S = new stacktype (get_turf(machine.output)) S.amount = machine.stack_storage[href_list["release_stack"]] machine.stack_storage[href_list["release_stack"]] = 0 + S.update_icon() src.add_fingerprint(usr) src.updateUsrDialog() @@ -128,6 +129,7 @@ var/obj/item/stack/material/S = new stacktype (get_turf(output)) S.amount = stack_amt stack_storage[sheet] -= stack_amt + S.update_icon() console.updateUsrDialog() return diff --git a/code/modules/mining/ore_datum.dm b/code/modules/mining/ore_datum.dm index 7fb5807ba1..a3528eb55b 100644 --- a/code/modules/mining/ore_datum.dm +++ b/code/modules/mining/ore_datum.dm @@ -108,6 +108,7 @@ var/global/list/ore_data = list() /ore/diamond name = "diamond" display_name = "diamond" + alloy = 1 compresses_to = "diamond" result_amount = 5 spread_chance = 10 diff --git a/code/modules/mob/_modifiers/cloning.dm b/code/modules/mob/_modifiers/cloning.dm index c3f8827f7b..76aeabd50c 100644 --- a/code/modules/mob/_modifiers/cloning.dm +++ b/code/modules/mob/_modifiers/cloning.dm @@ -61,3 +61,66 @@ outgoing_melee_damage_percent = 0.5 //50% less outgoing melee damage. attack_speed_percent = 1.2 //20% slower attack speed. + +////////////////////// +//Surgical Modifiers// As of writing, limited to the 'Frankenstein' modifier. +////////////////////// + +/datum/modifier/franken_sickness + name = "surgically attached brain" + desc = "You feel weak, as your central nervous system is still recovering from being repaired." + + on_created_text = "You feel... off, and your head hurts." + on_expired_text = "You feel some strength returning to you." + + max_health_percent = 0.9 // -10% max health. + incoming_damage_percent = 1.1 // 10% more incoming damage. + incoming_hal_damage_percent = 1.5 // 50% more halloss damage, stacking on the previous 1.1 widespread. + outgoing_melee_damage_percent = 0.9 // 10% less melee damage. + disable_duration_percent = 1.25 // Stuns last 25% longer. + incoming_healing_percent = 0.9 // -10% to all healing + slowdown = 0.5 // Slower, by a smidge. + evasion = -5 // 5% easier to hit. + accuracy_dispersion = 1 // Inaccurate trait level of tile dispersion. + + stacks = MODIFIER_STACK_ALLOWED //You have somehow had the surgery done twice. Your brain is very, very fucked, but I won't say no. + +/datum/modifier/franken_sickness/can_apply(var/mob/living/L) + if(!ishuman(L)) + return FALSE + if(L.isSynthetic()) //Nonhumans and Machines cannot be Frankensteined, at this time. + return FALSE + + return ..() + +/datum/modifier/franken_sickness/tick() + if(holder.stat != DEAD) + if(istype(holder, /mob/living/carbon/human)) + var/mob/living/carbon/human/F = holder + if(F.can_defib) + F.can_defib = 0 + +/datum/modifier/franken_sickness/on_expire() //Not permanent, but its child is. + holder.add_modifier(/datum/modifier/franken_recovery, 0) + +/datum/modifier/franken_recovery //When Franken_Sickness expires, this will be permanently applied in its place. + name = "neural recovery" + desc = "You feel out of touch, as your central nervous system is still recovering from being repaired." + + on_created_text = "You feel... off. Everything is fuzzy." + on_expired_text = "You feel your senses returning to you." + + incoming_hal_damage_percent = 1.5 // 50% more halloss damage. + disable_duration_percent = 1.25 // Stuns last 25% longer. + evasion = -5 // 5% easier to hit. + accuracy_dispersion = 1 // Inaccurate trait level of tile dispersion. + + stacks = MODIFIER_STACK_ALLOWED + +/datum/modifier/franken_recovery/can_apply(var/mob/living/L) + if(!ishuman(L)) + return FALSE + if(L.isSynthetic()) //Nonhumans and Machines cannot be Frankensteined, at this time. + return FALSE + + return ..() diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index ce24b1852f..9eb753f8c0 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -103,8 +103,7 @@ if (ishuman(body)) var/mob/living/carbon/human/H = body icon = H.icon - LAZYCLEARLIST(H.list_huds) - H.update_icons() + underlays = H.underlays overlays = H.overlays else icon = body.icon diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index 24a61e6695..d09a95af08 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -9,8 +9,8 @@ var/list/holder_mob_icon_cache = list() show_messages = 1 sprite_sheets = list( - "Teshari" = 'icons/mob/species/seromi/head.dmi', - "Vox" = 'icons/mob/species/vox/head.dmi' + SPECIES_TESHARI = 'icons/mob/species/seromi/head.dmi', + SPECIES_VOX = 'icons/mob/species/vox/head.dmi' ) origin_tech = null @@ -83,8 +83,6 @@ var/list/holder_mob_icon_cache = list() H.update_inv_l_hand() else if(H.r_hand == src) H.update_inv_r_hand() - else - H.regenerate_icons() //Mob specific holders. /obj/item/weapon/holder/diona diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 612f34bc83..c655559a10 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -138,7 +138,6 @@ var/list/slot_equipment_priority = list( \ remove_from_mob(W, target) if(!(W && W.loc)) return 1 // self destroying objects (tk, grabs) - update_icons_layers() return 1 return 0 @@ -180,7 +179,7 @@ var/list/slot_equipment_priority = list( \ /mob/proc/get_inventory_slot(obj/item/I) var/slot = 0 - for(var/s in slot_back to slot_tie) //kind of worries me + for(var/s in 1 to SLOT_TOTAL) if(get_equipped_item(s) == I) slot = s break diff --git a/code/modules/mob/language/station.dm b/code/modules/mob/language/station.dm index 0538e390cb..6de7a9d309 100644 --- a/code/modules/mob/language/station.dm +++ b/code/modules/mob/language/station.dm @@ -63,6 +63,20 @@ "ka","aasi","far","wa","baq","ara","qara","zir","saam","mak","hrar","nja","rir","khan","jun","dar","rik","kah", "hal","ket","jurl","mah","tul","cresh","azu","ragh","mro","mra","mrro","mrra") +/datum/language/tajaranakhani + name = LANGUAGE_AKHANI + desc = "The language of the sea-faring Njarir'Akhan Tajaran. Borrowing some elements from Siik, the language is distinctly more structured." + speech_verb = "chatters" + ask_verb = "mrowls" + exclaim_verb = "wails" + colour = "akhani" + key = "h" + flags = WHITELISTED + syllables = list("mrr","rr","marr","tar","ahk","ket","hal","kah","dra","nal","kra","vah","dar","hrar", "eh", + "ara","ka","zar","mah","ner","zir","mur","hai","raz","ni","ri","nar","njar","jir","ri","ahn","kha","sir", + "kar","yar","kzar","rha","hrar","err","fer","rir","rar","yarr","arr","ii'r","jar","kur","ran","rii","ii", + "nai","ou","kah","oa","ama","uuk","bel","chi","ayt","kay","kas","akor","tam","yir","enai") + /datum/language/tajaran/get_random_name(var/gender) var/new_name = ..(gender,1) diff --git a/code/modules/mob/living/autohiss.dm b/code/modules/mob/living/autohiss.dm index 3a3bddd9b3..2c6fe02645 100644 --- a/code/modules/mob/living/autohiss.dm +++ b/code/modules/mob/living/autohiss.dm @@ -47,13 +47,13 @@ autohiss_extra_map = list( "x" = list("ks", "kss", "ksss") ) - autohiss_exempt = list("Sinta'unathi") + autohiss_exempt = list(LANGUAGE_UNATHI) /datum/species/tajaran autohiss_basic_map = list( "r" = list("rr", "rrr", "rrrr") ) - autohiss_exempt = list("Siik") + autohiss_exempt = list(LANGUAGE_SIIK,LANGUAGE_AKHANI) /datum/species/proc/handle_autohiss(message, datum/language/lang, mode) diff --git a/code/modules/mob/living/bot/edCLNbot.dm b/code/modules/mob/living/bot/edCLNbot.dm new file mode 100644 index 0000000000..159b3e3594 --- /dev/null +++ b/code/modules/mob/living/bot/edCLNbot.dm @@ -0,0 +1,235 @@ +/mob/living/bot/cleanbot/edCLN + name = "ED-CLN Cleaning Robot" + desc = "A large cleaning robot. It looks rather efficient." + icon_state = "edCLN0" + req_one_access = list(access_robotics, access_janitor) + botcard_access = list(access_janitor, access_maint_tunnels) + + locked = 0 // Start unlocked so roboticist can set them to patrol. + wait_if_pulled = 0 // One big boi. + min_target_dist = 0 + + patrol_speed = 3 + target_speed = 6 + + cleaning = 0 + blood = 0 + var/red_switch = 0 + var/blue_switch = 0 + var/green_switch = 0 + +/mob/living/bot/cleanbot/edCLN/update_icons() + if(on && busy) + icon_state = "edCLN" + else + icon_state = "edCLN[on]" + +/mob/living/bot/cleanbot/edCLN/handleIdle() + if(prob(10)) + custom_emote(2, "makes a less than thrilled beeping sound.") + playsound(src.loc, 'sound/machines/synth_yes.ogg', 50, 0) + + if(red_switch && !blue_switch && !green_switch && prob(10) || src.emagged) + if(istype(loc, /turf/simulated)) + var/turf/simulated/T = loc + T.add_blood() + + if(!red_switch && blue_switch && !green_switch && prob(50) || src.emagged) + if(istype(loc, /turf/simulated)) + var/turf/simulated/T = loc + visible_message("\The [src] squirts a puddle of water on the floor!") + T.wet_floor() + + if(!red_switch && !blue_switch && green_switch && prob(10) || src.emagged) + if(istype(loc, /turf/simulated)) + var/turf/simulated/T = loc + visible_message("\The [src] stomps on \the [T], breaking it!") + qdel(T) + + if(red_switch && blue_switch && green_switch && prob(1)) + src.explode() + +/mob/living/bot/cleanbot/edCLN/explode() + on = 0 + visible_message("[src] blows apart!") + var/turf/Tsec = get_turf(src) + + new /obj/item/weapon/secbot_assembly/ed209_assembly(Tsec) + if(prob(50)) + new /obj/item/robot_parts/l_leg(Tsec) + if(prob(50)) + new /obj/item/robot_parts/r_leg(Tsec) + if(prob(50)) + if(prob(50)) + new /obj/item/weapon/reagent_containers/glass/bucket(Tsec) + else + new /obj/item/device/assembly/prox_sensor(Tsec) + + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(3, 1, src) + s.start() + qdel(src) + return + +/mob/living/bot/cleanbot/edCLN/attack_hand(var/mob/user) + var/dat + usr.set_machine(src) + add_fingerprint(usr) + + dat += "Automatic Station Cleaner v2.0

" + dat += "Status: [on ? "On" : "Off"]
" + dat += "Behaviour controls are [locked ? "locked" : "unlocked"]
" + dat += "Maintenance panel is [open ? "opened" : "closed"]" + if(!locked || issilicon(user)) + dat += "
Cleans Blood: [blood ? "Yes" : "No"]
" + dat += "
Patrol station: [will_patrol ? "Yes" : "No"]
" + if(open && !locked) + dat += "
Red Switch: [red_switch ? "On" : "Off"]
" + dat += "
Green Switch: [green_switch ? "On" : "Off"]
" + dat += "
Blue Switch: [blue_switch ? "On" : "Off"]" + + user << browse("Cleaner v2.0 controls[dat]", "window=autocleaner") + onclose(user, "autocleaner") + return + +/mob/living/bot/cleanbot/edCLN/Topic(href, href_list) + usr.set_machine(src) + add_fingerprint(usr) + switch(href_list["operation"]) + if("start") + if(on) + turn_off() + else + turn_on() + if("blood") + blood = !blood + get_targets() + if("patrol") + will_patrol = !will_patrol + patrol_path = null + if("red_switch") + red_switch = !red_switch + to_chat(usr, "You flip the red switch [red_switch ? "on" : "off"].") + if("green_switch") + green_switch = !blue_switch + to_chat(usr, "You flip the green switch [green_switch ? "on" : "off"].") + if("blue_switch") + blue_switch = !blue_switch + to_chat(usr, "You flip the blue switch [blue_switch ? "on" : "off"].") + attack_hand(usr) + +/mob/living/bot/cleanbot/edCLN/emag_act(var/remaining_uses, var/mob/user) + . = ..() + if(!emagged) + if(user) + to_chat(user, "The [src] buzzes and beeps.") + playsound(src.loc, 'sound/machines/buzzbeep.ogg', 50, 0) + emagged = 1 + return 1 + +// Assembly + +/obj/item/weapon/secbot_assembly/edCLN_assembly + name = "ED-CLN assembly" + desc = "Some sort of bizarre assembly." + icon = 'icons/obj/aibots.dmi' + icon_state = "ed209_frame" + item_state = "buildpipe" + created_name = "ED-CLN Security Robot" + +/obj/item/weapon/secbot_assembly/edCLN_assembly/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) + ..() + + if(istype(W, /obj/item/weapon/pen)) + var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN) + if(!t) + return + if(!in_range(src, usr) && src.loc != usr) + return + created_name = t + return + + switch(build_step) + if(0, 1) + if(istype(W, /obj/item/robot_parts/l_leg) || istype(W, /obj/item/robot_parts/r_leg) || (istype(W, /obj/item/organ/external/leg) && ((W.name == "robotic right leg") || (W.name == "robotic left leg")))) + user.drop_item() + qdel(W) + build_step++ + to_chat(user, "You add \the [W] to \the [src].") + name = "legs/frame assembly" + if(build_step == 1) + icon_state = "ed209_leg" + else + icon_state = "ed209_legs" + + if(2) + if(istype(W, /obj/item/weapon/reagent_containers/glass/bucket)) + user.drop_item() + qdel(W) + build_step++ + to_chat(user, "You add \the [W] to \the [src].") + name = "bucket/legs/frame assembly" + item_state = "edCLN_bucket" + icon_state = "edCLN_bucket" + + if(3) + if(istype(W, /obj/item/weapon/weldingtool)) + var/obj/item/weapon/weldingtool/WT = W + if(WT.remove_fuel(0, user)) + build_step++ + name = "bucketed frame assembly" + to_chat(user, "You welded the bucket to \the [src].") + if(4) + if(isprox(W)) + user.drop_item() + qdel(W) + build_step++ + to_chat(user, "You add \the [W] to \the [src].") + name = "proximity bucket ED assembly" + item_state = "edCLN_prox" + icon_state = "edCLN_prox" + + if(5) + if(istype(W, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/C = W + if (C.get_amount() < 1) + to_chat(user, "You need one coil of wire to wire \the [src].") + return + to_chat(user, "You start to wire \the [src].") + if(do_after(user, 40)) + if(C.use(1)) + build_step++ + to_chat(user, "You wire the ED-CLN assembly.") + name = "wired ED-CLN assembly" + return + + if(6) + if(istype(W, /obj/item/weapon/mop)) + name = "mop ED-CLN assembly" + build_step++ + to_chat(user, "You add \the [W] to \the [src].") + item_state = "edCLN_mop" + icon_state = "edCLN_mop" + user.drop_item() + qdel(W) + + if(7) + if(istype(W, /obj/item/weapon/screwdriver)) + playsound(src, W.usesound, 100, 1) + var/turf/T = get_turf(user) + to_chat(user, "Attatching the mop to the frame...") + if(do_after(user, 40) && get_turf(user) == T) + build_step++ + name = "mopped ED-CLN assembly" + to_chat(user, "Mop attached.") + + if(8) + if(istype(W, /obj/item/weapon/cell)) + build_step++ + to_chat(user, "You complete the ED-CLN.") + var/turf/T = get_turf(src) + new /mob/living/bot/cleanbot/edCLN(T,created_name) + user.drop_item() + qdel(W) + user.drop_from_inventory(src) + qdel(src) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/diona/diona.dm b/code/modules/mob/living/carbon/alien/diona/diona.dm index 8a2b24cf50..5d497d0a08 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona.dm @@ -23,7 +23,7 @@ /mob/living/carbon/alien/diona/New() ..() - species = all_species["Diona"] + species = all_species[SPECIES_DIONA] add_language(LANGUAGE_ROOTGLOBAL) add_language(LANGUAGE_GALCOM) verbs += /mob/living/carbon/alien/diona/proc/merge diff --git a/code/modules/mob/living/carbon/alien/diona/diona_powers.dm b/code/modules/mob/living/carbon/alien/diona/diona_powers.dm index 54678e1ea0..614647993b 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona_powers.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona_powers.dm @@ -19,7 +19,7 @@ if(istype(C,/mob/living/carbon/human)) var/mob/living/carbon/human/D = C - if(D.species && D.species.name == "Diona") + if(D.species && D.species.name == SPECIES_DIONA) choices += C var/mob/living/M = input(src,"Who do you wish to merge with?") in null|choices diff --git a/code/modules/mob/living/carbon/alien/diona/progression.dm b/code/modules/mob/living/carbon/alien/diona/progression.dm index 8be2f7c5aa..b6c5b9b4fd 100644 --- a/code/modules/mob/living/carbon/alien/diona/progression.dm +++ b/code/modules/mob/living/carbon/alien/diona/progression.dm @@ -1,6 +1,6 @@ /mob/living/carbon/alien/diona/confirm_evolution() - if(!is_alien_whitelisted(src, all_species["Diona"])) + if(!is_alien_whitelisted(src, all_species[SPECIES_DIONA])) src << alert("You are currently not whitelisted to play as a full diona.") return null @@ -16,4 +16,4 @@ qdel(L) src.visible_message("[src] begins to shift and quiver, and erupts in a shower of shed bark as it splits into a tangle of nearly a dozen new dionaea.","You begin to shift and quiver, feeling your awareness splinter. All at once, we consume our stored nutrients to surge with growth, splitting into a tangle of at least a dozen new dionaea. We have attained our gestalt form.") - return "Diona" \ No newline at end of file + return SPECIES_DIONA \ No newline at end of file diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 9846c4f109..283cb10b1c 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1,8 +1,8 @@ /mob/living/carbon/New() //setup reagent holders - bloodstr = new/datum/reagents/metabolism(1000, src, CHEM_BLOOD) - ingested = new/datum/reagents/metabolism(1000, src, CHEM_INGEST) - touching = new/datum/reagents/metabolism(1000, src, CHEM_TOUCH) + bloodstr = new/datum/reagents/metabolism/bloodstream(500, src) + ingested = new/datum/reagents/metabolism/ingested(500, src) + touching = new/datum/reagents/metabolism/touch(500, src) reagents = bloodstr if (!default_language && species_language) default_language = all_languages[species_language] @@ -278,23 +278,6 @@ // ++++ROCKDTBEN++++ MOB PROCS //END -/mob/living/carbon/clean_blood() - . = ..() - if(ishuman(src)) - var/mob/living/carbon/human/H = src - if(H.gloves) - if(H.gloves.clean_blood()) - H.update_inv_gloves(0) - H.gloves.germ_level = 0 - else - if(H.bloody_hands) - H.bloody_hands = 0 - H.update_inv_gloves(0) - H.germ_level = 0 - update_icons_layers(FALSE) //apply the now updated overlays to the mob - update_icons_body() - - /mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) ..() var/temp_inc = max(min(BODYTEMP_HEATING_MAX*(1-get_heat_protection()), exposed_temperature - bodytemperature), 0) diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 532b2daa7c..1112b4e49c 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -17,9 +17,9 @@ //Active emote/pose var/pose = null var/list/chem_effects = list() - var/datum/reagents/metabolism/bloodstr = null - var/datum/reagents/metabolism/ingested = null - var/datum/reagents/metabolism/touching = null + var/datum/reagents/metabolism/bloodstream/bloodstr = null + var/datum/reagents/metabolism/ingested/ingested = null + var/datum/reagents/metabolism/touch/touching = null var/pulse = PULSE_NORM //current pulse level diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index facc1ac438..d31754bdf0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -5,7 +5,8 @@ icon = 'icons/effects/effects.dmi' //We have an ultra-complex update icons that overlays everything, don't load some stupid random male human icon_state = "nothing" - var/list/hud_list[TOTAL_HUDS] + has_huds = TRUE //We do have HUDs (like health, wanted, status, not inventory slots) + var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us. var/obj/item/weapon/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call. var/last_push_time //For human_attackhand.dm, keeps track of the last use of disarm @@ -40,9 +41,8 @@ nutrition = rand(200,400) - make_hud_overlays() - human_mob_list |= src + ..() hide_underwear.Cut() @@ -53,19 +53,11 @@ dna.ready_dna(src) dna.real_name = real_name sync_organ_dna() - make_blood() /mob/living/carbon/human/Destroy() human_mob_list -= src for(var/organ in organs) qdel(organ) - - LAZYCLEARLIST(list_layers) - list_layers = null //Be free! - LAZYCLEARLIST(list_body) - list_body = null - LAZYCLEARLIST(list_huds) - list_huds = null qdel_null(nif) //VOREStation Add qdel_null_list(vore_organs) //VOREStation Add return ..() @@ -1034,7 +1026,7 @@ if(!blood_DNA[M.dna.unique_enzymes]) blood_DNA[M.dna.unique_enzymes] = M.dna.b_type hand_blood_color = blood_color - src.update_inv_gloves() //handles bloody hands overlays and updating + update_bloodied() verbs += /mob/living/carbon/human/proc/bloody_doodle return 1 //we applied blood to the item @@ -1044,14 +1036,30 @@ return md5(dna.uni_identity) /mob/living/carbon/human/clean_blood(var/washshoes) - .=..() + . = ..() + gunshot_residue = null - if(washshoes && !shoes && istype(feet_blood_DNA, /list) && feet_blood_DNA.len) - feet_blood_color = null - feet_blood_DNA.Cut() + + //Always do hands (or whatever's on our hands) + if(gloves) + gloves.clean_blood() + update_inv_gloves() + gloves.germ_level = 0 + else + bloody_hands = 0 + germ_level = 0 + + //Sometimes do shoes if asked (or feet if no shoes) + if(washshoes && shoes) + shoes.clean_blood() + update_inv_shoes() + shoes.germ_level = 0 + else if(washshoes && (feet_blood_color || LAZYLEN(feet_blood_DNA))) + LAZYCLEARLIST(feet_blood_DNA) feet_blood_DNA = null - update_inv_shoes(1) - return 1 + feet_blood_color = null + + update_bloodied() /mob/living/carbon/human/get_visible_implants(var/class = 0) @@ -1128,7 +1136,7 @@ if(!dna) if(!new_species) - new_species = "Human" + new_species = SPECIES_HUMAN else if(!new_species) new_species = dna.species @@ -1137,7 +1145,7 @@ // No more invisible screaming wheelchairs because of set_species() typos. if(!all_species[new_species]) - new_species = "Human" + new_species = SPECIES_HUMAN if(species) @@ -1185,6 +1193,7 @@ spawn(0) if(regen_icons) regenerate_icons() + make_blood() if(vessel.total_volume < species.blood_volume) vessel.maximum_volume = species.blood_volume vessel.add_reagent("blood", species.blood_volume - vessel.total_volume) @@ -1201,6 +1210,9 @@ qdel(hud_used) hud_used = new /datum/hud(src) + //A slew of bits that may be affected by our species change + regenerate_icons() + if(species) //if(mind) //VOREStation Removal //apply_traits() //VOREStation Removal @@ -1557,25 +1569,20 @@ return species.fire_icon_state // Called by job_controller. Makes drones start with a permit, might be useful for other people later too. -/mob/living/carbon/human/equip_post_job() +/mob/living/carbon/human/equip_post_job() //Drone Permit moved to equip_survival_gear() var/braintype = get_FBP_type() if(braintype == FBP_DRONE) var/turf/T = get_turf(src) var/obj/item/clothing/accessory/permit/drone/permit = new(T) permit.set_name(real_name) - equip_to_slot_or_del(permit, slot_in_backpack) + equip_to_appropriate_slot(permit) // If for some reason it can't find room, it'll still be on the floor. -/mob/living/carbon/human/proc/update_icon_special(var/mutable_appearance/ma, var/update_icons = TRUE) //For things such as teshari hiding and whatnot. +/mob/living/carbon/human/proc/update_icon_special() //For things such as teshari hiding and whatnot. if(hiding) // Hiding? Carry on. if(stat == DEAD || paralysis || weakened || stunned) //stunned/knocked down by something that isn't the rest verb? Note: This was tried with INCAPACITATION_STUNNED, but that refused to work. hiding = FALSE //No hiding for you. Mob layer should be updated naturally, but it actually doesn't. else - ma.layer = HIDING_LAYER - - //Can put special species icon update proc calls here, if any are ever invented. - - if(update_icons) - update_icons() + layer = HIDING_LAYER /mob/living/carbon/human/proc/get_display_species() //Shows species in tooltip diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index a4a5420b1c..d4c33117b2 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -103,8 +103,6 @@ can_be_antagged = TRUE - var/has_huds = TRUE //Do they have all the fancy life huds? Not for mannequins. - // Used by mobs in virtual reality to point back to the "real" mob the client belongs to. var/mob/living/carbon/human/vr_holder = null // Used by "real" mobs after they leave a VR session diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 4cf0be2dc5..2589b1c9da 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -108,7 +108,7 @@ return FBP_NONE -/mob/living/carbon/human/proc/make_hud_overlays() +/mob/living/carbon/human/make_hud_overlays() hud_list[HEALTH_HUD] = gen_hud_image(ingame_hud_med, src, "100", plane = PLANE_CH_HEALTH) if(isSynthetic()) hud_list[STATUS_HUD] = gen_hud_image(ingame_hud, src, "hudrobo", plane = PLANE_CH_STATUS) @@ -123,6 +123,7 @@ hud_list[IMPTRACK_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_IMPTRACK) hud_list[SPECIALROLE_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_SPECIAL) hud_list[STATUS_HUD_OOC] = gen_hud_image(ingame_hud, src, "hudhealthy", plane = PLANE_CH_STATUS_OOC) + add_overlay(hud_list) /mob/living/carbon/human/recalculate_vis() if(!vis_enabled || !plane_holder) diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 4331b05407..90e21023f1 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -2,7 +2,8 @@ var/obj/item/organ/internal/eyes/eyes = internal_organs_by_name[O_EYES] if(eyes) eyes.update_colour() - regenerate_icons() + update_icons_body() //Body handles eyes + update_eyes() //For floating eyes only /mob/living/carbon/var/list/internal_organs = list() /mob/living/carbon/human/var/list/organs = list() diff --git a/code/modules/mob/living/carbon/human/human_species.dm b/code/modules/mob/living/carbon/human/human_species.dm index 8b828900d1..e791d69749 100644 --- a/code/modules/mob/living/carbon/human/human_species.dm +++ b/code/modules/mob/living/carbon/human/human_species.dm @@ -12,42 +12,42 @@ /mob/living/carbon/human/skrell/New(var/new_loc) h_style = "Skrell Short Tentacles" - ..(new_loc, "Skrell") + ..(new_loc, SPECIES_SKRELL) /mob/living/carbon/human/tajaran/New(var/new_loc) h_style = "Tajaran Ears" - ..(new_loc, "Tajara") + ..(new_loc, SPECIES_TAJ) /mob/living/carbon/human/unathi/New(var/new_loc) h_style = "Unathi Horns" - ..(new_loc, "Unathi") + ..(new_loc, SPECIES_UNATHI) /mob/living/carbon/human/vox/New(var/new_loc) h_style = "Short Vox Quills" - ..(new_loc, "Vox") + ..(new_loc, SPECIES_VOX) /mob/living/carbon/human/diona/New(var/new_loc) - ..(new_loc, "Diona") + ..(new_loc, SPECIES_DIONA) /mob/living/carbon/human/teshari/New(var/new_loc) h_style = "Teshari Default" - ..(new_loc, "Teshari") + ..(new_loc, SPECIES_TESHARI) /mob/living/carbon/human/promethean/New(var/new_loc) - ..(new_loc, "Promethean") + ..(new_loc, SPECIES_PROMETHEAN) /mob/living/carbon/human/machine/New(var/new_loc) h_style = "blue IPC screen" ..(new_loc, "Machine") /mob/living/carbon/human/monkey/New(var/new_loc) - ..(new_loc, "Monkey") + ..(new_loc, SPECIES_MONKEY) /mob/living/carbon/human/farwa/New(var/new_loc) - ..(new_loc, "Farwa") + ..(new_loc, SPECIES_MONKEY_TAJ) /mob/living/carbon/human/neaera/New(var/new_loc) - ..(new_loc, "Neaera") + ..(new_loc, SPECIES_MONKEY_SKRELL) /mob/living/carbon/human/stok/New(var/new_loc) - ..(new_loc, "Stok") + ..(new_loc, SPECIES_MONKEY_UNATHI) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 947b844ad2..9319893175 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -152,12 +152,14 @@ This saves us from having to call add_fingerprint() any time something is put in else if (W == wear_id) wear_id = null update_inv_wear_id() + BITSET(hud_updateflag, ID_HUD) + BITSET(hud_updateflag, WANTED_HUD) else if (W == r_store) r_store = null - update_inv_pockets() + //update_inv_pockets() //Doesn't do anything. else if (W == l_store) l_store = null - update_inv_pockets() + //update_inv_pockets() //Doesn't do anything. else if (W == s_store) s_store = null update_inv_s_store() @@ -195,8 +197,7 @@ This saves us from having to call add_fingerprint() any time something is put in //This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible() -//set redraw_mob to 0 if you don't wish the hud to be updated - if you're doing it manually in your own proc. -/mob/living/carbon/human/equip_to_slot(obj/item/W as obj, slot, redraw_mob = 1) +/mob/living/carbon/human/equip_to_slot(obj/item/W as obj, slot) if(!slot) return @@ -213,39 +214,41 @@ This saves us from having to call add_fingerprint() any time something is put in src.back = W W.equipped(src, slot) worn_clothing += back - update_inv_back(redraw_mob) + update_inv_back() if(slot_wear_mask) src.wear_mask = W if(wear_mask.flags_inv & (BLOCKHAIR|BLOCKHEADHAIR)) - update_hair(redraw_mob) //rebuild hair - update_inv_ears(0) + update_hair() //rebuild hair + update_inv_ears() W.equipped(src, slot) worn_clothing += wear_mask - update_inv_wear_mask(redraw_mob) + update_inv_wear_mask() if(slot_handcuffed) src.handcuffed = W - update_inv_handcuffed(redraw_mob) + update_inv_handcuffed() if(slot_legcuffed) src.legcuffed = W W.equipped(src, slot) - update_inv_legcuffed(redraw_mob) + update_inv_legcuffed() if(slot_l_hand) src.l_hand = W W.equipped(src, slot) - update_inv_l_hand(redraw_mob) + update_inv_l_hand() if(slot_r_hand) src.r_hand = W W.equipped(src, slot) - update_inv_r_hand(redraw_mob) + update_inv_r_hand() if(slot_belt) src.belt = W W.equipped(src, slot) worn_clothing += belt - update_inv_belt(redraw_mob) + update_inv_belt() if(slot_wear_id) src.wear_id = W W.equipped(src, slot) - update_inv_wear_id(redraw_mob) + update_inv_wear_id() + BITSET(hud_updateflag, ID_HUD) + BITSET(hud_updateflag, WANTED_HUD) if(slot_l_ear) src.l_ear = W if(l_ear.slot_flags & SLOT_TWOEARS) @@ -254,7 +257,7 @@ This saves us from having to call add_fingerprint() any time something is put in src.r_ear = O O.hud_layerise() W.equipped(src, slot) - update_inv_ears(redraw_mob) + update_inv_ears() if(slot_r_ear) src.r_ear = W if(r_ear.slot_flags & SLOT_TWOEARS) @@ -263,54 +266,54 @@ This saves us from having to call add_fingerprint() any time something is put in src.l_ear = O O.hud_layerise() W.equipped(src, slot) - update_inv_ears(redraw_mob) + update_inv_ears() if(slot_glasses) src.glasses = W W.equipped(src, slot) - update_inv_glasses(redraw_mob) + update_inv_glasses() if(slot_gloves) src.gloves = W W.equipped(src, slot) worn_clothing += glasses - update_inv_gloves(redraw_mob) + update_inv_gloves() if(slot_head) src.head = W if(head.flags_inv & (BLOCKHAIR|BLOCKHEADHAIR|HIDEMASK)) - update_hair(redraw_mob) //rebuild hair + update_hair() //rebuild hair update_inv_ears(0) update_inv_wear_mask(0) if(istype(W,/obj/item/clothing/head/kitty)) W.update_icon(src) W.equipped(src, slot) worn_clothing += head - update_inv_head(redraw_mob) + update_inv_head() if(slot_shoes) src.shoes = W W.equipped(src, slot) worn_clothing += shoes - update_inv_shoes(redraw_mob) + update_inv_shoes() if(slot_wear_suit) src.wear_suit = W W.equipped(src, slot) worn_clothing += wear_suit - update_inv_wear_suit(redraw_mob) + update_inv_wear_suit() if(slot_w_uniform) src.w_uniform = W W.equipped(src, slot) worn_clothing += w_uniform - update_inv_w_uniform(redraw_mob) + update_inv_w_uniform() if(slot_l_store) src.l_store = W W.equipped(src, slot) - update_inv_pockets(redraw_mob) + //update_inv_pockets() //Doesn't do anything if(slot_r_store) src.r_store = W W.equipped(src, slot) - update_inv_pockets(redraw_mob) + //update_inv_pockets() //Doesn't do anything if(slot_s_store) src.s_store = W W.equipped(src, slot) - update_inv_s_store(redraw_mob) + update_inv_s_store() if(slot_in_backpack) if(src.get_active_hand() == W) src.remove_from_mob(W) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index edc49641fe..c22eea6911 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -268,7 +268,7 @@ Weaken(3) if(!lying) emote("collapse") - if(prob(5) && prob(100 * RADIATION_SPEED_COEFFICIENT) && species.get_bodytype() == "Human") //apes go bald + if(prob(5) && prob(100 * RADIATION_SPEED_COEFFICIENT) && species.get_bodytype() == SPECIES_HUMAN) //apes go bald if((h_style != "Bald" || f_style != "Shaved" )) src << "Your hair falls out." h_style = "Bald" @@ -319,14 +319,15 @@ /mob/living/carbon/human/get_breath_from_internal(volume_needed=BREATH_VOLUME) if(internal) - + //Because rigs store their tanks out of reach of contents.Find(), a check has to be made to make + //sure the rig is still worn, still online, and that its air supply still exists. var/obj/item/weapon/tank/rig_supply if(istype(back,/obj/item/weapon/rig)) var/obj/item/weapon/rig/rig = back if(!rig.offline && (rig.air_supply && internal == rig.air_supply)) rig_supply = rig.air_supply - if (!rig_supply && (!contents.Find(internal) || !((wear_mask && (wear_mask.item_flags & AIRTIGHT)) || (head && (head.item_flags & AIRTIGHT))))) + if ((!rig_supply && !contents.Find(internal)) || !((wear_mask && (wear_mask.item_flags & AIRTIGHT)) || (head && (head.item_flags & AIRTIGHT)))) internal = null if(internal) @@ -1592,26 +1593,24 @@ we only set those statuses and icons upon changes. Then those HUD items will simply add those pre-made images. This proc below is only called when those HUD elements need to change as determined by the mobs hud_updateflag. */ - - /mob/living/carbon/human/proc/handle_hud_list() if (BITTEST(hud_updateflag, HEALTH_HUD)) - var/image/holder = hud_list[HEALTH_HUD] + var/image/holder = grab_hud(HEALTH_HUD) if(stat == DEAD) holder.icon_state = "-100" // X_X else holder.icon_state = RoundHealth((health-config.health_threshold_crit)/(getMaxHealth()-config.health_threshold_crit)*100) - hud_list[HEALTH_HUD] = holder + apply_hud(HEALTH_HUD, holder) if (BITTEST(hud_updateflag, LIFE_HUD)) - var/image/holder = hud_list[LIFE_HUD] + var/image/holder = grab_hud(LIFE_HUD) if(isSynthetic()) holder.icon_state = "hudrobo" else if(stat == DEAD) holder.icon_state = "huddead" else holder.icon_state = "hudhealthy" - hud_list[LIFE_HUD] = holder + apply_hud(LIFE_HUD, holder) if (BITTEST(hud_updateflag, STATUS_HUD)) var/foundVirus = 0 @@ -1620,8 +1619,8 @@ foundVirus = 1 break - var/image/holder = hud_list[STATUS_HUD] - var/image/holder2 = hud_list[STATUS_HUD_OOC] + var/image/holder = grab_hud(STATUS_HUD) + var/image/holder2 = grab_hud(STATUS_HUD_OOC) if (isSynthetic()) holder.icon_state = "hudrobo" else if(stat == DEAD) @@ -1643,11 +1642,11 @@ else holder2.icon_state = "hudhealthy" - hud_list[STATUS_HUD] = holder - hud_list[STATUS_HUD_OOC] = holder2 + apply_hud(STATUS_HUD, holder) + apply_hud(STATUS_HUD_OOC, holder2) if (BITTEST(hud_updateflag, ID_HUD)) - var/image/holder = hud_list[ID_HUD] + var/image/holder = grab_hud(ID_HUD) if(wear_id) var/obj/item/weapon/card/id/I = wear_id.GetID() if(I) @@ -1657,11 +1656,10 @@ else holder.icon_state = "hudunknown" - - hud_list[ID_HUD] = holder + apply_hud(ID_HUD, holder) if (BITTEST(hud_updateflag, WANTED_HUD)) - var/image/holder = hud_list[WANTED_HUD] + var/image/holder = grab_hud(WANTED_HUD) holder.icon_state = "hudblank" var/perpname = name if(wear_id) @@ -1684,15 +1682,16 @@ else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Released")) holder.icon_state = "hudreleased" break - hud_list[WANTED_HUD] = holder + + apply_hud(WANTED_HUD, holder) if ( BITTEST(hud_updateflag, IMPLOYAL_HUD) \ || BITTEST(hud_updateflag, IMPCHEM_HUD) \ || BITTEST(hud_updateflag, IMPTRACK_HUD)) - var/image/holder1 = hud_list[IMPTRACK_HUD] - var/image/holder2 = hud_list[IMPLOYAL_HUD] - var/image/holder3 = hud_list[IMPCHEM_HUD] + var/image/holder1 = grab_hud(IMPTRACK_HUD) + var/image/holder2 = grab_hud(IMPLOYAL_HUD) + var/image/holder3 = grab_hud(IMPCHEM_HUD) holder1.icon_state = "hudblank" holder2.icon_state = "hudblank" @@ -1708,22 +1707,23 @@ if(istype(I,/obj/item/weapon/implant/chem)) holder3.icon_state = "hud_imp_chem" - hud_list[IMPTRACK_HUD] = holder1 - hud_list[IMPLOYAL_HUD] = holder2 - hud_list[IMPCHEM_HUD] = holder3 + apply_hud(IMPTRACK_HUD, holder1) + apply_hud(IMPLOYAL_HUD, holder2) + apply_hud(IMPCHEM_HUD, holder3) if (BITTEST(hud_updateflag, SPECIALROLE_HUD)) - var/image/holder = hud_list[SPECIALROLE_HUD] + var/image/holder = grab_hud(SPECIALROLE_HUD) holder.icon_state = "hudblank" if(mind && mind.special_role) if(hud_icon_reference[mind.special_role]) holder.icon_state = hud_icon_reference[mind.special_role] else holder.icon_state = "hudsyndicate" - hud_list[SPECIALROLE_HUD] = holder + apply_hud(SPECIALROLE_HUD, holder) + attempt_vr(src,"handle_hud_list_vr",list()) //VOREStation Add - Custom HUDs. + hud_updateflag = 0 - update_icons_huds() /mob/living/carbon/human/handle_stunned() if(!can_feel_pain()) diff --git a/code/modules/mob/living/carbon/human/species/outsider/shadow.dm b/code/modules/mob/living/carbon/human/species/outsider/shadow.dm index 672840117e..5d81bb4c9c 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/shadow.dm @@ -1,5 +1,5 @@ /datum/species/shadow - name = "Shadow" + name = SPECIES_SHADOW name_plural = "shadows" icobase = 'icons/mob/human_races/r_shadow.dmi' diff --git a/code/modules/mob/living/carbon/human/species/outsider/skeleton.dm b/code/modules/mob/living/carbon/human/species/outsider/skeleton.dm index d3b9f5d9b9..0f8837460c 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/skeleton.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/skeleton.dm @@ -1,5 +1,5 @@ /datum/species/skeleton - name = "Skeleton" + name = SPECIES_SKELETON name_plural = "Skeletons" icobase = 'icons/mob/human_races/r_skeleton.dmi' primitive_form = "Monkey" diff --git a/code/modules/mob/living/carbon/human/species/outsider/vox.dm b/code/modules/mob/living/carbon/human/species/outsider/vox.dm index 37a631dc46..9fab4751cc 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/vox.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/vox.dm @@ -1,5 +1,5 @@ /datum/species/vox - name = "Vox" + name = SPECIES_VOX name_plural = "Vox" icobase = 'icons/mob/human_races/r_vox.dmi' deform = 'icons/mob/human_races/r_def_vox.dmi' diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm index 55d2dc1e8d..7b923cc518 100644 --- a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm +++ b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm @@ -13,7 +13,7 @@ var/list/wrapped_species_by_ref = list() var/list/valid_transform_species = list() var/monochromatic - var/default_form = "Human" + var/default_form = SPECIES_HUMAN /datum/species/shapeshifter/get_valid_shapeshifter_forms(var/mob/living/carbon/human/H) return valid_transform_species diff --git a/code/modules/mob/living/carbon/human/species/station/golem.dm b/code/modules/mob/living/carbon/human/species/station/golem.dm index 171af12d12..9ec7a2b005 100644 --- a/code/modules/mob/living/carbon/human/species/station/golem.dm +++ b/code/modules/mob/living/carbon/human/species/station/golem.dm @@ -1,5 +1,5 @@ /datum/species/golem - name = "Golem" + name = SPECIES_GOLEM name_plural = "golems" icobase = 'icons/mob/human_races/r_golem.dmi' diff --git a/code/modules/mob/living/carbon/human/species/station/human_subspecies.dm b/code/modules/mob/living/carbon/human/species/station/human_subspecies.dm index d8f474d9ed..180732b0aa 100644 --- a/code/modules/mob/living/carbon/human/species/station/human_subspecies.dm +++ b/code/modules/mob/living/carbon/human/species/station/human_subspecies.dm @@ -33,7 +33,7 @@ */ /datum/species/human/vatgrown - name = "Vatborn" + name = SPECIES_HUMAN_VATBORN name_plural = "Vatborn" blurb = "With cloning on the forefront of human scientific advancement, cheap mass production \ of bodies is a very real and rather ethically grey industry. Vat-grown or Vatborn humans tend to be \ diff --git a/code/modules/mob/living/carbon/human/species/station/monkey.dm b/code/modules/mob/living/carbon/human/species/station/monkey.dm index e70bc76f17..dcc31ab77a 100644 --- a/code/modules/mob/living/carbon/human/species/station/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/station/monkey.dm @@ -1,5 +1,5 @@ /datum/species/monkey - name = "Monkey" + name = SPECIES_MONKEY name_plural = "Monkeys" blurb = "Ook." @@ -10,7 +10,7 @@ blood_mask = 'icons/mob/human_races/masks/blood_monkey.dmi' language = null default_language = "Chimpanzee" - greater_form = "Human" + greater_form = SPECIES_HUMAN mob_size = MOB_SMALL has_fine_manipulation = 0 show_ssd = null @@ -66,26 +66,26 @@ return "[lowertext(name)] ([rand(100,999)])" /datum/species/monkey/tajaran - name = "Farwa" + name = SPECIES_MONKEY_TAJ name_plural = "Farwa" icobase = 'icons/mob/human_races/monkeys/r_farwa.dmi' deform = 'icons/mob/human_races/monkeys/r_farwa.dmi' - greater_form = "Tajaran" + greater_form = SPECIES_TAJ default_language = "Farwa" flesh_color = "#AFA59E" base_color = "#333333" tail = "farwatail" /datum/species/monkey/skrell - name = "Neaera" + name = SPECIES_MONKEY_SKRELL name_plural = "Neaera" icobase = 'icons/mob/human_races/monkeys/r_neaera.dmi' deform = 'icons/mob/human_races/monkeys/r_neaera.dmi' - greater_form = "Skrell" + greater_form = SPECIES_SKRELL default_language = "Neaera" flesh_color = "#8CD7A3" blood_color = "#1D2CBF" @@ -93,14 +93,14 @@ tail = null /datum/species/monkey/unathi - name = "Stok" + name = SPECIES_MONKEY_UNATHI name_plural = "Stok" icobase = 'icons/mob/human_races/monkeys/r_stok.dmi' deform = 'icons/mob/human_races/monkeys/r_stok.dmi' tail = "stoktail" - greater_form = "Unathi" + greater_form = SPECIES_UNATHI default_language = "Stok" flesh_color = "#34AF10" base_color = "#066000" diff --git a/code/modules/mob/living/carbon/human/species/station/prometheans.dm b/code/modules/mob/living/carbon/human/species/station/prometheans.dm index e01fe608d3..bf2ffe8d0a 100644 --- a/code/modules/mob/living/carbon/human/species/station/prometheans.dm +++ b/code/modules/mob/living/carbon/human/species/station/prometheans.dm @@ -3,7 +3,7 @@ var/datum/species/shapeshifter/promethean/prometheans // Species definition follows. /datum/species/shapeshifter/promethean - name = "Promethean" + name = SPECIES_PROMETHEAN name_plural = "Prometheans" blurb = "What has Science done?" show_ssd = "totally quiescent" @@ -88,7 +88,7 @@ var/datum/species/shapeshifter/promethean/prometheans /mob/living/carbon/human/proc/regenerate ) - valid_transform_species = list("Human", "Vatborn", "Unathi", "Tajara", "Skrell", "Diona", "Teshari", "Monkey") + valid_transform_species = list(SPECIES_HUMAN, SPECIES_HUMAN_VATBORN, SPECIES_UNATHI, SPECIES_TAJ, SPECIES_SKRELL, SPECIES_DIONA, SPECIES_TESHARI, SPECIES_MONKEY) var/heal_rate = 0.5 // Temp. Regen per tick. diff --git a/code/modules/mob/living/carbon/human/species/station/seromi.dm b/code/modules/mob/living/carbon/human/species/station/seromi.dm index 2e83d47fbe..72f4f808d4 100644 --- a/code/modules/mob/living/carbon/human/species/station/seromi.dm +++ b/code/modules/mob/living/carbon/human/species/station/seromi.dm @@ -1,5 +1,5 @@ /datum/species/teshari - name = "Teshari" + name = SPECIES_TESHARI name_plural = "Tesharii" blurb = "A race of feathered raptors who developed alongside the Skrell, inhabiting \ the polar tundral regions outside of Skrell territory. Extremely fragile, they developed \ diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index 328496625f..de0929770c 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -1,7 +1,7 @@ /datum/species/human - name = "Human" + name = SPECIES_HUMAN name_plural = "Humans" - primitive_form = "Monkey" + primitive_form = SPECIES_MONKEY unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/punch, /datum/unarmed_attack/bite) blurb = "Humanity originated in the Sol system, and over the last five centuries has spread \ colonies across a wide swathe of space. They hold a wide range of forms and creeds.

\ @@ -20,17 +20,17 @@ appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR /datum/species/human/get_bodytype(var/mob/living/carbon/human/H) - return "Human" + return SPECIES_HUMAN /datum/species/unathi - name = "Unathi" + name = SPECIES_UNATHI name_plural = "Unathi" icobase = 'icons/mob/human_races/r_lizard.dmi' deform = 'icons/mob/human_races/r_def_lizard.dmi' tail = "sogtail" tail_animation = 'icons/mob/species/unathi/tail.dmi' unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp) - primitive_form = "Stok" + primitive_form = SPECIES_MONKEY_UNATHI darksight = 3 ambiguous_genders = TRUE //gluttonous = 1 //VOREStation Edit - Redundant @@ -131,7 +131,7 @@ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes) /datum/species/tajaran - name = "Tajara" + name = SPECIES_TAJ name_plural = "Tajaran" icobase = 'icons/mob/human_races/r_tajaran.dmi' deform = 'icons/mob/human_races/r_def_tajaran.dmi' @@ -147,7 +147,7 @@ metabolic_rate = 1.1 gluttonous = 1 num_alternate_languages = 3 - secondary_langs = list(LANGUAGE_SIIK) + secondary_langs = list(LANGUAGE_SIIK, LANGUAGE_AKHANI) name_language = LANGUAGE_SIIK species_language = LANGUAGE_SIIK health_hud_intensity = 2.5 @@ -184,7 +184,7 @@ breath_heat_level_2 = 430 //Default 450 breath_heat_level_3 = 1000 //Default 1250 */ - primitive_form = "Farwa" + primitive_form = SPECIES_MONKEY_TAJ spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR @@ -217,11 +217,11 @@ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes) /datum/species/skrell - name = "Skrell" + name = SPECIES_SKRELL name_plural = "Skrell" icobase = 'icons/mob/human_races/r_skrell.dmi' deform = 'icons/mob/human_races/r_def_skrell.dmi' - primitive_form = "Neaera" + primitive_form = SPECIES_MONKEY_SKRELL unarmed_types = list(/datum/unarmed_attack/punch) blurb = "An amphibious species, Skrell come from the star system known as Qerr'Vallis, which translates to 'Star of \ the royals' or 'Light of the Crown'.

Skrell are a highly advanced and logical race who live under the rule \ @@ -290,7 +290,7 @@ return TRUE /datum/species/diona - name = "Diona" + name = SPECIES_DIONA name_plural = "Dionaea" icobase = 'icons/mob/human_races/r_diona.dmi' deform = 'icons/mob/human_races/r_def_plant.dmi' diff --git a/code/modules/mob/living/carbon/human/species/virtual_reality/avatar.dm b/code/modules/mob/living/carbon/human/species/virtual_reality/avatar.dm index 500bf9762e..b027407cf1 100644 --- a/code/modules/mob/living/carbon/human/species/virtual_reality/avatar.dm +++ b/code/modules/mob/living/carbon/human/species/virtual_reality/avatar.dm @@ -5,7 +5,7 @@ // Species definition follows. /datum/species/shapeshifter/promethean/avatar - name = "Virtual Reality Avatar" + name = SPECIES_VR name_plural = "Virtual Reality Avatars" blurb = "A 3-dimensional representation of some sort of animate object used to display the presence and actions of some-one or -thing using a virtual reality program." show_ssd = "eerily still" @@ -57,7 +57,7 @@ shapeshifter_change_species("Virtual Reality [src.species.get_bodytype(src)]") else icon_state = "promethean" - shapeshifter_change_species("Virtual Reality Avatar") + shapeshifter_change_species(SPECIES_VR) // enter_vr is called on the original mob, and puts the mind into the supplied vr mob diff --git a/code/modules/mob/living/carbon/human/species/virtual_reality/opaque_form.dm b/code/modules/mob/living/carbon/human/species/virtual_reality/opaque_form.dm index e8ae58f617..a2ecc2bf23 100644 --- a/code/modules/mob/living/carbon/human/species/virtual_reality/opaque_form.dm +++ b/code/modules/mob/living/carbon/human/species/virtual_reality/opaque_form.dm @@ -42,7 +42,7 @@ ) /datum/species/shapeshifter/promethean/avatar/tajaran - name = "Virtual Reality Tajara" + name = "Virtual Reality Tajaran" icobase = 'icons/mob/human_races/r_tajaran.dmi' deform = 'icons/mob/human_races/r_def_tajaran.dmi' tail = "tajtail" diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm index 90c00d8963..0c8ca611fe 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm @@ -2,7 +2,7 @@ for(var/mob/living/carbon/human/Q in living_mob_list) if(self && ignore_self && self == Q) continue - if(Q.species.name != "Xenomorph Queen") + if(Q.species.name != SPECIES_XENO_QUEEN) continue if(!Q.key || !Q.client || Q.stat) continue diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm index f19eb0e1ea..d851c40255 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm @@ -1,6 +1,6 @@ //Stand-in until this is made more lore-friendly. /datum/species/xenos - name = "Xenomorph" + name = SPECIES_XENO name_plural = "Xenomorphs" default_language = "Xenomorph" @@ -77,7 +77,7 @@ ) /datum/species/xenos/get_bodytype() - return "Xenomorph" + return SPECIES_XENO /datum/species/xenos/get_random_name() return "alien [caste_name] ([alien_number])" @@ -164,7 +164,7 @@ */ /datum/species/xenos/drone - name = "Xenomorph Drone" + name = SPECIES_XENO_DRONE caste_name = "drone" weeds_plasma_rate = 15 slowdown = 1 @@ -202,7 +202,7 @@ ..() /datum/species/xenos/hunter - name = "Xenomorph Hunter" + name = SPECIES_XENO_HUNTER weeds_plasma_rate = 5 caste_name = "hunter" slowdown = -2 @@ -230,7 +230,7 @@ ) /datum/species/xenos/sentinel - name = "Xenomorph Sentinel" + name = SPECIES_XENO_SENTINEL weeds_plasma_rate = 10 caste_name = "sentinel" slowdown = 0 @@ -261,7 +261,7 @@ /datum/species/xenos/queen - name = "Xenomorph Queen" + name = SPECIES_XENO_QUEEN total_health = 250 weeds_heal_rate = 5 weeds_plasma_rate = 20 diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm index 61a8fe00ae..50f4ce9cc5 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm @@ -10,22 +10,22 @@ proc/create_new_xenomorph(var/alien_caste,var/target) /mob/living/carbon/human/xdrone/New(var/new_loc) h_style = "Bald" faction = "xeno" - ..(new_loc, "Xenomorph Drone") + ..(new_loc, SPECIES_XENO_DRONE) /mob/living/carbon/human/xsentinel/New(var/new_loc) h_style = "Bald" faction = "xeno" - ..(new_loc, "Xenomorph Sentinel") + ..(new_loc, SPECIES_XENO_SENTINEL) /mob/living/carbon/human/xhunter/New(var/new_loc) h_style = "Bald" faction = "xeno" - ..(new_loc, "Xenomorph Hunter") + ..(new_loc, SPECIES_XENO_HUNTER) /mob/living/carbon/human/xqueen/New(var/new_loc) h_style = "Bald" faction = "xeno" - ..(new_loc, "Xenomorph Queen") + ..(new_loc, SPECIES_XENO_QUEEN) // I feel like we should generalize/condense down all the various icon-rendering antag procs. /*---------------------------------------- diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index a742723dbf..3b1bf3620a 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -1,134 +1,100 @@ /* Global associative list for caching humanoid icons. Index format m or f, followed by a string of 0 and 1 to represent bodyparts followed by husk fat hulk skeleton 1 or 0. - TODO: Proper documentation - icon_key is [species.race_key][g][husk][fat][hulk][skeleton][s_tone] */ -var/global/list/human_icon_cache = list() +var/global/list/human_icon_cache = list() //key is incredibly complex, see update_icons_body() var/global/list/tail_icon_cache = list() //key is [species.race_key][r_skin][g_skin][b_skin] -var/global/list/light_overlay_cache = list() +var/global/list/light_overlay_cache = list() //see make_worn_icon() on helmets +var/global/list/damage_icon_parts = list() //see UpdateDamageIcon() - /////////////////////// - //UPDATE_ICONS SYSTEM// - /////////////////////// -/* -Calling this a system is perhaps a bit trumped up. It is essentially update_clothing dismantled into its -core parts. The key difference is that when we generate overlays we do not generate either lying or standing -versions. Instead, we generate both and store them in two fixed-length lists, both using the same list-index -(The indexes are in update_icons.dm): Each list for humans is (at the time of writing) of length 19. -This will hopefully be reduced as the system is refined. - var/overlays_lying[19] //For the lying down stance - var/overlays_standing[19] //For the standing stance -When we call update_icons, the 'lying' variable is checked and then the appropriate list is assigned to our overlays! -That in itself uses a tiny bit more memory (no more than all the ridiculous lists the game has already mind you). -On the other-hand, it should be very CPU cheap in comparison to the old system. -In the old system, we updated all our overlays every life() call, even if we were standing still inside a crate! -or dead!. 25ish overlays, all generated from scratch every second for every xeno/human/monkey and then applied. -More often than not update_clothing was being called a few times in addition to that! CPU was not the only issue, -all those icons had to be sent to every client. So really the cost was extremely cumulative. To the point where -update_clothing would frequently appear in the top 10 most CPU intensive procs during profiling. -Another feature of this new system is that our lists are indexed. This means we can update specific overlays! -So we only regenerate icons when we need them to be updated! This is the main saving for this system. -In practice this means that: - everytime you fall over, we just switch between precompiled lists. Which is fast and cheap. - Everytime you do something minor like take a pen out of your pocket, we only update the in-hand overlay - etc... -There are several things that need to be remembered: -> Whenever we do something that should cause an overlay to update (which doesn't use standard procs - ( i.e. you do something like l_hand = /obj/item/something new(src) ) - You will need to call the relevant update_inv_* proc: - update_inv_head() - update_inv_wear_suit() - update_inv_gloves() - update_inv_shoes() - update_inv_w_uniform() - update_inv_glasse() - update_inv_l_hand() - update_inv_r_hand() - update_inv_belt() - update_inv_wear_id() - update_inv_ears() - update_inv_s_store() - update_inv_pockets() - update_inv_back() - update_inv_handcuffed() - update_inv_wear_mask() - All of these are named after the variable they update from. They are defined at the mob/ level like - update_clothing was, so you won't cause undefined proc runtimes with usr.update_inv_wear_id() if the usr is a - slime etc. Instead, it'll just return without doing any work. So no harm in calling it for slimes and such. -> There are also these special cases: - update_mutations() //handles updating your appearance for certain mutations. e.g TK head-glows - UpdateDamageIcon() //handles damage overlays for brute/burn damage //(will rename this when I geta round to it) - update_icons_body() //Handles updating your mob's icon to reflect their gender/race/complexion etc - update_hair() //Handles updating your hair overlay (used to be update_face, but mouth and - ...eyes were merged into update_body) - update_targeted() // Updates the target overlay when someone points a gun at you -> All of these procs update our overlays_lying and overlays_standing, and then call update_icons() by default. - If you wish to update several overlays at once, you can set the argument to 0 to disable the update and call - it manually: - e.g. - update_inv_head(0) - update_inv_l_hand(0) - update_inv_r_hand() //<---calls update_icons() - or equivillantly: - update_inv_head(0) - update_inv_l_hand(0) - update_inv_r_hand(0) - update_icons() -> If you need to update all overlays you can use regenerate_icons(). it works exactly like update_clothing used to. -> I reimplimented an old unused variable which was in the code called (coincidentally) var/update_icon - It can be used as another method of triggering regenerate_icons(). It's basically a flag that when set to non-zero - will call regenerate_icons() at the next life() call and then reset itself to 0. - The idea behind it is icons are regenerated only once, even if multiple events requested it. -This system is confusing and is still a WIP. It's primary goal is speeding up the controls of the game whilst -reducing processing costs. So please bear with me while I iron out the kinks. It will be worth it, I promise. -If I can eventually free var/lying stuff from the life() process altogether, stuns/death/status stuff -will become less affected by lag-spikes and will be instantaneous! :3 -If you have any questions/constructive-comments/bugs-to-report/or have a massivly devestated butt... -Please contact me on #coderbus IRC. ~Carn x -*/ +//////////////////////////////////////////////////////////////////////////////////////////////// +// # Human Icon Updating System +// +// This system takes care of the "icon" for human mobs. Of course humans don't just have a single +// icon+icon_state, but a combination of dozens of little sprites including including the body, +// clothing, equipment, in-universe HUD images, etc. +// +// # Basic Operation +// Whenever you do something that should update the on-mob appearance of a worn or held item, You +// will need to call the relevant update_inv_* proc. All of these are named after the variable they +// update from. They are defined at the /mob level so you don't even need to cast to carbon/human. +// +// The new system leverages SSoverlays to actually add/remove the overlays from mob.overlays +// Since SSoverlays already manages batching updates to reduce apperance churn etc, we don't need +// to worry about that. (In short, you can call add/cut overlay as many times as you want, it will +// only get assigned to the mob once per tick.) +// As a corrolary, this means users of this system do NOT need to tell the system when you're done +// making changes. +// +// There are also these special cases: +// update_icons_body() //Handles updating your mob's icon to reflect their gender/race/complexion etc +// UpdateDamageIcon() //Handles damage overlays for brute/burn damage //(will rename this when I geta round to it) ~Carn +// update_skin() //Handles updating skin for species that have a skin overlay. +// update_bloodied() //Handles adding/clearing the blood overlays for hands & feet. Call when bloodied or cleaned. +// update_underwear() //Handles updating the sprite for underwear. +// update_hair() //Handles updating your hair and eyes overlay +// update_mutations() //Handles updating your appearance for certain mutations. e.g TK head-glows +// update_fire() //Handles overlay from being on fire. +// update_water() //Handles overlay from being submerged. +// update_surgery() //Handles overlays from open external organs. +// +// # History (i.e. I'm used to the old way, what is different?) +// You used to have to call update_icons(FALSE) if you planned to make more changes, and call update_icons(TRUE) +// on the final update. All that is gone, just call update_inv_whatever() and it handles the rest. +// +//////////////////////////////////////////////////////////////////////////////////////////////// +//Add an entry to overlays, assuming it exists +/mob/living/carbon/human/proc/apply_layer(cache_index) + if((. = overlays_standing[cache_index])) + add_overlay(.) + +//Remove an entry from overlays, and from the list +/mob/living/carbon/human/proc/remove_layer(cache_index) + var/I = overlays_standing[cache_index] + if(I) + cut_overlay(I) + overlays_standing[cache_index] = null + +// These are used as the layers for the icons, as well as indexes in a list that holds onto them. +// Technically the layers used are all -100+layer to make them FLOAT_LAYER overlays. //Human Overlays Indexes///////// -#define MUTATIONS_LAYER 1 -#define SKIN_LAYER 2 -#define DAMAGE_LAYER 3 -#define SURGERY_LEVEL 4 //bs12 specific. -#define UNDERWEAR_LAYER 5 -#define SHOES_LAYER_ALT 6 -#define UNIFORM_LAYER 7 -#define ID_LAYER 8 -#define SHOES_LAYER 9 -#define GLOVES_LAYER 10 -#define BELT_LAYER 11 -#define SUIT_LAYER 12 -#define TAIL_LAYER 13 //bs12 specific. //In a perfect world the parts of the tail that show between legs would be on a new layer. Until then, sprite's been tweaked -#define GLASSES_LAYER 14 -#define BELT_LAYER_ALT 15 -#define SUIT_STORE_LAYER 16 -#define BACK_LAYER 17 -#define HAIR_LAYER 18 //TODO: make part of head layer? -#define EARS_LAYER 19 -#define EYES_LAYER 20 -#define FACEMASK_LAYER 21 -#define HEAD_LAYER 22 -#define COLLAR_LAYER 23 -#define HANDCUFF_LAYER 24 -#define LEGCUFF_LAYER 25 -#define L_HAND_LAYER 26 -#define R_HAND_LAYER 27 -#define MODIFIER_EFFECTS_LAYER 28 -#define FIRE_LAYER 29 //If you're on fire -#define WATER_LAYER 30 //If you're submerged in water. -#define TARGETED_LAYER 31 //BS12: Layer for the target overlay from weapon targeting system -#define WING_LAYER 32 //VOREStation edit. Simply move this up a number if things are added. -#define TOTAL_LAYERS 32 //VOREStation edit. +#define MUTATIONS_LAYER 1 //Mutations like fat, and lasereyes +#define SKIN_LAYER 2 //Skin things added by a call on species +#define BLOOD_LAYER 3 //Bloodied hands/feet/anything else +#define DAMAGE_LAYER 4 //Injury overlay sprites like open wounds +#define SURGERY_LAYER 5 //Overlays for open surgical sites +#define UNDERWEAR_LAYER 6 //Underwear/bras/etc +#define SHOES_LAYER_ALT 7 //Shoe-slot item (when set to be under uniform via verb) +#define UNIFORM_LAYER 8 //Uniform-slot item +#define ID_LAYER 9 //ID-slot item +#define SHOES_LAYER 10 //Shoe-slot item +#define GLOVES_LAYER 11 //Glove-slot item +#define BELT_LAYER 12 //Belt-slot item +#define SUIT_LAYER 13 //Suit-slot item +#define TAIL_LAYER 14 //Some species have tails to render +#define GLASSES_LAYER 15 //Eye-slot item +#define BELT_LAYER_ALT 16 //Belt-slot item (when set to be above suit via verb) +#define SUIT_STORE_LAYER 17 //Suit storage-slot item +#define BACK_LAYER 18 //Back-slot item +#define HAIR_LAYER 19 //The human's hair +#define EARS_LAYER 20 //Both ear-slot items (combined image) +#define EYES_LAYER 21 //Mob's eyes (used for glowing eyes) +#define FACEMASK_LAYER 22 //Mask-slot item +#define HEAD_LAYER 23 //Head-slot item +#define HANDCUFF_LAYER 24 //Handcuffs, if the human is handcuffed, in a secret inv slot +#define LEGCUFF_LAYER 25 //Same as handcuffs, for legcuffs +#define L_HAND_LAYER 26 //Left-hand item +#define R_HAND_LAYER 27 //Right-hand item +#define WING_LAYER 28 //VOREStation edit. Simply move this up a number if things are added. +#define MODIFIER_EFFECTS_LAYER 29 //Effects drawn by modifiers +#define FIRE_LAYER 30 //'Mob on fire' overlay layer +#define WATER_LAYER 31 //'Mob submerged' overlay layer +#define TARGETED_LAYER 32 //'Aimed at' overlay layer +#define TOTAL_LAYERS 32 //VOREStation edit. <---- KEEP THIS UPDATED, should always equal the highest number here, used to initialize a list. ////////////////////////////////// /mob/living/carbon/human - var/list/list_huds = list() - var/list/list_body = list() - var/list/list_layers = list() - var/list/overlays_standing[TOTAL_LAYERS] var/previous_damage_appearance // store what the body last looked like, so we only have to update it if something changed @@ -138,41 +104,23 @@ Please contact me on #coderbus IRC. ~Carn x if(QDESTROYING(src)) return - lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again + crash_with("CANARY: Old human update_icons was called.") + update_hud() //TODO: remove the need for this - //0: We start with their existing appearance (this contains their verbs, important to keep those!) - var/mutable_appearance/ma_compiled = new(src) + //Do any species specific layering updates, such as when hiding. + update_icon_special() - //1: HUDs because these are hidden behind a backplane. See update_icons_huds() - ma_compiled.overlays = list_huds //The first one can set instead of add +/mob/living/carbon/human/update_icons_layers() + crash_with("CANARY: Old human update_icons_layers was called.") - //2: The body itself, all the organs and whatnot - ma_compiled.overlays += list_body +/mob/living/carbon/human/update_icons_all() + crash_with("CANARY: Old human update_icons_all was called.") - //3: The 'layers' list (overlays_standing), from the defines above - ma_compiled.overlays += list_layers +/mob/living/carbon/human/update_icons_huds() + crash_with("CANARY: Old human update_icons_huds was called.") - //4: Apply transforms based on situation - update_transform(ma_compiled) - - //5: Do any species specific layering updates, such as when hiding. - update_icon_special(ma_compiled, FALSE) - - //6: Set appearance once - appearance = ma_compiled - -/mob/living/carbon/human/update_transform(var/mutable_appearance/passed_ma) - if(QDESTROYING(src)) - return - - var/mutable_appearance/ma - if(passed_ma) - ma = passed_ma - else - ma = new(src) - - /* VOREStation Edit START - TODO - Consider switching to icon_scale +/mob/living/carbon/human/update_transform() // First, get the correct size. var/desired_scale = icon_scale @@ -181,99 +129,36 @@ Please contact me on #coderbus IRC. ~Carn x for(var/datum/modifier/M in modifiers) if(!isnull(M.icon_scale_percent)) desired_scale *= M.icon_scale_percent - */ - var/desired_scale = size_multiplier - //VOREStation Edit End // Regular stuff again. + var/matrix/M = matrix() + var/anim_time = 3 + + //Due to some involuntary means, you're laying now + if(lying && !resting && !sleeping) + anim_time = 1 //Thud + if(lying && !species.prone_icon) //Only rotate them if we're not drawing a specific icon for being prone. - var/matrix/M = matrix() M.Turn(90) M.Scale(desired_scale) M.Translate(1,-6) - ma.transform = M - ma.layer = MOB_LAYER -0.01 // Fix for a byond bug where turf entry order no longer matters + layer = MOB_LAYER -0.01 // Fix for a byond bug where turf entry order no longer matters else - var/matrix/M = matrix() M.Scale(desired_scale) M.Translate(0, 16*(desired_scale-1)) - ma.transform = M - ma.layer = MOB_LAYER // Fix for a byond bug where turf entry order no longer matters + layer = MOB_LAYER // Fix for a byond bug where turf entry order no longer matters - if(!passed_ma) - update_icon_special(ma) - appearance = ma + animate(src, transform = M, time = anim_time) + update_icon_special() //May contain transform-altering things -//Update the layers from the defines above -/mob/living/carbon/human/update_icons_layers(var/update_icons = 1) - if(QDESTROYING(src)) - return - - list_layers.Cut() - - for(var/entry in overlays_standing) - if(istype(entry, /image)) - list_layers += entry - else if(istype(entry, /list)) //Is this necessary? What adds a list to this? - for(var/inner_entry in entry) - list_layers += inner_entry - - if(species && species.has_floating_eyes) - list_layers += species.get_eyes(src) - - if(update_icons) - update_icons() - -//HUD Icons (ingame huds, not the user interface) -//Update things like med/sec hud icons -/mob/living/carbon/human/update_icons_huds(var/update_icons = 1) - if(QDESTROYING(src)) - return - - list_huds.Cut() - - if(has_huds) - list_huds = hud_list.Copy() - list_huds += backplane // Required to mask HUDs in context menus: http://www.byond.com/forum/?post=2336679 - - //Typing indicator code - if(client && !stat) //They have a client & aren't dead/KO'd? Continue on! - if(typing_indicator && hud_typing) //They already have the indicator and are still typing - list_huds += typing_indicator - typing_indicator.invisibility = invisibility - - else if(!typing_indicator && hud_typing) //Are they in their body, NOT dead, have hud_typing, do NOT have a typing indicator. and have it enabled? - typing_indicator = new - typing_indicator.icon = 'icons/mob/talk_vr.dmi' //VOREStation Edit - talk_vr.dmi instead of talk.dmi for right-side icons - typing_indicator.icon_state = "[speech_bubble_appearance()]_typing" - list_huds += typing_indicator - - else if(typing_indicator && !hud_typing) //Did they stop typing? - typing = FALSE - hud_typing = FALSE - - if(update_icons) - update_icons() - -//A full, crunchy reprocess of all three cached lists -/mob/living/carbon/human/update_icons_all(var/update_icons = 1) - if(QDESTROYING(src)) - return - - update_icons_huds(FALSE) - update_icons_body(FALSE) - update_icons_layers(FALSE) - - if(update_icons) - update_icons() - -var/global/list/damage_icon_parts = list() //DAMAGE OVERLAYS //constructs damage icon for each organ from mask * damage field and saves it in our overlays_ lists -/mob/living/carbon/human/UpdateDamageIcon(var/update_icons=1) +/mob/living/carbon/human/UpdateDamageIcon() if(QDESTROYING(src)) return + remove_layer(DAMAGE_LAYER) + // first check whether something actually changed about damage appearance var/damage_appearance = "" @@ -288,9 +173,7 @@ var/global/list/damage_icon_parts = list() previous_damage_appearance = damage_appearance - var/icon/standing = new /icon(species.damage_overlays, "00") - - var/image/standing_image = new /image("icon" = standing) + var/image/standing_image = image(icon = species.damage_overlays, icon_state = "00", layer = BODY_LAYER+DAMAGE_LAYER) // blend the individual damage states with our icons for(var/obj/item/organ/external/O in organs) @@ -302,8 +185,8 @@ var/global/list/damage_icon_parts = list() var/icon/DI var/cache_index = "[O.damage_state]/[O.icon_name]/[species.get_blood_colour(src)]/[species.get_bodytype(src)]" if(damage_icon_parts[cache_index] == null) - DI = new /icon(species.get_damage_overlays(src), O.damage_state) // the damage icon for whole human - DI.Blend(new /icon(species.get_damage_mask(src), O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels + DI = icon(species.get_damage_overlays(src), O.damage_state) // the damage icon for whole human + DI.Blend(icon(species.get_damage_mask(src), O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels DI.Blend(species.get_blood_colour(src), ICON_MULTIPLY) damage_icon_parts[cache_index] = DI else @@ -312,12 +195,10 @@ var/global/list/damage_icon_parts = list() standing_image.overlays += DI overlays_standing[DAMAGE_LAYER] = standing_image - - if(update_icons) - update_icons_layers() + apply_layer(DAMAGE_LAYER) //BASE MOB SPRITE -/mob/living/carbon/human/update_icons_body(var/update_icons=1) +/mob/living/carbon/human/update_icons_body() if(QDESTROYING(src)) return @@ -329,17 +210,14 @@ var/global/list/damage_icon_parts = list() var/hulk = (HULK in src.mutations) var/skeleton = (SKELETON in src.mutations) - robolimb_count = 0 + robolimb_count = 0 //TODO, here, really tho? robobody_count = 0 //CACHING: Generate an index key from visible bodyparts. //0 = destroyed, 1 = normal, 2 = robotic, 3 = necrotic. //Create a new, blank icon for our mob to use. - var/icon/stand_icon = new(species.icon_template ? species.icon_template : 'icons/mob/human.dmi',"blank") - - //Clean old list_body - list_body.Cut() + var/icon/stand_icon = new(species.icon_template ? species.icon_template : 'icons/mob/human.dmi', icon_state = "blank") var/g = "male" if(gender == FEMALE) @@ -369,12 +247,7 @@ var/global/list/damage_icon_parts = list() icon_key += "[rgb(part.s_col[1],part.s_col[2],part.s_col[3])]" if(part.body_hair && part.h_col && part.h_col.len >= 3) icon_key += "[rgb(part.h_col[1],part.h_col[2],part.h_col[3])]" - //VOREStation Edit - Different way of tracking add/mult species - if(species.color_mult) - icon_key += "[ICON_MULTIPLY]" - else - icon_key += "[ICON_ADD]" - //VOREStation Edit End + icon_key += "[part.s_col_blend]" else icon_key += "#000000" for(var/M in part.markings) @@ -444,28 +317,55 @@ var/global/list/damage_icon_parts = list() //END CACHED ICON GENERATION. stand_icon.Blend(base_icon,ICON_OVERLAY) - list_body += stand_icon //A little silly, almost pointless to use a list for this, but can come back later and make this proc itself better - - if(update_icons) - update_icons() + icon = stand_icon //tail - update_tail_showing(0) - update_wing_showing(0) //VOREStation edit + update_tail_showing() -/mob/living/carbon/human/proc/update_skin(var/update_icons=1) +/mob/living/carbon/human/proc/update_skin() if(QDESTROYING(src)) return - overlays_standing[SKIN_LAYER] = species.update_skin(src) - if(update_icons) update_icons_layers() + remove_layer(SKIN_LAYER) + + var/image/skin = species.update_skin(src) + if(skin) + skin.layer = BODY_LAYER+SKIN_LAYER + overlays_standing[SKIN_LAYER] = skin + apply_layer(SKIN_LAYER) + +/mob/living/carbon/human/proc/update_bloodied() + if(QDESTROYING(src)) + return + + remove_layer(BLOOD_LAYER) + if(!blood_DNA && !feet_blood_DNA) + return + + var/image/both = image(icon = 'icons/effects/effects.dmi', icon_state = "nothing", layer = BODY_LAYER+BLOOD_LAYER) + + //Bloody hands + if(blood_DNA) + var/image/bloodsies = image(icon = species.get_blood_mask(src), icon_state = "bloodyhands", layer = BODY_LAYER+BLOOD_LAYER) + bloodsies.color = hand_blood_color + both.add_overlay(bloodsies) + + //Bloody feet + if(feet_blood_DNA) + var/image/bloodsies = image(icon = species.get_blood_mask(src), icon_state = "shoeblood", layer = BODY_LAYER+BLOOD_LAYER) + bloodsies.color = feet_blood_color + both.add_overlay(bloodsies) + + overlays_standing[BLOOD_LAYER] = both + + apply_layer(BLOOD_LAYER) //UNDERWEAR OVERLAY -/mob/living/carbon/human/proc/update_underwear(var/update_icons=1) +/mob/living/carbon/human/proc/update_underwear() if(QDESTROYING(src)) return - overlays_standing[UNDERWEAR_LAYER] = null + remove_layer(UNDERWEAR_LAYER) if(species.appearance_flags & HAS_UNDERWEAR) overlays_standing[UNDERWEAR_LAYER] = list() @@ -473,38 +373,37 @@ var/global/list/damage_icon_parts = list() if(hide_underwear[category]) continue var/datum/category_item/underwear/UWI = all_underwear[category] - overlays_standing[UNDERWEAR_LAYER] += UWI.generate_image(all_underwear_metadata[category]) + var/image/wear = UWI.generate_image(all_underwear_metadata[category], layer = BODY_LAYER+UNDERWEAR_LAYER) + overlays_standing[UNDERWEAR_LAYER] += wear - if(update_icons) update_icons_layers() + apply_layer(UNDERWEAR_LAYER) //HAIR OVERLAY -/mob/living/carbon/human/proc/update_hair(var/update_icons=1) +/mob/living/carbon/human/proc/update_hair() if(QDESTROYING(src)) return //Reset our hair - overlays_standing[HAIR_LAYER] = null - update_eyes(0) //Pirated out of here, for glowing eyes. + remove_layer(HAIR_LAYER) + update_eyes() //Pirated out of here, for glowing eyes. var/obj/item/organ/external/head/head_organ = get_organ(BP_HEAD) if(!head_organ || head_organ.is_stump() ) - if(update_icons) update_icons_layers() return //masks and helmets can obscure our hair. if( (head && (head.flags_inv & BLOCKHAIR)) || (wear_mask && (wear_mask.flags_inv & BLOCKHAIR))) - if(update_icons) update_icons_layers() return //base icons - var/icon/face_standing = new /icon('icons/mob/human_face.dmi',"bald_s") + var/icon/face_standing = icon(icon = 'icons/mob/human_face.dmi', icon_state = "bald_s") if(f_style) var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style] if(facial_hair_style && facial_hair_style.species_allowed && (src.species.get_bodytype(src) in facial_hair_style.species_allowed)) var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s") if(facial_hair_style.do_colouration) - facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_MULTIPLY) //VOREStation edit + facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD) face_standing.Blend(facial_s, ICON_OVERLAY) @@ -516,48 +415,40 @@ var/global/list/damage_icon_parts = list() if(hair_style.do_colouration) hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_MULTIPLY) hair_s.Blend(hair_s_add, ICON_ADD) - overlays |= hair_s //VOREStation edit? Sync note: The new Polaris doesn't have this, but looking elsewhere I assume this is needed. Comment out/remove if not. face_standing.Blend(hair_s, ICON_OVERLAY) - // VOREStation Edit - START - var/icon/ears_s = get_ears_overlay() - if (ears_s) - face_standing.Blend(ears_s, ICON_OVERLAY) - // VOREStation Edit - END if(head_organ.nonsolid) face_standing += rgb(,,,120) - overlays_standing[HAIR_LAYER] = image(face_standing) - if(update_icons) update_icons_layers() + overlays_standing[HAIR_LAYER] = image(face_standing, layer = BODY_LAYER+HAIR_LAYER) + apply_layer(HAIR_LAYER) -/mob/living/carbon/human/update_eyes(var/update_icons=1) +/mob/living/carbon/human/update_eyes() if(QDESTROYING(src)) return //Reset our eyes - overlays_standing[EYES_LAYER] = null + remove_layer(EYES_LAYER) + + //TODO: Probably redo this. I know I wrote it, but... //This is ONLY for glowing eyes for now. Boring flat eyes are done by the head's own proc. if(!species.has_glowing_eyes) - if(update_icons) update_icons_layers() return //Our glowy eyes should be hidden if some equipment hides them. if(!should_have_organ(O_EYES) || (head && (head.flags_inv & BLOCKHAIR)) || (wear_mask && (wear_mask.flags_inv & BLOCKHAIR))) - if(update_icons) update_icons_layers() return //Get the head, we'll need it later. var/obj/item/organ/external/head/head_organ = get_organ(BP_HEAD) if(!head_organ || head_organ.is_stump() ) - if(update_icons) update_icons_layers() return //The eyes store the color themselves, funny enough. var/obj/item/organ/internal/eyes/eyes = internal_organs_by_name[O_EYES] if(!head_organ.eye_icon) - if(update_icons) update_icons_layers() return var/icon/eyes_icon = new/icon(head_organ.eye_icon_location, head_organ.eye_icon) @@ -569,663 +460,292 @@ var/global/list/damage_icon_parts = list() var/image/eyes_image = image(eyes_icon) eyes_image.plane = PLANE_LIGHTING_ABOVE - overlays_standing[EYES_LAYER] = eyes_image + overlays_standing[EYES_LAYER] = eyes_image + apply_layer(EYES_LAYER) - if(update_icons) update_icons_layers() - -/mob/living/carbon/human/update_mutations(var/update_icons=1) +/mob/living/carbon/human/update_mutations() if(QDESTROYING(src)) return + remove_layer(MUTATIONS_LAYER) + + if(!LAZYLEN(mutations)) + return //No mutations, no icons. + + //TODO: THIS PROC??? var/fat if(FAT in mutations) fat = "fat" - var/image/standing = image("icon" = 'icons/effects/genetics.dmi') - var/add_image = 0 - var/g = "m" - if(gender == FEMALE) g = "f" - // DNA2 - Drawing underlays. + var/image/standing = image(icon = 'icons/effects/genetics.dmi', layer = BODY_LAYER+MUTATIONS_LAYER) + var/g = gender == FEMALE ? "f" : "m" + for(var/datum/dna/gene/gene in dna_genes) if(!gene.block) continue if(gene.is_active(src)) - var/underlay=gene.OnDrawUnderlays(src,g,fat) + var/underlay = gene.OnDrawUnderlays(src,g,fat) if(underlay) standing.underlays += underlay - add_image = 1 + for(var/mut in mutations) - switch(mut) - /* - if(HULK) - if(fat) - standing.underlays += "hulk_[fat]_s" - else - standing.underlays += "hulk_[g]_s" - add_image = 1 - if(COLD_RESISTANCE) - standing.underlays += "fire[fat]_s" - add_image = 1 - if(TK) - standing.underlays += "telekinesishead[fat]_s" - add_image = 1 - */ - if(LASER) - standing.overlays += "lasereyes_s" - add_image = 1 - if(add_image) - overlays_standing[MUTATIONS_LAYER] = standing - else - overlays_standing[MUTATIONS_LAYER] = null - if(update_icons) update_icons_layers() + if(LASER) + standing.overlays += "lasereyes_s" //TODO + + overlays_standing[MUTATIONS_LAYER] = standing + apply_layer(MUTATIONS_LAYER) /* --------------------------------------- */ -//For legacy support. +//Recomputes every icon on the mob. Expensive. +//Useful if the species changed, or there's some +//other drastic body-shape change, but otherwise avoid. /mob/living/carbon/human/regenerate_icons() ..() - if(transforming || QDELETED(src)) return + if(transforming || QDELETED(src)) + return - update_mutations(0) - update_skin(0) - update_icons_body(0) - update_underwear(0) - update_hair(0) - update_inv_w_uniform(0) - update_inv_wear_id(0) - update_inv_gloves(0) - update_inv_glasses(0) - update_inv_ears(0) - update_inv_shoes(0) - update_inv_s_store(0) - update_inv_wear_mask(0) - update_inv_head(0) - update_inv_belt(0) - update_inv_back(0) - update_inv_wear_suit(0) - update_inv_r_hand(0) - update_inv_l_hand(0) - update_inv_handcuffed(0) - update_inv_legcuffed(0) - update_inv_pockets(0) - update_fire(0) - update_water(0) - update_surgery(0) - UpdateDamageIcon(0) - update_icons_layers(0) - update_icons_huds(0) - update_icons() - //Hud Stuff - update_hud() + update_icons_body() + UpdateDamageIcon() + update_mutations() + update_skin() + update_underwear() + update_hair() + update_inv_w_uniform() + update_inv_wear_id() + update_inv_gloves() + update_inv_glasses() + update_inv_ears() + update_inv_shoes() + update_inv_s_store() + update_inv_wear_mask() + update_inv_head() + update_inv_belt() + update_inv_back() + update_inv_wear_suit() + update_inv_r_hand() + update_inv_l_hand() + update_inv_handcuffed() + update_inv_legcuffed() + //update_inv_pockets() //Doesn't do anything + update_fire() + update_water() + update_surgery() /* --------------------------------------- */ //vvvvvv UPDATE_INV PROCS vvvvvv -/mob/living/carbon/human/update_inv_w_uniform(var/update_icons=1) +/mob/living/carbon/human/update_inv_w_uniform() if(QDESTROYING(src)) return - if( (w_uniform && istype(w_uniform, /obj/item/clothing/under)) && !(wear_suit && istype(wear_suit, /obj/item/clothing/suit/space) && wear_suit.flags_inv & HIDEJUMPSUIT && !istype(wear_suit, /obj/item/clothing/suit/space/rig) )) - w_uniform.screen_loc = ui_iclothing + remove_layer(UNIFORM_LAYER) - //determine the icon to use - var/icon/under_icon - if(w_uniform.icon_override) - under_icon = w_uniform.icon_override - else if(w_uniform.sprite_sheets && w_uniform.sprite_sheets[species.get_bodytype(src)]) - under_icon = w_uniform.sprite_sheets[species.get_bodytype(src)] - else if(w_uniform.item_icons && w_uniform.item_icons[slot_w_uniform_str]) - under_icon = w_uniform.item_icons[slot_w_uniform_str] - else - under_icon = INV_W_UNIFORM_DEF_ICON + //Shoes can be affected by uniform being drawn onto them + update_inv_shoes() + + if(!w_uniform) + return - //determine state to use - var/under_state - if(w_uniform.item_state_slots && w_uniform.item_state_slots[slot_w_uniform_str]) - under_state = w_uniform.item_state_slots[slot_w_uniform_str] - else if(w_uniform.item_state) - under_state = w_uniform.item_state - else - under_state = w_uniform.icon_state + if(wear_suit && (wear_suit.flags_inv & HIDEJUMPSUIT) && !istype(wear_suit, /obj/item/clothing/suit/space/rig)) + return //Wearing a suit that prevents uniform rendering - //need to append _s to the icon state for legacy compatibility - var/image/standing = image(icon = under_icon, icon_state = "[under_state]_s") + //Build a uniform sprite + overlays_standing[UNIFORM_LAYER] = w_uniform.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_w_uniform_str, default_icon = INV_W_UNIFORM_DEF_ICON, default_layer = UNIFORM_LAYER) + apply_layer(UNIFORM_LAYER) - if(w_uniform.addblends) - var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state) - var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = w_uniform.addblends) - if(w_uniform.color) - base.Blend(w_uniform.color, ICON_MULTIPLY) - base.Blend(addblend_icon, ICON_ADD) - standing = image(base) - else - standing.color = w_uniform.color - - //apply blood overlay - if(w_uniform.blood_DNA) - var/image/bloodsies = image(icon = species.get_blood_mask(src), icon_state = "uniformblood") - bloodsies.color = w_uniform.blood_color - standing.overlays += bloodsies - - //accessories - var/obj/item/clothing/under/under = w_uniform - if(under.accessories.len) - for(var/obj/item/clothing/accessory/A in under.accessories) - standing.overlays |= A.get_mob_overlay() - - overlays_standing[UNIFORM_LAYER] = standing - else - overlays_standing[UNIFORM_LAYER] = null - - //hiding/revealing shoes if necessary - update_inv_shoes(1) - - if(update_icons) - update_icons_layers() - -/mob/living/carbon/human/update_inv_wear_id(var/update_icons=1) +/mob/living/carbon/human/update_inv_wear_id() if(QDESTROYING(src)) return - if(wear_id) - wear_id.screen_loc = ui_id //TODO - if(w_uniform && w_uniform:displays_id) - var/image/standing - if(wear_id.icon_override) - standing = image("icon" = wear_id.icon_override, "icon_state" = "[icon_state]") - else if(wear_id.sprite_sheets && wear_id.sprite_sheets[species.get_bodytype(src)]) - standing = image("icon" = wear_id.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[icon_state]") - else - standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id") - overlays_standing[ID_LAYER] = standing - else - overlays_standing[ID_LAYER] = null - else - overlays_standing[ID_LAYER] = null + remove_layer(ID_LAYER) + + if(!wear_id) + return //Not wearing an ID - BITSET(hud_updateflag, ID_HUD) - BITSET(hud_updateflag, WANTED_HUD) + //Only draw the ID on the mob if the uniform allows for it + if(w_uniform && istype(w_uniform, /obj/item/clothing/under)) + var/obj/item/clothing/under/U = w_uniform + if(U.displays_id) + overlays_standing[ID_LAYER] = wear_id.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_wear_id_str, default_icon = INV_WEAR_ID_DEF_ICON, default_layer = ID_LAYER) + + apply_layer(ID_LAYER) - if(update_icons) update_icons_layers() - -/mob/living/carbon/human/update_inv_gloves(var/update_icons=1) +/mob/living/carbon/human/update_inv_gloves() if(QDESTROYING(src)) return - if(gloves) - var/t_state = gloves.item_state - if(!t_state) t_state = gloves.icon_state + remove_layer(GLOVES_LAYER) - var/image/standing - if(gloves.icon_override) - standing = image("icon" = gloves.icon_override, "icon_state" = "[t_state]") - else if(gloves.sprite_sheets && gloves.sprite_sheets[species.get_bodytype(src)]) - standing = image("icon" = gloves.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[t_state]") - else - standing = image("icon" = 'icons/mob/hands.dmi', "icon_state" = "[t_state]") + if(!gloves) + return //No gloves, no reason to be here. - if(gloves.blood_DNA) - var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "bloodyhands") - bloodsies.color = gloves.blood_color - standing.overlays += bloodsies - gloves.screen_loc = ui_gloves - if(gloves.addblends) - var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state) - var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = gloves.addblends) - if(gloves.color) - base.Blend(gloves.color, ICON_MULTIPLY) - base.Blend(addblend_icon, ICON_ADD) - standing = image(base) - else - standing.color = gloves.color - overlays_standing[GLOVES_LAYER] = standing - else - if(blood_DNA) - var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "bloodyhands") - bloodsies.color = hand_blood_color - overlays_standing[GLOVES_LAYER] = bloodsies - else - overlays_standing[GLOVES_LAYER] = null - if(update_icons) update_icons_layers() + overlays_standing[GLOVES_LAYER] = gloves.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_gloves_str, default_icon = INV_GLOVES_DEF_ICON, default_layer = GLOVES_LAYER) + + apply_layer(GLOVES_LAYER) - -/mob/living/carbon/human/update_inv_glasses(var/update_icons=1) +/mob/living/carbon/human/update_inv_glasses() if(QDESTROYING(src)) return - if(glasses) - var/image/standing - if(glasses.icon_override) - standing = image("icon" = glasses.icon_override, "icon_state" = "[glasses.icon_state]") - else if(glasses.sprite_sheets && glasses.sprite_sheets[species.get_bodytype(src)]) - standing = image("icon" = glasses.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[glasses.icon_state]") - else - standing = image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]") - if(glasses.addblends) - var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state) - var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = glasses.addblends) - if(glasses.color) - base.Blend(glasses.color, ICON_MULTIPLY) - base.Blend(addblend_icon, ICON_ADD) - standing = image(base) - else - standing.color = glasses.color - overlays_standing[GLASSES_LAYER] = standing + remove_layer(GLASSES_LAYER) - else - overlays_standing[GLASSES_LAYER] = null - if(update_icons) update_icons_layers() + if(!glasses) + return //Not wearing glasses, no need to update anything. -/mob/living/carbon/human/update_inv_ears(var/update_icons=1) + overlays_standing[GLASSES_LAYER] = glasses.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_gloves_str, default_icon = INV_EYES_DEF_ICON, default_layer = GLASSES_LAYER) + + apply_layer(GLASSES_LAYER) + +/mob/living/carbon/human/update_inv_ears() if(QDESTROYING(src)) return - overlays_standing[EARS_LAYER] = null - if( (head && (head.flags_inv & (BLOCKHAIR | BLOCKHEADHAIR))) || (wear_mask && (wear_mask.flags_inv & (BLOCKHAIR | BLOCKHEADHAIR)))) - if(update_icons) update_icons_layers() - return + remove_layer(EARS_LAYER) - if(l_ear || r_ear) - // Blank image upon which to layer left & right overlays. - var/image/both = image("icon" = 'icons/effects/effects.dmi', "icon_state" = "nothing") + if((head && head.flags_inv & (BLOCKHAIR | BLOCKHEADHAIR)) || (wear_mask && wear_mask.flags_inv & (BLOCKHAIR | BLOCKHEADHAIR))) + return //Ears are blocked (by hair being blocked, overloaded) - if(l_ear) - var/image/standing - var/t_type = l_ear.icon_state - if(l_ear.icon_override) - t_type = "[t_type]_l" - standing = image("icon" = l_ear.icon_override, "icon_state" = "[t_type]") - else if(l_ear.sprite_sheets && l_ear.sprite_sheets[species.get_bodytype(src)]) - t_type = "[t_type]_l" - standing = image("icon" = l_ear.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[t_type]") - else - standing = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]") - if(l_ear.addblends) - var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state) - var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = l_ear.addblends) - if(l_ear.color) - base.Blend(l_ear.color, ICON_MULTIPLY) - base.Blend(addblend_icon, ICON_ADD) - standing = image(base) - else - standing.color = l_ear.color - both.overlays += standing + if(!l_ear && !r_ear) + return //Why bother, if no ear sprites + + // Blank image upon which to layer left & right overlays. + var/image/both = image(icon = 'icons/effects/effects.dmi', icon_state = "nothing", layer = BODY_LAYER+EARS_LAYER) - if(r_ear) - var/image/standing - var/t_type = r_ear.icon_state - if(r_ear.icon_override) - t_type = "[t_type]_r" - standing = image("icon" = r_ear.icon_override, "icon_state" = "[t_type]") - else if(r_ear.sprite_sheets && r_ear.sprite_sheets[species.get_bodytype(src)]) - t_type = "[t_type]_r" - standing = image("icon" = r_ear.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[t_type]") - else - standing = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]") - if(r_ear.addblends) - var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state) - var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = r_ear.addblends) - if(r_ear.color) - base.Blend(r_ear.color, ICON_MULTIPLY) - base.Blend(addblend_icon, ICON_ADD) - standing = image(base) - else - standing.color = r_ear.color - both.overlays += standing + if(l_ear) + var/image/standing = l_ear.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_l_ear_str, default_icon = INV_EARS_DEF_ICON, default_layer = EARS_LAYER) + both.add_overlay(standing) - overlays_standing[EARS_LAYER] = both + if(r_ear) + var/image/standing = r_ear.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_r_ear_str, default_icon = INV_EARS_DEF_ICON, default_layer = EARS_LAYER) + both.add_overlay(standing) - else - overlays_standing[EARS_LAYER] = null - if(update_icons) update_icons_layers() + overlays_standing[EARS_LAYER] = both + apply_layer(EARS_LAYER) -/mob/living/carbon/human/update_inv_shoes(var/update_icons=1) +/mob/living/carbon/human/update_inv_shoes() if(QDESTROYING(src)) return - if(shoes && !((wear_suit && wear_suit.flags_inv & HIDESHOES) || (w_uniform && w_uniform.flags_inv & HIDESHOES))) + remove_layer(SHOES_LAYER) + remove_layer(SHOES_LAYER_ALT) //Dumb alternate layer for shoes being under the uniform. - var/image/standing - if(shoes.icon_override) - standing = image("icon" = shoes.icon_override, "icon_state" = "[shoes.icon_state]") - else if(shoes.sprite_sheets && shoes.sprite_sheets[species.get_bodytype(src)]) - standing = image("icon" = shoes.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[shoes.icon_state]") - else - standing = image("icon" = 'icons/mob/feet.dmi', "icon_state" = "[shoes.icon_state]") + if(!shoes || (wear_suit && wear_suit.flags_inv & HIDESHOES) || (w_uniform && w_uniform.flags_inv & HIDESHOES)) + return //Either nothing to draw, or it'd be hidden. - var/shoe_layer = SHOES_LAYER - if(istype(shoes, /obj/item/clothing/shoes)) - var/obj/item/clothing/shoes/ushoes = shoes - if(ushoes.shoes_under_pants == 1) - overlays_standing[SHOES_LAYER] = null - shoe_layer = SHOES_LAYER_ALT - else - overlays_standing[SHOES_LAYER_ALT] = null - shoe_layer = SHOES_LAYER + //Allow for shoe layer toggle nonsense + var/shoe_layer = SHOES_LAYER + if(istype(shoes, /obj/item/clothing/shoes)) + var/obj/item/clothing/shoes/ushoes = shoes + if(ushoes.shoes_under_pants == 1) + shoe_layer = SHOES_LAYER_ALT - if(shoes.blood_DNA) - var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "shoeblood") - bloodsies.color = shoes.blood_color - standing.overlays += bloodsies - - if(shoes.addblends) - var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state) - var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = shoes.addblends) - if(shoes.color) - base.Blend(shoes.color, ICON_MULTIPLY) - base.Blend(addblend_icon, ICON_ADD) - standing = image(base) - else - standing.color = shoes.color - overlays_standing[shoe_layer] = standing - - else - if(feet_blood_DNA) - var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "shoeblood") - bloodsies.color = feet_blood_color - overlays_standing[SHOES_LAYER] = bloodsies - else - overlays_standing[SHOES_LAYER] = null - overlays_standing[SHOES_LAYER_ALT] = null - if(update_icons) update_icons_layers() - -/mob/living/carbon/human/update_inv_s_store(var/update_icons=1) + //NB: the use of a var for the layer on this one + overlays_standing[shoe_layer] = shoes.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_shoes_str, default_icon = INV_FEET_DEF_ICON, default_layer = shoe_layer) + + apply_layer(SHOES_LAYER) + apply_layer(SHOES_LAYER_ALT) + +/mob/living/carbon/human/update_inv_s_store() if(QDESTROYING(src)) return - if(s_store) - var/t_state = s_store.item_state - if(!t_state) t_state = s_store.icon_state - overlays_standing[SUIT_STORE_LAYER] = image("icon" = species.suit_storage_icon, "icon_state" = "[t_state]") - s_store.screen_loc = ui_sstore1 //TODO - else - overlays_standing[SUIT_STORE_LAYER] = null - if(update_icons) update_icons_layers() + remove_layer(SUIT_STORE_LAYER) + if(!s_store) + return //Why bother, nothing there. + + //TODO, this is unlike the rest of the things + //Basically has no variety in slot icon choices at all. WHY SPECIES ONLY?? + var/t_state = s_store.item_state + if(!t_state) + t_state = s_store.icon_state + overlays_standing[SUIT_STORE_LAYER] = image(icon = species.suit_storage_icon, icon_state = t_state, layer = BODY_LAYER+SUIT_STORE_LAYER) + + apply_layer(SUIT_STORE_LAYER) -/mob/living/carbon/human/update_inv_head(var/update_icons=1) +/mob/living/carbon/human/update_inv_head() if(QDESTROYING(src)) return - if(head) - head.screen_loc = ui_head //TODO + remove_layer(HEAD_LAYER) + + if(!head) + return //No head item, why bother. - //Determine the icon to use - var/t_icon - if(head.icon_override) - t_icon = head.icon_override - else if(head.sprite_sheets && head.sprite_sheets[species.get_bodytype(src)]) - t_icon = head.sprite_sheets[species.get_bodytype(src)] + overlays_standing[HEAD_LAYER] = head.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_head_str, default_icon = INV_HEAD_DEF_ICON, default_layer = HEAD_LAYER) + + apply_layer(HEAD_LAYER) - else if(head.item_icons && (slot_head_str in head.item_icons)) - t_icon = head.item_icons[slot_head_str] - else - t_icon = INV_HEAD_DEF_ICON - - //Determine the state to use - var/t_state - if(istype(head, /obj/item/weapon/paper)) - /* I don't like this, but bandaid to fix half the hats in the game - being completely broken without re-breaking paper hats */ - t_state = "paper" - else - if(head.item_state_slots && head.item_state_slots[slot_head_str]) - t_state = head.item_state_slots[slot_head_str] - else if(head.item_state) - t_state = head.item_state - else - t_state = head.icon_state - - //Create the image - var/image/standing = image(icon = t_icon, icon_state = t_state) - - if(head.blood_DNA) - var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "helmetblood") - bloodsies.color = head.blood_color - standing.overlays += bloodsies - - if(istype(head,/obj/item/clothing/head)) - var/obj/item/clothing/head/hat = head - var/cache_key = "[hat.light_overlay]_[species.get_bodytype(src)]" - if(hat.on && light_overlay_cache[cache_key]) - standing.overlays |= light_overlay_cache[cache_key] - - if(head.addblends) - var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state) - var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = head.addblends) - if(head.color) - base.Blend(head.color, ICON_MULTIPLY) - base.Blend(addblend_icon, ICON_ADD) - standing = image(base) - else - standing.color = head.color - - // Accessories - copied from uniform, BOILERPLATE because fuck this system. - var/obj/item/clothing/head/hat = head - if(istype(hat) && hat.accessories.len) - for(var/obj/item/clothing/accessory/A in hat.accessories) - standing.overlays |= A.get_mob_overlay() - - overlays_standing[HEAD_LAYER] = standing - - else - overlays_standing[HEAD_LAYER] = null - if(update_icons) update_icons_layers() - -/mob/living/carbon/human/update_inv_belt(var/update_icons=1) +/mob/living/carbon/human/update_inv_belt() if(QDESTROYING(src)) return - if(belt) - belt.screen_loc = ui_belt //TODO - var/t_state = belt.item_state - if(!t_state) t_state = belt.icon_state - var/image/standing = image("icon_state" = "[t_state]") + remove_layer(BELT_LAYER) + remove_layer(BELT_LAYER_ALT) //Because you can toggle belt layer with a verb - if(belt.icon_override) - standing.icon = belt.icon_override - else if(belt.sprite_sheets && belt.sprite_sheets[species.get_bodytype(src)]) - standing.icon = belt.sprite_sheets[species.get_bodytype(src)] - else - standing.icon = 'icons/mob/belt.dmi' + if(!belt) + return //No belt, why bother. + + //Toggle for belt layering with uniform + var/belt_layer = BELT_LAYER + if(istype(belt, /obj/item/weapon/storage/belt)) + var/obj/item/weapon/storage/belt/ubelt = belt + if(ubelt.show_above_suit) + belt_layer = BELT_LAYER_ALT - var/belt_layer = BELT_LAYER - if(istype(belt, /obj/item/weapon/storage/belt)) - var/obj/item/weapon/storage/belt/ubelt = belt - if(ubelt.show_above_suit) - overlays_standing[BELT_LAYER] = null - belt_layer = BELT_LAYER_ALT - else - overlays_standing[BELT_LAYER_ALT] = null - if(belt.contents.len) - for(var/obj/item/i in belt.contents) - var/i_state = i.item_state - if(!i_state) i_state = i.icon_state - standing.overlays += image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[i_state]") + //NB: this uses a var from above + overlays_standing[belt_layer] = belt.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_belt_str, default_icon = INV_BELT_DEF_ICON, default_layer = belt_layer) + + apply_layer(belt_layer) - if(belt.addblends) - var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state) - var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = belt.addblends) - if(belt.color) - base.Blend(belt.color, ICON_MULTIPLY) - base.Blend(addblend_icon, ICON_ADD) - standing = image(base) - else - standing.color = belt.color - - overlays_standing[belt_layer] = standing - else - overlays_standing[BELT_LAYER] = null - overlays_standing[BELT_LAYER_ALT] = null - if(update_icons) update_icons_layers() - - -/mob/living/carbon/human/update_inv_wear_suit(var/update_icons=1) +/mob/living/carbon/human/update_inv_wear_suit() if(QDESTROYING(src)) return - if( wear_suit && istype(wear_suit, /obj/item/) ) - wear_suit.screen_loc = ui_oclothing - - var/image/standing - - var/t_icon = INV_SUIT_DEF_ICON - if(wear_suit.icon_override) - t_icon = wear_suit.icon_override - else if(wear_suit.sprite_sheets && src && wear_suit.sprite_sheets[species.get_bodytype(src)]) //Vorestation edit - t_icon = wear_suit.sprite_sheets[species.get_bodytype(src)] //Vorestation edit - else if(wear_suit.item_icons && wear_suit.item_icons[slot_wear_suit_str]) - t_icon = wear_suit.item_icons[slot_wear_suit_str] - - //VOREStation Code Start - var/t_state = wear_suit.icon_state - if(wear_suit.icon_override && wear_suit.item_state) - t_state = wear_suit.item_state - //VOREStation Code End - standing = image("icon" = t_icon, "icon_state" = "[wear_suit.icon_state]") - - if(wear_suit.addblends) - var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state) - var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = wear_suit.addblends) - if(wear_suit.color) - base.Blend(wear_suit.color, ICON_MULTIPLY) - base.Blend(addblend_icon, ICON_ADD) - standing = image(base) - else - standing.color = wear_suit.color - - standing = image("icon" = t_icon, "icon_state" = t_state) //VOREStation Edit - standing.color = wear_suit.color - //VORESTATION Code Start - if(wear_suit.icon_override && wear_suit.icon_override == 'icons/mob/taursuits_vr.dmi') - standing.pixel_x = -16 - standing.layer = 5 - //VORESTATION Code End - if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) ) - drop_from_inventory(handcuffed) - drop_l_hand() - drop_r_hand() - - if(wear_suit.blood_DNA) - var/obj/item/clothing/suit/S = wear_suit - if(istype(S)) //You can put non-suits in your suit slot (diona nymphs etc). - var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "[S.blood_overlay_type]blood") - bloodsies.color = wear_suit.blood_color - standing.overlays += bloodsies - - // Accessories - copied from uniform, BOILERPLATE because fuck this system. - var/obj/item/clothing/suit/suit = wear_suit - if(istype(suit) && suit.accessories.len) - for(var/obj/item/clothing/accessory/A in suit.accessories) - standing.overlays |= A.get_mob_overlay() - - overlays_standing[SUIT_LAYER] = standing - - else - overlays_standing[SUIT_LAYER] = null + remove_layer(SUIT_LAYER) //Hide/show other layers if necessary - update_collar(0) - update_inv_w_uniform(0) - update_inv_shoes(0) - update_tail_showing(0) - update_wing_showing(0)//VOREStation Edit + update_inv_w_uniform() + update_inv_shoes() + update_tail_showing() - if(update_icons) update_icons_layers() + if(!wear_suit) + return //No point, no suit. -/mob/living/carbon/human/update_inv_pockets(var/update_icons=1) + overlays_standing[SUIT_LAYER] = wear_suit.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_wear_suit_str, default_icon = INV_SUIT_DEF_ICON, default_layer = SUIT_LAYER) + + apply_layer(SUIT_LAYER) + +/mob/living/carbon/human/update_inv_pockets() + crash_with("Someone called update_inv_pockets even though it's dumb") + +/mob/living/carbon/human/update_inv_wear_mask() if(QDESTROYING(src)) return - if(l_store) l_store.screen_loc = ui_storage1 //TODO - if(r_store) r_store.screen_loc = ui_storage2 //TODO - if(update_icons) update_icons_layers() + remove_layer(FACEMASK_LAYER) + if(!wear_mask || (head && head.flags_inv & HIDEMASK)) + return //Why bother, nothing in mask slot. + + overlays_standing[FACEMASK_LAYER] = wear_mask.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_wear_mask_str, default_icon = INV_MASK_DEF_ICON, default_layer = FACEMASK_LAYER) + + apply_layer(FACEMASK_LAYER) -/mob/living/carbon/human/update_inv_wear_mask(var/update_icons=1) +/mob/living/carbon/human/update_inv_back() if(QDESTROYING(src)) return - if( wear_mask && ( istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/accessory) || istype(wear_mask, /obj/item/weapon/grenade) ) && !(head && head.flags_inv & HIDEMASK)) - wear_mask.screen_loc = ui_mask //TODO + remove_layer(BACK_LAYER) - var/image/standing - if(wear_mask.icon_override) - standing = image("icon" = wear_mask.icon_override, "icon_state" = "[wear_mask.icon_state]") - else if(wear_mask.sprite_sheets && wear_mask.sprite_sheets[species.get_bodytype(src)]) - standing = image("icon" = wear_mask.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[wear_mask.icon_state]") - else - standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]") - if(wear_mask.addblends) - var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state) - var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = wear_mask.addblends) - if(wear_mask.color) - base.Blend(wear_mask.color, ICON_MULTIPLY) - base.Blend(addblend_icon, ICON_ADD) - standing = image(base) - else - standing.color = wear_mask.color + if(!back) + return //Why do anything - if( !istype(wear_mask, /obj/item/clothing/mask/smokable/cigarette) && wear_mask.blood_DNA ) - var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "maskblood") - bloodsies.color = wear_mask.blood_color - standing.overlays += bloodsies - overlays_standing[FACEMASK_LAYER] = standing - else - overlays_standing[FACEMASK_LAYER] = null - if(update_icons) update_icons_layers() - - -/mob/living/carbon/human/update_inv_back(var/update_icons=1) - if(QDESTROYING(src)) - return - - if(back) - back.screen_loc = ui_back //TODO - - //determine the icon to use - var/icon/overlay_icon - if(back.icon_override) - overlay_icon = back.icon_override - else if(istype(back, /obj/item/weapon/rig)) - //If this is a rig and a mob_icon is set, it will take species into account in the rig update_icon() proc. - var/obj/item/weapon/rig/rig = back - overlay_icon = rig.mob_icon - else if(back.sprite_sheets && back.sprite_sheets[species.get_bodytype(src)]) - overlay_icon = back.sprite_sheets[species.get_bodytype(src)] - else if(back.item_icons && (slot_back_str in back.item_icons)) - overlay_icon = back.item_icons[slot_back_str] - else - overlay_icon = INV_BACK_DEF_ICON - - //determine state to use - var/overlay_state - if(back.item_state_slots && back.item_state_slots[slot_back_str]) - overlay_state = back.item_state_slots[slot_back_str] - else if(back.item_state) - overlay_state = back.item_state - else - overlay_state = back.icon_state - - //apply color - var/image/standing = image(icon = overlay_icon, icon_state = overlay_state) - if(back.addblends) - var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state) - var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = back.addblends) - if(back.color) - base.Blend(back.color, ICON_MULTIPLY) - base.Blend(addblend_icon, ICON_ADD) - standing = image(base) - else - standing.color = back.color - - //create the image - overlays_standing[BACK_LAYER] = standing - else - overlays_standing[BACK_LAYER] = null - - if(update_icons) - update_icons_layers() + overlays_standing[BACK_LAYER] = back.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_back_str, default_icon = INV_BACK_DEF_ICON, default_layer = BACK_LAYER) + + apply_layer(BACK_LAYER) +//TODO: Carbon procs in my human update_icons?? /mob/living/carbon/human/update_hud() //TODO: do away with this if possible if(QDESTROYING(src)) return @@ -1237,205 +757,113 @@ var/global/list/damage_icon_parts = list() //update whether handcuffs appears on our hud. /mob/living/carbon/proc/update_hud_handcuffed() - if(QDESTROYING(src)) - return - if(hud_used && hud_used.l_hand_hud_object && hud_used.r_hand_hud_object) hud_used.l_hand_hud_object.update_icon() hud_used.r_hand_hud_object.update_icon() -/mob/living/carbon/human/update_inv_handcuffed(var/update_icons=1) +/mob/living/carbon/human/update_inv_handcuffed() if(QDESTROYING(src)) return - if(handcuffed) - drop_r_hand() - drop_l_hand() - stop_pulling() //TODO: should be handled elsewhere + remove_layer(HANDCUFF_LAYER) + update_hud_handcuffed() //TODO - var/image/standing - if(handcuffed.icon_override) - standing = image("icon" = handcuffed.icon_override, "icon_state" = "handcuff1") - else if(handcuffed.sprite_sheets && handcuffed.sprite_sheets[species.get_bodytype(src)]) - standing = image("icon" = handcuffed.sprite_sheets[species.get_bodytype(src)], "icon_state" = "handcuff1") - else - standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "handcuff1") - overlays_standing[HANDCUFF_LAYER] = standing + if(!handcuffed) + return //Not cuffed, why bother - else - overlays_standing[HANDCUFF_LAYER] = null + overlays_standing[HANDCUFF_LAYER] = handcuffed.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_handcuffed_str, default_icon = INV_HCUFF_DEF_ICON, default_layer = HANDCUFF_LAYER) + + apply_layer(HANDCUFF_LAYER) - update_hud_handcuffed() - if(update_icons) update_icons_layers() - -/mob/living/carbon/human/update_inv_legcuffed(var/update_icons=1) +/mob/living/carbon/human/update_inv_legcuffed() if(QDESTROYING(src)) return - if(legcuffed) + remove_layer(LEGCUFF_LAYER) - var/image/standing - if(legcuffed.icon_override) - standing = image("icon" = legcuffed.icon_override, "icon_state" = "legcuff1") - else if(legcuffed.sprite_sheets && legcuffed.sprite_sheets[species.get_bodytype(src)]) - standing = image("icon" = legcuffed.sprite_sheets[species.get_bodytype(src)], "icon_state" = "legcuff1") - else - standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1") - overlays_standing[LEGCUFF_LAYER] = standing + if(!legcuffed) + return //Not legcuffed, why bother. - if(src.m_intent != "walk") - src.m_intent = "walk" - if(src.hud_used && src.hud_used.move_intent) - src.hud_used.move_intent.icon_state = "walking" + overlays_standing[LEGCUFF_LAYER] = handcuffed.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_legcuffed_str, default_icon = INV_LCUFF_DEF_ICON, default_layer = LEGCUFF_LAYER) + + apply_layer(LEGCUFF_LAYER) - else - overlays_standing[LEGCUFF_LAYER] = null - if(update_icons) update_icons_layers() - - -/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1) +/mob/living/carbon/human/update_inv_r_hand() if(QDESTROYING(src)) return - if(r_hand) - r_hand.screen_loc = ui_rhand //TODO + remove_layer(R_HAND_LAYER) - //determine icon state to use - var/t_state - if(r_hand.item_state_slots && r_hand.item_state_slots[slot_r_hand_str]) - t_state = r_hand.item_state_slots[slot_r_hand_str] - else if(r_hand.item_state) - t_state = r_hand.item_state - else - t_state = r_hand.icon_state + if(!r_hand) + return //No hand, no bother. - //determine icon to use - var/icon/t_icon - if(r_hand.item_icons && (slot_r_hand_str in r_hand.item_icons)) - t_icon = r_hand.item_icons[slot_r_hand_str] - else if(r_hand.icon_override) - t_state += "_r" - t_icon = r_hand.icon_override - else - t_icon = INV_R_HAND_DEF_ICON + overlays_standing[R_HAND_LAYER] = r_hand.make_worn_icon(body_type = species.get_bodytype(), inhands = TRUE, slot_name = slot_r_hand_str, default_icon = INV_R_HAND_DEF_ICON, default_layer = R_HAND_LAYER) + + apply_layer(R_HAND_LAYER) - //apply color - var/image/standing = image(icon = t_icon, icon_state = t_state) - standing.color = r_hand.color - - overlays_standing[R_HAND_LAYER] = standing - - if (handcuffed) drop_r_hand() //this should be moved out of icon code - else - overlays_standing[R_HAND_LAYER] = null - - if(update_icons) update_icons_layers() - - -/mob/living/carbon/human/update_inv_l_hand(var/update_icons=1) +/mob/living/carbon/human/update_inv_l_hand() if(QDESTROYING(src)) return - if(l_hand) - l_hand.screen_loc = ui_lhand //TODO + remove_layer(L_HAND_LAYER) - //determine icon state to use - var/t_state - if(l_hand.item_state_slots && l_hand.item_state_slots[slot_l_hand_str]) - t_state = l_hand.item_state_slots[slot_l_hand_str] - else if(l_hand.item_state) - t_state = l_hand.item_state - else - t_state = l_hand.icon_state + if(!l_hand) + return //No hand, no bother. - //determine icon to use - var/icon/t_icon - if(l_hand.item_icons && (slot_l_hand_str in l_hand.item_icons)) - t_icon = l_hand.item_icons[slot_l_hand_str] - else if(l_hand.icon_override) - t_state += "_l" - t_icon = l_hand.icon_override - else - t_icon = INV_L_HAND_DEF_ICON + overlays_standing[L_HAND_LAYER] = l_hand.make_worn_icon(body_type = species.get_bodytype(), inhands = TRUE, slot_name = slot_l_hand_str, default_icon = INV_L_HAND_DEF_ICON, default_layer = L_HAND_LAYER) - //apply color - var/image/standing = image(icon = t_icon, icon_state = t_state) - standing.color = l_hand.color + apply_layer(L_HAND_LAYER) - overlays_standing[L_HAND_LAYER] = standing - - if (handcuffed) drop_l_hand() //This probably should not be here - else - overlays_standing[L_HAND_LAYER] = null - - if(update_icons) update_icons_layers() - -/mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1) +/mob/living/carbon/human/proc/update_tail_showing() if(QDESTROYING(src)) return - overlays_standing[TAIL_LAYER] = null - - // VOREStation Edit - START - overlays_standing[TAIL_LAYER] = get_tail_image() - if(overlays_standing[TAIL_LAYER]) - if(update_icons) - update_icons_layers() - return - // VOREStation Edit - END - - var/species_tail = species.get_tail(src) + remove_layer(TAIL_LAYER) + var/species_tail = species.get_tail(src) // Species tail icon_state prefix. + //This one is actually not that bad I guess. if(species_tail && !(wear_suit && wear_suit.flags_inv & HIDETAIL)) var/icon/tail_s = get_tail_icon() - overlays_standing[TAIL_LAYER] = image(tail_s, icon_state = "[species_tail]_s") - animate_tail_reset(0) - - if(update_icons) - update_icons_layers() + overlays_standing[TAIL_LAYER] = image(icon = tail_s, icon_state = "[species_tail]_s", layer = BODY_LAYER+TAIL_LAYER) + animate_tail_reset() +//TODO: Is this the appropriate place for this, and not on species...? /mob/living/carbon/human/proc/get_tail_icon() - if(QDESTROYING(src)) - return - var/icon_key = "[species.get_race_key(src)][r_skin][g_skin][b_skin][r_hair][g_hair][b_hair]" var/icon/tail_icon = tail_icon_cache[icon_key] if(!tail_icon) //generate a new one var/species_tail_anim = species.get_tail_animation(src) - if(species.icobase_tail) species_tail_anim = species.icobase //VOREStation Code if(!species_tail_anim) species_tail_anim = 'icons/effects/species.dmi' tail_icon = new/icon(species_tail_anim) - //VOREStation Code Start - if(species.color_mult) - tail_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_MULTIPLY) - else - tail_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD) + tail_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD) // The following will not work with animated tails. var/use_species_tail = species.get_tail_hair(src) if(use_species_tail) var/icon/hair_icon = icon('icons/effects/species.dmi', "[species.get_tail(src)]_[use_species_tail]") - hair_icon.Blend(rgb(r_hair, g_hair, b_hair), ICON_MULTIPLY) //VOREStation Edit + hair_icon.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD) tail_icon.Blend(hair_icon, ICON_OVERLAY) tail_icon_cache[icon_key] = tail_icon return tail_icon - /mob/living/carbon/human/proc/set_tail_state(var/t_state) - if(QDESTROYING(src)) - return - var/image/tail_overlay = overlays_standing[TAIL_LAYER] - - if(tail_overlay && species.get_tail_animation(src)) - tail_overlay.icon_state = t_state - return tail_overlay - return null + + remove_layer(TAIL_LAYER) + + if(tail_overlay) + overlays_standing[TAIL_LAYER] = tail_overlay + if(species.get_tail_animation(src)) + tail_overlay.icon_state = t_state + . = tail_overlay + + apply_layer(TAIL_LAYER) //Not really once, since BYOND can't do that. //Update this if the ability to flick() images or make looping animation start at the first frame is ever added. -/mob/living/carbon/human/proc/animate_tail_once(var/update_icons=1) +//You can sort of flick images now with flick_overlay -Aro +/mob/living/carbon/human/proc/animate_tail_once() if(QDESTROYING(src)) return @@ -1445,35 +873,26 @@ var/global/list/damage_icon_parts = list() if(tail_overlay && tail_overlay.icon_state == t_state) return //let the existing animation finish - tail_overlay = set_tail_state(t_state) + tail_overlay = set_tail_state(t_state) // Calls remove_layer & apply_layer if(tail_overlay) spawn(20) //check that the animation hasn't changed in the meantime if(overlays_standing[TAIL_LAYER] == tail_overlay && tail_overlay.icon_state == t_state) - animate_tail_stop() + animate_tail_stop() - if(update_icons) - update_icons_layers() - -/mob/living/carbon/human/proc/animate_tail_start(var/update_icons=1) +/mob/living/carbon/human/proc/animate_tail_start() if(QDESTROYING(src)) return set_tail_state("[species.get_tail(src)]_slow[rand(0,9)]") - if(update_icons) - update_icons_layers() - -/mob/living/carbon/human/proc/animate_tail_fast(var/update_icons=1) +/mob/living/carbon/human/proc/animate_tail_fast() if(QDESTROYING(src)) return set_tail_state("[species.get_tail(src)]_loop[rand(0,9)]") - if(update_icons) - update_icons_layers() - -/mob/living/carbon/human/proc/animate_tail_reset(var/update_icons=1) +/mob/living/carbon/human/proc/animate_tail_reset() if(QDESTROYING(src)) return @@ -1481,114 +900,105 @@ var/global/list/damage_icon_parts = list() set_tail_state("[species.get_tail(src)]_idle[rand(0,9)]") else set_tail_state("[species.get_tail(src)]_static") - toggle_tail_vr(0) //VOREStation Add - So tails stop when someone dies. - if(update_icons) - update_icons_layers() -/mob/living/carbon/human/proc/animate_tail_stop(var/update_icons=1) +/mob/living/carbon/human/proc/animate_tail_stop() if(QDESTROYING(src)) return set_tail_state("[species.get_tail(src)]_static") - if(update_icons) - update_icons_layers() - - -//Adds a collar overlay above the helmet layer if the suit has one -// Suit needs an identically named sprite in icons/mob/collar.dmi -/mob/living/carbon/human/proc/update_collar(var/update_icons=1) +/mob/living/carbon/human/update_modifier_visuals() if(QDESTROYING(src)) return - var/icon/C = new('icons/mob/collar.dmi') - var/image/standing = null + remove_layer(MODIFIER_EFFECTS_LAYER) - if(wear_suit) - if(wear_suit.icon_state in C.IconStates()) - standing = image("icon" = C, "icon_state" = "[wear_suit.icon_state]") + if(!LAZYLEN(modifiers)) + return //No modifiers, no effects. - overlays_standing[COLLAR_LAYER] = standing - - if(update_icons) update_icons_layers() - -/mob/living/carbon/human/update_modifier_visuals(var/update_icons=1) - if(QDESTROYING(src)) - return - - overlays_standing[MODIFIER_EFFECTS_LAYER] = null var/image/effects = new() for(var/datum/modifier/M in modifiers) if(M.mob_overlay_state) - var/image/I = image("icon" = 'icons/mob/modifier_effects.dmi', "icon_state" = M.mob_overlay_state) - effects.overlays += I + var/image/I = image(icon = 'icons/mob/modifier_effects.dmi', icon_state = M.mob_overlay_state) + effects.overlays += I //TODO, this compositing is annoying. overlays_standing[MODIFIER_EFFECTS_LAYER] = effects + + apply_layer(MODIFIER_EFFECTS_LAYER) - if(update_icons) - update_icons_layers() - -/mob/living/carbon/human/update_fire(var/update_icons=1) +/mob/living/carbon/human/update_fire() if(QDESTROYING(src)) return - overlays_standing[FIRE_LAYER] = null - if(on_fire) - overlays_standing[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state" = get_fire_icon_state()) + remove_layer(FIRE_LAYER) + + if(!on_fire) + return + + overlays_standing[FIRE_LAYER] = image(icon = 'icons/mob/OnFire.dmi', icon_state = get_fire_icon_state(), layer = BODY_LAYER+FIRE_LAYER) + + apply_layer(FIRE_LAYER) - if(update_icons) update_icons_layers() - -/mob/living/carbon/human/update_water(var/update_icons=1) +/mob/living/carbon/human/update_water() if(QDESTROYING(src)) return - overlays_standing[WATER_LAYER] = null + remove_layer(WATER_LAYER) + var/depth = check_submerged() - if(depth) - if(!lying) - overlays_standing[WATER_LAYER] = image("icon" = 'icons/mob/submerged.dmi', "icon_state" = "human_swimming_[depth]") - // Lying sideways with the overlay looked strange. Another overlay will be needed in the future. + if(!depth || lying) + return - if(update_icons) - update_icons_layers() + overlays_standing[WATER_LAYER] = image(icon = 'icons/mob/submerged.dmi', icon_state = "human_swimming_[depth]", layer = BODY_LAYER+WATER_LAYER) //TODO: Improve + + apply_layer(WATER_LAYER) -/mob/living/carbon/human/proc/update_surgery(var/update_icons=1) +/mob/living/carbon/human/proc/update_surgery() if(QDESTROYING(src)) return - overlays_standing[SURGERY_LEVEL] = null + remove_layer(SURGERY_LAYER) + var/image/total = new for(var/obj/item/organ/external/E in organs) if(E.open) - var/image/I = image("icon"='icons/mob/surgery.dmi', "icon_state"="[E.icon_name][round(E.open)]", "layer"=-SURGERY_LEVEL) - total.overlays += I - overlays_standing[SURGERY_LEVEL] = total - if(update_icons) update_icons_layers() + var/image/I = image(icon = 'icons/mob/surgery.dmi', icon_state = "[E.icon_name][round(E.open)]", layer = BODY_LAYER+SURGERY_LAYER) + total.overlays += I //TODO: This compositing is annoying + + if(total.overlays.len) + overlays_standing[SURGERY_LAYER] = total + apply_layer(SURGERY_LAYER) //Human Overlays Indexes///////// #undef MUTATIONS_LAYER +#undef SKIN_LAYER #undef DAMAGE_LAYER -#undef SURGERY_LEVEL +#undef SURGERY_LAYER +#undef UNDERWEAR_LAYER +#undef SHOES_LAYER_ALT #undef UNIFORM_LAYER #undef ID_LAYER #undef SHOES_LAYER #undef GLOVES_LAYER -#undef EARS_LAYER +#undef BELT_LAYER #undef SUIT_LAYER #undef TAIL_LAYER #undef GLASSES_LAYER -#undef FACEMASK_LAYER -#undef BELT_LAYER +#undef BELT_LAYER_ALT #undef SUIT_STORE_LAYER #undef BACK_LAYER #undef HAIR_LAYER +#undef EARS_LAYER +#undef EYES_LAYER +#undef FACEMASK_LAYER #undef HEAD_LAYER #undef COLLAR_LAYER #undef HANDCUFF_LAYER #undef LEGCUFF_LAYER #undef L_HAND_LAYER #undef R_HAND_LAYER -#undef TARGETED_LAYER +#undef MODIFIER_EFFECTS_LAYER #undef FIRE_LAYER #undef WATER_LAYER +#undef TARGETED_LAYER #undef TOTAL_LAYERS \ No newline at end of file diff --git a/code/modules/mob/living/carbon/resist.dm b/code/modules/mob/living/carbon/resist.dm index 5c72bd224b..a86189d5f5 100644 --- a/code/modules/mob/living/carbon/resist.dm +++ b/code/modules/mob/living/carbon/resist.dm @@ -159,12 +159,12 @@ return ..() /mob/living/carbon/escape_buckle() - setClickCooldown(100) if(!buckled) return if(!restrained()) ..() else + setClickCooldown(100) visible_message( "[usr] attempts to unbuckle themself!", "You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)" diff --git a/code/modules/mob/living/inventory.dm b/code/modules/mob/living/inventory.dm index 60be7fb8b5..4a651af999 100644 --- a/code/modules/mob/living/inventory.dm +++ b/code/modules/mob/living/inventory.dm @@ -72,16 +72,16 @@ /mob/living/u_equip(obj/W as obj) if (W == r_hand) r_hand = null - update_inv_r_hand(0) + update_inv_r_hand() else if (W == l_hand) l_hand = null - update_inv_l_hand(0) + update_inv_l_hand() else if (W == back) back = null - update_inv_back(0) + update_inv_back() else if (W == wear_mask) wear_mask = null - update_inv_wear_mask(0) + update_inv_wear_mask() return /mob/living/get_equipped_item(var/slot) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 76d497734a..27b6d55ba8 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -111,15 +111,11 @@ /mob/living/proc/handle_stunned() if(stunned) AdjustStunned(-1) - if(!stunned) - update_icons() return stunned /mob/living/proc/handle_weakened() if(weakened) weakened = max(weakened-1,0) - if(!weakened) - update_icons() return weakened /mob/living/proc/handle_stuttering() @@ -145,8 +141,6 @@ /mob/living/proc/handle_paralysed() if(paralysis) AdjustParalysis(-1) - if(!paralysis) - update_icons() return paralysis /mob/living/proc/handle_disabilities() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index a5c363ed54..8c25f21402 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1,6 +1,13 @@ /mob/living/New() ..() + //Prime this list if we need it. + if(has_huds) + add_overlay(backplane,TRUE) //Strap this on here, to block HUDs from appearing in rightclick menus: http://www.byond.com/forum/?post=2336679 + hud_list = list() + hud_list.len = TOTAL_HUDS + make_hud_overlays() + //I'll just hang my coat up over here dsoverlay = image('icons/mob/darksight.dmi',global_hud.darksight) //This is a secret overlay! Go look at the file, you'll see. var/mutable_appearance/dsma = new(dsoverlay) //Changing like ten things, might as well. @@ -13,6 +20,8 @@ /mob/living/Destroy() dsoverlay.loc = null //I'll take my coat with me dsoverlay = null + if(buckled) + buckled.unbuckle_mob(src, TRUE) return ..() //mob verbs are faster than object verbs. See mob/verb/examine. @@ -209,10 +218,10 @@ default behaviour is: /mob/living/verb/succumb() set hidden = 1 if ((src.health < 0 && src.health > (5-src.getMaxHealth()))) // Health below Zero but above 5-away-from-death, as before, but variable - src.adjustOxyLoss(src.health + src.getMaxHealth() * 2) // Deal 2x health in OxyLoss damage, as before but variable. - src.health = src.getMaxHealth() - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() + src.death() to_chat(src, "You have given up life and succumbed to death.") - + else + to_chat(src, "You are not injured enough to succumb to death!") /mob/living/proc/updatehealth() if(status_flags & GODMODE) @@ -900,6 +909,7 @@ default behaviour is: resting = !resting to_chat(src, "You are now [resting ? "resting" : "getting up"]") + update_canmove() /mob/living/proc/cannot_use_vents() if(mob_size > MOB_SMALL) @@ -1047,14 +1057,10 @@ default behaviour is: canmove = 0 break - //Temporarily moved here from the various life() procs - //I'm fixing stuff incrementally so this will likely find a better home. - //It just makes sense for now. ~Carn - if( update_icon ) //forces a full overlay update - update_icon = 0 - regenerate_icons() - else if( lying != lying_prev ) - update_icons() + if(lying != lying_prev) + lying_prev = lying + update_transform() + return canmove // Adds overlays for specific modifiers. @@ -1218,4 +1224,22 @@ default behaviour is: return UNDERWATER else return ..() - \ No newline at end of file + +//Add an entry to overlays, assuming it exists +/mob/living/proc/apply_hud(cache_index, var/image/I) + hud_list[cache_index] = I + if((. = hud_list[cache_index])) + //underlays += . + add_overlay(.) + +//Remove an entry from overlays, and from the list +/mob/living/proc/grab_hud(cache_index) + var/I = hud_list[cache_index] + if(I) + //underlays -= I + cut_overlay(I) + hud_list[cache_index] = null + return I + +/mob/living/proc/make_hud_overlays() + return diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index f57957dd7d..9739e596b8 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -56,3 +56,6 @@ var/glow_color = "#FFFFFF" // The color they're glowing! var/see_invisible_default = SEE_INVISIBLE_LIVING + + var/list/hud_list //Holder for health hud, status hud, wanted hud, etc (not like inventory slots) + var/has_huds = FALSE //Whether or not we should bother initializing the above list diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index bc1a330a27..728295a8a5 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -150,6 +150,7 @@ var/list/ai_verbs_default = list( add_language(LANGUAGE_SOL_COMMON, 1) add_language(LANGUAGE_UNATHI, 1) add_language(LANGUAGE_SIIK, 1) + add_language(LANGUAGE_AKHANI, 1) add_language(LANGUAGE_SKRELLIAN, 1) add_language(LANGUAGE_SKRELLIANFAR, 0) add_language(LANGUAGE_TRADEBAND, 1) @@ -586,8 +587,8 @@ var/list/ai_verbs_default = list( "female human", "male unathi", "female unathi", - "male tajara", - "female tajara", + "male tajaran", + "female tajaran", "male tesharii", "female tesharii", "male skrell", @@ -629,9 +630,9 @@ var/list/ai_verbs_default = list( holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holounam")) if("female unathi") holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holounaf")) - if("male tajara") + if("male tajaran") holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotajm")) - if("female tajara") + if("female tajaran") holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotajf")) if("male tesharii") holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotesm")) diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm index b0b325f08d..bfeea5e1b4 100644 --- a/code/modules/mob/living/silicon/pai/software_modules.dm +++ b/code/modules/mob/living/silicon/pai/software_modules.dm @@ -473,16 +473,18 @@ id = "translator" toggle(mob/living/silicon/pai/user) - // Sol Common, Tradeband and Gutter are added with New() and are therefore the current default, always active languages + // Sol Common, Tradeband, Terminus and Gutter are added with New() and are therefore the current default, always active languages user.translator_on = !user.translator_on if(user.translator_on) user.add_language(LANGUAGE_UNATHI) user.add_language(LANGUAGE_SIIK) + user.add_language(LANGUAGE_AKHANI) user.add_language(LANGUAGE_SKRELLIAN) user.add_language(LANGUAGE_SCHECHI) else user.remove_language(LANGUAGE_UNATHI) user.remove_language(LANGUAGE_SIIK) + user.remove_language(LANGUAGE_AKHANI) user.remove_language(LANGUAGE_SKRELLIAN) user.remove_language(LANGUAGE_SCHECHI) diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index 953010c33e..d52a5da531 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -24,7 +24,7 @@ if(response == "Analyze") if(loaded_item) var/confirm = alert(user, "This will destroy the item inside forever. Are you sure?","Confirm Analyze","Yes","No") - if(confirm == "Yes") //This is pretty copypasta-y + if(confirm == "Yes" && !QDELETED(loaded_item)) //This is pretty copypasta-y user << "You activate the analyzer's microlaser, analyzing \the [loaded_item] and breaking it down." flick("portable_analyzer_scan", src) playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) diff --git a/code/modules/mob/living/silicon/robot/robot_modules/station.dm b/code/modules/mob/living/silicon/robot/robot_modules/station.dm index b1bb38acfb..f0abf911b2 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/station.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/station.dm @@ -23,7 +23,7 @@ var/global/list/robot_modules = list( var/hide_on_manifest = 0 var/channels = list() var/networks = list() - var/languages = list(LANGUAGE_SOL_COMMON = 1, LANGUAGE_TRADEBAND = 1, LANGUAGE_UNATHI = 0, LANGUAGE_SIIK = 0, LANGUAGE_SKRELLIAN = 0, LANGUAGE_GUTTER = 0, LANGUAGE_SCHECHI = 0, LANGUAGE_SIGN = 0, LANGUAGE_TERMINUS = 1) + var/languages = list(LANGUAGE_SOL_COMMON = 1, LANGUAGE_TRADEBAND = 1, LANGUAGE_UNATHI = 0, LANGUAGE_SIIK = 0, LANGUAGE_AKHANI = 0, LANGUAGE_SKRELLIAN = 0, LANGUAGE_GUTTER = 0, LANGUAGE_SCHECHI = 0, LANGUAGE_SIGN = 0, LANGUAGE_TERMINUS = 1) var/sprites = list() var/can_be_pushed = 1 var/no_slip = 0 @@ -576,6 +576,7 @@ var/global/list/robot_modules = list( LANGUAGE_SOL_COMMON = 1, LANGUAGE_UNATHI = 1, LANGUAGE_SIIK = 1, + LANGUAGE_AKHANI = 1, LANGUAGE_SKRELLIAN = 1, LANGUAGE_SKRELLIANFAR = 0, LANGUAGE_ROOTLOCAL = 0, diff --git a/code/modules/mob/living/silicon/robot/robot_modules/syndicate.dm b/code/modules/mob/living/silicon/robot/robot_modules/syndicate.dm index 1575516d91..ac41265fac 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/syndicate.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/syndicate.dm @@ -8,6 +8,7 @@ LANGUAGE_TRADEBAND = 1, LANGUAGE_UNATHI = 0, LANGUAGE_SIIK = 0, + LANGUAGE_AKHANI = 0, LANGUAGE_SKRELLIAN = 0, LANGUAGE_SKRELLIANFAR = 0, LANGUAGE_ROOTLOCAL = 0, diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 09321af981..0d88e0c96f 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -7,7 +7,7 @@ var/list/stating_laws = list()// Channels laws are currently being stated on var/obj/item/device/radio/common_radio - var/list/hud_list[10] + has_huds = TRUE var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer //Used in say.dm. diff --git a/code/modules/mob/living/simple_animal/aliens/alien.dm b/code/modules/mob/living/simple_animal/aliens/alien.dm index 0f7cc35c77..3dba09330a 100644 --- a/code/modules/mob/living/simple_animal/aliens/alien.dm +++ b/code/modules/mob/living/simple_animal/aliens/alien.dm @@ -24,6 +24,8 @@ harm_intent_damage = 5 melee_damage_lower = 25 melee_damage_upper = 25 + attack_sharp = 1 + attack_edge = 1 attacktext = list("slashed") attack_sound = 'sound/weapons/bladeslice.ogg' diff --git a/code/modules/mob/living/simple_animal/aliens/creature.dm b/code/modules/mob/living/simple_animal/aliens/creature.dm index 980623c017..20840e66db 100644 --- a/code/modules/mob/living/simple_animal/aliens/creature.dm +++ b/code/modules/mob/living/simple_animal/aliens/creature.dm @@ -13,8 +13,12 @@ speed = 8 harm_intent_damage = 8 - melee_damage_lower = 5 - melee_damage_upper = 5 + + melee_damage_lower = 8 + melee_damage_upper = 15 + attack_armor_pen = 5 //It's a horror from beyond, I ain't gotta explain 5 AP + attack_sharp = 1 + attack_edge = 1 attacktext = list("chomped") attack_sound = 'sound/weapons/bite.ogg' @@ -48,7 +52,7 @@ health = 160 harm_intent_damage = 5 - melee_damage_lower = 8 + melee_damage_lower = 13 melee_damage_upper = 25 /mob/living/simple_animal/hostile/creature/strong/cult diff --git a/code/modules/mob/living/simple_animal/aliens/faithless.dm b/code/modules/mob/living/simple_animal/aliens/faithless.dm index 09de8a24fb..af2e7da48d 100644 --- a/code/modules/mob/living/simple_animal/aliens/faithless.dm +++ b/code/modules/mob/living/simple_animal/aliens/faithless.dm @@ -17,8 +17,10 @@ response_harm = "hits" harm_intent_damage = 10 - melee_damage_lower = 5 - melee_damage_upper = 5 + + melee_damage_lower = 10 + melee_damage_upper = 18 + attack_armor_pen = 5 //It's a horror from beyond, I ain't gotta explain 5 AP attacktext = list("gripped") attack_sound = 'sound/hallucinations/growl1.ogg' @@ -67,8 +69,8 @@ health = 100 harm_intent_damage = 5 - melee_damage_lower = 7 - melee_damage_upper = 20 + melee_damage_lower = 13 + melee_damage_upper = 28 /mob/living/simple_animal/hostile/faithless/strong/cult diff --git a/code/modules/mob/living/simple_animal/aliens/hivebot.dm b/code/modules/mob/living/simple_animal/aliens/hivebot.dm index bb888d0e0d..e322198815 100644 --- a/code/modules/mob/living/simple_animal/aliens/hivebot.dm +++ b/code/modules/mob/living/simple_animal/aliens/hivebot.dm @@ -63,8 +63,8 @@ desc = "A robot. It looks fragile and weak" maxHealth = 1 LASERS_TO_KILL health = 1 LASERS_TO_KILL - melee_damage_lower = 3 - melee_damage_upper = 3 + melee_damage_lower = 8 + melee_damage_upper = 8 // This one has a semi-weak ranged attack. /mob/living/simple_animal/hostile/hivebot/range diff --git a/code/modules/mob/living/simple_animal/aliens/shade.dm b/code/modules/mob/living/simple_animal/aliens/shade.dm index e8da069e1d..c1c2f1dc01 100644 --- a/code/modules/mob/living/simple_animal/aliens/shade.dm +++ b/code/modules/mob/living/simple_animal/aliens/shade.dm @@ -20,6 +20,7 @@ melee_damage_lower = 5 melee_damage_upper = 15 + attack_armor_pen = 100 //It's a ghost/horror from beyond, I ain't gotta explain 100 AP attacktext = list("drained the life from") minbodytemp = 0 diff --git a/code/modules/mob/living/simple_animal/animals/bat.dm b/code/modules/mob/living/simple_animal/animals/bat.dm index c51c7c1b36..1be28a078f 100644 --- a/code/modules/mob/living/simple_animal/animals/bat.dm +++ b/code/modules/mob/living/simple_animal/animals/bat.dm @@ -21,8 +21,11 @@ response_harm = "hits the" harm_intent_damage = 10 - melee_damage_lower = 3 - melee_damage_upper = 3 + + melee_damage_lower = 5 + melee_damage_upper = 5 + attack_sharp = 1 + environment_smash = 1 attacktext = list("bites") diff --git a/code/modules/mob/living/simple_animal/animals/bear.dm b/code/modules/mob/living/simple_animal/animals/bear.dm index 55eda3fcca..3ffd495ff7 100644 --- a/code/modules/mob/living/simple_animal/animals/bear.dm +++ b/code/modules/mob/living/simple_animal/animals/bear.dm @@ -2,7 +2,6 @@ /mob/living/simple_animal/hostile/bear name = "space bear" desc = "RawrRawr!!" - tt_desc = "Ursinae aetherius" //...bearspace? Maybe. icon_state = "bear" icon_living = "bear" icon_dead = "bear_dead" @@ -24,6 +23,8 @@ melee_damage_lower = 20 melee_damage_upper = 30 + attack_sharp = 1 + attack_edge = 1 //Space bears aren't affected by atmos. min_oxy = 0 diff --git a/code/modules/mob/living/simple_animal/animals/crab.dm b/code/modules/mob/living/simple_animal/animals/crab.dm index de131b9055..68aa2afd14 100644 --- a/code/modules/mob/living/simple_animal/animals/crab.dm +++ b/code/modules/mob/living/simple_animal/animals/crab.dm @@ -68,8 +68,11 @@ minbodytemp = 175 - melee_damage_lower = 15 + melee_damage_lower = 22 melee_damage_upper = 35 + attack_armor_pen = 35 + attack_sharp = 1 + attack_edge = 1 meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat response_help = "pets" diff --git a/code/modules/mob/living/simple_animal/animals/giant_spider.dm b/code/modules/mob/living/simple_animal/animals/giant_spider.dm index 094a3060b0..a3f803268d 100644 --- a/code/modules/mob/living/simple_animal/animals/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/animals/giant_spider.dm @@ -29,8 +29,11 @@ response_disarm = "gently pushes aside" response_harm = "punches" - melee_damage_lower = 15 - melee_damage_upper = 20 + melee_damage_lower = 18 + melee_damage_upper = 30 + attack_sharp = 1 + attack_edge = 1 + heat_damage_per_tick = 20 cold_damage_per_tick = 20 @@ -70,8 +73,8 @@ Nurse Family maxHealth = 40 health = 40 - melee_damage_lower = 5 - melee_damage_upper = 10 + melee_damage_lower = 8 + melee_damage_upper = 15 poison_per_bite = 7 poison_type = "spidertoxin" // VOREStation edit, original is stoxin. (sleep toxins) @@ -102,10 +105,11 @@ Nurse Family maxHealth = 320 health = 320 - melee_damage_lower = 15 - melee_damage_upper = 25 - poison_per_bite = 10 + melee_damage_lower = 20 + melee_damage_upper = 30 + attack_armor_pen = 25 + poison_per_bite = 10 egg_inject_chance = 10 pixel_x = -16 @@ -129,8 +133,8 @@ Nurse Family cooperative = 1 shoot_range = 5 - melee_damage_lower = 5 - melee_damage_upper = 10 + melee_damage_lower = 8 + melee_damage_upper = 15 poison_per_bite = 2 poison_type = "psilocybin" @@ -162,8 +166,8 @@ Nurse Family maxHealth = 100 health = 100 - melee_damage_lower = 5 - melee_damage_upper = 20 + melee_damage_lower = 8 + melee_damage_upper = 25 poison_per_bite = 3 poison_type = "chloralhydrate" @@ -222,9 +226,6 @@ Hunter Family health = 120 move_to_delay = 4 - melee_damage_lower = 10 - melee_damage_upper = 20 - poison_per_bite = 5 /mob/living/simple_animal/hostile/giant_spider/lurker @@ -238,7 +239,7 @@ Hunter Family health = 100 move_to_delay = 4 - melee_damage_lower = 5 + melee_damage_lower = 8 melee_damage_upper = 20 @@ -289,8 +290,8 @@ Guard Family maxHealth = 210 health = 210 - melee_damage_lower = 5 - melee_damage_upper = 10 + melee_damage_lower = 8 + melee_damage_upper = 15 poison_chance = 20 poison_per_bite = 5 @@ -309,8 +310,8 @@ Guard Family maxHealth = 175 health = 175 - melee_damage_lower = 5 - melee_damage_upper = 15 + melee_damage_lower = 10 + melee_damage_upper = 25 poison_chance = 30 poison_per_bite = 1 @@ -326,8 +327,8 @@ Guard Family health = 210 taser_kill = 0 //It -is- the taser. - melee_damage_lower = 5 - melee_damage_upper = 10 + melee_damage_lower = 10 + melee_damage_upper = 25 ranged = 1 projectilesound = 'sound/weapons/taser2.ogg' @@ -349,8 +350,9 @@ Guard Family health = 225 taser_kill = 0 //You will need more than a peashooter to kill the juggernaut. - melee_damage_lower = 10 - melee_damage_upper = 20 + melee_damage_lower = 25 + melee_damage_upper = 40 + attack_armor_pen = 15 poison_chance = 30 poison_per_bite = 0.5 @@ -380,9 +382,6 @@ Guard Family maxHealth = 175 health = 175 - melee_damage_lower = 15 - melee_damage_upper = 20 - poison_per_bite = 5 poison_type = "cryotoxin" diff --git a/code/modules/mob/living/simple_animal/animals/sif_wildlife/diyaab.dm b/code/modules/mob/living/simple_animal/animals/sif_wildlife/diyaab.dm index a39694d02c..515591855e 100644 --- a/code/modules/mob/living/simple_animal/animals/sif_wildlife/diyaab.dm +++ b/code/modules/mob/living/simple_animal/animals/sif_wildlife/diyaab.dm @@ -15,8 +15,9 @@ speed = 1 move_to_delay = 1 - melee_damage_lower = 1 - melee_damage_upper = 8 + melee_damage_lower = 4 + melee_damage_upper = 12 + attack_sharp = 1 //Bleeds, but it shouldn't rip off a limb? attacktext = list("gouged") cold_damage_per_tick = 0 diff --git a/code/modules/mob/living/simple_animal/animals/sif_wildlife/savik.dm b/code/modules/mob/living/simple_animal/animals/sif_wildlife/savik.dm index 75ebd22bd1..9289bf1d75 100644 --- a/code/modules/mob/living/simple_animal/animals/sif_wildlife/savik.dm +++ b/code/modules/mob/living/simple_animal/animals/sif_wildlife/savik.dm @@ -15,7 +15,10 @@ move_to_delay = 2 melee_damage_lower = 15 - melee_damage_upper = 25 + melee_damage_upper = 35 + attack_armor_pen = 15 + attack_sharp = 1 + attack_edge = 1 attacktext = list("mauled") cold_damage_per_tick = 0 diff --git a/code/modules/mob/living/simple_animal/animals/sif_wildlife/shantak.dm b/code/modules/mob/living/simple_animal/animals/sif_wildlife/shantak.dm index 65db039108..652a4939fc 100644 --- a/code/modules/mob/living/simple_animal/animals/sif_wildlife/shantak.dm +++ b/code/modules/mob/living/simple_animal/animals/sif_wildlife/shantak.dm @@ -14,8 +14,11 @@ speed = 1 move_to_delay = 1 - melee_damage_lower = 3 - melee_damage_upper = 12 + melee_damage_lower = 12 + melee_damage_upper = 28 + attack_armor_pen = 5 + attack_sharp = 1 + attack_edge = 1 attacktext = list("gouged") cold_damage_per_tick = 0 diff --git a/code/modules/mob/living/simple_animal/humanoids/pirate.dm b/code/modules/mob/living/simple_animal/humanoids/pirate.dm index 8921f3c519..59a907e846 100644 --- a/code/modules/mob/living/simple_animal/humanoids/pirate.dm +++ b/code/modules/mob/living/simple_animal/humanoids/pirate.dm @@ -28,6 +28,10 @@ harm_intent_damage = 5 melee_damage_lower = 30 melee_damage_upper = 30 + attack_armor_pen = 50 + attack_sharp = 1 + attack_edge = 1 + attacktext = list("slashed") attack_sound = 'sound/weapons/bladeslice.ogg' diff --git a/code/modules/mob/living/simple_animal/humanoids/syndicate.dm b/code/modules/mob/living/simple_animal/humanoids/syndicate.dm index e7f9d6d64d..28139eaa48 100644 --- a/code/modules/mob/living/simple_animal/humanoids/syndicate.dm +++ b/code/modules/mob/living/simple_animal/humanoids/syndicate.dm @@ -73,8 +73,11 @@ icon_state = "syndicatemelee" icon_living = "syndicatemelee" - melee_damage_lower = 20 - melee_damage_upper = 25 + melee_damage_lower = 30 + melee_damage_upper = 30 + attack_armor_pen = 50 + attack_sharp = 1 + attack_edge = 1 attacktext = list("slashed") status_flags = 0 @@ -178,6 +181,8 @@ melee_damage_lower = 15 melee_damage_upper = 15 + attack_sharp = 1 + attack_edge = 1 attack_sound = 'sound/weapons/bladeslice.ogg' attacktext = list("cut") diff --git a/code/modules/mob/living/simple_animal/simple_hud.dm b/code/modules/mob/living/simple_animal/simple_hud.dm index cd3ed61355..5da7e8a696 100644 --- a/code/modules/mob/living/simple_animal/simple_hud.dm +++ b/code/modules/mob/living/simple_animal/simple_hud.dm @@ -12,6 +12,7 @@ var/list/adding = list() var/list/other = list() var/list/hotkeybuttons = list() + var/list/slot_info = list() hud.adding = adding hud.other = other @@ -34,6 +35,7 @@ inv_box.screen_loc = slot_data["loc"] inv_box.slot_id = slot_data["slot"] inv_box.icon_state = slot_data["state"] + slot_info["[inv_box.slot_id]"] = inv_box.screen_loc if(slot_data["dir"]) inv_box.set_dir(slot_data["dir"]) @@ -249,9 +251,9 @@ inv_box.slot_id = slot_r_hand inv_box.color = ui_color inv_box.alpha = ui_alpha - hud.r_hand_hud_object = inv_box hud.adding += inv_box + slot_info["[slot_r_hand]"] = inv_box.screen_loc inv_box = new /obj/screen/inventory/hand() inv_box.hud = src @@ -266,6 +268,7 @@ inv_box.alpha = ui_alpha hud.l_hand_hud_object = inv_box hud.adding += inv_box + slot_info["[slot_l_hand]"] = inv_box.screen_loc //Swaphand titlebar using = new /obj/screen/inventory() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index cb3dc7e2ab..5b73a19622 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -861,14 +861,17 @@ /mob/proc/Resting(amount) facing_dir = null resting = max(max(resting,amount),0) + update_canmove() return /mob/proc/SetResting(amount) resting = max(amount,0) + update_canmove() return /mob/proc/AdjustResting(amount) resting = max(resting + amount,0) + update_canmove() return /mob/proc/AdjustLosebreath(amount) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 21752e05d1..38b8bbe4d6 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -517,7 +517,7 @@ proc/is_blind(A) if(istype(belt, /obj/item/weapon/gun) || istype(belt, /obj/item/weapon/melee)) threatcount += 2 - if(species.name != "Human") + if(species.name != SPECIES_HUMAN) threatcount += 2 if(check_records || check_arrest) @@ -624,6 +624,7 @@ var/global/image/backplane backplane = image('icons/misc/win32.dmi') backplane.alpha = 0 backplane.plane = -100 + backplane.layer = MOB_LAYER-0.1 backplane.mouse_opacity = 0 return TRUE @@ -634,4 +635,24 @@ var/global/image/backplane else var/area/A = get_area(src) return A.sound_env - \ No newline at end of file + +/mob/proc/position_hud_item(var/obj/item/item, var/slot) + if(!istype(hud_used) || !slot || !LAZYLEN(hud_used.slot_info)) + return + + //They may have hidden their entire hud but the hands + if(!hud_used.hud_shown && slot > slot_r_hand) + item.screen_loc = null + return + + //They may have hidden the icons in the bottom left with the hide button + if(!hud_used.inventory_shown && slot > slot_r_store) + item.screen_loc = null + return + + var/screen_place = hud_used.slot_info["[slot]"] + if(!screen_place) + item.screen_loc = null + return + + item.screen_loc = screen_place diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 804934838d..207a430c2e 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -500,7 +500,9 @@ //new_character.dna.UpdateSE() // Do the initial caching of the player's body icons. - //new_character.force_update_limbs() + new_character.force_update_limbs() + new_character.update_icons_body() + new_character.update_eyes() new_character.key = key //Manually transfer the key to log them in @@ -533,12 +535,12 @@ chosen_species = all_species[client.prefs.species] if(!chosen_species) - return "Human" + return SPECIES_HUMAN if(is_alien_whitelisted(chosen_species)) return chosen_species.name - return "Human" + return SPECIES_HUMAN /mob/new_player/get_gender() if(!client || !client.prefs) ..() diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index d7908f437c..e7960e1b9a 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -194,31 +194,30 @@ b_skin = blue /datum/preferences/proc/dress_preview_mob(var/mob/living/carbon/human/mannequin) - var/update_icon = FALSE copy_to(mannequin, TRUE) sleep(1) //VOREStation Add - Not sure why this is required. Some race condition about robo manufacturers with tails. - var/datum/job/previewJob - if(equip_preview_mob) - // Determine what job is marked as 'High' priority, and dress them up as such. - if(job_civilian_low & ASSISTANT) - previewJob = job_master.GetJob(USELESS_JOB) //VOREStation Edit - Visitor not Assistant - else - for(var/datum/job/job in job_master.occupations) - var/job_flag - switch(job.department_flag) - if(CIVILIAN) - job_flag = job_civilian_high - if(MEDSCI) - job_flag = job_medsci_high - if(ENGSEC) - job_flag = job_engsec_high - if(job.flag == job_flag) - previewJob = job - break - else + if(!equip_preview_mob) return + var/datum/job/previewJob + // Determine what job is marked as 'High' priority, and dress them up as such. + if(job_civilian_low & ASSISTANT) + previewJob = job_master.GetJob(USELESS_JOB) + else + for(var/datum/job/job in job_master.occupations) + var/job_flag + switch(job.department_flag) + if(CIVILIAN) + job_flag = job_civilian_high + if(MEDSCI) + job_flag = job_medsci_high + if(ENGSEC) + job_flag = job_engsec_high + if(job.flag == job_flag) + previewJob = job + break + if((equip_preview_mob & EQUIP_PREVIEW_LOADOUT) && !(previewJob && (equip_preview_mob & EQUIP_PREVIEW_JOB) && (previewJob.type == /datum/job/ai || previewJob.type == /datum/job/cyborg))) var/list/equipped_slots = list() //If more than one item takes the same slot only spawn the first for(var/thing in gear) @@ -244,15 +243,10 @@ var/metadata = gear[G.display_name] if(mannequin.equip_to_slot_or_del(G.spawn_item(mannequin, metadata), G.slot)) equipped_slots += G.slot - update_icon = TRUE if((equip_preview_mob & EQUIP_PREVIEW_JOB) && previewJob) mannequin.job = previewJob.title previewJob.equip_preview(mannequin, player_alt_titles[previewJob.title]) - update_icon = TRUE - - if(update_icon) - mannequin.update_icons_all() /datum/preferences/proc/update_preview_icon() var/mob/living/carbon/human/dummy/mannequin/mannequin = get_mannequin(client_ckey) @@ -262,16 +256,13 @@ preview_icon = icon('icons/effects/128x48.dmi', bgstate) preview_icon.Scale(48+32, 16+32) - mannequin.dir = NORTH - var/icon/stamp = getFlatIcon(mannequin) + var/icon/stamp = getFlatIcon(mannequin, defdir=NORTH) preview_icon.Blend(stamp, ICON_OVERLAY, 25, 17) - mannequin.dir = WEST - stamp = getFlatIcon(mannequin) + stamp = getFlatIcon(mannequin, defdir=WEST) preview_icon.Blend(stamp, ICON_OVERLAY, 1, 9) - mannequin.dir = SOUTH - stamp = getFlatIcon(mannequin) + stamp = getFlatIcon(mannequin, defdir=SOUTH) preview_icon.Blend(stamp, ICON_OVERLAY, 49, 1) - preview_icon.Scale(preview_icon.Width() * 2, preview_icon.Height() * 2) // Scaling here to prevent blurring in the browser. \ No newline at end of file + preview_icon.Scale(preview_icon.Width() * 2, preview_icon.Height() * 2) // Scaling here to prevent blurring in the browser. diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index 29dfee0969..c26702afe9 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -29,7 +29,7 @@ var/gender = NEUTER // Restrict some styles to specific species - var/list/species_allowed = list("Human","Promethean","Vatborn") + var/list/species_allowed = list(SPECIES_HUMAN,SPECIES_PROMETHEAN,SPECIES_HUMAN_VATBORN) // Whether or not the accessory can be affected by colouration var/do_colouration = 1 @@ -52,7 +52,7 @@ name = "Bald" icon_state = "bald" gender = MALE - species_allowed = list("Human","Unathi","Promethean","Vatborn") + species_allowed = list(SPECIES_HUMAN,SPECIES_UNATHI,SPECIES_PROMETHEAN,SPECIES_HUMAN_VATBORN,SPECIES_VOX) short name = "Short Hair" // try to capatilize the names please~ @@ -208,12 +208,12 @@ bobcurl name = "Bobcurl" icon_state = "hair_bobcurl" - species_allowed = list("Human","Promethean","Vatborn","Unathi") + species_allowed = list(SPECIES_HUMAN,SPECIES_PROMETHEAN,SPECIES_HUMAN_VATBORN,SPECIES_UNATHI) bob name = "Bob" icon_state = "hair_bobcut" - species_allowed = list("Human","Promethean","Vatborn","Unathi") + species_allowed = list(SPECIES_HUMAN,SPECIES_PROMETHEAN,SPECIES_HUMAN_VATBORN,SPECIES_UNATHI) bobcutalt name = "Chin Length Bob" @@ -238,7 +238,7 @@ buzz name = "Buzzcut" icon_state = "hair_buzzcut" - species_allowed = list("Human","Promethean","Vatborn","Unathi") + species_allowed = list(SPECIES_HUMAN,SPECIES_PROMETHEAN,SPECIES_HUMAN_VATBORN,SPECIES_UNATHI) shavehair name = "Shaved Hair" @@ -343,7 +343,7 @@ mohawk name = "Mohawk" icon_state = "hair_d" - species_allowed = list("Human","Promethean","Vatborn","Unathi") + species_allowed = list(SPECIES_HUMAN,SPECIES_PROMETHEAN,SPECIES_HUMAN_VATBORN,SPECIES_UNATHI) jensen name = "Adam Jensen Hair" @@ -360,7 +360,7 @@ spiky name = "Spiky" icon_state = "hair_spikey" - species_allowed = list("Human","Promethean","Vatborn","Unathi") + species_allowed = list(SPECIES_HUMAN,SPECIES_PROMETHEAN,SPECIES_HUMAN_VATBORN,SPECIES_UNATHI) kusangi name = "Kusanagi Hair" @@ -665,7 +665,7 @@ name = "Shaved" icon_state = "bald" gender = NEUTER - species_allowed = list("Human","Vatborn","Unathi","Tajara","Skrell", "Machine","Teshari", "Vox","Promethean") + species_allowed = list(SPECIES_HUMAN,SPECIES_HUMAN_VATBORN,SPECIES_UNATHI,SPECIES_TAJ,SPECIES_SKRELL, "Machine", SPECIES_TESHARI, SPECIES_TESHARI,SPECIES_PROMETHEAN) watson name = "Watson Mustache" @@ -706,7 +706,7 @@ elvis name = "Elvis Sideburns" icon_state = "facial_elvis" - species_allowed = list("Human","Promethean","Vatborn","Unathi") + species_allowed = list(SPECIES_HUMAN,SPECIES_PROMETHEAN,SPECIES_HUMAN_VATBORN,SPECIES_UNATHI) abe name = "Abraham Lincoln Beard" @@ -803,326 +803,326 @@ una_spines_long name = "Long Unathi Spines" icon_state = "soghun_longspines" - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) una_spines_short name = "Short Unathi Spines" icon_state = "soghun_shortspines" - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) una_frills_long name = "Long Unathi Frills" icon_state = "soghun_longfrills" - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) una_frills_short name = "Short Unathi Frills" icon_state = "soghun_shortfrills" - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) una_horns name = "Unathi Horns" icon_state = "soghun_horns" - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) una_bighorns name = "Unathi Big Horns" icon_state = "unathi_bighorn" - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) una_smallhorns name = "Unathi Small Horns" icon_state = "unathi_smallhorn" - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) una_ramhorns name = "Unathi Ram Horns" icon_state = "unathi_ramhorn" - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) una_sidefrills name = "Unathi Side Frills" icon_state = "unathi_sidefrills" - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) //Skrell 'hairstyles' skr_tentacle_veryshort name = "Skrell Very Short Tentacles" icon_state = "skrell_hair_veryshort" - species_allowed = list("Skrell") + species_allowed = list(SPECIES_SKRELL) gender = MALE skr_tentacle_short name = "Skrell Short Tentacles" icon_state = "skrell_hair_short" - species_allowed = list("Skrell") + species_allowed = list(SPECIES_SKRELL) skr_tentacle_average name = "Skrell Average Tentacles" icon_state = "skrell_hair_average" - species_allowed = list("Skrell") + species_allowed = list(SPECIES_SKRELL) skr_tentacle_verylong name = "Skrell Long Tentacles" icon_state = "skrell_hair_verylong" - species_allowed = list("Skrell") + species_allowed = list(SPECIES_SKRELL) gender = FEMALE //Tajaran hairstyles taj_ears name = "Tajaran Ears" icon_state = "ears_plain" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_clean - name = "Tajara Clean" + name = "Tajaran Clean" icon_state = "hair_clean" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_bangs - name = "Tajara Bangs" + name = "Tajaran Bangs" icon_state = "hair_bangs" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_braid - name = "Tajara Braid" + name = "Tajaran Braid" icon_state = "hair_tbraid" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_shaggy - name = "Tajara Shaggy" + name = "Tajaran Shaggy" icon_state = "hair_shaggy" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_mohawk name = "Tajaran Mohawk" icon_state = "hair_mohawk" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_plait - name = "Tajara Plait" + name = "Tajaran Plait" icon_state = "hair_plait" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_straight - name = "Tajara Straight" + name = "Tajaran Straight" icon_state = "hair_straight" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_long - name = "Tajara Long" + name = "Tajaran Long" icon_state = "hair_long" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_rattail - name = "Tajara Rat Tail" + name = "Tajaran Rat Tail" icon_state = "hair_rattail" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_spiky - name = "Tajara Spiky" + name = "Tajaran Spiky" icon_state = "hair_tajspiky" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_messy - name = "Tajara Messy" + name = "Tajaran Messy" icon_state = "hair_messy" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_curls - name = "Tajara Curly" + name = "Tajaran Curly" icon_state = "hair_curly" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_wife - name = "Tajara Housewife" + name = "Tajaran Housewife" icon_state = "hair_wife" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_victory - name = "Tajara Victory Curls" + name = "Tajaran Victory Curls" icon_state = "hair_victory" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_bob - name = "Tajara Bob" + name = "Tajaran Bob" icon_state = "hair_tbob" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_ears_fingercurl - name = "Tajara Finger Curls" + name = "Tajaran Finger Curls" icon_state = "hair_fingerwave" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) //Teshari things teshari name = "Teshari Default" icon_state = "teshari_default" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) teshari_altdefault name = "Teshari Alt. Default" icon_state = "teshari_ears" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) teshari_tight name = "Teshari Tight" icon_state = "teshari_tight" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) teshari_excited name = "Teshari Spiky" icon_state = "teshari_spiky" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) teshari_spike name = "Teshari Spike" icon_state = "teshari_spike" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) teshari_long name = "Teshari Overgrown" icon_state = "teshari_long" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) teshari_burst name = "Teshari Starburst" icon_state = "teshari_burst" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) teshari_shortburst name = "Teshari Short Starburst" icon_state = "teshari_burst_short" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) teshari_mohawk name = "Teshari Mohawk" icon_state = "teshari_mohawk" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) teshari_pointy name = "Teshari Pointy" icon_state = "teshari_pointy" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) teshari_upright name = "Teshari Upright" icon_state = "teshari_upright" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) teshari_mane name = "Teshari Mane" icon_state = "teshari_mane" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) teshari_droopy name = "Teshari Droopy" icon_state = "teshari_droopy" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) teshari_mushroom name = "Teshari Mushroom" icon_state = "teshari_mushroom" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) // Vox things vox_braid_long name = "Long Vox braid" icon_state = "vox_longbraid" - species_allowed = list("Vox") + species_allowed = list(SPECIES_VOX) vox_braid_short name = "Short Vox Braid" icon_state = "vox_shortbraid" - species_allowed = list("Vox") + species_allowed = list(SPECIES_VOX) vox_quills_short name = "Short Vox Quills" icon_state = "vox_shortquills" - species_allowed = list("Vox") + species_allowed = list(SPECIES_VOX) vox_quills_kingly name = "Kingly Vox Quills" icon_state = "vox_kingly" - species_allowed = list("Vox") + species_allowed = list(SPECIES_VOX) vox_quills_mohawk name = "Quill Mohawk" icon_state = "vox_mohawk" - species_allowed = list("Vox") + species_allowed = list(SPECIES_VOX) /datum/sprite_accessory/facial_hair taj_sideburns - name = "Tajara Sideburns" + name = "Tajaran Sideburns" icon_state = "facial_sideburns" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_mutton - name = "Tajara Mutton" + name = "Tajaran Mutton" icon_state = "facial_mutton" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_pencilstache - name = "Tajara Pencilstache" + name = "Tajaran Pencilstache" icon_state = "facial_pencilstache" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_moustache - name = "Tajara Moustache" + name = "Tajaran Moustache" icon_state = "facial_moustache" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_goatee - name = "Tajara Goatee" + name = "Tajaran Goatee" icon_state = "facial_goatee" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_smallstache - name = "Tajara Smallsatche" + name = "Tajaran Smallsatche" icon_state = "facial_smallstache" - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) //unathi horn beards and the like una_chinhorn name = "Unathi Chin Horn" icon_state = "facial_chinhorns" - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) una_hornadorns name = "Unathi Horn Adorns" icon_state = "facial_hornadorns" - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) una_spinespikes name = "Unathi Spine Spikes" icon_state = "facial_spikes" - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) una_dorsalfrill name = "Unathi Dorsal Frill" icon_state = "facial_dorsalfrill" - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) //Teshari things teshari_beard name = "Teshari Beard" icon_state = "teshari_chin" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) gender = NEUTER teshari_scraggly name = "Teshari Scraggly" icon_state = "teshari_scraggly" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) gender = NEUTER teshari_chops name = "Teshari Chops" icon_state = "teshari_gap" - species_allowed = list("Teshari") + species_allowed = list(SPECIES_TESHARI) gender = NEUTER /* @@ -1137,7 +1137,7 @@ do_colouration = 1 //Almost all of them have it, COLOR_ADD //Empty list is unrestricted. Should only restrict the ones that make NO SENSE on other species, - //like Tajara inner-ear coloring overlay stuff. + //like Tajaran inner-ear coloring overlay stuff. species_allowed = list() var/body_parts = list() //A list of bodyparts this covers, in organ_tag defines @@ -1176,61 +1176,63 @@ name = "Socks Coloration (Taj)" icon_state = "taj_pawsocks" body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND) - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) una_paw_socks name = "Socks Coloration (Una)" icon_state = "una_pawsocks" body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND) - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) paw_socks name = "Socks Coloration (Generic)" icon_state = "pawsocks" body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND) - species_allowed = list("Tajara", "Unathi") + species_allowed = list(SPECIES_TAJ, SPECIES_UNATHI) paw_socks_belly name = "Socks,Belly Coloration (Generic)" icon_state = "pawsocksbelly" body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_GROIN,BP_TORSO) - species_allowed = list("Tajara", "Unathi") + species_allowed = list(SPECIES_TAJ, SPECIES_UNATHI) belly_hands_feet name = "Hands,Feet,Belly Color (Minor)" icon_state = "bellyhandsfeetsmall" body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_GROIN,BP_TORSO) - species_allowed = list("Tajara", "Unathi") + species_allowed = list(SPECIES_TAJ, SPECIES_UNATHI) hands_feet_belly_full name = "Hands,Feet,Belly Color (Major)" icon_state = "bellyhandsfeet" body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_GROIN,BP_TORSO) - species_allowed = list("Tajara", "Unathi") + species_allowed = list(SPECIES_TAJ, SPECIES_UNATHI) hands_feet_belly_full_female name = "Hands,Feet,Belly Color (Major, Female)" icon_state = "bellyhandsfeet_female" body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_GROIN,BP_TORSO) - species_allowed = list("Tajara") - + species_allowed = list(SPECIES_TAJ) + + // VOREStation edit - Illegal Edit, This will fail - https://github.com/VOREStation/VOREStation/pull/2335 panda_eye_marks name = "Panda Eye Markings" icon_state = "eyes-panda" body_parts = list(BP_HEAD) - species_allowed = list("Human") + species_allowed = list(SPECIES_HUMAN) + // VOREStation Edit End patches name = "Color Patches" icon_state = "patches" body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_TORSO,BP_GROIN) - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) patchesface name = "Color Patches (Face)" icon_state = "patchesface" body_parts = list(BP_HEAD) - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) bands name = "Color Bands" @@ -1246,7 +1248,7 @@ name = "Tiger Stripes" icon_state = "tiger" body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_TORSO,BP_GROIN) - species_allowed = list("Tajara") //There's a tattoo for non-cats + species_allowed = list(SPECIES_TAJ) //There's a tattoo for non-cats tigerhead name = "Tiger Stripes (Head, Minor)" @@ -1257,7 +1259,7 @@ name = "Tiger Stripes (Head, Major)" icon_state = "tigerface" body_parts = list(BP_HEAD) - species_allowed = list("Tajara") //There's a tattoo for non-cats + species_allowed = list(SPECIES_TAJ) //There's a tattoo for non-cats backstripe name = "Back Stripe" @@ -1269,74 +1271,74 @@ name = "Belly Fur (Taj)" icon_state = "taj_belly" body_parts = list(BP_TORSO) - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_bellyfull name = "Belly Fur Wide (Taj)" icon_state = "taj_bellyfull" body_parts = list(BP_TORSO) - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_earsout name = "Outer Ear (Taj)" icon_state = "taj_earsout" body_parts = list(BP_HEAD) - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_earsin name = "Inner Ear (Taj)" icon_state = "taj_earsin" body_parts = list(BP_HEAD) - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_nose name = "Nose Color (Taj)" icon_state = "taj_nose" body_parts = list(BP_HEAD) - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_crest name = "Chest Fur Crest (Taj)" icon_state = "taj_crest" body_parts = list(BP_TORSO) - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_muzzle name = "Muzzle Color (Taj)" icon_state = "taj_muzzle" body_parts = list(BP_HEAD) - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_face name = "Cheeks Color (Taj)" icon_state = "taj_face" body_parts = list(BP_HEAD) - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) taj_all name = "All Taj Head (Taj)" icon_state = "taj_all" body_parts = list(BP_HEAD) - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) //Una specific stuff una_face name = "Face Color (Una)" icon_state = "una_face" body_parts = list(BP_HEAD) - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) una_facelow name = "Face Color Low (Una)" icon_state = "una_facelow" body_parts = list(BP_HEAD) - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) una_scutes name = "Scutes (Una)" icon_state = "una_scutes" body_parts = list(BP_TORSO) - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) //skin styles - WIP //going to have to re-integrate this with surgery @@ -1347,27 +1349,27 @@ human name = "Default human skin" icon_state = "default" - species_allowed = list("Human","Vatborn") + species_allowed = list(SPECIES_HUMAN,SPECIES_HUMAN_VATBORN) human_tatt01 name = "Tatt01 human skin" icon_state = "tatt1" - species_allowed = list("Human","Vatborn") + species_allowed = list(SPECIES_HUMAN,SPECIES_HUMAN_VATBORN) tajaran name = "Default tajaran skin" icon_state = "default" icon = 'icons/mob/human_races/r_tajaran.dmi' - species_allowed = list("Tajara") + species_allowed = list(SPECIES_TAJ) unathi name = "Default Unathi skin" icon_state = "default" icon = 'icons/mob/human_races/r_lizard.dmi' - species_allowed = list("Unathi") + species_allowed = list(SPECIES_UNATHI) skrell name = "Default skrell skin" icon_state = "default" icon = 'icons/mob/human_races/r_skrell.dmi' - species_allowed = list("Skrell") + species_allowed = list(SPECIES_SKRELL) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 06f6a128d5..dcd95c20de 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -83,6 +83,7 @@ add_language(LANGUAGE_SOL_COMMON, 1) add_language(LANGUAGE_UNATHI, 1) add_language(LANGUAGE_SIIK, 1) + add_language(LANGUAGE_AKHANI, 1) add_language(LANGUAGE_SKRELLIAN, 1) add_language(LANGUAGE_TRADEBAND, 1) add_language(LANGUAGE_GUTTER, 1) diff --git a/code/modules/mob/typing_indicator.dm b/code/modules/mob/typing_indicator.dm index fe5ffcd659..a06b2f275b 100644 --- a/code/modules/mob/typing_indicator.dm +++ b/code/modules/mob/typing_indicator.dm @@ -10,15 +10,15 @@ if(client && !stat) typing_indicator.invisibility = invisibility if(!is_preference_enabled(/datum/client_preference/show_typing_indicator)) - overlays -= typing_indicator + add_overlay(typing_indicator) else if(state) if(!typing) - overlays += typing_indicator + add_overlay(typing_indicator) typing = 1 else if(typing) - overlays -= typing_indicator + cut_overlay(typing_indicator) typing = 0 return state @@ -30,7 +30,6 @@ set_typing_indicator(1) else if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) hud_typing = 1 - update_icons_huds() var/message = input("","say (text)") as text @@ -38,7 +37,6 @@ set_typing_indicator(0) else if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) hud_typing = 0 - update_icons_huds() if(message) say_verb(message) @@ -51,13 +49,11 @@ set_typing_indicator(1) else if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) hud_typing = 1 - update_icons_huds() var/message = input("","me (text)") as text if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) hud_typing = 0 - update_icons_huds() else if(!ishuman(src)) //If they're a mob, use the old code. set_typing_indicator(0) diff --git a/code/modules/mob/update_icons.dm b/code/modules/mob/update_icons.dm index ae6e01a249..6004ca3e4c 100644 --- a/code/modules/mob/update_icons.dm +++ b/code/modules/mob/update_icons.dm @@ -1,31 +1,26 @@ //Most of these are defined at this level to reduce on checks elsewhere in the code. //Having them here also makes for a nice reference list of the various overlay-updating procs available -/mob/proc/regenerate_icons() //TODO: phase this out completely if possible +/mob/proc/regenerate_icons() //Update every aspect of the mob's icons (expensive, resist the urge to use unless you need it) return /mob/proc/update_icons() update_icon() //Ugh. return -/mob/proc/update_icons_layers(var/update_icons = TRUE) - if(update_icons) - update_icons() +// Obsolete +/mob/proc/update_icons_layers() + return -/mob/proc/update_icons_huds(var/update_icons = TRUE) - if(update_icons) - update_icons() +/mob/proc/update_icons_huds() + return -/mob/proc/update_icons_body(var/update_icons = TRUE) - if(update_icons) - update_icons() +/mob/proc/update_icons_body() + return /mob/proc/update_icons_all() - update_icons_huds(FALSE) - update_icons_body(FALSE) - update_icons_layers(FALSE) - - update_icons() + return +// End obsolete /mob/proc/update_hud() return diff --git a/code/modules/multiz/zshadow.dm b/code/modules/multiz/zshadow.dm index 3fd0f897be..c2e2c0f799 100644 --- a/code/modules/multiz/zshadow.dm +++ b/code/modules/multiz/zshadow.dm @@ -33,6 +33,10 @@ . = ..() /mob/zshadow/examine(mob/user, distance, infix, suffix) + if(!owner) + // The only time we should have a null owner is if we are in nullspace. Help figure out why we were examined. + crash_with("[src] ([type]) @ [log_info_line()] was examined by [user] @ [global.log_info_line(user)]") + return return owner.examine(user, distance, infix, suffix) // Relay some stuff they hear diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index 4f8b1e220c..93f7ef495b 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -27,8 +27,6 @@ var/const/CE_STABLE_THRESHOLD = 0.5 return vessel.add_reagent("blood",species.blood_volume) - spawn(1) - fixblood() //Resets blood data /mob/living/carbon/human/proc/fixblood() diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index fb73f3d0be..bdfc6061f0 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -52,7 +52,7 @@ var/list/organ_cache = list() if(istype(holder)) src.owner = holder src.w_class = max(src.w_class + mob_size_difference(holder.mob_size, MOB_MEDIUM), 1) //smaller mobs have smaller organs. - species = all_species["Human"] + species = all_species[SPECIES_HUMAN] if(holder.dna) dna = holder.dna.Clone() species = holder.species //VOREStation Edit - For custom species @@ -294,15 +294,16 @@ var/list/organ_cache = list() /obj/item/organ/emp_act(severity) if(!(robotic >= ORGAN_ASSISTED)) return - switch (severity) - if (1) - take_damage(rand(6,12)) - if (2) - take_damage(rand(4,8)) - if (3) - take_damage(rand(3,6)) - if (4) - take_damage(rand(1,4)) + for(var/i = 1; i <= robotic; i++) + switch (severity) + if (1) + take_damage(rand(5,9)) + if (2) + take_damage(rand(3,7)) + if (3) + take_damage(rand(2,5)) + if (4) + take_damage(rand(1,3)) /obj/item/organ/proc/removed(var/mob/living/user) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 2c9626ee7e..2ad17d2f5e 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -107,15 +107,16 @@ if(!(robotic >= ORGAN_ROBOT)) return var/burn_damage = 0 - switch (severity) - if (1) - burn_damage += rand(8, 13) - if (2) - burn_damage += rand(6, 9) - if(3) - burn_damage += rand(4, 7) - if(4) - burn_damage += rand(1, 5) + for(var/i = 1; i <= robotic; i++) + switch (severity) + if (1) + burn_damage += rand(5, 8) + if (2) + burn_damage += rand(4, 6) + if(3) + burn_damage += rand(2, 5) + if(4) + burn_damage += rand(1, 3) if(burn_damage) take_damage(0, burn_damage) @@ -400,7 +401,7 @@ user << "Nothing to fix!" return 0 - if(damage_amount >= min_broken_damage) //VOREStation Edit - Makes robotic limb damage scalable + if(brute_dam + burn_dam >= min_broken_damage) //VOREStation Edit - Makes robotic limb damage scalable user << "The damage is far too severe to patch over externally." return 0 @@ -874,7 +875,7 @@ Note that amputating the affected organ does in fact remove the infection from t spawn(1) victim.updatehealth() victim.UpdateDamageIcon() - victim.regenerate_icons() + victim.update_icons_body() dir = 2 switch(disintegrate) diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index 92079cc56c..9be78ae089 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -106,7 +106,7 @@ var/global/list/limb_icon_cache = list() if(owner && owner.gender == MALE) gender = "m" - icon_cache_key = "[icon_name]_[species ? species.get_bodytype() : "Human"]" //VOREStation Edit + icon_cache_key = "[icon_name]_[species ? species.get_bodytype() : SPECIES_HUMAN]" //VOREStation Edit if(force_icon) mob_icon = new /icon(force_icon, "[icon_name][gendered_icon ? "_[gender]" : ""]") @@ -179,7 +179,7 @@ var/global/list/limb_icon_cache = list() if(nonsolid) applying.MapColors("#4D4D4D","#969696","#1C1C1C", "#000000") - if(species && species.get_bodytype(owner) != "Human") + if(species && species.get_bodytype(owner) != SPECIES_HUMAN) applying.SetIntensity(1) // Unathi, Taj and Skrell have -very- dark base icons. VOREStation edit fixes this and brings the number back to 1 else applying.SetIntensity(1) //VOREStation edit to make Prometheans not look like shit with mob coloring. diff --git a/code/modules/organs/robolimbs.dm b/code/modules/organs/robolimbs.dm index 63376a7203..0d0b8e6192 100644 --- a/code/modules/organs/robolimbs.dm +++ b/code/modules/organs/robolimbs.dm @@ -42,7 +42,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ var/lifelike // If set, appears organic. var/skin_tone // If set, applies skin tone rather than part color var/blood_color = "#030303" - var/list/species_cannot_use = list("Teshari", "Promethean") //VOREStation Add + var/list/species_cannot_use = list(SPECIES_TESHARI, "Promethean") //VOREStation Add var/list/monitor_styles //If empty, the model of limbs offers a head compatible with monitors. var/parts = BP_ALL //Defines what parts said brand can replace on a body. var/health_hud_intensity = 1 // Intensity modifier for the health GUI indicator. diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 9b4eaf639e..9e090c2095 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -457,6 +457,10 @@ update_icon() +/obj/item/weapon/paper/get_worn_icon_state(var/slot_name) + if(slot_name == slot_head_str) + return "paper" //Gross, but required for now. + return ..() /obj/item/weapon/paper/attackby(obj/item/weapon/P as obj, mob/user as mob) ..() @@ -495,13 +499,13 @@ B.loc = h_user B.hud_layerise() h_user.l_store = B - h_user.update_inv_pockets() + //h_user.update_inv_pockets() //Doesn't do anything else if (h_user.r_store == src) h_user.drop_from_inventory(src) B.loc = h_user B.hud_layerise() h_user.r_store = B - h_user.update_inv_pockets() + //h_user.update_inv_pockets() //Doesn't do anything else if (h_user.head == src) h_user.u_equip(src) h_user.put_in_hands(B) diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 6ab1be0a9f..23ac5ace63 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -164,7 +164,7 @@ usr.put_in_hands(W) pages.Remove(pages[page]) - usr << "You remove the [W.name] from the bundle." + to_chat(usr, "You remove the [W.name] from the bundle.") if(pages.len <= 1) var/obj/item/weapon/paper/P = src[1] @@ -178,11 +178,11 @@ page = pages.len update_icon() - else - usr << "You need to hold it in hands!" - if (src.loc && istype(src.loc, /mob) ||istype(src.loc.loc, /mob)) + src.attack_self(usr) updateUsrDialog() + else + to_chat(usr, "You need to hold it in hands!") /obj/item/weapon/paper_bundle/verb/rename() set name = "Rename bundle" diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index a5666d2795..2de88c942d 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -656,7 +656,7 @@ if ((stat & BROKEN) \ && !opened \ && W.force >= 5 \ - && W.w_class >= ITEMSIZE_NORMAL ) + && W.w_class >= ITEMSIZE_SMALL ) user.visible_message("The [src.name] has been hit with the [W.name] by [user.name]!", \ "You hit the [src.name] with your [W.name]!", \ "You hear a bang!") @@ -674,7 +674,7 @@ istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/assembly/signaler))) return src.attack_hand(user) //Placeholder until someone can do take_damage() for APCs or something. - to_chat(user,"The [src.name] looks too sturdy to bash open.") + to_chat(user,"The [src.name] looks too sturdy to bash open with \the [W.name].") // attack with hand - remove cell (if cover open) or interact with the APC diff --git a/code/modules/reagents/Chemistry-Metabolism.dm b/code/modules/reagents/Chemistry-Metabolism.dm index 74ef2d4730..30be9f2d1e 100644 --- a/code/modules/reagents/Chemistry-Metabolism.dm +++ b/code/modules/reagents/Chemistry-Metabolism.dm @@ -1,21 +1,34 @@ /datum/reagents/metabolism var/metabolism_class //CHEM_TOUCH, CHEM_INGEST, or CHEM_BLOOD + var/metabolism_speed = 1 // Multiplicative, 1 is full speed, 0.5 is half, etc. var/mob/living/carbon/parent -/datum/reagents/metabolism/New(var/max = 100, mob/living/carbon/parent_mob, var/met_class) +/datum/reagents/metabolism/New(var/max = 100, mob/living/carbon/parent_mob, var/met_class = null) ..(max, parent_mob) - - metabolism_class = met_class + + if(met_class) + metabolism_class = met_class if(istype(parent_mob)) parent = parent_mob /datum/reagents/metabolism/proc/metabolize() - + var/metabolism_type = 0 //non-human mobs if(ishuman(parent)) var/mob/living/carbon/human/H = parent metabolism_type = H.species.reagent_tag - + for(var/datum/reagent/current in reagent_list) - current.on_mob_life(parent, metabolism_type, metabolism_class) - update_total() \ No newline at end of file + current.on_mob_life(parent, metabolism_type, src) + update_total() + +// "Specialized" metabolism datums +/datum/reagents/metabolism/bloodstream + metabolism_class = CHEM_BLOOD + +/datum/reagents/metabolism/ingested + metabolism_class = CHEM_INGEST + metabolism_speed = 0.5 + +/datum/reagents/metabolism/touch + metabolism_class = CHEM_TOUCH \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index ddfa5823e5..ce7227ce46 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -57,12 +57,17 @@ /datum/reagent/proc/touch_turf(var/turf/T, var/amount) // Cleaner cleaning, lube lubbing, etc, all go here return -/datum/reagent/proc/on_mob_life(var/mob/living/carbon/M, var/alien, var/location) // Currently, on_mob_life is called on carbons. Any interaction with non-carbon mobs (lube) will need to be done in touch_mob. +/datum/reagent/proc/on_mob_life(var/mob/living/carbon/M, var/alien, var/datum/reagents/metabolism/location) // Currently, on_mob_life is called on carbons. Any interaction with non-carbon mobs (lube) will need to be done in touch_mob. if(!istype(M)) return if(!affects_dead && M.stat == DEAD) return + if(!istype(location)) + return + + var/datum/reagents/metabolism/active_metab = location var/removed = metabolism + if(!mrate_static == TRUE) // Modifiers for(var/datum/modifier/mod in M.modifiers) @@ -70,23 +75,25 @@ removed *= mod.metabolism_percent // Species removed *= M.species.metabolic_rate + // Metabolism + removed *= active_metab.metabolism_speed - if(ingest_met && (location == CHEM_INGEST)) + if(ingest_met && (active_metab.metabolism_class == CHEM_INGEST)) removed = ingest_met - if(touch_met && (location == CHEM_TOUCH)) + if(touch_met && (active_metab.metabolism_class == CHEM_TOUCH)) removed = touch_met removed = min(removed, volume) max_dose = max(volume, max_dose) dose = min(dose + removed, max_dose) if(removed >= (metabolism * 0.1) || removed >= 0.1) // If there's too little chemical, don't affect the mob, just remove it - switch(location) + switch(active_metab.metabolism_class) if(CHEM_BLOOD) affect_blood(M, alien, removed) if(CHEM_INGEST) affect_ingest(M, alien, removed) if(CHEM_TOUCH) affect_touch(M, alien, removed) - if(overdose && (volume > overdose) && (location != CHEM_TOUCH)) + if(overdose && (volume > overdose) && (active_metab.metabolism_class != CHEM_TOUCH)) overdose(M, alien, removed) remove_self(removed) return @@ -95,7 +102,7 @@ return /datum/reagent/proc/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) - affect_blood(M, alien, removed * 0.5) + M.bloodstr.add_reagent(id, removed) return /datum/reagent/proc/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm index 072022cc29..8644e4e66d 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm @@ -1,5 +1,5 @@ /datum/reagent/blood - data = new/list("donor" = null, "viruses" = null, "species" = "Human", "blood_DNA" = null, "blood_type" = null, "blood_colour" = "#A10808", "resistances" = null, "trace_chem" = null, "antibodies" = list()) + data = new/list("donor" = null, "viruses" = null, "species" = SPECIES_HUMAN, "blood_DNA" = null, "blood_type" = null, "blood_colour" = "#A10808", "resistances" = null, "trace_chem" = null, "antibodies" = list()) name = "Blood" id = "blood" taste_description = "iron" diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm index 448077ccc5..f844407d3c 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -64,6 +64,9 @@ taste_description = "pure alcohol" reagent_state = LIQUID color = "#404030" + + ingest_met = REM + var/nutriment_factor = 0 var/strength = 10 // This is, essentially, units between stages - the lower, the stronger. Less fine tuning, more clarity. var/toxicity = 1 diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm index d355bb745f..d07480735a 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -7,6 +7,7 @@ taste_mult = 4 reagent_state = SOLID metabolism = REM * 4 + ingest_met = REM * 4 var/nutriment_factor = 30 // Per unit var/injectable = 0 color = "#664330" @@ -255,6 +256,7 @@ reagent_state = SOLID color = "#FFFFFF" overdose = REAGENTS_OVERDOSE + ingest_met = REM /datum/reagent/blackpepper name = "Black Pepper" @@ -262,6 +264,7 @@ description = "A powder ground from peppercorns. *AAAACHOOO*" taste_description = "pepper" reagent_state = SOLID + ingest_met = REM color = "#000000" /datum/reagent/enzyme @@ -281,6 +284,7 @@ taste_description = "mint" taste_mult = 1.5 reagent_state = LIQUID + ingest_met = REM color = "#B31008" /datum/reagent/frostoil/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) @@ -308,6 +312,7 @@ taste_description = "hot peppers" taste_mult = 1.5 reagent_state = LIQUID + ingest_met = REM color = "#B31008" /datum/reagent/capsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) @@ -341,6 +346,7 @@ taste_mult = 10 reagent_state = LIQUID touch_met = 50 // Get rid of it quickly + ingest_met = REM color = "#B31008" /datum/reagent/condensedcapsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) @@ -424,6 +430,7 @@ name = "Drink" id = "drink" description = "Uh, some kind of drink." + ingest_met = REM reagent_state = LIQUID color = "#E78108" var/nutrition = 0 // Per unit diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index a18dfd0ba4..c439daac29 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -266,6 +266,18 @@ user.drop_from_inventory(src) qdel(src) return + else if(istype(D, /obj/item/stack/material) && D.get_material_name() == DEFAULT_WALL_MATERIAL) + var/obj/item/stack/material/M = D + if (M.use(1)) + var/obj/item/weapon/secbot_assembly/edCLN_assembly/B = new /obj/item/weapon/secbot_assembly/edCLN_assembly + B.loc = get_turf(src) + to_chat(user, "You armed the robot frame.") + if (user.get_inactive_hand()==src) + user.remove_from_mob(src) + user.put_in_inactive_hand(B) + qdel(src) + else + to_chat(user, "You need one sheet of metal to arm the robot frame.") else if(istype(D, /obj/item/weapon/mop) || istype(D, /obj/item/weapon/soap) || istype(D, /obj/item/weapon/reagent_containers/glass/rag)) //VOREStation Edit - "Allows soap and rags to be used on buckets" if(reagents.total_volume < 1) to_chat(user, "\The [src] is empty!") @@ -273,7 +285,6 @@ reagents.trans_to_obj(D, 5) to_chat(user, "You wet \the [D] in \the [src].") playsound(loc, 'sound/effects/slosh.ogg', 25, 1) - return else return ..() diff --git a/code/modules/surgery/neck.dm b/code/modules/surgery/neck.dm new file mode 100644 index 0000000000..6cd347586b --- /dev/null +++ b/code/modules/surgery/neck.dm @@ -0,0 +1,247 @@ +//Procedures in this file: Brain-stem reattachment surgery. +////////////////////////////////////////////////////////////////////// +// BRAINSTEM SURGERY // +////////////////////////////////////////////////////////////////////// + +/datum/surgery_step/brainstem + priority = 2 + req_open = 1 + can_infect = 1 + +/datum/surgery_step/brainstem/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + if (!hasorgans(target)) + return 0 + var/obj/item/organ/external/affected = target.get_organ(target_zone) + if (!affected || (affected.robotic >= ORGAN_ROBOT) || !(affected.open >= 3)) + return 0 + return target_zone == BP_HEAD + +///////////////////////////// +// Blood Vessel Mending +///////////////////////////// + +/datum/surgery_step/brainstem/mend_vessels + priority = 1 + allowed_tools = list( + /obj/item/weapon/surgical/FixOVein = 100, + /obj/item/stack/nanopaste = 50, + /obj/item/stack/cable_coil = 40, + /obj/item/device/assembly/mousetrap = 5) + + min_duration = 80 + max_duration = 100 + +/datum/surgery_step/brainstem/mend_vessels/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 0 + +/datum/surgery_step/brainstem/mend_vessels/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] starts to mend the blood vessels on [target]'s brainstem with \the [tool].", \ + "You start to mend the blood vessels on [target]'s brainstem with \the [tool].") + ..() + +/datum/surgery_step/brainstem/mend_vessels/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] has mended the blood vessels on [target]'s brainstem with \the [tool]." , \ + " You have mended the blood vessels on [target]'s brainstem with \the [tool].",) + target.op_stage.brainstem = 1 + +/datum/surgery_step/brainstem/mend_vessels/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/obj/item/organ/external/affected = target.get_organ(target_zone) + user.visible_message("[user]'s hand slips, tearing at [target]'s brainstem with \the [tool]!" , \ + "Your hand slips, tearing at [target]'s brainstem with \the [tool]!" ) + affected.createwound(PIERCE, 10) + target.AdjustParalysis(10) + +///////////////////////////// +// Bone Drilling +///////////////////////////// + +/datum/surgery_step/brainstem/drill_vertebrae + priority = 3 //Do this instead of expanding the skull cavity + allowed_tools = list( + /obj/item/weapon/surgical/surgicaldrill = 100, + /obj/item/weapon/screwdriver = 75, + /obj/item/weapon/melee/changeling/arm_blade = 15, + /obj/item/weapon/pickaxe = 5) + + min_duration = 200 //Very. Very. Carefully. + max_duration = 300 + +/datum/surgery_step/brainstem/drill_vertebrae/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 1 + +/datum/surgery_step/brainstem/drill_vertebrae/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] starts to drill around [target]'s brainstem with \the [tool].", \ + "You start to drill around [target]'s brainstem with \the [tool].") + ..() + +/datum/surgery_step/brainstem/drill_vertebrae/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/obj/item/organ/external/affected = target.get_organ(target_zone) + user.visible_message("[user] has drilled around [target]'s brainstem with \the [tool]." , \ + " You have drilled around [target]'s brainstem with \the [tool].",) + target.AdjustParalysis(10) //We're getting Invasive here. This only ticks down when the person is alive, so it's a good side-effect for this step. Rattling the braincase with a drill is not optimal. + target.op_stage.brainstem = 2 + affected.fracture() //Does not apply damage, simply breaks it if it wasn't already. Doesn't stop a defib on its own. + +/datum/surgery_step/brainstem/drill_vertebrae/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/obj/item/organ/external/affected = target.get_organ(target_zone) + user.visible_message("[user]'s hand slips, shredding [target]'s brainstem with \the [tool]!" , \ + "Your hand slips, shredding [target]'s brainstem with \the [tool]!" ) + affected.createwound(PIERCE, 10) + target.AdjustParalysis(15) + spawn() + for(var/obj/item/organ/internal/brain/O in affected.internal_organs) + O.take_damage(rand(5,10)) + +///////////////////////////// +// Bone Cleaning +///////////////////////////// + +/datum/surgery_step/brainstem/clean_chips + priority = 3 //Do this instead of picking around for implants. + allowed_tools = list( + /obj/item/weapon/surgical/hemostat = 100, + /obj/item/weapon/wirecutters = 60, + /obj/item/weapon/melee/changeling/claw = 40) //Surprisingly, claws are kind of okay at picking things out. + + min_duration = 90 + max_duration = 120 + +/datum/surgery_step/brainstem/clean_chips/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 2 + +/datum/surgery_step/brainstem/clean_chips/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] starts to pick around [target]'s brainstem for bone chips with \the [tool].", \ + "You start to pick around [target]'s brainstem for bone chips with \the [tool].") + ..() + +/datum/surgery_step/brainstem/clean_chips/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] has cleaned around [target]'s brainstem with \the [tool]." , \ + " You have cleaned around [target]'s brainstem with \the [tool].",) + target.AdjustParalysis(10) //Still invasive. + target.op_stage.brainstem = 3 + +/datum/surgery_step/brainstem/clean_chips/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/obj/item/organ/external/affected = target.get_organ(target_zone) + user.visible_message("[user]'s hand slips, gouging [target]'s brainstem with \the [tool]!" , \ + "Your hand slips, gouging [target]'s brainstem with \the [tool]!" ) + affected.createwound(CUT, 5) + target.AdjustParalysis(10) + spawn() + for(var/obj/item/organ/internal/brain/O in affected.internal_organs) //If there's more than one... + O.take_damage(rand(1,10)) + +///////////////////////////// +// Spinal Cord Repair +///////////////////////////// + +/datum/surgery_step/brainstem/mend_cord + priority = 1 //Do this after IB. + allowed_tools = list( + /obj/item/weapon/surgical/FixOVein = 100, + /obj/item/stack/nanopaste = 50, + /obj/item/stack/cable_coil = 40, + /obj/item/device/assembly/mousetrap = 5) + + min_duration = 100 + max_duration = 200 + +/datum/surgery_step/brainstem/mend_cord/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 3 + +/datum/surgery_step/brainstem/mend_cord/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] starts to fuse [target]'s spinal cord with \the [tool].", \ + "You start to fuse [target]'s spinal cord with \the [tool].") + ..() + +/datum/surgery_step/brainstem/mend_cord/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] has fused [target]'s spinal cord with \the [tool]." , \ + " You have fused [target]'s spinal cord with \the [tool].",) + target.op_stage.brainstem = 4 + target.AdjustParalysis(5) + target.add_modifier(/datum/modifier/franken_sickness, 20 MINUTES) + +/datum/surgery_step/brainstem/mend_cord/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/obj/item/organ/external/affected = target.get_organ(target_zone) + user.visible_message("[user]'s hand slips, tearing at [target]'s spinal cord with \the [tool]!" , \ + "Your hand slips, tearing at [target]'s spinal cord with \the [tool]!" ) + affected.createwound(PIERCE, 5) + target.AdjustParalysis(20) + spawn() + for(var/obj/item/organ/internal/brain/O in affected.internal_organs) + O.take_damage(rand(5,15)) //Down to the wire. Or rather, the cord. + +///////////////////////////// +// Vertebrae repair +///////////////////////////// + +/datum/surgery_step/brainstem/mend_vertebrae + priority = 3 //Do this instead of fixing bones. + allowed_tools = list( + /obj/item/weapon/surgical/bonegel = 100, + /obj/item/stack/nanopaste = 50, + /obj/item/weapon/tape_roll = 5) + + min_duration = 100 + max_duration = 160 + +/datum/surgery_step/brainstem/mend_vertebrae/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 4 + +/datum/surgery_step/brainstem/mend_vertebrae/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] starts to mend [target]'s opened vertebrae with \the [tool].", \ + "You start to mend [target]'s opened vertebrae with \the [tool].") + ..() + +/datum/surgery_step/brainstem/mend_vertebrae/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] has mended [target]'s vertebrae with \the [tool]." , \ + " You have mended [target]'s vertebrae with \the [tool].",) + target.can_defib = 1 + target.op_stage.brainstem = 5 + +/datum/surgery_step/brainstem/mend_vertebrae/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/obj/item/organ/external/affected = target.get_organ(target_zone) + user.visible_message("[user]'s hand slips, tearing at [target]'s spinal cord with \the [tool]!" , \ + "Your hand slips, tearing at [target]'s spinal cord with \the [tool]!" ) + affected.createwound(PIERCE, 5) + target.AdjustParalysis(15) + spawn() + for(var/obj/item/organ/internal/brain/O in affected.internal_organs) + O.take_damage(rand(1,10)) + +///////////////////////////// +// Realign tissues +///////////////////////////// + +/datum/surgery_step/brainstem/realign_tissue + priority = 3 //Do this instead of searching for objects in the skull. + allowed_tools = list( + /obj/item/weapon/surgical/hemostat = 100, + /obj/item/weapon/wirecutters = 60, + /obj/item/weapon/melee/changeling/claw = 20) //Claws. Good for digging, not so much for moving. + + min_duration = 90 + max_duration = 120 + +/datum/surgery_step/brainstem/realign_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 5 + +/datum/surgery_step/brainstem/realign_tissue/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] starts to realign the tissues in [target]'s skull with \the [tool].", \ + "You start to realign the tissues in [target]'s skull with \the [tool].") + ..() + +/datum/surgery_step/brainstem/realign_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] has realigned the tissues in [target]'s skull back into place with \the [tool]." , \ + " You have realigned the tissues in [target]'s skull back into place with \the [tool].",) + target.AdjustParalysis(5) //I n v a s i v e + target.op_stage.brainstem = 0 //The cycle begins anew. + +/datum/surgery_step/brainstem/realign_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/obj/item/organ/external/affected = target.get_organ(target_zone) + user.visible_message("[user]'s hand slips, gouging [target]'s brainstem with \the [tool]!" , \ + "Your hand slips, gouging [target]'s brainstem with \the [tool]!" ) + affected.createwound(CUT, 5) + target.AdjustParalysis(30) + spawn() + for(var/obj/item/organ/internal/brain/O in affected.internal_organs) + O.take_damage(rand(1,10)) diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 1dac70fea5..b06221e5c9 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -163,6 +163,7 @@ /datum/surgery_status/ var/eyes = 0 var/face = 0 + var/brainstem = 0 var/head_reattach = 0 var/current_organ = "organ" var/list/in_progress = list() \ No newline at end of file diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 7bd11955e3..13dc84f0e4 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -303,7 +303,7 @@ usr << "You install [C] in [src]." /obj/vehicle/proc/remove_cell(var/mob/living/carbon/human/H) - if(mechanical) + if(!mechanical) return if(!cell) return diff --git a/code/modules/virus2/disease2.dm b/code/modules/virus2/disease2.dm index fbe5123b2e..1b8ab86fd6 100644 --- a/code/modules/virus2/disease2.dm +++ b/code/modules/virus2/disease2.dm @@ -10,7 +10,7 @@ var/list/datum/disease2/effectholder/effects = list() var/antigen = list() // 16 bits describing the antigens, when one bit is set, a cure with that bit can dock here var/max_stage = 4 - var/list/affected_species = list("Human","Unathi","Skrell","Tajara") + var/list/affected_species = list(SPECIES_HUMAN,SPECIES_UNATHI,SPECIES_SKRELL,SPECIES_TAJ) var/resistance = 10 // % chance a disease will resist cure, up to 100 /datum/disease2/disease/New() diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index 51774ecfac..838ea5f0ed 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -441,7 +441,7 @@ /datum/disease2/effect/hair/activate(var/mob/living/carbon/mob,var/multiplier) if(istype(mob, /mob/living/carbon/human)) var/mob/living/carbon/human/H = mob - if(H.species.name == "Human" && !(H.h_style == "Bald") && !(H.h_style == "Balding Hair")) + if(H.species.name == SPECIES_HUMAN && !(H.h_style == "Bald") && !(H.h_style == "Balding Hair")) H << "Your hair starts to fall out in clumps..." spawn(50) H.h_style = "Balding Hair" diff --git a/code/modules/xenobio/items/extracts.dm b/code/modules/xenobio/items/extracts.dm index 8c05faa919..6d472b5a09 100644 --- a/code/modules/xenobio/items/extracts.dm +++ b/code/modules/xenobio/items/extracts.dm @@ -565,7 +565,7 @@ S.enrage() for(var/mob/living/carbon/human/H in view(get_turf(holder.my_atom))) - if(H.species.name == "Promethean") + if(H.species.name == SPECIES_PROMETHEAN) H.add_modifier(/datum/modifier/berserk, 30 SECONDS) to_chat(H, "An intense wave of rage is felt from inside, but you remain in control of yourself.") diff --git a/code/modules/xenobio/items/weapons.dm b/code/modules/xenobio/items/weapons.dm index ec64773cd3..8fb5f9eea6 100644 --- a/code/modules/xenobio/items/weapons.dm +++ b/code/modules/xenobio/items/weapons.dm @@ -24,7 +24,7 @@ // Prometheans. if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.species && H.species.name == "Promethean" && status) + if(H.species && H.species.name == SPECIES_PROMETHEAN && status) var/agony_to_apply = 60 - agonyforce H.apply_damage(agony_to_apply, HALLOSS) ..() @@ -115,7 +115,7 @@ // Prometheans. if(ishuman(L)) var/mob/living/carbon/human/H = L - if(H.species && H.species.name == "Promethean") + if(H.species && H.species.name == SPECIES_PROMETHEAN) if(agony == initial(agony)) agony = round((14 * agony) - agony) //60-4 = 56, 56 / 4 = 14. Prior was flat 60 - agony of the beam to equate to 60. ..() diff --git a/code/stylesheet.dm b/code/stylesheet.dm index fd861355d0..7c595b923f 100644 --- a/code/stylesheet.dm +++ b/code/stylesheet.dm @@ -91,6 +91,7 @@ h1.alert, h2.alert {color: #000000;} .alien {color: #543354;} .tajaran {color: #803B56;} .tajaran_signlang {color: #941C1C;} +.akhani {color: #AC398C;} .skrell {color: #00B0B3;} .skrellfar {color: #70FCFF;} .soghun {color: #228B22;} diff --git a/html/changelog.html b/html/changelog.html index 2abc0022b4..1b54f6e327 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -53,6 +53,27 @@ -->
+

05 March 2018

+

Anewbe updated:

+ +

Mechoid updated:

+ +

Nerezza updated:

+ +

PrismaticGynoid updated:

+ +

28 February 2018

Atermonera updated: