diff --git a/.travis.yml b/.travis.yml index 043755d6b93..566778c4c86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ sudo: false env: BYOND_MAJOR="509" BYOND_MINOR="1318" - MACRO_COUNT=1004 + MACRO_COUNT=996 cache: directories: diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm index faefa64883d..1905c35e4cc 100644 --- a/code/ATMOSPHERICS/components/unary/cold_sink.dm +++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm @@ -24,6 +24,10 @@ /obj/machinery/atmospherics/unary/freezer/New() ..() initialize_directions = dir + +/obj/machinery/atmospherics/unary/freezer/map/New() + ..() + circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/capacitor(src) diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm index aa51d9669f0..302beb6baf4 100644 --- a/code/ATMOSPHERICS/components/unary/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary/heat_source.dm @@ -25,6 +25,9 @@ ..() initialize_directions = dir +/obj/machinery/atmospherics/unary/heater/map/New() + ..() + circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/capacitor(src) diff --git a/code/__defines/chemistry.dm b/code/__defines/chemistry.dm index 4fbdebf6f11..31f0233b238 100644 --- a/code/__defines/chemistry.dm +++ b/code/__defines/chemistry.dm @@ -24,6 +24,7 @@ #define IS_TAJARA 5 #define IS_XENOS 6 #define IS_TESHARI 7 +#define IS_SLIME 8 #define CE_STABLE "stable" // Inaprovaline #define CE_ANTIBIOTIC "antibiotic" // Spaceacilin diff --git a/code/__defines/damage_organs.dm b/code/__defines/damage_organs.dm index 09931cb622b..89b01a699b6 100644 --- a/code/__defines/damage_organs.dm +++ b/code/__defines/damage_organs.dm @@ -9,6 +9,7 @@ #define CUT "cut" #define BRUISE "bruise" +#define PIERCE "pierce" #define STUN "stun" #define WEAKEN "weaken" @@ -34,11 +35,9 @@ #define ORGAN_BLEEDING (1<<1) #define ORGAN_BROKEN (1<<2) #define ORGAN_DESTROYED (1<<3) -#define ORGAN_ROBOT (1<<4) -#define ORGAN_SPLINTED (1<<5) -#define ORGAN_DEAD (1<<6) -#define ORGAN_MUTATED (1<<7) -#define ORGAN_ASSISTED (1<<8) +#define ORGAN_SPLINTED (1<<4) +#define ORGAN_DEAD (1<<5) +#define ORGAN_MUTATED (1<<6) #define DROPLIMB_EDGE 0 #define DROPLIMB_BLUNT 1 @@ -47,6 +46,9 @@ // Damage above this value must be repaired with surgery. #define ROBOLIMB_SELF_REPAIR_CAP 30 +#define ORGAN_ASSISTED 1 +#define ORGAN_ROBOT 2 + //Germs and infections. #define GERM_LEVEL_AMBIENT 110 // Maximum germ level you can reach by standing still. #define GERM_LEVEL_MOVE_CAP 200 // Maximum germ level you can reach by running around. diff --git a/code/__defines/gamemode.dm b/code/__defines/gamemode.dm index 815c55b2ecc..fc2d16ea636 100644 --- a/code/__defines/gamemode.dm +++ b/code/__defines/gamemode.dm @@ -18,7 +18,7 @@ #define BE_ALIEN 0x40 #define BE_AI 0x80 #define BE_CULTIST 0x100 -#define BE_MONKEY 0x200 +#define BE_RENEGADE 0x200 #define BE_NINJA 0x400 #define BE_RAIDER 0x800 #define BE_PLANT 0x1000 @@ -37,7 +37,7 @@ var/list/be_special_flags = list( "Xenomorph" = BE_ALIEN, "Positronic Brain" = BE_AI, "Cultist" = BE_CULTIST, - "Monkey" = BE_MONKEY, + "Renegade" = BE_RENEGADE, "Ninja" = BE_NINJA, "Raider" = BE_RAIDER, "Diona" = BE_PLANT, diff --git a/code/__defines/machinery.dm b/code/__defines/machinery.dm index eaa0b7d2a9f..1f65364e1ae 100644 --- a/code/__defines/machinery.dm +++ b/code/__defines/machinery.dm @@ -27,21 +27,21 @@ var/global/defer_powernet_rebuild = 0 // True if net rebuild will be called #define AI_CAMERA_LUMINOSITY 6 // Camera networks -#define NETWORK_CRESCENT "Crescent" -#define NETWORK_CAFE_DOCK "Cafe Dock" +#define NETWORK_CRESCENT "Spaceport" +// #define NETWORK_CAFE_DOCK "Cafe Dock" #define NETWORK_CARGO "Cargo" #define NETWORK_CIVILIAN "Civilian" -#define NETWORK_CIVILIAN_EAST "Civilian East" -#define NETWORK_CIVILIAN_WEST "Civilian West" +// #define NETWORK_CIVILIAN_EAST "Civilian East" +// #define NETWORK_CIVILIAN_WEST "Civilian West" #define NETWORK_COMMAND "Command" #define NETWORK_ENGINE "Engine" #define NETWORK_ENGINEERING "Engineering" #define NETWORK_ENGINEERING_OUTPOST "Engineering Outpost" #define NETWORK_ERT "ZeEmergencyResponseTeam" -#define NETWORK_EXODUS "Northern Star" +#define NETWORK_EXODUS station_short #define NETWORK_MEDICAL "Medical" #define NETWORK_MERCENARY "MercurialNet" -#define NETWORK_MINE "MINE" +#define NETWORK_MINE "Mining Outpost" #define NETWORK_NORTHERN_STAR "Northern Star" #define NETWORK_RESEARCH "Research" #define NETWORK_RESEARCH_OUTPOST "Research Outpost" diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index e9f44499a4a..4a84b660832 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -38,24 +38,37 @@ #define LIFE_HUD 10 // STATUS_HUD that only reports dead or alive //some colors -#define COLOR_WHITE "#FFFFFF" -#define COLOR_SILVER "#C0C0C0" -#define COLOR_GRAY "#808080" -#define COLOR_BLACK "#000000" -#define COLOR_RED "#FF0000" -#define COLOR_MAROON "#800000" -#define COLOR_YELLOW "#FFFF00" -#define COLOR_OLIVE "#808000" -#define COLOR_LIME "#00FF00" -#define COLOR_GREEN "#008000" -#define COLOR_CYAN "#00FFFF" -#define COLOR_TEAL "#008080" -#define COLOR_BLUE "#0000FF" -#define COLOR_NAVY "#000080" -#define COLOR_PINK "#FF00FF" -#define COLOR_PURPLE "#800080" -#define COLOR_ORANGE "#FF9900" -#define COLOR_LUMINOL "#66FFFF" +#define COLOR_WHITE "#FFFFFF" +#define COLOR_SILVER "#C0C0C0" +#define COLOR_GRAY "#808080" +#define COLOR_BLACK "#000000" +#define COLOR_RED "#FF0000" +#define COLOR_MAROON "#800000" +#define COLOR_YELLOW "#FFFF00" +#define COLOR_OLIVE "#808000" +#define COLOR_LIME "#00FF00" +#define COLOR_GREEN "#008000" +#define COLOR_CYAN "#00FFFF" +#define COLOR_TEAL "#008080" +#define COLOR_BLUE "#0000FF" +#define COLOR_NAVY "#000080" +#define COLOR_PINK "#FF00FF" +#define COLOR_PURPLE "#800080" +#define COLOR_ORANGE "#FF9900" +#define COLOR_LUMINOL "#66FFFF" +#define COLOR_BEIGE "#CEB689" +#define COLOR_BLUE_GRAY "#6A97B0" +#define COLOR_BROWN "#B19664" +#define COLOR_DARK_BROWN "#917448" +#define COLOR_DARK_ORANGE "#B95A00" +#define COLOR_GREEN_GRAY "#8DAF6A" +#define COLOR_RED_GRAY "#AA5F61" +#define COLOR_PALE_BLUE_GRAY "#8BBBD5" +#define COLOR_PALE_GREEN_GRAY "#AED18B" +#define COLOR_PALE_RED_GRAY "#CC9090" +#define COLOR_PALE_PURPLE_GRAY "#BDA2BA" +#define COLOR_PURPLE_GRAY "#A2819E" + // Shuttles. // These define the time taken for the shuttle to get to the space station, and the time before it leaves again. @@ -78,10 +91,10 @@ // Setting this much higher than 1024 could allow spammers to DOS the server easily. #define MAX_MESSAGE_LEN 1024 -#define MAX_PAPER_MESSAGE_LEN 3072 -#define MAX_BOOK_MESSAGE_LEN 9216 +#define MAX_PAPER_MESSAGE_LEN 6144 +#define MAX_BOOK_MESSAGE_LEN 12288 #define MAX_LNAME_LEN 64 -#define MAX_NAME_LEN 26 +#define MAX_NAME_LEN 52 // Event defines. #define EVENT_LEVEL_MUNDANE 1 @@ -143,19 +156,6 @@ #define PROJECTILE_CONTINUE -1 //if the projectile should continue flying after calling bullet_act() #define PROJECTILE_FORCE_MISS -2 //if the projectile should treat the attack as a miss (suppresses attack and admin logs) - only applies to mobs. -// Custom colors -#define COLOR_BEIGE "#CEB689" -#define COLOR_BLUE_GRAY "#6A97B0" -#define COLOR_BROWN "#B19664" -#define COLOR_DARK_BROWN "#917448" -#define COLOR_DARK_ORANGE "#B95A00" -#define COLOR_GREEN_GRAY "#8DAF6A" -#define COLOR_RED_GRAY "#AA5F61" -#define COLOR_PALE_BLUE_GRAY "#8BBBD5" -#define COLOR_PALE_GREEN_GRAY "#AED18B" -#define COLOR_PALE_RED_GRAY "#CC9090" -#define COLOR_PALE_PURPLE_GRAY "#BDA2BA" -#define COLOR_PURPLE_GRAY "#A2819E" // Vending stuff #define CAT_NORMAL 1 diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index 0d1a04d4e22..4bc19b6ca3c 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -13,7 +13,6 @@ #define GODMODE 0x1000 #define FAKEDEATH 0x2000 // Replaces stuff like changeling.changeling_fakedeath. #define DISFIGURED 0x4000 // Set but never checked. Remove this sometime and replace occurences with the appropriate organ code -#define XENO_HOST 0x8000 // Tracks whether we're gonna be a baby alien's mummy. // Grab levels. #define GRAB_PASSIVE 1 @@ -136,9 +135,15 @@ #define INCAPACITATION_RESTRAINED 1 #define INCAPACITATION_BUCKLED_PARTIALLY 2 #define INCAPACITATION_BUCKLED_FULLY 4 +#define INCAPACITATION_STUNNED 8 +#define INCAPACITATION_FORCELYING 16 //needs a better name - represents being knocked down BUT still conscious. +#define INCAPACITATION_KNOCKOUT 32 + #define INCAPACITATION_DEFAULT (INCAPACITATION_RESTRAINED|INCAPACITATION_BUCKLED_FULLY) -#define INCAPACITATION_ALL (INCAPACITATION_RESTRAINED|INCAPACITATION_BUCKLED_PARTIALLY|INCAPACITATION_BUCKLED_FULLY) +#define INCAPACITATION_KNOCKDOWN (INCAPACITATION_KNOCKOUT|INCAPACITATION_FORCELYING) +#define INCAPACITATION_DISABLED (INCAPACITATION_KNOCKDOWN|INCAPACITATION_STUNNED) +#define INCAPACITATION_ALL (~INCAPACITATION_NONE) // Bodyparts and organs. #define O_MOUTH "mouth" diff --git a/code/__defines/species_languages.dm b/code/__defines/species_languages.dm index 2dec4406a46..143c7aa251f 100644 --- a/code/__defines/species_languages.dm +++ b/code/__defines/species_languages.dm @@ -8,9 +8,9 @@ // unused: 0x8000 - higher than this will overflow // Species spawn flags -#define IS_WHITELISTED 0x1 // Must be whitelisted to play. -#define CAN_JOIN 0x2 // Species is selectable in chargen. -#define IS_RESTRICTED 0x4 // Is not a core/normally playable species. (castes, mutantraces) +#define SPECIES_IS_WHITELISTED 0x1 // Must be whitelisted to play. +#define SPECIES_IS_RESTRICTED 0x2 // Is not a core/normally playable species. (castes, mutantraces) +#define SPECIES_CAN_JOIN 0x4 // Species is selectable in chargen. // Species appearance flags #define HAS_SKIN_TONE 0x1 // Skin tone selectable in chargen. (0-255) @@ -19,6 +19,7 @@ #define HAS_UNDERWEAR 0x8 // Underwear is drawn onto the mob icon. #define HAS_EYE_COLOR 0x10 // Eye colour selectable in chargen. (RGB) #define HAS_HAIR_COLOR 0x20 // Hair colour selectable in chargen. (RGB) +#define RADIATION_GLOWS 0x40 // Radiation causes this character to glow. // Languages. #define LANGUAGE_SOL_COMMON "Sol Common" @@ -29,6 +30,8 @@ #define LANGUAGE_ROOTSPEAK "Rootspeak" #define LANGUAGE_TRADEBAND "Tradeband" #define LANGUAGE_GUTTER "Gutter" +#define LANGUAGE_SCHECHI "Schechi" +#define LANGUAGE_CULT "Cult" // Language flags. #define WHITELISTED 1 // Language is available if the speaker is whitelisted. diff --git a/code/_helpers/game.dm b/code/_helpers/game.dm index 06b277257f1..d5a7b1ed46e 100644 --- a/code/_helpers/game.dm +++ b/code/_helpers/game.dm @@ -248,6 +248,34 @@ . |= M // Since we're already looping through mobs, why bother using |= ? This only slows things down. return . +/proc/get_mobs_and_objs_in_view_fast(var/turf/T, var/range) + var/list/results = list("objs" = list(), "mobs" = list()) + + var/list/hear = dview(range,T,INVISIBILITY_MAXIMUM) + var/list/hearturfs = list() + + for(var/I in hear) + if(ismob(I)) + var/mob/M = I + results["mobs"] += M + hearturfs += M.locs[1] + else if(isobj(I)) + var/obj/O = I + results["objs"] += I + hearturfs += O.locs[1] + + + for(var/mob/M in player_list) + if(M.stat == DEAD && M.is_preference_enabled(/datum/client_preference/ghost_ears)) + results["mobs"] |= M + continue + if(M.loc && M.locs[1] in hearturfs) + results["mobs"] |= M + + return results + + + #define SIGN(X) ((X<0)?-1:1) proc diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index 39c3a83995e..f00e97d484d 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -23,6 +23,9 @@ var/global/list/joblist = list() //list of all jobstypes, minus borg and AI var/global/list/turfs = list() //list of all turfs +#define all_genders_define_list list(MALE,FEMALE,PLURAL,NEUTER) +#define all_genders_text_list list("Male","Female","Plural","Neuter") + //Languages/species/whitelist. var/global/list/all_species[0] var/global/list/all_languages[0] @@ -191,16 +194,22 @@ var/global/list/string_slot_flags = list( language_keys[lowertext(L.key)] = L var/rkey = 0 - paths = typesof(/datum/species)-/datum/species + paths = typesof(/datum/species) for(var/T in paths) + rkey++ - var/datum/species/S = new T + + var/datum/species/S = T + if(!initial(S.name)) + continue + + S = new T S.race_key = rkey //Used in mob icon caching. all_species[S.name] = S - if(!(S.spawn_flags & IS_RESTRICTED)) + if(!(S.spawn_flags & SPECIES_IS_RESTRICTED)) playable_species += S.name - if(S.spawn_flags & IS_WHITELISTED) + if(S.spawn_flags & SPECIES_IS_WHITELISTED) whitelisted_species += S.name //Posters diff --git a/code/_helpers/names.dm b/code/_helpers/names.dm index 54a922c30dc..dbd19610e60 100644 --- a/code/_helpers/names.dm +++ b/code/_helpers/names.dm @@ -44,7 +44,7 @@ var/religion_name = null return capitalize(name) /proc/system_name() - return "Vir" + return starsys_name /proc/station_name() if (station_name) diff --git a/code/_helpers/text.dm b/code/_helpers/text.dm index 72549c9ee13..68cb5276fad 100644 --- a/code/_helpers/text.dm +++ b/code/_helpers/text.dm @@ -323,3 +323,12 @@ proc/TextPreview(var/string,var/len=40) if(48 to 57) //Numbers return 1 return 0 + +/** + * Strip out the special beyond characters for \proper and \improper + * from text that will be sent to the browser. + */ +/proc/strip_improper(var/text) + return replacetext(replacetext(text, "\proper", ""), "\improper", "") + +#define gender2text(gender) capitalize(gender) \ No newline at end of file diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index dc17e47a594..0858ebc1a40 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -137,7 +137,7 @@ Turf and target are seperate in case you want to teleport some distance from a t //Now to find a box from center location and make that our destination. for(var/turf/T in block(locate(center.x+b1xerror,center.y+b1yerror,location.z), locate(center.x+b2xerror,center.y+b2yerror,location.z) )) - if(density&&T.density) continue//If density was specified. + if(density&&(T.density||T.contains_dense_objects())) continue//If density was specified. if(T.x>world.maxx || T.x<1) continue//Don't want them to teleport off the map. if(T.y>world.maxy || T.y<1) continue destination_list += T @@ -146,7 +146,7 @@ Turf and target are seperate in case you want to teleport some distance from a t else return else//Same deal here. - if(density&&destination.density) return + if(density&&(destination.density||destination.contains_dense_objects())) return if(destination.x>world.maxx || destination.x<1) return if(destination.y>world.maxy || destination.y<1) return else return @@ -1039,10 +1039,9 @@ proc/get_mob_with_client_list() //gets the turf the atom is located in (or itself, if it is a turf). //returns null if the atom is not in a turf. -/proc/get_turf(atom/A) - if(!istype(A)) return - for(A, A && !isturf(A), A=A.loc); - return A +/proc/get_turf(atom/movable/A) + if(isturf(A)) return A + if(A && A.locs.len) return A.locs[1] /proc/get(atom/loc, type) while(loc) @@ -1310,7 +1309,7 @@ var/mob/dview/dview_mob = new // call to generate a stack trace and print to runtime logs /proc/crash_with(msg) CRASH(msg) - + /proc/screen_loc2turf(scr_loc, turf/origin) var/tX = splittext(scr_loc, ",") var/tY = splittext(tX[2], ":") @@ -1321,4 +1320,4 @@ var/mob/dview/dview_mob = new tX = max(1, min(world.maxx, origin.x + (text2num(tX) - (world.view + 1)))) tY = max(1, min(world.maxy, origin.y + (text2num(tY) - (world.view + 1)))) return locate(tX, tY, tZ) - + diff --git a/code/_macros.dm b/code/_macros.dm index 7e8d581b90f..e8caac83450 100644 --- a/code/_macros.dm +++ b/code/_macros.dm @@ -7,6 +7,8 @@ #define isanimal(A) istype(A, /mob/living/simple_animal) +#define isairlock(A) istype(A, /obj/machinery/door/airlock) + #define isbrain(A) istype(A, /mob/living/carbon/brain) #define iscarbon(A) istype(A, /mob/living/carbon) diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index dfb6de5e911..c5c48dbbf2c 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -121,9 +121,9 @@ /obj/machinery/door/airlock/AIShiftClick() // Opens and closes doors! if(density) - Topic(src, list("src"= "\ref[src]", "command"="open", "activate" = "1"), 1) // 1 meaning no window (consistency!) + Topic(src, list("command"="open", "activate" = "1")) else - Topic(src, list("src"= "\ref[src]", "command"="open", "activate" = "0"), 1) + Topic(src, list("command"="open", "activate" = "0")) return 1 /atom/proc/AICtrlClick() @@ -131,17 +131,17 @@ /obj/machinery/door/airlock/AICtrlClick() // Bolts doors if(locked) - Topic(src, list("src"= "\ref[src]", "command"="bolts", "activate" = "0"), 1)// 1 meaning no window (consistency!) + Topic(src, list("command"="bolts", "activate" = "0")) else - Topic(src, list("src"= "\ref[src]", "command"="bolts", "activate" = "1"), 1) + Topic(src, list("command"="bolts", "activate" = "1")) return 1 /obj/machinery/power/apc/AICtrlClick() // turns off/on APCs. - Topic(src, list("src"= "\ref[src]", "breaker"="1"), 1) // 1 meaning no window (consistency!) + Topic(src, list("breaker"="1")) return 1 /obj/machinery/turretid/AICtrlClick() //turns off/on Turrets - Topic(src, list("src"= "\ref[src]", "command"="enable", "value"="[!enabled]"), 1) // 1 meaning no window (consistency!) + Topic(src, list("command"="enable", "value"="[!enabled]")) return 1 /atom/proc/AIAltClick(var/atom/A) @@ -150,14 +150,14 @@ /obj/machinery/door/airlock/AIAltClick() // Electrifies doors. if(!electrified_until) // permanent shock - Topic(src, list("src"= "\ref[src]", "command"="electrify_permanently", "activate" = "1"), 1) // 1 meaning no window (consistency!) + Topic(src, list("command"="electrify_permanently", "activate" = "1")) else // disable/6 is not in Topic; disable/5 disables both temporary and permanent shock - Topic(src, list("src"= "\ref[src]", "command"="electrify_permanently", "activate" = "0"), 1) + Topic(src, list("command"="electrify_permanently", "activate" = "0")) return 1 /obj/machinery/turretid/AIAltClick() //toggles lethal on turrets - Topic(src, list("src"= "\ref[src]", "command"="lethal", "value"="[!lethal]"), 1) // 1 meaning no window (consistency!) + Topic(src, list("command"="lethal", "value"="[!lethal]")) return 1 /atom/proc/AIMiddleClick(var/mob/living/silicon/user) @@ -169,9 +169,9 @@ return if(!src.lights) - Topic(src, list("src"= "\ref[src]", "command"="lights", "activate" = "1"), 1) // 1 meaning no window (consistency!) + Topic(src, list("command"="lights", "activate" = "1")) else - Topic(src, list("src"= "\ref[src]", "command"="lights", "activate" = "0"), 1) + Topic(src, list("command"="lights", "activate" = "0")) return 1 // diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 9b729d1d7c3..d131ddd6d31 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -103,10 +103,6 @@ // A is your location but is not a turf; or is on you (backpack); or is on something on you (box in backpack); sdepth is needed here because contents depth does not equate inventory storage depth. var/sdepth = A.storage_depth(src) if((!isturf(A) && A == loc) || (sdepth != -1 && sdepth <= 1)) - // faster access to objects already on you - if(A.loc != src) - setMoveCooldown(10) //getting something out of a backpack - if(W) var/resolved = W.resolve_attackby(A, src) if(!resolved && A && W) @@ -127,8 +123,6 @@ sdepth = A.storage_depth_turf() if(isturf(A) || isturf(A.loc) || (sdepth != -1 && sdepth <= 1)) if(A.Adjacent(src)) // see adjacent.dm - setMoveCooldown(5) - if(W) // Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example) var/resolved = W.resolve_attackby(A,src) @@ -198,15 +192,8 @@ if((LASER in mutations) && a_intent == I_HURT) LaserEyes(A) // moved into a proc below else if(TK in mutations) - switch(get_dist(src,A)) - if(1 to 5) // not adjacent may mean blocked by window - setMoveCooldown(2) - if(5 to 7) - setMoveCooldown(5) - if(8 to tk_maxrange) - setMoveCooldown(10) - else - return + if(get_dist(src, A) > tk_maxrange) + return A.attack_tk(src) /* Restrained ClickOn diff --git a/code/_onclick/hud/ai.dm b/code/_onclick/hud/ai.dm index 44c2a762bba..37d9616ea5b 100644 --- a/code/_onclick/hud/ai.dm +++ b/code/_onclick/hud/ai.dm @@ -40,9 +40,9 @@ using.layer = SCREEN_LAYER adding += using -//Crew Monitorting +//Crew Monitoring using = new /obj/screen() - using.name = "Crew Monitorting" + using.name = "Crew Monitoring" using.icon = 'icons/mob/screen_ai.dmi' using.icon_state = "crew_monitor" using.screen_loc = ui_ai_crew_monitor diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index a73779ef722..66d453ac36d 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -256,7 +256,7 @@ datum/hud/New(mob/owner) if(ishuman(mymob)) human_hud(ui_style, ui_color, ui_alpha, mymob) // Pass the player the UI style chosen in preferences else if(isrobot(mymob)) - robot_hud() + robot_hud(ui_style, ui_color, ui_alpha, mymob) else if(isbrain(mymob)) brain_hud(ui_style) else if(isalien(mymob)) diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index a272ba83aa0..c6783e7bf76 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -1,7 +1,20 @@ var/obj/screen/robot_inventory +/* +/mob/living/silicon/robot/instantiate_hud(var/datum/hud/HUD, var/ui_style, var/ui_color, var/ui_alpha) + HUD.robot_hud(ui_style, ui_color, ui_alpha, src)*/ +/datum/hud/proc/robot_hud(ui_style='icons/mob/screen1_robot.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255, var/mob/living/silicon/robot/target) +/* var/datum/hud_data/hud_data + if(!istype(target)) + hud_data = new() -/datum/hud/proc/robot_hud() + if(hud_data.icon) + ui_style = hud_data.icon*/ + + if(ui_style == 'icons/mob/screen/minimalist.dmi') + ui_style = 'icons/mob/screen1_robot_minimalist.dmi' + else + ui_style = 'icons/mob/screen1_robot.dmi' src.adding = list() src.other = list() @@ -12,7 +25,9 @@ var/obj/screen/robot_inventory using = new /obj/screen() using.name = "radio" using.set_dir(SOUTHWEST) - using.icon = 'icons/mob/screen1_robot.dmi' + using.icon = ui_style + using.color = ui_color + using.alpha = ui_alpha using.icon_state = "radio" using.screen_loc = ui_movi using.layer = 20 @@ -23,7 +38,9 @@ var/obj/screen/robot_inventory using = new /obj/screen() using.name = "module1" using.set_dir(SOUTHWEST) - using.icon = 'icons/mob/screen1_robot.dmi' + using.icon = ui_style + using.color = ui_color + using.alpha = ui_alpha using.icon_state = "inv1" using.screen_loc = ui_inv1 using.layer = 20 @@ -33,7 +50,9 @@ var/obj/screen/robot_inventory using = new /obj/screen() using.name = "module2" using.set_dir(SOUTHWEST) - using.icon = 'icons/mob/screen1_robot.dmi' + using.icon = ui_style + using.color = ui_color + using.alpha = ui_alpha using.icon_state = "inv2" using.screen_loc = ui_inv2 using.layer = 20 @@ -43,7 +62,9 @@ var/obj/screen/robot_inventory using = new /obj/screen() using.name = "module3" using.set_dir(SOUTHWEST) - using.icon = 'icons/mob/screen1_robot.dmi' + using.icon = ui_style + using.color = ui_color + using.alpha = ui_alpha using.icon_state = "inv3" using.screen_loc = ui_inv3 using.layer = 20 @@ -56,7 +77,8 @@ var/obj/screen/robot_inventory using = new /obj/screen() using.name = "act_intent" using.set_dir(SOUTHWEST) - using.icon = 'icons/mob/screen1_robot.dmi' + using.icon = ui_style + using.alpha = ui_alpha using.icon_state = mymob.a_intent using.screen_loc = ui_acti using.layer = 20 @@ -65,47 +87,60 @@ var/obj/screen/robot_inventory //Cell mymob:cells = new /obj/screen() - mymob:cells.icon = 'icons/mob/screen1_robot.dmi' + mymob:cells.icon = ui_style mymob:cells.icon_state = "charge-empty" + mymob:cells.alpha = ui_alpha mymob:cells.name = "cell" mymob:cells.screen_loc = ui_toxin + src.other += mymob:cells //Health mymob.healths = new /obj/screen() - mymob.healths.icon = 'icons/mob/screen1_robot.dmi' + mymob.healths.icon = ui_style mymob.healths.icon_state = "health0" + mymob.healths.alpha = ui_alpha mymob.healths.name = "health" mymob.healths.screen_loc = ui_borg_health + src.other += mymob.healths //Installed Module mymob.hands = new /obj/screen() - mymob.hands.icon = 'icons/mob/screen1_robot.dmi' + mymob.hands.icon = ui_style mymob.hands.icon_state = "nomod" + mymob.hands.alpha = ui_alpha mymob.hands.name = "module" mymob.hands.screen_loc = ui_borg_module + src.other += mymob.hands //Module Panel using = new /obj/screen() using.name = "panel" - using.icon = 'icons/mob/screen1_robot.dmi' + using.icon = ui_style using.icon_state = "panel" + using.alpha = ui_alpha using.screen_loc = ui_borg_panel using.layer = 19 src.adding += using //Store mymob.throw_icon = new /obj/screen() - mymob.throw_icon.icon = 'icons/mob/screen1_robot.dmi' + mymob.throw_icon.icon = ui_style mymob.throw_icon.icon_state = "store" + mymob.throw_icon.alpha = ui_alpha + mymob.throw_icon.color = ui_color mymob.throw_icon.name = "store" mymob.throw_icon.screen_loc = ui_borg_store + src.other += mymob.throw_icon //Inventory robot_inventory = new /obj/screen() robot_inventory.name = "inventory" - robot_inventory.icon = 'icons/mob/screen1_robot.dmi' + robot_inventory.icon = ui_style robot_inventory.icon_state = "inventory" + robot_inventory.alpha = ui_alpha + robot_inventory.color = ui_color robot_inventory.screen_loc = ui_borg_inventory + src.other += robot_inventory //Temp mymob.bodytemp = new /obj/screen() @@ -113,24 +148,30 @@ var/obj/screen/robot_inventory mymob.bodytemp.name = "body temperature" mymob.bodytemp.screen_loc = ui_temp - mymob.oxygen = new /obj/screen() - mymob.oxygen.icon = 'icons/mob/screen1_robot.dmi' + mymob.oxygen.icon = ui_style mymob.oxygen.icon_state = "oxy0" + mymob.oxygen.alpha = ui_alpha mymob.oxygen.name = "oxygen" mymob.oxygen.screen_loc = ui_oxygen + src.other += mymob.oxygen mymob.fire = new /obj/screen() - mymob.fire.icon = 'icons/mob/screen1_robot.dmi' + mymob.fire.icon = ui_style mymob.fire.icon_state = "fire0" + mymob.fire.alpha = ui_alpha mymob.fire.name = "fire" mymob.fire.screen_loc = ui_fire + src.other += mymob.fire mymob.pullin = new /obj/screen() - mymob.pullin.icon = 'icons/mob/screen1_robot.dmi' + mymob.pullin.icon = ui_style mymob.pullin.icon_state = "pull0" + mymob.pullin.alpha = ui_alpha + mymob.pullin.color = ui_color mymob.pullin.name = "pull" mymob.pullin.screen_loc = ui_borg_pull + src.other += mymob.pullin mymob.blind = new /obj/screen() mymob.blind.icon = 'icons/mob/screen1_full.dmi' @@ -140,22 +181,32 @@ var/obj/screen/robot_inventory mymob.blind.layer = 0 mymob.flash = new /obj/screen() - mymob.flash.icon = 'icons/mob/screen1_robot.dmi' + mymob.flash.icon = ui_style mymob.flash.icon_state = "blank" mymob.flash.name = "flash" mymob.flash.screen_loc = ui_entire_screen mymob.flash.layer = 17 + src.other += mymob.flash mymob.zone_sel = new /obj/screen/zone_sel() - mymob.zone_sel.icon = 'icons/mob/screen1_robot.dmi' + mymob.zone_sel.icon = ui_style + mymob.zone_sel.alpha = ui_alpha mymob.zone_sel.overlays.Cut() mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]") //Handle the gun settings buttons mymob.gun_setting_icon = new /obj/screen/gun/mode(null) + mymob.gun_setting_icon.icon = ui_style + mymob.gun_setting_icon.alpha = ui_alpha mymob.item_use_icon = new /obj/screen/gun/item(null) + mymob.item_use_icon.icon = ui_style + mymob.item_use_icon.alpha = ui_alpha mymob.gun_move_icon = new /obj/screen/gun/move(null) + mymob.gun_move_icon.icon = ui_style + mymob.gun_move_icon.alpha = ui_alpha mymob.radio_use_icon = new /obj/screen/gun/radio(null) + mymob.radio_use_icon.icon = ui_style + mymob.radio_use_icon.alpha = ui_alpha mymob.client.screen = list() diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index cbb49166c0f..522db6e1c4a 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -420,7 +420,7 @@ var/mob/living/silicon/ai/AI = usr AI.toggle_camera_light() - if("Crew Monitorting") + if("Crew Monitoring") if(isAI(usr)) var/mob/living/silicon/ai/AI = usr AI.subsystem_crew_monitor() diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index c0a0cac8b3f..ac07b8d0755 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -92,7 +92,7 @@ if (powerlevel > 0 && !istype(A, /mob/living/carbon/slime)) if(ishuman(M)) var/mob/living/carbon/human/H = M - stunprob *= H.species.siemens_coefficient + stunprob *= max(H.species.siemens_coefficient,0) switch(power * 10) diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 354e3771215..d416475a27b 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -107,20 +107,11 @@ var/const/tk_maxrange = 15 return var/d = get_dist(user, target) - if(focus) d = max(d,get_dist(user,focus)) // whichever is further - switch(d) - if(0) - ; - if(1 to 5) // not adjacent may mean blocked by window - if(!proximity) - user.setMoveCooldown(2) - if(5 to 7) - user.setMoveCooldown(5) - if(8 to tk_maxrange) - user.setMoveCooldown(10) - else - user << "Your mind won't reach that far." - return + if(focus) + d = max(d, get_dist(user, focus)) // whichever is further + if(d > tk_maxrange) + user << "Your mind won't reach that far." + return if(!focus) focus_object(target, user) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index bd817baf419..d456c52e71e 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -21,7 +21,7 @@ var/list/gamemode_cache = list() var/log_pda = 0 // log pda messages var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits var/log_runtime = 0 // logs world.log to a file - var/sql_enabled = 1 // for sql switching + var/sql_enabled = 0 // for sql switching var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour var/allow_vote_restart = 0 // allow votes to restart var/ert_admin_call_only = 0 @@ -289,7 +289,7 @@ var/list/gamemode_cache = list() config.log_access = 1 if ("sql_enabled") - config.sql_enabled = text2num(value) + config.sql_enabled = 1 if ("log_say") config.log_say = 1 diff --git a/code/controllers/hooks-defs.dm b/code/controllers/hooks-defs.dm index 001372b4e3e..e330024475e 100644 --- a/code/controllers/hooks-defs.dm +++ b/code/controllers/hooks-defs.dm @@ -1,87 +1,87 @@ -/** - * Startup hook. - * Called in world.dm when the server starts. - */ -/hook/startup - -/** - * Roundstart hook. - * Called in gameticker.dm when a round starts. - */ -/hook/roundstart - -/** - * Roundend hook. - * Called in gameticker.dm when a round ends. - */ -/hook/roundend - -/** - * Death hook. - * Called in death.dm when someone dies. - * Parameters: var/mob/living/carbon/human, var/gibbed - */ -/hook/death - -/** - * Cloning hook. - * Called in cloning.dm when someone is brought back by the wonders of modern science. - * Parameters: var/mob/living/carbon/human - */ -/hook/clone - -/** - * Debrained hook. - * Called in brain_item.dm when someone gets debrained. - * Parameters: var/obj/item/organ/brain - */ -/hook/debrain - -/** - * Borged hook. - * Called in robot_parts.dm when someone gets turned into a cyborg. - * Parameters: var/mob/living/silicon/robot - */ -/hook/borgify - -/** - * Podman hook. - * Called in podmen.dm when someone is brought back as a Diona. - * Parameters: var/mob/living/carbon/alien/diona - */ -/hook/harvest_podman - -/** - * Payroll revoked hook. - * Called in Accounts_DB.dm when someone's payroll is stolen at the Accounts terminal. - * Parameters: var/datum/money_account - */ -/hook/revoke_payroll - -/** - * Account suspension hook. - * Called in Accounts_DB.dm when someone's account is suspended or unsuspended at the Accounts terminal. - * Parameters: var/datum/money_account - */ -/hook/change_account_status - -/** - * Employee reassignment hook. - * Called in card.dm when someone's card is reassigned at the HoP's desk. - * Parameters: var/obj/item/weapon/card/id - */ -/hook/reassign_employee - -/** - * Employee terminated hook. - * Called in card.dm when someone's card is terminated at the HoP's desk. - * Parameters: var/obj/item/weapon/card/id - */ -/hook/terminate_employee - -/** - * Crate sold hook. - * Called in supplyshuttle.dm when a crate is sold on the shuttle. - * Parameters: var/obj/structure/closet/crate/sold, var/area/shuttle - */ -/hook/sell_crate +/** + * Startup hook. + * Called in world.dm when the server starts. + */ +/hook/startup + +/** + * Roundstart hook. + * Called in gameticker.dm when a round starts. + */ +/hook/roundstart + +/** + * Roundend hook. + * Called in gameticker.dm when a round ends. + */ +/hook/roundend + +/** + * Death hook. + * Called in death.dm when someone dies. + * Parameters: var/mob/living/carbon/human, var/gibbed + */ +/hook/death + +/** + * Cloning hook. + * Called in cloning.dm when someone is brought back by the wonders of modern science. + * Parameters: var/mob/living/carbon/human + */ +/hook/clone + +/** + * Debrained hook. + * Called in brain_item.dm when someone gets debrained. + * Parameters: var/obj/item/organ/brain + */ +/hook/debrain + +/** + * Borged hook. + * Called in robot_parts.dm when someone gets turned into a cyborg. + * Parameters: var/mob/living/silicon/robot + */ +/hook/borgify + +/** + * Podman hook. + * Called in podmen.dm when someone is brought back as a Diona. + * Parameters: var/mob/living/carbon/alien/diona + */ +/hook/harvest_podman + +/** + * Payroll revoked hook. + * Called in Accounts_DB.dm when someone's payroll is stolen at the Accounts terminal. + * Parameters: var/datum/money_account + */ +/hook/revoke_payroll + +/** + * Account suspension hook. + * Called in Accounts_DB.dm when someone's account is suspended or unsuspended at the Accounts terminal. + * Parameters: var/datum/money_account + */ +/hook/change_account_status + +/** + * Employee reassignment hook. + * Called in card.dm when someone's card is reassigned at the HoP's desk. + * Parameters: var/obj/item/weapon/card/id + */ +/hook/reassign_employee + +/** + * Employee terminated hook. + * Called in card.dm when someone's card is terminated at the HoP's desk. + * Parameters: var/obj/item/weapon/card/id + */ +/hook/terminate_employee + +/** + * Crate sold hook. + * Called in supplyshuttle.dm when a crate is sold on the shuttle. + * Parameters: var/obj/structure/closet/crate/sold, var/area/shuttle + */ +/hook/sell_crate diff --git a/code/controllers/observer_listener/atom/observer.dm b/code/controllers/observer_listener/atom/observer.dm new file mode 100644 index 00000000000..da38580414e --- /dev/null +++ b/code/controllers/observer_listener/atom/observer.dm @@ -0,0 +1,31 @@ +#define OBSERVER_EVENT_DESTROY "OnDestroy" + +/atom + var/list/observer_events + +/atom/Destroy() + var/list/destroy_listeners = get_listener_list_from_event(OBSERVER_EVENT_DESTROY) + if(destroy_listeners) + for(var/destroy_listener in destroy_listeners) + call(destroy_listener, destroy_listeners[destroy_listener])(src) + + for(var/list/listeners in observer_events) + listeners.Cut() + + return ..() + +/atom/proc/register(var/event, var/procOwner, var/proc_call) + var/list/listeners = get_listener_list_from_event(event) + listeners[procOwner] = proc_call + +/atom/proc/unregister(var/event, var/procOwner) + var/list/listeners = get_listener_list_from_event(event) + listeners -= procOwner + +/atom/proc/get_listener_list_from_event(var/observer_event) + if(!observer_events) observer_events = list() + var/list/listeners = observer_events[observer_event] + if(!listeners) + listeners = list() + observer_events[observer_event] = listeners + return listeners diff --git a/code/controllers/observer_listener/datum/observer.dm b/code/controllers/observer_listener/datum/observer.dm new file mode 100644 index 00000000000..61f6fbf1802 --- /dev/null +++ b/code/controllers/observer_listener/datum/observer.dm @@ -0,0 +1,28 @@ +/* +#define OBSERVER_EVENT_DESTROY "OnDestroy" + +/datum + var/list/observer_events + +/datum/Destroy() + for(var/list/listeners in observer_events) + listeners.Cut() + + return ..() + +/datum/proc/register(var/event, var/procOwner, var/proc_call) + var/list/listeners = get_listener_list_from_event(event) + listeners[procOwner] = proc_call + +/datum/proc/unregister(var/event, var/procOwner) + var/list/listeners = get_listener_list_from_event(event) + listeners -= procOwner + +/datum/proc/get_listener_list_from_event(var/observer_event) + if(!observer_events) observer_events = list() + var/list/listeners = observer_events[observer_event] + if(!listeners) + listeners = list() + observer_events[observer_event] = listeners + return listeners +*/ diff --git a/code/controllers/shuttle_controller.dm b/code/controllers/shuttle_controller.dm index a97840c0677..bd3d82247c7 100644 --- a/code/controllers/shuttle_controller.dm +++ b/code/controllers/shuttle_controller.dm @@ -264,7 +264,7 @@ var/global/datum/shuttle_controller/shuttle_controller var/datum/shuttle/ferry/multidock/specops/ERT = new() ERT.location = 0 ERT.warmup_time = 10 - ERT.area_offsite = locate(/area/shuttle/specops/station) //centcom is the home station, the Northern Star is offsite + ERT.area_offsite = locate(/area/shuttle/specops/station) //centcom is the home station, the player station is offsite ERT.area_station = locate(/area/shuttle/specops/centcom) ERT.docking_controller_tag = "specops_shuttle_port" ERT.docking_controller_tag_station = "specops_shuttle_port" diff --git a/code/datums/EPv2.dm b/code/datums/EPv2.dm index f0e912fa55a..d5b85475dbf 100644 --- a/code/datums/EPv2.dm +++ b/code/datums/EPv2.dm @@ -103,25 +103,26 @@ var/global/list/all_exonet_connections = list() return null // Proc: send_message() -// Parameters: 2 (target_address - the desired address to send the message to, message - the message to send) +// Parameters: 3 (target_address - the desired address to send the message to, message - the message to send, text - the message text if message is of type "text") // Description: Sends the message to target_address, by calling receive_message() on the desired datum. -/datum/exonet_protocol/proc/send_message(var/target_address, var/message) +/datum/exonet_protocol/proc/send_message(var/target_address, var/message, var/text) if(!address) return 0 for(var/datum/exonet_protocol/exonet in all_exonet_connections) if(exonet.address == target_address) - exonet.receive_message(holder, address, message) + exonet.receive_message(holder, address, message, text) break // Proc: receive_message() -// Parameters: 3 (origin_atom - the origin datum's holder, origin_address - the address the message originated from, message - the message that was sent) +// Parameters: 4 (origin_atom - the origin datum's holder, origin_address - the address the message originated from, message - the message that was sent, +// text - the message text if message is of type "text") // Description: Called when send_message() successfully reaches the intended datum. By default, calls receive_exonet_message() on the holder atom. -/datum/exonet_protocol/proc/receive_message(var/atom/origin_atom, var/origin_address, var/message) - holder.receive_exonet_message(origin_atom, origin_address, message) +/datum/exonet_protocol/proc/receive_message(var/atom/origin_atom, var/origin_address, var/message, var/text) + holder.receive_exonet_message(origin_atom, origin_address, message, text) return // Proc: receive_exonet_message() // Parameters: 3 (origin_atom - the origin datum's holder, origin_address - the address the message originated from, message - the message that was sent) // Description: Override this to make your atom do something when a message is received. -/atom/proc/receive_exonet_message(var/atom/origin_atom, var/origin_address, var/message) +/atom/proc/receive_exonet_message(var/atom/origin_atom, var/origin_address, var/message, var/text) return diff --git a/code/datums/browser.dm b/code/datums/browser.dm index 09281bf1f72..577698532e2 100644 --- a/code/datums/browser.dm +++ b/code/datums/browser.dm @@ -28,6 +28,9 @@ height = nheight if (nref) ref = nref + // If a client exists, but they have disabled fancy windowing, disable it! + if(user && user.client && !user.client.is_preference_enabled(/datum/client_preference/browser_style)) + return add_stylesheet("common", 'html/browser/common.css') // this CSS sheet is common to all UIs /datum/browser/proc/set_title(ntitle) @@ -74,10 +77,11 @@ if (title_image) title_attributes = "class='uiTitle icon' style='background-image: url([title_image]);'" - return {" + return {" - + + [head_content] @@ -177,4 +181,4 @@ if(src && src.mob) //world << "[src] was [src.mob.machine], setting to null" src.mob.unset_machine() - return \ No newline at end of file + return diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 0d0f77a957a..cc603aa2df5 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -1,3 +1,4 @@ + /hook/startup/proc/createDatacore() data_core = new /datum/datacore() return 1 @@ -25,11 +26,11 @@ var/dat = {" @@ -186,7 +187,7 @@ G.fields["fingerprint"] = md5(H.dna.uni_identity) G.fields["p_stat"] = "Active" G.fields["m_stat"] = "Stable" - G.fields["sex"] = H.gender + G.fields["sex"] = gender2text(H.gender) G.fields["species"] = H.get_species() G.fields["home_system"] = H.home_system G.fields["citizenship"] = H.citizenship @@ -199,6 +200,7 @@ var/datum/data/record/M = CreateMedicalRecord(H.real_name, id) M.fields["b_type"] = H.b_type M.fields["b_dna"] = H.dna.unique_enzymes + M.fields["id_gender"] = gender2text(H.identifying_gender) if(H.med_record && !jobban_isbanned(H, "Records")) M.fields["notes"] = H.med_record @@ -214,7 +216,8 @@ L.fields["rank"] = H.mind.assigned_role L.fields["age"] = H.age L.fields["fingerprint"] = md5(H.dna.uni_identity) - L.fields["sex"] = H.gender + L.fields["sex"] = gender2text(H.gender) + L.fields["id_gender"] = gender2text(H.identifying_gender) L.fields["b_type"] = H.b_type L.fields["b_dna"] = H.dna.unique_enzymes L.fields["enzymes"] = H.dna.SE // Used in respawning @@ -255,8 +258,9 @@ preview_icon.Blend(E.get_icon(), ICON_OVERLAY) //Tail - if(H.species.tail) - temp = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[H.species.tail]_s") + var/use_species_tail = H.species.get_tail(H) + if(use_species_tail) + temp = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[use_species_tail]_s") preview_icon.Blend(temp, ICON_OVERLAY) // Skin tone @@ -418,7 +422,7 @@ G.fields["id"] = id G.fields["rank"] = "Unassigned" G.fields["real_rank"] = "Unassigned" - G.fields["sex"] = "Male" + G.fields["sex"] = "Unknown" G.fields["age"] = "Unknown" G.fields["fingerprint"] = "Unknown" G.fields["p_stat"] = "Active" @@ -460,6 +464,7 @@ M.fields["name"] = name M.fields["b_type"] = "AB+" M.fields["b_dna"] = md5(name) + M.fields["id_gender"] = "Unknown" M.fields["mi_dis"] = "None" M.fields["mi_dis_d"] = "No minor disabilities have been declared." M.fields["ma_dis"] = "None" diff --git a/code/datums/mind.dm b/code/datums/mind.dm index cdb8e7d15ec..824b52a2fe3 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -344,7 +344,7 @@ log_admin("[key_name_admin(usr)] has de-loyalty implanted [current].") if("add") H << "You somehow have become the recepient of a loyalty transplant, and it just activated!" - H.implant_loyalty(H, override = TRUE) + H.implant_loyalty(override = TRUE) log_admin("[key_name_admin(usr)] has loyalty implanted [current].") else else if (href_list["silicon"]) @@ -391,7 +391,7 @@ switch(href_list["common"]) if("undress") for(var/obj/item/W in current) - current.removeItem(W, force = 1) + current.drop_from_inventory(W) if("takeuplink") take_uplink() memory = null//Remove any memory they may have had. diff --git a/code/datums/recipe.dm b/code/datums/recipe.dm index 460a13f7b7a..23af6093efa 100644 --- a/code/datums/recipe.dm +++ b/code/datums/recipe.dm @@ -76,7 +76,7 @@ checklist = items.Copy() // You should really trust Copy if(istype(container, /obj/machinery)) var/obj/machinery/machine = container - for(var/obj/O in (machine.contents - machine.component_parts)) + for(var/obj/O in ((machine.contents - machine.component_parts) - machine.circuit)) if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown)) continue // Fruit is handled in check_fruit(). var/found = 0 @@ -110,7 +110,7 @@ var/obj/result_obj = new result(container) if(istype(container, /obj/machinery)) var/obj/machinery/machine = container - for (var/obj/O in ((machine.contents-result_obj)-machine.component_parts)) + for (var/obj/O in ((machine.contents-result_obj - machine.component_parts) - machine.circuit)) O.reagents.trans_to_obj(result_obj, O.reagents.total_volume) qdel(O) else @@ -128,7 +128,7 @@ var/obj/result_obj = new result(container) if(istype(container, /obj/machinery)) var/obj/machinery/machine = container - for (var/obj/O in ((machine.contents-result_obj)-machine.component_parts)) + for (var/obj/O in ((machine.contents-result_obj - machine.component_parts) - machine.circuit)) if (O.reagents) O.reagents.del_reagent("nutriment") O.reagents.update_total() diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index a2157fa39ec..aec056f7f64 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -31,46 +31,28 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/specialops name = "Special Ops supplies" - contains = list(/obj/item/weapon/storage/box/emps, - /obj/item/weapon/grenade/smokebomb, - /obj/item/weapon/grenade/smokebomb, - /obj/item/weapon/grenade/smokebomb, - /obj/item/weapon/pen/reagent/paralysis, - /obj/item/weapon/grenade/chem_grenade/incendiary) + contains = list( + /obj/item/weapon/storage/box/emps, + /obj/item/weapon/grenade/smokebomb = 3, + /obj/item/weapon/pen/reagent/paralysis, + /obj/item/weapon/grenade/chem_grenade/incendiary + ) cost = 20 containertype = /obj/structure/closet/crate containername = "Special Ops crate" group = "Security" hidden = 1 -/datum/supply_packs/forensics - name = "Auxiliary forensic tools" - contains = list(/obj/item/weapon/forensics/sample_kit, - /obj/item/weapon/forensics/sample_kit/powder, - /obj/item/weapon/storage/box/swabs, - /obj/item/weapon/storage/box/swabs, - /obj/item/weapon/storage/box/swabs, - /obj/item/device/uv_light, - /obj/item/weapon/reagent_containers/spray/luminol) - cost = 30 - containertype = /obj/structure/closet/crate - containername = "Auxiliary forensic tools" - group = "Security" - /datum/supply_packs/food name = "Kitchen supply crate" - contains = list(/obj/item/weapon/reagent_containers/food/condiment/flour, - /obj/item/weapon/reagent_containers/food/condiment/flour, - /obj/item/weapon/reagent_containers/food/condiment/flour, - /obj/item/weapon/reagent_containers/food/condiment/flour, - /obj/item/weapon/reagent_containers/food/drinks/milk, - /obj/item/weapon/reagent_containers/food/drinks/milk, - /obj/item/weapon/storage/fancy/egg_box, - /obj/item/weapon/reagent_containers/food/snacks/tofu, - /obj/item/weapon/reagent_containers/food/snacks/tofu, - /obj/item/weapon/reagent_containers/food/snacks/meat, - /obj/item/weapon/reagent_containers/food/snacks/meat - ) + contains = list( + /obj/item/weapon/reagent_containers/food/condiment/flour = 6, + /obj/item/weapon/reagent_containers/food/drinks/milk = 3, + /obj/item/weapon/reagent_containers/food/drinks/soymilk = 2, + /obj/item/weapon/storage/fancy/egg_box = 2, + /obj/item/weapon/reagent_containers/food/snacks/tofu = 4, + /obj/item/weapon/reagent_containers/food/snacks/meat = 4 + ) cost = 10 containertype = /obj/structure/closet/crate/freezer containername = "Food crate" @@ -110,9 +92,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/beanbagammo name = "Beanbag shells" - contains = list(/obj/item/weapon/storage/box/beanbags, - /obj/item/weapon/storage/box/beanbags, - /obj/item/weapon/storage/box/beanbags) + contains = list(/obj/item/weapon/storage/box/beanbags = 3) cost = 30 containertype = /obj/structure/closet/crate containername = "Beanbag shells" @@ -120,12 +100,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/toner name = "Toner cartridges" - contains = list(/obj/item/device/toner, - /obj/item/device/toner, - /obj/item/device/toner, - /obj/item/device/toner, - /obj/item/device/toner, - /obj/item/device/toner) + contains = list(/obj/item/device/toner = 6) cost = 10 containertype = /obj/structure/closet/crate containername = "Toner cartridges" @@ -133,20 +108,19 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/party name = "Party equipment" - contains = list(/obj/item/weapon/storage/box/drinkingglasses, - /obj/item/weapon/reagent_containers/food/drinks/shaker, - /obj/item/weapon/reagent_containers/food/drinks/flask/barflask, - /obj/item/weapon/reagent_containers/food/drinks/bottle/patron, - /obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager, - /obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey, - /obj/item/weapon/storage/fancy/cigarettes/dromedaryco, - /obj/item/weapon/lipstick/random, - /obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale, - /obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale, - /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer, - /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer, - /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer, - /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer) + contains = list( + /obj/item/weapon/storage/box/drinkingglasses, + /obj/item/weapon/reagent_containers/food/drinks/shaker, + /obj/item/weapon/reagent_containers/food/drinks/flask/barflask, + /obj/item/weapon/reagent_containers/food/drinks/bottle/patron, + /obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager, + /obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey, + /obj/item/weapon/storage/fancy/cigarettes/dromedaryco, + /obj/item/weapon/lipstick/random, + /obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale = 2, + /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer = 4, + /obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass = 4 + ) cost = 20 containertype = /obj/structure/closet/crate containername = "Party equipment" @@ -154,10 +128,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/lasertag name = "Lasertag equipment" - contains = list(/obj/item/weapon/gun/energy/lasertag/red, - /obj/item/clothing/suit/redtag, - /obj/item/weapon/gun/energy/lasertag/blue, - /obj/item/clothing/suit/bluetag) + contains = list( + /obj/item/weapon/gun/energy/lasertag/red, + /obj/item/clothing/suit/redtag, + /obj/item/weapon/gun/energy/lasertag/blue, + /obj/item/clothing/suit/bluetag + ) containertype = /obj/structure/closet containername = "Lasertag Closet" group = "Hospitality" @@ -165,12 +141,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/internals name = "Internals crate" - contains = list(/obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/weapon/tank/air, - /obj/item/weapon/tank/air, - /obj/item/weapon/tank/air) + contains = list( + /obj/item/clothing/mask/gas = 3, + /obj/item/weapon/tank/air = 3 + ) cost = 10 containertype = /obj/structure/closet/crate/internals containername = "Internals crate" @@ -178,29 +152,15 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/evacuation name = "Emergency equipment" - contains = list(/obj/item/weapon/storage/toolbox/emergency, - /obj/item/weapon/storage/toolbox/emergency, - /obj/item/clothing/suit/storage/hazardvest, - /obj/item/clothing/suit/storage/hazardvest, - /obj/item/clothing/suit/storage/vest, - /obj/item/clothing/suit/storage/vest, - /obj/item/weapon/tank/emergency_oxygen/engi, - /obj/item/weapon/tank/emergency_oxygen/engi, - /obj/item/weapon/tank/emergency_oxygen/engi, - /obj/item/weapon/tank/emergency_oxygen/engi, - /obj/item/clothing/suit/space/emergency, - /obj/item/clothing/suit/space/emergency, - /obj/item/clothing/suit/space/emergency, - /obj/item/clothing/suit/space/emergency, - /obj/item/clothing/head/helmet/space/emergency, - /obj/item/clothing/head/helmet/space/emergency, - /obj/item/clothing/head/helmet/space/emergency, - /obj/item/clothing/head/helmet/space/emergency, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas) + contains = list( + /obj/item/weapon/storage/toolbox/emergency = 2, + /obj/item/clothing/suit/storage/hazardvest = 2, + /obj/item/clothing/suit/storage/vest = 2, + /obj/item/weapon/tank/emergency_oxygen/engi = 4, + /obj/item/clothing/suit/space/emergency = 4, + /obj/item/clothing/head/helmet/space/emergency = 4, + /obj/item/clothing/mask/gas = 4 + ) cost = 45 containertype = /obj/structure/closet/crate/internals containername = "Emergency crate" @@ -209,9 +169,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/inflatable name = "Inflatable barriers" - contains = list(/obj/item/weapon/storage/briefcase/inflatable, - /obj/item/weapon/storage/briefcase/inflatable, - /obj/item/weapon/storage/briefcase/inflatable) + contains = list(/obj/item/weapon/storage/briefcase/inflatable = 3) cost = 20 containertype = /obj/structure/closet/crate containername = "Inflatable Barrier Crate" @@ -219,26 +177,23 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/janitor name = "Janitorial supplies" - contains = list(/obj/item/weapon/reagent_containers/glass/bucket, - /obj/item/weapon/mop, - /obj/item/clothing/under/rank/janitor, - /obj/item/weapon/cartridge/janitor, - /obj/item/clothing/gloves/black, - /obj/item/clothing/head/soft/purple, - /obj/item/weapon/storage/belt/janitor, - /obj/item/clothing/shoes/galoshes, - /obj/item/weapon/caution, - /obj/item/weapon/caution, - /obj/item/weapon/caution, - /obj/item/weapon/caution, - /obj/item/weapon/storage/bag/trash, - /obj/item/device/lightreplacer, - /obj/item/weapon/reagent_containers/spray/cleaner, - /obj/item/weapon/reagent_containers/glass/rag, - /obj/item/weapon/grenade/chem_grenade/cleaner, - /obj/item/weapon/grenade/chem_grenade/cleaner, - /obj/item/weapon/grenade/chem_grenade/cleaner, - /obj/structure/mopbucket) + contains = list( + /obj/item/weapon/reagent_containers/glass/bucket, + /obj/item/weapon/mop, + /obj/item/clothing/under/rank/janitor, + /obj/item/weapon/cartridge/janitor, + /obj/item/clothing/gloves/black, + /obj/item/clothing/head/soft/purple, + /obj/item/weapon/storage/belt/janitor, + /obj/item/clothing/shoes/galoshes, + /obj/item/weapon/caution = 4, + /obj/item/weapon/storage/bag/trash, + /obj/item/device/lightreplacer, + /obj/item/weapon/reagent_containers/spray/cleaner, + /obj/item/weapon/reagent_containers/glass/rag, + /obj/item/weapon/grenade/chem_grenade/cleaner = 3, + /obj/structure/mopbucket + ) cost = 10 containertype = /obj/structure/closet/crate containername = "Janitorial supplies" @@ -246,9 +201,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/lightbulbs name = "Replacement lights" - contains = list(/obj/item/weapon/storage/box/lights/mixed, - /obj/item/weapon/storage/box/lights/mixed, - /obj/item/weapon/storage/box/lights/mixed) + contains = list(/obj/item/weapon/storage/box/lights/mixed = 3) cost = 10 containertype = /obj/structure/closet/crate containername = "Replacement lights" @@ -256,10 +209,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/wizard name = "Wizard costume" - contains = list(/obj/item/weapon/staff, - /obj/item/clothing/suit/wizrobe/fake, - /obj/item/clothing/shoes/sandal, - /obj/item/clothing/head/wizard/fake) + contains = list( + /obj/item/weapon/staff, + /obj/item/clothing/suit/wizrobe/fake, + /obj/item/clothing/shoes/sandal, + /obj/item/clothing/head/wizard/fake + ) cost = 20 containertype = /obj/structure/closet/crate containername = "Wizard costume crate" @@ -268,15 +223,11 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/foam_weapons name = "Foam Weapon Crate" contains = list( - /obj/item/weapon/material/sword/foam, - /obj/item/weapon/material/sword/foam, - /obj/item/weapon/material/twohanded/baseballbat/foam, - /obj/item/weapon/material/twohanded/baseballbat/foam, - /obj/item/weapon/material/twohanded/spear/foam, - /obj/item/weapon/material/twohanded/spear/foam, - /obj/item/weapon/material/twohanded/fireaxe/foam, - /obj/item/weapon/material/twohanded/fireaxe/foam - ) + /obj/item/weapon/material/sword/foam = 2, + /obj/item/weapon/material/twohanded/baseballbat/foam = 2, + /obj/item/weapon/material/twohanded/spear/foam = 2, + /obj/item/weapon/material/twohanded/fireaxe/foam = 2 + ) cost = 80 containertype = /obj/structure/closet/crate containername = "foam weapon crate" @@ -314,29 +265,25 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee containername = "Corgi Crate" group = "Hydroponics" -/datum/supply_packs/hydroponics // -- Skie +/datum/supply_packs/hydroponics name = "Hydroponics Supply Crate" - contains = list(/obj/item/weapon/reagent_containers/spray/plantbgone, - /obj/item/weapon/reagent_containers/spray/plantbgone, - /obj/item/weapon/reagent_containers/spray/plantbgone, - /obj/item/weapon/reagent_containers/spray/plantbgone, - /obj/item/weapon/reagent_containers/glass/bottle/ammonia, - /obj/item/weapon/reagent_containers/glass/bottle/ammonia, - /obj/item/weapon/material/hatchet, - /obj/item/weapon/material/minihoe, - /obj/item/device/analyzer/plant_analyzer, - /obj/item/clothing/gloves/botanic_leather, - /obj/item/clothing/suit/apron, - /obj/item/weapon/material/minihoe, - /obj/item/weapon/storage/box/botanydisk - ) // Updated with new things + contains = list( + /obj/item/weapon/reagent_containers/spray/plantbgone = 4, + /obj/item/weapon/reagent_containers/glass/bottle/ammonia = 2, + /obj/item/weapon/material/hatchet, + /obj/item/weapon/material/minihoe, + /obj/item/device/analyzer/plant_analyzer, + /obj/item/clothing/gloves/botanic_leather, + /obj/item/clothing/suit/apron, + /obj/item/weapon/material/minihoe, + /obj/item/weapon/storage/box/botanydisk + ) cost = 15 containertype = /obj/structure/closet/crate/hydroponics containername = "Hydroponics crate" access = access_hydroponics group = "Hydroponics" -//farm animals - useless and annoying, but potentially a good source of food /datum/supply_packs/cow name = "Cow crate" cost = 30 @@ -363,23 +310,25 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/seeds name = "Seeds crate" - contains = list(/obj/item/seeds/chiliseed, - /obj/item/seeds/berryseed, - /obj/item/seeds/cornseed, - /obj/item/seeds/eggplantseed, - /obj/item/seeds/tomatoseed, - /obj/item/seeds/appleseed, - /obj/item/seeds/soyaseed, - /obj/item/seeds/wheatseed, - /obj/item/seeds/carrotseed, - /obj/item/seeds/harebell, - /obj/item/seeds/lemonseed, - /obj/item/seeds/orangeseed, - /obj/item/seeds/grassseed, - /obj/item/seeds/sunflowerseed, - /obj/item/seeds/chantermycelium, - /obj/item/seeds/potatoseed, - /obj/item/seeds/sugarcaneseed) + contains = list( + /obj/item/seeds/chiliseed, + /obj/item/seeds/berryseed, + /obj/item/seeds/cornseed, + /obj/item/seeds/eggplantseed, + /obj/item/seeds/tomatoseed, + /obj/item/seeds/appleseed, + /obj/item/seeds/soyaseed, + /obj/item/seeds/wheatseed, + /obj/item/seeds/carrotseed, + /obj/item/seeds/harebell, + /obj/item/seeds/lemonseed, + /obj/item/seeds/orangeseed, + /obj/item/seeds/grassseed, + /obj/item/seeds/sunflowerseed, + /obj/item/seeds/chantermycelium, + /obj/item/seeds/potatoseed, + /obj/item/seeds/sugarcaneseed + ) cost = 10 containertype = /obj/structure/closet/crate/hydroponics containername = "Seeds crate" @@ -388,16 +337,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/weedcontrol name = "Weed control crate" - contains = list(/obj/item/weapon/material/hatchet, - /obj/item/weapon/material/hatchet, - /obj/item/weapon/reagent_containers/spray/plantbgone, - /obj/item/weapon/reagent_containers/spray/plantbgone, - /obj/item/weapon/reagent_containers/spray/plantbgone, - /obj/item/weapon/reagent_containers/spray/plantbgone, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/weapon/grenade/chem_grenade/antiweed, - /obj/item/weapon/grenade/chem_grenade/antiweed) + contains = list( + /obj/item/weapon/material/hatchet = 2, + /obj/item/weapon/reagent_containers/spray/plantbgone = 4, + /obj/item/clothing/mask/gas = 2, + /obj/item/weapon/grenade/chem_grenade/antiweed = 2 + ) cost = 25 containertype = /obj/structure/closet/crate/hydroponics containername = "Weed control crate" @@ -406,17 +351,13 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/exoticseeds name = "Exotic seeds crate" - contains = list(/obj/item/seeds/replicapod, - /obj/item/seeds/replicapod, - /obj/item/seeds/libertymycelium, - /obj/item/seeds/reishimycelium, - /obj/item/seeds/random, - /obj/item/seeds/random, - /obj/item/seeds/random, - /obj/item/seeds/random, - /obj/item/seeds/random, - /obj/item/seeds/random, - /obj/item/seeds/kudzuseed) + contains = list( + /obj/item/seeds/replicapod = 2, + /obj/item/seeds/libertymycelium, + /obj/item/seeds/reishimycelium, + /obj/item/seeds/random = 6, + /obj/item/seeds/kudzuseed + ) cost = 15 containertype = /obj/structure/closet/crate/hydroponics containername = "Exotic Seeds crate" @@ -425,16 +366,18 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/medical name = "Medical crate" - contains = list(/obj/item/weapon/storage/firstaid/regular, - /obj/item/weapon/storage/firstaid/fire, - /obj/item/weapon/storage/firstaid/toxin, - /obj/item/weapon/storage/firstaid/o2, - /obj/item/weapon/storage/firstaid/adv, - /obj/item/weapon/reagent_containers/glass/bottle/antitoxin, - /obj/item/weapon/reagent_containers/glass/bottle/inaprovaline, - /obj/item/weapon/reagent_containers/glass/bottle/stoxin, - /obj/item/weapon/storage/box/syringes, - /obj/item/weapon/storage/box/autoinjectors) + contains = list( + /obj/item/weapon/storage/firstaid/regular, + /obj/item/weapon/storage/firstaid/fire, + /obj/item/weapon/storage/firstaid/toxin, + /obj/item/weapon/storage/firstaid/o2, + /obj/item/weapon/storage/firstaid/adv, + /obj/item/weapon/reagent_containers/glass/bottle/antitoxin, + /obj/item/weapon/reagent_containers/glass/bottle/inaprovaline, + /obj/item/weapon/reagent_containers/glass/bottle/stoxin, + /obj/item/weapon/storage/box/syringes, + /obj/item/weapon/storage/box/autoinjectors + ) cost = 10 containertype = /obj/structure/closet/crate/medical containername = "Medical crate" @@ -442,9 +385,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/bloodpack name = "BloodPack crate" - contains = list(/obj/item/weapon/storage/box/bloodpacks, - /obj/item/weapon/storage/box/bloodpacks, - /obj/item/weapon/storage/box/bloodpacks) + contains = list(/obj/item/weapon/storage/box/bloodpacks = 3) cost = 10 containertype = /obj/structure/closet/crate/medical containername = "BloodPack crate" @@ -452,9 +393,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/bodybag name = "Body bag crate" - contains = list(/obj/item/weapon/storage/box/bodybags, - /obj/item/weapon/storage/box/bodybags, - /obj/item/weapon/storage/box/bodybags) + contains = list(/obj/item/weapon/storage/box/bodybags = 3) cost = 10 containertype = /obj/structure/closet/crate/medical containername = "Body bag crate" @@ -462,9 +401,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/cryobag name = "Stasis bag crate" - contains = list(/obj/item/bodybag/cryobag, - /obj/item/bodybag/cryobag, - /obj/item/bodybag/cryobag) + contains = list(/obj/item/bodybag/cryobag = 3) cost = 50 containertype = /obj/structure/closet/crate/medical containername = "Stasis bag crate" @@ -472,22 +409,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/virus name = "Virus sample crate" -/* contains = list(/obj/item/weapon/reagent_containers/glass/bottle/flu_virion, - /obj/item/weapon/reagent_containers/glass/bottle/cold, - /obj/item/weapon/reagent_containers/glass/bottle/epiglottis_virion, - /obj/item/weapon/reagent_containers/glass/bottle/liver_enhance_virion, - /obj/item/weapon/reagent_containers/glass/bottle/fake_gbs, - /obj/item/weapon/reagent_containers/glass/bottle/magnitis, - /obj/item/weapon/reagent_containers/glass/bottle/pierrot_throat, - /obj/item/weapon/reagent_containers/glass/bottle/brainrot, - /obj/item/weapon/reagent_containers/glass/bottle/hullucigen_virion, - /obj/item/weapon/storage/box/syringes, - /obj/item/weapon/storage/box/beakers, - /obj/item/weapon/reagent_containers/glass/bottle/mutagen)*/ - contains = list(/obj/item/weapon/virusdish/random, - /obj/item/weapon/virusdish/random, - /obj/item/weapon/virusdish/random, - /obj/item/weapon/virusdish/random) + contains = list(/obj/item/weapon/virusdish/random = 4) cost = 25 containertype = "/obj/structure/closet/crate/secure" containername = "Virus sample crate" @@ -540,14 +462,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/electrical name = "Electrical maintenance crate" - contains = list(/obj/item/weapon/storage/toolbox/electrical, - /obj/item/weapon/storage/toolbox/electrical, - /obj/item/clothing/gloves/yellow, - /obj/item/clothing/gloves/yellow, - /obj/item/weapon/cell, - /obj/item/weapon/cell, - /obj/item/weapon/cell/high, - /obj/item/weapon/cell/high) + contains = list( + /obj/item/weapon/storage/toolbox/electrical = 2, + /obj/item/clothing/gloves/yellow = 2, + /obj/item/weapon/cell = 2, + /obj/item/weapon/cell/high = 2 + ) cost = 15 containertype = /obj/structure/closet/crate containername = "Electrical maintenance crate" @@ -555,15 +475,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/mechanical name = "Mechanical maintenance crate" - contains = list(/obj/item/weapon/storage/belt/utility/full, - /obj/item/weapon/storage/belt/utility/full, - /obj/item/weapon/storage/belt/utility/full, - /obj/item/clothing/suit/storage/hazardvest, - /obj/item/clothing/suit/storage/hazardvest, - /obj/item/clothing/suit/storage/hazardvest, - /obj/item/clothing/head/welding, - /obj/item/clothing/head/welding, - /obj/item/clothing/head/hardhat) + contains = list( + /obj/item/weapon/storage/belt/utility/full = 3, + /obj/item/clothing/suit/storage/hazardvest = 3, + /obj/item/clothing/head/welding = 2, + /obj/item/clothing/head/hardhat + ) cost = 10 containertype = /obj/structure/closet/crate containername = "Mechanical maintenance crate" @@ -595,30 +512,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/solar name = "Solar Pack crate" - contains = list(/obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, // 21 Solar Assemblies. 1 Extra for the controller, - /obj/item/weapon/circuitboard/solar_control, - /obj/item/weapon/tracker_electronics, - /obj/item/weapon/paper/solar) + contains = list( + /obj/item/solar_assembly = 21, + /obj/item/weapon/circuitboard/solar_control, + /obj/item/weapon/tracker_electronics, + /obj/item/weapon/paper/solar + ) cost = 20 containertype = /obj/structure/closet/crate containername = "Solar pack crate" @@ -626,8 +525,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/engine name = "Emitter crate" - contains = list(/obj/machinery/power/emitter, - /obj/machinery/power/emitter) + contains = list(/obj/machinery/power/emitter = 2) cost = 10 containertype = /obj/structure/closet/crate/secure containername = "Emitter crate" @@ -636,8 +534,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/engine/field_gen name = "Field Generator crate" - contains = list(/obj/machinery/field_generator, - /obj/machinery/field_generator) + contains = list(/obj/machinery/field_generator = 2) containertype = /obj/structure/closet/crate/secure containername = "Field Generator crate" access = access_ce @@ -653,22 +550,22 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/engine/collector name = "Collector crate" - contains = list(/obj/machinery/power/rad_collector, - /obj/machinery/power/rad_collector, - /obj/machinery/power/rad_collector) + contains = list(/obj/machinery/power/rad_collector = 3) containername = "Collector crate" group = "Engineering" /datum/supply_packs/engine/PA name = "Particle Accelerator crate" cost = 40 - contains = list(/obj/structure/particle_accelerator/fuel_chamber, - /obj/machinery/particle_accelerator/control_box, - /obj/structure/particle_accelerator/particle_emitter/center, - /obj/structure/particle_accelerator/particle_emitter/left, - /obj/structure/particle_accelerator/particle_emitter/right, - /obj/structure/particle_accelerator/power_box, - /obj/structure/particle_accelerator/end_cap) + contains = list( + /obj/structure/particle_accelerator/fuel_chamber, + /obj/machinery/particle_accelerator/control_box, + /obj/structure/particle_accelerator/particle_emitter/center, + /obj/structure/particle_accelerator/particle_emitter/left, + /obj/structure/particle_accelerator/particle_emitter/right, + /obj/structure/particle_accelerator/power_box, + /obj/structure/particle_accelerator/end_cap + ) containertype = /obj/structure/closet/crate/secure containername = "Particle Accelerator crate" access = access_ce @@ -676,9 +573,11 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/mecha_ripley name = "Circuit Crate (\"Ripley\" APLU)" - contains = list(/obj/item/weapon/book/manual/ripley_build_and_repair, - /obj/item/weapon/circuitboard/mecha/ripley/main, - /obj/item/weapon/circuitboard/mecha/ripley/peripherals) + contains = list( + /obj/item/weapon/book/manual/ripley_build_and_repair, + /obj/item/weapon/circuitboard/mecha/ripley/main, + /obj/item/weapon/circuitboard/mecha/ripley/peripherals + ) cost = 30 containertype = /obj/structure/closet/crate/secure containername = "APLU \"Ripley\" Circuit Crate" @@ -687,8 +586,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/mecha_odysseus name = "Circuit Crate (\"Odysseus\")" - contains = list(/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, - /obj/item/weapon/circuitboard/mecha/odysseus/main) + contains = list( + /obj/item/weapon/circuitboard/mecha/odysseus/peripherals, + /obj/item/weapon/circuitboard/mecha/odysseus/main + ) cost = 25 containertype = /obj/structure/closet/crate/secure containername = "\"Odysseus\" Circuit Crate" @@ -705,16 +606,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/robotics name = "Robotics assembly crate" - contains = list(/obj/item/device/assembly/prox_sensor, - /obj/item/device/assembly/prox_sensor, - /obj/item/device/assembly/prox_sensor, - /obj/item/weapon/storage/toolbox/electrical, - /obj/item/device/flash, - /obj/item/device/flash, - /obj/item/device/flash, - /obj/item/device/flash, - /obj/item/weapon/cell/high, - /obj/item/weapon/cell/high) + contains = list( + /obj/item/device/assembly/prox_sensor = 3, + /obj/item/weapon/storage/toolbox/electrical, + /obj/item/device/flash = 4, + /obj/item/weapon/cell/high = 2 + ) cost = 10 containertype = /obj/structure/closet/crate/secure/gear containername = "Robotics assembly" @@ -723,18 +620,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/phoron name = "Phoron assembly crate" - contains = list(/obj/item/weapon/tank/phoron, - /obj/item/weapon/tank/phoron, - /obj/item/weapon/tank/phoron, - /obj/item/device/assembly/igniter, - /obj/item/device/assembly/igniter, - /obj/item/device/assembly/igniter, - /obj/item/device/assembly/prox_sensor, - /obj/item/device/assembly/prox_sensor, - /obj/item/device/assembly/prox_sensor, - /obj/item/device/assembly/timer, - /obj/item/device/assembly/timer, - /obj/item/device/assembly/timer) + contains = list( + /obj/item/weapon/tank/phoron = 3, + /obj/item/device/assembly/igniter = 3, + /obj/item/device/assembly/prox_sensor = 3, + /obj/item/device/assembly/timer = 3 + ) cost = 10 containertype = /obj/structure/closet/crate/secure/phoron containername = "Phoron assembly crate" @@ -743,16 +634,13 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/weapons name = "Weapons crate" - contains = list(/obj/item/weapon/melee/baton, - /obj/item/weapon/melee/baton, - /obj/item/weapon/gun/energy/gun, - /obj/item/weapon/gun/energy/gun, - /obj/item/weapon/gun/energy/taser, - /obj/item/weapon/gun/energy/taser, - /obj/item/weapon/gun/projectile/colt/detective, - /obj/item/weapon/gun/projectile/colt/detective, - /obj/item/weapon/storage/box/flashbangs, - /obj/item/weapon/storage/box/flashbangs) + contains = list( + /obj/item/weapon/melee/baton = 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/weapon containername = "Weapons crate" @@ -761,10 +649,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/flareguns name = "Flare guns crate" - contains = list(/obj/item/weapon/gun/projectile/sec/flash, - /obj/item/ammo_magazine/c45m/flash, - /obj/item/weapon/gun/projectile/shotgun/doublebarrel/flare, - /obj/item/weapon/storage/box/flashshells) + contains = list( + /obj/item/weapon/gun/projectile/sec/flash, + /obj/item/ammo_magazine/c45m/flash, + /obj/item/weapon/gun/projectile/shotgun/doublebarrel/flare, + /obj/item/weapon/storage/box/flashshells + ) cost = 25 containertype = /obj/structure/closet/crate/secure/weapon containername = "Flare gun crate" @@ -773,10 +663,9 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/eweapons name = "Experimental weapons crate" - contains = list(/obj/item/weapon/gun/energy/xray, - /obj/item/weapon/gun/energy/xray, - /obj/item/weapon/shield/energy, - /obj/item/weapon/shield/energy) + contains = list( + /obj/item/weapon/gun/energy/xray = 2, + /obj/item/weapon/shield/energy = 2) cost = 125 containertype = /obj/structure/closet/crate/secure/weapon containername = "Experimental weapons crate" @@ -785,17 +674,19 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/randomised/armor num_contained = 5 - contains = list(/obj/item/clothing/suit/storage/vest, - /obj/item/clothing/suit/storage/vest/officer, - /obj/item/clothing/suit/storage/vest/warden, - /obj/item/clothing/suit/storage/vest/hos, - /obj/item/clothing/suit/storage/vest/pcrc, - /obj/item/clothing/suit/storage/vest/detective, - /obj/item/clothing/suit/storage/vest/heavy, - /obj/item/clothing/suit/storage/vest/heavy/officer, - /obj/item/clothing/suit/storage/vest/heavy/warden, - /obj/item/clothing/suit/storage/vest/heavy/hos, - /obj/item/clothing/suit/storage/vest/heavy/pcrc) + contains = list( + /obj/item/clothing/suit/storage/vest, + /obj/item/clothing/suit/storage/vest/officer, + /obj/item/clothing/suit/storage/vest/warden, + /obj/item/clothing/suit/storage/vest/hos, + /obj/item/clothing/suit/storage/vest/pcrc, + /obj/item/clothing/suit/storage/vest/detective, + /obj/item/clothing/suit/storage/vest/heavy, + /obj/item/clothing/suit/storage/vest/heavy/officer, + /obj/item/clothing/suit/storage/vest/heavy/warden, + /obj/item/clothing/suit/storage/vest/heavy/hos, + /obj/item/clothing/suit/storage/vest/heavy/pcrc + ) name = "Armor crate" cost = 40 @@ -806,18 +697,14 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/riot_gear name = "Riot gear crate" - contains = list(/obj/item/weapon/melee/baton, - /obj/item/weapon/melee/baton, - /obj/item/weapon/melee/baton, - /obj/item/weapon/shield/riot, - /obj/item/weapon/shield/riot, - /obj/item/weapon/shield/riot, - /obj/item/weapon/handcuffs, - /obj/item/weapon/handcuffs, - /obj/item/weapon/handcuffs, - /obj/item/weapon/storage/box/flashbangs, - /obj/item/weapon/storage/box/beanbags, - /obj/item/weapon/storage/box/handcuffs) + contains = list( + /obj/item/weapon/melee/baton = 3, + /obj/item/weapon/shield/riot = 3, + /obj/item/weapon/handcuffs = 3, + /obj/item/weapon/storage/box/flashbangs, + /obj/item/weapon/storage/box/beanbags, + /obj/item/weapon/storage/box/handcuffs + ) cost = 40 containertype = /obj/structure/closet/crate/secure containername = "riot gear crate" @@ -826,10 +713,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/riot_armor name = "Riot armor set crate" - contains = list(/obj/item/clothing/head/helmet/riot, - /obj/item/clothing/suit/armor/riot, - /obj/item/clothing/gloves/arm_guard/riot, - /obj/item/clothing/shoes/leg_guard/riot) + contains = list( + /obj/item/clothing/head/helmet/riot, + /obj/item/clothing/suit/armor/riot, + /obj/item/clothing/gloves/arm_guard/riot, + /obj/item/clothing/shoes/leg_guard/riot + ) cost = 30 containertype = /obj/structure/closet/crate/secure containername = "riot armor set crate" @@ -838,10 +727,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/ablative_armor name = "Ablative armor set crate" - contains = list(/obj/item/clothing/head/helmet/laserproof, - /obj/item/clothing/suit/armor/laserproof, - /obj/item/clothing/gloves/arm_guard/laserproof, - /obj/item/clothing/shoes/leg_guard/laserproof) + contains = list( + /obj/item/clothing/head/helmet/laserproof, + /obj/item/clothing/suit/armor/laserproof, + /obj/item/clothing/gloves/arm_guard/laserproof, + /obj/item/clothing/shoes/leg_guard/laserproof + ) cost = 40 containertype = /obj/structure/closet/crate/secure containername = "ablative armor set crate" @@ -850,10 +741,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/bullet_resistant_armor name = "Bullet resistant armor set crate" - contains = list(/obj/item/clothing/head/helmet/bulletproof, - /obj/item/clothing/suit/armor/bulletproof, - /obj/item/clothing/gloves/arm_guard/bulletproof, - /obj/item/clothing/shoes/leg_guard/bulletproof) + contains = list( + /obj/item/clothing/head/helmet/bulletproof, + /obj/item/clothing/suit/armor/bulletproof, + /obj/item/clothing/gloves/arm_guard/bulletproof, + /obj/item/clothing/shoes/leg_guard/bulletproof + ) cost = 35 containertype = /obj/structure/closet/crate/secure containername = "bullet resistant armor set crate" @@ -862,10 +755,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/combat_armor name = "Combat armor set crate" - contains = list(/obj/item/clothing/head/helmet/combat, - /obj/item/clothing/suit/armor/combat, - /obj/item/clothing/gloves/arm_guard/combat, - /obj/item/clothing/shoes/leg_guard/combat) + contains = list( + /obj/item/clothing/head/helmet/combat, + /obj/item/clothing/suit/armor/combat, + /obj/item/clothing/gloves/arm_guard/combat, + /obj/item/clothing/shoes/leg_guard/combat + ) cost = 40 containertype = /obj/structure/closet/crate/secure containername = "combat armor set crate" @@ -879,28 +774,28 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee cost = 60 group = "Security" access = access_armory - contains = list(/obj/item/clothing/under/tactical, - /obj/item/clothing/suit/armor/tactical, - /obj/item/clothing/head/helmet/tactical, - /obj/item/clothing/mask/balaclava/tactical, - /obj/item/clothing/glasses/sunglasses/sechud/tactical, - /obj/item/weapon/storage/belt/security/tactical, - /obj/item/clothing/shoes/jackboots, - /obj/item/clothing/gloves/black, - /obj/item/clothing/under/tactical, - /obj/item/clothing/suit/armor/tactical, - /obj/item/clothing/head/helmet/tactical, - /obj/item/clothing/mask/balaclava/tactical, - /obj/item/clothing/glasses/sunglasses/sechud/tactical, - /obj/item/weapon/storage/belt/security/tactical, - /obj/item/clothing/shoes/jackboots, - /obj/item/clothing/gloves/black) + contains = list( + /obj/item/clothing/under/tactical, + /obj/item/clothing/suit/armor/tactical, + /obj/item/clothing/head/helmet/tactical, + /obj/item/clothing/mask/balaclava/tactical, + /obj/item/clothing/glasses/sunglasses/sechud/tactical, + /obj/item/weapon/storage/belt/security/tactical, + /obj/item/clothing/shoes/jackboots, + /obj/item/clothing/gloves/black, + /obj/item/clothing/under/tactical, + /obj/item/clothing/suit/armor/tactical, + /obj/item/clothing/head/helmet/tactical, + /obj/item/clothing/mask/balaclava/tactical, + /obj/item/clothing/glasses/sunglasses/sechud/tactical, + /obj/item/weapon/storage/belt/security/tactical, + /obj/item/clothing/shoes/jackboots, + /obj/item/clothing/gloves/black + ) /datum/supply_packs/energyweapons name = "Energy weapons crate" - contains = list(/obj/item/weapon/gun/energy/laser, - /obj/item/weapon/gun/energy/laser, - /obj/item/weapon/gun/energy/laser) + contains = list(/obj/item/weapon/gun/energy/laser = 3) cost = 50 containertype = /obj/structure/closet/crate/secure containername = "energy weapons crate" @@ -909,10 +804,11 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/shotgun name = "Shotgun crate" - contains = list(/obj/item/weapon/storage/box/shotgunammo, - /obj/item/weapon/storage/box/shotgunshells, - /obj/item/weapon/gun/projectile/shotgun/pump/combat, - /obj/item/weapon/gun/projectile/shotgun/pump/combat) + contains = list( + /obj/item/weapon/storage/box/shotgunammo, + /obj/item/weapon/storage/box/shotgunshells, + /obj/item/weapon/gun/projectile/shotgun/pump/combat = 2 + ) cost = 65 containertype = /obj/structure/closet/crate/secure containername = "Shotgun crate" @@ -921,8 +817,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/erifle name = "Energy marksman crate" - contains = list(/obj/item/weapon/gun/energy/sniperrifle, - /obj/item/weapon/gun/energy/sniperrifle) + contains = list(/obj/item/weapon/gun/energy/sniperrifle = 2) cost = 90 containertype = /obj/structure/closet/crate/secure containername = "Energy marksman crate" @@ -931,10 +826,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/shotgunammo name = "Ballistic ammunition crate" - contains = list(/obj/item/weapon/storage/box/shotgunammo, - /obj/item/weapon/storage/box/shotgunammo, - /obj/item/weapon/storage/box/shotgunshells, - /obj/item/weapon/storage/box/shotgunshells) + contains = list( + /obj/item/weapon/storage/box/shotgunammo = 2, + /obj/item/weapon/storage/box/shotgunshells = 2 + ) cost = 60 containertype = /obj/structure/closet/crate/secure containername = "ballistic ammunition crate" @@ -943,9 +838,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/ionweapons name = "Electromagnetic weapons crate" - contains = list(/obj/item/weapon/gun/energy/ionrifle, - /obj/item/weapon/gun/energy/ionrifle, - /obj/item/weapon/storage/box/emps) + contains = list( + /obj/item/weapon/gun/energy/ionrifle = 2, + /obj/item/weapon/storage/box/emps + ) cost = 50 containertype = /obj/structure/closet/crate/secure containername = "electromagnetic weapons crate" @@ -955,8 +851,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/randomised/automatic name = "Automatic weapon crate" num_contained = 2 - contains = list(/obj/item/weapon/gun/projectile/automatic/wt550, - /obj/item/weapon/gun/projectile/automatic/z8) + contains = list( + /obj/item/weapon/gun/projectile/automatic/wt550, + /obj/item/weapon/gun/projectile/automatic/z8 + ) cost = 90 containertype = /obj/structure/closet/crate/secure containername = "Automatic weapon crate" @@ -966,30 +864,20 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/randomised/autoammo name = "Automatic weapon ammunition crate" num_contained = 6 - contains = list(/obj/item/ammo_magazine/mc9mmt, - /obj/item/ammo_magazine/mc9mmt/rubber, - /obj/item/ammo_magazine/a556) + contains = list( + /obj/item/ammo_magazine/mc9mmt, + /obj/item/ammo_magazine/mc9mmt/rubber, + /obj/item/ammo_magazine/a556 + ) cost = 20 containertype = /obj/structure/closet/crate/secure containername = "Automatic weapon ammunition crate" access = access_armory group = "Security" -/* -/datum/supply_packs/loyalty - name = "Loyalty implant crate" - contains = list (/obj/item/weapon/storage/lockbox/loyalty) - cost = 60 - containertype = /obj/structure/closet/crate/secure - containername = "Loyalty implant crate" - access = access_armory - group = "Security" -*/ - /datum/supply_packs/energy_guns name = "energy guns crate" - contains = list(/obj/item/weapon/gun/energy/gun, - /obj/item/weapon/gun/energy/gun) + contains = list(/obj/item/weapon/gun/energy/gun = 2) cost = 50 containertype = /obj/structure/closet/crate/secure containername = "energy guns crate" @@ -998,10 +886,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/securitybarriers name = "Security barrier crate" - contains = list(/obj/machinery/deployable/barrier, - /obj/machinery/deployable/barrier, - /obj/machinery/deployable/barrier, - /obj/machinery/deployable/barrier) + contains = list(/obj/machinery/deployable/barrier = 4) cost = 20 containertype = /obj/structure/closet/crate/secure/gear containername = "Security barrier crate" @@ -1009,10 +894,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/securityshieldgen name = "Wall shield Generators" - contains = list(/obj/machinery/shieldwallgen, - /obj/machinery/shieldwallgen, - /obj/machinery/shieldwallgen, - /obj/machinery/shieldwallgen) + contains = list(/obj/machinery/shieldwallgen = 4) cost = 20 containertype = /obj/structure/closet/crate/secure containername = "wall shield generators crate" @@ -1021,26 +903,28 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/randomised var/num_contained = 4 //number of items picked to be contained in a randomised crate - contains = list(/obj/item/clothing/head/collectable/chef, - /obj/item/clothing/head/collectable/paper, - /obj/item/clothing/head/collectable/tophat, - /obj/item/clothing/head/collectable/captain, - /obj/item/clothing/head/collectable/beret, - /obj/item/clothing/head/collectable/welding, - /obj/item/clothing/head/collectable/flatcap, - /obj/item/clothing/head/collectable/pirate, - /obj/item/clothing/head/collectable/kitty, - /obj/item/clothing/head/collectable/rabbitears, - /obj/item/clothing/head/collectable/wizard, - /obj/item/clothing/head/collectable/hardhat, - /obj/item/clothing/head/collectable/HoS, - /obj/item/clothing/head/collectable/thunderdome, - /obj/item/clothing/head/collectable/swat, - /obj/item/clothing/head/collectable/slime, - /obj/item/clothing/head/collectable/police, - /obj/item/clothing/head/collectable/slime, - /obj/item/clothing/head/collectable/xenom, - /obj/item/clothing/head/collectable/petehat) + contains = list( + /obj/item/clothing/head/collectable/chef, + /obj/item/clothing/head/collectable/paper, + /obj/item/clothing/head/collectable/tophat, + /obj/item/clothing/head/collectable/captain, + /obj/item/clothing/head/collectable/beret, + /obj/item/clothing/head/collectable/welding, + /obj/item/clothing/head/collectable/flatcap, + /obj/item/clothing/head/collectable/pirate, + /obj/item/clothing/head/collectable/kitty, + /obj/item/clothing/head/collectable/rabbitears, + /obj/item/clothing/head/collectable/wizard, + /obj/item/clothing/head/collectable/hardhat, + /obj/item/clothing/head/collectable/HoS, + /obj/item/clothing/head/collectable/thunderdome, + /obj/item/clothing/head/collectable/swat, + /obj/item/clothing/head/collectable/slime, + /obj/item/clothing/head/collectable/police, + /obj/item/clothing/head/collectable/slime, + /obj/item/clothing/head/collectable/xenom, + /obj/item/clothing/head/collectable/petehat + ) name = "Collectable hat crate!" cost = 200 containertype = /obj/structure/closet/crate @@ -1053,23 +937,22 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/artscrafts name = "Arts and Crafts supplies" - contains = list(/obj/item/weapon/storage/fancy/crayons, - /obj/item/device/camera, - /obj/item/device/camera_film, - /obj/item/device/camera_film, - /obj/item/weapon/storage/photo_album, - /obj/item/weapon/packageWrap, - /obj/item/weapon/reagent_containers/glass/paint/red, - /obj/item/weapon/reagent_containers/glass/paint/green, - /obj/item/weapon/reagent_containers/glass/paint/blue, - /obj/item/weapon/reagent_containers/glass/paint/yellow, - /obj/item/weapon/reagent_containers/glass/paint/purple, - /obj/item/weapon/reagent_containers/glass/paint/black, - /obj/item/weapon/reagent_containers/glass/paint/white, - /obj/item/weapon/contraband/poster, - /obj/item/weapon/wrapping_paper, - /obj/item/weapon/wrapping_paper, - /obj/item/weapon/wrapping_paper) + contains = list( + /obj/item/weapon/storage/fancy/crayons, + /obj/item/device/camera, + /obj/item/device/camera_film = 2, + /obj/item/weapon/storage/photo_album, + /obj/item/weapon/packageWrap, + /obj/item/weapon/reagent_containers/glass/paint/red, + /obj/item/weapon/reagent_containers/glass/paint/green, + /obj/item/weapon/reagent_containers/glass/paint/blue, + /obj/item/weapon/reagent_containers/glass/paint/yellow, + /obj/item/weapon/reagent_containers/glass/paint/purple, + /obj/item/weapon/reagent_containers/glass/paint/black, + /obj/item/weapon/reagent_containers/glass/paint/white, + /obj/item/weapon/contraband/poster, + /obj/item/weapon/wrapping_paper = 3 + ) cost = 10 containertype = "/obj/structure/closet/crate" containername = "Arts and Crafts crate" @@ -1078,10 +961,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/randomised/contraband num_contained = 5 - contains = list(/obj/item/seeds/bloodtomatoseed, - /obj/item/weapon/storage/pill_bottle/zoom, - /obj/item/weapon/storage/pill_bottle/happy, - /obj/item/weapon/reagent_containers/food/drinks/bottle/pwine) + contains = list( + /obj/item/seeds/bloodtomatoseed, + /obj/item/weapon/storage/pill_bottle/zoom, + /obj/item/weapon/storage/pill_bottle/happy, + /obj/item/weapon/reagent_containers/food/drinks/bottle/pwine + ) name = "Contraband crate" cost = 30 @@ -1092,16 +977,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/boxes name = "Empty boxes" - contains = list(/obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box) + contains = list(/obj/item/weapon/storage/box = 10) cost = 10 containertype = "/obj/structure/closet/crate" containername = "Empty box crate" @@ -1109,17 +985,19 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/surgery name = "Surgery crate" - contains = list(/obj/item/weapon/cautery, - /obj/item/weapon/surgicaldrill, - /obj/item/clothing/mask/breath/medical, - /obj/item/weapon/tank/anesthetic, - /obj/item/weapon/FixOVein, - /obj/item/weapon/hemostat, - /obj/item/weapon/scalpel, - /obj/item/weapon/bonegel, - /obj/item/weapon/retractor, - /obj/item/weapon/bonesetter, - /obj/item/weapon/circular_saw) + contains = list( + /obj/item/weapon/cautery, + /obj/item/weapon/surgicaldrill, + /obj/item/clothing/mask/breath/medical, + /obj/item/weapon/tank/anesthetic, + /obj/item/weapon/FixOVein, + /obj/item/weapon/hemostat, + /obj/item/weapon/scalpel, + /obj/item/weapon/bonegel, + /obj/item/weapon/retractor, + /obj/item/weapon/bonesetter, + /obj/item/weapon/circular_saw + ) cost = 25 containertype = "/obj/structure/closet/crate/secure" containername = "Surgery crate" @@ -1128,15 +1006,13 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/sterile name = "Sterile equipment crate" - contains = list(/obj/item/clothing/under/rank/medical/green, - /obj/item/clothing/under/rank/medical/green, - /obj/item/clothing/head/surgery/green, - /obj/item/clothing/head/surgery/green, - /obj/item/weapon/storage/box/masks, - /obj/item/weapon/storage/box/gloves, - /obj/item/weapon/storage/belt/medical, - /obj/item/weapon/storage/belt/medical, - /obj/item/weapon/storage/belt/medical) + contains = list( + /obj/item/clothing/under/rank/medical/green = 2, + /obj/item/clothing/head/surgery/green = 2, + /obj/item/weapon/storage/box/masks, + /obj/item/weapon/storage/box/gloves, + /obj/item/weapon/storage/belt/medical = 3 + ) cost = 15 containertype = "/obj/structure/closet/crate" containername = "Sterile equipment crate" @@ -1144,10 +1020,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/randomised/pizza num_contained = 5 - contains = list(/obj/item/pizzabox/margherita, - /obj/item/pizzabox/mushroom, - /obj/item/pizzabox/meat, - /obj/item/pizzabox/vegetable) + contains = list( + /obj/item/pizzabox/margherita, + /obj/item/pizzabox/mushroom, + /obj/item/pizzabox/meat, + /obj/item/pizzabox/vegetable + ) name = "Surprise pack of five pizzas" cost = 15 containertype = /obj/structure/closet/crate/freezer @@ -1156,33 +1034,35 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/randomised/costume num_contained = 3 - contains = list(/obj/item/clothing/suit/pirate, - /obj/item/clothing/suit/judgerobe, - /obj/item/clothing/suit/wcoat, - /obj/item/clothing/suit/hastur, - /obj/item/clothing/suit/holidaypriest, - /obj/item/clothing/suit/nun, - /obj/item/clothing/suit/imperium_monk, - /obj/item/clothing/suit/ianshirt, - /obj/item/clothing/under/gimmick/rank/captain/suit, - /obj/item/clothing/under/gimmick/rank/head_of_personnel/suit, - /obj/item/clothing/under/lawyer/purpsuit, - /obj/item/clothing/under/rank/mailman, - /obj/item/clothing/under/dress/dress_saloon, - /obj/item/clothing/suit/suspenders, - /obj/item/clothing/suit/storage/toggle/labcoat/mad, - /obj/item/clothing/suit/bio_suit/plaguedoctorsuit, - /obj/item/clothing/under/schoolgirl, - /obj/item/clothing/under/owl, - /obj/item/clothing/under/waiter, - /obj/item/clothing/under/gladiator, - /obj/item/clothing/under/soviet, - /obj/item/clothing/under/scratch, - /obj/item/clothing/under/wedding/bride_white, - /obj/item/clothing/suit/chef, - /obj/item/clothing/suit/apron/overalls, - /obj/item/clothing/under/redcoat, - /obj/item/clothing/under/kilt) + contains = list( + /obj/item/clothing/suit/pirate, + /obj/item/clothing/suit/judgerobe, + /obj/item/clothing/suit/wcoat, + /obj/item/clothing/suit/hastur, + /obj/item/clothing/suit/holidaypriest, + /obj/item/clothing/suit/nun, + /obj/item/clothing/suit/imperium_monk, + /obj/item/clothing/suit/ianshirt, + /obj/item/clothing/under/gimmick/rank/captain/suit, + /obj/item/clothing/under/gimmick/rank/head_of_personnel/suit, + /obj/item/clothing/under/lawyer/purpsuit, + /obj/item/clothing/under/rank/mailman, + /obj/item/clothing/under/dress/dress_saloon, + /obj/item/clothing/suit/suspenders, + /obj/item/clothing/suit/storage/toggle/labcoat/mad, + /obj/item/clothing/suit/bio_suit/plaguedoctorsuit, + /obj/item/clothing/under/schoolgirl, + /obj/item/clothing/under/owl, + /obj/item/clothing/under/waiter, + /obj/item/clothing/under/gladiator, + /obj/item/clothing/under/soviet, + /obj/item/clothing/under/scratch, + /obj/item/clothing/under/wedding/bride_white, + /obj/item/clothing/suit/chef, + /obj/item/clothing/suit/apron/overalls, + /obj/item/clothing/under/redcoat, + /obj/item/clothing/under/kilt + ) name = "Costumes crate" cost = 10 containertype = /obj/structure/closet/crate @@ -1190,21 +1070,22 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee group = "Miscellaneous" /datum/supply_packs/formal_wear - contains = list(/obj/item/clothing/head/bowler, - /obj/item/clothing/head/that, - /obj/item/clothing/suit/storage/toggle/internalaffairs, - /obj/item/clothing/suit/storage/toggle/lawyer/bluejacket, - /obj/item/clothing/suit/storage/toggle/lawyer/purpjacket, - /obj/item/clothing/under/suit_jacket, - /obj/item/clothing/under/suit_jacket/female, - /obj/item/clothing/under/suit_jacket/really_black, - /obj/item/clothing/under/suit_jacket/red, - /obj/item/clothing/under/lawyer/bluesuit, - /obj/item/clothing/under/lawyer/purpsuit, - /obj/item/clothing/shoes/black, - /obj/item/clothing/shoes/black, - /obj/item/clothing/shoes/leather, - /obj/item/clothing/suit/wcoat) + contains = list( + /obj/item/clothing/head/bowler, + /obj/item/clothing/head/that, + /obj/item/clothing/suit/storage/toggle/internalaffairs, + /obj/item/clothing/suit/storage/toggle/lawyer/bluejacket, + /obj/item/clothing/suit/storage/toggle/lawyer/purpjacket, + /obj/item/clothing/under/suit_jacket, + /obj/item/clothing/under/suit_jacket/female, + /obj/item/clothing/under/suit_jacket/really_black, + /obj/item/clothing/under/suit_jacket/red, + /obj/item/clothing/under/lawyer/bluesuit, + /obj/item/clothing/under/lawyer/purpsuit, + /obj/item/clothing/shoes/black = 2, + /obj/item/clothing/shoes/leather, + /obj/item/clothing/suit/wcoat + ) name = "Formalwear closet" cost = 30 containertype = /obj/structure/closet @@ -1213,9 +1094,11 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/randomised/card_packs num_contained = 5 - contains = list(/obj/item/weapon/pack/cardemon, - /obj/item/weapon/pack/spaceball, - /obj/item/weapon/deck/holder) + contains = list( + /obj/item/weapon/pack/cardemon, + /obj/item/weapon/pack/spaceball, + /obj/item/weapon/deck/holder + ) name = "Trading Card Crate" cost = 10 containertype = /obj/structure/closet/crate @@ -1258,16 +1141,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee group = "Engineering" access = access_ce - -/* /datum/supply_packs/smsmall // Currently nonfunctional, waiting on virgil - name = "Supermatter Shard" - contains = list(/obj/machinery/power/supermatter/shard) - cost = 25 - containertype = /obj/structure/closet/crate/secure/phoron - containername = "Supermatter shard crate (CAUTION)" - access = access_ce - group = "Engineering" */ - /datum/supply_packs/eftpos contains = list(/obj/item/device/eftpos) name = "EFTPOS scanner" @@ -1314,14 +1187,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/bee_keeper name = "Beekeeping crate" - contains = list(/obj/item/beehive_assembly, - /obj/item/bee_smoker, - /obj/item/honey_frame, - /obj/item/honey_frame, - /obj/item/honey_frame, - /obj/item/honey_frame, - /obj/item/honey_frame, - /obj/item/bee_pack) + contains = list( + /obj/item/beehive_assembly, + /obj/item/bee_smoker, + /obj/item/honey_frame = 5, + /obj/item/bee_pack + ) cost = 40 containertype = /obj/structure/closet/crate/hydroponics containername = "Beekeeping crate" @@ -1338,19 +1209,20 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee group = "Miscellaneous" /datum/supply_packs/bureaucracy - contains = list(/obj/item/weapon/clipboard, - /obj/item/weapon/clipboard, - /obj/item/weapon/pen/red, - /obj/item/weapon/pen/blue, - /obj/item/weapon/pen/blue, - /obj/item/device/camera_film, - /obj/item/weapon/folder/blue, - /obj/item/weapon/folder/red, - /obj/item/weapon/folder/yellow, - /obj/item/weapon/hand_labeler, - /obj/item/weapon/tape_roll, - /obj/structure/filingcabinet/chestdrawer{anchored = 0}, - /obj/item/weapon/paper_bin) + contains = list( + /obj/item/weapon/clipboard = 2, + /obj/item/weapon/pen/red, + /obj/item/weapon/pen/blue, + /obj/item/weapon/pen/blue, + /obj/item/device/camera_film, + /obj/item/weapon/folder/blue, + /obj/item/weapon/folder/red, + /obj/item/weapon/folder/yellow, + /obj/item/weapon/hand_labeler, + /obj/item/weapon/tape_roll, + /obj/structure/filingcabinet/chestdrawer{anchored = 0}, + /obj/item/weapon/paper_bin + ) name = "Office supplies" cost = 15 containertype = /obj/structure/closet/crate @@ -1358,12 +1230,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee group = "Supply" /datum/supply_packs/radsuit - contains = list(/obj/item/clothing/suit/radiation, - /obj/item/clothing/suit/radiation, - /obj/item/clothing/suit/radiation, - /obj/item/clothing/head/radiation, - /obj/item/clothing/head/radiation, - /obj/item/clothing/head/radiation) + contains = list( + /obj/item/clothing/suit/radiation = 3, + /obj/item/clothing/head/radiation = 3 + ) name = "Radiation suits package" cost = 20 containertype = /obj/structure/closet/radiation @@ -1372,16 +1242,19 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/carpet name = "Imported carpet" - containertype = /obj/structure/closet + containertype = /obj/structure/closet/crate containername = "Imported carpet crate" cost = 15 group = "Miscellaneous" - contains = list(/obj/item/stack/tile/carpet) + contains = list( + /obj/item/stack/tile/carpet, + /obj/item/stack/tile/carpet/blue + ) amount = 50 /datum/supply_packs/linoleum name = "Linoleum" - containertype = /obj/structure/closet + containertype = /obj/structure/closet/crate containername = "Linoleum crate" cost = 15 group = "Miscellaneous" @@ -1463,10 +1336,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee containertype = /obj/structure/closet/crate/secure group = "Engineering" access = access_tech_storage - contains = list(/obj/item/weapon/stock_parts/micro_laser, - /obj/item/weapon/stock_parts/capacitor, - /obj/item/weapon/stock_parts/matter_bin, - /obj/item/weapon/circuitboard/pacman) + contains = list( + /obj/item/weapon/stock_parts/micro_laser, + /obj/item/weapon/stock_parts/capacitor, + /obj/item/weapon/stock_parts/matter_bin, + /obj/item/weapon/circuitboard/pacman + ) /datum/supply_packs/super_pacman_parts name = "Super P.A.C.M.A.N. portable generator parts" @@ -1475,20 +1350,24 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee containertype = /obj/structure/closet/crate/secure group = "Engineering" access = access_tech_storage - contains = list(/obj/item/weapon/stock_parts/micro_laser, - /obj/item/weapon/stock_parts/capacitor, - /obj/item/weapon/stock_parts/matter_bin, - /obj/item/weapon/circuitboard/pacman/super) + contains = list( + /obj/item/weapon/stock_parts/micro_laser, + /obj/item/weapon/stock_parts/capacitor, + /obj/item/weapon/stock_parts/matter_bin, + /obj/item/weapon/circuitboard/pacman/super + ) /datum/supply_packs/witch name = "Witch costume" containername = "Witch costume" containertype = /obj/structure/closet cost = 20 - contains = list(/obj/item/clothing/suit/wizrobe/marisa/fake, - /obj/item/clothing/shoes/sandal, - /obj/item/clothing/head/wizard/marisa/fake, - /obj/item/weapon/staff/broom) + contains = list( + /obj/item/clothing/suit/wizrobe/marisa/fake, + /obj/item/clothing/shoes/sandal, + /obj/item/clothing/head/wizard/marisa/fake, + /obj/item/weapon/staff/broom + ) group = "Miscellaneous" /datum/supply_packs/randomised/costume_hats @@ -1497,20 +1376,22 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee containertype = /obj/structure/closet cost = 10 num_contained = 3 - contains = list(/obj/item/clothing/head/redcoat, - /obj/item/clothing/head/mailman, - /obj/item/clothing/head/plaguedoctorhat, - /obj/item/clothing/head/pirate, - /obj/item/clothing/head/hasturhood, - /obj/item/clothing/head/powdered_wig, - /obj/item/clothing/head/hairflower, - /obj/item/clothing/head/hairflower/yellow, - /obj/item/clothing/head/hairflower/blue, - /obj/item/clothing/head/hairflower/pink, - /obj/item/clothing/mask/gas/owl_mask, - /obj/item/clothing/mask/gas/monkeymask, - /obj/item/clothing/head/helmet/gladiator, - /obj/item/clothing/head/ushanka) + contains = list( + /obj/item/clothing/head/redcoat, + /obj/item/clothing/head/mailman, + /obj/item/clothing/head/plaguedoctorhat, + /obj/item/clothing/head/pirate, + /obj/item/clothing/head/hasturhood, + /obj/item/clothing/head/powdered_wig, + /obj/item/clothing/head/hairflower, + /obj/item/clothing/head/hairflower/yellow, + /obj/item/clothing/head/hairflower/blue, + /obj/item/clothing/head/hairflower/pink, + /obj/item/clothing/mask/gas/owl_mask, + /obj/item/clothing/mask/gas/monkeymask, + /obj/item/clothing/head/helmet/gladiator, + /obj/item/clothing/head/ushanka + ) group = "Miscellaneous" /datum/supply_packs/spare_pda @@ -1519,9 +1400,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee containertype = /obj/structure/closet/crate containername = "Spare PDA crate" group = "Supply" - contains = list(/obj/item/device/pda, - /obj/item/device/pda, - /obj/item/device/pda) + contains = list(/obj/item/device/pda = 3) /datum/supply_packs/randomised/dresses name = "Womens formal dress locker" @@ -1529,17 +1408,19 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee containertype = /obj/structure/closet cost = 15 num_contained = 3 - contains = list(/obj/item/clothing/under/wedding/bride_orange, - /obj/item/clothing/under/wedding/bride_purple, - /obj/item/clothing/under/wedding/bride_blue, - /obj/item/clothing/under/wedding/bride_red, - /obj/item/clothing/under/wedding/bride_white, - /obj/item/clothing/under/sundress, - /obj/item/clothing/under/dress/dress_green, - /obj/item/clothing/under/dress/dress_pink, - /obj/item/clothing/under/dress/dress_orange, - /obj/item/clothing/under/dress/dress_yellow, - /obj/item/clothing/under/dress/dress_saloon) + contains = list( + /obj/item/clothing/under/wedding/bride_orange, + /obj/item/clothing/under/wedding/bride_purple, + /obj/item/clothing/under/wedding/bride_blue, + /obj/item/clothing/under/wedding/bride_red, + /obj/item/clothing/under/wedding/bride_white, + /obj/item/clothing/under/sundress, + /obj/item/clothing/under/dress/dress_green, + /obj/item/clothing/under/dress/dress_pink, + /obj/item/clothing/under/dress/dress_orange, + /obj/item/clothing/under/dress/dress_yellow, + /obj/item/clothing/under/dress/dress_saloon + ) group = "Miscellaneous" /datum/supply_packs/painters @@ -1548,20 +1429,20 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee containername = "station painting supplies crate" containertype = /obj/structure/closet/crate group = "Engineering" - contains = list(/obj/item/device/pipe_painter, - /obj/item/device/pipe_painter, - /obj/item/device/floor_painter, - /obj/item/device/floor_painter) - + contains = list( + /obj/item/device/pipe_painter = 2, + /obj/item/device/floor_painter = 2, + /obj/item/device/closet_painter = 2 + ) /datum/supply_packs/randomised/exosuit_mod num_contained = 1 contains = list( - /obj/item/device/kit/paint/ripley, - /obj/item/device/kit/paint/ripley/death, - /obj/item/device/kit/paint/ripley/flames_red, - /obj/item/device/kit/paint/ripley/flames_blue - ) + /obj/item/device/kit/paint/ripley, + /obj/item/device/kit/paint/ripley/death, + /obj/item/device/kit/paint/ripley/flames_red, + /obj/item/device/kit/paint/ripley/flames_blue + ) name = "Random APLU modkit" cost = 200 containertype = /obj/structure/closet/crate @@ -1570,32 +1451,29 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/randomised/exosuit_mod/durand contains = list( - /obj/item/device/kit/paint/durand, - /obj/item/device/kit/paint/durand/seraph, - /obj/item/device/kit/paint/durand/phazon - ) + /obj/item/device/kit/paint/durand, + /obj/item/device/kit/paint/durand/seraph, + /obj/item/device/kit/paint/durand/phazon + ) name = "Random Durand exosuit modkit" /datum/supply_packs/randomised/exosuit_mod/gygax contains = list( - /obj/item/device/kit/paint/gygax, - /obj/item/device/kit/paint/gygax/darkgygax, - /obj/item/device/kit/paint/gygax/recitence - ) + /obj/item/device/kit/paint/gygax, + /obj/item/device/kit/paint/gygax/darkgygax, + /obj/item/device/kit/paint/gygax/recitence + ) name = "Random Gygax exosuit modkit" /datum/supply_packs/engineeringvoidsuits name = "Engineering voidsuits" - contains = list(/obj/item/clothing/suit/space/void/engineering, - /obj/item/clothing/suit/space/void/engineering, - /obj/item/clothing/head/helmet/space/void/engineering, - /obj/item/clothing/head/helmet/space/void/engineering, - /obj/item/clothing/mask/breath, - /obj/item/clothing/mask/breath, - /obj/item/clothing/shoes/magboots, - /obj/item/clothing/shoes/magboots, - /obj/item/weapon/tank/oxygen, - /obj/item/weapon/tank/oxygen) + contains = list( + /obj/item/clothing/suit/space/void/engineering = 2, + /obj/item/clothing/head/helmet/space/void/engineering = 2, + /obj/item/clothing/mask/breath = 2, + /obj/item/clothing/shoes/magboots = 2, + /obj/item/weapon/tank/oxygen = 2 + ) cost = 40 containertype = "/obj/structure/closet/crate/secure" containername = "Engineering voidsuit crate" @@ -1604,16 +1482,13 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/atmosvoidsuits name = "Atmospheric voidsuits" - contains = list(/obj/item/clothing/suit/space/void/atmos, - /obj/item/clothing/suit/space/void/atmos, - /obj/item/clothing/head/helmet/space/void/atmos, - /obj/item/clothing/head/helmet/space/void/atmos, - /obj/item/clothing/mask/breath, - /obj/item/clothing/mask/breath, - /obj/item/clothing/shoes/magboots, - /obj/item/clothing/shoes/magboots, - /obj/item/weapon/tank/oxygen, - /obj/item/weapon/tank/oxygen) + contains = list( + /obj/item/clothing/suit/space/void/atmos = 2, + /obj/item/clothing/head/helmet/space/void/atmos = 2, + /obj/item/clothing/mask/breath = 2, + /obj/item/clothing/shoes/magboots = 2, + /obj/item/weapon/tank/oxygen = 2, + ) cost = 45 containertype = "/obj/structure/closet/crate/secure" containername = "Atmospheric voidsuit crate" @@ -1622,14 +1497,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/miningvoidsuits name = "Mining voidsuits" - contains = list(/obj/item/clothing/suit/space/void/mining, - /obj/item/clothing/suit/space/void/mining, - /obj/item/clothing/head/helmet/space/void/mining, - /obj/item/clothing/head/helmet/space/void/mining, - /obj/item/clothing/mask/breath, - /obj/item/clothing/mask/breath, - /obj/item/weapon/tank/oxygen, - /obj/item/weapon/tank/oxygen) + contains = list( + /obj/item/clothing/suit/space/void/mining = 2, + /obj/item/clothing/head/helmet/space/void/mining = 2, + /obj/item/clothing/mask/breath = 2, + /obj/item/weapon/tank/oxygen = 2 + ) cost = 35 containertype = "/obj/structure/closet/crate/secure" containername = "Mining voidsuit crate" @@ -1639,10 +1512,15 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/randomised/webbing name = "Webbing crate" num_contained = 4 - contains = list(/obj/item/clothing/accessory/storage/black_vest, - /obj/item/clothing/accessory/storage/brown_vest, - /obj/item/clothing/accessory/storage/white_vest, - /obj/item/clothing/accessory/storage/webbing) + contains = list( + /obj/item/clothing/accessory/storage/black_vest, + /obj/item/clothing/accessory/storage/brown_vest, + /obj/item/clothing/accessory/storage/white_vest, + /obj/item/clothing/accessory/storage/black_drop_pouches, + /obj/item/clothing/accessory/storage/brown_drop_pouches, + /obj/item/clothing/accessory/storage/white_drop_pouches, + /obj/item/clothing/accessory/storage/webbing + ) cost = 15 containertype = "/obj/structure/closet/crate" containername = "Webbing crate" @@ -1650,16 +1528,13 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/securityvoidsuits name = "Security voidsuits" - contains = list(/obj/item/clothing/suit/space/void/security, - /obj/item/clothing/suit/space/void/security, - /obj/item/clothing/head/helmet/space/void/security, - /obj/item/clothing/head/helmet/space/void/security, - /obj/item/clothing/mask/breath, - /obj/item/clothing/mask/breath, - /obj/item/clothing/shoes/magboots, - /obj/item/clothing/shoes/magboots, - /obj/item/weapon/tank/oxygen, - /obj/item/weapon/tank/oxygen) + contains = list( + /obj/item/clothing/suit/space/void/security = 2, + /obj/item/clothing/head/helmet/space/void/security = 2, + /obj/item/clothing/mask/breath = 2, + /obj/item/clothing/shoes/magboots = 2, + /obj/item/weapon/tank/oxygen = 2 + ) cost = 55 containertype = "/obj/structure/closet/crate/secure" containername = "Security voidsuit crate" @@ -1669,10 +1544,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/randomised/holster name = "Holster crate" num_contained = 4 - contains = list(/obj/item/clothing/accessory/holster, - /obj/item/clothing/accessory/holster/armpit, - /obj/item/clothing/accessory/holster/waist, - /obj/item/clothing/accessory/holster/hip) + contains = list( + /obj/item/clothing/accessory/holster, + /obj/item/clothing/accessory/holster/armpit, + /obj/item/clothing/accessory/holster/waist, + /obj/item/clothing/accessory/holster/hip + ) cost = 15 containertype = "/obj/structure/closet/crate/secure" containername = "Holster crate" @@ -1681,16 +1558,13 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/medicalvoidsuits name = "Medical voidsuits" - contains = list(/obj/item/clothing/suit/space/void/medical, - /obj/item/clothing/suit/space/void/medical, - /obj/item/clothing/head/helmet/space/void/medical, - /obj/item/clothing/head/helmet/space/void/medical, - /obj/item/clothing/mask/breath, - /obj/item/clothing/mask/breath, - /obj/item/clothing/shoes/magboots, - /obj/item/clothing/shoes/magboots, - /obj/item/weapon/tank/oxygen, - /obj/item/weapon/tank/oxygen) + contains = list( + /obj/item/clothing/suit/space/void/medical = 2, + /obj/item/clothing/head/helmet/space/void/medical = 2, + /obj/item/clothing/mask/breath = 2, + /obj/item/clothing/shoes/magboots = 2, + /obj/item/weapon/tank/oxygen = 2 + ) cost = 40 containertype = "/obj/structure/closet/crate/secure" containername = "Medical voidsuit crate" @@ -1699,18 +1573,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/securityextragear name = "Security surplus equipment" - contains = list(/obj/item/weapon/storage/belt/security, - /obj/item/weapon/storage/belt/security, - /obj/item/weapon/storage/belt/security, - /obj/item/clothing/glasses/sunglasses/sechud, - /obj/item/clothing/glasses/sunglasses/sechud, - /obj/item/clothing/glasses/sunglasses/sechud, - /obj/item/device/radio/headset/headset_sec/alt, - /obj/item/device/radio/headset/headset_sec/alt, - /obj/item/device/radio/headset/headset_sec/alt, - /obj/item/clothing/suit/storage/hooded/wintercoat/security, - /obj/item/clothing/suit/storage/hooded/wintercoat/security, - /obj/item/clothing/suit/storage/hooded/wintercoat/security) + contains = list( + /obj/item/weapon/storage/belt/security = 3, + /obj/item/clothing/glasses/sunglasses/sechud = 3, + /obj/item/device/radio/headset/headset_sec/alt = 3, + /obj/item/clothing/suit/storage/hooded/wintercoat/security = 3 + ) cost = 25 containertype = "/obj/structure/closet/crate/secure" containername = "Security surplus equipment" @@ -1719,26 +1587,27 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/detectivegear name = "Forensic investigation equipment" - contains = list(/obj/item/weapon/storage/box/evidence, - /obj/item/weapon/storage/box/evidence, - /obj/item/clothing/suit/storage/vest/detective, - /obj/item/weapon/cartridge/detective, - /obj/item/device/radio/headset/headset_sec, - /obj/item/taperoll/police, - /obj/item/clothing/glasses/sunglasses, - /obj/item/device/camera, - /obj/item/weapon/folder/red, - /obj/item/weapon/folder/blue, - /obj/item/weapon/storage/belt/detective, - /obj/item/clothing/gloves/black, - /obj/item/device/taperecorder, - /obj/item/device/mass_spectrometer, - /obj/item/device/camera_film, - /obj/item/device/camera_film, - /obj/item/weapon/storage/photo_album, - /obj/item/device/reagent_scanner, - /obj/item/device/flashlight/maglight) - cost = 35 + contains = list( + /obj/item/weapon/storage/box/evidence = 2, + /obj/item/clothing/suit/storage/vest/detective, + /obj/item/weapon/cartridge/detective, + /obj/item/device/radio/headset/headset_sec, + /obj/item/taperoll/police, + /obj/item/clothing/glasses/sunglasses, + /obj/item/device/camera, + /obj/item/weapon/folder/red, + /obj/item/weapon/folder/blue, + /obj/item/weapon/storage/belt/detective, + /obj/item/clothing/gloves/black, + /obj/item/device/taperecorder, + /obj/item/device/mass_spectrometer, + /obj/item/device/camera_film = 2, + /obj/item/weapon/storage/photo_album, + /obj/item/device/reagent_scanner, + /obj/item/device/flashlight/maglight, + /obj/item/weapon/storage/briefcase/crimekit + ) + cost = 40 containertype = "/obj/structure/closet/crate/secure" containername = "Forensic equipment" access = access_forensics_lockers @@ -1746,26 +1615,20 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/detectiveclothes name = "Investigation apparel" - contains = list(/obj/item/clothing/under/det/black, - /obj/item/clothing/under/det/black, - /obj/item/clothing/under/det/grey, - /obj/item/clothing/under/det/grey, - /obj/item/clothing/head/det/grey, - /obj/item/clothing/head/det/grey, - /obj/item/clothing/under/det, - /obj/item/clothing/under/det, - /obj/item/clothing/head/det, - /obj/item/clothing/head/det, - /obj/item/clothing/suit/storage/det_trench, - /obj/item/clothing/suit/storage/det_trench/grey, - /obj/item/clothing/suit/storage/forensics/red, - /obj/item/clothing/suit/storage/forensics/blue, - /obj/item/clothing/under/det/corporate, - /obj/item/clothing/under/det/corporate, - /obj/item/clothing/accessory/badge/holo/detective, - /obj/item/clothing/accessory/badge/holo/detective, - /obj/item/clothing/gloves/black, - /obj/item/clothing/gloves/black) + contains = list( + /obj/item/clothing/under/det/black = 2, + /obj/item/clothing/under/det/grey = 2, + /obj/item/clothing/head/det/grey = 2, + /obj/item/clothing/under/det = 2, + /obj/item/clothing/head/det = 2, + /obj/item/clothing/suit/storage/det_trench, + /obj/item/clothing/suit/storage/det_trench/grey, + /obj/item/clothing/suit/storage/forensics/red, + /obj/item/clothing/suit/storage/forensics/blue, + /obj/item/clothing/under/det/corporate = 2, + /obj/item/clothing/accessory/badge/holo/detective = 2, + /obj/item/clothing/gloves/black = 2 + ) cost = 20 containertype = "/obj/structure/closet/crate/secure" containername = "Investigation clothing" @@ -1774,27 +1637,29 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/officergear name = "Officer equipment" - contains = list(/obj/item/clothing/suit/storage/vest/officer, - /obj/item/clothing/head/helmet, - /obj/item/weapon/cartridge/security, - /obj/item/clothing/accessory/badge/holo, - /obj/item/clothing/accessory/badge/holo/cord, - /obj/item/device/radio/headset/headset_sec, - /obj/item/weapon/storage/belt/security, - /obj/item/device/flash, - /obj/item/weapon/reagent_containers/spray/pepper, - /obj/item/weapon/grenade/flashbang, - /obj/item/weapon/melee/baton/loaded, - /obj/item/clothing/glasses/sunglasses/sechud, - /obj/item/taperoll/police, - /obj/item/clothing/gloves/black, - /obj/item/device/hailer, - /obj/item/device/flashlight/flare, - /obj/item/clothing/accessory/storage/black_vest, - /obj/item/clothing/head/soft/sec/corp, - /obj/item/clothing/under/rank/security/corp, - /obj/item/weapon/gun/energy/taser, - /obj/item/device/flashlight/maglight) + contains = list( + /obj/item/clothing/suit/storage/vest/officer, + /obj/item/clothing/head/helmet, + /obj/item/weapon/cartridge/security, + /obj/item/clothing/accessory/badge/holo, + /obj/item/clothing/accessory/badge/holo/cord, + /obj/item/device/radio/headset/headset_sec, + /obj/item/weapon/storage/belt/security, + /obj/item/device/flash, + /obj/item/weapon/reagent_containers/spray/pepper, + /obj/item/weapon/grenade/flashbang, + /obj/item/weapon/melee/baton/loaded, + /obj/item/clothing/glasses/sunglasses/sechud, + /obj/item/taperoll/police, + /obj/item/clothing/gloves/black, + /obj/item/device/hailer, + /obj/item/device/flashlight/flare, + /obj/item/clothing/accessory/storage/black_vest, + /obj/item/clothing/head/soft/sec/corp, + /obj/item/clothing/under/rank/security/corp, + /obj/item/weapon/gun/energy/taser, + /obj/item/device/flashlight/maglight + ) cost = 30 containertype = "/obj/structure/closet/crate/secure" containername = "Officer equipment" @@ -1803,25 +1668,27 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/wardengear name = "Warden equipment" - contains = list(/obj/item/clothing/suit/storage/vest/warden, - /obj/item/clothing/under/rank/warden, - /obj/item/clothing/under/rank/warden/corp, - /obj/item/clothing/suit/armor/vest/warden, - /obj/item/clothing/suit/armor/vest/warden/alt, - /obj/item/clothing/head/helmet/warden, - /obj/item/weapon/cartridge/security, - /obj/item/device/radio/headset/headset_sec, - /obj/item/clothing/glasses/sunglasses/sechud, - /obj/item/taperoll/police, - /obj/item/device/hailer, - /obj/item/clothing/accessory/badge/holo/warden, - /obj/item/weapon/storage/box/flashbangs, - /obj/item/weapon/storage/belt/security, - /obj/item/weapon/reagent_containers/spray/pepper, - /obj/item/weapon/melee/baton/loaded, - /obj/item/weapon/storage/box/holobadge, - /obj/item/clothing/head/beret/sec/corporate/warden, - /obj/item/device/flashlight/maglight) + contains = list( + /obj/item/clothing/suit/storage/vest/warden, + /obj/item/clothing/under/rank/warden, + /obj/item/clothing/under/rank/warden/corp, + /obj/item/clothing/suit/armor/vest/warden, + /obj/item/clothing/suit/armor/vest/warden/alt, + /obj/item/clothing/head/helmet/warden, + /obj/item/weapon/cartridge/security, + /obj/item/device/radio/headset/headset_sec, + /obj/item/clothing/glasses/sunglasses/sechud, + /obj/item/taperoll/police, + /obj/item/device/hailer, + /obj/item/clothing/accessory/badge/holo/warden, + /obj/item/weapon/storage/box/flashbangs, + /obj/item/weapon/storage/belt/security, + /obj/item/weapon/reagent_containers/spray/pepper, + /obj/item/weapon/melee/baton/loaded, + /obj/item/weapon/storage/box/holobadge, + /obj/item/clothing/head/beret/sec/corporate/warden, + /obj/item/device/flashlight/maglight + ) cost = 45 containertype = "/obj/structure/closet/crate/secure" containername = "Warden equipment" @@ -1830,23 +1697,25 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/headofsecgear name = "Head of security equipment" - contains = list(/obj/item/clothing/head/helmet/HoS, - /obj/item/clothing/suit/storage/vest/hos, - /obj/item/clothing/under/rank/head_of_security/corp, - /obj/item/clothing/suit/armor/hos, - /obj/item/clothing/head/helmet/HoS/dermal, - /obj/item/weapon/cartridge/hos, - /obj/item/device/radio/headset/heads/hos, - /obj/item/clothing/glasses/sunglasses/sechud, - /obj/item/weapon/storage/belt/security, - /obj/item/device/flash, - /obj/item/device/hailer, - /obj/item/clothing/accessory/badge/holo/hos, - /obj/item/clothing/accessory/holster/waist, - /obj/item/weapon/melee/telebaton, - /obj/item/weapon/shield/riot/tele, - /obj/item/clothing/head/beret/sec/corporate/hos, - /obj/item/device/flashlight/maglight) + contains = list( + /obj/item/clothing/head/helmet/HoS, + /obj/item/clothing/suit/storage/vest/hos, + /obj/item/clothing/under/rank/head_of_security/corp, + /obj/item/clothing/suit/armor/hos, + /obj/item/clothing/head/helmet/HoS/dermal, + /obj/item/weapon/cartridge/hos, + /obj/item/device/radio/headset/heads/hos, + /obj/item/clothing/glasses/sunglasses/sechud, + /obj/item/weapon/storage/belt/security, + /obj/item/device/flash, + /obj/item/device/hailer, + /obj/item/clothing/accessory/badge/holo/hos, + /obj/item/clothing/accessory/holster/waist, + /obj/item/weapon/melee/telebaton, + /obj/item/weapon/shield/riot/tele, + /obj/item/clothing/head/beret/sec/corporate/hos, + /obj/item/device/flashlight/maglight + ) cost = 65 containertype = "/obj/structure/closet/crate/secure" containername = "Head of security equipment" @@ -1855,34 +1724,19 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/securityclothing name = "Security uniform crate" - contains = list(/obj/item/weapon/storage/backpack/satchel_sec, - /obj/item/weapon/storage/backpack/satchel_sec, - /obj/item/weapon/storage/backpack/security, - /obj/item/weapon/storage/backpack/security, - /obj/item/clothing/accessory/armband, - /obj/item/clothing/accessory/armband, - /obj/item/clothing/accessory/armband, - /obj/item/clothing/accessory/armband, - /obj/item/clothing/under/rank/security, - /obj/item/clothing/under/rank/security, - /obj/item/clothing/under/rank/security, - /obj/item/clothing/under/rank/security, - /obj/item/clothing/under/rank/security2, - /obj/item/clothing/under/rank/security2, - /obj/item/clothing/under/rank/security2, - /obj/item/clothing/under/rank/security2, - /obj/item/clothing/under/rank/warden, - /obj/item/clothing/under/rank/head_of_security, - /obj/item/clothing/suit/armor/hos/jensen, - /obj/item/clothing/head/soft/sec, - /obj/item/clothing/head/soft/sec, - /obj/item/clothing/head/soft/sec, - /obj/item/clothing/head/soft/sec, - /obj/item/clothing/gloves/black, - /obj/item/clothing/gloves/black, - /obj/item/clothing/gloves/black, - /obj/item/clothing/gloves/black, - /obj/item/weapon/storage/box/holobadge) + contains = list( + /obj/item/weapon/storage/backpack/satchel/sec = 2, + /obj/item/weapon/storage/backpack/security = 2, + /obj/item/clothing/accessory/armband = 4, + /obj/item/clothing/under/rank/security = 4, + /obj/item/clothing/under/rank/security2 = 4, + /obj/item/clothing/under/rank/warden, + /obj/item/clothing/under/rank/head_of_security, + /obj/item/clothing/suit/armor/hos/jensen, + /obj/item/clothing/head/soft/sec = 4, + /obj/item/clothing/gloves/black = 4, + /obj/item/weapon/storage/box/holobadge + ) cost = 20 containertype = "/obj/structure/closet/crate/secure" containername = "Security uniform crate" @@ -1891,33 +1745,21 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/navybluesecurityclothing name = "Navy blue security uniform crate" - contains = list(/obj/item/weapon/storage/backpack/satchel_sec, - /obj/item/weapon/storage/backpack/satchel_sec, - /obj/item/weapon/storage/backpack/security, - /obj/item/weapon/storage/backpack/security, - /obj/item/clothing/under/rank/security/navyblue, - /obj/item/clothing/under/rank/security/navyblue, - /obj/item/clothing/under/rank/security/navyblue, - /obj/item/clothing/under/rank/security/navyblue, - /obj/item/clothing/suit/security/navyofficer, - /obj/item/clothing/suit/security/navyofficer, - /obj/item/clothing/suit/security/navyofficer, - /obj/item/clothing/suit/security/navyofficer, - /obj/item/clothing/under/rank/warden/navyblue, - /obj/item/clothing/suit/security/navywarden, - /obj/item/clothing/under/rank/head_of_security/navyblue, - /obj/item/clothing/suit/security/navyhos, - /obj/item/clothing/head/beret/sec/navy/officer, - /obj/item/clothing/head/beret/sec/navy/officer, - /obj/item/clothing/head/beret/sec/navy/officer, - /obj/item/clothing/head/beret/sec/navy/officer, - /obj/item/clothing/head/beret/sec/navy/warden, - /obj/item/clothing/head/beret/sec/navy/hos, - /obj/item/clothing/gloves/black, - /obj/item/clothing/gloves/black, - /obj/item/clothing/gloves/black, - /obj/item/clothing/gloves/black, - /obj/item/weapon/storage/box/holobadge) + contains = list( + /obj/item/weapon/storage/backpack/satchel/sec = 2, + /obj/item/weapon/storage/backpack/security = 2, + /obj/item/clothing/under/rank/security/navyblue = 4, + /obj/item/clothing/suit/security/navyofficer = 4, + /obj/item/clothing/under/rank/warden/navyblue, + /obj/item/clothing/suit/security/navywarden, + /obj/item/clothing/under/rank/head_of_security/navyblue, + /obj/item/clothing/suit/security/navyhos, + /obj/item/clothing/head/beret/sec/navy/officer = 4, + /obj/item/clothing/head/beret/sec/navy/warden, + /obj/item/clothing/head/beret/sec/navy/hos, + /obj/item/clothing/gloves/black = 4, + /obj/item/weapon/storage/box/holobadge + ) cost = 20 containertype = "/obj/structure/closet/crate/secure" containername = "Navy blue security uniform crate" @@ -1926,33 +1768,20 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/corporatesecurityclothing name = "Corporate security uniform crate" - contains = list(/obj/item/weapon/storage/backpack/satchel_sec, - /obj/item/weapon/storage/backpack/satchel_sec, - /obj/item/weapon/storage/backpack/security, - /obj/item/weapon/storage/backpack/security, - /obj/item/clothing/under/rank/security/corp, - /obj/item/clothing/under/rank/security/corp, - /obj/item/clothing/under/rank/security/corp, - /obj/item/clothing/under/rank/security/corp, - /obj/item/clothing/head/soft/sec/corp, - /obj/item/clothing/head/soft/sec/corp, - /obj/item/clothing/head/soft/sec/corp, - /obj/item/clothing/head/soft/sec/corp, - /obj/item/clothing/under/rank/warden/corp, - /obj/item/clothing/under/rank/head_of_security/corp, - /obj/item/clothing/head/beret/sec, - /obj/item/clothing/head/beret/sec, - /obj/item/clothing/head/beret/sec, - /obj/item/clothing/head/beret/sec, - /obj/item/clothing/head/beret/sec/corporate/warden, - /obj/item/clothing/head/beret/sec/corporate/hos, - /obj/item/clothing/under/det/corporate, - /obj/item/clothing/under/det/corporate, - /obj/item/clothing/gloves/black, - /obj/item/clothing/gloves/black, - /obj/item/clothing/gloves/black, - /obj/item/clothing/gloves/black, - /obj/item/weapon/storage/box/holobadge) + contains = list( + /obj/item/weapon/storage/backpack/satchel/sec = 2, + /obj/item/weapon/storage/backpack/security = 2, + /obj/item/clothing/under/rank/security/corp = 4, + /obj/item/clothing/head/soft/sec/corp = 4, + /obj/item/clothing/under/rank/warden/corp, + /obj/item/clothing/under/rank/head_of_security/corp, + /obj/item/clothing/head/beret/sec = 4, + /obj/item/clothing/head/beret/sec/corporate/warden, + /obj/item/clothing/head/beret/sec/corporate/hos, + /obj/item/clothing/under/det/corporate = 2, + /obj/item/clothing/gloves/black = 4, + /obj/item/weapon/storage/box/holobadge + ) cost = 20 containertype = "/obj/structure/closet/crate/secure" containername = "Corporate security uniform crate" @@ -1961,13 +1790,15 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/securitybiosuit name = "Security biohazard gear" - contains = list(/obj/item/clothing/head/bio_hood/security, - /obj/item/clothing/under/rank/security, - /obj/item/clothing/suit/bio_suit/security, - /obj/item/clothing/shoes/white, - /obj/item/clothing/mask/gas, - /obj/item/weapon/tank/oxygen, - /obj/item/clothing/gloves/latex) + contains = list( + /obj/item/clothing/head/bio_hood/security, + /obj/item/clothing/under/rank/security, + /obj/item/clothing/suit/bio_suit/security, + /obj/item/clothing/shoes/white, + /obj/item/clothing/mask/gas, + /obj/item/weapon/tank/oxygen, + /obj/item/clothing/gloves/latex + ) cost = 35 containertype = "/obj/structure/closet/crate/secure" containername = "Security biohazard gear" @@ -1976,18 +1807,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/medicalextragear name = "Medical surplus equipment" - contains = list(/obj/item/weapon/storage/belt/medical, - /obj/item/weapon/storage/belt/medical, - /obj/item/weapon/storage/belt/medical, - /obj/item/clothing/glasses/hud/health, - /obj/item/clothing/glasses/hud/health, - /obj/item/clothing/glasses/hud/health, - /obj/item/device/radio/headset/headset_med/alt, - /obj/item/device/radio/headset/headset_med/alt, - /obj/item/device/radio/headset/headset_med/alt, - /obj/item/clothing/suit/storage/hooded/wintercoat/medical, - /obj/item/clothing/suit/storage/hooded/wintercoat/medical, - /obj/item/clothing/suit/storage/hooded/wintercoat/medical) + contains = list( + /obj/item/weapon/storage/belt/medical = 3, + /obj/item/clothing/glasses/hud/health = 3, + /obj/item/device/radio/headset/headset_med/alt = 3, + /obj/item/clothing/suit/storage/hooded/wintercoat/medical = 3 + ) cost = 15 containertype = "/obj/structure/closet/crate/secure" containername = "Medical surplus equipment" @@ -1996,21 +1821,23 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/cmogear name = "Chief medical officer equipment" - contains = list(/obj/item/weapon/storage/belt/medical, - /obj/item/device/radio/headset/heads/cmo, - /obj/item/clothing/under/rank/chief_medical_officer, - /obj/item/weapon/reagent_containers/hypospray, - /obj/item/clothing/accessory/stethoscope, - /obj/item/clothing/glasses/hud/health, - /obj/item/clothing/suit/storage/toggle/labcoat/cmo, - /obj/item/clothing/suit/storage/toggle/labcoat/cmoalt, - /obj/item/clothing/mask/surgical, - /obj/item/clothing/shoes/white, - /obj/item/weapon/cartridge/cmo, - /obj/item/clothing/gloves/latex, - /obj/item/device/healthanalyzer, - /obj/item/device/flashlight/pen, - /obj/item/weapon/reagent_containers/syringe) + contains = list( + /obj/item/weapon/storage/belt/medical, + /obj/item/device/radio/headset/heads/cmo, + /obj/item/clothing/under/rank/chief_medical_officer, + /obj/item/weapon/reagent_containers/hypospray, + /obj/item/clothing/accessory/stethoscope, + /obj/item/clothing/glasses/hud/health, + /obj/item/clothing/suit/storage/toggle/labcoat/cmo, + /obj/item/clothing/suit/storage/toggle/labcoat/cmoalt, + /obj/item/clothing/mask/surgical, + /obj/item/clothing/shoes/white, + /obj/item/weapon/cartridge/cmo, + /obj/item/clothing/gloves/latex, + /obj/item/device/healthanalyzer, + /obj/item/device/flashlight/pen, + /obj/item/weapon/reagent_containers/syringe + ) cost = 60 containertype = "/obj/structure/closet/crate/secure" containername = "Chief medical officer equipment" @@ -2019,20 +1846,22 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/doctorgear name = "Medical Doctor equipment" - contains = list(/obj/item/weapon/storage/belt/medical, - /obj/item/device/radio/headset/headset_med, - /obj/item/clothing/under/rank/medical, - /obj/item/clothing/accessory/stethoscope, - /obj/item/clothing/glasses/hud/health, - /obj/item/clothing/suit/storage/toggle/labcoat, - /obj/item/clothing/mask/surgical, - /obj/item/weapon/storage/firstaid/adv, - /obj/item/clothing/shoes/white, - /obj/item/weapon/cartridge/medical, - /obj/item/clothing/gloves/latex, - /obj/item/device/healthanalyzer, - /obj/item/device/flashlight/pen, - /obj/item/weapon/reagent_containers/syringe) + contains = list( + /obj/item/weapon/storage/belt/medical, + /obj/item/device/radio/headset/headset_med, + /obj/item/clothing/under/rank/medical, + /obj/item/clothing/accessory/stethoscope, + /obj/item/clothing/glasses/hud/health, + /obj/item/clothing/suit/storage/toggle/labcoat, + /obj/item/clothing/mask/surgical, + /obj/item/weapon/storage/firstaid/adv, + /obj/item/clothing/shoes/white, + /obj/item/weapon/cartridge/medical, + /obj/item/clothing/gloves/latex, + /obj/item/device/healthanalyzer, + /obj/item/device/flashlight/pen, + /obj/item/weapon/reagent_containers/syringe + ) cost = 20 containertype = "/obj/structure/closet/crate/secure" containername = "Medical Doctor equipment" @@ -2041,20 +1870,22 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/chemistgear name = "Chemist equipment" - contains = list(/obj/item/weapon/storage/box/beakers, - /obj/item/device/radio/headset/headset_med, - /obj/item/weapon/storage/box/autoinjectors, - /obj/item/clothing/under/rank/chemist, - /obj/item/clothing/glasses/science, - /obj/item/clothing/suit/storage/toggle/labcoat/chemist, - /obj/item/clothing/mask/surgical, - /obj/item/clothing/shoes/white, - /obj/item/weapon/cartridge/chemistry, - /obj/item/clothing/gloves/latex, - /obj/item/weapon/reagent_containers/dropper, - /obj/item/device/healthanalyzer, - /obj/item/weapon/storage/box/pillbottles, - /obj/item/weapon/reagent_containers/syringe) + contains = list( + /obj/item/weapon/storage/box/beakers, + /obj/item/device/radio/headset/headset_med, + /obj/item/weapon/storage/box/autoinjectors, + /obj/item/clothing/under/rank/chemist, + /obj/item/clothing/glasses/science, + /obj/item/clothing/suit/storage/toggle/labcoat/chemist, + /obj/item/clothing/mask/surgical, + /obj/item/clothing/shoes/white, + /obj/item/weapon/cartridge/chemistry, + /obj/item/clothing/gloves/latex, + /obj/item/weapon/reagent_containers/dropper, + /obj/item/device/healthanalyzer, + /obj/item/weapon/storage/box/pillbottles, + /obj/item/weapon/reagent_containers/syringe + ) cost = 15 containertype = "/obj/structure/closet/crate/secure" containername = "Chemist equipment" @@ -2063,25 +1894,27 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/paramedicgear name = "Paramedic equipment" - contains = list(/obj/item/weapon/storage/belt/medical/emt, - /obj/item/device/radio/headset/headset_med, - /obj/item/clothing/under/rank/medical/black, - /obj/item/clothing/accessory/armband/medgreen, - /obj/item/clothing/glasses/hud/health, - /obj/item/clothing/suit/storage/toggle/labcoat/emt, - /obj/item/clothing/under/rank/medical/paramedic, - /obj/item/clothing/suit/storage/toggle/fr_jacket, - /obj/item/clothing/mask/gas, - /obj/item/clothing/under/rank/medical/paramedic, - /obj/item/clothing/accessory/stethoscope, - /obj/item/weapon/storage/firstaid/adv, - /obj/item/clothing/shoes/jackboots, - /obj/item/clothing/gloves/latex, - /obj/item/device/healthanalyzer, - /obj/item/weapon/cartridge/medical, - /obj/item/device/flashlight/pen, - /obj/item/weapon/reagent_containers/syringe, - /obj/item/clothing/accessory/storage/white_vest) + contains = list( + /obj/item/weapon/storage/belt/medical/emt, + /obj/item/device/radio/headset/headset_med, + /obj/item/clothing/under/rank/medical/black, + /obj/item/clothing/accessory/armband/medgreen, + /obj/item/clothing/glasses/hud/health, + /obj/item/clothing/suit/storage/toggle/labcoat/emt, + /obj/item/clothing/under/rank/medical/paramedic, + /obj/item/clothing/suit/storage/toggle/fr_jacket, + /obj/item/clothing/mask/gas, + /obj/item/clothing/under/rank/medical/paramedic, + /obj/item/clothing/accessory/stethoscope, + /obj/item/weapon/storage/firstaid/adv, + /obj/item/clothing/shoes/jackboots, + /obj/item/clothing/gloves/latex, + /obj/item/device/healthanalyzer, + /obj/item/weapon/cartridge/medical, + /obj/item/device/flashlight/pen, + /obj/item/weapon/reagent_containers/syringe, + /obj/item/clothing/accessory/storage/white_vest + ) cost = 20 containertype = "/obj/structure/closet/crate/secure" containername = "Paramedic equipment" @@ -2090,78 +1923,40 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/psychiatristgear name = "Psychiatrist equipment" - contains = list(/obj/item/clothing/under/rank/psych, - /obj/item/device/radio/headset/headset_med, - /obj/item/clothing/under/rank/psych/turtleneck, - /obj/item/clothing/shoes/laceup, - /obj/item/clothing/suit/storage/toggle/labcoat, - /obj/item/clothing/shoes/white, - /obj/item/weapon/clipboard, - /obj/item/weapon/folder/white, - /obj/item/weapon/pen, - /obj/item/weapon/cartridge/medical) + contains = list( + /obj/item/clothing/under/rank/psych, + /obj/item/device/radio/headset/headset_med, + /obj/item/clothing/under/rank/psych/turtleneck, + /obj/item/clothing/shoes/laceup, + /obj/item/clothing/suit/storage/toggle/labcoat, + /obj/item/clothing/shoes/white, + /obj/item/weapon/clipboard, + /obj/item/weapon/folder/white, + /obj/item/weapon/pen, + /obj/item/weapon/cartridge/medical + ) cost = 15 containertype = "/obj/structure/closet/crate/secure" containername = "Psychiatrist equipment" access = access_psychiatrist group = "Medical" -/* -/datum/supply_packs/geneticistgear - name = "Geneticist equipment" - contains = list(/obj/item/weapon/storage/belt/medical, - /obj/item/device/radio/headset/headset_medsci, - /obj/item/clothing/under/rank/geneticist, - /obj/item/clothing/accessory/stethoscope, - /obj/item/clothing/suit/storage/toggle/labcoat/genetics, - /obj/item/clothing/mask/surgical, - /obj/item/clothing/shoes/white, - /obj/item/clothing/gloves/latex, - /obj/item/weapon/cartridge/medical, - /obj/item/device/healthanalyzer, - /obj/item/device/flashlight/pen, - /obj/item/weapon/reagent_containers/syringe) - cost = 15 - containertype = "/obj/structure/closet/crate/secure" - containername = "Geneticist equipment" - access = access_genetics - group = "Medical" -*/ - /datum/supply_packs/medicalscrubs name = "Medical scrubs" - contains = list(/obj/item/clothing/shoes/white, - /obj/item/clothing/shoes/white, - /obj/item/clothing/shoes/white, - /obj/item/clothing/under/rank/medical/blue, - /obj/item/clothing/under/rank/medical/blue, - /obj/item/clothing/under/rank/medical/blue, - /obj/item/clothing/under/rank/medical/green, - /obj/item/clothing/under/rank/medical/green, - /obj/item/clothing/under/rank/medical/green, - /obj/item/clothing/under/rank/medical/purple, - /obj/item/clothing/under/rank/medical/purple, - /obj/item/clothing/under/rank/medical/purple, - /obj/item/clothing/under/rank/medical/black, - /obj/item/clothing/under/rank/medical/black, - /obj/item/clothing/under/rank/medical/black, - /obj/item/clothing/head/surgery, - /obj/item/clothing/head/surgery, - /obj/item/clothing/head/surgery, - /obj/item/clothing/head/surgery/purple, - /obj/item/clothing/head/surgery/purple, - /obj/item/clothing/head/surgery/purple, - /obj/item/clothing/head/surgery/blue, - /obj/item/clothing/head/surgery/blue, - /obj/item/clothing/head/surgery/blue, - /obj/item/clothing/head/surgery/green, - /obj/item/clothing/head/surgery/green, - /obj/item/clothing/head/surgery/green, - /obj/item/clothing/head/surgery/black, - /obj/item/clothing/head/surgery/black, - /obj/item/clothing/head/surgery/black, - /obj/item/weapon/storage/box/masks, - /obj/item/weapon/storage/box/gloves) + contains = list( + /obj/item/clothing/shoes/white = 3,, + /obj/item/clothing/under/rank/medical/blue = 3, + /obj/item/clothing/under/rank/medical/green = 3, + /obj/item/clothing/under/rank/medical/purple = 3, + /obj/item/clothing/under/rank/medical/black = 3, + /obj/item/clothing/head/surgery = 3, + /obj/item/clothing/head/surgery/purple = 3, + /obj/item/clothing/head/surgery/blue = 3, + /obj/item/clothing/head/surgery/green = 3, + /obj/item/clothing/head/surgery/black = 3, + /obj/item/weapon/storage/box/masks, + /obj/item/weapon/storage/box/gloves + ) cost = 15 containertype = "/obj/structure/closet/crate/secure" containername = "Medical scrubs crate" @@ -2170,15 +1965,16 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/autopsy name = "Autopsy equipment" - contains = list(/obj/item/weapon/folder/white, - /obj/item/device/camera, - /obj/item/device/camera_film, - /obj/item/device/camera_film, - /obj/item/weapon/autopsy_scanner, - /obj/item/weapon/scalpel, - /obj/item/weapon/storage/box/masks, - /obj/item/weapon/storage/box/gloves, - /obj/item/weapon/pen) + contains = list( + /obj/item/weapon/folder/white, + /obj/item/device/camera, + /obj/item/device/camera_film = 2, + /obj/item/weapon/autopsy_scanner, + /obj/item/weapon/scalpel, + /obj/item/weapon/storage/box/masks, + /obj/item/weapon/storage/box/gloves, + /obj/item/weapon/pen + ) cost = 20 containertype = "/obj/structure/closet/crate/secure" containername = "Autopsy equipment crate" @@ -2187,32 +1983,26 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/medicaluniforms name = "Medical uniforms" - contains = list(/obj/item/clothing/shoes/white, - /obj/item/clothing/shoes/white, - /obj/item/clothing/shoes/white, - /obj/item/clothing/under/rank/chief_medical_officer, - /obj/item/clothing/under/rank/geneticist, - /obj/item/clothing/under/rank/virologist, - /obj/item/clothing/under/rank/nursesuit, - /obj/item/clothing/under/rank/nurse, - /obj/item/clothing/under/rank/orderly, - /obj/item/clothing/under/rank/medical, - /obj/item/clothing/under/rank/medical, - /obj/item/clothing/under/rank/medical, - /obj/item/clothing/under/rank/medical/paramedic, - /obj/item/clothing/under/rank/medical/paramedic, - /obj/item/clothing/under/rank/medical/paramedic, - /obj/item/clothing/suit/storage/toggle/labcoat, - /obj/item/clothing/suit/storage/toggle/labcoat, - /obj/item/clothing/suit/storage/toggle/labcoat, - /obj/item/clothing/suit/storage/toggle/labcoat/cmo, - /obj/item/clothing/suit/storage/toggle/labcoat/emt, - /obj/item/clothing/suit/storage/toggle/labcoat/cmoalt, - /obj/item/clothing/suit/storage/toggle/labcoat/genetics, - /obj/item/clothing/suit/storage/toggle/labcoat/virologist, - /obj/item/clothing/suit/storage/toggle/labcoat/chemist, - /obj/item/weapon/storage/box/masks, - /obj/item/weapon/storage/box/gloves) + contains = list( + /obj/item/clothing/shoes/white = 3, + /obj/item/clothing/under/rank/chief_medical_officer, + /obj/item/clothing/under/rank/geneticist, + /obj/item/clothing/under/rank/virologist, + /obj/item/clothing/under/rank/nursesuit, + /obj/item/clothing/under/rank/nurse, + /obj/item/clothing/under/rank/orderly, + /obj/item/clothing/under/rank/medical = 3, + /obj/item/clothing/under/rank/medical/paramedic = 3, + /obj/item/clothing/suit/storage/toggle/labcoat = 3, + /obj/item/clothing/suit/storage/toggle/labcoat/cmo, + /obj/item/clothing/suit/storage/toggle/labcoat/emt, + /obj/item/clothing/suit/storage/toggle/labcoat/cmoalt, + /obj/item/clothing/suit/storage/toggle/labcoat/genetics, + /obj/item/clothing/suit/storage/toggle/labcoat/virologist, + /obj/item/clothing/suit/storage/toggle/labcoat/chemist, + /obj/item/weapon/storage/box/masks, + /obj/item/weapon/storage/box/gloves + ) cost = 15 containertype = "/obj/structure/closet/crate/secure" containername = "Medical uniform crate" @@ -2221,28 +2011,17 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/medicalbiosuits name = "Medical biohazard gear" - contains = list(/obj/item/clothing/head/bio_hood, - /obj/item/clothing/head/bio_hood, - /obj/item/clothing/head/bio_hood, - /obj/item/clothing/suit/bio_suit, - /obj/item/clothing/suit/bio_suit, - /obj/item/clothing/suit/bio_suit, - /obj/item/clothing/head/bio_hood/virology, - /obj/item/clothing/suit/bio_suit/virology, - /obj/item/clothing/suit/bio_suit/cmo, - /obj/item/clothing/head/bio_hood/cmo, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/weapon/tank/oxygen, - /obj/item/weapon/tank/oxygen, - /obj/item/weapon/tank/oxygen, - /obj/item/weapon/tank/oxygen, - /obj/item/weapon/tank/oxygen, - /obj/item/weapon/storage/box/masks, - /obj/item/weapon/storage/box/gloves) + contains = list( + /obj/item/clothing/head/bio_hood = 3, + /obj/item/clothing/suit/bio_suit = 3, + /obj/item/clothing/head/bio_hood/virology = 2, + /obj/item/clothing/suit/bio_suit/cmo, + /obj/item/clothing/head/bio_hood/cmo, + /obj/item/clothing/mask/gas = 5, + /obj/item/weapon/tank/oxygen = 5, + /obj/item/weapon/storage/box/masks, + /obj/item/weapon/storage/box/gloves + ) cost = 50 containertype = "/obj/structure/closet/crate/secure" containername = "Medical biohazard equipment" @@ -2251,13 +2030,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/portablefreezers name = "Portable freezers crate" - contains = list(/obj/item/weapon/storage/box/freezer, - /obj/item/weapon/storage/box/freezer, - /obj/item/weapon/storage/box/freezer, - /obj/item/weapon/storage/box/freezer, - /obj/item/weapon/storage/box/freezer, - /obj/item/weapon/storage/box/freezer, - /obj/item/weapon/storage/box/freezer) + contains = list(/obj/item/weapon/storage/box/freezer = 7) cost = 25 containertype = "/obj/structure/closet/crate/secure" containername = "Portable freezers" @@ -2266,21 +2039,23 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/minergear name = "Shaft miner equipment" - contains = list(/obj/item/weapon/storage/backpack/industrial, - /obj/item/weapon/storage/backpack/satchel_eng, - /obj/item/clothing/suit/storage/hooded/wintercoat/miner, - /obj/item/device/radio/headset/headset_cargo, - /obj/item/clothing/under/rank/miner, - /obj/item/clothing/gloves/black, - /obj/item/clothing/shoes/black, - /obj/item/device/analyzer, - /obj/item/weapon/storage/bag/ore, - /obj/item/device/flashlight/lantern, - /obj/item/weapon/shovel, - /obj/item/weapon/pickaxe, - /obj/item/weapon/mining_scanner, - /obj/item/clothing/glasses/material, - /obj/item/clothing/glasses/meson) + contains = list( + /obj/item/weapon/storage/backpack/industrial, + /obj/item/weapon/storage/backpack/satchel/eng, + /obj/item/clothing/suit/storage/hooded/wintercoat/miner, + /obj/item/device/radio/headset/headset_cargo, + /obj/item/clothing/under/rank/miner, + /obj/item/clothing/gloves/black, + /obj/item/clothing/shoes/black, + /obj/item/device/analyzer, + /obj/item/weapon/storage/bag/ore, + /obj/item/device/flashlight/lantern, + /obj/item/weapon/shovel, + /obj/item/weapon/pickaxe, + /obj/item/weapon/mining_scanner, + /obj/item/clothing/glasses/material, + /obj/item/clothing/glasses/meson + ) cost = 15 containertype = "/obj/structure/closet/crate/secure" containername = "Shaft miner equipment" @@ -2289,18 +2064,18 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/chaplaingear name = "Chaplain equipment" - contains = list(/obj/item/clothing/under/rank/chaplain, - /obj/item/clothing/shoes/black, - /obj/item/clothing/suit/nun, - /obj/item/clothing/head/nun_hood, - /obj/item/clothing/suit/chaplain_hoodie, - /obj/item/clothing/head/chaplain_hood, - /obj/item/clothing/suit/holidaypriest, - /obj/item/clothing/under/wedding/bride_white, - /obj/item/weapon/storage/backpack/cultpack, - /obj/item/weapon/storage/fancy/candle_box, - /obj/item/weapon/storage/fancy/candle_box, - /obj/item/weapon/storage/fancy/candle_box) + contains = list( + /obj/item/clothing/under/rank/chaplain, + /obj/item/clothing/shoes/black, + /obj/item/clothing/suit/nun, + /obj/item/clothing/head/nun_hood, + /obj/item/clothing/suit/chaplain_hoodie, + /obj/item/clothing/head/chaplain_hood, + /obj/item/clothing/suit/holidaypriest, + /obj/item/clothing/under/wedding/bride_white, + /obj/item/weapon/storage/backpack/cultpack, + /obj/item/weapon/storage/fancy/candle_box = 3 + ) cost = 10 containertype = "/obj/structure/closet/crate" containername = "Chaplain equipment crate" diff --git a/code/datums/uplink/ammunition.dm b/code/datums/uplink/ammunition.dm new file mode 100644 index 00000000000..b45cf3be3c5 --- /dev/null +++ b/code/datums/uplink/ammunition.dm @@ -0,0 +1,67 @@ +/************* +* Ammunition * +*************/ +/datum/uplink_item/item/ammo + item_cost = 2 + category = /datum/uplink_category/ammunition + +/datum/uplink_item/item/ammo/a357 + name = ".357" + path = /obj/item/ammo_magazine/a357 + +/datum/uplink_item/item/ammo/mc9mm + name = "9mm" + path = /obj/item/ammo_magazine/mc9mm + +/datum/uplink_item/item/ammo/c45m + name = ".45" + path = /obj/item/ammo_magazine/c45m + +/datum/uplink_item/item/ammo/darts + name = "Darts" + path = /obj/item/ammo_magazine/chemdart + +/datum/uplink_item/item/ammo/sniperammo + name = "14.5mm" + path = /obj/item/weapon/storage/box/sniperammo + +/datum/uplink_item/item/ammo/a556 + name = "5.56mm" + path = /obj/item/ammo_magazine/a556 + +/datum/uplink_item/item/ammo/a556/ap + name = "5.56mm AP" + path = /obj/item/ammo_magazine/a556/ap + +/datum/uplink_item/item/ammo/a10mm + name = "10mm" + path = /obj/item/ammo_magazine/a10mm + +/datum/uplink_item/item/ammo/a762 + name = "7.62mm" + path = /obj/item/ammo_magazine/a762 + +/datum/uplink_item/item/ammo/a762/ap + name = "7.62mm AP" + path = /obj/item/ammo_magazine/a762/ap + +/datum/uplink_item/item/ammo/g12 + name = "12 gauge" + path = /obj/item/ammo_magazine/g12 + +/datum/uplink_item/item/ammo/g12/beanbag + name = "12 gauge beanbag" + path = /obj/item/ammo_magazine/g12/beanbag + item_cost = 1 // Discount due to it being LTL. + +/datum/uplink_item/item/ammo/g12/pellet + name = "12 gauge pellet" + path = /obj/item/ammo_magazine/g12/pellet + +/datum/uplink_item/item/ammo/g12/stun + name = "12 gauge stun" + path = /obj/item/weapon/storage/box/stunshells + +/datum/uplink_item/item/ammo/g12/flash + name = "12 gauge flash" + path = /obj/item/weapon/storage/box/flashshells \ No newline at end of file diff --git a/code/datums/uplink/announcements.dm b/code/datums/uplink/announcements.dm new file mode 100644 index 00000000000..1b3cf75462c --- /dev/null +++ b/code/datums/uplink/announcements.dm @@ -0,0 +1,109 @@ +/**************** +* Announcements * +*****************/ +/datum/uplink_item/abstract/announcements + category = /datum/uplink_category/services + +/datum/uplink_item/abstract/announcements/buy(var/obj/item/device/uplink/U, var/mob/user) + . = ..() + if(.) + log_and_message_admins("has triggered a falsified [src]", user) + +/datum/uplink_item/abstract/announcements/fake_centcom + item_cost = DEFAULT_TELECRYSTAL_AMOUNT / 2 + +/datum/uplink_item/abstract/announcements/fake_centcom/New() + ..() + name = "[command_name()] Update Announcement" + desc = "Causes a falsified [command_name()] Update. Triggers immediately after supplying additional data." + +/datum/uplink_item/abstract/announcements/fake_centcom/extra_args(var/mob/user) + var/title = sanitize(input("Enter your announcement title.", "Announcement Title") as null|text) + if(!title) + return + var/message = sanitize(input("Enter your announcement message.", "Announcement Title") as null|text) + if(!message) + return + return list("title" = title, "message" = message) + +/datum/uplink_item/abstract/announcements/fake_centcom/get_goods(var/obj/item/device/uplink/U, var/loc, var/mob/user, var/list/args) + command_announcement.Announce(args["message"], args["title"]) + return 1 + +/datum/uplink_item/abstract/announcements/fake_crew_arrival + name = "Crew Arrival Announcement/Records" + desc = "Creates a fake crew arrival announcement as well as fake crew records, using your current appearance (including held items!) and worn id card. Trigger with care!" + item_cost = 4 + +/datum/uplink_item/abstract/announcements/fake_crew_arrival/get_goods(var/obj/item/device/uplink/U, var/loc, var/mob/user, var/list/args) + if(!user) + return 0 + + var/obj/item/weapon/card/id/I = user.GetIdCard() + var/datum/data/record/random_general_record + var/datum/data/record/random_medical_record + if(data_core.general.len) + random_general_record = pick(data_core.general) + random_medical_record = find_medical_record("id", random_general_record.fields["id"]) + + var/datum/data/record/general = data_core.CreateGeneralRecord(user) + if(I) + general.fields["age"] = I.age + general.fields["rank"] = I.assignment + general.fields["real_rank"] = I.assignment + general.fields["name"] = I.registered_name + general.fields["sex"] = I.sex + else + var/mob/living/carbon/human/H + if(istype(user,/mob/living/carbon/human)) + H = user + general.fields["age"] = H.age + else + general.fields["age"] = initial(H.age) + var/assignment = GetAssignment(user) + general.fields["rank"] = assignment + general.fields["real_rank"] = assignment + general.fields["name"] = user.real_name + general.fields["sex"] = capitalize(user.gender) + + general.fields["species"] = user.get_species() + var/datum/data/record/medical = data_core.CreateMedicalRecord(general.fields["name"], general.fields["id"]) + data_core.CreateSecurityRecord(general.fields["name"], general.fields["id"]) + + if(!random_general_record) + general.fields["citizenship"] = random_general_record.fields["citizenship"] + general.fields["faction"] = random_general_record.fields["faction"] + general.fields["fingerprint"] = random_general_record.fields["fingerprint"] + general.fields["home_system"] = random_general_record.fields["home_system"] + general.fields["religion"] = random_general_record.fields["religion"] + if(random_medical_record) + medical.fields["b_type"] = random_medical_record.fields["b_type"] + medical.fields["b_dna"] = random_medical_record.fields["b_type"] + + if(I) + general.fields["fingerprint"] = I.fingerprint_hash + medical.fields["b_type"] = I.blood_type + medical.fields["b_dna"] = I.dna_hash + + AnnounceArrivalSimple(general.fields["name"], general.fields["rank"]) + return 1 + +/datum/uplink_item/abstract/announcements/fake_ion_storm + name = "Ion Storm Announcement" + desc = "Interferes with the station's ion sensors. Triggers immediately upon investment." + item_cost = 1 + +/datum/uplink_item/abstract/announcements/fake_ion_storm/get_goods(var/obj/item/device/uplink/U, var/loc) + ion_storm_announcement() + return 1 + +/datum/uplink_item/abstract/announcements/fake_radiation + name = "Radiation Storm Announcement" + desc = "Interferes with the station's radiation sensors. Triggers immediately upon investment." + item_cost = 3 + +/datum/uplink_item/abstract/announcements/fake_radiation/get_goods(var/obj/item/device/uplink/U, var/loc) + var/datum/event_meta/EM = new(EVENT_LEVEL_MUNDANE, "Fake Radiation Storm", add_to_queue = 0) + new/datum/event/radiation_storm/syndicate(EM) + return 1 + diff --git a/code/datums/uplink/armor.dm b/code/datums/uplink/armor.dm new file mode 100644 index 00000000000..30a41d8edb8 --- /dev/null +++ b/code/datums/uplink/armor.dm @@ -0,0 +1,15 @@ +/******** +* Armor * +********/ +/datum/uplink_item/item/armor + category = /datum/uplink_category/armor + +/datum/uplink_item/item/armor/combat + name = "Combat Armor Set" + item_cost = 5 + path = /obj/item/weapon/storage/box/syndie_kit/combat_armor + +/datum/uplink_item/item/armor/heavy_vest + name = "Heavy Armor Vest" + item_cost = 4 + path = /obj/item/clothing/suit/storage/vest/heavy/merc diff --git a/code/datums/uplink/badassery.dm b/code/datums/uplink/badassery.dm new file mode 100644 index 00000000000..b837625c8ab --- /dev/null +++ b/code/datums/uplink/badassery.dm @@ -0,0 +1,78 @@ +/************ +* Badassery * +************/ +/datum/uplink_item/item/badassery + category = /datum/uplink_category/badassery + +/datum/uplink_item/item/badassery/balloon + name = "For showing that You Are The BOSS (Useless Balloon)" + item_cost = DEFAULT_TELECRYSTAL_AMOUNT + path = /obj/item/toy/syndicateballoon + +/datum/uplink_item/item/badassery/balloon/NT + name = "For showing that you love NT SOO much (Useless Balloon)" + path = /obj/item/toy/nanotrasenballoon + +/************** +* Random Item * +**************/ +/datum/uplink_item/item/badassery/random_one + name = "Random Item" + desc = "Buys you one random item." + +/datum/uplink_item/item/badassery/random_one/buy(var/obj/item/device/uplink/U, var/mob/user) + var/datum/uplink_item/item = default_uplink_selection.get_random_item(U.uses) + return item.buy(U, user) + +/datum/uplink_item/item/badassery/random_one/can_buy(obj/item/device/uplink/U) + return default_uplink_selection.get_random_item(U.uses, U) != null + +/datum/uplink_item/item/badassery/random_many + name = "Random Items" + desc = "Buys you as many random items you can afford. Convenient packaging NOT included." + +/datum/uplink_item/item/badassery/random_many/cost(var/telecrystals) + return max(1, telecrystals) + +/datum/uplink_item/item/badassery/random_many/get_goods(var/obj/item/device/uplink/U, var/loc) + var/list/bought_items = list() + for(var/datum/uplink_item/UI in get_random_uplink_items(U, U.uses, loc)) + UI.purchase_log(U) + var/obj/item/I = UI.get_goods(U, loc) + if(istype(I)) + bought_items += I + + return bought_items + +/datum/uplink_item/item/badassery/random_many/purchase_log(obj/item/device/uplink/U) + feedback_add_details("traitor_uplink_items_bought", "[src]") + log_and_message_admins("used \the [U.loc] to buy \a [src]") + +/**************** +* Surplus Crate * +****************/ +/datum/uplink_item/item/badassery/surplus + name = "Surplus Crate" + item_cost = 40 + var/item_worth = 60 + var/icon + +/datum/uplink_item/item/badassery/surplus/New() + ..() + desc = "A crate containing [item_worth] telecrystal\s worth of surplus leftovers." + +/datum/uplink_item/item/badassery/surplus/get_goods(var/obj/item/device/uplink/U, var/loc) + var/obj/structure/largecrate/C = new(loc) + var/random_items = get_random_uplink_items(null, item_worth, C) + for(var/datum/uplink_item/I in random_items) + I.purchase_log(U) + I.get_goods(U, C) + + return C + +/datum/uplink_item/item/badassery/surplus/log_icon() + if(!icon) + var/obj/structure/largecrate/C = /obj/structure/largecrate + icon = image(initial(C.icon), initial(C.icon_state)) + + return "\icon[icon]" \ No newline at end of file diff --git a/code/datums/uplink/grenades.dm b/code/datums/uplink/grenades.dm new file mode 100644 index 00000000000..f7c6d1a0727 --- /dev/null +++ b/code/datums/uplink/grenades.dm @@ -0,0 +1,35 @@ +/*********** +* Grenades * +************/ +/datum/uplink_item/item/grenades + category = /datum/uplink_category/grenades + +/datum/uplink_item/item/grenades/anti_photon + name = "5xPhoton Disruption Grenades" + item_cost = 2 + path = /obj/item/weapon/storage/box/anti_photons + +/datum/uplink_item/item/grenades/emp + name = "5xEMP Grenades" + item_cost = 3 + path = /obj/item/weapon/storage/box/emps + +/datum/uplink_item/item/grenades/smoke + name = "7xSmoke Grenades" + item_cost = 2 + path = /obj/item/weapon/storage/box/smokes + +/datum/uplink_item/item/grenades/frags + name = "5xFrag Grenades" + item_cost = 6 + path = /obj/item/weapon/storage/box/frags + +/datum/uplink_item/item/grenades/flashbnags + name = "7xFlashbangs" + item_cost = 4 + path = /obj/item/weapon/storage/box/flashbangs + +/datum/uplink_item/item/grenades/metalfoam + name = "7xMetal Foam Grenades" + item_cost = 3 + path = /obj/item/weapon/storage/box/metalfoam \ No newline at end of file diff --git a/code/datums/uplink/hardsuit_modules.dm b/code/datums/uplink/hardsuit_modules.dm new file mode 100644 index 00000000000..66ecfb6bf9f --- /dev/null +++ b/code/datums/uplink/hardsuit_modules.dm @@ -0,0 +1,40 @@ +/******************* +* Hardsuit Modules * +*******************/ +/datum/uplink_item/item/hardsuit_modules + category = /datum/uplink_category/hardsuit_modules + +/datum/uplink_item/item/hardsuit_modules/thermal + name = "Thermal Scanner" + item_cost = 2 + path = /obj/item/rig_module/vision/thermal + +/datum/uplink_item/item/hardsuit_modules/energy_net + name = "Net Projector" + item_cost = 3 + path = /obj/item/rig_module/fabricator/energy_net + +/datum/uplink_item/item/ewar_voice + name = "Electrowarfare Suite and Voice Synthesiser" + item_cost = 4 + path = /obj/item/weapon/storage/box/syndie_kit/ewar_voice + +/datum/uplink_item/item/hardsuit_modules/maneuvering_jets + name = "Maneuvering Jets" + item_cost = 4 + path = /obj/item/rig_module/maneuvering_jets + +/datum/uplink_item/item/hardsuit_modules/egun + name = "Mounted Energy Gun" + item_cost = 6 + path = /obj/item/rig_module/mounted/egun + +/datum/uplink_item/item/hardsuit_modules/power_sink + name = "Power Sink" + item_cost = 6 + path = /obj/item/rig_module/power_sink + +/datum/uplink_item/item/hardsuit_modules/laser_canon + name = "Mounted Laser Cannon" + item_cost = 8 + path = /obj/item/rig_module/mounted diff --git a/code/datums/uplink/implants.dm b/code/datums/uplink/implants.dm new file mode 100644 index 00000000000..c4302464b63 --- /dev/null +++ b/code/datums/uplink/implants.dm @@ -0,0 +1,25 @@ +/*********** +* Implants * +***********/ +/datum/uplink_item/item/implants + category = /datum/uplink_category/implants + +/datum/uplink_item/item/implants/imp_freedom + name = "Freedom Implant" + item_cost = 3 + path = /obj/item/weapon/storage/box/syndie_kit/imp_freedom + +/datum/uplink_item/item/implants/imp_compress + name = "Compressed Matter Implant" + item_cost = 4 + path = /obj/item/weapon/storage/box/syndie_kit/imp_compress + +/datum/uplink_item/item/implants/imp_explosive + name = "Explosive Implant (DANGER!)" + item_cost = 6 + path = /obj/item/weapon/storage/box/syndie_kit/imp_explosive + +/datum/uplink_item/item/implants/imp_uplink + name = "Uplink Implant" //Original name: "Uplink Implant (Contains 5 Telecrystals)" + item_cost = 5 //Original cost: 10 + path = /obj/item/weapon/storage/box/syndie_kit/imp_uplink diff --git a/code/datums/uplink/medical.dm b/code/datums/uplink/medical.dm new file mode 100644 index 00000000000..d14ca10a07a --- /dev/null +++ b/code/datums/uplink/medical.dm @@ -0,0 +1,36 @@ +/********** +* Medical * +**********/ +/datum/uplink_item/item/medical + category = /datum/uplink_category/medical + +/datum/uplink_item/item/medical/sinpockets + name = "Box of Sin-Pockets" + item_cost = 1 + path = /obj/item/weapon/storage/box/sinpockets + +/datum/uplink_item/item/medical/surgery + name = "Surgery kit" + item_cost = 6 + path = /obj/item/weapon/storage/firstaid/surgery + +/datum/uplink_item/item/medical/combat + name = "Combat medical kit" + item_cost = 6 + path = /obj/item/weapon/storage/firstaid/combat + +/datum/uplink_item/item/medical/freezer + name = "Portable Freezer" + item_cost = 2 + path = /obj/item/weapon/storage/box/freezer + +/datum/uplink_item/item/medical/ambrosiaseeds + name = "Box of 7x ambrosia seed packets" + item_cost = 1 + path = /obj/item/weapon/storage/box/ambrosia + +/datum/uplink_item/item/medical/ambrosiadeusseeds + name = "Box of 7x ambrosia deus seed packets" + item_cost = 2 + path = /obj/item/weapon/storage/box/ambrosiadeus + diff --git a/code/datums/uplink/stealth_items.dm b/code/datums/uplink/stealth_items.dm new file mode 100644 index 00000000000..31364a09539 --- /dev/null +++ b/code/datums/uplink/stealth_items.dm @@ -0,0 +1,45 @@ +/******************************* +* Stealth and Camouflage Items * +*******************************/ +/datum/uplink_item/item/stealth_items + category = /datum/uplink_category/stealth_items + +/datum/uplink_item/item/stealth_items/id + name = "Agent ID card" + item_cost = 2 + path = /obj/item/weapon/card/id/syndicate + +/datum/uplink_item/item/stealth_items/syndigaloshes + name = "No-Slip Shoes" + item_cost = 2 + path = /obj/item/clothing/shoes/syndigaloshes + +/datum/uplink_item/item/stealth_items/spy + name = "Bug Kit" + item_cost = 2 + path = /obj/item/weapon/storage/box/syndie_kit/spy + +/datum/uplink_item/item/stealth_items/chameleon_kit + name = "Chameleon Kit" + item_cost = 3 + path = /obj/item/weapon/storage/box/syndie_kit/chameleon + +/datum/uplink_item/item/stealth_items/chameleon_projector + name = "Chameleon-Projector" + item_cost = 4 + path = /obj/item/device/chameleon + +/datum/uplink_item/item/stealth_items/chameleon_projector + name = "Chameleon-Projector" + item_cost = 4 + path = /obj/item/device/chameleon + +/datum/uplink_item/item/stealth_items/voice + name = "Voice Changer" + item_cost = 4 + path = /obj/item/clothing/mask/gas/voice + +/datum/uplink_item/item/stealth_items/camera_floppy + name = "Camera Network Access - Floppy" + item_cost = 6 + path = /obj/item/weapon/disk/file/cameras/syndicate diff --git a/code/datums/uplink/stealthy_weapons.dm b/code/datums/uplink/stealthy_weapons.dm new file mode 100644 index 00000000000..ead34c56461 --- /dev/null +++ b/code/datums/uplink/stealthy_weapons.dm @@ -0,0 +1,35 @@ +/************************************* +* Stealthy and Inconspicuous Weapons * +*************************************/ +/datum/uplink_item/item/stealthy_weapons + category = /datum/uplink_category/stealthy_weapons + +/datum/uplink_item/item/stealthy_weapons/soap + name = "Subversive Soap" + item_cost = 1 + path = /obj/item/weapon/soap/syndie + +/datum/uplink_item/item/stealthy_weapons/concealed_cane + name = "Concealed Cane Sword" + item_cost = 1 + path = /obj/item/weapon/cane/concealed + +/datum/uplink_item/item/stealthy_weapons/detomatix + name = "Detomatix PDA Cartridge" + item_cost = 3 + path = /obj/item/weapon/cartridge/syndicate + +/datum/uplink_item/item/stealthy_weapons/parapen + name = "Paralysis Pen" + item_cost = 3 + path = /obj/item/weapon/pen/reagent/paralysis + +/datum/uplink_item/item/stealthy_weapons/cigarette_kit + name = "Cigarette Kit" + item_cost = 3 + path = /obj/item/weapon/storage/box/syndie_kit/cigarette + +/datum/uplink_item/item/stealthy_weapons/random_toxin + name = "Random Toxin - Beaker" + item_cost = 3 + path = /obj/item/weapon/storage/box/syndie_kit/toxin diff --git a/code/datums/uplink/tools.dm b/code/datums/uplink/tools.dm new file mode 100644 index 00000000000..fb1b52c0681 --- /dev/null +++ b/code/datums/uplink/tools.dm @@ -0,0 +1,85 @@ +/******************** +* Devices and Tools * +********************/ +/datum/uplink_item/item/tools + category = /datum/uplink_category/tools + +/datum/uplink_item/item/tools/toolbox + name = "Fully Loaded Toolbox" + item_cost = 1 + path = /obj/item/weapon/storage/toolbox/syndicate + +/datum/uplink_item/item/tools/plastique + name = "C-4 (Destroys walls)" + item_cost = 2 + path = /obj/item/weapon/plastique + +/datum/uplink_item/item/tools/encryptionkey_radio + name = "Encrypted Radio Channel Key" + item_cost = 2 + path = /obj/item/device/encryptionkey/syndicate + +/datum/uplink_item/item/tools/encryptionkey_binary + name = "Binary Translator Key" + item_cost = 3 + path = /obj/item/device/encryptionkey/binary + +/datum/uplink_item/item/tools/emag + name = "Cryptographic Sequencer" + item_cost = 3 + path = /obj/item/weapon/card/emag + +/datum/uplink_item/item/tools/clerical + name = "Morphic Clerical Kit" + item_cost = 3 + path = /obj/item/weapon/storage/box/syndie_kit/clerical + +/datum/uplink_item/item/tools/space_suit + name = "Space Suit" + item_cost = 3 + path = /obj/item/weapon/storage/box/syndie_kit/space + +/datum/uplink_item/item/tools/thermal + name = "Thermal Imaging Glasses" + item_cost = 3 + path = /obj/item/clothing/glasses/thermal/syndi + +/datum/uplink_item/item/tools/powersink + name = "Powersink (DANGER!)" + item_cost = 5 + path = /obj/item/device/powersink + +/datum/uplink_item/item/tools/ai_module + name = "Hacked AI Upload Module" + item_cost = 7 + path = /obj/item/weapon/aiModule/syndicate + +/datum/uplink_item/item/tools/supply_beacon + name = "Hacked Supply Beacon (DANGER!)" + item_cost = 7 + path = /obj/item/supply_beacon + +/datum/uplink_item/item/tools/teleporter + name = "Teleporter Circuit Board" + item_cost = 20 + path = /obj/item/weapon/circuitboard/teleporter + +/datum/uplink_item/item/tools/money + name = "Operations Funding" + item_cost = 3 + path = /obj/item/weapon/storage/secure/briefcase/money + desc = "A briefcase with 10,000 untraceable thalers for funding your sneaky activities." + +/datum/uplink_item/item/tools/crystal + name = "Tradable Crystal" + item_cost = 1 + path = /obj/item/device/telecrystal + desc = "A telecrystal that can be transferred from one user to another. Be sure not to give it to just anyone." + +/datum/uplink_item/item/tools/hacking_tool + name = "Door Hacking Tool" + item_cost = 2 + path = /obj/item/device/multitool/hacktool + desc = "Appears and functions as a standard multitool until the mode is toggled by applying a screwdriver appropriately. \ + When in hacking mode this device will grant full access to any standard airlock within 20 to 40 seconds. \ + This device will also be able to immediately access the last 6 to 8 hacked airlocks." \ No newline at end of file diff --git a/code/game/objects/items/devices/uplink_categories.dm b/code/datums/uplink/uplink_categories.dm similarity index 87% rename from code/game/objects/items/devices/uplink_categories.dm rename to code/datums/uplink/uplink_categories.dm index 68ed72a6fb9..6e222b764b2 100644 --- a/code/game/objects/items/devices/uplink_categories.dm +++ b/code/datums/uplink/uplink_categories.dm @@ -1,49 +1,49 @@ -/datum/uplink_category - var/name = "" - var/list/datum/uplink_item/items - -/datum/uplink_category/New() - ..() - items = list() - -/datum/uplink_category/proc/can_view(obj/item/device/uplink/U) - for(var/datum/uplink_item/item in items) - if(item.can_view(U)) - return 1 - return 0 - -/datum/uplink_category/ammunition - name = "Ammunition" - -/datum/uplink_category/grenades - name = "Grenades and Thrown Objects" - -/datum/uplink_category/visible_weapons - name = "Highly Visible and Dangerous Weapons" - -/datum/uplink_category/stealthy_weapons - name = "Stealthy and Inconspicuous Weapons" - -/datum/uplink_category/stealth_items - name = "Stealth and Camouflage Items" - -/datum/uplink_category/armor - name = "Armor" - -/datum/uplink_category/tools - name = "Devices and Tools" - -/datum/uplink_category/implants - name = "Implants" - -/datum/uplink_category/medical - name = "Medical" - -/datum/uplink_category/hardsuit_modules - name = "Hardsuit Modules" - -/datum/uplink_category/services - name = "Services" - -/datum/uplink_category/badassery - name = "Badassery" +/datum/uplink_category + var/name = "" + var/list/datum/uplink_item/items + +/datum/uplink_category/New() + ..() + items = list() + +/datum/uplink_category/proc/can_view(obj/item/device/uplink/U) + for(var/datum/uplink_item/item in items) + if(item.can_view(U)) + return 1 + return 0 + +datum/uplink_category/ammunition + name = "Ammunition" + +/datum/uplink_category/services + name = "Services" + +/datum/uplink_category/armor + name = "Armor" + +/datum/uplink_category/badassery + name = "Badassery" + +/datum/uplink_category/grenades + name = "Grenades and Thrown Objects" + +/datum/uplink_category/hardsuit_modules + name = "Hardsuit Modules" + +/datum/uplink_category/implants + name = "Implants" + +/datum/uplink_category/medical + name = "Medical" + +/datum/uplink_category/stealth_items + name = "Stealth and Camouflage Items" + +/datum/uplink_category/stealthy_weapons + name = "Stealthy and Inconspicuous Weapons" + +/datum/uplink_category/tools + name = "Devices and Tools" + +/datum/uplink_category/visible_weapons + name = "Highly Visible and Dangerous Weapons" \ No newline at end of file diff --git a/code/datums/uplink/uplink_items.dm b/code/datums/uplink/uplink_items.dm new file mode 100644 index 00000000000..32a7d0cffb5 --- /dev/null +++ b/code/datums/uplink/uplink_items.dm @@ -0,0 +1,174 @@ +var/datum/uplink/uplink = new() + +/datum/uplink + var/list/items_assoc + var/list/datum/uplink_item/items + var/list/datum/uplink_category/categories + +/datum/uplink/New() + items_assoc = list() + items = init_subtypes(/datum/uplink_item) + categories = init_subtypes(/datum/uplink_category) + categories = dd_sortedObjectList(categories) + + for(var/datum/uplink_item/item in items) + if(!item.name) + items -= item + continue + + items_assoc[item.type] = item + + for(var/datum/uplink_category/category in categories) + if(item.category == category.type) + category.items += item + + for(var/datum/uplink_category/category in categories) + category.items = dd_sortedObjectList(category.items) + +/datum/uplink_item + var/name + var/desc + var/item_cost = 0 + var/datum/uplink_category/category // Item category + var/list/datum/antagonist/antag_roles // Antag roles this item is displayed to. If empty, display to all. + +/datum/uplink_item/item + var/path = null + +/datum/uplink_item/New() + ..() + antag_roles = list() + + + +/datum/uplink_item/proc/buy(var/obj/item/device/uplink/U, var/mob/user) + var/extra_args = extra_args(user) + if(!extra_args) + return + + if(!can_buy(U)) + return + + if(U.CanUseTopic(user, inventory_state) != STATUS_INTERACTIVE) + return + + var/cost = cost(U.uses, U) + + var/goods = get_goods(U, get_turf(user), user, extra_args) + if(!goods) + return + + purchase_log(U) + user.mind.tcrystals -= cost + U.used_TC += cost + return goods + +// Any additional arguments you wish to send to the get_goods +/datum/uplink_item/proc/extra_args(var/mob/user) + return 1 + +/datum/uplink_item/proc/can_buy(obj/item/device/uplink/U) + if(cost(U.uses, U) > U.uses) + return 0 + + return can_view(U) + +/datum/uplink_item/proc/can_view(obj/item/device/uplink/U) + // Making the assumption that if no uplink was supplied, then we don't care about antag roles + if(!U || !antag_roles.len) + return 1 + + // With no owner, there's no need to check antag status. + if(!U.uplink_owner) + return 0 + + for(var/antag_role in antag_roles) + var/datum/antagonist/antag = all_antag_types[antag_role] + if(antag.is_antagonist(U.uplink_owner)) + return 1 + return 0 + +/datum/uplink_item/proc/cost(var/telecrystals, obj/item/device/uplink/U) + . = item_cost + if(U) + . = U.get_item_cost(src, .) + +/datum/uplink_item/proc/description() + return desc + +// get_goods does not necessarily return physical objects, it is simply a way to acquire the uplink item without paying +/datum/uplink_item/proc/get_goods(var/obj/item/device/uplink/U, var/loc) + return 0 + +/datum/uplink_item/proc/log_icon() + return + +/datum/uplink_item/proc/purchase_log(obj/item/device/uplink/U) + feedback_add_details("traitor_uplink_items_bought", "[src]") + log_and_message_admins("used \the [U.loc] to buy \a [src]") + U.purchase_log[src] = U.purchase_log[src] + 1 + +datum/uplink_item/dd_SortValue() + return cost(INFINITY) + +/******************************** +* * +* Physical Uplink Entries * +* * +********************************/ +/datum/uplink_item/item/buy(var/obj/item/device/uplink/U, var/mob/user) + var/obj/item/I = ..() + if(!I) + return + + if(istype(I, /list)) + var/list/L = I + if(L.len) I = L[1] + + if(istype(I) && ishuman(user)) + var/mob/living/carbon/human/A = user + A.put_in_any_hand_if_possible(I) + return I + +/datum/uplink_item/item/get_goods(var/obj/item/device/uplink/U, var/loc) + var/obj/item/I = new path(loc) + return I + +/datum/uplink_item/item/description() + if(!desc) + // Fallback description + var/obj/temp = src.path + desc = initial(temp.desc) + return ..() + +/datum/uplink_item/item/log_icon() + var/obj/I = path + return "\icon[I]" + +/******************************** +* * +* Abstract Uplink Entries * +* * +********************************/ +/datum/uplink_item/abstract + var/static/image/default_abstract_uplink_icon + +/datum/uplink_item/abstract/log_icon() + if(!default_abstract_uplink_icon) + default_abstract_uplink_icon = image('icons/obj/pda.dmi', "pda-syn") + + return "\icon[default_abstract_uplink_icon]" + +/**************** +* Support procs * +****************/ +/proc/get_random_uplink_items(var/obj/item/device/uplink/U, var/remaining_TC, var/loc) + var/list/bought_items = list() + while(remaining_TC) + var/datum/uplink_item/I = default_uplink_selection.get_random_item(remaining_TC, U, bought_items) + if(!I) + break + bought_items += I + remaining_TC -= I.cost(remaining_TC, U) + + return bought_items diff --git a/code/datums/uplink/visible_weapons.dm b/code/datums/uplink/visible_weapons.dm new file mode 100644 index 00000000000..4c9ac49ee12 --- /dev/null +++ b/code/datums/uplink/visible_weapons.dm @@ -0,0 +1,91 @@ +/*************************************** +* Highly Visible and Dangerous Weapons * +***************************************/ +/datum/uplink_item/item/visible_weapons + category = /datum/uplink_category/visible_weapons + +/datum/uplink_item/item/visible_weapons/energy_sword + name = "Energy Sword" + item_cost = 4 + path = /obj/item/weapon/melee/energy/sword + +/datum/uplink_item/item/visible_weapons/dartgun + name = "Dart Gun" + item_cost = 5 + path = /obj/item/weapon/gun/projectile/dartgun + +/datum/uplink_item/item/visible_weapons/crossbow + name = "Energy Crossbow" + item_cost = 5 + path = /obj/item/weapon/gun/energy/crossbow + +/datum/uplink_item/item/visible_weapons/silenced_45 + name = "Silenced .45" + item_cost = 5 + path = /obj/item/weapon/gun/projectile/silenced + +/datum/uplink_item/item/visible_weapons/riggedlaser + name = "Exosuit Rigged Laser" + item_cost = 6 + path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser + +/datum/uplink_item/item/visible_weapons/revolver + name = "Revolver" + item_cost = 6 + path = /obj/item/weapon/gun/projectile/revolver + +/datum/uplink_item/item/visible_weapons/heavysniper + name = "Anti-materiel Rifle" + item_cost = DEFAULT_TELECRYSTAL_AMOUNT + path = /obj/item/weapon/gun/projectile/heavysniper + +//These are for traitors (or other antags, perhaps) to have the option of purchasing some merc gear. +/datum/uplink_item/item/visible_weapons/submachinegun + name = "Submachine Gun" + item_cost = 6 + path = /obj/item/weapon/gun/projectile/automatic/c20r + +/datum/uplink_item/item/visible_weapons/assaultrifle + name = "Assault Rifle" + item_cost = 7 + path = /obj/item/weapon/gun/projectile/automatic/sts35 + +/datum/uplink_item/item/visible_weapons/combatshotgun + name = "Combat Shotgun" + item_cost = 7 + path = /obj/item/weapon/gun/projectile/shotgun/pump/combat + +/datum/uplink_item/item/visible_weapons/egun + name = "Energy Gun" + item_cost = 5 + path = /obj/item/weapon/gun/energy/gun + +/datum/uplink_item/item/visible_weapons/lasercannon + name = "Laser Cannon" + item_cost = 6 + path = /obj/item/weapon/gun/energy/lasercannon + +/datum/uplink_item/item/visible_weapons/lasercarbine + name = "Laser Carbine" + item_cost = 7 + path = /obj/item/weapon/gun/energy/laser + +/datum/uplink_item/item/visible_weapons/ionrifle + name = "Ion Rifle" + item_cost = 5 + path = /obj/item/weapon/gun/energy/ionrifle + +/datum/uplink_item/item/visible_weapons/xray + name = "Xray Gun" + item_cost = 7 + path = /obj/item/weapon/gun/energy/xray + +/datum/uplink_item/item/visible_weapons/tactknife + name = "Tactical Knife" + item_cost = 1 + path = /obj/item/weapon/material/hatchet/tacknife + +/datum/uplink_item/item/visible_weapons/combatknife + name = "Combat Knife" + item_cost = 3 + path = /obj/item/weapon/material/hatchet/tacknife/combatknife \ No newline at end of file diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index f35257a6a46..39c91afbedd 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -100,7 +100,7 @@ user.visible_message("[user] has unsheathed \a [concealed_blade] from \his [src]!", "You unsheathe \the [concealed_blade] from \the [src].") // Calling drop/put in hands to properly call item drop/pickup procs playsound(user.loc, 'sound/weapons/flipblade.ogg', 50, 1) - user.removeItem(src) + user.drop_from_inventory(src) user.put_in_hands(concealed_blade) user.put_in_hands(src) user.update_inv_l_hand(0) @@ -112,7 +112,8 @@ /obj/item/weapon/cane/concealed/attackby(var/obj/item/weapon/material/butterfly/W, var/mob/user) if(!src.concealed_blade && istype(W)) user.visible_message("[user] has sheathed \a [W] into \his [src]!", "You sheathe \the [W] into \the [src].") - user.removeItem(W, src) + user.drop_from_inventory(W) + W.loc = src src.concealed_blade = W update_icon() else diff --git a/code/game/antagonist/alien/borer.dm b/code/game/antagonist/alien/borer.dm index 783055381c3..7483fb508bf 100644 --- a/code/game/antagonist/alien/borer.dm +++ b/code/game/antagonist/alien/borer.dm @@ -46,7 +46,7 @@ var/datum/antagonist/borer/borers for(var/mob/living/carbon/human/H in mob_list) if(H.stat != DEAD && !H.has_brain_worms()) var/obj/item/organ/external/head = H.get_organ(BP_HEAD) - if(head && !(head.status & ORGAN_ROBOT)) + if(head && !(head.robotic >= ORGAN_ROBOT)) host = H break if(istype(host)) diff --git a/code/game/antagonist/antagonist.dm b/code/game/antagonist/antagonist.dm index e9d5ef71b5e..d91242ea8b5 100644 --- a/code/game/antagonist/antagonist.dm +++ b/code/game/antagonist/antagonist.dm @@ -63,13 +63,19 @@ var/list/global_objectives = list() // Universal objectives if any. var/list/candidates = list() // Potential candidates. var/list/faction_members = list() // Semi-antags (in-round revs, borer thralls) - + var/allow_latejoin = 0 //Determines whether or not the game mode will allow for the template to spawn try_latespawn // ID card stuff. var/default_access = list() var/id_type = /obj/item/weapon/card/id + var/antag_text = "You are an antagonist! Within the rules, \ + try to act as an opposing force to the crew. Further RP and try to make sure \ + other players have fun! If you are confused or at a loss, always adminhelp, \ + and before taking extreme actions, please try to also contact the administration! \ + Think through your actions and make the roleplay immersive! Please remember all \ + rules aside from those without explicit exceptions apply to antagonists." /datum/antagonist/New() ..() diff --git a/code/game/antagonist/antagonist_create.dm b/code/game/antagonist/antagonist_create.dm index 24cca9d6400..733ec3eda08 100644 --- a/code/game/antagonist/antagonist_create.dm +++ b/code/game/antagonist/antagonist_create.dm @@ -99,11 +99,14 @@ player.current << "[leader_welcome_text]" else player.current << "[welcome_text]" + if (config.objectives_disabled) + player.current << "[antag_text]" if((flags & ANTAG_HAS_NUKE) && !spawned_nuke) create_nuke() - show_objectives(player) + if (!config.objectives_disabled) + show_objectives(player) return 1 /datum/antagonist/proc/set_antag_name(var/mob/living/player) diff --git a/code/game/antagonist/antagonist_equip.dm b/code/game/antagonist/antagonist_equip.dm index 9eea323584c..2f4bc6da3a5 100644 --- a/code/game/antagonist/antagonist_equip.dm +++ b/code/game/antagonist/antagonist_equip.dm @@ -6,7 +6,8 @@ // This could use work. if(flags & ANTAG_CLEAR_EQUIPMENT) for(var/obj/item/thing in player.contents) - if(player.removeItem(thing, force = 1)) + player.drop_from_inventory(thing) + if(thing.loc != player) qdel(thing) return 1 diff --git a/code/game/antagonist/antagonist_objectives.dm b/code/game/antagonist/antagonist_objectives.dm index 63597103781..5dc6c5f327a 100644 --- a/code/game/antagonist/antagonist_objectives.dm +++ b/code/game/antagonist/antagonist_objectives.dm @@ -46,8 +46,8 @@ round for everybody else.", "Ambitions", mind.ambitions) as null|message if(isnull(new_ambitions)) return - mind.ambitions = new_ambitions new_ambitions = sanitize(new_ambitions) + mind.ambitions = new_ambitions if(new_ambitions) src << "You've set your goal to be '[new_ambitions]'." else diff --git a/code/game/antagonist/outsider/deathsquad.dm b/code/game/antagonist/outsider/deathsquad.dm index 4cc8afff6ce..3a61152ab2b 100644 --- a/code/game/antagonist/outsider/deathsquad.dm +++ b/code/game/antagonist/outsider/deathsquad.dm @@ -49,7 +49,7 @@ var/datum/antagonist/deathsquad/deathsquad player.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(player), slot_r_hand) player.equip_to_slot_or_del(new /obj/item/weapon/rig/ert/assetprotection(player), slot_back) player.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(player), slot_s_store) - player.implant_loyalty(player) + player.implant_loyalty() var/obj/item/weapon/card/id/id = create_id("Asset Protection", player) if(id) diff --git a/code/game/antagonist/outsider/ert.dm b/code/game/antagonist/outsider/ert.dm index 98a44442dc6..29ea3d27c10 100644 --- a/code/game/antagonist/outsider/ert.dm +++ b/code/game/antagonist/outsider/ert.dm @@ -7,6 +7,12 @@ var/datum/antagonist/ert/ert role_text = "Emergency Responder" role_text_plural = "Emergency Responders" welcome_text = "As member of the Emergency Response Team, you answer only to your leader and company officials." + antag_text = "You are an anti antagonist! Within the rules, \ + try to save the station and its inhabitants from the ongoing crisis. \ + Try to make sure other players have fun! If you are confused or at a loss, always adminhelp, \ + and before taking extreme actions, please try to also contact the administration! \ + Think through your actions and make the roleplay immersive! Please remember all \ + rules aside from those without explicit exceptions apply to the ERT." leader_welcome_text = "As leader of the Emergency Response Team, you answer only to the Company, and have authority to override the Captain where it is necessary to achieve your mission goals. It is recommended that you attempt to cooperate with the captain where possible, however." landmark_id = "Response Team" id_type = /obj/item/weapon/card/id/centcom/ERT @@ -41,6 +47,6 @@ var/datum/antagonist/ert/ert player.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(src), slot_shoes) player.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves) player.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(src), slot_glasses) - + create_id(role_text, player) return 1 diff --git a/code/game/antagonist/outsider/mercenary.dm b/code/game/antagonist/outsider/mercenary.dm index 4c071130ad4..c27d510d8be 100644 --- a/code/game/antagonist/outsider/mercenary.dm +++ b/code/game/antagonist/outsider/mercenary.dm @@ -39,16 +39,15 @@ var/datum/antagonist/mercenary/mercs player.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(player), slot_shoes) player.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(player), slot_gloves) if(player.backbag == 2) player.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(player), slot_back) - if(player.backbag == 3) player.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(player), slot_back) + if(player.backbag == 3) player.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(player), slot_back) if(player.backbag == 4) player.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(player), slot_back) player.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(player.back), slot_in_backpack) player.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/pill/cyanide(player), slot_in_backpack) player.mind.tcrystals = DEFAULT_TELECRYSTAL_AMOUNT player.mind.accept_tcrystals = 1 - if (player.mind == leader) - var/obj/item/device/radio/uplink/U = new(player.loc, player.mind, DEFAULT_TELECRYSTAL_AMOUNT) - player.put_in_hands(U) + var/obj/item/device/radio/uplink/U = new(player.loc, player.mind, DEFAULT_TELECRYSTAL_AMOUNT) + player.put_in_hands(U) player.update_icons() diff --git a/code/game/antagonist/outsider/raider.dm b/code/game/antagonist/outsider/raider.dm index 0a68becfd68..08a6e8644b3 100644 --- a/code/game/antagonist/outsider/raider.dm +++ b/code/game/antagonist/outsider/raider.dm @@ -207,7 +207,7 @@ var/datum/antagonist/raider/raiders player.equip_to_slot_or_del(new new_shoes(player),slot_shoes) if(!player.shoes) //If equipping shoes failed, fall back to equipping sandals - var/fallback_type = pick(/obj/item/clothing/shoes/sandal, /obj/item/clothing/shoes/jackboots/unathi) + var/fallback_type = pick(/obj/item/clothing/shoes/sandal, /obj/item/clothing/shoes/jackboots/toeless) player.equip_to_slot_or_del(new fallback_type(player), slot_shoes) player.equip_to_slot_or_del(new new_uniform(player),slot_w_uniform) diff --git a/code/game/antagonist/outsider/wizard.dm b/code/game/antagonist/outsider/wizard.dm index 5e59baeba55..14e5f900631 100644 --- a/code/game/antagonist/outsider/wizard.dm +++ b/code/game/antagonist/outsider/wizard.dm @@ -81,7 +81,7 @@ var/datum/antagonist/wizard/wizards wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(wizard_mob), slot_wear_suit) wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(wizard_mob), slot_head) if(wizard_mob.backbag == 2) wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(wizard_mob), slot_back) - if(wizard_mob.backbag == 3) wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(wizard_mob), slot_back) + if(wizard_mob.backbag == 3) wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(wizard_mob), slot_back) if(wizard_mob.backbag == 4) wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(wizard_mob), slot_back) 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) diff --git a/code/game/antagonist/station/cultist.dm b/code/game/antagonist/station/cultist.dm index aba2115d152..6bb049dcb0b 100644 --- a/code/game/antagonist/station/cultist.dm +++ b/code/game/antagonist/station/cultist.dm @@ -110,6 +110,13 @@ var/datum/antagonist/cultist/cult . = ..() if(.) player << "You catch a glimpse of the Realm of Nar-Sie, the Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of That Which Waits. Assist your new compatriots in their dark dealings. Their goals are yours, and yours are theirs. You serve the Dark One above all else. Bring It back." + if(player.current && !istype(player.current, /mob/living/simple_animal/construct)) + player.current.add_language(LANGUAGE_CULT) + +/datum/antagonist/cultist/remove_antagonist(var/datum/mind/player, var/show_message, var/implanted) + . = ..() + if(. && player.current && !istype(player.current, /mob/living/simple_animal/construct)) + player.current.remove_language(LANGUAGE_CULT) /datum/antagonist/cultist/can_become_antag(var/datum/mind/player) if(!..()) diff --git a/code/game/antagonist/station/renegade.dm b/code/game/antagonist/station/renegade.dm index b077977fd7a..efcdbad2362 100644 --- a/code/game/antagonist/station/renegade.dm +++ b/code/game/antagonist/station/renegade.dm @@ -1,33 +1,55 @@ var/datum/antagonist/renegade/renegades /datum/antagonist/renegade + id = MODE_RENEGADE + role_type = BE_RENEGADE role_text = "Renegade" role_text_plural = "Renegades" - welcome_text = "Your own safety matters above all else, trust no one and kill anyone who gets in your way. However, armed as you are, now would be the perfect time to settle that score or grab that pair of yellow gloves you've been eyeing..." - id = MODE_RENEGADE + bantype = "renegade" + restricted_jobs = list("AI", "Cyborg") + welcome_text = "Something's going to go wrong today, you can just feel it. You're paranoid, you've got a gun, and you're going to survive." + antag_text = "You are a minor antagonist! Within the rules, \ + try to protect yourself and what's important to you. You aren't here to cause trouble, \ + you're just more willing (and equipped) to go to extremes to stop it than others are. \ + Your job is to somewhat oppose the other antagonists, should they threaten you, in ways that aren't quite legal themselves. \ + Try to make sure other players have fun! If you are confused or at a loss, always adminhelp, \ + and before taking extreme actions, please try to also contact the administration! \ + Think through your actions and make the roleplay immersive! Please remember all \ + rules aside from those without explicit exceptions apply to antagonists." flags = ANTAG_SUSPICIOUS | ANTAG_IMPLANT_IMMUNE | ANTAG_RANDSPAWN | ANTAG_VOTABLE - hard_cap = 5 - hard_cap_round = 7 hard_cap = 8 hard_cap_round = 12 - initial_spawn_req = 3 - initial_spawn_target = 6 + initial_spawn_req = 2 + initial_spawn_target = 4 var/list/spawn_guns = list( - /obj/item/weapon/gun/energy/gun, /obj/item/weapon/gun/energy/laser, - /obj/item/weapon/gun/projectile, - /obj/item/weapon/gun/projectile/revolver/detective, - /obj/item/weapon/gun/projectile/automatic/c20r, - /obj/item/weapon/gun/projectile/deagle/camo, - /obj/item/weapon/gun/projectile/pistol, - /obj/item/weapon/silencer, - /obj/item/weapon/gun/projectile/shotgun/pump, - /obj/item/weapon/gun/projectile/shotgun/pump/combat, + /obj/item/weapon/gun/energy/captain, + /obj/item/weapon/gun/energy/lasercannon, + /obj/item/weapon/gun/energy/xray, + /obj/item/weapon/gun/energy/gun, + /obj/item/weapon/gun/energy/gun/burst, + /obj/item/weapon/gun/energy/gun/nuclear, + /obj/item/weapon/gun/energy/crossbow, + /obj/item/weapon/gun/energy/crossbow/largecrossbow, /obj/item/weapon/gun/projectile/automatic, /obj/item/weapon/gun/projectile/automatic/mini_uzi, - /obj/item/weapon/gun/energy/crossbow + /obj/item/weapon/gun/projectile/automatic/c20r, + /obj/item/weapon/gun/projectile/automatic/sts35, + /obj/item/weapon/gun/projectile/automatic/wt550, + /obj/item/weapon/gun/projectile/automatic/z8, + /obj/item/weapon/gun/projectile/colt/detective, + /obj/item/weapon/gun/projectile/sec/wood, + /obj/item/weapon/gun/projectile/silenced, + /obj/item/weapon/gun/projectile/pistol, + /obj/item/weapon/gun/projectile/revolver, + /obj/item/weapon/gun/projectile/shotgun/pump, + /obj/item/weapon/gun/projectile/shotgun/pump/combat, + /obj/item/weapon/gun/projectile/shotgun/doublebarrel, + list(/obj/item/weapon/gun/projectile/shotgun/doublebarrel/pellet, /obj/item/weapon/gun/projectile/shotgun/doublebarrel/sawn), + list(/obj/item/weapon/gun/projectile/deagle, /obj/item/weapon/gun/projectile/deagle/gold, /obj/item/weapon/gun/projectile/deagle/camo), + list(/obj/item/weapon/gun/projectile/revolver/detective, /obj/item/weapon/gun/projectile/revolver/deckard) ) /datum/antagonist/renegade/New() @@ -49,7 +71,19 @@ var/datum/antagonist/renegade/renegades return var/gun_type = pick(spawn_guns) + if(islist(gun_type)) + gun_type = pick(gun_type) var/obj/item/gun = new gun_type(get_turf(player)) + + // Attempt to put into a container. + if(player.equip_to_storage(gun)) + return + + // If that failed, attempt to put into any valid non-handslot + if(player.equip_to_appropriate_slot(gun)) + return + + // If that failed, then finally attempt to at least let the player carry the weapon player.put_in_hands(gun) diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm index 8eee626d2bb..45e852551d9 100644 --- a/code/game/dna/genes/monkey.dm +++ b/code/game/dna/genes/monkey.dm @@ -22,7 +22,7 @@ for(var/obj/item/W in (H.contents-implants)) if (W==H.w_uniform) // will be teared continue - H.removeItem(W, force = 1) + H.drop_from_inventory(W) M.transforming = 1 M.canmove = 0 M.icon = null @@ -90,7 +90,7 @@ W.loc = null if(!connected) for(var/obj/item/W in (Mo.contents-implants)) - Mo.removeItem(W, force = 1) + Mo.drop_from_inventory(W) M.transforming = 1 M.canmove = 0 M.icon = null diff --git a/code/game/gamemodes/changeling/absorbed_dna.dm b/code/game/gamemodes/changeling/absorbed_dna.dm index 2527f906975..3c23f0270c3 100644 --- a/code/game/gamemodes/changeling/absorbed_dna.dm +++ b/code/game/gamemodes/changeling/absorbed_dna.dm @@ -3,10 +3,14 @@ var/datum/dna/dna var/speciesName var/list/languages + var/identifying_gender + var/list/flavour_texts -/datum/absorbed_dna/New(var/newName, var/newDNA, var/newSpecies, var/newLanguages) +/datum/absorbed_dna/New(var/newName, var/newDNA, var/newSpecies, var/newLanguages, var/newIdentifying_Gender, var/list/newFlavour) ..() name = newName dna = newDNA speciesName = newSpecies languages = newLanguages + identifying_gender = newIdentifying_Gender + flavour_texts = newFlavour ? newFlavour.Copy() : null \ No newline at end of file diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index 7e6563ca4b1..a89fe95d958 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -85,7 +85,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E var/mob/living/carbon/human/H = src if(istype(H)) - var/datum/absorbed_dna/newDNA = new(H.real_name, H.dna, H.species.name, H.languages) + var/datum/absorbed_dna/newDNA = new(H.real_name, H.dna, H.species.name, H.languages, H.identifying_gender, H.flavor_texts) absorbDNA(newDNA) return 1 diff --git a/code/game/gamemodes/changeling/powers/absorb.dm b/code/game/gamemodes/changeling/powers/absorb.dm index 16f34357b5e..e75020fc591 100644 --- a/code/game/gamemodes/changeling/powers/absorb.dm +++ b/code/game/gamemodes/changeling/powers/absorb.dm @@ -71,7 +71,7 @@ src.verbs += /mob/proc/changeling_respec src << "We can now re-adapt, reverting our evolution so that we may start anew, if needed." - var/datum/absorbed_dna/newDNA = new(T.real_name, T.dna, T.species.name, T.languages) + var/datum/absorbed_dna/newDNA = new(T.real_name, T.dna, T.species.name, T.languages, T.identifying_gender, T.flavor_texts) absorbDNA(newDNA) if(T.mind && T.mind.changeling) diff --git a/code/game/gamemodes/changeling/powers/armblade.dm b/code/game/gamemodes/changeling/powers/armblade.dm index 38981ddd6cc..7ab1cdda3b7 100644 --- a/code/game/gamemodes/changeling/powers/armblade.dm +++ b/code/game/gamemodes/changeling/powers/armblade.dm @@ -79,7 +79,7 @@ organ.implants -= src host.pinned -= src host.embedded -= src - host.removeItem(src, force = 1) + host.drop_from_inventory(src) spawn(1) if(src) qdel(src) \ No newline at end of file diff --git a/code/game/gamemodes/changeling/powers/lesser_form.dm b/code/game/gamemodes/changeling/powers/lesser_form.dm index cd487c0dc3f..f2742490f66 100644 --- a/code/game/gamemodes/changeling/powers/lesser_form.dm +++ b/code/game/gamemodes/changeling/powers/lesser_form.dm @@ -78,7 +78,7 @@ qdel(animation) for(var/obj/item/W in src) - C.removeItem(W, force = 1) + C.drop_from_inventory(W) var/mob/living/carbon/human/O = new /mob/living/carbon/human( src ) if (C.dna.GetUIState(DNA_UI_GENDER)) diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm index 647f5bd91f0..4f53c95b464 100644 --- a/code/game/gamemodes/changeling/powers/revive.dm +++ b/code/game/gamemodes/changeling/powers/revive.dm @@ -37,7 +37,7 @@ H.status_flags -= DISFIGURED H.update_body(1) C << "We have regenerated." - C.status_flags &= ~(FAKEDEATH) + C.status_flags &= ~FAKEDEATH C.update_canmove() C.mind.changeling.purchased_powers -= C feedback_add_details("changeling_powers","CR") diff --git a/code/game/gamemodes/changeling/powers/transform.dm b/code/game/gamemodes/changeling/powers/transform.dm index 793b3a42eaf..57a55e2e217 100644 --- a/code/game/gamemodes/changeling/powers/transform.dm +++ b/code/game/gamemodes/changeling/powers/transform.dm @@ -37,10 +37,9 @@ if(ishuman(src)) var/mob/living/carbon/human/H = src H.b_type = "AB+" //For some reason we have two blood types on the mob. - for(var/flavor in H.flavor_texts) //Nulls out flavor text, so we don't keep our previous mob's flavor. - flavor = null + H.identifying_gender = chosen_dna.identifying_gender + H.flavor_texts = chosen_dna.flavour_texts ? chosen_dna.flavour_texts.Copy() : null src.real_name = chosen_dna.name - src.flavor_text = "" src.UpdateAppearance() domutcheck(src, null) changeling_update_languages(changeling.absorbed_languages) diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 35f067323a4..1a0aa9e1c53 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -1,6 +1,6 @@ /obj/item/weapon/melee/cultblade name = "cult blade" - desc = "An arcane weapon wielded by the followers of Nar-Sie" + desc = "An arcane weapon wielded by the followers of Nar-Sie." icon_state = "cultblade" item_state = "cultblade" w_class = 4 @@ -28,7 +28,7 @@ user.apply_damage(rand(force/2, force), BRUTE, zone, 0, sharp=1, edge=1) user.Weaken(5) - user.removeItem(src, src.loc) + user.drop_from_inventory(src, src.loc) throw_at(get_edge_target_turf(src, pick(alldirs)), rand(1,3), throw_speed) var/spooky = pick('sound/hallucinations/growl1.ogg', 'sound/hallucinations/growl2.ogg', 'sound/hallucinations/growl3.ogg', 'sound/hallucinations/wail.ogg') @@ -68,7 +68,7 @@ /obj/item/clothing/suit/cultrobes name = "cult robes" - desc = "A set of armored robes worn by the followers of Nar-Sie" + desc = "A set of armored robes worn by the followers of Nar-Sie." icon_state = "cultrobes" item_state = "cultrobes" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS @@ -86,7 +86,7 @@ /obj/item/clothing/suit/cultrobes/magusred name = "magus robes" - desc = "A set of armored robes worn by the followers of Nar-Sie" + desc = "A set of armored robes worn by the followers of Nar-Sie." icon_state = "magusred" item_state = "magusred" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS @@ -94,7 +94,7 @@ /obj/item/clothing/head/helmet/space/cult name = "cult helmet" - desc = "A space worthy helmet used by the followers of Nar-Sie" + desc = "A space worthy helmet used by the followers of Nar-Sie." icon_state = "cult_helmet" armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) siemens_coefficient = 0 @@ -106,7 +106,7 @@ name = "cult armour" icon_state = "cult_armour" item_state = "cult_armour" - desc = "A bulky suit of armour, bristling with spikes. It looks space proof." + desc = "A bulky suit of armour, bristling with spikes. It looks space-worthy." w_class = 3 allowed = list(/obj/item/weapon/book/tome,/obj/item/weapon/melee/cultblade,/obj/item/weapon/tank/emergency_oxygen,/obj/item/device/suit_cooling_unit) slowdown = 1 diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 226df14bfbc..0f2c4d83b66 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -8,18 +8,18 @@ /obj/structure/cult/talisman name = "Altar" - desc = "A bloodstained altar dedicated to Nar-Sie" + desc = "A bloodstained altar dedicated to Nar-Sie." icon_state = "talismanaltar" /obj/structure/cult/forge name = "Daemon forge" - desc = "A forge used in crafting the unholy weapons used by the armies of Nar-Sie" + desc = "A forge used in crafting the unholy weapons used by the armies of Nar-Sie." icon_state = "forge" /obj/structure/cult/pylon name = "Pylon" - desc = "A floating crystal that hums with an unearthly energy" + desc = "A floating crystal that hums with an unearthly energy." icon_state = "pylon" var/isbroken = 0 light_range = 5 @@ -71,7 +71,7 @@ /obj/structure/cult/tome name = "Desk" - desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl" + desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl." icon_state = "tomealtar" //sprites for this no longer exist -Pete @@ -86,7 +86,7 @@ /obj/effect/gateway name = "gateway" - desc = "You're pretty sure that abyss is staring back" + desc = "You're pretty sure that abyss is staring back." icon = 'icons/obj/cult.dmi' icon_state = "hole" density = 1 diff --git a/code/game/gamemodes/cult/narsie.dm b/code/game/gamemodes/cult/narsie.dm index f746e702977..ea866ad8566 100644 --- a/code/game/gamemodes/cult/narsie.dm +++ b/code/game/gamemodes/cult/narsie.dm @@ -143,7 +143,7 @@ var/global/list/narsie_list = list() /obj/singularity/narsie/proc/narsiefloor(var/turf/T)//leaving "footprints" if(!(istype(T, /turf/simulated/wall/cult)||istype(T, /turf/space))) if(T.icon_state != "cult-narsie") - T.desc = "something that goes beyond your understanding went this way" + T.desc = "something that goes beyond your understanding went this way." T.icon = 'icons/turf/flooring/cult.dmi' T.icon_state = "cult-narsie" T.set_light(1) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index c8c44b825f3..37445326cae 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -346,6 +346,7 @@ var/list/sacrificed = list() for(var/mob/observer/dead/O in loc) if(!O.client) continue if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue + if(!(O.client.prefs.be_special & BE_CULTIST)) continue ghost = O break @@ -442,6 +443,7 @@ var/list/sacrificed = list() if(!O.client) continue if(!O.MayRespawn()) continue if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue + if(!(O.client.prefs.be_special & BE_CULTIST)) continue ghost = O break if(!ghost) @@ -830,11 +832,11 @@ var/list/sacrificed = list() return cultist.buckled = null if (cultist.handcuffed) - cultist.removeItem(cultist.handcuffed, force = 1) + cultist.drop_from_inventory(cultist.handcuffed) if (cultist.legcuffed) - cultist.removeItem(cultist.legcuffed, force = 1) + cultist.drop_from_inventory(cultist.legcuffed) if (istype(cultist.wear_mask, /obj/item/clothing/mask/muzzle)) - cultist.removeItem(cultist.wear_mask, force = 1) + cultist.drop_from_inventory(cultist.wear_mask) if(istype(cultist.loc, /obj/structure/closet)&&cultist.loc:welded) cultist.loc:welded = 0 if(istype(cultist.loc, /obj/structure/closet/secure_closet)&&cultist.loc:locked) diff --git a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm index 5ed25c44aff..c25e3c55674 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm @@ -93,7 +93,7 @@ playsound(src, 'sound/effects/supermatter.ogg', 50, 1) - user.removeItem(W, force = 1) + user.drop_from_inventory(W) Consume(W) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index a0be65c729f..2aa1d2b024a 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -201,7 +201,6 @@ var/global/list/additional_antag_types = list() display_roundstart_logout_report() spawn (rand(waittime_l, waittime_h)) - send_intercept() spawn(rand(100,150)) announce_ert_disabled() @@ -373,56 +372,6 @@ var/global/list/additional_antag_types = list() /datum/game_mode/proc/check_win() //universal trigger to be called at mob death, nuke explosion, etc. To be called from everywhere. return 0 -/datum/game_mode/proc/send_intercept() - - var/intercepttext = "Cent. Com. Update Requested status information:
" - intercepttext += " In case you have misplaced your copy, attached is a list of personnel whom reliable sources™ suspect may be affiliated with subversive elements:
" - - var/list/disregard_roles = list() - for(var/antag_type in all_antag_types) - var/datum/antagonist/antag = all_antag_types[antag_type] - if(antag.flags & ANTAG_SUSPICIOUS) - disregard_roles |= antag.role_text - - var/list/suspects = list() - for(var/mob/living/carbon/human/man in player_list) if(man.client && man.mind) - - // NT relation option - var/special_role = man.mind.special_role - var/datum/antagonist/special_role_data = get_antag_data(special_role) - - if (special_role in disregard_roles) - continue - else if(man.client.prefs.nanotrasen_relation == COMPANY_OPPOSED && prob(50) || \ - man.client.prefs.nanotrasen_relation == COMPANY_SKEPTICAL && prob(20)) - suspects += man - // Antags - else if(special_role_data && prob(special_role_data.suspicion_chance)) - suspects += man - - // Some poor people who were just in the wrong place at the wrong time.. - else if(prob(10)) - suspects += man - - for(var/mob/M in suspects) - if(player_is_antag(M.mind, only_offstation_roles = 1)) - continue - switch(rand(1, 100)) - if(1 to 50) - intercepttext += "Someone with the job of [M.mind.assigned_role]
" - else - intercepttext += "[M.name], the [M.mind.assigned_role]
" - - for (var/obj/machinery/computer/communications/comm in machines) - if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept) - var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc ) - intercept.name = "Cent. Com. Status Summary" - intercept.info = intercepttext - - comm.messagetitle.Add("Cent. Com. Status Summary") - comm.messagetext.Add(intercepttext) - world << sound('sound/AI/commandreport.ogg') - /datum/game_mode/proc/get_players_for_role(var/role, var/antag_id) var/list/players = list() var/list/candidates = list() @@ -567,25 +516,10 @@ proc/get_nt_opposed() if(dudes.len == 0) return null return pick(dudes) -//Announces objectives/generic antag text. -/proc/show_generic_antag_text(var/datum/mind/player) - if(player.current) - player.current << \ - "You are an antagonist! Within the rules, \ - try to act as an opposing force to the crew. Further RP and try to make sure \ - other players have fun! If you are confused or at a loss, always adminhelp, \ - and before taking extreme actions, please try to also contact the administration! \ - Think through your actions and make the roleplay immersive! Please remember all \ - rules aside from those without explicit exceptions apply to antagonists." - /proc/show_objectives(var/datum/mind/player) if(!player || !player.current) return - if(config.objectives_disabled) - show_generic_antag_text(player) - return - var/obj_count = 1 player.current << "Your current objectives:" for(var/datum/objective/objective in player.objectives) diff --git a/code/game/gamemodes/heist/heist.dm b/code/game/gamemodes/heist/heist.dm index c978cb4ffe7..f91191fac5c 100644 --- a/code/game/gamemodes/heist/heist.dm +++ b/code/game/gamemodes/heist/heist.dm @@ -11,7 +11,7 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind' required_players_secret = 15 required_enemies = 4 round_description = "An unidentified bluespace signature is approaching the station!" - extended_round_description = "The Company's majority control of phoron in Vir has marked the \ + extended_round_description = "The Company's majority control of phoron in "+starsys_name+" has marked the \ station to be a highly valuable target for many competing organizations and individuals. Being a \ colony of sizable population and considerable wealth causes it to often be the target of various \ attempts of robbery, fraud and other malicious actions." diff --git a/code/game/gamemodes/mixed/traitorrenegade.dm b/code/game/gamemodes/mixed/traitorrenegade.dm index c9430b10f9e..c69f67c02a0 100644 --- a/code/game/gamemodes/mixed/traitorrenegade.dm +++ b/code/game/gamemodes/mixed/traitorrenegade.dm @@ -3,9 +3,9 @@ round_description = "Subversive elements have invaded the station, and certain individuals are feeling uncertain about their safety." extended_round_description = "Traitors and renegades spawn during this round." config_tag = "traitorren" - required_players = 10 //I don't think we can have it lower and not need an ERT every round. + required_players = 11 //I don't think we can have it lower and not need an ERT every round. required_players_secret = 11 //I don't think we can have it lower and not need an ERT every round. required_enemies = 4 end_on_antag_death = 0 - antag_tags = list(MODE_TRAITOR, MODE_RENEGADE) - require_all_templates = 1 \ No newline at end of file + antag_tags = list(MODE_AUTOTRAITOR, MODE_RENEGADE) + require_all_templates = 1 diff --git a/code/game/gamemodes/mixed/visitors.dm b/code/game/gamemodes/mixed/visitors.dm index e9a59198191..853e5039d42 100644 --- a/code/game/gamemodes/mixed/visitors.dm +++ b/code/game/gamemodes/mixed/visitors.dm @@ -3,8 +3,8 @@ round_description = "A space wizard and a ninja have invaded the station!" extended_round_description = "A ninja and wizard spawn during this round." config_tag = "visitors" - required_players = 6 - required_players_secret = 6 + required_players = 8 + required_players_secret = 8 required_enemies = 2 end_on_antag_death = 0 antag_tags = list(MODE_WIZARD, MODE_NINJA) diff --git a/code/game/gamemodes/ninja/ninja.dm b/code/game/gamemodes/ninja/ninja.dm index d71412dc8a1..480c69d27fa 100644 --- a/code/game/gamemodes/ninja/ninja.dm +++ b/code/game/gamemodes/ninja/ninja.dm @@ -10,7 +10,7 @@ only hope this unknown assassin isn't here for you." config_tag = "ninja" required_players = 1 - required_players_secret = 8 + required_players_secret = 6 required_enemies = 1 end_on_antag_death = 0 antag_tags = list(MODE_NINJA) \ No newline at end of file diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 3393373d7bd..5f268bba16b 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -7,7 +7,7 @@ var/list/nuke_disks = list() /datum/game_mode/nuclear name = "Mercenary" round_description = "A mercenary strike force is approaching the station!" - extended_round_description = "The Company's majority control of phoron in Vir has marked the \ + extended_round_description = "The Company's majority control of phoron in "+starsys_name+" has marked the \ station to be a highly valuable target for many competing organizations and individuals. Being a \ colony of sizable population and considerable wealth causes it to often be the target of various \ attempts of robbery, fraud and other malicious actions." diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 45f88d3b058..98fc360160f 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -3,10 +3,10 @@ config_tag = "revolution" round_description = "Some crewmembers are attempting to start a revolution!" extended_round_description = "Revolutionaries - Remove the heads of staff from power. Convert other crewmembers to your cause using the 'Convert Bourgeoise' verb. Protect your leaders." - required_players = 15 - required_players_secret = 15 + required_players = 12 //should be enough for a decent manifest, hopefully + required_players_secret = 12 //pretty sure rev doesn't even appear in secret required_enemies = 3 - auto_recall_shuttle = 0 //NO THANKS + auto_recall_shuttle = 0 //un-wanted on polaris end_on_antag_death = 0 shuttle_delay = 3 antag_tags = list(MODE_REVOLUTIONARY, MODE_LOYALIST) diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 5a389e68f1f..c4b5d787a44 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -1,7 +1,7 @@ /datum/game_mode/traitor name = "traitor" round_description = "There is a foreign agent or traitor on the station. Do not let the traitor succeed!" - extended_round_description = "The Company's majority control of phoron in Vir has marked the \ + extended_round_description = "The Company's majority control of phoron in "+starsys_name+" has marked the \ station to be a highly valuable target for many competing organizations and individuals. The varied pasts \ and experiences of your coworkers have left them susceptible to the vices and temptations of humanity. \ Is the station the safe self-contained workplace you once thought it was, or has it become a playground \ diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 0cc48203c57..9da98075f3c 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -4,7 +4,7 @@ extended_round_description = "A powerful entity capable of manipulating the elements around him, most commonly referred to as a 'wizard', has infiltrated the station. They have a wide variety of powers and spells available to them that makes your own simple moral self tremble with fear and excitement. Ultimately, their purpose is unknown. However, it is up to you and your crew to decide if their powers can be used for good or if their arrival foreshadows the destruction of the entire station." config_tag = "wizard" required_players = 1 - required_players_secret = 8 + required_players_secret = 6 required_enemies = 1 end_on_antag_death = 0 antag_tags = list(MODE_WIZARD) diff --git a/code/game/jobs/job/assistant.dm b/code/game/jobs/job/assistant.dm index 19a578b3553..ff87fb58e41 100644 --- a/code/game/jobs/job/assistant.dm +++ b/code/game/jobs/job/assistant.dm @@ -7,7 +7,7 @@ total_positions = -1 spawn_positions = -1 supervisors = "absolutely everyone" - selection_color = "#dddddd" + selection_color = "#515151" economic_modifier = 1 access = list() //See /datum/job/assistant/get_access() minimal_access = list() //See /datum/job/assistant/get_access() @@ -17,7 +17,7 @@ if(!H) return 0 switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) if (H.mind.role_alt_title) switch(H.mind.role_alt_title) diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index 5f60ee90f55..69f837d8f92 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -10,7 +10,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) total_positions = 1 spawn_positions = 1 supervisors = "company officials and Corporate Regulations" - selection_color = "#ccccff" + selection_color = "#1D1D4F" alt_titles = list("Station Administrator") idtype = /obj/item/weapon/card/id/gold req_admin_notify = 1 @@ -28,12 +28,19 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_l_ear) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/captain(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_cap(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/cap(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) - var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H) + H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/captain(H), slot_w_uniform) if(H.age>49) - U.accessories += new /obj/item/clothing/accessory/medal/gold/captain(U) - H.equip_to_slot_or_del(U, slot_w_uniform) + // Since we can have something other than the default uniform at this + // point, check if we can actually attach the medal + var/obj/item/clothing/uniform = H.w_uniform + var/obj/item/clothing/accessory/medal/gold/captain/medal = new() + + if(uniform && uniform.can_attach_accessory(medal)) + uniform.attach_accessory(null, medal) + else + qdel(medal) H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head) @@ -44,7 +51,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack) - H.implant_loyalty(src) + H.implant_loyalty() return 1 @@ -63,7 +70,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) total_positions = 1 spawn_positions = 1 supervisors = "the captain" - selection_color = "#ddddff" + selection_color = "#2F2F7F" idtype = /obj/item/weapon/card/id/silver req_admin_notify = 1 minimal_player_age = 10 @@ -91,7 +98,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes) diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index 48769efa197..f4c3ca9e1bc 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -8,7 +8,7 @@ total_positions = 2 spawn_positions = 2 supervisors = "the head of personnel" - selection_color = "#dddddd" + selection_color = "#515151" access = list(access_hydroponics, access_bar, access_kitchen) minimal_access = list(access_bar) alt_titles = list("Barista") @@ -18,7 +18,7 @@ if(!H) return 0 switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes) @@ -37,7 +37,7 @@ total_positions = 2 spawn_positions = 2 supervisors = "the head of personnel" - selection_color = "#dddddd" + selection_color = "#515151" access = list(access_hydroponics, access_bar, access_kitchen) minimal_access = list(access_kitchen) alt_titles = list("Cook") @@ -64,7 +64,7 @@ total_positions = 2 spawn_positions = 1 supervisors = "the head of personnel" - selection_color = "#dddddd" + selection_color = "#515151" access = list(access_hydroponics, access_bar, access_kitchen) minimal_access = list(access_hydroponics) alt_titles = list("Hydroponicist") @@ -81,7 +81,7 @@ H.equip_to_slot_or_del(new /obj/item/device/pda/botanist(H), slot_belt) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/hydroponics(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_hyd(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/hyd(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) return 1 @@ -97,7 +97,7 @@ total_positions = 1 spawn_positions = 1 supervisors = "the head of personnel" - selection_color = "#dddddd" + selection_color = "#515151" economic_modifier = 5 access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station) minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station) @@ -127,7 +127,7 @@ total_positions = 2 spawn_positions = 2 supervisors = "the quartermaster and the head of personnel" - selection_color = "#dddddd" + selection_color = "#515151" access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station) minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting) @@ -152,7 +152,7 @@ total_positions = 3 spawn_positions = 3 supervisors = "the quartermaster and the head of personnel" - selection_color = "#dddddd" + selection_color = "#515151" economic_modifier = 5 access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station) minimal_access = list(access_mining, access_mining_station, access_mailsorting) @@ -163,7 +163,7 @@ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo (H), slot_l_ear) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/eng(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/miner(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/device/pda/shaftminer(H), slot_belt) @@ -191,7 +191,7 @@ total_positions = 2 spawn_positions = 2 supervisors = "the head of personnel" - selection_color = "#dddddd" + selection_color = "#515151" access = list(access_janitor, access_maint_tunnels) minimal_access = list(access_janitor, access_maint_tunnels) alt_titles = list("Custodian") @@ -217,7 +217,7 @@ total_positions = 1 spawn_positions = 1 supervisors = "the head of personnel" - selection_color = "#dddddd" + selection_color = "#515151" access = list(access_library, access_maint_tunnels) minimal_access = list(access_library) alt_titles = list("Journalist") @@ -243,7 +243,7 @@ total_positions = 2 spawn_positions = 2 supervisors = "company officials and Corporate Regulations" - selection_color = "#dddddd" + selection_color = "#515151" economic_modifier = 7 access = list(access_lawyer, access_sec_doors, access_maint_tunnels, access_heads) minimal_access = list(access_lawyer, access_sec_doors, access_heads) @@ -254,7 +254,7 @@ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/ia(H), slot_l_ear) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/internalaffairs(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/internalaffairs(H), slot_wear_suit) @@ -263,7 +263,7 @@ H.equip_to_slot_or_del(new /obj/item/device/pda/lawyer(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase(H), slot_l_hand) - H.implant_loyalty(H) + H.implant_loyalty() return 1 diff --git a/code/game/jobs/job/civilian_chaplain.dm b/code/game/jobs/job/civilian_chaplain.dm index a9f441dd224..cf162c14949 100644 --- a/code/game/jobs/job/civilian_chaplain.dm +++ b/code/game/jobs/job/civilian_chaplain.dm @@ -8,7 +8,7 @@ total_positions = 1 spawn_positions = 1 supervisors = "the head of personnel" - selection_color = "#dddddd" + selection_color = "#515151" access = list(access_morgue, access_chapel_office, access_crematorium, access_maint_tunnels) minimal_access = list(access_morgue, access_chapel_office, access_crematorium) alt_titles = list("Counselor") diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm index 15cae264ebd..707bab08995 100644 --- a/code/game/jobs/job/engineering.dm +++ b/code/game/jobs/job/engineering.dm @@ -8,7 +8,7 @@ total_positions = 1 spawn_positions = 1 supervisors = "the captain" - selection_color = "#ffeeaa" + selection_color = "#7F6E2C" idtype = /obj/item/weapon/card/id/silver req_admin_notify = 1 economic_modifier = 10 @@ -33,7 +33,7 @@ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/ce(H), slot_l_ear) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/eng(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_engineer(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/device/pda/heads/ce(H), slot_l_store) @@ -58,7 +58,7 @@ total_positions = 5 spawn_positions = 5 supervisors = "the chief engineer" - selection_color = "#fff5cc" + selection_color = "#5B4D20" economic_modifier = 5 access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics) minimal_access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction) @@ -70,7 +70,7 @@ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_l_ear) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/eng(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/workboots(H), slot_shoes) @@ -95,7 +95,7 @@ total_positions = 3 spawn_positions = 2 supervisors = "the chief engineer" - selection_color = "#fff5cc" + selection_color = "#5B4D20" economic_modifier = 5 access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics, access_external_airlocks) minimal_access = list(access_eva, access_engine, access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction, access_external_airlocks) @@ -106,7 +106,7 @@ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_l_ear) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/atmospheric_technician(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/workboots(H), slot_shoes) diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 3df95692477..2ae944adfda 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -31,7 +31,7 @@ /datum/job/proc/equip_backpack(var/mob/living/carbon/human/H) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) /datum/job/proc/equip_survival(var/mob/living/carbon/human/H) diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index 6bfd8c16cff..8a769df0b57 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -8,7 +8,7 @@ total_positions = 1 spawn_positions = 1 supervisors = "the captain" - selection_color = "#ffddf0" + selection_color = "#026865" idtype = /obj/item/weapon/card/id/silver req_admin_notify = 1 economic_modifier = 10 @@ -28,7 +28,7 @@ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/cmo(H), slot_l_ear) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/med(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_medical_officer(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes) @@ -47,7 +47,7 @@ total_positions = 5 spawn_positions = 3 supervisors = "the chief medical officer" - selection_color = "#ffeef0" + selection_color = "#013D3B" economic_modifier = 7 access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_eva) minimal_access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_virology, access_eva) @@ -60,7 +60,7 @@ H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/med(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) if (H.mind.role_alt_title) switch(H.mind.role_alt_title) @@ -77,7 +77,7 @@ H.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(H), slot_wear_mask) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/virology(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_vir(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/vir(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) if("Medical Doctor") H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform) @@ -110,7 +110,7 @@ total_positions = 2 spawn_positions = 2 supervisors = "the chief medical officer" - selection_color = "#ffeef0" + selection_color = "#013D3B" economic_modifier = 5 access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics) minimal_access = list(access_medical, access_medical_equip, access_chemistry) @@ -125,7 +125,7 @@ H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_belt) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/chemistry(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_chem(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/chem(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/chemist(H), slot_wear_suit) return 1 @@ -141,7 +141,7 @@ total_positions = 0 spawn_positions = 0 supervisors = "the chief medical officer and research director" - selection_color = "#ffeef0" + selection_color = "#013D3B" economic_modifier = 7 access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_research) minimal_access = list(access_medical, access_morgue, access_genetics, access_research) @@ -154,7 +154,7 @@ H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_belt) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/genetics(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_gen(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/gen(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/genetics(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store) @@ -171,7 +171,7 @@ spawn_positions = 1 economic_modifier = 5 supervisors = "the chief medical officer" - selection_color = "#ffeef0" + selection_color = "#013D3B" access = list(access_medical, access_medical_equip, access_morgue, access_psychiatrist) minimal_access = list(access_medical, access_medical_equip, access_psychiatrist) alt_titles = list("Psychologist") @@ -181,7 +181,7 @@ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) if (H.mind.role_alt_title) switch(H.mind.role_alt_title) @@ -205,7 +205,7 @@ total_positions = 2 spawn_positions = 2 supervisors = "the chief medical officer" - selection_color = "#ffeef0" + selection_color = "#013D3B" economic_modifier = 4 access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_chemistry, access_virology, access_eva, access_maint_tunnels, access_external_airlocks, access_psychiatrist) minimal_access = list(access_medical, access_medical_equip, access_morgue, access_eva, access_maint_tunnels, access_external_airlocks) @@ -218,7 +218,7 @@ H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/med(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) if (H.mind.role_alt_title) switch(H.mind.role_alt_title) diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm index b892ad228fa..99482457cce 100644 --- a/code/game/jobs/job/science.dm +++ b/code/game/jobs/job/science.dm @@ -8,7 +8,7 @@ total_positions = 1 spawn_positions = 1 supervisors = "the captain" - selection_color = "#ffddff" + selection_color = "#AD6BAD" idtype = /obj/item/weapon/card/id/silver req_admin_notify = 1 economic_modifier = 15 @@ -34,7 +34,7 @@ H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/tox(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit) return 1 @@ -50,7 +50,7 @@ total_positions = 5 spawn_positions = 3 supervisors = "the research director" - selection_color = "#ffeeff" + selection_color = "#633D63" economic_modifier = 7 access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch) minimal_access = list(access_tox, access_tox_storage, access_research, access_xenoarch) @@ -66,7 +66,7 @@ H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/tox(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit) return 1 @@ -80,7 +80,7 @@ total_positions = 3 spawn_positions = 2 supervisors = "the research director" - selection_color = "#ffeeff" + selection_color = "#633D63" economic_modifier = 7 access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_hydroponics) minimal_access = list(access_research, access_xenobiology, access_hydroponics, access_tox_storage) @@ -96,7 +96,7 @@ H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/tox(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit) return 1 @@ -110,7 +110,7 @@ total_positions = 2 spawn_positions = 2 supervisors = "research director" - selection_color = "#ffeeff" + selection_color = "#633D63" economic_modifier = 5 access = list(access_robotics, access_tox, access_tox_storage, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access. minimal_access = list(access_robotics, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access. @@ -122,7 +122,7 @@ if(!H) return 0 H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear) if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) - if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back) + if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/roboticist(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/device/pda/roboticist(H), slot_r_store) diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index ff13bf5cbfd..dfb3659e0d6 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -8,7 +8,7 @@ total_positions = 1 spawn_positions = 1 supervisors = "the captain" - selection_color = "#ffdddd" + selection_color = "#8E2929" idtype = /obj/item/weapon/card/id/silver req_admin_notify = 1 economic_modifier = 10 @@ -27,7 +27,7 @@ if(!H) return 0 switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/sec(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hos(H), slot_l_ear) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_security(H), slot_w_uniform) @@ -41,7 +41,7 @@ H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_store) else H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack) - H.implant_loyalty(H) + H.implant_loyalty() return 1 @@ -55,7 +55,7 @@ total_positions = 1 spawn_positions = 1 supervisors = "the head of security" - selection_color = "#ffeeee" + selection_color = "#601C1C" economic_modifier = 5 access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_maint_tunnels, access_morgue, access_external_airlocks) minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_maint_tunnels, access_external_airlocks) @@ -66,7 +66,7 @@ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/sec(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/warden(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes) @@ -92,7 +92,7 @@ total_positions = 2 spawn_positions = 2 supervisors = "the head of security" - selection_color = "#ffeeee" + selection_color = "#601C1C" alt_titles = list("Forensic Technician","Investigator") access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_eva, access_external_airlocks) minimal_access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_eva, access_external_airlocks) @@ -103,7 +103,7 @@ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/under/det(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes) @@ -134,7 +134,7 @@ total_positions = 4 spawn_positions = 4 supervisors = "the head of security" - selection_color = "#ffeeee" + selection_color = "#601C1C" alt_titles = list("Junior Officer") economic_modifier = 4 access = list(access_security, access_eva, access_sec_doors, access_brig, access_maint_tunnels, access_morgue, access_external_airlocks) @@ -145,7 +145,7 @@ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/sec(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes) diff --git a/code/game/jobs/job/silicon.dm b/code/game/jobs/job/silicon.dm index b64508499ca..fb9aeb793fd 100644 --- a/code/game/jobs/job/silicon.dm +++ b/code/game/jobs/job/silicon.dm @@ -5,7 +5,7 @@ faction = "Station" total_positions = 0 // Not used for AI, see is_position_available below and modules/mob/living/silicon/ai/latejoin.dm spawn_positions = 1 - selection_color = "#ccffcc" + selection_color = "#3F823F" supervisors = "your laws" req_admin_notify = 1 minimal_player_age = 7 @@ -38,7 +38,7 @@ total_positions = 2 spawn_positions = 2 supervisors = "your laws and the AI" //Nodrak - selection_color = "#ddffdd" + selection_color = "#254C25" minimal_player_age = 1 alt_titles = list("Robot", "Drone") account_allowed = 0 diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 4b6ac3fd119..877dfa1065d 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -9,6 +9,7 @@ use_power = 1 idle_power_usage = 40 interact_offline = 1 + circuit = /obj/item/weapon/circuitboard/sleeper_console //obj/machinery/sleep_console/New() //..() @@ -32,8 +33,39 @@ /obj/machinery/sleep_console/attack_hand(var/mob/user) if(..()) return 1 + if(connected) + connected.ui_interact(user) - connected.ui_interact(user) +/obj/machinery/sleep_console/attackby(var/obj/item/I, var/mob/user) + if(istype(I, /obj/item/weapon/screwdriver) && circuit) + user << "You start disconnecting the monitor." + playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + if(do_after(user, 20)) + var/obj/structure/frame/A = new /obj/structure/frame( src.loc ) + var/obj/item/weapon/circuitboard/M = new circuit( A ) + A.circuit = M + A.anchored = 1 + A.density = 1 + A.frame_type = M.board_type + for (var/obj/C in src) + C.forceMove(loc) + if (src.stat & BROKEN) + user << "The broken glass falls out." + new /obj/item/weapon/material/shard( src.loc ) + A.state = 3 + A.icon_state = "[A.frame_type]_3" + else + user << "You disconnect the monitor." + A.state = 4 + A.icon_state = "[A.frame_type]_4" + A.pixel_x = pixel_x + A.pixel_y = pixel_y + A.dir = dir + M.deconstruct(src) + qdel(src) + else + src.attack_hand(user) + return /obj/machinery/sleep_console/power_change() ..() @@ -49,6 +81,7 @@ icon_state = "sleeper_0" density = 1 anchored = 1 + circuit = /obj/item/weapon/circuitboard/sleeper var/mob/living/carbon/human/occupant = null var/list/available_chemicals = list("inaprovaline" = "Inaprovaline", "stoxin" = "Soporific", "paracetamol" = "Paracetamol", "anti_toxin" = "Dylovene", "dexalin" = "Dexalin") var/obj/item/weapon/reagent_containers/glass/beaker = null @@ -59,8 +92,29 @@ active_power_usage = 200 //builtin health analyzer, dialysis machine, injectors. /obj/machinery/sleeper/New() + ..() + spawn(5) + //src.machine = locate(/obj/machinery/mineral/processing_unit, get_step(src, machinedir)) + var/obj/machinery/sleep_console/C = locate(/obj/machinery/sleep_console) in range(2,src) + if(C) + C.connected = src + return + return + +/obj/machinery/sleeper/map/New() ..() beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src) + circuit = new circuit(src) + component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) + component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src) + component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src) + component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src) + component_parts += new /obj/item/weapon/reagent_containers/syringe(src) + component_parts += new /obj/item/weapon/reagent_containers/syringe(src) + component_parts += new /obj/item/weapon/reagent_containers/syringe(src) + component_parts += new /obj/item/stack/material/glass/reinforced(src, 2) + RefreshParts() /obj/machinery/sleeper/initialize() update_icon() @@ -156,6 +210,10 @@ return 1 /obj/machinery/sleeper/attackby(var/obj/item/I, var/mob/user) + if(default_deconstruction_screwdriver(user, I)) + return + if(default_deconstruction_crowbar(user, I)) + return add_fingerprint(user) if(istype(I, /obj/item/weapon/reagent_containers/glass)) if(!beaker) @@ -230,7 +288,9 @@ occupant.loc = loc occupant = null for(var/atom/movable/A in src) // In case an object was dropped inside or something - if(A == beaker) + if(A == beaker || A == circuit) + continue + if(A in component_parts) continue A.loc = loc update_use_power(1) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 5aa321ca415..cd811a28620 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -9,11 +9,31 @@ icon_state = "body_scanner_0" density = 1 anchored = 1 + circuit = /obj/item/weapon/circuitboard/body_scanner use_power = 1 idle_power_usage = 60 active_power_usage = 10000 //10 kW. It's a big all-body scanner. +/obj/machinery/bodyscanner/New() + ..() + spawn( 5 ) + var/obj/machinery/body_scanconsole/C = locate(/obj/machinery/body_scanconsole) in range(2,src) + if(C) + C.connected = src + return + return + +/obj/machinery/bodyscanner/map/New() + ..() + circuit = new circuit(src) + component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) + component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) + component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) + component_parts += new /obj/item/stack/material/glass/reinforced(src, 2) + RefreshParts() + /obj/machinery/bodyscanner/relaymove(mob/user as mob) if (user.stat) return @@ -53,6 +73,10 @@ src.icon_state = "body_scanner_1" for(var/obj/O in src) //O = null + if(O in component_parts) + continue + if(O == circuit) + continue qdel(O) //Foreach goto(124) src.add_fingerprint(usr) @@ -62,6 +86,10 @@ if ((!( src.occupant ) || src.locked)) return for(var/obj/O in src) + if(O in component_parts) + continue + if(O == circuit) + continue O.loc = src.loc //Foreach goto(30) if (src.occupant.client) @@ -73,35 +101,50 @@ src.icon_state = "body_scanner_0" return -/obj/machinery/bodyscanner/attackby(obj/item/weapon/grab/G as obj, user as mob) - if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) ))) +/obj/machinery/bodyscanner/attackby(var/obj/item/G, user as mob) + if(default_deconstruction_screwdriver(user, G)) return - if (src.occupant) - user << "The scanner is already occupied!" + if(default_deconstruction_crowbar(user, G)) return - if (G.affecting.abiotic()) - user << "Subject cannot have abiotic items on." - return - var/mob/M = G.affecting - if (M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - M.loc = src - src.occupant = M - update_use_power(2) - src.icon_state = "body_scanner_1" - for(var/obj/O in src) - O.loc = src.loc - //Foreach goto(154) - src.add_fingerprint(user) - //G = null - qdel(G) + + if(istype(G, /obj/item/weapon/grab)) + var/obj/item/weapon/grab/H = G + if(!(ismob(H.affecting))) + return + if (src.occupant) + user << "The scanner is already occupied!" + return + if (H.affecting.abiotic()) + user << "Subject cannot have abiotic items on." + return + var/mob/M = H.affecting + if (M.client) + M.client.perspective = EYE_PERSPECTIVE + M.client.eye = src + M.loc = src + src.occupant = M + update_use_power(2) + src.icon_state = "body_scanner_1" + for(var/obj/O in src) + if(O in component_parts) + continue + if(O == circuit) + continue + O.loc = src.loc + //Foreach goto(154) + src.add_fingerprint(user) + //G = null + qdel(G) return /obj/machinery/bodyscanner/ex_act(severity) switch(severity) if(1.0) for(var/atom/movable/A as mob|obj in src) + if(A in component_parts) + continue + if(A == circuit) + continue A.loc = src.loc ex_act(severity) //Foreach goto(35) @@ -111,6 +154,10 @@ if(2.0) if (prob(50)) for(var/atom/movable/A as mob|obj in src) + if(A in component_parts) + continue + if(A == circuit) + continue A.loc = src.loc ex_act(severity) //Foreach goto(108) @@ -120,6 +167,10 @@ if(3.0) if (prob(25)) for(var/atom/movable/A as mob|obj in src) + if(A in component_parts) + continue + if(A == circuit) + continue A.loc = src.loc ex_act(severity) //Foreach goto(181) @@ -166,11 +217,12 @@ dir = 8 density = 0 anchored = 1 + circuit = /obj/item/weapon/circuitboard/scanner_console /obj/machinery/body_scanconsole/New() ..() spawn( 5 ) - src.connected = locate(/obj/machinery/bodyscanner, get_step(src, WEST)) //We assume dir = 8 so scanner is WEST. Other sprites do exist. + src.connected = locate(/obj/machinery/bodyscanner) in range(2,src) return return @@ -228,6 +280,36 @@ user << browse(dat, "window=scanconsole;size=430x600") return +/obj/machinery/body_scanconsole/attackby(var/obj/item/I, var/mob/user) + if(istype(I, /obj/item/weapon/screwdriver) && circuit) + user << "You start disconnecting the monitor." + playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + if(do_after(user, 20)) + var/obj/structure/frame/A = new /obj/structure/frame( src.loc ) + var/obj/item/weapon/circuitboard/M = new circuit( A ) + A.circuit = M + A.anchored = 1 + A.density = 1 + A.frame_type = M.board_type + for (var/obj/C in src) + C.forceMove(loc) + if (src.stat & BROKEN) + user << "The broken glass falls out." + new /obj/item/weapon/material/shard( src.loc ) + A.state = 3 + A.icon_state = "[A.frame_type]_3" + else + user << "You disconnect the monitor." + A.state = 4 + A.icon_state = "[A.frame_type]_4" + A.pixel_x = pixel_x + A.pixel_y = pixel_y + A.dir = dir + M.deconstruct(src) + qdel(src) + else + src.attack_hand(user) + return /obj/machinery/body_scanconsole/Topic(href, href_list) if (..()) @@ -351,8 +433,9 @@ bled = "Bleeding:" if(e.status & ORGAN_BROKEN) AN = "[e.broken_description]:" - if(e.status & ORGAN_ROBOT) - robot = "Prosthetic:" + switch(e.robotic) + if(ORGAN_ROBOT) robot = "Prosthetic:" + if(ORGAN_ASSISTED) robot = "Augmented:" if(e.open) open = "Open:" @@ -396,7 +479,7 @@ var/mech = "" if(i.status & ORGAN_ASSISTED) mech = "Assisted:" - if(i.status & ORGAN_ROBOT) + if(i.robotic >= ORGAN_ROBOT) mech = "Mechanical:" var/infection = "None" diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index d2f3c215a3c..5d80030337c 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -23,12 +23,14 @@ var/datum/wires/autolathe/wires = null - /obj/machinery/autolathe/New() - ..() wires = new(src) + +/obj/machinery/autolathe/map/New() + ..() //Create parts for lathe. + circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) @@ -100,6 +102,7 @@ //Build list of multipliers for sheets. if(R.is_stack) if(max_sheets && max_sheets > 0) + max_sheets = min(max_sheets, R.max_stack) // Limit to the max allowed by stack type. multiplier_string += "
" for(var/i = 5;i]The [src] is already loaded." else - user.removeItem(O, src) + user.remove_from_mob(O) + O.loc = src beaker = O updateUsrDialog() else if(processing) @@ -83,7 +87,8 @@ if(i >= 10) user << "\The [src] is full! Activate it." else - user.removeItem(O, src) + user.remove_from_mob(O) + O.loc = src user << "You put \the [O] in \the [src]" update_icon() return diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index f6c72d1b8bd..135ad3c1f03 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -80,7 +80,7 @@ if(isscrewdriver(W)) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: Northern Star,Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_EXODUS)) + var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: "+station_short+",Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_EXODUS)) if(!input) usr << "No input found please hang up and try your call again." return @@ -127,7 +127,8 @@ if(is_type_in_list(W, possible_upgrades) && !is_type_in_list(W, upgrades)) // Is a possible upgrade and isn't in the camera already. user << "You attach \the [W] into the assembly inner circuits." upgrades += W - user.removeItem(W, src) + user.remove_from_mob(W) + W.loc = src return // Taking out upgrades diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index 0b3121779f3..136bafa90ed 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -1,10 +1,10 @@ // PRESETS var/global/list/station_networks = list( - NETWORK_CAFE_DOCK, +// NETWORK_CAFE_DOCK, NETWORK_CARGO, NETWORK_CIVILIAN, - NETWORK_CIVILIAN_EAST, - NETWORK_CIVILIAN_WEST, +// NETWORK_CIVILIAN_EAST, +// NETWORK_CIVILIAN_WEST, NETWORK_COMMAND, NETWORK_ENGINE, NETWORK_ENGINEERING, @@ -29,8 +29,10 @@ var/global/list/engineering_networks = list( /obj/machinery/camera/network/crescent network = list(NETWORK_CRESCENT) +/* /obj/machinery/camera/network/cafe_dock network = list(NETWORK_CAFE_DOCK) +*/ /obj/machinery/camera/network/cargo network = list(NETWORK_CARGO) @@ -38,11 +40,13 @@ var/global/list/engineering_networks = list( /obj/machinery/camera/network/civilian network = list(NETWORK_CIVILIAN) +/* /obj/machinery/camera/network/civilian_east network = list(NETWORK_CIVILIAN_EAST) /obj/machinery/camera/network/civilian_west network = list(NETWORK_CIVILIAN_WEST) +*/ /obj/machinery/camera/network/command network = list(NETWORK_COMMAND) diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 29ca91ab570..9ff0b2f894a 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -6,7 +6,7 @@ anchored = 1 use_power = 1 idle_power_usage = 5 - active_power_usage = 40000 //40 kW. (this the power drawn when charging) + active_power_usage = 60000 //60 kW. (this the power drawn when charging) power_channel = EQUIP var/obj/item/weapon/cell/charging = null var/chargelevel = -1 diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 3f7a8d600ce..eed2d4d031f 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -45,8 +45,9 @@ var/eject_wait = 0 //Don't eject them as soon as they are created fuckkk var/biomass = CLONE_BIOMASS * 3 -/obj/machinery/clonepod/New() +/obj/machinery/clonepod/map/New() ..() + circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/manipulator(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 7b72962eb8f..3bc9a17fce0 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -59,9 +59,13 @@ if(!istype(id_card)) return ..() - if(!scan && (access_change_ids in id_card.access) && user.removeItem(id_card, src)) + if(!scan && (access_change_ids in id_card.access) && user.unEquip(id_card)) + user.drop_item() + id_card.forceMove(src) scan = id_card - else if(!modify && user.removeItem(id_card, src)) + else if(!modify) + user.drop_item() + id_card.forceMove(src) modify = id_card nanomanager.update_uis(src) @@ -153,7 +157,8 @@ modify = null else var/obj/item/I = usr.get_active_hand() - if (istype(I, /obj/item/weapon/card/id) && usr.removeItem(I, src)) + if (istype(I, /obj/item/weapon/card/id) && usr.unEquip(I)) + I.forceMove(src) modify = I if ("scan") diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index 30d12b0b507..a4553403bc1 100644 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -25,6 +25,8 @@ user << "It expired at [worldtime2text(expiration_time)]." /obj/item/weapon/card/id/guest/read() + if(!Adjacent(usr)) + return //Too far to read if (world.time > expiration_time) usr << "This pass expired at [worldtime2text(expiration_time)]." else @@ -61,6 +63,7 @@ ..() uid = "[rand(100,999)]-G[rand(10,99)]" + /obj/machinery/computer/guestpass/attackby(obj/I, mob/user) if(istype(I, /obj/item/weapon/screwdriver) && circuit) user << "You start disconnecting the monitor." @@ -82,7 +85,8 @@ qdel(src) return if(istype(I, /obj/item/weapon/card/id)) - if(!giver && user.removeItem(I, src)) + if(!giver && user.unEquip(I)) + I.forceMove(src) giver = I updateUsrDialog() else if(giver) @@ -144,9 +148,9 @@ if(reas) reason = reas if ("duration") - var/dur = input("Duration (in minutes) during which pass is valid (up to 30 minutes).", "Duration") as num|null + var/dur = input("Duration (in minutes) during which pass is valid (up to 120 minutes).", "Duration") as num|null if (dur) - if (dur > 0 && dur <= 30) + if (dur > 0 && dur <= 120) duration = dur else usr << "Invalid duration." @@ -154,7 +158,7 @@ var/A = text2num(href_list["access"]) if (A in accesses) accesses.Remove(A) - else + else if(A in giver.access) //Let's make sure the ID card actually has the access. accesses.Add(A) else @@ -175,7 +179,8 @@ accesses.Cut() else var/obj/item/I = usr.get_active_hand() - if (istype(I, /obj/item/weapon/card/id) && usr.removeItem(I, src)) + if (istype(I, /obj/item/weapon/card/id) && usr.unEquip(I)) + I.loc = src giver = I updateUsrDialog() diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index b0d55165bdf..3150003f46b 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -6,7 +6,7 @@ icon_keyboard = "med_key" icon_screen = "medcomp" light_color = "#315ab4" - req_one_access = list(access_medical, access_forensics_lockers) + req_one_access = list(access_medical, access_forensics_lockers, access_robotics) circuit = /obj/item/weapon/circuitboard/med_data var/obj/item/weapon/card/id/scan = null var/authenticated = null @@ -36,7 +36,8 @@ return /obj/machinery/computer/med_data/attackby(var/obj/item/O, var/mob/user) - if(istype(O, /obj/item/weapon/card/id) && !scan && user.removeItem(O, src)) + if(istype(O, /obj/item/weapon/card/id) && !scan && user.unEquip(O)) + O.loc = src scan = O user << "You insert \the [O]." else @@ -48,11 +49,11 @@ /obj/machinery/computer/med_data/attack_hand(mob/user as mob) if(..()) return - var/dat + var/dat = list() if (src.temp) - dat = text("[src.temp]

Clear Screen") + dat += text("[src.temp]

Clear Screen") else - dat = text("Confirm Identity: []
", src, (src.scan ? text("[]", src.scan.name) : "----------")) + dat += text("Confirm Identity: []
", src, (src.scan ? text("[]", src.scan.name) : "----------")) if (src.authenticated) switch(src.screen) if(1.0) @@ -84,8 +85,12 @@ if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1))) dat += "
NameRankActivity
" if(pref_mob.is_preference_enabled(client_pref.key)) - . += "" + . += "" else - . += "" + . += "" . += "" . += "
Name: [active1.fields["name"]] \ ID: [active1.fields["id"]]
\n \ - Sex: [active1.fields["sex"]]
\n \ - Age: [active1.fields["age"]]
\n \ + Sex: [active1.fields["sex"]]
\n" + if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2))) + dat += "Gender identity: [active2.fields["id_gender"]]
" + else + dat += "Gender identity: Unknown
" + dat += "Age: [active1.fields["age"]]
\n \ Fingerprint: [active1.fields["fingerprint"]]
\n \ Physical Status: [active1.fields["p_stat"]]
\n \ Mental Status: [active1.fields["m_stat"]]
\ @@ -134,6 +139,7 @@ else else dat += text("{Log In}", src) + dat = jointext(dat,null) user << browse(text("Medical Records[]", dat), "window=med_rec") onclose(user, "med_rec") return @@ -248,10 +254,10 @@ src.active1.fields["fingerprint"] = t1 if("sex") if (istype(src.active1, /datum/data/record)) - if (src.active1.fields["sex"] == "Male") - src.active1.fields["sex"] = "Female" - else - src.active1.fields["sex"] = "Male" + src.active1.fields["sex"] = next_in_list(src.active1.fields["sex"], all_genders_text_list) + if("id_gender") + if (istype(src.active2, /datum/data/record)) + src.active2.fields["id_gender"] = next_in_list(src.active2.fields["id_gender"], all_genders_text_list) if("age") if (istype(src.active1, /datum/data/record)) var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as num diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index fb8c05aeba7..2624c4ff287 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -248,7 +248,8 @@ What a mess.*/ scan = null else var/obj/item/I = usr.get_active_hand() - if (istype(I, /obj/item/weapon/card/id) && usr.removeItem(I, src)) + if (istype(I, /obj/item/weapon/card/id) && usr.unEquip(I)) + I.loc = src scan = I if("Log Out") diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index fd2f34cc9c0..1fa38c4a719 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -25,7 +25,8 @@ var/order = 1 // -1 = Descending - 1 = Ascending /obj/machinery/computer/skills/attackby(obj/item/O as obj, var/mob/user) - if(istype(O, /obj/item/weapon/card/id) && !scan && user.removeItem(O, src)) + if(istype(O, /obj/item/weapon/card/id) && !scan && user.unEquip(O)) + O.loc = src scan = O user << "You insert [O]." else @@ -184,7 +185,8 @@ What a mess.*/ scan = null else var/obj/item/I = usr.get_active_hand() - if (istype(I, /obj/item/weapon/card/id) && usr.removeItem(I, src)) + if (istype(I, /obj/item/weapon/card/id) && usr.unEquip(I)) + I.loc = src scan = I if("Log Out") diff --git a/code/game/machinery/computer3/computers/HolodeckControl.dm b/code/game/machinery/computer3/computers/HolodeckControl.dm index fefbbfcf7d8..fc781430c40 100644 --- a/code/game/machinery/computer3/computers/HolodeckControl.dm +++ b/code/game/machinery/computer3/computers/HolodeckControl.dm @@ -154,7 +154,7 @@ if(isobj(obj)) var/mob/M = obj.loc if(ismob(M)) - M.removeItem(obj) + M.remove_from_mob(obj) M.update_icons() //so their overlays update if(!silent) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index ac88f1644bb..e1c65243d98 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -232,7 +232,6 @@ /obj/item/weapon/hand_tele, /obj/item/weapon/card/id/captains_spare, /obj/item/device/aicard, - /obj/item/device/mmi, /obj/item/device/paicard, /obj/item/weapon/gun, /obj/item/weapon/pinpointer, @@ -386,7 +385,8 @@ /obj/machinery/cryopod/proc/despawn_occupant() //Drop all items into the pod. for(var/obj/item/W in occupant) - occupant.removeItem(W, src, force = 1) + occupant.drop_from_inventory(W) + W.forceMove(src) if(W.contents.len) //Make sure we catch anything not handled by qdel() on the items. for(var/obj/item/O in W.contents) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 15d2848cd22..51af8837a8e 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1019,6 +1019,9 @@ About the new airlock wires panel: else name = "[istext(assembly.glass) ? "[assembly.glass] airlock" : assembly.base_name]" + //get the dir from the assembly + set_dir(assembly.dir) + //wires var/turf/T = get_turf(newloc) if(T && (T.z in config.admin_levels)) diff --git a/code/game/machinery/doors/multi_tile.dm b/code/game/machinery/doors/multi_tile.dm index a2d599fa007..4fc4b2fad72 100644 --- a/code/game/machinery/doors/multi_tile.dm +++ b/code/game/machinery/doors/multi_tile.dm @@ -4,17 +4,23 @@ /obj/machinery/door/airlock/multi_tile/New() ..() - switch(dir) - if(EAST, WEST) - bound_width = width * world.icon_size - bound_height = world.icon_size - else - bound_width = world.icon_size - bound_height = width * world.icon_size + SetBounds() + +/obj/machinery/door/airlock/multi_tile/Move() + . = ..() + SetBounds() + +/obj/machinery/door/airlock/multi_tile/proc/SetBounds() + if(dir in list(EAST, WEST)) + bound_width = width * world.icon_size + bound_height = world.icon_size + else + bound_width = world.icon_size + bound_height = width * world.icon_size /obj/machinery/door/airlock/multi_tile/glass name = "Glass Airlock" icon = 'icons/obj/doors/Door2x1glass.dmi' opacity = 0 glass = 1 - assembly_type = /obj/structure/door_assembly/multi_tile \ No newline at end of file + assembly_type = /obj/structure/door_assembly/multi_tile diff --git a/code/game/machinery/exonet_node.dm b/code/game/machinery/exonet_node.dm index f826bbafff4..aa36e34c9ef 100644 --- a/code/game/machinery/exonet_node.dm +++ b/code/game/machinery/exonet_node.dm @@ -1,6 +1,6 @@ /obj/machinery/exonet_node name = "exonet node" - desc = "This machine is one of many, many nodes inside Vir's section of the Exonet, connecting the Northern Star to the rest of the system, at least \ + desc = "This machine is one of many, many nodes inside "+starsys_name+"'s section of the Exonet, connecting the "+station_orig+" to the rest of the system, at least \ electronically." icon = 'icons/obj/stationobjs.dmi' icon_state = "exonet_node" @@ -18,7 +18,7 @@ // Proc: New() // Parameters: None // Description: Adds components to the machine for deconstruction. -/obj/machinery/exonet_node/New() +/obj/machinery/exonet_node/map/New() ..() component_parts = list() diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm index 35f0cf6af0c..1dddcedea0b 100644 --- a/code/game/machinery/frame.dm +++ b/code/game/machinery/frame.dm @@ -13,10 +13,13 @@ var/list/req_component_names = null var/list/alarms = list("firealarm", "airalarm", "intercom", "keycard") - var/list/machines = list("machine", "photocopier", "fax", "microwave", "conveyor", "vending", "recharger", "wrecharger", "washing", "grinder") - var/list/computers = list("computer", "holopad") - var/list/displays = list("display", "guestpass", "newscaster", "atm") - var/list/no_circuit = list("wrecharger", "recharger", "grinder","conveyor") + var/list/machines = list( + "machine", "photocopier", "fax", "microwave", "conveyor", "recharger", "wrecharger", + "washing", "grinder", "teleporter_hub", "teleporter_station", "medpod", "dna_analyzer", + "massdriver") + var/list/computers = list("computer", "holopad", "console") + var/list/displays = list("display", "guestpass", "newscaster", "atm", "request") + var/list/no_circuit = list("wrecharger", "recharger", "grinder", "conveyor", "massdriver") /obj/structure/frame/proc/update_desc() var/D @@ -35,15 +38,16 @@ req_components[A] = circuit.req_components[A] req_component_names = circuit.req_components.Copy() for(var/A in req_components) - var/cp = text2path(A) - var/obj/ct = new cp() // have to quickly instantiate it get name - req_component_names[A] = ct.name + var/obj/ct = A + req_component_names[A] = initial(ct.name) /obj/structure/frame/New(var/loc, var/dir, var/building = 0, var/obj/item/frame/frame_type, mob/user as mob) ..() if(building) src.frame_type = frame_type icon_state = "[frame_type]_0" + if(dir) + src.set_dir(dir) if(frame_type in alarms) if(loc) @@ -69,7 +73,7 @@ if(loc) src.loc = loc - if(frame_type == "display" || frame_type == "atm") + if(frame_type == "display" || frame_type == "atm" || frame_type == "request") pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32) pixel_y = (dir & 3)? (dir == 1 ? -32 : 32) : 0 @@ -104,8 +108,8 @@ circuit = new /obj/item/weapon/circuitboard/grinder(src) if(frame_type == "conveyor") circuit = new /obj/item/weapon/circuitboard/conveyor(src) - if(dir) - src.set_dir(dir) + if(frame_type == "massdriver") + circuit = new /obj/item/weapon/circuitboard/mass_driver(src) if(frame_type == "computer") density = 1 @@ -214,12 +218,28 @@ if(component_check) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, src.dir) - if(!new_machine.component_parts) - for(var/obj/O in src.components) - O.forceMove(null) - new_machine.RefreshParts() + // Handle machines that have allocated default parts in thier constructor. + if(new_machine.component_parts) + for(var/CP in new_machine.component_parts) + qdel(CP) + new_machine.component_parts.Cut() + else + new_machine.component_parts = list() src.circuit.construct(new_machine) + + for(var/obj/O in src.components) + if(circuit.contain_parts) + O.loc = new_machine + else + O.loc = null + new_machine.component_parts += O + + circuit.loc = null + new_machine.circuit = circuit + + new_machine.RefreshParts() + new_machine.pixel_x = src.pixel_x new_machine.pixel_y = src.pixel_y qdel(src) @@ -243,6 +263,7 @@ var/obj/machinery/B = new src.circuit.build_path ( src.loc ) B.pixel_x = src.pixel_x B.pixel_y = src.pixel_y + B.set_dir(dir) src.circuit.construct(B) qdel(src) return @@ -253,6 +274,7 @@ var/obj/machinery/B = new src.circuit.build_path ( src.loc ) B.pixel_x = src.pixel_x B.pixel_y = src.pixel_y + B.set_dir(dir) src.circuit.construct(B) qdel(src) return @@ -386,13 +408,13 @@ if(state == 3) if(frame_type in machines) for(var/I in req_components) - if(istype(P, text2path(I)) && (req_components[I] > 0)) + if(istype(P, I) && (req_components[I] > 0)) playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(istype(P, /obj/item/stack)) - var/obj/item/stack/CP = P + if(istype(P, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/CP = P if(CP.get_amount() > 1) var/camt = min(CP.amount, req_components[I]) // amount of cable to take, idealy amount required, but limited by amount provided - var/obj/item/stack/CC = new /obj/item/stack(src) + var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src) CC.amount = camt CC.update_icon() CP.use(camt) @@ -400,6 +422,20 @@ req_components[I] -= camt update_desc() break + + if(istype(P, /obj/item/stack/material/glass/reinforced)) + var/obj/item/stack/material/glass/reinforced/CP = P + if(CP.get_amount() > 1) + var/camt = min(CP.amount, req_components[I]) // amount of cable to take, idealy amount required, but limited by amount provided + var/obj/item/stack/material/glass/reinforced/CC = new /obj/item/stack/material/glass/reinforced(src) + CC.amount = camt + CC.update_icon() + CP.use(camt) + components += CC + req_components[I] -= camt + update_desc() + break + user.drop_item() P.forceMove(src) components += P diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index 59d8f2bd08e..3cc537be495 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -19,6 +19,7 @@ datum/track/New(var/title_name, var/audio) use_power = 1 idle_power_usage = 10 active_power_usage = 100 + circuit = /obj/item/weapon/circuitboard/jukebox var/playing = 0 @@ -35,6 +36,14 @@ datum/track/New(var/title_name, var/audio) new/datum/track("Trai`Tor", 'sound/music/traitor.ogg'), ) +/obj/machinery/media/jukebox/New() + ..() + circuit = new circuit(src) + component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/capacitor(src) + component_parts += new /obj/item/weapon/stock_parts/console_screen(src) + component_parts += new /obj/item/stack/cable_coil(src, 5) + RefreshParts() /obj/machinery/media/jukebox/Destroy() StopPlaying() @@ -163,6 +172,10 @@ datum/track/New(var/title_name, var/audio) /obj/machinery/media/jukebox/attackby(obj/item/W as obj, mob/user as mob) src.add_fingerprint(user) + if(default_deconstruction_screwdriver(user, W)) + return + if(default_deconstruction_crowbar(user, W)) + return if(istype(W, /obj/item/weapon/wrench)) if(playing) StopPlaying() diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm index bb92f2c4b07..831edadcbf5 100644 --- a/code/game/machinery/kitchen/microwave.dm +++ b/code/game/machinery/kitchen/microwave.dm @@ -1,4 +1,3 @@ - /obj/machinery/microwave name = "Microwave" icon = 'icons/obj/kitchen.dmi' @@ -31,6 +30,9 @@ reagents = new/datum/reagents(100) reagents.my_atom = src +/obj/machinery/microwave/map/New() + ..() + circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/console_screen(src) component_parts += new /obj/item/weapon/stock_parts/motor(src) @@ -114,7 +116,7 @@ user << "It's dirty!" return 1 else if(is_type_in_list(O,acceptable_items)) - if (contents.len>=(max_n_of_items + component_parts.len)) //Adds component_parts to the maximum number of items. + if (contents.len>=(max_n_of_items + component_parts.len + 1)) //Adds component_parts to the maximum number of items. The 1 is from the circuit user << "This [src] is full of ingredients, you cannot put more." return 1 if(istype(O, /obj/item/stack) && O:get_amount() > 1) // This is bad, but I can't think of how to change it @@ -126,7 +128,9 @@ "You add one of [O] to \the [src].") return else - user.removeItem(O, src) + // user.remove_from_mob(O) //This just causes problems so far as I can tell. -Pete + user.drop_item() + O.loc = src user.visible_message( \ "\The [user] has added \the [O] to \the [src].", \ "You add \the [O] to \the [src].") @@ -175,7 +179,7 @@ var/list/items_counts = new var/list/items_measures = new var/list/items_measures_p = new - for (var/obj/O in (contents-component_parts)) + for (var/obj/O in ((contents - component_parts) - circuit)) var/display_name = O.name if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg)) items_measures[display_name] = "egg" @@ -235,7 +239,7 @@ if(stat & (NOPOWER|BROKEN)) return start() - if (reagents.total_volume==0 && !(locate(/obj) in (contents-component_parts))) //dry run + if (reagents.total_volume==0 && !(locate(/obj) in ((contents - component_parts) - circuit))) //dry run if (!wzhzhzh(10)) abort() return @@ -297,7 +301,7 @@ return 1 /obj/machinery/microwave/proc/has_extra_item() - for (var/obj/O in (contents-component_parts)) + for (var/obj/O in ((contents - component_parts) - circuit)) if ( \ !istype(O,/obj/item/weapon/reagent_containers/food) && \ !istype(O, /obj/item/weapon/grown) \ @@ -323,7 +327,7 @@ src.updateUsrDialog() /obj/machinery/microwave/proc/dispose() - for (var/obj/O in (contents-component_parts)) + for (var/obj/O in ((contents-component_parts)-circuit)) O.loc = src.loc if (src.reagents.total_volume) src.dirty++ @@ -358,7 +362,7 @@ /obj/machinery/microwave/proc/fail() var/obj/item/weapon/reagent_containers/food/snacks/badrecipe/ffuu = new(src) var/amount = 0 - for (var/obj/O in (contents-ffuu)-component_parts) + for (var/obj/O in (((contents - ffuu) - component_parts) - circuit)) amount++ if (O.reagents) var/id = O.reagents.get_master_reagent_id() diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm index dced74de6de..ac13a52bc41 100644 --- a/code/game/machinery/kitchen/smartfridge.dm +++ b/code/game/machinery/kitchen/smartfridge.dm @@ -218,7 +218,8 @@ user << "\The [src] is full." return 1 else - user.removeItem(O, src) + user.remove_from_mob(O) + O.loc = src if(item_quants[O.name]) item_quants[O.name]++ else diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index 74f60a3a729..7d8e75764ce 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -13,6 +13,7 @@ var/on = 1 var/area/area = null var/otherarea = null + var/image/overlay /obj/machinery/light_switch/New() ..() @@ -31,14 +32,18 @@ /obj/machinery/light_switch/proc/updateicon() + if(!overlay) + overlay = image(icon, "light1-overlay", LIGHTING_LAYER+0.1) + + overlays.Cut() if(stat & NOPOWER) icon_state = "light-p" set_light(0) - layer = OBJ_LAYER else icon_state = "light[on]" - set_light(2, 1.5, on ? "#82FF4C" : "#F86060") - layer = LIGHTING_LAYER+0.1 + overlay.icon_state = "light[on]-overlay" + overlays += overlay + set_light(2, 0.1, on ? "#82FF4C" : "#F86060") /obj/machinery/light_switch/examine(mob/user) if(..(user, 1)) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 9ad2fd73eb1..3681d1e7980 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -286,8 +286,7 @@ Class Procs: var/obj/item/weapon/circuitboard/CB = circuit var/P for(var/obj/item/weapon/stock_parts/A in component_parts) - for(var/D in CB.req_components) - var/T = text2path(D) + for(var/T in CB.req_components) if(ispath(A.type, T)) P = T break @@ -328,14 +327,14 @@ Class Procs: /obj/machinery/proc/dismantle() playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) var/obj/structure/frame/A = new /obj/structure/frame( src.loc ) - var/obj/item/weapon/circuitboard/M = new circuit( A ) + var/obj/item/weapon/circuitboard/M = circuit A.circuit = M A.anchored = 1 A.density = 1 A.frame_type = M.board_type if(A.frame_type in A.no_circuit) A.need_circuit = 0 - for (var/obj/D in src) + for (var/obj/D in src.component_parts) D.forceMove(loc) if(A.components) A.components.Cut() @@ -344,10 +343,12 @@ Class Procs: component_parts = list() A.icon_state = "[A.frame_type]_3" A.state = 3 + A.dir = dir A.pixel_x = pixel_x A.pixel_y = pixel_y A.check_components() A.update_desc() + M.loc = null M.deconstruct(src) qdel(src) return 1 diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index abd98091760..f94427bf3aa 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -9,12 +9,41 @@ use_power = 1 idle_power_usage = 2 active_power_usage = 50 + circuit = /obj/item/weapon/circuitboard/mass_driver var/power = 1.0 var/code = 1.0 var/id = 1.0 var/drive_range = 50 //this is mostly irrelevant since current mass drivers throw into space, but you could make a lower-range mass driver for interstation transport or something I guess. +/obj/machinery/mass_driver/map/New() + ..() + circuit = new circuit(src) + component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/motor(src) + component_parts += new /obj/item/weapon/stock_parts/motor(src) + component_parts += new /obj/item/weapon/stock_parts/gear(src) + component_parts += new /obj/item/weapon/stock_parts/gear(src) + component_parts += new /obj/item/weapon/stock_parts/spring(src) + component_parts += new /obj/item/weapon/stock_parts/capacitor(src) + component_parts += new /obj/item/stack/cable_coil(src, 5) + RefreshParts() + +/obj/machinery/mass_driver/attackby(var/obj/item/I, mob/user) + if(default_deconstruction_screwdriver(user, I)) + return + if(default_deconstruction_crowbar(user, I)) + return + + if(istype(I, /obj/item/device/multitool)) + if(panel_open) + var/input = sanitize(input(usr, "What id would you like to give this conveyor?", "Multitool-Conveyor interface", id)) + if(!input) + usr << "No input found please hang up and try your call again." + return + id = input + return + return /obj/machinery/mass_driver/proc/drive(amount) if(stat & (BROKEN|NOPOWER)) diff --git a/code/game/machinery/pda_multicaster.dm b/code/game/machinery/pda_multicaster.dm new file mode 100644 index 00000000000..a7d5c780c35 --- /dev/null +++ b/code/game/machinery/pda_multicaster.dm @@ -0,0 +1,101 @@ +/obj/machinery/pda_multicaster + name = "\improper PDA multicaster" + desc = "This machine mirrors messages sent to it to specific departments." + icon = 'icons/obj/stationobjs.dmi' + icon_state = "controller" + density = 1 + anchored = 1 + circuit = /obj/item/weapon/circuitboard/telecomms/pda_multicaster + use_power = 1 + idle_power_usage = 750 + var/on = 1 // If we're currently active, + var/toggle = 1 // If we /should/ be active or not, + var/list/internal_PDAs = list() // Assoc list of PDAs inside of this, with the department name being the index, + +/obj/machinery/pda_multicaster/New() + ..() + internal_PDAs = list("command" = new /obj/item/device/pda/multicaster/command(src), + "security" = new /obj/item/device/pda/multicaster/security(src), + "engineering" = new /obj/item/device/pda/multicaster/engineering(src), + "medical" = new /obj/item/device/pda/multicaster/medical(src), + "research" = new /obj/item/device/pda/multicaster/research(src), + "cargo" = new /obj/item/device/pda/multicaster/cargo(src), + "civilian" = new /obj/item/device/pda/multicaster/civilian(src)) + +/obj/machinery/pda_multicaster/prebuilt/New() + ..() + + component_parts = list() + component_parts += new /obj/item/weapon/circuitboard/telecomms/pda_multicaster(src) + component_parts += new /obj/item/weapon/stock_parts/subspace/ansible(src) + component_parts += new /obj/item/weapon/stock_parts/subspace/filter(src) + component_parts += new /obj/item/weapon/stock_parts/manipulator(src) + component_parts += new /obj/item/weapon/stock_parts/subspace/treatment(src) + component_parts += new /obj/item/stack/cable_coil(src, 2) + RefreshParts() + +/obj/machinery/pda_multicaster/Destroy() + for(var/atom/movable/AM in contents) + qdel(AM) + ..() + +/obj/machinery/pda_multicaster/update_icon() + if(on) + icon_state = initial(icon_state) + else + icon_state = "[initial(icon_state)]-p" + +/obj/machinery/pda_multicaster/attackby(obj/item/I, mob/user) + if(istype(I, /obj/item/weapon/screwdriver)) + default_deconstruction_screwdriver(user, I) + else if(istype(I, /obj/item/weapon/crowbar)) + default_deconstruction_crowbar(user, I) + else + ..() + +/obj/machinery/pda_multicaster/attack_ai(mob/user) + attack_hand(user) + +/obj/machinery/pda_multicaster/attack_hand(mob/user) + toggle_power(user) + +/obj/machinery/pda_multicaster/proc/toggle_power(mob/user) + toggle = !toggle + visible_message("\the [user] turns \the [src] [toggle ? "on" : "off"].") + update_power() + if(!toggle) + var/msg = "[usr.client.key] ([usr]) has turned [src] off, at [x],[y],[z]." + message_admins(msg) + log_game(msg) + +/obj/machinery/pda_multicaster/proc/update_PDAs(var/turn_off) + for(var/obj/item/device/pda/pda in contents) + pda.toff = turn_off + +/obj/machinery/pda_multicaster/proc/update_power() + if(toggle) + if(stat & (BROKEN|NOPOWER|EMPED)) + on = 0 + update_PDAs(1) // 1 being to turn off. + idle_power_usage = 0 + else + on = 1 + update_PDAs(0) + idle_power_usage = 750 + else + on = 0 + update_PDAs(1) + idle_power_usage = 0 + update_icon() + +/obj/machinery/pda_multicaster/process() + update_power() + +/obj/machinery/pda_multicaster/emp_act(severity) + if(!(stat & EMPED)) + stat |= EMPED + var/duration = (300 * 10)/severity + spawn(rand(duration - 20, duration + 20)) + stat &= ~EMPED + update_icon() + ..() diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 1daf18b0a51..3a08a681d26 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -311,7 +311,7 @@ Buildable meters /obj/item/pipe/afterattack(turf/simulated/floor/target, mob/user, proximity) if(!proximity) return if(istype(target)) - user.removeItem(src, target) + user.drop_from_inventory(src, target) else return ..() diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index c60ae723d5c..6e20801680c 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -746,7 +746,7 @@ var/list/turret_icons if(isrobot(user)) return var/obj/item/weapon/gun/energy/E = I //typecasts the item to an energy gun - if(!user.removeItem(I)) + if(!user.unEquip(I)) user << "\the [I] is stuck to your hand, you cannot put it in \the [src]" return installation = I.type //installation becomes I.type @@ -767,7 +767,7 @@ var/list/turret_icons if(4) if(isprox(I)) build_step = 5 - if(!user.removeItem(I)) + if(!user.unEquip(I)) user << "\the [I] is stuck to your hand, you cannot put it in \the [src]" return user << "You add the prox sensor to the turret." diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 95c62a8ccdb..77aed2300fa 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -15,9 +15,9 @@ obj/machinery/recharger var/icon_state_idle = "recharger0" //also when unpowered var/portable = 1 circuit = /obj/item/weapon/circuitboard/recharger - frame_type = "recharger" -obj/machinery/recharger/New() +obj/machinery/recharger/map/New() + circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/capacitor(src) component_parts += new /obj/item/stack/cable_coil(src, 5) @@ -171,4 +171,13 @@ obj/machinery/recharger/wallcharger icon_state_idle = "wrecharger0" portable = 0 circuit = /obj/item/weapon/circuitboard/recharger/wrecharger - frame_type = "wrecharger" \ No newline at end of file + frame_type = "wrecharger" + +obj/machinery/recharger/wallcharger/map/New() + circuit = new circuit(src) + component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/capacitor(src) + component_parts += new /obj/item/stack/cable_coil(src, 5) + RefreshParts() + ..() + return \ No newline at end of file diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index c3759100fb3..204f48e0d68 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -22,9 +22,9 @@ var/weld_power_use = 2300 // power used per point of brute damage repaired. 2.3 kW ~ about the same power usage of a handheld arc welder var/wire_power_use = 500 // power used per point of burn damage repaired. -/obj/machinery/recharge_station/New() +/obj/machinery/recharge_station/map/New() ..() - + circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/manipulator(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 7e2d5216985..fc39af88f7a 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -28,6 +28,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() anchored = 1 icon = 'icons/obj/terminals.dmi' icon_state = "req_comp0" + circuit = /obj/item/weapon/circuitboard/request var/department = "Unknown" //The list of all departments on the station (Determined from this variable on each unit) Set this to the same thing if you want several consoles in one department var/list/message_log = list() //List of all messages var/departmentType = 0 //Bitflag. Zero is reply-only. Map currently uses raw numbers instead of defines. @@ -79,7 +80,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() req_console_supplies |= department if (departmentType & RC_INFO) req_console_information |= department - + set_light(1) /obj/machinery/requests_console/Destroy() @@ -199,27 +200,29 @@ var/list/obj/machinery/requests_console/allConsoles = list() //err... hacking code, which has no reason for existing... but anyway... it was once supposed to unlock priority 3 messanging on that console (EXTREME priority...), but the code for that was removed. /obj/machinery/requests_console/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob) - /* - if (istype(O, /obj/item/weapon/crowbar)) - if(open) - open = 0 - icon_state="req_comp0" - else - open = 1 - if(hackState == 0) - icon_state="req_comp_open" - else if(hackState == 1) - icon_state="req_comp_rewired" - if (istype(O, /obj/item/weapon/screwdriver)) - if(open) - if(hackState == 0) - hackState = 1 - icon_state="req_comp_rewired" - else if(hackState == 1) - hackState = 0 - icon_state="req_comp_open" - else - user << "You can't do much with that."*/ + if(default_deconstruction_screwdriver(user, O)) + return + if(default_deconstruction_crowbar(user, O)) + return + if(istype(O, /obj/item/device/multitool)) + if(panel_open) + var/input = sanitize(input(usr, "What Department id would you like to give this Request Console?", "Multitool-Request Console interface", department)) + if(!input) + usr << "No input found please hang up and try your call again." + return + department = input + announcement.title = "[department] announcement" + announcement.newscast = 1 + + name = "[department] Requests Console" + allConsoles += src + if (departmentType & RC_ASSIST) + req_console_assistance |= department + if (departmentType & RC_SUPPLY) + req_console_supplies |= department + if (departmentType & RC_INFO) + req_console_information |= department + return if (istype(O, /obj/item/weapon/card/id)) if(inoperable(MAINT)) return diff --git a/code/game/machinery/seed_extractor.dm b/code/game/machinery/seed_extractor.dm index be7b340b720..e9a2081fb2d 100644 --- a/code/game/machinery/seed_extractor.dm +++ b/code/game/machinery/seed_extractor.dm @@ -11,7 +11,7 @@ obj/machinery/seed_extractor/attackby(var/obj/item/O as obj, var/mob/user as mob // Fruits and vegetables. if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown) || istype(O, /obj/item/weapon/grown)) - user.removeItem(O) + user.remove_from_mob(O) var/datum/seed/new_seed_type if(istype(O, /obj/item/weapon/grown)) diff --git a/code/game/machinery/supplybeacon.dm b/code/game/machinery/supplybeacon.dm index 6abebf8c2cc..77e58870993 100644 --- a/code/game/machinery/supplybeacon.dm +++ b/code/game/machinery/supplybeacon.dm @@ -2,7 +2,7 @@ /obj/item/supply_beacon name = "inactive supply beacon" icon = 'icons/obj/supplybeacon.dmi' - desc = "An inactive, hacked supply beacon stamped with the Vir Rapid Fabrication logo. Good for one (1) ballistic supply pod shipment." + desc = "An inactive, hacked supply beacon stamped with the "+starsys_name+" Rapid Fabrication logo. Good for one (1) ballistic supply pod shipment." icon_state = "beacon" var/deploy_path = /obj/machinery/power/supply_beacon var/deploy_time = 30 @@ -17,7 +17,8 @@ return var/obj/S = new deploy_path(get_turf(user)) user.visible_message("\The [user] deploys \the [S].") - user.deleteItem(src) + user.unEquip(src) + qdel(src) /obj/machinery/power/supply_beacon name = "supply beacon" @@ -113,6 +114,6 @@ var/drop_x = src.x-2 var/drop_y = src.y-2 var/drop_z = src.z - command_announcement.Announce("Vir Rapid Fabrication priority supply request #[rand(1000,9999)]-[rand(100,999)] recieved. Shipment dispatched via ballistic supply pod for immediate delivery. Have a nice day.", "Thank You For Your Patronage") + command_announcement.Announce(starsys_name+" Rapid Fabrication priority supply request #[rand(1000,9999)]-[rand(100,999)] recieved. Shipment dispatched via ballistic supply pod for immediate delivery. Have a nice day.", "Thank You For Your Patronage") spawn(rand(100,300)) new /datum/random_map/droppod/supply(null, drop_x, drop_y, drop_z, supplied_drop = drop_type) // Splat. diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index 30c92af9227..7d27c94b653 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -390,33 +390,33 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept if (length(heard_masked)) for (var/mob/R in heard_masked) - R.hear_radio(message,verbage, speaking, part_a, part_b, M, 0, name) + R.hear_radio(message,verbage, speaking, part_a, part_b, part_c, M, 0, name) /* --- Process all the mobs that heard the voice normally (understood) --- */ if (length(heard_normal)) for (var/mob/R in heard_normal) - R.hear_radio(message, verbage, speaking, part_a, part_b, M, 0, realname) + R.hear_radio(message, verbage, speaking, part_a, part_b, part_c, M, 0, realname) /* --- Process all the mobs that heard the voice normally (did not understand) --- */ if (length(heard_voice)) for (var/mob/R in heard_voice) - R.hear_radio(message,verbage, speaking, part_a, part_b, M,0, vname) + R.hear_radio(message,verbage, speaking, part_a, part_b, part_c, M,0, vname) /* --- Process all the mobs that heard a garbled voice (did not understand) --- */ // Displays garbled message (ie "f*c* **u, **i*er!") if (length(heard_garbled)) for (var/mob/R in heard_garbled) - R.hear_radio(message, verbage, speaking, part_a, part_b, M, 1, vname) + R.hear_radio(message, verbage, speaking, part_a, part_b, part_c, M, 1, vname) /* --- Complete gibberish. Usually happens when there's a compressed message --- */ if (length(heard_gibberish)) for (var/mob/R in heard_gibberish) - R.hear_radio(message, verbage, speaking, part_a, part_b, M, 1) + R.hear_radio(message, verbage, speaking, part_a, part_b, part_c, M, 1) return 1 diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index b107dcc42d9..13ff75e0713 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -170,6 +170,7 @@ use_power = 1 idle_power_usage = 10 active_power_usage = 2000 + circuit = /obj/item/weapon/circuitboard/teleporter_hub var/obj/machinery/computer/teleporter/com @@ -178,6 +179,21 @@ underlays.Cut() underlays += image('icons/obj/stationobjs.dmi', icon_state = "tele-wires") +/obj/machinery/teleport/hub/map/New() + ..() + circuit = new circuit(src) + component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) + component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) + component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) + component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) + component_parts += new /obj/item/weapon/stock_parts/micro_laser(src) + component_parts += new /obj/item/weapon/stock_parts/micro_laser(src) + component_parts += new /obj/item/weapon/stock_parts/micro_laser(src) + component_parts += new /obj/item/weapon/stock_parts/micro_laser(src) + component_parts += new /obj/item/stack/cable_coil(src, 10) + RefreshParts() + /obj/machinery/teleport/hub/Bumped(M as mob|obj) spawn() if (src.icon_state == "tele1") @@ -307,6 +323,7 @@ use_power = 1 idle_power_usage = 10 active_power_usage = 2000 + circuit = /obj/item/weapon/circuitboard/teleporter_station var/obj/machinery/teleport/hub/com /obj/machinery/teleport/station/New() @@ -314,6 +331,16 @@ overlays.Cut() overlays += image('icons/obj/stationobjs.dmi', icon_state = "controller-wires") +/obj/machinery/teleport/station/map/New() + ..() + circuit = new circuit(src) + component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/console_screen(src) + component_parts += new /obj/item/weapon/stock_parts/capacitor(src) + component_parts += new /obj/item/weapon/stock_parts/capacitor(src) + component_parts += new /obj/item/stack/cable_coil(src, 10) + RefreshParts() + /obj/machinery/teleport/station/attackby(var/obj/item/weapon/W) src.attack_hand() diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index ca060ca80f8..f086a3e1dd6 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -4,12 +4,14 @@ /datum/data/vending_product var/product_name = "generic" // Display name for the product var/product_path = null - var/amount = 0 // Amount held in the vending machine - var/price = 0 // Price to buy one - var/display_color = null // Display color for vending machine listing + var/amount = 0 // The original amount held in the vending machine + var/list/instances + var/price = 0 // Price to buy one + var/display_color = null // Display color for vending machine listing var/category = CAT_NORMAL // CAT_HIDDEN for contraband, CAT_COIN for premium + var/vending_machine // The vending machine we belong to -/datum/data/vending_product/New(var/path, var/name = null, var/amount = 1, var/price = 0, var/color = null, var/category = CAT_NORMAL) +/datum/data/vending_product/New(var/vending_machine, var/path, var/name = null, var/amount = 1, var/price = 0, var/color = null, var/category = CAT_NORMAL) ..() src.product_path = path @@ -24,6 +26,43 @@ src.price = price src.display_color = color src.category = category + src.vending_machine = vending_machine + +/datum/data/vending_product/Destroy() + vending_machine = null + if(instances) + for(var/product in instances) + qdel(product) + instances.Cut() + . = ..() + +/datum/data/vending_product/proc/get_amount() + return instances ? instances.len : amount + +/datum/data/vending_product/proc/add_product(var/atom/movable/product) + if(product.type != product_path) + return 0 + init_products() + product.forceMove(vending_machine) + instances += product + +/datum/data/vending_product/proc/get_product(var/product_location) + if(!get_amount() || !product_location) + return + init_products() + + var/atom/movable/product = instances[instances.len] // Remove the last added product + instances -= product + product.forceMove(product_location) + return product + +/datum/data/vending_product/proc/init_products() + if(instances) + return + instances = list() + for(var/i = 1 to amount) + var/new_product = new product_path(vending_machine) + instances += new_product /** * A vending machine @@ -36,8 +75,6 @@ layer = 2.9 anchored = 1 density = 1 - circuit = /obj/item/weapon/circuitboard/vending - frame_type = "vending" var/icon_vend //Icon_state when vending var/icon_deny //Icon_state when denying access @@ -96,14 +133,6 @@ /obj/machinery/vending/New() ..() wires = new(src) - component_parts = list() - component_parts += new /obj/item/weapon/stock_parts/spring(src) - component_parts += new /obj/item/weapon/stock_parts/spring(src) - component_parts += new /obj/item/weapon/stock_parts/motor(src) - component_parts += new /obj/item/weapon/stock_parts/motor(src) - component_parts += new /obj/item/weapon/stock_parts/console_screen(src) - component_parts += new /obj/item/stack/material/glass/reinforced(src, 2) - RefreshParts() spawn(4) if(src.product_slogans) src.slogan_list += splittext(src.product_slogans, ";") @@ -140,7 +169,7 @@ var/category = current_list[2] for(var/entry in current_list[1]) - var/datum/data/vending_product/product = new/datum/data/vending_product(entry) + var/datum/data/vending_product/product = new/datum/data/vending_product(src, entry) product.price = (entry in src.prices) ? src.prices[entry] : 0 product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1 @@ -153,6 +182,9 @@ wires = null qdel(coin) coin = null + for(var/datum/data/vending_product/R in product_records) + qdel(R) + product_records = null return ..() /obj/machinery/vending/ex_act(severity) @@ -224,7 +256,7 @@ return else if(istype(W, /obj/item/weapon/coin) && premium.len > 0) user.drop_item() - W.loc = src + W.forceMove(src) coin = W categories |= CAT_COIN user << "You insert \the [W] into \the [src]." @@ -242,14 +274,11 @@ user << "You [anchored? "un" : ""]secured \the [src]!" anchored = !anchored return - else if(default_deconstruction_crowbar(user, W)) - return - else for(var/datum/data/vending_product/R in product_records) if(istype(W, R.product_path)) - stock(R, user) + stock(W, R, user) qdel(W) return ..() @@ -273,7 +302,8 @@ cashmoney.worth -= currently_vending.price if(cashmoney.worth <= 0) - usr.deleteItem(cashmoney) + usr.drop_from_inventory(cashmoney) + qdel(cashmoney) else cashmoney.update_icon() @@ -422,7 +452,7 @@ "name" = I.product_name, "price" = I.price, "color" = I.display_color, - "amount" = I.amount))) + "amount" = I.get_amount()))) data["products"] = listed_products @@ -452,10 +482,10 @@ usr << "There is no coin in this machine." return - coin.loc = src.loc + coin.forceMove(src.loc) if(!usr.get_active_hand()) usr.put_in_hands(coin) - usr << "You remove the [coin] from the [src]" + usr << "You remove \the [coin] from \the [src]" coin = null categories &= ~CAT_COIN @@ -516,13 +546,13 @@ else user << "You weren't able to pull the coin out fast enough, the machine ate it, string and all." qdel(coin) + coin = null categories &= ~CAT_COIN else qdel(coin) + coin = null categories &= ~CAT_COIN - R.amount-- - if(((src.last_reply + (src.vend_delay + 200)) <= world.time) && src.vend_reply) spawn(0) src.speak(src.vend_reply) @@ -532,16 +562,31 @@ if (src.icon_vend) //Show the vending animation if needed flick(src.icon_vend,src) spawn(src.vend_delay) - new R.product_path(get_turf(src)) + R.get_product(get_turf(src)) + if(prob(1)) + sleep(3) + if(R.get_product(get_turf(src))) + src.visible_message("\The [src] clunks as it vends an additional item.") + src.status_message = "" src.status_error = 0 src.vend_ready = 1 currently_vending = null nanomanager.update_uis(src) -/obj/machinery/vending/proc/stock(var/datum/data/vending_product/R, var/mob/user) - user << "You insert \the [src] in the product receptor." - R.amount++ + +/** + * Add item to the machine + * + * Checks if item is vendable in this machine should be performed before + * calling. W is the item being inserted, R is the associated vending_product entry. + */ +/obj/machinery/vending/proc/stock(obj/item/weapon/W, var/datum/data/vending_product/R, var/mob/user) + if(!user.unEquip(W)) + return + + user << "You insert \the [W] in the product receptor." + R.add_product(W) nanomanager.update_uis(src) @@ -591,15 +636,8 @@ //Oh no we're malfunctioning! Dump out some product and break. /obj/machinery/vending/proc/malfunction() for(var/datum/data/vending_product/R in src.product_records) - if (R.amount <= 0) //Try to use a record that actually has something to dump. - continue - var/dump_path = R.product_path - if (!dump_path) - continue - - while(R.amount>0) - new dump_path(src.loc) - R.amount-- + while(R.get_amount()>0) + R.get_product(loc) break stat |= BROKEN @@ -614,20 +652,15 @@ return 0 for(var/datum/data/vending_product/R in src.product_records) - if (R.amount <= 0) //Try to use a record that actually has something to dump. + throw_item = R.get_product(loc) + if (!throw_item) continue - var/dump_path = R.product_path - if (!dump_path) - continue - - R.amount-- - throw_item = new dump_path(src.loc) break if (!throw_item) return 0 spawn(0) throw_item.throw_at(target, 16, 3, src) - src.visible_message("[src] launches [throw_item.name] at [target.name]!") + src.visible_message("\The [src] launches \a [throw_item] at \the [target]!") return 1 /* @@ -655,31 +688,47 @@ icon = 'icons/obj/objects.dmi' icon_state = "dispenser" product_paths = "/obj/item/weapon/tank/oxygen;/obj/item/weapon/tank/phoron;/obj/item/weapon/tank/emergency_oxygen;/obj/item/weapon/tank/emergency_oxygen/engi;/obj/item/clothing/mask/breath" - product_amounts = "10;10;10;5;25" + productamounts = "10;10;10;5;25" vend_delay = 0 */ /obj/machinery/vending/boozeomat name = "Booze-O-Mat" desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one." - icon_state = "boozeomat" //////////////18 drink entities below, plus the glasses, in case someone wants to edit the number of bottles + icon_state = "boozeomat" icon_deny = "boozeomat-deny" - products = list(/obj/item/weapon/reagent_containers/food/drinks/bottle/gin = 5,/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey = 5, - /obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla = 5,/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka = 5, - /obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth = 5,/obj/item/weapon/reagent_containers/food/drinks/bottle/rum = 5, - /obj/item/weapon/reagent_containers/food/drinks/bottle/wine = 5,/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac = 5, - /obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua = 5,/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer = 6, - /obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale = 6,/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice = 4, - /obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice = 4,/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice = 4, - /obj/item/weapon/reagent_containers/food/drinks/bottle/cream = 4,/obj/item/weapon/reagent_containers/food/drinks/cans/tonic = 8, - /obj/item/weapon/reagent_containers/food/drinks/bottle/cola = 5, /obj/item/weapon/reagent_containers/food/drinks/bottle/space_up = 5, - /obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind = 5, /obj/item/weapon/reagent_containers/food/drinks/cans/sodawater = 15, - /obj/item/weapon/reagent_containers/food/drinks/flask/barflask = 2, /obj/item/weapon/reagent_containers/food/drinks/flask/vacuumflask = 2, - /obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 30,/obj/item/weapon/reagent_containers/food/drinks/ice = 9, - /obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor = 2,/obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao = 2, - /obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe = 2,/obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine = 5, - /obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey = 4) - contraband = list(/obj/item/weapon/reagent_containers/food/drinks/tea = 10) + products = list(/obj/item/weapon/reagent_containers/food/drinks/bottle/gin = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/vodka = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/rum = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/wine = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/cognac = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer = 15, + /obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale = 15, + /obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/cream = 5, + /obj/item/weapon/reagent_containers/food/drinks/cans/tonic = 15, + /obj/item/weapon/reagent_containers/food/drinks/bottle/cola = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/space_up = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind = 5, + /obj/item/weapon/reagent_containers/food/drinks/cans/sodawater = 15, + /obj/item/weapon/reagent_containers/food/drinks/flask/barflask = 5, + /obj/item/weapon/reagent_containers/food/drinks/flask/vacuumflask = 5, + /obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 30, + /obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass = 30, + /obj/item/weapon/reagent_containers/food/drinks/ice = 10, + /obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey = 5, + /obj/item/weapon/reagent_containers/food/drinks/tea = 15) + contraband = list() vend_delay = 15 idle_power_usage = 211 //refrigerator - believe it or not, this is actually the average power consumption of a refrigerated vending machine according to NRCan. product_slogans = "I hope nobody asks me for a bloody cup o' tea...;Alcohol is humanity's friend. Would you abandon a friend?;Quite delighted to serve you!;Is nobody thirsty on this station?" @@ -858,7 +907,7 @@ /obj/item/seeds/sunflowerseed = 3,/obj/item/seeds/tomatoseed = 3,/obj/item/seeds/towermycelium = 3,/obj/item/seeds/wheatseed = 3,/obj/item/seeds/appleseed = 3, /obj/item/seeds/poppyseed = 3,/obj/item/seeds/sugarcaneseed = 3,/obj/item/seeds/ambrosiavulgarisseed = 3,/obj/item/seeds/peanutseed = 3,/obj/item/seeds/whitebeetseed = 3,/obj/item/seeds/watermelonseed = 3,/obj/item/seeds/limeseed = 3, /obj/item/seeds/lemonseed = 3,/obj/item/seeds/orangeseed = 3,/obj/item/seeds/grassseed = 3,/obj/item/seeds/cocoapodseed = 3,/obj/item/seeds/plumpmycelium = 2, - /obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3) + /obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3,/obj/item/seeds/lavenderseed = 3) contraband = list(/obj/item/seeds/amanitamycelium = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/libertymycelium = 2,/obj/item/seeds/mtearseed = 2, /obj/item/seeds/nettleseed = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/shandseed = 2,) premium = list(/obj/item/toy/waterflower = 1) @@ -881,7 +930,7 @@ for(var/entry in current_list[1]) var/obj/item/seeds/S = new entry(src) var/name = S.name - var/datum/data/vending_product/product = new/datum/data/vending_product(entry, name) + var/datum/data/vending_product/product = new/datum/data/vending_product(src, entry, name) product.price = (entry in src.prices) ? src.prices[entry] : 0 product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1 @@ -904,8 +953,26 @@ desc = "A kitchen and restaurant equipment vendor." product_ads = "Mm, food stuffs!;Food and food accessories.;Get your plates!;You like forks?;I like forks.;Woo, utensils.;You don't really need these..." icon_state = "dinnerware" - products = list(/obj/item/weapon/tray = 8,/obj/item/weapon/material/kitchen/utensil/fork = 6, /obj/item/weapon/material/kitchen/utensil/knife = 6, /obj/item/weapon/material/kitchen/utensil/spoon = 6, /obj/item/weapon/material/knife = 3,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 8,/obj/item/clothing/suit/chef/classic = 2) - contraband = list(/obj/item/weapon/material/kitchen/rollingpin = 2, /obj/item/weapon/material/knife/butch = 2) + products = list( + /obj/item/weapon/tray = 8, + /obj/item/weapon/material/kitchen/utensil/fork = 6, + /obj/item/weapon/material/kitchen/utensil/knife = 6, + /obj/item/weapon/material/kitchen/utensil/spoon = 6, + /obj/item/weapon/material/knife = 3, + /obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 8, + /obj/item/clothing/suit/chef/classic = 2, + /obj/item/weapon/storage/toolbox/lunchbox = 3, + /obj/item/weapon/storage/toolbox/lunchbox/heart = 3, + /obj/item/weapon/storage/toolbox/lunchbox/cat = 3, + /obj/item/weapon/storage/toolbox/lunchbox/nt = 3, + /obj/item/weapon/storage/toolbox/lunchbox/mars = 3, + /obj/item/weapon/storage/toolbox/lunchbox/cti = 3, + /obj/item/weapon/storage/toolbox/lunchbox/nymph = 3, + /obj/item/weapon/storage/toolbox/lunchbox/syndicate = 3) + + + contraband = list(/obj/item/weapon/material/kitchen/rollingpin = 2, + /obj/item/weapon/material/knife/butch = 2) /obj/machinery/vending/sovietsoda name = "BODA" @@ -923,8 +990,10 @@ icon_deny = "tool-deny" //req_access = list(access_maint_tunnels) //Maintenance access products = list(/obj/item/stack/cable_coil/random = 10,/obj/item/weapon/crowbar = 5,/obj/item/weapon/weldingtool = 3,/obj/item/weapon/wirecutters = 5, - /obj/item/weapon/wrench = 5,/obj/item/device/analyzer = 5,/obj/item/device/t_scanner = 5,/obj/item/weapon/screwdriver = 5) - contraband = list(/obj/item/weapon/weldingtool/hugetank = 2,/obj/item/clothing/gloves/fyellow = 2) + /obj/item/weapon/wrench = 5,/obj/item/device/analyzer = 5,/obj/item/device/t_scanner = 5,/obj/item/weapon/screwdriver = 5, + /obj/item/device/flashlight/glowstick = 3, /obj/item/device/flashlight/glowstick/red = 3, /obj/item/device/flashlight/glowstick/blue = 3, + /obj/item/device/flashlight/glowstick/orange =3, /obj/item/device/flashlight/glowstick/yellow = 3) + contraband = list(/obj/item/weapon/weldingtool/hugetank = 2,/obj/item/clothing/gloves/fyellow = 2, ) premium = list(/obj/item/clothing/gloves/yellow = 1) /obj/machinery/vending/engivend @@ -938,12 +1007,15 @@ /obj/item/weapon/circuitboard/airalarm = 10,/obj/item/weapon/circuitboard/firealarm = 10,/obj/item/weapon/circuitboard/status_display = 2, /obj/item/weapon/circuitboard/ai_status_display = 2,/obj/item/weapon/circuitboard/newscaster = 2,/obj/item/weapon/circuitboard/holopad = 2, /obj/item/weapon/circuitboard/intercom = 4,/obj/item/weapon/circuitboard/security/telescreen/entertainment = 4, - /obj/item/weapon/circuitboard/atm = 0,/obj/item/weapon/circuitboard/guestpass = 0,/obj/item/weapon/circuitboard/keycard_auth = 0, - /obj/item/weapon/circuitboard/photocopier = 0,/obj/item/weapon/circuitboard/fax = 0,/obj/item/weapon/circuitboard/conveyor = 0, - /obj/item/weapon/circuitboard/microwave = 0,/obj/item/weapon/circuitboard/vending = 0,/obj/item/weapon/circuitboard/washing = 0, - /obj/item/weapon/stock_parts/motor = 0,/obj/item/weapon/stock_parts/spring = 0,/obj/item/weapon/stock_parts/gear = 0) + /obj/item/weapon/stock_parts/motor = 2,/obj/item/weapon/stock_parts/spring = 2,/obj/item/weapon/stock_parts/gear = 2, + /obj/item/weapon/circuitboard/atm,/obj/item/weapon/circuitboard/guestpass,/obj/item/weapon/circuitboard/keycard_auth, + /obj/item/weapon/circuitboard/photocopier,/obj/item/weapon/circuitboard/fax,/obj/item/weapon/circuitboard/request, + /obj/item/weapon/circuitboard/microwave,/obj/item/weapon/circuitboard/washing,/obj/item/weapon/circuitboard/scanner_console, + /obj/item/weapon/circuitboard/sleeper_console,/obj/item/weapon/circuitboard/body_scanner,/obj/item/weapon/circuitboard/sleeper, + /obj/item/weapon/circuitboard/dna_analyzer) contraband = list(/obj/item/weapon/cell/potato = 3) premium = list(/obj/item/weapon/storage/belt/utility = 3) + product_records = list() //This one's from bay12 /obj/machinery/vending/engineering @@ -975,3 +1047,24 @@ /obj/item/weapon/screwdriver = 5,/obj/item/weapon/crowbar = 5) //everything after the power cell had no amounts, I improvised. -Sayu +/obj/machinery/vending/fitness + name = "SweatMAX" + desc = "Fueled by your inner inadequacy!" + icon_state = "fitness" + products = list(/obj/item/weapon/reagent_containers/food/drinks/milk/smallcarton = 8, + /obj/item/weapon/reagent_containers/food/drinks/milk/smallcarton/chocolate = 8, + /obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/proteinshake = 8, + /obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask = 8, + /obj/item/weapon/reagent_containers/food/snacks/candy/proteinbar = 8, + /obj/item/weapon/reagent_containers/food/snacks/liquidfood = 8, + /obj/item/weapon/reagent_containers/pill/diet = 8) + + prices = list(/obj/item/weapon/reagent_containers/food/drinks/milk/smallcarton = 3, + /obj/item/weapon/reagent_containers/food/drinks/milk/smallcarton/chocolate = 3, + /obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/proteinshake = 20, + /obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask = 5, + /obj/item/weapon/reagent_containers/food/snacks/candy/proteinbar = 5, + /obj/item/weapon/reagent_containers/food/snacks/liquidfood = 5, + /obj/item/weapon/reagent_containers/pill/diet = 25) + + contraband = list(/obj/item/weapon/reagent_containers/syringe/steroid = 4) diff --git a/code/game/machinery/wall_frames.dm b/code/game/machinery/wall_frames.dm index fd0fd3ce7c2..701d4ebab23 100644 --- a/code/game/machinery/wall_frames.dm +++ b/code/game/machinery/wall_frames.dm @@ -22,11 +22,12 @@ if(!build_machine_type) return - var/ndir if(!frame_type) var/response = input(usr, "What kind of frame would you like to make?", "Frame type request", null) in list("Computer", "Machine", "Holopad", "Conveyor", - "Photocopier", "Fax", "Microwave", "Vending Machine", + "Photocopier", "Fax", "Microwave", "Recharger", "Washing Machine", "Grinder", + "Medical Console", "Medical Pod", "DNA Analyzer", + "Mass Driver", "Cancel") if(response == "Cancel") @@ -37,22 +38,29 @@ switch(response) if("Holopad") new /obj/item/stack/material/steel( usr.loc, 1 ) //holopads are smaller, they only need 4 sheets - if("Conveyor") - ndir = get_dir(src,usr) - if (!(ndir in cardinal)) - return if("Fax") new /obj/item/stack/material/steel( usr.loc, 2 ) //faxes are smaller, they only need 3 sheets if("Microwave") new /obj/item/stack/material/steel( usr.loc, 1 ) //microwaves are smaller, they only need 4 sheets - if("Vending Machine") - frame_type = "vending" if("Recharger") new /obj/item/stack/material/steel( usr.loc, 2 ) //rechargers are smaller, they only need 3 sheets if("Washing Machine") frame_type = "washing" if("Grinder") new /obj/item/stack/material/steel( usr.loc, 2 ) //grinders are smaller, they only need 3 sheets + if("Medical Console") + frame_type = "console" + if("Medical Pod") + frame_type = "medpod" + if("DNA Analyzer") + frame_type = "dna_analyzer" + if("Mass Driver") + frame_type = "massdriver" + + var/ndir + ndir = usr.dir + if (!(ndir in cardinal)) + return var/obj/machinery/M = new build_machine_type(get_turf(src.loc), ndir, 1, frame_type) M.fingerprints = src.fingerprints @@ -64,7 +72,7 @@ if(!frame_type) var/response = input(usr, "What kind of frame would you like to make?", "Frame type request", null) in list("Fire Alarm", "Air Alarm", "Display", "Newscaster", "ATM", "Guest Pass Console", "Intercom", "Keycard Authenticator", - "Wall Charger", + "Wall Charger", "Supply Request Console", "Cancel") if(response == "Cancel") @@ -92,6 +100,8 @@ if("Wall Charger") frame_type = "wrecharger" new /obj/item/stack/material/steel( usr.loc, 2 ) //wall rechargers are smaller, they only need 3 sheets + if("Supply Request Console") + frame_type = "request" if(!build_machine_type) return diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index 830a848bfe7..4babe5cd1b7 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -21,7 +21,8 @@ var/obj/crayon var/list/washing = list() -/obj/machinery/washing_machine/New() +/obj/machinery/washing_machine/map/New() + circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/motor(src) component_parts += new /obj/item/weapon/stock_parts/gear(src) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 425b959d31d..e257dc968d4 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -28,7 +28,7 @@ /obj/machinery/mecha_part_fabricator/New() ..() - + circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 6057747df0f..b742b8a14b2 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -794,7 +794,8 @@ return else if(istype(W, /obj/item/mecha_parts/mecha_tracking)) - user.removeItem(W, src) + user.drop_from_inventory(W) + W.forceMove(src) user.visible_message("[user] attaches [W] to [src].", "You attach [W] to [src]") return diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm index ede4ccf410e..65ed711f2fd 100644 --- a/code/game/mecha/medical/odysseus.dm +++ b/code/game/mecha/medical/odysseus.dm @@ -101,8 +101,6 @@ holder = patient.hud_list[STATUS_HUD] if(patient.stat == 2) holder.icon_state = "huddead" - else if(patient.status_flags & XENO_HOST) - holder.icon_state = "hudxeno" else if(foundVirus) holder.icon_state = "hudill" else if(patient.has_brain_worms()) diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 65fa2ceb6af..036e4270780 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -181,7 +181,7 @@ var/global/list/image/splatter_cache=list() layer = 2 icon = 'icons/effects/blood.dmi' icon_state = "gibbl5" - random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6") + random_icon_states = list("gib1", "gib2", "gib3", "gib5", "gib6") var/fleshcolor = "#FFFFFF" /obj/effect/decal/cleanable/blood/gibs/update_icon() diff --git a/code/game/objects/effects/decals/posters/bs12.dm b/code/game/objects/effects/decals/posters/bs12.dm index a727e2804c0..6b5ad182c42 100644 --- a/code/game/objects/effects/decals/posters/bs12.dm +++ b/code/game/objects/effects/decals/posters/bs12.dm @@ -91,7 +91,7 @@ /datum/poster/bay_19 icon_state="bsposter19" - name = "Respect a Unathi" + name = "Respect an Unathi" desc = "This poster depicts a well dressed looking Unathi receiving a prestigious award. It appears to espouse greater co-operation and harmony between the two races." /datum/poster/bay_20 @@ -117,7 +117,7 @@ /datum/poster/bay_24 icon_state="bsposter24" name = "Responsible medbay habits, No #259" - desc = "A poster with a nervous looking geneticist on it states; \"Friends Don't Tell Friends They're Clones. It can cause severe and irreparable emotional trauma. Always do the right thing and never tell them that they were dead.\"" + desc = "A poster with a nervous looking geneticist on it states; \"Friends Tell Friends They're Clones. It can cause severe and irreparable emotional trauma if a person is not properly informed of their recent demise. Always follow your contractual obligation and inform them of their recent rejuvenation.\"" /datum/poster/bay_25 icon_state="bsposter25" diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 586ba9b721e..01fc5926900 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -193,16 +193,14 @@ steam.start() -- spawns the effect affect(M) /obj/effect/effect/smoke/proc/affect(var/mob/living/carbon/M) - if (istype(M)) + if (!istype(M)) return 0 - if (M.internal != null) - if(M.wear_mask && (M.wear_mask.item_flags & AIRTIGHT)) + if(M.wear_mask && (M.wear_mask.item_flags & AIRTIGHT)) + return 0 + if(istype(M,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.head && (H.head.item_flags & AIRTIGHT)) return 0 - if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(H.head && (H.head.item_flags & AIRTIGHT)) - return 0 - return 0 return 1 ///////////////////////////////////////////// @@ -215,17 +213,18 @@ steam.start() -- spawns the effect icon = 'icons/effects/effects.dmi' icon_state = "sparks" -/obj/effect/effect/smoke/illumination/New(var/newloc, var/brightness=15, var/lifetime=10) +/obj/effect/effect/smoke/illumination/New(var/newloc, var/lifetime=10, var/range=null, var/power=null, var/color=null) time_to_live=lifetime ..() - set_light(brightness) + set_light(range, power, color) ///////////////////////////////////////////// // Bad smoke ///////////////////////////////////////////// /obj/effect/effect/smoke/bad - time_to_live = 200 + time_to_live = 600 + //var/list/projectiles /obj/effect/effect/smoke/bad/Move() ..() @@ -235,70 +234,25 @@ steam.start() -- spawns the effect /obj/effect/effect/smoke/bad/affect(var/mob/living/carbon/M) if (!..()) return 0 - M.drop_item() M.adjustOxyLoss(1) - if (M.coughedtime != 1) - M.coughedtime = 1 + if(prob(25)) M.emote("cough") - spawn ( 20 ) - M.coughedtime = 0 -/obj/effect/effect/smoke/bad/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(air_group || (height==0)) return 1 - if(istype(mover, /obj/item/projectile/beam)) - var/obj/item/projectile/beam/B = mover - B.damage = (B.damage/2) +/* Not feasile until a later date +/obj/effect/effect/smoke/bad/Crossed(atom/movable/M as mob|obj) + ..() + if(istype(M, /obj/item/projectile/beam)) + var/obj/item/projectile/beam/B = M + if(!(B in projectiles)) + B.damage = (B.damage/2) + projectiles += B + destroyed_event.register(B, src, /obj/effect/effect/smoke/bad/proc/on_projectile_delete) + world << "Damage is: [B.damage]" return 1 -///////////////////////////////////////////// -// Sleep smoke -///////////////////////////////////////////// -/obj/effect/effect/smoke/sleepy - -/obj/effect/effect/smoke/sleepy/Move() - ..() - for(var/mob/living/carbon/M in get_turf(src)) - affect(M) - -/obj/effect/effect/smoke/sleepy/affect(mob/living/carbon/M as mob ) - if (!..()) - return 0 - - M.drop_item() - M:sleeping += 1 - if (M.coughedtime != 1) - M.coughedtime = 1 - M.emote("cough") - spawn ( 20 ) - M.coughedtime = 0 -///////////////////////////////////////////// -// Mustard Gas -///////////////////////////////////////////// - - -/obj/effect/effect/smoke/mustard - name = "mustard gas" - icon_state = "mustard" - -/obj/effect/effect/smoke/mustard/Move() - ..() - for(var/mob/living/carbon/human/R in get_turf(src)) - affect(R) - -/obj/effect/effect/smoke/mustard/affect(var/mob/living/carbon/human/R) - if (!..()) - return 0 - if (R.wear_suit != null) - return 0 - - R.burn_skin(0.75) - if (R.coughedtime != 1) - R.coughedtime = 1 - R.emote("gasp") - spawn (20) - R.coughedtime = 0 - R.updatehealth() - return +/obj/effect/effect/smoke/bad/proc/on_projectile_delete(obj/item/projectile/beam/proj) + projectiles -= proj +*/ ///////////////////////////////////////////// // Smoke spread @@ -321,7 +275,7 @@ steam.start() -- spawns the effect if(direct) direction = direct -/datum/effect/effect/system/smoke_spread/start() +/datum/effect/effect/system/smoke_spread/start(var/I) var/i = 0 for(i=0, i 20) @@ -331,6 +285,7 @@ steam.start() -- spawns the effect src.location = get_turf(holder) var/obj/effect/effect/smoke/smoke = PoolOrNew(smoke_type, src.location) src.total_smoke++ + smoke.color = I var/direction = src.direction if(!direction) if(src.cardinals) @@ -348,14 +303,6 @@ steam.start() -- spawns the effect /datum/effect/effect/system/smoke_spread/bad smoke_type = /obj/effect/effect/smoke/bad -/datum/effect/effect/system/smoke_spread/sleepy - smoke_type = /obj/effect/effect/smoke/sleepy - - -/datum/effect/effect/system/smoke_spread/mustard - smoke_type = /obj/effect/effect/smoke/mustard - - ///////////////////////////////////////////// //////// Attach an Ion trail to any object, that spawns when it moves (like for the jetpack) /// just pass in the object to attach it to in set_up @@ -507,9 +454,9 @@ steam.start() -- spawns the effect M << "The solution violently explodes." explosion( - location, - round(min(devst, BOMBCAP_DVSTN_RADIUS)), - round(min(heavy, BOMBCAP_HEAVY_RADIUS)), - round(min(light, BOMBCAP_LIGHT_RADIUS)), + location, + round(min(devst, BOMBCAP_DVSTN_RADIUS)), + round(min(heavy, BOMBCAP_HEAVY_RADIUS)), + round(min(light, BOMBCAP_LIGHT_RADIUS)), round(min(flash, BOMBCAP_FLASH_RADIUS)) ) diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 7a923f14bd5..15cb670a8cd 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -133,7 +133,7 @@ qdel(src) /obj/effect/landmark/costume/maid/New() - new /obj/item/clothing/under/blackskirt(src.loc) + new /obj/item/clothing/under/skirt(src.loc) var/CHOICE = pick( /obj/item/clothing/head/beret , /obj/item/clothing/head/rabbitears ) new CHOICE(src.loc) new /obj/item/clothing/glasses/sunglasses/blindfold(src.loc) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 4d04c7b3aa4..4d78f5aa9d8 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -85,7 +85,7 @@ /obj/item/Destroy() if(ismob(loc)) var/mob/m = loc - m.removeItem(src, force = 1) + m.drop_from_inventory(src) m.update_inv_r_hand() m.update_inv_l_hand() src.loc = null @@ -178,7 +178,7 @@ src.throwing = 0 if (src.loc == user) - if(!user.removeItem(src)) + if(!user.unEquip(src)) return else if(isliving(src.loc)) @@ -484,7 +484,7 @@ var/list/global/slot_flags_enumeration = list( eyes.damage += rand(3,4) if(eyes.damage >= eyes.min_bruised_damage) if(M.stat != 2) - if(!(eyes.status & ORGAN_ROBOT)) //robot eyes bleeding might be a bit silly + if(!(eyes.robotic >= ORGAN_ROBOT)) //robot eyes bleeding might be a bit silly M << "Your eyes start to bleed profusely!" if(prob(50)) if(M.stat != 2) diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 3a6d55ca7d0..88b513e06e7 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -86,6 +86,17 @@ qdel(src) return +/obj/structure/closet/body_bag/proc/get_occupants() + var/list/occupants = list() + for(var/mob/living/carbon/human/H in contents) + occupants += H + return occupants + +/obj/structure/closet/body_bag/proc/update(var/broadcast=0) + if(istype(loc, /obj/structure/morgue)) + var/obj/structure/morgue/M = loc + M.update(broadcast) + /obj/structure/closet/body_bag/update_icon() if(opened) icon_state = icon_opened diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 33c505ea92b..f0bb82efd0e 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -163,6 +163,7 @@ var/global/list/obj/item/device/pda/PDAs = list() /obj/item/device/pda/shaftminer icon_state = "pda-miner" + default_cartridge = /obj/item/weapon/cartridge/miner /obj/item/device/pda/syndicate default_cartridge = /obj/item/weapon/cartridge/syndicate @@ -172,6 +173,7 @@ var/global/list/obj/item/device/pda/PDAs = list() hidden = 1 /obj/item/device/pda/chaplain + default_cartridge = /obj/item/weapon/cartridge/service icon_state = "pda-holy" ttone = "holy" @@ -181,13 +183,15 @@ var/global/list/obj/item/device/pda/PDAs = list() ttone = "..." /obj/item/device/pda/botanist - //default_cartridge = /obj/item/weapon/cartridge/botanist + default_cartridge = /obj/item/weapon/cartridge/service icon_state = "pda-hydro" /obj/item/device/pda/roboticist + default_cartridge = /obj/item/weapon/cartridge/signal/science icon_state = "pda-robot" /obj/item/device/pda/librarian + default_cartridge = /obj/item/weapon/cartridge/service icon_state = "pda-libb" desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a WGW-11 series e-reader." note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!" @@ -200,9 +204,11 @@ var/global/list/obj/item/device/pda/PDAs = list() note = "Congratulations, you have chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Max Turbo Limited Edition!" /obj/item/device/pda/chef + default_cartridge = /obj/item/weapon/cartridge/service icon_state = "pda-chef" /obj/item/device/pda/bar + default_cartridge = /obj/item/weapon/cartridge/service icon_state = "pda-bar" /obj/item/device/pda/atmos @@ -304,6 +310,99 @@ var/global/list/obj/item/device/pda/PDAs = list() ttone = "assist" +// Used for the PDA multicaster, which mirrors messages sent to it to a specific department, +/obj/item/device/pda/multicaster + ownjob = "Relay" + icon_state = "NONE" + ttone = "data" + detonate = 0 + news_silent = 1 + var/list/cartridges_to_send_to = list() + +// This is what actually mirrors the message, +/obj/item/device/pda/multicaster/new_message(var/sending_unit, var/sender, var/sender_job, var/message) + if(sender) + var/list/targets = list() + for(var/obj/item/device/pda/pda in PDAs) + if(pda.cartridge && pda.owner && is_type_in_list(pda.cartridge, cartridges_to_send_to)) + targets |= pda + if(targets.len) + for(var/obj/item/device/pda/target in targets) + create_message(target, sender, sender_job, message) + +// This has so much copypasta, +/obj/item/device/pda/multicaster/create_message(var/obj/item/device/pda/P, var/original_sender, var/original_job, var/t) + t = sanitize(t, MAX_MESSAGE_LEN, 0) + t = replace_characters(t, list(""" = "\"")) + if (!t || !istype(P)) + return + + if (isnull(P)||P.toff || toff) + return + + last_text = world.time + var/datum/reception/reception = get_reception(src, P, t) + t = reception.message + + if(reception.message_server && (reception.telecomms_reception & TELECOMMS_RECEPTION_SENDER)) // only send the message if it's stable, + if(reception.telecomms_reception & TELECOMMS_RECEPTION_RECEIVER == 0) // Does our recipient have a broadcaster on their level?, + return + var/send_result = reception.message_server.send_pda_message("[P.owner]","[owner]","[t]") + if (send_result) + return + + P.tnote.Add(list(list("sent" = 0, "owner" = "[owner]", "job" = "[ownjob]", "message" = "[t]", "target" = "\ref[src]"))) + + if(!P.conversations.Find("\ref[src]")) + P.conversations.Add("\ref[src]") + + P.new_message(src, "[original_sender] \[Relayed\]", original_job, t, 0) + + else + return + +/obj/item/device/pda/multicaster/command/New() + ..() + owner = "Command Department" + name = "Command Department (Relay)" + cartridges_to_send_to = command_cartridges + +/obj/item/device/pda/multicaster/security/New() + ..() + owner = "Security Department" + name = "Security Department (Relay)" + cartridges_to_send_to = security_cartridges + +/obj/item/device/pda/multicaster/engineering/New() + ..() + owner = "Engineering Department" + name = "Engineering Department (Relay)" + cartridges_to_send_to = engineering_cartridges + +/obj/item/device/pda/multicaster/medical/New() + ..() + owner = "Medical Department" + name = "Medical Department (Relay)" + cartridges_to_send_to = medical_cartridges + +/obj/item/device/pda/multicaster/research/New() + ..() + owner = "Research Department" + name = "Research Department (Relay)" + cartridges_to_send_to = research_cartridges + +/obj/item/device/pda/multicaster/cargo/New() + ..() + owner = "Cargo Department" + name = "Cargo Department (Relay)" + cartridges_to_send_to = cargo_cartridges + +/obj/item/device/pda/multicaster/civilian/New() + ..() + owner = "Civilian Services Department" + name = "Civilian Services Department (Relay)" + cartridges_to_send_to = civilian_cartridges + /* * The Actual PDA */ @@ -932,7 +1031,7 @@ var/global/list/obj/item/device/pda/PDAs = list() message += "Your [P] bleeps loudly." j = prob(10) - if(j) //This kills the PDA + if(j && detonate) //This kills the PDA qdel(P) if(message) message += "It melts in a puddle of plastic." @@ -1046,8 +1145,8 @@ var/global/list/obj/item/device/pda/PDAs = list() /obj/item/device/pda/proc/new_message_from_pda(var/obj/item/device/pda/sending_device, var/message) new_message(sending_device, sending_device.owner, sending_device.ownjob, message) -/obj/item/device/pda/proc/new_message(var/sending_unit, var/sender, var/sender_job, var/message) - var/reception_message = "\icon[src] Message from [sender] ([sender_job]), \"[message]\" (Reply)" +/obj/item/device/pda/proc/new_message(var/sending_unit, var/sender, var/sender_job, var/message, var/reply = 1) + var/reception_message = "\icon[src] Message from [sender] ([sender_job]), \"[message]\" ([reply ? "Reply" : "Unable to Reply"])" new_info(message_silent, ttone, reception_message) log_pda("[usr] (PDA: [sending_unit]) sent \"[message]\" to [name]") @@ -1152,13 +1251,15 @@ var/global/list/obj/item/device/pda/PDAs = list() return 1 else var/obj/item/I = user.get_active_hand() - if (istype(I, /obj/item/weapon/card/id) && user.removeItem(I, src)) + if (istype(I, /obj/item/weapon/card/id) && user.unEquip(I)) + I.loc = src id = I return 1 else var/obj/item/weapon/card/I = user.get_active_hand() - if (istype(I, /obj/item/weapon/card/id) && I:registered_name && user.removeItem(I, src)) + if (istype(I, /obj/item/weapon/card/id) && I:registered_name && user.unEquip(I)) var/obj/old_id = id + I.loc = src id = I user.put_in_hands(old_id) return 1 diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm index 5d576959fb7..a0e37e28b8b 100644 --- a/code/game/objects/items/devices/PDA/cart.dm +++ b/code/game/objects/items/devices/PDA/cart.dm @@ -1,3 +1,48 @@ +var/list/command_cartridges = list( + /obj/item/weapon/cartridge/captain, + /obj/item/weapon/cartridge/hop, + /obj/item/weapon/cartridge/hos, + /obj/item/weapon/cartridge/ce, + /obj/item/weapon/cartridge/rd, + /obj/item/weapon/cartridge/head, + /obj/item/weapon/cartridge/lawyer // Internal Affaris, + ) + +var/list/security_cartridges = list( + /obj/item/weapon/cartridge/security, + /obj/item/weapon/cartridge/detective, + /obj/item/weapon/cartridge/hos + ) + +var/list/engineering_cartridges = list( + /obj/item/weapon/cartridge/engineering, + /obj/item/weapon/cartridge/atmos, + /obj/item/weapon/cartridge/ce + ) + +var/list/medical_cartridges = list( + /obj/item/weapon/cartridge/medical, + /obj/item/weapon/cartridge/chemistry, + /obj/item/weapon/cartridge/cmo + ) + +var/list/research_cartridges = list( + /obj/item/weapon/cartridge/signal/science, + /obj/item/weapon/cartridge/rd + ) + +var/list/cargo_cartridges = list( + /obj/item/weapon/cartridge/quartermaster, // This also covers cargo-techs, apparently, + /obj/item/weapon/cartridge/miner, + /obj/item/weapon/cartridge/hop + ) + +var/list/civilian_cartridges = list( + /obj/item/weapon/cartridge/janitor, + /obj/item/weapon/cartridge/service, + /obj/item/weapon/cartridge/hop + ) + /obj/item/weapon/cartridge name = "generic cartridge" desc = "A data cartridge for portable microcomputers." @@ -98,6 +143,10 @@ access_flora = 1 */ +/obj/item/weapon/cartridge/service + name = "\improper Serv-U Pro" + desc = "A data cartridge designed to serve YOU!" + /obj/item/weapon/cartridge/signal name = "generic signaler cartridge" desc = "A data cartridge with an integrated radio signaler module." @@ -124,6 +173,11 @@ icon_state = "cart-q" access_quartermaster = 1 +/obj/item/weapon/cartridge/miner + name = "\improper Drill-Jockey 4.5" + desc = "It's covered in some sort of sand." + icon_state = "cart-q" + /obj/item/weapon/cartridge/head name = "\improper Easy-Record DELUXE" icon_state = "cart-h" diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index 3cc011cfb8b..bc80bc9db36 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -20,13 +20,32 @@ var/global/list/obj/item/device/communicator/all_communicators = list() var/list/voice_mobs = list() var/list/voice_requests = list() var/list/voice_invites = list() - var/selected_tab = 1 //1 equals dialing, 2 equals reviewing requests/invites. + + var/list/im_contacts = list() + var/list/im_list = list() + + var/note = "Thank you for choosing the T-14.2 Communicator, this is your notepad!" //Current note in the notepad function + var/notehtml = "" + + var/obj/item/weapon/cartridge/cartridge = null //current cartridge + var/list/modules = list( + list("module" = "Phone", "icon" = "phone64", "number" = 2), + list("module" = "Contacts", "icon" = "person64", "number" = 3), + list("module" = "Messaging", "icon" = "comment64", "number" = 4), + list("module" = "Note", "icon" = "note64", "number" = 5), + list("module" = "Settings", "icon" = "gear64", "number" = 6) + ) //list("module" = "Name of Module", "icon" = "icon name64", "number" = "what tab is the module") + + var/selected_tab = 1 var/owner = "" + var/occupation = "" var/alert_called = 0 var/obj/machinery/exonet_node/node = null //Reference to the Exonet node, to avoid having to look it up so often. var/target_address = "" + var/target_address_name = "" var/network_visibility = 1 + var/ringer = 1 var/list/known_devices = list() var/datum/exonet_protocol/exonet = null var/list/communicating = list() @@ -151,6 +170,24 @@ var/global/list/obj/item/device/communicator/all_communicators = list() if(!node || !node.on || !node.allow_external_communicators) close_connection(reason = "Connection timed out") +// Proc: attackby() +// Parameters: 2 (C - what is used on the communicator. user - the mob that has the communicator) +// Description: When an ID is swiped on the communicator, the communicator reads the job and checks it against the Owner name, if success, the occupation is added. +/obj/item/device/communicator/attackby(obj/item/C as obj, mob/user as mob) + if(istype(C, /obj/item/weapon/card/id)) + var/obj/item/weapon/card/id/idcard = C + if(!idcard.registered_name || !idcard.assignment) + user << "\The [src] rejects the ID." + return + if(!owner) + user << "\The [src] rejects the ID." + return + if(owner == idcard.registered_name) + occupation = idcard.assignment + user << "Occupation updated." + return + else return + // Proc: attack_self() // Parameters: 1 (user - the mob that clicked the device in their hand) // Description: Makes an exonet datum if one does not exist, allocates an address for it, maintains the lists of all devies, clears the alert icon, and @@ -205,6 +242,11 @@ var/global/list/obj/item/device/communicator/all_communicators = list() var/voices[0] //Current /mob/living/voice s inside the device. var/connected_communicators[0] //Current communicators connected to the device. + var/im_contacts_ui[0] //List of communicators that have been messaged. + var/im_list_ui[0] //List of messages. + + var/modules_ui[0] //Home screen info. + //First we add other 'local' communicators. for(var/obj/item/device/communicator/comm in known_devices) if(comm.network_visibility && comm.exonet) @@ -243,18 +285,38 @@ var/global/list/obj/item/device/communicator/all_communicators = list() for(var/obj/item/device/communicator/comm in communicating) connected_communicators[++connected_communicators.len] = list("name" = sanitize(comm.name), "true_name" = sanitize(comm.name)) + //Devices that have been messaged or recieved messages from. + for(var/obj/item/device/communicator/comm in im_contacts) + if(comm.exonet) + im_contacts_ui[++im_contacts_ui.len] = list("name" = sanitize(comm.name), "address" = comm.exonet.address) + + //Actual messages. + for(var/I in im_list) + im_list_ui[++im_list_ui.len] = list("address" = I["address"], "to_address" = I["to_address"], "im" = I["im"]) + + //Modules for homescreen. + for(var/list/R in modules) + modules_ui[++modules_ui.len] = R data["owner"] = owner ? owner : "Unset" + data["occupation"] = occupation ? occupation : "Swipe ID to set." data["connectionStatus"] = get_connection_to_tcomms() data["visible"] = network_visibility data["address"] = exonet.address ? exonet.address : "Unallocated" data["targetAddress"] = target_address + data["targetAddressName"] = target_address_name data["currentTab"] = selected_tab data["knownDevices"] = communicators data["invitesSent"] = invites data["requestsReceived"] = requests data["voice_mobs"] = voices data["communicating"] = connected_communicators + data["imContacts"] = im_contacts_ui + data["imList"] = im_list_ui + data["time"] = worldtime2text() + data["ring"] = ringer + data["homeScreen"] = modules_ui + data["note"] = note // current notes // update the ui if it exists, returns null if no ui is passed/found ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) @@ -284,6 +346,9 @@ var/global/list/obj/item/device/communicator/all_communicators = list() if(href_list["toggle_visibility"]) network_visibility = !network_visibility + if(href_list["toggle_ringer"]) + ringer = !ringer + if(href_list["add_hex"]) var/hex = href_list["add_hex"] add_to_EPv2(hex) @@ -304,6 +369,16 @@ var/global/list/obj/item/device/communicator/all_communicators = list() var/their_address = href_list["dial"] exonet.send_message(their_address, "voice") + if(href_list["message"]) + if(!get_connection_to_tcomms()) + usr << "Error: Cannot connect to Exonet node." + return + var/their_address = href_list["message"] + var/text = sanitizeSafe(input(usr,"Enter your message.","Text Message")) + if(text) + exonet.send_message(their_address, "text", text) + im_list += list(list("address" = exonet.address, "to_address" = their_address, "im" = text)) + if(href_list["disconnect"]) var/name_to_disconnect = href_list["disconnect"] for(var/mob/living/voice/V in contents) @@ -316,6 +391,9 @@ var/global/list/obj/item/device/communicator/all_communicators = list() if(href_list["copy"]) target_address = href_list["copy"] + if(href_list["copy_name"]) + target_address_name = href_list["copy_name"] + if(href_list["hang_up"]) for(var/mob/living/voice/V in contents) close_connection(usr, V, "[usr] hung up.") @@ -325,13 +403,25 @@ var/global/list/obj/item/device/communicator/all_communicators = list() if(href_list["switch_tab"]) selected_tab = href_list["switch_tab"] + if(href_list["edit"]) + var/n = input(usr, "Please enter message", name, notehtml) + n = sanitizeSafe(n, extra = 0) + if(n) + note = html_decode(n) + notehtml = note + note = replacetext(note, "\n", "
") + else + note = "" + notehtml = note + nanomanager.update_uis(src) add_fingerprint(usr) // Proc: receive_exonet_message() -// Parameters: 3 (origin atom - the source of the message's holder, origin_address - where the message came from, message - the message received) -// Description: Handles voice requests and invite messages originating from both real communicators and ghosts. Also includes a ping response. -/obj/item/device/communicator/receive_exonet_message(var/atom/origin_atom, origin_address, message) +// Parameters: 4 (origin atom - the source of the message's holder, origin_address - where the message came from, message - the message received, +// text - message text to send if message is of type "text") +// Description: Handles voice requests and invite messages originating from both real communicators and ghosts. Also includes a ping response and IM function. +/obj/item/device/communicator/receive_exonet_message(var/atom/origin_atom, origin_address, message, text) if(message == "voice") if(isobserver(origin_atom) || istype(origin_atom, /obj/item/device/communicator)) if(origin_atom in voice_invites) @@ -349,6 +439,9 @@ var/global/list/obj/item/device/communicator/all_communicators = list() var/random = rand(200,350) random = random / 10 exonet.send_message(origin_address, "64 bytes received from [exonet.address] ecmp_seq=1 ttl=51 time=[random] ms") + if(message == "text") + request_im(origin_atom, origin_address, text) + return // Proc: receive_exonet_message() // Parameters: 3 (origin atom - the source of the message's holder, origin_address - where the message came from, message - the message received) @@ -368,6 +461,8 @@ var/global/list/obj/item/device/communicator/all_communicators = list() var/random = rand(450,700) random = random / 10 exonet.send_message(origin_address, "64 bytes received from [exonet.address] ecmp_seq=1 ttl=51 time=[random] ms") + if(message == "text") //Ghosts don't get texting yet. Mostly for spam prevention by ghosts but also due to ui requirements not sorted out yet. + return // Proc: register_device() // Parameters: 1 (user - the person to use their name for) @@ -514,9 +609,10 @@ var/global/list/obj/item/device/communicator/all_communicators = list() voice_requests |= candidate - playsound(loc, 'sound/machines/twobeep.ogg', 50, 1) - for (var/mob/O in hearers(2, loc)) - O.show_message(text("\icon[src] *beep*")) + if(ringer) + playsound(loc, 'sound/machines/twobeep.ogg', 50, 1) + for (var/mob/O in hearers(2, loc)) + O.show_message(text("\icon[src] *beep*")) alert_called = 1 update_icon() @@ -529,6 +625,42 @@ var/global/list/obj/item/device/communicator/all_communicators = list() if(L) L << "\icon[src] Communications request from [who]." +// Proc: request_im() +// Parameters: 3 (candidate - the communicator wanting to message the device, origin_address - the address of the sender, text - the message) +// Description: Response to a communicator trying to message the device. +// Adds them to the list of people that have messaged this device and adds the message to the message list. +/obj/item/device/communicator/proc/request_im(var/atom/candidate, var/origin_address, var/text) + var/who = null + if(isobserver(candidate)) + return + else if(istype(candidate, /obj/item/device/communicator)) + var/obj/item/device/communicator/comm = candidate + who = comm.owner + comm.im_contacts |= src + im_list += list(list("address" = origin_address, "to_address" = exonet.address, "im" = text)) + else return + + im_contacts |= candidate + + if(!who) + return + + if(ringer) + playsound(loc, 'sound/machines/twobeep.ogg', 50, 1) + for (var/mob/O in hearers(2, loc)) + O.show_message(text("\icon[src] *beep*")) + + alert_called = 1 + update_icon() + + //Search for holder of the device. + var/mob/living/L = null + if(loc && isliving(loc)) + L = loc + + if(L) + L << "\icon[src] Message from [who]." + // Proc: Destroy() // Parameters: None // Description: Deletes all the voice mobs, disconnects all linked communicators, and cuts lists to allow successful qdel() diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 7a8740c2871..ae18aed86c5 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -63,6 +63,10 @@ else //can only use it 5 times a minute user << "*click* *click*" return + + user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) + user.do_attack_animation(M) + playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1) var/flashfail = 0 @@ -115,9 +119,9 @@ /obj/item/device/flash/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0) if(!user || !clown_check(user)) return - + user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) - + if(broken) user.show_message("The [src.name] is broken", 2) return diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index f0c70dde9ad..c3fcf893acf 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -201,7 +201,7 @@ src.force = on_damage src.damtype = "fire" processing_objects += src - + /obj/item/device/flashlight/flare/proc/ignite() //Used for flare launchers. on = !on update_icon() @@ -210,6 +210,76 @@ processing_objects += src return 1 +//Glowsticks + +/obj/item/device/flashlight/glowstick + name = "green glowstick" + desc = "A green military-grade glowstick." + w_class = 2.0 + brightness_on = 4 + light_power = 2 + light_color = "#49F37C" + icon_state = "glowstick" + item_state = "glowstick" + var/fuel = 0 + +/obj/item/device/flashlight/glowstick/New() + fuel = rand(1600, 2000) + ..() + +/obj/item/device/flashlight/glowstick/process() + fuel = max(fuel - 1, 0) + if(!fuel || !on) + turn_off() + if(!fuel) + src.icon_state = "[initial(icon_state)]-empty" + processing_objects -= src + +/obj/item/device/flashlight/glowstick/proc/turn_off() + on = 0 + update_icon() + +/obj/item/device/flashlight/glowstick/attack_self(mob/user) + + if(!fuel) + user << "The glowstick has already been turned on." + return + if(on) + return + + . = ..() + if(.) + user.visible_message("[user] cracks and shakes the glowstick.", "You crack and shake the glowstick, turning it on!") + processing_objects += src + +/obj/item/device/flashlight/glowstick/red + name = "red glowstick" + desc = "A red military-grade glowstick." + light_color = "#FC0F29" + icon_state = "glowstick_red" + item_state = "glowstick_red" + +/obj/item/device/flashlight/glowstick/blue + name = "blue glowstick" + desc = "A blue military-grade glowstick." + light_color = "#599DFF" + icon_state = "glowstick_blue" + item_state = "glowstick_blue" + +/obj/item/device/flashlight/glowstick/orange + name = "orange glowstick" + desc = "A orange military-grade glowstick." + light_color = "#FA7C0B" + icon_state = "glowstick_orange" + item_state = "glowstick_orange" + +/obj/item/device/flashlight/glowstick/yellow + name = "yellow glowstick" + desc = "A yellow military-grade glowstick." + light_color = "#FEF923" + icon_state = "glowstick_yellow" + item_state = "glowstick_yellow" + /obj/item/device/flashlight/slime gender = PLURAL name = "glowing slime extract" diff --git a/code/game/objects/items/devices/hacktool.dm b/code/game/objects/items/devices/hacktool.dm new file mode 100644 index 00000000000..0cf4af6c743 --- /dev/null +++ b/code/game/objects/items/devices/hacktool.dm @@ -0,0 +1,100 @@ +/obj/item/device/multitool/hacktool + var/is_hacking = 0 + var/max_known_targets + + var/in_hack_mode = 0 + var/list/known_targets + var/list/supported_types + var/datum/topic_state/default/must_hack/hack_state + +/obj/item/device/multitool/hacktool/New() + ..() + known_targets = list() + max_known_targets = 5 + rand(1,3) + supported_types = list(/obj/machinery/door/airlock) + hack_state = new(src) + +/obj/item/device/multitool/hacktool/Destroy() + for(var/T in known_targets) + var/atom/target = T + target.unregister(OBSERVER_EVENT_DESTROY, src) + known_targets.Cut() + qdel(hack_state) + hack_state = null + return ..() + +/obj/item/device/multitool/hacktool/attackby(var/obj/W, var/mob/user) + if(isscrewdriver(W)) + in_hack_mode = !in_hack_mode + playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + else + ..() + +/obj/item/device/multitool/hacktool/resolve_attackby(atom/A, mob/user) + sanity_check() + + if(!in_hack_mode) + return ..() + + if(!attempt_hack(user, A)) + return 0 + + A.ui_interact(user, state = hack_state) + return 1 + +/obj/item/device/multitool/hacktool/proc/attempt_hack(var/mob/user, var/atom/target) + if(is_hacking) + user << "You are already hacking!" + return 0 + if(!is_type_in_list(target, supported_types)) + user << "\icon[src] Unable to hack this target!" + return 0 + var/found = known_targets.Find(target) + if(found) + known_targets.Swap(1, found) // Move the last hacked item first + return 1 + + user << "You begin hacking \the [target]..." + is_hacking = 1 + // On average hackin takes ~30 seconds. Fairly small random span to avoid people simply aborting and trying again + var/hack_result = do_after(user, (20 SECONDS + rand(0, 10 SECONDS) + rand(0, 10 SECONDS))) + is_hacking = 0 + + if(hack_result && in_hack_mode) + user << "Your hacking attempt was succesful!" + playsound(src.loc, 'sound/piano/A#6.ogg', 75) + else + user << "Your hacking attempt failed!" + return 0 + + known_targets.Insert(1, target) // Insert the newly hacked target first, + target.register(OBSERVER_EVENT_DESTROY, src, /obj/item/device/multitool/hacktool/proc/on_target_destroy) + return 1 + +/obj/item/device/multitool/hacktool/proc/sanity_check() + if(max_known_targets < 1) max_known_targets = 1 + // Cut away the oldest items if the capacity has been reached + if(known_targets.len > max_known_targets) + for(var/i = (max_known_targets + 1) to known_targets.len) + var/atom/A = known_targets[i] + A.unregister(OBSERVER_EVENT_DESTROY, src) + known_targets.Cut(max_known_targets + 1) + +/obj/item/device/multitool/hacktool/proc/on_target_destroy(var/target) + known_targets -= target + +/datum/topic_state/default/must_hack + var/obj/item/device/multitool/hacktool/hacktool + +/datum/topic_state/default/must_hack/New(var/hacktool) + src.hacktool = hacktool + ..() + +/datum/topic_state/default/must_hack/Destroy() + hacktool = null + return ..() + +/datum/topic_state/default/must_hack/can_use_topic(var/src_object, var/mob/user) + if(!hacktool || !hacktool.in_hack_mode || !(src_object in hacktool.known_targets)) + return STATUS_CLOSE + return ..() diff --git a/code/game/objects/items/devices/locker_painter.dm b/code/game/objects/items/devices/locker_painter.dm new file mode 100644 index 00000000000..567e2963482 --- /dev/null +++ b/code/game/objects/items/devices/locker_painter.dm @@ -0,0 +1,140 @@ +/obj/item/device/closet_painter + name = "closet painter" + icon = 'icons/obj/bureaucracy.dmi' + icon_state = "labeler1" + item_state = "flight" + + var/colour = "plain" + var/colour_secure = "plain" + + var/list/colours = list( + "plain" = list("open" = "open", "closed" = "closed"), + "blue" = list("open" = "open", "closed" = "blue"), + "mixed" = list("open" = "open", "closed" = "mixed"), + "grey" = list("open" = "open", "closed" = "grey"), + "green" = list("open" = "open", "closed" = "green"), + "orange" = list("open" = "open", "closed" = "orange"), + "pink" = list("open" = "open", "closed" = "pink"), + "red" = list("open" = "open", "closed" = "red"), + "white" = list("open" = "open", "closed" = "white"), + "yellow" = list("open" = "open", "closed" = "yellow"), + "black" = list("open" = "open", "closed" = "black"), + "bio" = list("open" = "bioopen", "closed" = "bio"), + "bio-virology" = list("open" = "bio_virologyopen", "closed" = "bio_virology"), + "bio-security" = list("open" = "bio_securityopen", "closed" = "bio_security"), + "bio-janitor" = list("open" = "bio_janitoropen", "closed" = "bio_janitor"), + "bio-scientist" = list("open" = "bio_scientistopen", "closed" = "bio_scientist"), + "bombsuit" = list("open" = "bombsuitopen", "closed" = "bombsuit"), + "bombsuit-security" = list("open" = "bombsuitsecopen", "closed" = "bombsuitsec"), + "full-red" = list("open" = "syndicateopen", "closed" = "syndicate"), + "full-green" = list("open" = "syndicate1open", "closed" = "syndicate1"), + "full-purple" = list("open" = "aclosetopen", "closed" = "acloset"), + "mining" = list("open" = "miningopen", "closed" = "mining"), + "emergency" = list("open" = "emergencyopen", "closed" = "emergency"), + "fire" = list("open" = "fireclosetopen", "closed" = "firecloset"), + "tool" = list("open" = "toolclosetopen", "closed" = "toolcloset"), + "radiation" = list("open" = "toolclosetopen", "closed" = "radsuitcloset") + ) + + var/list/colours_secure = list( + "plain" = list("open" = "open", "closed" = "secure", "locked" = "secure1", "broken" = "securebroken", "off" = "secureoff"), + "medical-red" = list("open" = "medicalopen", "closed" = "medical", "locked" = "medical1", "broken" = "medicalbroken", "off" = "medicaloff"), + "medical-green" = list("open" = "securemedopen", "closed" = "securemed", "locked" = "securemed1", "broken" = "securemedbroken", "off" = "securemedoff"), + "CMO" = list("open" = "cmosecureopen", "closed" = "cmosecure", "locked" = "cmosecure1", "broken" = "cmosecurebroken", "off" = "cmosecureoff"), + "cargo" = list("open" = "securecargoopen", "closed" = "securecargo", "locked" = "securecargo1", "broken" = "securecargobroken", "off" = "securecargooff"), + "mining" = list("open" = "miningsecopen", "closed" = "miningsec", "locked" = "miningsec1", "broken" = "miningsecbroken", "off" = "miningsecoff"), + "QM" = list("open" = "secureqmopen", "closed" = "secureqm", "locked" = "secureqm1", "broken" = "secureqmbroken", "off" = "secureqmoff"), + "hydroponics" = list("open" = "hydrosecureopen", "closed" = "hydrosecure", "locked" = "hydrosecure1", "broken" = "hydrosecurebroken", "off" = "hydrosecureoff"), + "atmospherics" = list("open" = "secureatmopen", "closed" = "secureatm", "locked" = "secureatm1", "broken" = "secureatmbroken", "off" = "secureatmoff"), + "engineer" = list("open" = "secureengopen", "closed" = "secureeng", "locked" = "secureeng1", "broken" = "secureengbroken", "off" = "secureengoff"), + "CE" = list("open" = "secureceopen", "closed" = "securece", "locked" = "securece1", "broken" = "securecebroken", "off" = "secureceoff"), + "electrical" = list("open" = "toolclosetopen", "closed" = "secureengelec", "locked" = "secureengelec1", "broken" = "secureengelecbroken", "off" = "secureengelecoff"), + "welding" = list("open" = "toolclosetopen", "closed" = "secureengweld", "locked" = "secureengweld1", "broken" = "secureengweldbroken", "off" = "secureengweldoff"), + "research" = list("open" = "secureresopen", "closed" = "secureres", "locked" = "secureres1", "broken" = "secureresbroken", "off" = "secureresoff"), + "RD" = list("open" = "rdsecureopen", "closed" = "rdsecure", "locked" = "rdsecure1", "broken" = "rdsecurebroken", "off" = "rdsecureoff"), + "security" = list("open" = "secopen", "closed" = "sec", "locked" = "sec1", "broken" = "secbroken", "off" = "secoff"), + "warden" = list("open" = "wardensecureopen", "closed" = "wardensecure", "locked" = "wardensecure1", "broken" = "wardensecurebroken", "off" = "wardensecureoff"), + "HoS" = list("open" = "hossecureopen", "closed" = "hossecure", "locked" = "hossecure1", "broken" = "hossecurebroken", "off" = "hossecureoff"), + "HoP" = list("open" = "hopsecureopen", "closed" = "hopsecure", "locked" = "hopsecure1", "broken" = "hopsecurebroken", "off" = "hopsecureoff"), + "Captain" = list("open" = "capsecureopen", "closed" = "capsecure", "locked" = "capsecure1", "broken" = "capsecurebroken", "off" = "capsecureoff") + ) + +/obj/item/device/closet_painter/afterattack(atom/A, var/mob/user, proximity) + if(!proximity) + return + + if(!istype(A,/obj/structure/closet)) + user << "\The [src] can only be used on closets." + return + + var/config_error + + if(istype(A,/obj/structure/closet/secure_closet)) + var/obj/structure/closet/secure_closet/F = A + if(F.broken) + user << "\The [src] cannot paint broken closets." + return + + var/list/colour_data = colours_secure[colour_secure] + if(!islist(colour_data)) + config_error = 1 + if(!config_error) + F.icon_opened = colour_data["open"] + F.icon_closed = colour_data["closed"] + F.icon_locked = colour_data["locked"] + F.icon_broken = colour_data["broken"] + F.icon_off = colour_data["off"] + F.update_icon() + + else + var/obj/structure/closet/F = A + var/list/colour_data = colours[colour] + if(!islist(colour_data)) + config_error = 1 + if(!config_error) + F.icon_opened = colour_data["open"] + F.icon_closed = colour_data["closed"] + F.update_icon() + + if(config_error) + user << "\The [src] flashes an error light. You might need to reconfigure it." + return + +/obj/item/device/closet_painter/attack_self(var/mob/user) + var/choice = input("Do you wish to change the regular closet colour or the secure closet colour?") as null|anything in list("Regular Closet Colour","Secure Closet Colour") + if(choice == "Regular Closet Colour") + choose_colour() + else if(choice == "Secure Closet Colour") + choose_colour_secure() + +/obj/item/device/closet_painter/examine(mob/user) + ..(user) + user << "It is configured to produce the '[colour]' paint scheme or the '[colour_secure]' secure closet paint scheme." + +/obj/item/device/closet_painter/verb/choose_colour() + set name = "Choose Colour" + set desc = "Choose a regular closet painter colour." + set category = "Object" + set src in usr + + if(usr.incapacitated()) + return + + var/new_colour = input("Select a colour.") as null|anything in colours + if(new_colour && !isnull(colours[new_colour])) + colour = new_colour + usr << "You set \the [src] regular closet colour to '[colour]'." + +/obj/item/device/closet_painter/verb/choose_colour_secure() + set name = "Choose Secure Colour" + set desc = "Choose a secure closet painter colour." + set category = "Object" + set src in usr + + if(usr.incapacitated()) + return + + var/new_colour_secure = input("Select a colour.") as null|anything in colours_secure + if(new_colour_secure && !isnull(colours_secure[new_colour_secure])) + colour_secure = new_colour_secure + usr << "You set \the [src] secure closet colour to '[colour_secure]'." \ No newline at end of file diff --git a/code/game/objects/items/devices/modkit.dm b/code/game/objects/items/devices/modkit.dm index 88fad1d0566..025196b2188 100644 --- a/code/game/objects/items/devices/modkit.dm +++ b/code/game/objects/items/devices/modkit.dm @@ -23,7 +23,8 @@ if(!parts) user << "This kit has no parts for this modification left." - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) return var/allowed = 0 @@ -58,7 +59,8 @@ parts &= ~MODKIT_SUIT if(!parts) - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) /obj/item/device/modkit/examine(mob/user) ..(user) diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 867e64f4461..e7cb6f34753 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -20,4 +20,4 @@ origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1) var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage - var/obj/machinery/clonepod/connecting //same for cryopod linkage \ No newline at end of file + var/obj/machinery/clonepod/connecting //same for cryopod linkage diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index db373754bdf..5b769ed8034 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -27,11 +27,13 @@ var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit( user ) A.icon = 'icons/obj/assemblies.dmi' - user.removeItem(W, A) + user.drop_from_inventory(W) + W.loc = A W.master = A A.part1 = W - user.removeItem(src, A) + user.drop_from_inventory(src) + loc = A master = A A.part2 = src diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index ef875940adc..a4b159b7348 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -75,7 +75,7 @@ REAGENT SCANNER for(var/obj/item/organ/external/org in damaged) user.show_message(text(" [][]: [][] - []", capitalize(org.name), - (org.status & ORGAN_ROBOT) ? "(Cybernetic)" : "", + (org.robotic >= ORGAN_ROBOT) ? "(Cybernetic)" : "", (org.brute_dam > 0) ? "[org.brute_dam]" : 0, (org.status & ORGAN_BLEEDING)?"\[Bleeding\]":"", (org.burn_dam > 0) ? "[org.burn_dam]" : 0),1) diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index 37ceba94459..c8b66fe38f3 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -31,7 +31,7 @@ /obj/item/device/suit_cooling_unit/New() processing_objects |= src - cell = new/obj/item/weapon/cell() //comes with the crappy default power cell - high-capacity ones shouldn't be hard to find + cell = new/obj/item/weapon/cell/high() //comes not with the crappy default power cell - because this is dedicated EVA equipment cell.loc = src /obj/item/device/suit_cooling_unit/process() diff --git a/code/game/objects/items/devices/telecrystal.dm b/code/game/objects/items/devices/telecrystal.dm index 02654c3b7c7..aa7b6335903 100644 --- a/code/game/objects/items/devices/telecrystal.dm +++ b/code/game/objects/items/devices/telecrystal.dm @@ -15,6 +15,7 @@ For new antags, make sure to add "player.mind.accept_tcrystals = 1" if you want /obj/item/device/telecrystal/attack_self(mob/user as mob) if(user.mind.accept_tcrystals) //Checks to see if antag type allows for tcrystals user.mind.tcrystals += 1 - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) return \ No newline at end of file diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index d268e2f2045..88b53bd342d 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -47,8 +47,9 @@ if(attached_device) user << "There is already an device attached to the valve, remove it first." return - user.removeItem(A, src) + user.remove_from_mob(item) attached_device = A + A.loc = src user << "You attach the [item] to the valve controls and secure it." A.holder = src A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb). diff --git a/code/game/objects/items/devices/uplink.dm b/code/game/objects/items/devices/uplink.dm index df28d4d3d78..571b0462df8 100644 --- a/code/game/objects/items/devices/uplink.dm +++ b/code/game/objects/items/devices/uplink.dm @@ -1,11 +1,3 @@ -//This could either be split into the proper DM files or placed somewhere else all together, but it'll do for now -Nodrak - -/* - -A list of items and costs is stored under the datum of every game mode, alongside the number of crystals, and the welcoming message. - -*/ - /obj/item/device/uplink var/welcome = "Welcome, Operative" // Welcoming menu message var/uses // Numbers of crystals @@ -18,6 +10,10 @@ A list of items and costs is stored under the datum of every game mode, alongsid var/list/purchase_log = new var/datum/mind/uplink_owner = null var/used_TC = 0 + var/offer_time = 15 MINUTES //The time increment per discount offered + var/next_offer_time //The time a discount will next be offered + var/datum/uplink_item/discount_item //The item to be discounted + var/discount_amount //The amount as a percent the item will be discounted by /obj/item/device/uplink/nano_host() return loc @@ -28,10 +24,15 @@ A list of items and costs is stored under the datum of every game mode, alongsid purchase_log = list() world_uplinks += src uses = owner.tcrystals + processing_objects += src /obj/item/device/uplink/Destroy() world_uplinks -= src - ..() + processing_objects -= src + return ..() + +/obj/item/device/uplink/get_item_cost(var/item_type, var/item_cost) + return (discount_item && (item_type == discount_item)) ? max(1, round(item_cost*discount_amount)) : item_cost // HIDDEN UPLINK - Can be stored in anything but the host item has to have a trigger for it. /* How to create an uplink in 3 easy steps! @@ -52,7 +53,6 @@ A list of items and costs is stored under the datum of every game mode, alongsid var/datum/uplink_category/category = 0 // The current category we are in var/exploit_id // Id of the current exploit record we are viewing - // The hidden uplink MUST be inside an obj/item's contents. /obj/item/device/uplink/hidden/New() spawn(2) @@ -62,6 +62,14 @@ A list of items and costs is stored under the datum of every game mode, alongsid nanoui_data = list() update_nano_data() +/obj/item/device/uplink/hidden/process() + if(world.time > next_offer_time) + discount_item = default_uplink_selection.get_random_item(INFINITY) + discount_amount = pick(90;0.9, 80;0.8, 70;0.7, 60;0.6, 50;0.5, 40;0.4, 30;0.3, 20;0.2, 10;0.1) + next_offer_time = world.time + offer_time + update_nano_data() + nanomanager.update_uis(src) + // Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated. /obj/item/device/uplink/hidden/proc/toggle() active = !active @@ -107,6 +115,11 @@ A list of items and costs is stored under the datum of every game mode, alongsid /obj/item/device/uplink/hidden/interact(mob/user) ui_interact(user) +/obj/item/device/uplink/hidden/CanUseTopic() + if(!active) + return STATUS_CLOSE + return ..() + // The purchasing code. /obj/item/device/uplink/hidden/Topic(href, href_list) if(..()) @@ -139,11 +152,14 @@ A list of items and costs is stored under the datum of every game mode, alongsid if(category.can_view(src)) categories[++categories.len] = list("name" = category.name, "ref" = "\ref[category]") nanoui_data["categories"] = categories + nanoui_data["discount_name"] = discount_item ? discount_item.name : "" + nanoui_data["discount_amount"] = (1-discount_amount)*100 + nanoui_data["offer_expiry"] = worldtime2text(next_offer_time) else if(nanoui_menu == 1) var/items[0] for(var/datum/uplink_item/item in category.items) if(item.can_view(src)) - var/cost = item.cost(uses) + var/cost = item.cost(uses, src) if(!cost) cost = "???" items[++items.len] = list("name" = item.name, "description" = replacetext(item.description(), "\n", "
"), "can_buy" = item.can_buy(src), "cost" = cost, "ref" = "\ref[item]") nanoui_data["items"] = items diff --git a/code/game/objects/items/devices/uplink_items.dm b/code/game/objects/items/devices/uplink_items.dm deleted file mode 100644 index 3c4ecc3e19d..00000000000 --- a/code/game/objects/items/devices/uplink_items.dm +++ /dev/null @@ -1,725 +0,0 @@ -var/datum/uplink/uplink = new() - -/datum/uplink - var/list/items_assoc - var/list/datum/uplink_item/items - var/list/datum/uplink_category/categories - -/datum/uplink/New() - items_assoc = list() - items = init_subtypes(/datum/uplink_item) - categories = init_subtypes(/datum/uplink_category) - categories = dd_sortedObjectList(categories) - - for(var/datum/uplink_item/item in items) - if(!item.name) - items -= item - continue - - items_assoc[item.type] = item - - for(var/datum/uplink_category/category in categories) - if(item.category == category.type) - category.items += item - - for(var/datum/uplink_category/category in categories) - category.items = dd_sortedObjectList(category.items) - -/datum/uplink_item - var/name - var/desc - var/item_cost = 0 - var/datum/uplink_category/category // Item category - var/list/datum/antagonist/antag_roles // Antag roles this item is displayed to. If empty, display to all. - -/datum/uplink_item/item - var/path = null - -/datum/uplink_item/New() - ..() - antag_roles = list() - - - -/datum/uplink_item/proc/buy(var/obj/item/device/uplink/U, var/mob/user) - var/extra_args = extra_args(user) - if(!extra_args) - return - - if(!can_buy(U)) - return - - var/cost = cost(U.uses) - - var/goods = get_goods(U, get_turf(user), user, extra_args) - if(!goods) - return - - purchase_log(U) - user.mind.tcrystals -= cost - U.used_TC += cost - return goods - -// Any additional arguments you wish to send to the get_goods -/datum/uplink_item/proc/extra_args(var/mob/user) - return 1 - -/datum/uplink_item/proc/can_buy(obj/item/device/uplink/U) - if(cost(U.uses) > U.uses) - return 0 - - return can_view(U) - -/datum/uplink_item/proc/can_view(obj/item/device/uplink/U) - // Making the assumption that if no uplink was supplied, then we don't care about antag roles - if(!U || !antag_roles.len) - return 1 - - // With no owner, there's no need to check antag status. - if(!U.uplink_owner) - return 0 - - for(var/antag_role in antag_roles) - var/datum/antagonist/antag = all_antag_types[antag_role] - if(antag.is_antagonist(U.uplink_owner)) - return 1 - return 0 - -/datum/uplink_item/proc/cost(var/telecrystals) - return item_cost - -/datum/uplink_item/proc/description() - return desc - -// get_goods does not necessarily return physical objects, it is simply a way to acquire the uplink item without paying -/datum/uplink_item/proc/get_goods(var/obj/item/device/uplink/U, var/loc) - return 0 - -/datum/uplink_item/proc/log_icon() - return - -/datum/uplink_item/proc/purchase_log(obj/item/device/uplink/U) - feedback_add_details("traitor_uplink_items_bought", "[src]") - log_and_message_admins("used \the [U.loc] to buy \a [src]") - U.purchase_log[src] = U.purchase_log[src] + 1 - -datum/uplink_item/dd_SortValue() - return cost(INFINITY) - -/******************************** -* * -* Physical Uplink Entries * -* * -********************************/ -/datum/uplink_item/item/buy(var/obj/item/device/uplink/U, var/mob/user) - var/obj/item/I = ..() - if(!I) - return - - if(istype(I, /list)) - var/list/L = I - if(L.len) I = L[1] - - if(istype(I) && ishuman(user)) - var/mob/living/carbon/human/A = user - A.put_in_any_hand_if_possible(I) - return I - -/datum/uplink_item/item/get_goods(var/obj/item/device/uplink/U, var/loc) - var/obj/item/I = new path(loc) - return I - -/datum/uplink_item/item/description() - if(!desc) - // Fallback description - var/obj/temp = src.path - desc = initial(temp.desc) - return ..() - -/datum/uplink_item/item/log_icon() - var/obj/I = path - return "\icon[I]" - -/************* -* Ammunition * -*************/ -/datum/uplink_item/item/ammo - item_cost = 2 - category = /datum/uplink_category/ammunition - -/datum/uplink_item/item/ammo/a357 - name = ".357" - path = /obj/item/ammo_magazine/a357 - -/datum/uplink_item/item/ammo/mc9mm - name = "9mm" - path = /obj/item/ammo_magazine/mc9mm - -/datum/uplink_item/item/ammo/darts - name = "Darts" - path = /obj/item/ammo_magazine/chemdart - -/datum/uplink_item/item/ammo/sniperammo - name = "14.5mm" - path = /obj/item/weapon/storage/box/sniperammo - -/datum/uplink_item/item/ammo/a10mm - name = "10mm" - path = /obj/item/ammo_magazine/a10mm - -/datum/uplink_item/item/ammo/a762 - name = "7.62mm" - path = /obj/item/ammo_magazine/a762 - -/*************************************** -* Highly Visible and Dangerous Weapons * -***************************************/ -/datum/uplink_item/item/visible_weapons - category = /datum/uplink_category/visible_weapons - -/datum/uplink_item/item/visible_weapons/energy_sword - name = "Energy Sword" - item_cost = 4 - path = /obj/item/weapon/melee/energy/sword - -/datum/uplink_item/item/visible_weapons/dartgun - name = "Dart Gun" - item_cost = 5 - path = /obj/item/weapon/gun/projectile/dartgun - -/datum/uplink_item/item/visible_weapons/crossbow - name = "Energy Crossbow" - item_cost = 5 - path = /obj/item/weapon/gun/energy/crossbow - -/datum/uplink_item/item/visible_weapons/g9mm - name = "Silenced 9mm" - item_cost = 5 - path = /obj/item/weapon/storage/box/syndie_kit/g9mm - -/datum/uplink_item/item/visible_weapons/riggedlaser - name = "Exosuit Rigged Laser" - item_cost = 6 - path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser - -/datum/uplink_item/item/visible_weapons/revolver - name = "Revolver" - item_cost = 6 - path = /obj/item/weapon/gun/projectile/revolver - -/datum/uplink_item/item/visible_weapons/heavysniper - name = "Anti-materiel Rifle" - item_cost = DEFAULT_TELECRYSTAL_AMOUNT - path = /obj/item/weapon/gun/projectile/heavysniper - -//These are for traitors (or other antags, perhaps) to have the option of purchasing some merc gear. -/datum/uplink_item/item/visible_weapons/submachinegun - name = "Submachine Gun" - item_cost = 6 - path = /obj/item/weapon/gun/projectile/automatic/c20r - -/datum/uplink_item/item/visible_weapons/assaultrifle - name = "Assault Rifle" - item_cost = 7 - path = /obj/item/weapon/gun/projectile/automatic/sts35 - -/************************************* -* Stealthy and Inconspicuous Weapons * -*************************************/ -/datum/uplink_item/item/stealthy_weapons - category = /datum/uplink_category/stealthy_weapons - -/datum/uplink_item/item/stealthy_weapons/soap - name = "Subversive Soap" - item_cost = 1 - path = /obj/item/weapon/soap/syndie - -/datum/uplink_item/item/stealthy_weapons/concealed_cane - name = "Concealed Cane Sword" - item_cost = 1 - path = /obj/item/weapon/cane/concealed - -/datum/uplink_item/item/stealthy_weapons/detomatix - name = "Detomatix PDA Cartridge" - item_cost = 3 - path = /obj/item/weapon/cartridge/syndicate - -/datum/uplink_item/item/stealthy_weapons/parapen - name = "Paralysis Pen" - item_cost = 3 - path = /obj/item/weapon/pen/reagent/paralysis - -/datum/uplink_item/item/stealthy_weapons/cigarette_kit - name = "Cigarette Kit" - item_cost = 3 - path = /obj/item/weapon/storage/box/syndie_kit/cigarette - -/datum/uplink_item/item/stealthy_weapons/random_toxin - name = "Random Toxin - Beaker" - item_cost = 3 - path = /obj/item/weapon/storage/box/syndie_kit/toxin - -/******************************* -* Stealth and Camouflage Items * -*******************************/ -/datum/uplink_item/item/stealth_items - category = /datum/uplink_category/stealth_items - -/datum/uplink_item/item/stealth_items/id - name = "Agent ID card" - item_cost = 2 - path = /obj/item/weapon/card/id/syndicate - -/datum/uplink_item/item/stealth_items/syndigaloshes - name = "No-Slip Shoes" - item_cost = 2 - path = /obj/item/clothing/shoes/syndigaloshes - -/datum/uplink_item/item/stealth_items/spy - name = "Bug Kit" - item_cost = 2 - path = /obj/item/weapon/storage/box/syndie_kit/spy - -/datum/uplink_item/item/stealth_items/chameleon_kit - name = "Chameleon Kit" - item_cost = 3 - path = /obj/item/weapon/storage/box/syndie_kit/chameleon - -/datum/uplink_item/item/stealth_items/chameleon_projector - name = "Chameleon-Projector" - item_cost = 4 - path = /obj/item/device/chameleon - -/datum/uplink_item/item/stealth_items/chameleon_projector - name = "Chameleon-Projector" - item_cost = 4 - path = /obj/item/device/chameleon - -/datum/uplink_item/item/stealth_items/voice - name = "Voice Changer" - item_cost = 4 - path = /obj/item/clothing/mask/gas/voice - -/datum/uplink_item/item/stealth_items/camera_floppy - name = "Camera Network Access - Floppy" - item_cost = 6 - path = /obj/item/weapon/disk/file/cameras/syndicate - -/******** -* Armor * -********/ -/datum/uplink_item/item/armor - category = /datum/uplink_category/armor - -/datum/uplink_item/item/armor/combat - name = "Combat Armor Set" - item_cost = 5 - path = /obj/item/weapon/storage/box/syndie_kit/combat_armor - -/datum/uplink_item/item/armor/heavy_vest - name = "Heavy Armor Vest" - item_cost = 4 - path = /obj/item/clothing/suit/storage/vest/heavy/merc - -/******************** -* Devices and Tools * -********************/ -/datum/uplink_item/item/tools - category = /datum/uplink_category/tools - -/datum/uplink_item/item/tools/toolbox - name = "Fully Loaded Toolbox" - item_cost = 1 - path = /obj/item/weapon/storage/toolbox/syndicate - -/datum/uplink_item/item/tools/plastique - name = "C-4 (Destroys walls)" - item_cost = 2 - path = /obj/item/weapon/plastique - -/datum/uplink_item/item/tools/encryptionkey_radio - name = "Encrypted Radio Channel Key" - item_cost = 2 - path = /obj/item/device/encryptionkey/syndicate - -/datum/uplink_item/item/tools/encryptionkey_binary - name = "Binary Translator Key" - item_cost = 3 - path = /obj/item/device/encryptionkey/binary - -/datum/uplink_item/item/tools/emag - name = "Cryptographic Sequencer" - item_cost = 3 - path = /obj/item/weapon/card/emag - -/datum/uplink_item/item/tools/clerical - name = "Morphic Clerical Kit" - item_cost = 3 - path = /obj/item/weapon/storage/box/syndie_kit/clerical - -/datum/uplink_item/item/tools/space_suit - name = "Space Suit" - item_cost = 3 - path = /obj/item/weapon/storage/box/syndie_kit/space - -/datum/uplink_item/item/tools/thermal - name = "Thermal Imaging Glasses" - item_cost = 3 - path = /obj/item/clothing/glasses/thermal/syndi - -/datum/uplink_item/item/tools/powersink - name = "Powersink (DANGER!)" - item_cost = 5 - path = /obj/item/device/powersink - -/datum/uplink_item/item/tools/ai_module - name = "Hacked AI Upload Module" - item_cost = 7 - path = /obj/item/weapon/aiModule/syndicate - -/datum/uplink_item/item/tools/supply_beacon - name = "Hacked Supply Beacon (DANGER!)" - item_cost = 7 - path = /obj/item/supply_beacon - -/datum/uplink_item/item/tools/teleporter - name = "Teleporter Circuit Board" - item_cost = 20 - path = /obj/item/weapon/circuitboard/teleporter - -/datum/uplink_item/item/tools/teleporter/New() - ..() - antag_roles = list(MODE_MERCENARY) - -/datum/uplink_item/item/tools/money - name = "Operations Funding" - item_cost = 3 - path = /obj/item/weapon/storage/secure/briefcase/money - desc = "A briefcase with 10,000 untraceable thalers for funding your sneaky activities." - -/datum/uplink_item/item/tools/crystal - name = "Tradable Crystal" - item_cost = 1 - path = /obj/item/device/telecrystal - desc = "A telecrystal that can be transferred from one user to another. Be sure not to give it to just anyone." - -/*********** -* Implants * -***********/ -/datum/uplink_item/item/implants - category = /datum/uplink_category/implants - -/datum/uplink_item/item/implants/imp_freedom - name = "Freedom Implant" - item_cost = 3 - path = /obj/item/weapon/storage/box/syndie_kit/imp_freedom - -/datum/uplink_item/item/implants/imp_compress - name = "Compressed Matter Implant" - item_cost = 4 - path = /obj/item/weapon/storage/box/syndie_kit/imp_compress - -/datum/uplink_item/item/implants/imp_explosive - name = "Explosive Implant (DANGER!)" - item_cost = 6 - path = /obj/item/weapon/storage/box/syndie_kit/imp_explosive - -/datum/uplink_item/item/implants/imp_uplink - name = "Uplink Implant" //Original name: "Uplink Implant (Contains 5 Telecrystals)" - item_cost = 5 //Original cost: 10 - path = /obj/item/weapon/storage/box/syndie_kit/imp_uplink - -/********** -* Medical * -**********/ -/datum/uplink_item/item/medical - category = /datum/uplink_category/medical - -/datum/uplink_item/item/medical/sinpockets - name = "Box of Sin-Pockets" - item_cost = 1 - path = /obj/item/weapon/storage/box/sinpockets - -/datum/uplink_item/item/medical/surgery - name = "Surgery kit" - item_cost = 6 - path = /obj/item/weapon/storage/firstaid/surgery - -/datum/uplink_item/item/medical/combat - name = "Combat medical kit" - item_cost = 6 - path = /obj/item/weapon/storage/firstaid/combat - -/******************* -* Hardsuit Modules * -*******************/ -/datum/uplink_item/item/hardsuit_modules - category = /datum/uplink_category/hardsuit_modules - -/datum/uplink_item/item/hardsuit_modules/thermal - name = "Thermal Scanner" - item_cost = 2 - path = /obj/item/rig_module/vision/thermal - -/datum/uplink_item/item/hardsuit_modules/energy_net - name = "Net Projector" - item_cost = 3 - path = /obj/item/rig_module/fabricator/energy_net - -/datum/uplink_item/item/ewar_voice - name = "Electrowarfare Suite and Voice Synthesiser" - item_cost = 4 - path = /obj/item/weapon/storage/box/syndie_kit/ewar_voice - -/datum/uplink_item/item/hardsuit_modules/maneuvering_jets - name = "Maneuvering Jets" - item_cost = 4 - path = /obj/item/rig_module/maneuvering_jets - -/datum/uplink_item/item/hardsuit_modules/egun - name = "Mounted Energy Gun" - item_cost = 6 - path = /obj/item/rig_module/mounted/egun - -/datum/uplink_item/item/hardsuit_modules/power_sink - name = "Power Sink" - item_cost = 6 - path = /obj/item/rig_module/power_sink - -/datum/uplink_item/item/hardsuit_modules/laser_canon - name = "Mounted Laser Cannon" - item_cost = 8 - path = /obj/item/rig_module/mounted - -/*********** -* Grenades * -************/ -/datum/uplink_item/item/grenades - category = /datum/uplink_category/grenades - -/datum/uplink_item/item/grenades/anti_photon - name = "5xPhoton Disruption Grenades" - item_cost = 2 - path = /obj/item/weapon/storage/box/anti_photons - -/datum/uplink_item/item/grenades/emp - name = "5xEMP Grenades" - item_cost = 3 - path = /obj/item/weapon/storage/box/emps - -/datum/uplink_item/item/grenades/smoke - name = "5xSmoke Grenades" - item_cost = 2 - path = /obj/item/weapon/storage/box/smokes - -/************ -* Badassery * -************/ -/datum/uplink_item/item/badassery - category = /datum/uplink_category/badassery - -/datum/uplink_item/item/badassery/balloon - name = "For showing that You Are The BOSS (Useless Balloon)" - item_cost = DEFAULT_TELECRYSTAL_AMOUNT - path = /obj/item/toy/syndicateballoon - -/datum/uplink_item/item/badassery/balloon/NT - name = "For showing that you love NT SOO much (Useless Balloon)" - path = /obj/item/toy/nanotrasenballoon - -/************** -* Random Item * -**************/ -/datum/uplink_item/item/badassery/random_one - name = "Random Item" - desc = "Buys you one random item." - -/datum/uplink_item/item/badassery/random_one/buy(var/obj/item/device/uplink/U, var/mob/user) - var/datum/uplink_item/item = default_uplink_selection.get_random_item(U.uses) - return item.buy(U, user) - -/datum/uplink_item/item/badassery/random_one/can_buy(obj/item/device/uplink/U) - return default_uplink_selection.get_random_item(U.uses, U) != null - -/datum/uplink_item/item/badassery/random_many - name = "Random Items" - desc = "Buys you as many random items you can afford. Convenient packaging NOT included." - -/datum/uplink_item/item/badassery/random_many/cost(var/telecrystals) - return max(1, telecrystals) - -/datum/uplink_item/item/badassery/random_many/get_goods(var/obj/item/device/uplink/U, var/loc) - var/list/bought_items = list() - for(var/datum/uplink_item/UI in get_random_uplink_items(U, U.uses, loc)) - UI.purchase_log(U) - var/obj/item/I = UI.get_goods(U, loc) - if(istype(I)) - bought_items += I - - return bought_items - -/datum/uplink_item/item/badassery/random_many/purchase_log(obj/item/device/uplink/U) - feedback_add_details("traitor_uplink_items_bought", "[src]") - log_and_message_admins("used \the [U.loc] to buy \a [src]") - -/**************** -* Surplus Crate * -****************/ -/datum/uplink_item/item/badassery/surplus - name = "Surplus Crate" - item_cost = 40 - var/item_worth = 60 - var/icon - -/datum/uplink_item/item/badassery/surplus/New() - ..() - antag_roles = list(MODE_MERCENARY) - desc = "A crate containing [item_worth] telecrystal\s worth of surplus leftovers." - -/datum/uplink_item/item/badassery/surplus/get_goods(var/obj/item/device/uplink/U, var/loc) - var/obj/structure/largecrate/C = new(loc) - var/random_items = get_random_uplink_items(null, item_worth, C) - for(var/datum/uplink_item/I in random_items) - I.purchase_log(U) - I.get_goods(U, C) - - return C - -/datum/uplink_item/item/badassery/surplus/log_icon() - if(!icon) - var/obj/structure/largecrate/C = /obj/structure/largecrate - icon = image(initial(C.icon), initial(C.icon_state)) - - return "\icon[icon]" - -/******************************** -* * -* Abstract Uplink Entries * -* * -********************************/ -var/image/default_abstract_uplink_icon -/datum/uplink_item/abstract/log_icon() - if(!default_abstract_uplink_icon) - default_abstract_uplink_icon = image('icons/obj/pda.dmi', "pda-syn") - - return "\icon[default_abstract_uplink_icon]" - -/**************** -* Announcements * -*****************/ -/datum/uplink_item/abstract/announcements - category = /datum/uplink_category/services - -/datum/uplink_item/abstract/announcements/buy(var/obj/item/device/uplink/U, var/mob/user) - . = ..() - if(.) - log_and_message_admins("has triggered a falsified [src]", user) - -/datum/uplink_item/abstract/announcements/fake_centcom - item_cost = DEFAULT_TELECRYSTAL_AMOUNT / 2 - -/datum/uplink_item/abstract/announcements/fake_centcom/New() - ..() - name = "[command_name()] Update Announcement" - desc = "Causes a falsified [command_name()] Update. Triggers immediately after supplying additional data." - antag_roles = list(MODE_MERCENARY) - -/datum/uplink_item/abstract/announcements/fake_centcom/get_goods(var/obj/item/device/uplink/U, var/loc, var/mob/user, var/list/args) - command_announcement.Announce(args.["message"], args.["title"]) - return 1 - -/datum/uplink_item/abstract/announcements/fake_crew_arrival - name = "Crew Arrival Announcement/Records" - desc = "Creates a fake crew arrival announcement as well as fake crew records, using your current appearance (including held items!) and worn id card. Trigger with care!" - item_cost = 4 - -/datum/uplink_item/abstract/announcements/fake_crew_arrival/New() - ..() - antag_roles = list(MODE_MERCENARY) - -/datum/uplink_item/abstract/announcements/fake_crew_arrival/get_goods(var/obj/item/device/uplink/U, var/loc, var/mob/user, var/list/args) - if(!user) - return 0 - - var/obj/item/weapon/card/id/I = user.GetIdCard() - var/datum/data/record/random_general_record - var/datum/data/record/random_medical_record - if(data_core.general.len) - random_general_record = pick(data_core.general) - random_medical_record = find_medical_record("id", random_general_record.fields["id"]) - - var/datum/data/record/general = data_core.CreateGeneralRecord(user) - if(I) - general.fields["age"] = I.age - general.fields["rank"] = I.assignment - general.fields["real_rank"] = I.assignment - general.fields["name"] = I.registered_name - general.fields["sex"] = I.sex - else - var/mob/living/carbon/human/H - if(istype(user,/mob/living/carbon/human)) - H = user - general.fields["age"] = H.age - else - general.fields["age"] = initial(H.age) - var/assignment = GetAssignment(user) - general.fields["rank"] = assignment - general.fields["real_rank"] = assignment - general.fields["name"] = user.real_name - general.fields["sex"] = capitalize(user.gender) - - general.fields["species"] = user.get_species() - var/datum/data/record/medical = data_core.CreateMedicalRecord(general.fields["name"], general.fields["id"]) - data_core.CreateSecurityRecord(general.fields["name"], general.fields["id"]) - - if(!random_general_record) - general.fields["citizenship"] = random_general_record.fields["citizenship"] - general.fields["faction"] = random_general_record.fields["faction"] - general.fields["fingerprint"] = random_general_record.fields["fingerprint"] - general.fields["home_system"] = random_general_record.fields["home_system"] - general.fields["religion"] = random_general_record.fields["religion"] - if(random_medical_record) - medical.fields["b_type"] = random_medical_record.fields["b_type"] - medical.fields["b_dna"] = random_medical_record.fields["b_type"] - - if(I) - general.fields["fingerprint"] = I.fingerprint_hash - medical.fields["b_type"] = I.blood_type - medical.fields["b_dna"] = I.dna_hash - - AnnounceArrivalSimple(general.fields["name"], general.fields["rank"]) - return 1 - -/datum/uplink_item/abstract/announcements/fake_ion_storm - name = "Ion Storm Announcement" - desc = "Interferes with the station's ion sensors. Triggers immediately upon investment." - item_cost = 1 - -/datum/uplink_item/abstract/announcements/fake_ion_storm/get_goods(var/obj/item/device/uplink/U, var/loc) - ion_storm_announcement() - return 1 - -/datum/uplink_item/abstract/announcements/fake_radiation - name = "Radiation Storm Announcement" - desc = "Interferes with the station's radiation sensors. Triggers immediately upon investment." - item_cost = 3 - -/datum/uplink_item/abstract/announcements/fake_radiation/get_goods(var/obj/item/device/uplink/U, var/loc) - var/datum/event_meta/EM = new(EVENT_LEVEL_MUNDANE, "Fake Radiation Storm", add_to_queue = 0) - new/datum/event/radiation_storm/syndicate(EM) - return 1 - - -/**************** -* Support procs * -****************/ -/proc/get_random_uplink_items(var/obj/item/device/uplink/U, var/remaining_TC, var/loc) - var/list/bought_items = list() - while(remaining_TC) - var/datum/uplink_item/I = default_uplink_selection.get_random_item(remaining_TC, U, bought_items) - if(!I) - break - bought_items += I - remaining_TC -= I.cost(remaining_TC) - - return bought_items diff --git a/code/game/objects/items/devices/uplink_random_lists.dm b/code/game/objects/items/devices/uplink_random_lists.dm index 4359918ceea..00860eb30c3 100644 --- a/code/game/objects/items/devices/uplink_random_lists.dm +++ b/code/game/objects/items/devices/uplink_random_lists.dm @@ -27,7 +27,7 @@ var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_ra if(!prob(RI.keep_probability)) continue var/datum/uplink_item/I = uplink.items_assoc[RI.uplink_item] - if(I.cost(telecrystals) > telecrystals) + if(I.cost(telecrystals, U) > telecrystals) continue if(bought_items && (I in bought_items) && !prob(RI.reselect_probability)) continue @@ -38,7 +38,7 @@ var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_ra /datum/uplink_random_selection/default/New() ..() - items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/g9mm) + items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/silenced_45) items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/mc9mm) items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/revolver) items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/a357) diff --git a/code/game/objects/items/glassjar.dm b/code/game/objects/items/glassjar.dm index 0a88d7890ff..54062ff8530 100644 --- a/code/game/objects/items/glassjar.dm +++ b/code/game/objects/items/glassjar.dm @@ -72,7 +72,8 @@ return var/obj/item/weapon/spacecash/S = W user.visible_message("[user] puts [S.worth] [S.worth > 1 ? "thalers" : "thaler"] into \the [src].") - user.removeItem(S, src) + user.drop_from_inventory(S) + S.loc = src update_icon() /obj/item/glass_jar/update_icon() // Also updates name and desc diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index eaa34333432..28f3a1def6a 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -15,7 +15,7 @@ if(!istype(user)) var/mob/living/temp = user if(istype(temp)) - temp.removeItem(src, force = 1) + temp.drop_from_inventory(src) qdel(src) return diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index e19ee4bd8f6..11c312048db 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -118,7 +118,7 @@ B.loc = get_turf(src) user << "You armed the robot frame." if (user.get_inactive_hand()==src) - user.removeItem(src) + user.remove_from_mob(src) user.put_in_inactive_hand(B) qdel(src) else diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 451b2c41af1..d47df19f196 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -2,8 +2,8 @@ name = "medical pack" singular_name = "medical pack" icon = 'icons/obj/items.dmi' - amount = 5 - max_amount = 5 + amount = 10 + max_amount = 10 w_class = 2 throw_speed = 4 throw_range = 20 @@ -24,6 +24,10 @@ var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) + if(!affecting) + user << "No body part there to work on!" + return 1 + if(affecting.organ_tag == BP_HEAD) if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space)) user << "You can't apply [src] through [H.head]!" @@ -33,7 +37,7 @@ user << "You can't apply [src] through [H.wear_suit]!" return 1 - if(affecting.status & ORGAN_ROBOT) + if(affecting.robotic >= ORGAN_ROBOT) user << "This isn't useful at all on a robotic limb.." return 1 @@ -65,24 +69,43 @@ var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) if(affecting.open == 0) - if(!affecting.bandage()) + if(affecting.is_bandaged()) user << "The wounds on [M]'s [affecting.name] have already been bandaged." return 1 else + user.visible_message("\The [user] starts treating [M]'s [affecting.name].", \ + "You start treating [M]'s [affecting.name]." ) + var/used = 0 for (var/datum/wound/W in affecting.wounds) if (W.internal) continue + if(W.bandaged) + continue + if(used == amount) + break + if(!do_mob(user, M, W.damage/5)) + user << "You must stand still to bandage wounds." + break + if (W.current_stage <= W.max_bleeding_stage) - user.visible_message("\The [user] bandages [W.desc] on [M]'s [affecting.name].", \ - "You bandage [W.desc] on [M]'s [affecting.name]." ) + user.visible_message("\The [user] bandages \a [W.desc] on [M]'s [affecting.name].", \ + "You bandage \a [W.desc] on [M]'s [affecting.name]." ) //H.add_side_effect("Itch") - else if (istype(W,/datum/wound/bruise)) - user.visible_message("\The [user] places a bruise patch over [W.desc] on [M]'s [affecting.name].", \ - "You place a bruise patch over [W.desc] on [M]'s [affecting.name]." ) + else if (W.damage_type == BRUISE) + user.visible_message("\The [user] places a bruise patch over \a [W.desc] on [M]'s [affecting.name].", \ + "You place a bruise patch over \a [W.desc] on [M]'s [affecting.name]." ) else - user.visible_message("\The [user] places a bandaid over [W.desc] on [M]'s [affecting.name].", \ - "You place a bandaid over [W.desc] on [M]'s [affecting.name]." ) - use(1) + user.visible_message("\The [user] places a bandaid over \a [W.desc] on [M]'s [affecting.name].", \ + "You place a bandaid over \a [W.desc] on [M]'s [affecting.name]." ) + W.bandage() + used++ + affecting.update_damages() + if(used == amount) + if(affecting.is_bandaged()) + user << "\The [src] is used up." + else + user << "\The [src] is used up, but there are more wounds to treat on \the [affecting.name]." + use(used) else if (can_operate(H)) //Checks if mob is lying down on table for surgery if (do_surgery(H,user,src)) @@ -108,13 +131,19 @@ var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) if(affecting.open == 0) - if(!affecting.salve()) + if(affecting.is_salved()) user << "The wounds on [M]'s [affecting.name] have already been salved." return 1 else - user.visible_message("[user] salves wounds on [M]'s [affecting.name].", \ - "You salve wounds on [M]'s [affecting.name]." ) + user.visible_message("\The [user] starts salving wounds on [M]'s [affecting.name].", \ + "You start salving the wounds on [M]'s [affecting.name]." ) + if(!do_mob(user, M, 10)) + user << "You must stand still to salve wounds." + return 1 + user.visible_message("[user] salved wounds on [M]'s [affecting.name].", \ + "You salved wounds on [M]'s [affecting.name]." ) use(1) + affecting.salve() else if (can_operate(H)) //Checks if mob is lying down on table for surgery if (do_surgery(H,user,src)) @@ -127,7 +156,7 @@ singular_name = "advanced trauma kit" desc = "An advanced trauma kit for severe injuries." icon_state = "traumakit" - heal_brute = 12 + heal_brute = 0 origin_tech = list(TECH_BIO = 1) /obj/item/stack/medical/advanced/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob) @@ -139,29 +168,43 @@ var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) if(affecting.open == 0) - var/bandaged = affecting.bandage() - var/disinfected = affecting.disinfect() - - if(!(bandaged || disinfected)) + if(affecting.is_bandaged() && affecting.is_disinfected()) user << "The wounds on [M]'s [affecting.name] have already been treated." return 1 else + user.visible_message("\The [user] starts treating [M]'s [affecting.name].", \ + "You start treating [M]'s [affecting.name]." ) + var/used = 0 for (var/datum/wound/W in affecting.wounds) if (W.internal) continue + if (W.bandaged && W.disinfected) + continue + if(used == amount) + break + if(!do_mob(user, M, W.damage/5)) + user << "You must stand still to bandage wounds." + break if (W.current_stage <= W.max_bleeding_stage) - user.visible_message("\The [user] cleans [W.desc] on [M]'s [affecting.name] and seals the edges with bioglue.", \ - "You clean and seal [W.desc] on [M]'s [affecting.name]." ) - //H.add_side_effect("Itch") - else if (istype(W,/datum/wound/bruise)) - user.visible_message("\The [user] places a medical patch over [W.desc] on [M]'s [affecting.name].", \ - "You place a medical patch over [W.desc] on [M]'s [affecting.name]." ) + user.visible_message("\The [user] cleans \a [W.desc] on [M]'s [affecting.name] and seals the edges with bioglue.", \ + "You clean and seal \a [W.desc] on [M]'s [affecting.name]." ) + else if (W.damage_type == BRUISE) + user.visible_message("\The [user] places a medical patch over \a [W.desc] on [M]'s [affecting.name].", \ + "You place a medical patch over \a [W.desc] on [M]'s [affecting.name]." ) else - user.visible_message("\The [user] smears some bioglue over [W.desc] on [M]'s [affecting.name].", \ - "You smear some bioglue over [W.desc] on [M]'s [affecting.name]." ) - if (bandaged) - affecting.heal_damage(heal_brute,0) - use(1) + user.visible_message("\The [user] smears some bioglue over \a [W.desc] on [M]'s [affecting.name].", \ + "You smear some bioglue over \a [W.desc] on [M]'s [affecting.name]." ) + W.bandage() + W.disinfect() + W.heal_damage(heal_brute) + used++ + affecting.update_damages() + if(used == amount) + if(affecting.is_bandaged()) + user << "\The [src] is used up." + else + user << "\The [src] is used up, but there are more wounds to treat on \the [affecting.name]." + use(used) else if (can_operate(H)) //Checks if mob is lying down on table for surgery if (do_surgery(H,user,src)) @@ -174,7 +217,7 @@ singular_name = "advanced burn kit" desc = "An advanced treatment kit for severe burns." icon_state = "burnkit" - heal_burn = 12 + heal_burn = 0 origin_tech = list(TECH_BIO = 1) @@ -187,14 +230,20 @@ var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) if(affecting.open == 0) - if(!affecting.salve()) + if(affecting.is_salved()) user << "The wounds on [M]'s [affecting.name] have already been salved." return 1 else + user.visible_message("\The [user] starts salving wounds on [M]'s [affecting.name].", \ + "You start salving the wounds on [M]'s [affecting.name]." ) + if(!do_mob(user, M, 10)) + user << "You must stand still to salve wounds." + return 1 user.visible_message( "[user] covers wounds on [M]'s [affecting.name] with regenerative membrane.", \ "You cover wounds on [M]'s [affecting.name] with regenerative membrane." ) affecting.heal_damage(0,heal_burn) use(1) + affecting.salve() else if (can_operate(H)) //Checks if mob is lying down on table for surgery if (do_surgery(H,user,src)) diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index a9ec0521023..5b85763b324 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -28,7 +28,7 @@ var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting) if(S.open == 1) - if (S && (S.status & ORGAN_ROBOT)) + if (S && (S.robotic >= ORGAN_ROBOT)) if(S.get_damage()) S.heal_damage(15, 15, robo_repair = 1) H.updatehealth() diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index a99684c73b9..83ce6d3f49f 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -187,7 +187,7 @@ amount -= used if (amount <= 0) if(usr) - usr.removeItem(src) + usr.remove_from_mob(src) qdel(src) //should be safe to qdel immediately since if someone is still using this stack it will persist for a little while longer return 1 else diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index 9926a14330e..669c32955f6 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -4,6 +4,7 @@ * Grass * Wood * Carpet + * Blue Carpet * Linoleum */ @@ -70,6 +71,12 @@ throw_range = 20 flags = 0 +/obj/item/stack/tile/carpet/blue + name = "blue carpet" + singular_name = "blue carpet" + desc = "A piece of blue carpet. It is the same size as a normal floor tile!" + icon_state = "tile-bluecarpet" + /obj/item/stack/tile/floor name = "floor tile" singular_name = "floor tile" diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index 34181486e49..1d171d9dbee 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -9,11 +9,15 @@ /obj/item/trash/raisins name = "\improper 4no raisins" - icon_state= "4no_raisins" + icon_state = "4no_raisins" /obj/item/trash/candy name = "candy" - icon_state= "candy" + icon_state = "candy" + +/obj/item/trash/candy/proteinbar + name = "protein bar" + icon_state = "proteinbar" /obj/item/trash/cheesie name = "\improper Cheesie Honkers" diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index a7738cd3295..80080220e92 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -51,7 +51,8 @@ if((stored_matter + 10) > 30) user << "The RCD can't hold any more matter-units." return - user.deleteItem(W) + user.drop_from_inventory(W) + qdel(W) stored_matter += 10 playsound(src.loc, 'sound/machines/click.ogg', 50, 1) user << "The RCD now holds [stored_matter]/30 matter-units." diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 17e9d35ab95..6d1a2eaa3dc 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -68,6 +68,7 @@ icon_state = "emag" item_state = "card-id" origin_tech = list(TECH_MAGNET = 2, TECH_ILLEGAL = 2) + var/default_uses = 10 var/uses = 10 /obj/item/weapon/card/emag/resolve_attackby(atom/A, mob/user) @@ -87,6 +88,12 @@ qdel(src) return 1 +/obj/item/weapon/card/emag/attackby(obj/item/O as obj, mob/user as mob) + if(istype(O, /obj/item/device/telecrystal)) + src.uses += default_uses/2 //Adds half the default amount of uses which is more than you get per TC when buying, as to balance the utility of having multiple emags vs one heavily usable one + usr << "You add \the [O] to \the [src]. Increasing the uses of \the [src] to [uses]." + qdel(O) + /obj/item/weapon/card/id name = "identification card" diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index d951333ec92..4772063b4c7 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -156,7 +156,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/mob/living/M = loc if (!nomessage) M << "Your [name] goes out." - M.removeItem(src) //un-equip it so the overlays can update + M.remove_from_mob(src) //un-equip it so the overlays can update M.update_inv_wear_mask(0) M.update_inv_l_hand(0) M.update_inv_r_hand(1) diff --git a/code/game/objects/items/weapons/circuitboards/frame.dm b/code/game/objects/items/weapons/circuitboards/frame.dm index 30be1d52f7b..3acb2de7558 100644 --- a/code/game/objects/items/weapons/circuitboards/frame.dm +++ b/code/game/objects/items/weapons/circuitboards/frame.dm @@ -36,6 +36,12 @@ board_type = "atm" matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) +/obj/item/weapon/circuitboard/request + name = T_BOARD("reques console") + build_path = /obj/machinery/requests_console + board_type = "request" + matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) + //Alarm /obj/item/weapon/circuitboard/firealarm @@ -70,6 +76,18 @@ board_type = "holopad" matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) +/obj/item/weapon/circuitboard/scanner_console + name = T_BOARD("body scanner console") + build_path = /obj/machinery/body_scanconsole + board_type = "console" + origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) + +/obj/item/weapon/circuitboard/sleeper_console + name = T_BOARD("sleeper console") + build_path = /obj/machinery/sleep_console + board_type = "console" + origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) + //Machine /obj/item/weapon/circuitboard/photocopier @@ -78,10 +96,10 @@ board_type = "photocopier" matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) req_components = list( - "/obj/item/weapon/stock_parts/scanning_module" = 1, - "/obj/item/weapon/stock_parts/motor" = 1, - "/obj/item/weapon/stock_parts/micro_laser" = 1, - "/obj/item/weapon/stock_parts/matter_bin" = 1) + /obj/item/weapon/stock_parts/scanning_module = 1, + /obj/item/weapon/stock_parts/motor = 1, + /obj/item/weapon/stock_parts/micro_laser = 1, + /obj/item/weapon/stock_parts/matter_bin = 1) /obj/item/weapon/circuitboard/fax name = T_BOARD("fax") @@ -89,19 +107,19 @@ board_type = "fax" matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) req_components = list( - "/obj/item/weapon/stock_parts/scanning_module" = 1, - "/obj/item/weapon/stock_parts/motor" = 1, - "/obj/item/weapon/stock_parts/micro_laser" = 1, - "/obj/item/weapon/stock_parts/matter_bin" = 1) + /obj/item/weapon/stock_parts/scanning_module = 1, + /obj/item/weapon/stock_parts/motor = 1, + /obj/item/weapon/stock_parts/micro_laser = 1, + /obj/item/weapon/stock_parts/matter_bin = 1) /obj/item/weapon/circuitboard/conveyor name = T_BOARD("conveyor") build_path = /obj/machinery/conveyor board_type = "conveyor" req_components = list( - "/obj/item/weapon/stock_parts/gear" = 2, - "/obj/item/weapon/stock_parts/motor" = 2, - "/obj/item/stack/cable_coil" = 5) + /obj/item/weapon/stock_parts/gear = 2, + /obj/item/weapon/stock_parts/motor = 2, + /obj/item/stack/cable_coil = 5) /obj/item/weapon/circuitboard/microwave name = T_BOARD("microwave") @@ -109,29 +127,17 @@ board_type = "microwave" matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) req_components = list( - "/obj/item/weapon/stock_parts/console_screen" = 1, - "/obj/item/weapon/stock_parts/motor" = 1, - "/obj/item/weapon/stock_parts/capacitor" = 1) - -/obj/item/weapon/circuitboard/vending - name = T_BOARD("vending") - build_path = /obj/machinery/vending - board_type = "vending" - matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) - req_components = list( - "/obj/item/weapon/stock_parts/console_screen" = 1, - "/obj/item/weapon/stock_parts/motor" = 2, - "/obj/item/weapon/stock_parts/spring" = 2, - "/obj/item/stack/material/glass/reinforced" = 2) + /obj/item/weapon/stock_parts/console_screen = 1, + /obj/item/weapon/stock_parts/motor = 1, + /obj/item/weapon/stock_parts/capacitor = 1) /obj/item/weapon/circuitboard/recharger name = T_BOARD("recharger") build_path = /obj/machinery/recharger board_type = "recharger" - matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) req_components = list( - "/obj/item/weapon/stock_parts/capacitor" = 1, - "/obj/item/stack/cable_coil" = 5) + /obj/item/weapon/stock_parts/capacitor = 1, + /obj/item/stack/cable_coil = 5) /obj/item/weapon/circuitboard/recharger/wrecharger name = T_BOARD("wall recharger") @@ -144,18 +150,78 @@ board_type = "washing" matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) req_components = list( - "/obj/item/weapon/stock_parts/motor" = 1, - "/obj/item/weapon/stock_parts/gear" = 2) + /obj/item/weapon/stock_parts/motor = 1, + /obj/item/weapon/stock_parts/gear = 2) /obj/item/weapon/circuitboard/grinder name = T_BOARD("reagent grinder") build_path = /obj/machinery/reagentgrinder board_type = "grinder" - matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) req_components = list( - "/obj/item/weapon/stock_parts/motor" = 1, - "/obj/item/weapon/stock_parts/gear" = 1, - "/obj/item/weapon/reagent_containers/glass/beaker/large" = 1) + /obj/item/weapon/stock_parts/motor = 1, + /obj/item/weapon/stock_parts/gear = 1, + /obj/item/weapon/reagent_containers/glass/beaker/large = 1) + +/obj/item/weapon/circuitboard/teleporter_hub + name = T_BOARD("teleporter hub") + build_path = /obj/machinery/teleport/hub + board_type = "teleporter_hub" +// origin_tech = list(TECH_DATA = 2, TECH_BLUESPACE = 4) + req_components = list( + /obj/item/weapon/stock_parts/scanning_module = 4, + /obj/item/weapon/stock_parts/micro_laser = 4, + /obj/item/stack/cable_coil = 10) + +/obj/item/weapon/circuitboard/teleporter_station + name = T_BOARD("teleporter station") + build_path = /obj/machinery/teleport/station + board_type = "teleporter_station" +// origin_tech = list(TECH_DATA = 2, TECH_BLUESPACE = 3) + req_components = list( + /obj/item/weapon/stock_parts/console_screen = 1, + /obj/item/weapon/stock_parts/capacitor = 2, + /obj/item/stack/cable_coil = 10) + +/obj/item/weapon/circuitboard/body_scanner + name = T_BOARD("body scanner") + build_path = /obj/machinery/bodyscanner + board_type = "medpod" + origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) + req_components = list( + /obj/item/weapon/stock_parts/scanning_module = 3, + /obj/item/stack/material/glass/reinforced = 2) + +/obj/item/weapon/circuitboard/sleeper + name = T_BOARD("sleeper") + build_path = /obj/machinery/sleeper + board_type = "medpod" + origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) + req_components = list( + /obj/item/weapon/stock_parts/scanning_module = 1, + /obj/item/weapon/reagent_containers/glass/beaker = 3, + /obj/item/weapon/reagent_containers/syringe = 3, + /obj/item/stack/material/glass/reinforced = 2) + +/obj/item/weapon/circuitboard/dna_analyzer + name = T_BOARD("dna analyzer") + build_path = /obj/machinery/dnaforensics + board_type = "dna_analyzer" + origin_tech = list(TECH_MAGNET = 4, TECH_BIO = 2, TECH_DATA = 2) + req_components = list( + /obj/item/weapon/stock_parts/scanning_module = 2, + /obj/item/weapon/stock_parts/micro_laser = 1, + /obj/item/weapon/stock_parts/console_screen = 1) + +/obj/item/weapon/circuitboard/mass_driver + name = T_BOARD("mass driver") + build_path = /obj/machinery/mass_driver + board_type = "massdriver" + req_components = list( + /obj/item/weapon/stock_parts/gear = 2, + /obj/item/weapon/stock_parts/motor = 2, + /obj/item/weapon/stock_parts/capacitor = 1, + /obj/item/weapon/stock_parts/spring = 1, + /obj/item/stack/cable_coil = 5) //for testing - If this is still in when I commit, someone shoot me. --leaving in for now, shouldn't be able to get these on station anyways. /obj/item/weapon/storage/box/frame_parts @@ -175,7 +241,6 @@ new /obj/item/weapon/circuitboard/photocopier( src ) new /obj/item/weapon/circuitboard/fax( src ) new /obj/item/weapon/circuitboard/microwave( src ) - new /obj/item/weapon/circuitboard/vending( src ) new /obj/item/weapon/circuitboard/washing( src ) new /obj/item/weapon/stock_parts/scanning_module( src ) new /obj/item/weapon/stock_parts/motor( src ) diff --git a/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm b/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm index 65949ae338b..716e763515c 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm @@ -1,5 +1,5 @@ #ifndef T_BOARD -#error T_BOARD macro is not defined but we need it! +#error T_BOARD macro is not defined but we need it! #endif /obj/item/weapon/circuitboard/biogenerator @@ -8,5 +8,5 @@ board_type = "machine" origin_tech = list(TECH_DATA = 2) req_components = list( - "/obj/item/weapon/stock_parts/matter_bin" = 1, - "/obj/item/weapon/stock_parts/manipulator" = 1) \ No newline at end of file + /obj/item/weapon/stock_parts/matter_bin = 1, + /obj/item/weapon/stock_parts/manipulator = 1) \ No newline at end of file diff --git a/code/game/objects/items/weapons/circuitboards/machinery/cloning.dm b/code/game/objects/items/weapons/circuitboards/machinery/cloning.dm index b80a3abd34a..a1edb3f4646 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/cloning.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/cloning.dm @@ -1,5 +1,5 @@ #ifndef T_BOARD -#error T_BOARD macro is not defined but we need it! +#error T_BOARD macro is not defined but we need it! #endif /obj/item/weapon/circuitboard/clonepod @@ -8,10 +8,10 @@ board_type = "machine" origin_tech = list(TECH_DATA = 3, TECH_BIO = 3) req_components = list( - "/obj/item/stack/cable_coil" = 2, - "/obj/item/weapon/stock_parts/scanning_module" = 2, - "/obj/item/weapon/stock_parts/manipulator" = 2, - "/obj/item/weapon/stock_parts/console_screen" = 1) + /obj/item/stack/cable_coil = 2, + /obj/item/weapon/stock_parts/scanning_module = 2, + /obj/item/weapon/stock_parts/manipulator = 2, + /obj/item/weapon/stock_parts/console_screen = 1) /obj/item/weapon/circuitboard/clonescanner name = T_BOARD("cloning scanner") @@ -19,8 +19,8 @@ board_type = "machine" origin_tech = list(TECH_DATA = 2, TECH_BIO = 2) req_components = list( - "/obj/item/weapon/stock_parts/scanning_module" = 1, - "/obj/item/weapon/stock_parts/manipulator" = 1, - "/obj/item/weapon/stock_parts/micro_laser" = 1, - "/obj/item/weapon/stock_parts/console_screen" = 1, - "/obj/item/stack/cable_coil" = 2) + /obj/item/weapon/stock_parts/scanning_module = 1, + /obj/item/weapon/stock_parts/manipulator = 1, + /obj/item/weapon/stock_parts/micro_laser = 1, + /obj/item/weapon/stock_parts/console_screen = 1, + /obj/item/stack/cable_coil = 2) diff --git a/code/game/objects/items/weapons/circuitboards/machinery/jukebox.dm b/code/game/objects/items/weapons/circuitboards/machinery/jukebox.dm new file mode 100644 index 00000000000..4b6296c886c --- /dev/null +++ b/code/game/objects/items/weapons/circuitboards/machinery/jukebox.dm @@ -0,0 +1,13 @@ +#ifndef T_BOARD +#error T_BOARD macro is not defined but we need it! +#endif + +/obj/item/weapon/circuitboard/jukebox + name = T_BOARD("jukebox") + build_path = "/obj/machinery/media/jukebox" + board_type = "machine" + origin_tech = list(TECH_MAGNET = 2, TECH_DATA = 1) + req_components = list( + /obj/item/weapon/stock_parts/capacitor = 1, + /obj/item/weapon/stock_parts/console_screen = 1, + /obj/item/stack/cable_coil = 5) diff --git a/code/game/objects/items/weapons/circuitboards/machinery/mech_recharger.dm b/code/game/objects/items/weapons/circuitboards/machinery/mech_recharger.dm index 6b8eb5d5e5c..4515bfd74bc 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/mech_recharger.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/mech_recharger.dm @@ -1,5 +1,5 @@ #ifndef T_BOARD -#error T_BOARD macro is not defined but we need it! +#error T_BOARD macro is not defined but we need it! #endif /obj/item/weapon/circuitboard/mech_recharger @@ -8,6 +8,6 @@ board_type = "machine" origin_tech = list(TECH_DATA = 2, TECH_POWER = 2, TECH_ENGINEERING = 2) req_components = list( - "/obj/item/weapon/stock_parts/capacitor" = 2, - "/obj/item/weapon/stock_parts/scanning_module" = 1, - "/obj/item/weapon/stock_parts/manipulator" = 2) \ No newline at end of file + /obj/item/weapon/stock_parts/capacitor = 2, + /obj/item/weapon/stock_parts/scanning_module = 1, + /obj/item/weapon/stock_parts/manipulator = 2) \ No newline at end of file diff --git a/code/game/objects/items/weapons/circuitboards/machinery/mining_drill.dm b/code/game/objects/items/weapons/circuitboards/machinery/mining_drill.dm index a31a73684a4..653d20d6669 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/mining_drill.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/mining_drill.dm @@ -1,5 +1,5 @@ #ifndef T_BOARD -#error T_BOARD macro is not defined but we need it! +#error T_BOARD macro is not defined but we need it! #endif /obj/item/weapon/circuitboard/miningdrill @@ -8,10 +8,10 @@ board_type = "machine" origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1) req_components = list( - "/obj/item/weapon/stock_parts/capacitor" = 1, - "/obj/item/weapon/cell" = 1, - "/obj/item/weapon/stock_parts/matter_bin" = 1, - "/obj/item/weapon/stock_parts/micro_laser" = 1) + /obj/item/weapon/stock_parts/capacitor = 1, + /obj/item/weapon/cell = 1, + /obj/item/weapon/stock_parts/matter_bin = 1, + /obj/item/weapon/stock_parts/micro_laser = 1) /obj/item/weapon/circuitboard/miningdrillbrace name = T_BOARD("mining drill brace") diff --git a/code/game/objects/items/weapons/circuitboards/machinery/pacman.dm b/code/game/objects/items/weapons/circuitboards/machinery/pacman.dm index 02bf65fb0a8..a5cd69b0f4a 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/pacman.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/pacman.dm @@ -1,5 +1,5 @@ #ifndef T_BOARD -#error T_BOARD macro is not defined but we need it! +#error T_BOARD macro is not defined but we need it! #endif /obj/item/weapon/circuitboard/pacman @@ -8,10 +8,10 @@ board_type = "machine" origin_tech = list(TECH_DATA = 3, TECH_POWER = 3, TECH_PHORON = 3, TECH_ENGINEERING = 3) req_components = list( - "/obj/item/weapon/stock_parts/matter_bin" = 1, - "/obj/item/weapon/stock_parts/micro_laser" = 1, - "/obj/item/stack/cable_coil" = 2, - "/obj/item/weapon/stock_parts/capacitor" = 1) + /obj/item/weapon/stock_parts/matter_bin = 1, + /obj/item/weapon/stock_parts/micro_laser = 1, + /obj/item/stack/cable_coil = 2, + /obj/item/weapon/stock_parts/capacitor = 1) /obj/item/weapon/circuitboard/pacman/super name = T_BOARD("SUPERPACMAN-type generator") diff --git a/code/game/objects/items/weapons/circuitboards/machinery/power.dm b/code/game/objects/items/weapons/circuitboards/machinery/power.dm index a8d2e1ea372..5c8975a207f 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/power.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/power.dm @@ -1,5 +1,5 @@ #ifndef T_BOARD -#error T_BOARD macro is not defined but we need it! +#error T_BOARD macro is not defined but we need it! #endif /obj/item/weapon/circuitboard/smes @@ -7,18 +7,18 @@ build_path = "/obj/machinery/power/smes/buildable" board_type = "machine" origin_tech = list(TECH_POWER = 6, TECH_ENGINEERING = 4) - req_components = list("/obj/item/weapon/smes_coil" = 1, "/obj/item/stack/cable_coil" = 30) + req_components = list(/obj/item/weapon/smes_coil = 1, /obj/item/stack/cable_coil = 30) /obj/item/weapon/circuitboard/batteryrack name = T_BOARD("battery rack PSU") build_path = "/obj/machinery/power/smes/batteryrack" board_type = "machine" origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 2) - req_components = list("/obj/item/weapon/cell" = 3) + req_components = list(/obj/item/weapon/cell = 3) /obj/item/weapon/circuitboard/ghettosmes name = T_BOARD("makeshift PSU") desc = "An APC circuit repurposed into some power storage device controller" build_path = "/obj/machinery/power/smes/batteryrack/makeshift" board_type = "machine" - req_components = list("/obj/item/weapon/cell" = 3) + req_components = list(/obj/item/weapon/cell = 3) diff --git a/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm b/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm index 27e4c652c6f..a3684cd894c 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm @@ -1,5 +1,5 @@ #ifndef T_BOARD -#error T_BOARD macro is not defined but we need it! +#error T_BOARD macro is not defined but we need it! #endif /obj/item/weapon/circuitboard/recharge_station @@ -8,7 +8,7 @@ board_type = "machine" origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3) req_components = list( - "/obj/item/stack/cable_coil" = 5, - "/obj/item/weapon/stock_parts/capacitor" = 2, - "/obj/item/weapon/stock_parts/manipulator" = 2, - "/obj/item/weapon/cell" = 1) \ No newline at end of file + /obj/item/stack/cable_coil = 5, + /obj/item/weapon/stock_parts/capacitor = 2, + /obj/item/weapon/stock_parts/manipulator = 2, + /obj/item/weapon/cell = 1) \ No newline at end of file diff --git a/code/game/objects/items/weapons/circuitboards/machinery/research.dm b/code/game/objects/items/weapons/circuitboards/machinery/research.dm index ee2a2b054c8..bf0eb357f43 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/research.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/research.dm @@ -1,5 +1,5 @@ #ifndef T_BOARD -#error T_BOARD macro is not defined but we need it! +#error T_BOARD macro is not defined but we need it! #endif obj/item/weapon/circuitboard/rdserver @@ -8,8 +8,8 @@ obj/item/weapon/circuitboard/rdserver board_type = "machine" origin_tech = list(TECH_DATA = 3) req_components = list( - "/obj/item/stack/cable_coil" = 2, - "/obj/item/weapon/stock_parts/scanning_module" = 1) + /obj/item/stack/cable_coil = 2, + /obj/item/weapon/stock_parts/scanning_module = 1) /obj/item/weapon/circuitboard/destructive_analyzer name = T_BOARD("destructive analyzer") @@ -17,9 +17,9 @@ obj/item/weapon/circuitboard/rdserver board_type = "machine" origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2, TECH_DATA = 2) req_components = list( - "/obj/item/weapon/stock_parts/scanning_module" = 1, - "/obj/item/weapon/stock_parts/manipulator" = 1, - "/obj/item/weapon/stock_parts/micro_laser" = 1) + /obj/item/weapon/stock_parts/scanning_module = 1, + /obj/item/weapon/stock_parts/manipulator = 1, + /obj/item/weapon/stock_parts/micro_laser = 1) /obj/item/weapon/circuitboard/autolathe name = T_BOARD("autolathe") @@ -27,9 +27,9 @@ obj/item/weapon/circuitboard/rdserver board_type = "machine" origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2) req_components = list( - "/obj/item/weapon/stock_parts/matter_bin" = 3, - "/obj/item/weapon/stock_parts/manipulator" = 1, - "/obj/item/weapon/stock_parts/console_screen" = 1) + /obj/item/weapon/stock_parts/matter_bin = 3, + /obj/item/weapon/stock_parts/manipulator = 1, + /obj/item/weapon/stock_parts/console_screen = 1) /obj/item/weapon/circuitboard/protolathe name = T_BOARD("protolathe") @@ -37,10 +37,9 @@ obj/item/weapon/circuitboard/rdserver board_type = "machine" origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2) req_components = list( - "/obj/item/weapon/stock_parts/matter_bin" = 2, - "/obj/item/weapon/stock_parts/manipulator" = 2, - "/obj/item/weapon/reagent_containers/glass/beaker" = 2) - + /obj/item/weapon/stock_parts/matter_bin = 2, + /obj/item/weapon/stock_parts/manipulator = 2, + /obj/item/weapon/reagent_containers/glass/beaker = 2) /obj/item/weapon/circuitboard/circuit_imprinter name = T_BOARD("circuit imprinter") @@ -48,9 +47,9 @@ obj/item/weapon/circuitboard/rdserver board_type = "machine" origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2) req_components = list( - "/obj/item/weapon/stock_parts/matter_bin" = 1, - "/obj/item/weapon/stock_parts/manipulator" = 1, - "/obj/item/weapon/reagent_containers/glass/beaker" = 2) + /obj/item/weapon/stock_parts/matter_bin = 1, + /obj/item/weapon/stock_parts/manipulator = 1, + /obj/item/weapon/reagent_containers/glass/beaker = 2) /obj/item/weapon/circuitboard/mechfab name = "Circuit board (Exosuit Fabricator)" @@ -58,7 +57,7 @@ obj/item/weapon/circuitboard/rdserver board_type = "machine" origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3) req_components = list( - "/obj/item/weapon/stock_parts/matter_bin" = 2, - "/obj/item/weapon/stock_parts/manipulator" = 1, - "/obj/item/weapon/stock_parts/micro_laser" = 1, - "/obj/item/weapon/stock_parts/console_screen" = 1) + /obj/item/weapon/stock_parts/matter_bin = 2, + /obj/item/weapon/stock_parts/manipulator = 1, + /obj/item/weapon/stock_parts/micro_laser = 1, + /obj/item/weapon/stock_parts/console_screen = 1) diff --git a/code/game/objects/items/weapons/circuitboards/machinery/shieldgen.dm b/code/game/objects/items/weapons/circuitboards/machinery/shieldgen.dm index 6dc0a3f7ab8..7218b7f094d 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/shieldgen.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/shieldgen.dm @@ -1,5 +1,5 @@ #ifndef T_BOARD -#error T_BOARD macro is not defined but we need it! +#error T_BOARD macro is not defined but we need it! #endif /obj/item/weapon/circuitboard/shield_gen_ex @@ -8,12 +8,12 @@ build_path = "/obj/machinery/shield_gen/external" origin_tech = list(TECH_BLUESPACE = 4, TECH_PHORON = 3) req_components = list( - "/obj/item/weapon/stock_parts/manipulator/pico" = 2, - "/obj/item/weapon/stock_parts/subspace/transmitter" = 1, - "/obj/item/weapon/stock_parts/subspace/crystal" = 1, - "/obj/item/weapon/stock_parts/subspace/amplifier" = 1, - "/obj/item/weapon/stock_parts/console_screen" = 1, - "/obj/item/stack/cable_coil" = 5) + /obj/item/weapon/stock_parts/manipulator/pico = 2, + /obj/item/weapon/stock_parts/subspace/transmitter = 1, + /obj/item/weapon/stock_parts/subspace/crystal = 1, + /obj/item/weapon/stock_parts/subspace/amplifier = 1, + /obj/item/weapon/stock_parts/console_screen = 1, + /obj/item/stack/cable_coil = 5) /obj/item/weapon/circuitboard/shield_gen name = T_BOARD("bubble shield generator") @@ -21,12 +21,12 @@ build_path = "/obj/machinery/shield_gen" origin_tech = list(TECH_BLUESPACE = 4, TECH_PHORON = 3) req_components = list( - "/obj/item/weapon/stock_parts/manipulator/pico" = 2, - "/obj/item/weapon/stock_parts/subspace/transmitter" = 1, - "/obj/item/weapon/stock_parts/subspace/crystal" = 1, - "/obj/item/weapon/stock_parts/subspace/amplifier" = 1, - "/obj/item/weapon/stock_parts/console_screen" = 1, - "/obj/item/stack/cable_coil" = 5) + /obj/item/weapon/stock_parts/manipulator/pico = 2, + /obj/item/weapon/stock_parts/subspace/transmitter = 1, + /obj/item/weapon/stock_parts/subspace/crystal = 1, + /obj/item/weapon/stock_parts/subspace/amplifier = 1, + /obj/item/weapon/stock_parts/console_screen = 1, + /obj/item/stack/cable_coil = 5) /obj/item/weapon/circuitboard/shield_cap name = T_BOARD("shield capacitor") @@ -34,9 +34,9 @@ build_path = "/obj/machinery/shield_capacitor" origin_tech = list(TECH_MAGNET = 3, TECH_POWER = 4) req_components = list( - "/obj/item/weapon/stock_parts/manipulator/pico" = 2, - "/obj/item/weapon/stock_parts/subspace/filter" = 1, - "/obj/item/weapon/stock_parts/subspace/treatment" = 1, - "/obj/item/weapon/stock_parts/subspace/analyzer" = 1, - "/obj/item/weapon/stock_parts/console_screen" = 1, - "/obj/item/stack/cable_coil" = 5) + /obj/item/weapon/stock_parts/manipulator/pico = 2, + /obj/item/weapon/stock_parts/subspace/filter = 1, + /obj/item/weapon/stock_parts/subspace/treatment = 1, + /obj/item/weapon/stock_parts/subspace/analyzer = 1, + /obj/item/weapon/stock_parts/console_screen = 1, + /obj/item/stack/cable_coil = 5) diff --git a/code/game/objects/items/weapons/circuitboards/machinery/telecomms.dm b/code/game/objects/items/weapons/circuitboards/machinery/telecomms.dm index 9ee761a7305..8a7516f476d 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/telecomms.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/telecomms.dm @@ -10,69 +10,69 @@ build_path = "/obj/machinery/telecomms/receiver" origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3, TECH_BLUESPACE = 2) req_components = list( - "/obj/item/weapon/stock_parts/subspace/ansible" = 1, - "/obj/item/weapon/stock_parts/subspace/filter" = 1, - "/obj/item/weapon/stock_parts/manipulator" = 2, - "/obj/item/weapon/stock_parts/micro_laser" = 1) + /obj/item/weapon/stock_parts/subspace/ansible = 1, + /obj/item/weapon/stock_parts/subspace/filter = 1, + /obj/item/weapon/stock_parts/manipulator = 2, + /obj/item/weapon/stock_parts/micro_laser = 1) /obj/item/weapon/circuitboard/telecomms/hub name = T_BOARD("hub mainframe") build_path = "/obj/machinery/telecomms/hub" origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4) req_components = list( - "/obj/item/weapon/stock_parts/manipulator" = 2, - "/obj/item/stack/cable_coil" = 2, - "/obj/item/weapon/stock_parts/subspace/filter" = 2) + /obj/item/weapon/stock_parts/manipulator = 2, + /obj/item/stack/cable_coil = 2, + /obj/item/weapon/stock_parts/subspace/filter = 2) /obj/item/weapon/circuitboard/telecomms/relay name = T_BOARD("relay mainframe") build_path = "/obj/machinery/telecomms/relay" origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 4, TECH_BLUESPACE = 3) req_components = list( - "/obj/item/weapon/stock_parts/manipulator" = 2, - "/obj/item/stack/cable_coil" = 2, - "/obj/item/weapon/stock_parts/subspace/filter" = 2) + /obj/item/weapon/stock_parts/manipulator = 2, + /obj/item/stack/cable_coil = 2, + /obj/item/weapon/stock_parts/subspace/filter = 2) /obj/item/weapon/circuitboard/telecomms/bus name = T_BOARD("bus mainframe") build_path = "/obj/machinery/telecomms/bus" origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4) req_components = list( - "/obj/item/weapon/stock_parts/manipulator" = 2, - "/obj/item/stack/cable_coil" = 1, - "/obj/item/weapon/stock_parts/subspace/filter" = 1) + /obj/item/weapon/stock_parts/manipulator = 2, + /obj/item/stack/cable_coil = 1, + /obj/item/weapon/stock_parts/subspace/filter = 1) /obj/item/weapon/circuitboard/telecomms/processor name = T_BOARD("processor unit") build_path = "/obj/machinery/telecomms/processor" origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4) req_components = list( - "/obj/item/weapon/stock_parts/manipulator" = 3, - "/obj/item/weapon/stock_parts/subspace/filter" = 1, - "/obj/item/weapon/stock_parts/subspace/treatment" = 2, - "/obj/item/weapon/stock_parts/subspace/analyzer" = 1, - "/obj/item/stack/cable_coil" = 2, - "/obj/item/weapon/stock_parts/subspace/amplifier" = 1) + /obj/item/weapon/stock_parts/manipulator = 3, + /obj/item/weapon/stock_parts/subspace/filter = 1, + /obj/item/weapon/stock_parts/subspace/treatment = 2, + /obj/item/weapon/stock_parts/subspace/analyzer = 1, + /obj/item/stack/cable_coil = 2, + /obj/item/weapon/stock_parts/subspace/amplifier = 1) /obj/item/weapon/circuitboard/telecomms/server name = T_BOARD("telecommunication server") build_path = "/obj/machinery/telecomms/server" origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4) req_components = list( - "/obj/item/weapon/stock_parts/manipulator" = 2, - "/obj/item/stack/cable_coil" = 1, - "/obj/item/weapon/stock_parts/subspace/filter" = 1) + /obj/item/weapon/stock_parts/manipulator = 2, + /obj/item/stack/cable_coil = 1, + /obj/item/weapon/stock_parts/subspace/filter = 1) /obj/item/weapon/circuitboard/telecomms/broadcaster name = T_BOARD("subspace broadcaster") build_path = "/obj/machinery/telecomms/broadcaster" origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4, TECH_BLUESPACE = 2) req_components = list( - "/obj/item/weapon/stock_parts/manipulator" = 2, - "/obj/item/stack/cable_coil" = 1, - "/obj/item/weapon/stock_parts/subspace/filter" = 1, - "/obj/item/weapon/stock_parts/subspace/crystal" = 1, - "/obj/item/weapon/stock_parts/micro_laser/high" = 2) + /obj/item/weapon/stock_parts/manipulator = 2, + /obj/item/stack/cable_coil = 1, + /obj/item/weapon/stock_parts/subspace/filter = 1, + /obj/item/weapon/stock_parts/subspace/crystal = 1, + /obj/item/weapon/stock_parts/micro_laser/high = 2) //This isn't a real telecomms board but I don't want to make a whole file to hold only one circuitboard. /obj/item/weapon/circuitboard/telecomms/exonet_node @@ -80,10 +80,21 @@ build_path = "/obj/machinery/exonet_node" origin_tech = list(TECH_DATA = 5, TECH_ENGINEERING = 5, TECH_BLUESPACE = 4) req_components = list( - "/obj/item/weapon/stock_parts/subspace/ansible" = 1, - "/obj/item/weapon/stock_parts/subspace/filter" = 1, - "/obj/item/weapon/stock_parts/manipulator" = 2, - "/obj/item/weapon/stock_parts/micro_laser" = 1, - "/obj/item/weapon/stock_parts/subspace/crystal" = 1, - "/obj/item/weapon/stock_parts/subspace/treatment" = 2, - "/obj/item/stack/cable_coil" = 2) + /obj/item/weapon/stock_parts/subspace/ansible = 1, + /obj/item/weapon/stock_parts/subspace/filter = 1, + /obj/item/weapon/stock_parts/manipulator = 2, + /obj/item/weapon/stock_parts/micro_laser = 1, + /obj/item/weapon/stock_parts/subspace/crystal = 1, + /obj/item/weapon/stock_parts/subspace/treatment = 2, + /obj/item/stack/cable_coil = 2) + +/obj/item/weapon/circuitboard/telecomms/pda_multicaster + name = T_BOARD("pda multicaster") + build_path = "/obj/machinery/pda_multicaster" + origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 2, TECH_BLUESPACE = 2) + req_components = list( + /obj/item/weapon/stock_parts/subspace/ansible = 1, + /obj/item/weapon/stock_parts/subspace/filter = 1, + /obj/item/weapon/stock_parts/manipulator = 1, + /obj/item/weapon/stock_parts/subspace/treatment = 1, + /obj/item/stack/cable_coil = 2) diff --git a/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm b/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm index 045f29592ae..38438d6327a 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm @@ -1,5 +1,5 @@ #ifndef T_BOARD -#error T_BOARD macro is not defined but we need it! +#error T_BOARD macro is not defined but we need it! #endif /obj/item/weapon/circuitboard/unary_atmos @@ -18,16 +18,16 @@ build_path = "/obj/machinery/atmospherics/unary/heater" origin_tech = list(TECH_POWER = 2, TECH_ENGINEERING = 1) req_components = list( - "/obj/item/stack/cable_coil" = 5, - "/obj/item/weapon/stock_parts/matter_bin" = 1, - "/obj/item/weapon/stock_parts/capacitor" = 2) + /obj/item/stack/cable_coil = 5, + /obj/item/weapon/stock_parts/matter_bin = 1, + /obj/item/weapon/stock_parts/capacitor = 2) /obj/item/weapon/circuitboard/unary_atmos/cooler name = T_BOARD("gas cooling system") build_path = "/obj/machinery/atmospherics/unary/freezer" origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2) req_components = list( - "/obj/item/stack/cable_coil" = 2, - "/obj/item/weapon/stock_parts/matter_bin" = 1, - "/obj/item/weapon/stock_parts/capacitor" = 2, - "/obj/item/weapon/stock_parts/manipulator" = 1) + /obj/item/stack/cable_coil = 2, + /obj/item/weapon/stock_parts/matter_bin = 1, + /obj/item/weapon/stock_parts/capacitor = 2, + /obj/item/weapon/stock_parts/manipulator = 1) diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index 2b7307f6ff1..d15b78963da 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -34,6 +34,10 @@ //So this is a workaround. This also makes more sense from an IC standpoint. ~Carn if(user.client && (target in user.client.screen)) user << "You need to take that [target.name] off before cleaning it." + else if(istype(target,/obj/effect/decal/cleanable/blood)) + user << "You scrub \the [target.name] out." + target.clean_blood() + return //Blood is a cleanable decal, therefore needs to be accounted for before all cleanable decals. else if(istype(target,/obj/effect/decal/cleanable)) user << "You scrub \the [target.name] out." qdel(target) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 2c1292fad89..24f6ad53b39 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -93,7 +93,7 @@ spawn(0)//this prevents the collapse of space-time continuum if (user) - user.removeItem(src, force = 1) + user.drop_from_inventory(src) qdel(src) return uses diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 6f5e2d3d53c..46e8e7ba267 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -18,7 +18,7 @@ wires = new(src) image_overlay = image('icons/obj/assemblies.dmi', "plastic-explosive2") ..() - + /obj/item/weapon/plastique/Destroy() qdel(wires) wires = null @@ -79,7 +79,7 @@ if(target) if (istype(target, /turf/simulated/wall)) var/turf/simulated/wall/W = target - W.dismantle_wall(1) + W.dismantle_wall(1,1,1) else if(istype(target, /mob/living)) target.ex_act(2) // c4 can't gib mobs anymore. else diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index 7b896bdd546..94775ceb366 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -108,7 +108,7 @@ if(!ispath(gift_type,/obj/item)) return var/obj/item/I = new gift_type(M) - M.removeItem(src) + M.remove_from_mob(src) M.put_in_hands(I) I.add_fingerprint(M) qdel(src) diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index 05350458489..f87f0fa8305 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -59,7 +59,8 @@ path = 1 user << "You add [W] to the metal casing." playsound(src.loc, 'sound/items/Screwdriver2.ogg', 25, -3) - user.removeItem(det, src) + user.remove_from_mob(det) + det.loc = src detonator = det if(istimer(detonator.a_left)) var/obj/item/device/assembly/timer/T = detonator.a_left @@ -175,7 +176,7 @@ if(istype(loc, /mob/living/carbon)) //drop dat grenade if it goes off in your hand var/mob/living/carbon/C = loc - C.removeItem(src) + C.drop_from_inventory(src) C.throw_mode_off() invisibility = INVISIBILITY_MAXIMUM //Why am i doing this? diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index a95d3b1382a..17616942c11 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -22,13 +22,13 @@ B.update_icon() new/obj/effect/effect/sparks(src.loc) - new/obj/effect/effect/smoke/illumination(src.loc, brightness=15) + new/obj/effect/effect/smoke/illumination(src.loc, 5, range=30, power=30, color="#FFFFFF") qdel(src) return proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged. M << "BANG" // Called during the loop that bangs people in lockers/containers and when banging - playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 5) // people in normal view. Could theroetically be called during other explosions. + playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 30) // people in normal view. Could theroetically be called during other explosions. // -- Polymorph //Checking for protections diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm index 704df83db8a..d64627fcf38 100644 --- a/code/game/objects/items/weapons/grenades/smokebomb.dm +++ b/code/game/objects/items/weapons/grenades/smokebomb.dm @@ -1,5 +1,5 @@ /obj/item/weapon/grenade/smokebomb - desc = "It is set to detonate in 2 seconds." + desc = "It is set to detonate in 2 seconds. These high-tech grenades can have their color adapted on the fly with a multitool!" name = "smoke bomb" icon = 'icons/obj/grenade.dmi' icon_state = "flashbang" @@ -7,6 +7,8 @@ item_state = "flashbang" slot_flags = SLOT_BELT var/datum/effect/effect/system/smoke_spread/bad/smoke + var/smoke_color + var/smoke_strength = 8 /obj/item/weapon/grenade/smokebomb/New() ..() @@ -22,18 +24,15 @@ playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) src.smoke.set_up(10, 0, usr.loc) spawn(0) - src.smoke.start() - sleep(10) - src.smoke.start() - sleep(10) - src.smoke.start() - sleep(10) - src.smoke.start() + for(var/i = 1 to smoke_strength) + src.smoke.start(smoke_color) + sleep(10) + qdel(src) - for(var/obj/effect/blob/B in view(8,src)) - var/damage = round(30/(get_dist(B,src)+1)) - B.health -= damage - B.update_icon() - sleep(80) - qdel(src) return + +/obj/item/weapon/grenade/smokebomb/attackby(obj/item/I as obj, mob/user as mob) + if(istype(I,/obj/item/device/multitool)) + var/new_smoke_color = input(user, "Choose a color for the smoke:", "Smoke Color", smoke_color) as color|null + if(new_smoke_color) + smoke_color = new_smoke_color diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index ce2384ccb38..c44c3e1688e 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -84,7 +84,7 @@ if(dispenser) cuffs = new(get_turf(user)) else - user.removeItem(cuffs) + user.drop_from_inventory(cuffs) cuffs.loc = target target.handcuffed = cuffs target.update_inv_handcuffed() diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 783a2088da9..69f14d7c2b8 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -417,22 +417,26 @@ the implant may become unstable and either pre-maturely inject the subject or si var/area/t = get_area(M) switch (cause) if("death") - var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null) + var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null) if(istype(t, /area/syndicate_station) || istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) ) //give the syndies a bit of stealth - a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm") + a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "Security") + a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm", "Medical") else - a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm") + a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Security") + a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Medical") qdel(a) processing_objects.Remove(src) if ("emp") - var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null) + var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null) var/name = prob(50) ? t.name : pick(teleportlocs) - a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm") + a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Security") + a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Medical") qdel(a) else - var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null) - a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm") + var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null) + a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Security") + a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Medical") qdel(a) processing_objects.Remove(src) diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index da7f1b1401e..655727a62ae 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -126,7 +126,7 @@ c.scanned = A if(istype(A.loc,/mob/living/carbon/human)) var/mob/living/carbon/human/H = A.loc - H.removeItem(A) + H.remove_from_mob(A) else if(istype(A.loc,/obj/item/weapon/storage)) var/obj/item/weapon/storage/S = A.loc S.remove_from_storage(A) diff --git a/code/game/objects/items/weapons/improvised_components.dm b/code/game/objects/items/weapons/improvised_components.dm index 505e6bd9950..af4e528b709 100644 --- a/code/game/objects/items/weapons/improvised_components.dm +++ b/code/game/objects/items/weapons/improvised_components.dm @@ -62,7 +62,9 @@ finished = new /obj/item/weapon/melee/baton/cattleprod(get_turf(user)) user << "You fasten the wirecutters to the top of the rod with the cable, prongs outward." if(finished) - user.deleteItem(src) - user.deleteItem(I) + user.drop_from_inventory(src) + user.drop_from_inventory(I) + qdel(I) + qdel(src) user.put_in_hands(finished) update_icon(user) diff --git a/code/game/objects/items/weapons/material/ashtray.dm b/code/game/objects/items/weapons/material/ashtray.dm index 0dc09538883..d5e7cd67bb7 100644 --- a/code/game/objects/items/weapons/material/ashtray.dm +++ b/code/game/objects/items/weapons/material/ashtray.dm @@ -50,7 +50,8 @@ var/global/list/ashtray_cache = list() if (contents.len >= max_butts) user << "\The [src] is full." return - user.removeItem(W, src) + user.remove_from_mob(W) + W.loc = src if (istype(W,/obj/item/clothing/mask/smokable/cigarette)) var/obj/item/clothing/mask/smokable/cigarette/cig = W diff --git a/code/game/objects/items/weapons/material/kitchen.dm b/code/game/objects/items/weapons/material/kitchen.dm index d4f45187802..6672d488ded 100644 --- a/code/game/objects/items/weapons/material/kitchen.dm +++ b/code/game/objects/items/weapons/material/kitchen.dm @@ -57,6 +57,8 @@ name = "fork" desc = "It's a fork. Sure is pointy." icon_state = "fork" + sharp = 1 + edge = 0 /obj/item/weapon/material/kitchen/utensil/fork/plastic default_material = "plastic" diff --git a/code/game/objects/items/weapons/material/material_weapons.dm b/code/game/objects/items/weapons/material/material_weapons.dm index 2c634589e29..fc9ac7eb32d 100644 --- a/code/game/objects/items/weapons/material/material_weapons.dm +++ b/code/game/objects/items/weapons/material/material_weapons.dm @@ -82,7 +82,7 @@ T.visible_message("\The [src] [material.destruction_desc]!") if(istype(loc, /mob/living)) var/mob/living/M = loc - M.removeItem(src, force = 1) + M.drop_from_inventory(src) playsound(src, "shatter", 70, 1) if(!consumed && drops_debris) material.place_shard(T) qdel(src) diff --git a/code/game/objects/items/weapons/material/misc.dm b/code/game/objects/items/weapons/material/misc.dm index 1dd142f9fe8..91d97274f66 100644 --- a/code/game/objects/items/weapons/material/misc.dm +++ b/code/game/objects/items/weapons/material/misc.dm @@ -1,7 +1,7 @@ /obj/item/weapon/material/harpoon name = "harpoon" sharp = 1 - edge = 1 + edge = 0 desc = "Tharr she blows!" icon_state = "harpoon" item_state = "harpoon" diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm index e708cc0765f..f4b763c5e91 100644 --- a/code/game/objects/items/weapons/material/shards.dm +++ b/code/game/objects/items/weapons/material/shards.dm @@ -85,7 +85,7 @@ var/picked = pick(check) var/obj/item/organ/external/affecting = H.get_organ(picked) if(affecting) - if(affecting.status & ORGAN_ROBOT) + if(affecting.robotic >= ORGAN_ROBOT) return if(affecting.take_damage(5, 0)) H.UpdateDamageIcon() diff --git a/code/game/objects/items/weapons/material/twohanded.dm b/code/game/objects/items/weapons/material/twohanded.dm index 52b949cf351..f821ab1db69 100644 --- a/code/game/objects/items/weapons/material/twohanded.dm +++ b/code/game/objects/items/weapons/material/twohanded.dm @@ -68,7 +68,7 @@ /obj/item/weapon/material/twohanded/update_icon() icon_state = "[base_icon][wielded]" item_state = icon_state - + /obj/item/weapon/material/twohanded/dropped() ..() if(wielded) @@ -119,7 +119,7 @@ unwielded_force_divisor = 0.65 // 14 when unwielded based on above thrown_force_divisor = 1.5 // 20 when thrown with weight 15 (glass) throw_speed = 3 - edge = 1 + edge = 0 sharp = 1 hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "poked", "jabbed", "torn", "gored") diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 297361d546a..ac8da3d835c 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -207,7 +207,7 @@ ..() /obj/item/weapon/melee/energy/blade/attack_self(mob/user as mob) - user.removeItem(src, force = 1) + user.drop_from_inventory(src) spawn(1) if(src) qdel(src) /obj/item/weapon/melee/energy/blade/dropped() @@ -225,5 +225,5 @@ organ.implants -= src host.pinned -= src host.embedded -= src - host.removeItem(src, force = 1) + host.drop_from_inventory(src) spawn(1) if(src) qdel(src) diff --git a/code/game/objects/items/weapons/mop_deploy.dm b/code/game/objects/items/weapons/mop_deploy.dm index 6658a50a1fe..e50f82966bf 100644 --- a/code/game/objects/items/weapons/mop_deploy.dm +++ b/code/game/objects/items/weapons/mop_deploy.dm @@ -52,7 +52,7 @@ ..() /obj/item/weapon/mop_deploy/attack_self(mob/user as mob) - user.removeItem(src, force = 1) + user.drop_from_inventory(src) spawn(1) if(src) del(src) /obj/item/weapon/mop_deploy/dropped() @@ -70,5 +70,5 @@ organ.implants -= src host.pinned -= src host.embedded -= src - host.removeItem(src, force = 1) + host.drop_from_inventory(src) spawn(1) if(src) del(src) \ No newline at end of file diff --git a/code/game/objects/items/weapons/policetape.dm b/code/game/objects/items/weapons/policetape.dm index e3c1268ea08..4ddd60526cb 100644 --- a/code/game/objects/items/weapons/policetape.dm +++ b/code/game/objects/items/weapons/policetape.dm @@ -9,6 +9,20 @@ var/tape_type = /obj/item/tape var/icon_base + var/apply_tape = FALSE + +/obj/item/taperoll/initialize() + ..() + if(apply_tape) + var/turf/T = get_turf(src) + if(!T) + return + var/obj/machinery/door/airlock/airlock = locate(/obj/machinery/door/airlock) in T + if(airlock) + afterattack(airlock, null, TRUE) + qdel(src) + + var/list/image/hazard_overlays var/list/tape_roll_applications = list() @@ -63,6 +77,9 @@ var/list/tape_roll_applications = list() tape_type = /obj/item/tape/engineering icon_base = "engineering" +/obj/item/taperoll/engineering/applied + apply_tape = TRUE + /obj/item/tape/engineering name = "engineering tape" desc = "A length of engineering tape. Better not cross it." @@ -220,8 +237,7 @@ var/list/tape_roll_applications = list() if (istype(A, /obj/machinery/door/airlock)) var/turf/T = get_turf(A) - var/obj/item/tape/P = new tape_type(T.x,T.y,T.z) - P.loc = locate(T.x,T.y,T.z) + var/obj/item/tape/P = new tape_type(T) P.update_icon() P.layer = 3.2 user << "You finish placing \the [src]." diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index d70b6957884..9eebc7b3f02 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -244,12 +244,12 @@ ..() new /obj/item/weapon/storage/wallet/random( src ) -/obj/item/weapon/storage/backpack/satchel_norm +/obj/item/weapon/storage/backpack/satchel/norm name = "satchel" desc = "A trendy looking satchel." icon_state = "satchel-norm" -/obj/item/weapon/storage/backpack/satchel_eng +/obj/item/weapon/storage/backpack/satchel/eng name = "industrial satchel" desc = "A tough satchel with extra pockets." icon_state = "satchel-eng" @@ -258,7 +258,7 @@ slot_r_hand_str = "engiepack", ) -/obj/item/weapon/storage/backpack/satchel_med +/obj/item/weapon/storage/backpack/satchel/med name = "medical satchel" desc = "A sterile satchel used in medical departments." icon_state = "satchel-med" @@ -267,27 +267,27 @@ slot_r_hand_str = "medicalpack", ) -/obj/item/weapon/storage/backpack/satchel_vir +/obj/item/weapon/storage/backpack/satchel/vir name = "virologist satchel" desc = "A sterile satchel with virologist colours." icon_state = "satchel-vir" -/obj/item/weapon/storage/backpack/satchel_chem +/obj/item/weapon/storage/backpack/satchel/chem name = "chemist satchel" desc = "A sterile satchel with chemist colours." icon_state = "satchel-chem" -/obj/item/weapon/storage/backpack/satchel_gen +/obj/item/weapon/storage/backpack/satchel/gen name = "geneticist satchel" desc = "A sterile satchel with geneticist colours." icon_state = "satchel-gen" -/obj/item/weapon/storage/backpack/satchel_tox +/obj/item/weapon/storage/backpack/satchel/tox name = "scientist satchel" desc = "Useful for holding research materials." icon_state = "satchel-tox" -/obj/item/weapon/storage/backpack/satchel_sec +/obj/item/weapon/storage/backpack/satchel/sec name = "security satchel" desc = "A robust satchel for security related needs." icon_state = "satchel-sec" @@ -296,12 +296,12 @@ slot_r_hand_str = "securitypack", ) -/obj/item/weapon/storage/backpack/satchel_hyd +/obj/item/weapon/storage/backpack/satchel/hyd name = "hydroponics satchel" desc = "A green satchel for plant related work." icon_state = "satchel_hyd" -/obj/item/weapon/storage/backpack/satchel_cap +/obj/item/weapon/storage/backpack/satchel/cap name = "captain's satchel" desc = "An exclusive satchel for officers." icon_state = "satchel-cap" diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 8c5f8dbd8ae..476bf1a67eb 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -153,7 +153,7 @@ break if(!inserted || !S.amount) - usr.removeItem(S) + usr.remove_from_mob(S) usr.update_icons() //update our overlays if (usr.client && usr.s_active != src) usr.client.screen -= S diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 478272b8b25..c0469cd9f8c 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -187,7 +187,8 @@ /obj/item/device/flash, /obj/item/weapon/flame/lighter, /obj/item/weapon/reagent_containers/food/snacks/donut/, - /obj/item/ammo_magazine + /obj/item/ammo_magazine, + /obj/item/weapon/gun/projectile/colt/detective ) /obj/item/weapon/storage/belt/soulstone diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 657d2f4f5a4..f8b21af1903 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -51,31 +51,24 @@ new src.foldable(get_turf(src)) qdel(src) -/obj/item/weapon/storage/box/survival/ - New() - ..() - new /obj/item/clothing/mask/breath( src ) - new /obj/item/weapon/tank/emergency_oxygen( src ) +/obj/item/weapon/storage/box/survival/New() + ..() + new /obj/item/clothing/mask/breath(src) + new /obj/item/weapon/tank/emergency_oxygen(src) -/obj/item/weapon/storage/box/engineer/ - New() - ..() - new /obj/item/clothing/mask/breath( src ) - new /obj/item/weapon/tank/emergency_oxygen/engi( src ) +/obj/item/weapon/storage/box/engineer/New() + ..() + new /obj/item/clothing/mask/breath(src) + new /obj/item/weapon/tank/emergency_oxygen/engi(src) /obj/item/weapon/storage/box/gloves name = "box of latex gloves" desc = "Contains white gloves." icon_state = "latex" - New() - ..() - new /obj/item/clothing/gloves/latex(src) - new /obj/item/clothing/gloves/latex(src) - new /obj/item/clothing/gloves/latex(src) - new /obj/item/clothing/gloves/latex(src) - new /obj/item/clothing/gloves/latex(src) - new /obj/item/clothing/gloves/latex(src) +/obj/item/weapon/storage/box/gloves/New() + ..() + for(var/i = 1 to 7) new /obj/item/clothing/gloves/latex(src) /obj/item/weapon/storage/box/masks @@ -83,75 +76,50 @@ desc = "This box contains masks of sterility." icon_state = "sterile" - New() - ..() +/obj/item/weapon/storage/box/masks/New() + ..() + for(var/i = 1 to 7) new /obj/item/clothing/mask/surgical(src) - new /obj/item/clothing/mask/surgical(src) - new /obj/item/clothing/mask/surgical(src) - new /obj/item/clothing/mask/surgical(src) - new /obj/item/clothing/mask/surgical(src) - new /obj/item/clothing/mask/surgical(src) - new /obj/item/clothing/mask/surgical(src) - /obj/item/weapon/storage/box/syringes name = "box of syringes" desc = "A box full of syringes." icon_state = "syringe" - New() - ..() - new /obj/item/weapon/reagent_containers/syringe( src ) - new /obj/item/weapon/reagent_containers/syringe( src ) - new /obj/item/weapon/reagent_containers/syringe( src ) - new /obj/item/weapon/reagent_containers/syringe( src ) - new /obj/item/weapon/reagent_containers/syringe( src ) - new /obj/item/weapon/reagent_containers/syringe( src ) - new /obj/item/weapon/reagent_containers/syringe( src ) +/obj/item/weapon/storage/box/syringes/New() + ..() + for(var/i = 1 to 7) + new /obj/item/weapon/reagent_containers/syringe(src) /obj/item/weapon/storage/box/syringegun name = "box of syringe gun cartridges" desc = "A box full of compressed gas cartridges." icon_state = "syringe" - New() - ..() - new /obj/item/weapon/syringe_cartridge( src ) - new /obj/item/weapon/syringe_cartridge( src ) - new /obj/item/weapon/syringe_cartridge( src ) - new /obj/item/weapon/syringe_cartridge( src ) - new /obj/item/weapon/syringe_cartridge( src ) - new /obj/item/weapon/syringe_cartridge( src ) - new /obj/item/weapon/syringe_cartridge( src ) - +/obj/item/weapon/storage/box/syringegun/New() + ..() + for(var/i = 1 to 7) + new /obj/item/weapon/syringe_cartridge(src) /obj/item/weapon/storage/box/beakers name = "box of beakers" icon_state = "beaker" - New() - ..() - new /obj/item/weapon/reagent_containers/glass/beaker( src ) - new /obj/item/weapon/reagent_containers/glass/beaker( src ) - new /obj/item/weapon/reagent_containers/glass/beaker( src ) - new /obj/item/weapon/reagent_containers/glass/beaker( src ) - new /obj/item/weapon/reagent_containers/glass/beaker( src ) - new /obj/item/weapon/reagent_containers/glass/beaker( src ) - new /obj/item/weapon/reagent_containers/glass/beaker( src ) +/obj/item/weapon/storage/box/beakers/New() + ..() + for(var/i = 1 to 7) + new /obj/item/weapon/reagent_containers/glass/beaker(src) /obj/item/weapon/storage/box/injectors name = "box of DNA injectors" desc = "This box contains injectors it seems." - New() - ..() - new /obj/item/weapon/dnainjector/h2m(src) - new /obj/item/weapon/dnainjector/h2m(src) +/obj/item/weapon/storage/box/injectors/New() + ..() + for(var/i = 1 to 3) new /obj/item/weapon/dnainjector/h2m(src) + for(var/i = 1 to 3) new /obj/item/weapon/dnainjector/m2h(src) - new /obj/item/weapon/dnainjector/m2h(src) - new /obj/item/weapon/dnainjector/m2h(src) - /obj/item/weapon/storage/box/blanks name = "box of blank shells" @@ -159,14 +127,9 @@ icon_state = "blankshot_box" item_state = "syringe_kit" - New() - ..() - new /obj/item/ammo_casing/shotgun/blank(src) - new /obj/item/ammo_casing/shotgun/blank(src) - new /obj/item/ammo_casing/shotgun/blank(src) - new /obj/item/ammo_casing/shotgun/blank(src) - new /obj/item/ammo_casing/shotgun/blank(src) - new /obj/item/ammo_casing/shotgun/blank(src) +/obj/item/weapon/storage/box/blanks/New() + ..() + for(var/i = 1 to 7) new /obj/item/ammo_casing/shotgun/blank(src) /obj/item/weapon/storage/box/beanbags @@ -175,14 +138,9 @@ icon_state = "beanshot_box" item_state = "syringe_kit" - New() - ..() - new /obj/item/ammo_casing/shotgun/beanbag(src) - new /obj/item/ammo_casing/shotgun/beanbag(src) - new /obj/item/ammo_casing/shotgun/beanbag(src) - new /obj/item/ammo_casing/shotgun/beanbag(src) - new /obj/item/ammo_casing/shotgun/beanbag(src) - new /obj/item/ammo_casing/shotgun/beanbag(src) +/obj/item/weapon/storage/box/beanbags/New() + ..() + for(var/i = 1 to 7) new /obj/item/ammo_casing/shotgun/beanbag(src) /obj/item/weapon/storage/box/shotgunammo @@ -191,14 +149,9 @@ icon_state = "lethalshellshot_box" item_state = "syringe_kit" - New() - ..() - new /obj/item/ammo_casing/shotgun(src) - new /obj/item/ammo_casing/shotgun(src) - new /obj/item/ammo_casing/shotgun(src) - new /obj/item/ammo_casing/shotgun(src) - new /obj/item/ammo_casing/shotgun(src) - new /obj/item/ammo_casing/shotgun(src) +/obj/item/weapon/storage/box/shotgunammo/New() + ..() + for(var/i = 1 to 7) new /obj/item/ammo_casing/shotgun(src) /obj/item/weapon/storage/box/shotgunshells @@ -207,14 +160,9 @@ icon_state = "lethalslug_box" item_state = "syringe_kit" - New() - ..() - new /obj/item/ammo_casing/shotgun/pellet(src) - new /obj/item/ammo_casing/shotgun/pellet(src) - new /obj/item/ammo_casing/shotgun/pellet(src) - new /obj/item/ammo_casing/shotgun/pellet(src) - new /obj/item/ammo_casing/shotgun/pellet(src) - new /obj/item/ammo_casing/shotgun/pellet(src) +/obj/item/weapon/storage/box/shotgunshells/New() + ..() + for(var/i = 1 to 7) new /obj/item/ammo_casing/shotgun/pellet(src) /obj/item/weapon/storage/box/flashshells @@ -223,14 +171,9 @@ icon_state = "illumshot_box" item_state = "syringe_kit" - New() - ..() - new /obj/item/ammo_casing/shotgun/flash(src) - new /obj/item/ammo_casing/shotgun/flash(src) - new /obj/item/ammo_casing/shotgun/flash(src) - new /obj/item/ammo_casing/shotgun/flash(src) - new /obj/item/ammo_casing/shotgun/flash(src) - new /obj/item/ammo_casing/shotgun/flash(src) +/obj/item/weapon/storage/box/flashshells/New() + ..() + for(var/i = 1 to 7) new /obj/item/ammo_casing/shotgun/flash(src) /obj/item/weapon/storage/box/stunshells @@ -239,14 +182,9 @@ icon_state = "stunshot_box" item_state = "syringe_kit" - New() - ..() - new /obj/item/ammo_casing/shotgun/stunshell(src) - new /obj/item/ammo_casing/shotgun/stunshell(src) - new /obj/item/ammo_casing/shotgun/stunshell(src) - new /obj/item/ammo_casing/shotgun/stunshell(src) - new /obj/item/ammo_casing/shotgun/stunshell(src) - new /obj/item/ammo_casing/shotgun/stunshell(src) +/obj/item/weapon/storage/box/stunshells/New() + ..() + for(var/i = 1 to 7) new /obj/item/ammo_casing/shotgun/stunshell(src) /obj/item/weapon/storage/box/practiceshells @@ -255,28 +193,18 @@ icon_state = "blankshot_box" item_state = "syringe_kit" - New() - ..() - new /obj/item/ammo_casing/shotgun/practice(src) - new /obj/item/ammo_casing/shotgun/practice(src) - new /obj/item/ammo_casing/shotgun/practice(src) - new /obj/item/ammo_casing/shotgun/practice(src) - new /obj/item/ammo_casing/shotgun/practice(src) - new /obj/item/ammo_casing/shotgun/practice(src) +/obj/item/weapon/storage/box/practiceshells/New() + ..() + for(var/i = 1 to 7) new /obj/item/ammo_casing/shotgun/practice(src) /obj/item/weapon/storage/box/sniperammo name = "box of 14.5mm shells" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." - New() - ..() - new /obj/item/ammo_casing/a145(src) - new /obj/item/ammo_casing/a145(src) - new /obj/item/ammo_casing/a145(src) - new /obj/item/ammo_casing/a145(src) - new /obj/item/ammo_casing/a145(src) - new /obj/item/ammo_casing/a145(src) +/obj/item/weapon/storage/box/sniperammo/New() + ..() + for(var/i = 1 to 7) new /obj/item/ammo_casing/a145(src) /obj/item/weapon/storage/box/flashbangs @@ -284,14 +212,9 @@ desc = "WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use." icon_state = "flashbang" - New() - ..() - new /obj/item/weapon/grenade/flashbang(src) - new /obj/item/weapon/grenade/flashbang(src) - new /obj/item/weapon/grenade/flashbang(src) - new /obj/item/weapon/grenade/flashbang(src) - new /obj/item/weapon/grenade/flashbang(src) - new /obj/item/weapon/grenade/flashbang(src) +/obj/item/weapon/storage/box/flashbangs/New() + ..() + for(var/i = 1 to 7) new /obj/item/weapon/grenade/flashbang(src) /obj/item/weapon/storage/box/emps @@ -299,39 +222,29 @@ desc = "A box containing 5 military grade EMP grenades.
WARNING: Do not use near unshielded electronics or biomechanical augmentations, death or permanent paralysis may occur." icon_state = "emp" - New() - ..() - new /obj/item/weapon/grenade/empgrenade(src) - new /obj/item/weapon/grenade/empgrenade(src) - new /obj/item/weapon/grenade/empgrenade(src) - new /obj/item/weapon/grenade/empgrenade(src) - new /obj/item/weapon/grenade/empgrenade(src) +/obj/item/weapon/storage/box/emps/New() + ..() + for(var/i = 1 to 5) + new /obj/item/weapon/grenade/empgrenade(src) /obj/item/weapon/storage/box/empslite name = "box of low yield emp grenades" desc = "A box containing 5 low yield EMP grenades.
WARNING: Do not use near unshielded electronics or biomechanical augmentations, death or permanent paralysis may occur." icon_state = "emp" - New() - ..() - new /obj/item/weapon/grenade/empgrenade/low_yield(src) - new /obj/item/weapon/grenade/empgrenade/low_yield(src) - new /obj/item/weapon/grenade/empgrenade/low_yield(src) - new /obj/item/weapon/grenade/empgrenade/low_yield(src) +/obj/item/weapon/storage/box/empslite/New() + ..() + for(var/i = 1 to 5) new /obj/item/weapon/grenade/empgrenade/low_yield(src) /obj/item/weapon/storage/box/smokes name = "box of smoke bombs" - desc = "A box containing 5 smoke bombs." + desc = "A box containing 7 smoke bombs." icon_state = "flashbang" - /obj/item/weapon/storage/box/smokes/New() - ..() - new /obj/item/weapon/grenade/smokebomb(src) - new /obj/item/weapon/grenade/smokebomb(src) - new /obj/item/weapon/grenade/smokebomb(src) - new /obj/item/weapon/grenade/smokebomb(src) + ..() + for(var/i = 1 to 7) new /obj/item/weapon/grenade/smokebomb(src) /obj/item/weapon/storage/box/anti_photons @@ -340,11 +253,8 @@ icon_state = "flashbang" /obj/item/weapon/storage/box/anti_photons/New() - ..() - new /obj/item/weapon/grenade/anti_photon(src) - new /obj/item/weapon/grenade/anti_photon(src) - new /obj/item/weapon/grenade/anti_photon(src) - new /obj/item/weapon/grenade/anti_photon(src) + ..() + for(var/i = 1 to 5) new /obj/item/weapon/grenade/anti_photon(src) /obj/item/weapon/storage/box/frags @@ -352,73 +262,63 @@ desc = "A box containing 5 military grade fragmentation grenades.
WARNING: These devices are extremely dangerous and can cause limb loss or death in repeated use." icon_state = "frag" +/obj/item/weapon/storage/box/frags/New() + ..() + for(var/i = 1 to 5) + new /obj/item/weapon/grenade/explosive(src) - New() - ..() - new /obj/item/weapon/grenade/explosive(src) - new /obj/item/weapon/grenade/explosive(src) - new /obj/item/weapon/grenade/explosive(src) - new /obj/item/weapon/grenade/explosive(src) - new /obj/item/weapon/grenade/explosive(src) +/obj/item/weapon/storage/box/metalfoam + name = "box of metal foam grenades." + desc = "A box containing 7 metal foam grenades." + icon_state = "flashbang" + +/obj/item/weapon/storage/box/metalfoam/New() + ..() + for(var/i = 1 to 7) + new /obj/item/weapon/grenade/chem_grenade/metalfoam /obj/item/weapon/storage/box/trackimp name = "boxed tracking implant kit" desc = "Box full of scum-bag tracking utensils." icon_state = "implant" - New() - ..() +/obj/item/weapon/storage/box/trackimp/New() + ..() + for(var/i = 1 to 4) new /obj/item/weapon/implantcase/tracking(src) - new /obj/item/weapon/implantcase/tracking(src) - new /obj/item/weapon/implantcase/tracking(src) - new /obj/item/weapon/implantcase/tracking(src) - new /obj/item/weapon/implanter(src) - new /obj/item/weapon/implantpad(src) - new /obj/item/weapon/locator(src) + new /obj/item/weapon/implanter(src) + new /obj/item/weapon/implantpad(src) + new /obj/item/weapon/locator(src) /obj/item/weapon/storage/box/chemimp name = "boxed chemical implant kit" desc = "Box of stuff used to implant chemicals." icon_state = "implant" - New() - ..() +/obj/item/weapon/storage/box/chemimp/New() + ..() + for(var/i = 1 to 5) new /obj/item/weapon/implantcase/chem(src) - new /obj/item/weapon/implantcase/chem(src) - new /obj/item/weapon/implantcase/chem(src) - new /obj/item/weapon/implantcase/chem(src) - new /obj/item/weapon/implantcase/chem(src) - new /obj/item/weapon/implanter(src) - new /obj/item/weapon/implantpad(src) - - + new /obj/item/weapon/implanter(src) + new /obj/item/weapon/implantpad(src) /obj/item/weapon/storage/box/rxglasses name = "box of prescription glasses" desc = "This box contains nerd glasses." icon_state = "glasses" - New() - ..() - new /obj/item/clothing/glasses/regular(src) - new /obj/item/clothing/glasses/regular(src) - new /obj/item/clothing/glasses/regular(src) - new /obj/item/clothing/glasses/regular(src) - new /obj/item/clothing/glasses/regular(src) - new /obj/item/clothing/glasses/regular(src) +/obj/item/weapon/storage/box/rxglasses/New() + ..() + for(var/i = 1 to 7) new /obj/item/clothing/glasses/regular(src) /obj/item/weapon/storage/box/drinkingglasses name = "box of drinking glasses" desc = "It has a picture of drinking glasses on it." - New() - ..() - new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src) - new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src) - new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src) - new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src) - new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src) +/obj/item/weapon/storage/box/drinkingglasses/New() + ..() + for(var/i = 1 to 7) new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src) /obj/item/weapon/storage/box/cdeathalarm_kit @@ -427,57 +327,38 @@ icon_state = "implant" item_state = "syringe_kit" - New() - ..() - new /obj/item/weapon/implanter(src) - new /obj/item/weapon/implantcase/death_alarm(src) - new /obj/item/weapon/implantcase/death_alarm(src) - new /obj/item/weapon/implantcase/death_alarm(src) - new /obj/item/weapon/implantcase/death_alarm(src) - new /obj/item/weapon/implantcase/death_alarm(src) +/obj/item/weapon/storage/box/cdeathalarm_kit/New() + ..() + for(var/i = 1 to 7) new /obj/item/weapon/implantcase/death_alarm(src) + new /obj/item/weapon/implanter(src) /obj/item/weapon/storage/box/condimentbottles name = "box of condiment bottles" desc = "It has a large ketchup smear on it." - New() - ..() +/obj/item/weapon/storage/box/condimentbottles/New() + ..() + for(var/i = 1 to 7) new /obj/item/weapon/reagent_containers/food/condiment(src) - new /obj/item/weapon/reagent_containers/food/condiment(src) - new /obj/item/weapon/reagent_containers/food/condiment(src) - new /obj/item/weapon/reagent_containers/food/condiment(src) - new /obj/item/weapon/reagent_containers/food/condiment(src) - new /obj/item/weapon/reagent_containers/food/condiment(src) - - /obj/item/weapon/storage/box/cups name = "box of paper cups" desc = "It has pictures of paper cups on the front." - New() - ..() - new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src ) - new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src ) - new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src ) - new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src ) - new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src ) - new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src ) - new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src ) +/obj/item/weapon/storage/box/cups/New() + ..() + for(var/i = 1 to 7) + new /obj/item/weapon/reagent_containers/food/drinks/sillycup(src) /obj/item/weapon/storage/box/donkpockets name = "box of donk-pockets" desc = "Instructions: Heat in microwave. Product will cool if not eaten within seven minutes." icon_state = "donk_kit" - New() - ..() - new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src) - new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src) - new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src) - new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src) - new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src) +/obj/item/weapon/storage/box/donkpockets/New() + ..() + for(var/i = 1 to 7) new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src) /obj/item/weapon/storage/box/sinpockets @@ -485,13 +366,9 @@ desc = "Instructions: Crush bottom of package to initiate chemical heating. Wait for 20 seconds before consumption. Product will cool if not eaten within seven minutes." icon_state = "donk_kit" - New() - ..() - new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src) - new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src) - new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src) - new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src) - new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src) +/obj/item/weapon/storage/box/sinpockets/New() + ..() + for(var/i = 1 to 7) new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src) /obj/item/weapon/storage/box/monkeycubes @@ -500,112 +377,88 @@ icon = 'icons/obj/food.dmi' icon_state = "monkeycubebox" can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube) - New() - ..() - if(src.type == /obj/item/weapon/storage/box/monkeycubes) - for(var/i = 1 to 5) - new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src) + +/obj/item/weapon/storage/box/monkeycubes/New() + ..() + if(src.type == /obj/item/weapon/storage/box/monkeycubes) + for(var/i = 1 to 4) + new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src) /obj/item/weapon/storage/box/monkeycubes/farwacubes name = "farwa cube box" desc = "Drymate brand farwa cubes, shipped from Ahdomai. Just add water!" - New() - ..() - for(var/i = 1 to 5) - new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/farwacube(src) + +/obj/item/weapon/storage/box/monkeycubes/farwacubes/New() + ..() + for(var/i = 1 to 4) + new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/farwacube(src) /obj/item/weapon/storage/box/monkeycubes/stokcubes name = "stok cube box" desc = "Drymate brand stok cubes, shipped from Moghes. Just add water!" - New() - ..() - for(var/i = 1 to 5) - new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/stokcube(src) + +/obj/item/weapon/storage/box/monkeycubes/stokcubes/New() + ..() + for(var/i = 1 to 4) + new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/stokcube(src) /obj/item/weapon/storage/box/monkeycubes/neaeracubes name = "neaera cube box" desc = "Drymate brand neaera cubes, shipped from Jargon 4. Just add water!" - New() - ..() - for(var/i = 1 to 5) - new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube(src) + +/obj/item/weapon/storage/box/monkeycubes/neaeracubes/New() + ..() + for(var/i = 1 to 4) + new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube(src) /obj/item/weapon/storage/box/ids name = "box of spare IDs" desc = "Has so many empty IDs." icon_state = "id" - New() - ..() +/obj/item/weapon/storage/box/ids/New() + ..() + for(var/i = 1 to 7) new /obj/item/weapon/card/id(src) - new /obj/item/weapon/card/id(src) - new /obj/item/weapon/card/id(src) - new /obj/item/weapon/card/id(src) - new /obj/item/weapon/card/id(src) - new /obj/item/weapon/card/id(src) - new /obj/item/weapon/card/id(src) - /obj/item/weapon/storage/box/seccarts name = "box of spare R.O.B.U.S.T. Cartridges" desc = "A box full of R.O.B.U.S.T. Cartridges, used by Security." icon_state = "pda" - New() - ..() +/obj/item/weapon/storage/box/seccarts/New() + ..() + for(var/i = 1 to 7) new /obj/item/weapon/cartridge/security(src) - new /obj/item/weapon/cartridge/security(src) - new /obj/item/weapon/cartridge/security(src) - new /obj/item/weapon/cartridge/security(src) - new /obj/item/weapon/cartridge/security(src) - new /obj/item/weapon/cartridge/security(src) - new /obj/item/weapon/cartridge/security(src) - /obj/item/weapon/storage/box/handcuffs name = "box of spare handcuffs" desc = "A box full of handcuffs." icon_state = "handcuff" - New() - ..() +/obj/item/weapon/storage/box/handcuffs/New() + ..() + for(var/i = 1 to 7) new /obj/item/weapon/handcuffs(src) - new /obj/item/weapon/handcuffs(src) - new /obj/item/weapon/handcuffs(src) - new /obj/item/weapon/handcuffs(src) - new /obj/item/weapon/handcuffs(src) - new /obj/item/weapon/handcuffs(src) - new /obj/item/weapon/handcuffs(src) - /obj/item/weapon/storage/box/mousetraps name = "box of Pest-B-Gon mousetraps" desc = "WARNING: Keep out of reach of children." icon_state = "mousetraps" - New() - ..() - new /obj/item/device/assembly/mousetrap( src ) - new /obj/item/device/assembly/mousetrap( src ) - new /obj/item/device/assembly/mousetrap( src ) - new /obj/item/device/assembly/mousetrap( src ) - new /obj/item/device/assembly/mousetrap( src ) - new /obj/item/device/assembly/mousetrap( src ) +/obj/item/weapon/storage/box/mousetraps/New() + ..() + for(var/i = 1 to 7) + new /obj/item/device/assembly/mousetrap(src) /obj/item/weapon/storage/box/pillbottles name = "box of pill bottles" desc = "It has pictures of pill bottles on its front." - New() - ..() - new /obj/item/weapon/storage/pill_bottle( src ) - new /obj/item/weapon/storage/pill_bottle( src ) - new /obj/item/weapon/storage/pill_bottle( src ) - new /obj/item/weapon/storage/pill_bottle( src ) - new /obj/item/weapon/storage/pill_bottle( src ) - new /obj/item/weapon/storage/pill_bottle( src ) - new /obj/item/weapon/storage/pill_bottle( src ) - +/obj/item/weapon/storage/box/pillbottles/New() + ..() + for(var/i = 1 to 7) + new /obj/item/weapon/storage/pill_bottle(src) /obj/item/weapon/storage/box/snappops name = "snap pop box" @@ -613,10 +466,11 @@ icon = 'icons/obj/toy.dmi' icon_state = "spbox" can_hold = list(/obj/item/toy/snappop) - New() - ..() - for(var/i = 1 to 8) - new /obj/item/toy/snappop(src) + +/obj/item/weapon/storage/box/snappops/New() + ..() + for(var/i = 1 to 8) + new /obj/item/toy/snappop(src) /obj/item/weapon/storage/box/matches name = "matchbox" @@ -628,28 +482,29 @@ slot_flags = SLOT_BELT can_hold = list(/obj/item/weapon/flame/match) - New() - ..() - for(var/i=1 to 10) - new /obj/item/weapon/flame/match(src) +/obj/item/weapon/storage/box/matches/New() + ..() + for(var/i=1 to 10) + new /obj/item/weapon/flame/match(src) - attackby(obj/item/weapon/flame/match/W as obj, mob/user as mob) - if(istype(W) && !W.lit && !W.burnt) - W.lit = 1 - W.damtype = "burn" - W.icon_state = "match_lit" - processing_objects.Add(W) - W.update_icon() - return +/obj/item/weapon/storage/box/matches/attackby(obj/item/weapon/flame/match/W as obj, mob/user as mob) + if(istype(W) && !W.lit && !W.burnt) + W.lit = 1 + W.damtype = "burn" + W.icon_state = "match_lit" + processing_objects.Add(W) + W.update_icon() + return /obj/item/weapon/storage/box/autoinjectors name = "box of injectors" desc = "Contains autoinjectors." icon_state = "syringe" - New() - ..() - for (var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/hypospray/autoinjector(src) + +/obj/item/weapon/storage/box/autoinjectors/New() + ..() + for (var/i = 1 to 7) + new /obj/item/weapon/reagent_containers/hypospray/autoinjector(src) /obj/item/weapon/storage/box/lights name = "box of replacement bulbs" @@ -664,7 +519,7 @@ /obj/item/weapon/storage/box/lights/bulbs/New() ..() - for(var/i = 0; i < 21; i++) + for(var/i = 1 to 24) new /obj/item/weapon/light/bulb(src) /obj/item/weapon/storage/box/lights/tubes @@ -673,7 +528,7 @@ /obj/item/weapon/storage/box/lights/tubes/New() ..() - for(var/i = 0; i < 21; i++) + for(var/i = 1 to 24) new /obj/item/weapon/light/tube(src) /obj/item/weapon/storage/box/lights/mixed @@ -682,9 +537,9 @@ /obj/item/weapon/storage/box/lights/mixed/New() ..() - for(var/i = 0; i < 14; i++) + for(var/i = 1 to 16) new /obj/item/weapon/light/tube(src) - for(var/i = 0; i < 7; i++) + for(var/i = 1 to 8) new /obj/item/weapon/light/bulb(src) /obj/item/weapon/storage/box/freezer @@ -699,3 +554,20 @@ max_storage_space = 21 use_to_pickup = 1 // for picking up broken bulbs, not that most people will try +/obj/item/weapon/storage/box/ambrosia + name = "ambrosia seeds box" + desc = "Contains the seeds you need to get a little high." + +/obj/item/weapon/storage/box/ambrosia/New() + ..() + for(var/i = 1 to 7) + new /obj/item/seeds/ambrosiavulgarisseed(src) + +/obj/item/weapon/storage/box/ambrosiadeus + name = "ambrosia deus seeds box" + desc = "Contains the seeds you need to get a proper healthy high." + +/obj/item/weapon/storage/box/ambrosiadeus/New() + ..() + for(var/i = 1 to 7) + new /obj/item/seeds/ambrosiadeusseed(src) \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/laundry_basket.dm b/code/game/objects/items/weapons/storage/laundry_basket.dm index ab8ca23c9bf..ffb4867ca68 100644 --- a/code/game/objects/items/weapons/storage/laundry_basket.dm +++ b/code/game/objects/items/weapons/storage/laundry_basket.dm @@ -82,6 +82,6 @@ use_to_pickup = 0 /obj/item/weapon/storage/laundry_basket/offhand/dropped(mob/user as mob) - user.removeItem(linked, force = 1) + user.drop_from_inventory(linked) return diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm index e8f09a0ab31..7288d2d038e 100644 --- a/code/game/objects/items/weapons/storage/lockbox.dm +++ b/code/game/objects/items/weapons/storage/lockbox.dm @@ -26,6 +26,7 @@ if(src.locked) src.icon_state = src.icon_locked user << "You lock \the [src]!" + close_all() return else src.icon_state = src.icon_closed diff --git a/code/game/objects/items/weapons/storage/misc.dm b/code/game/objects/items/weapons/storage/misc.dm index 8d954d53062..cf1af1ea791 100644 --- a/code/game/objects/items/weapons/storage/misc.dm +++ b/code/game/objects/items/weapons/storage/misc.dm @@ -16,6 +16,7 @@ icon_state = "donutbox" name = "donut box" var/startswith = 6 + max_storage_space = 12 can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut) foldable = /obj/item/stack/material/cardboard diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index aaea243a7e4..2df9701436a 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -45,7 +45,6 @@ ..() /obj/item/weapon/storage/MouseDrop(obj/over_object as obj) - if(!canremove) return @@ -69,7 +68,7 @@ if (( usr.restrained() ) || ( usr.stat )) return - if ((src.loc == usr) && !usr.removeItem(src)) + if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src)) return switch(over_object.name) @@ -347,7 +346,7 @@ /obj/item/weapon/storage/proc/handle_item_insertion(obj/item/W as obj, prevent_warning = 0) if(!istype(W)) return 0 if(usr) - usr.removeItem(W) + usr.remove_from_mob(W) usr.update_icons() //update our overlays W.loc = src W.on_enter_storage(src) diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index 8c6365d6fd4..13cbc06dc7a 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -136,10 +136,10 @@ filled = TRUE /obj/item/weapon/storage/toolbox/lunchbox/mars - name = "\improper Mars university lunchbox" + name = "\improper Mojave university lunchbox" icon_state = "lunchbox_marsuniversity" item_state = "toolbox_red" - desc = "A little lunchbox. This one is branded with the Mars university logo!" + desc = "A little lunchbox. This one is branded with the Mojave university logo!" /obj/item/weapon/storage/toolbox/lunchbox/mars/filled filled = TRUE diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 16803eac9bd..b9a4f616b34 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -155,6 +155,9 @@ ..() //secborg stun baton module +/obj/item/weapon/melee/baton/robot + hitcost = 500 + /obj/item/weapon/melee/baton/robot/attack_self(mob/user) //try to find our power cell var/mob/living/silicon/robot/R = loc diff --git a/code/game/objects/items/weapons/surgery_limbattachment.dm b/code/game/objects/items/weapons/surgery_limbattachment.dm deleted file mode 100644 index 4ba10524f2b..00000000000 --- a/code/game/objects/items/weapons/surgery_limbattachment.dm +++ /dev/null @@ -1,71 +0,0 @@ -/obj/item/robot_parts/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob) - var/limbloc = null - - if(!istype(M)) - return ..() - - if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66)))) - return ..() - - if(!istype(M, /mob/living/carbon/human)) - return ..() - - if((user.zone_sel.selecting == "l_arm") && (istype(src, /obj/item/robot_parts/l_arm))) - limbloc = "l_hand" - else if((user.zone_sel.selecting == "r_arm") && (istype(src, /obj/item/robot_parts/r_arm))) - limbloc = "r_hand" - else if((user.zone_sel.selecting == "r_leg") && (istype(src, /obj/item/robot_parts/r_leg))) - limbloc = "r_foot" - else if((user.zone_sel.selecting == "l_leg") && (istype(src, /obj/item/robot_parts/l_leg))) - limbloc = "l_foot" - else - user << "That doesn't fit there!" - return ..() - - var/mob/living/carbon/human/H = M - var/datum/organ/external/S = H.organs[user.zone_sel.selecting] - if(S.status & ORGAN_DESTROYED) - if(!(S.status & ORGAN_ATTACHABLE)) - user << "The wound is not ready for a replacement!" - return 0 - if(M != user) - M.visible_message( \ - "\The [user] is beginning to attach \the [src] where [H]'s [S.display_name] used to be.", \ - "\The [user] begins to attach \the [src] where your [S.display_name] used to be.") - else - M.visible_message( \ - "\The [user] begins to attach a robotic limb where \his [S.display_name] used to be with [src].", \ - "You begin to attach \the [src] where your [S.display_name] used to be.") - - if(do_mob(user, H, 100)) - if(M != user) - M.visible_message( \ - "\The [user] finishes attaching [H]'s new [S.display_name].", \ - "\The [user] finishes attaching your new [S.display_name].") - else - M.visible_message( \ - "\The [user] finishes attaching \his new [S.display_name].", \ - "You finish attaching your new [S.display_name].") - - if(H == user && prob(25)) - user << "You mess up!" - S.take_damage(15) - - S.status &= ~ORGAN_BROKEN - S.status &= ~ORGAN_SPLINTED - S.status &= ~ORGAN_ATTACHABLE - S.status &= ~ORGAN_DESTROYED - S.status |= ORGAN_ROBOT - var/datum/organ/external/T = H.organs["[limbloc]"] - T.status &= ~ORGAN_BROKEN - T.status &= ~ORGAN_SPLINTED - T.status &= ~ORGAN_ATTACHABLE - T.status &= ~ORGAN_DESTROYED - T.status |= ORGAN_ROBOT - H.update_body() - M.updatehealth() - M.UpdateDamageIcon() - qdel(src) - - return 1 - return 0 diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index b51e28162db..c10e83511f8 100644 --- a/code/game/objects/items/weapons/tanks/tank_types.dm +++ b/code/game/objects/items/weapons/tanks/tank_types.dm @@ -104,7 +104,8 @@ if ((!F.status)||(F.ptank)) return src.master = F F.ptank = src - user.removeItem(src, F) + user.remove_from_mob(src) + src.loc = F return /* diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index 4ad7d118513..0eea22ea52d 100644 --- a/code/game/objects/items/weapons/tape.dm +++ b/code/game/objects/items/weapons/tape.dm @@ -62,7 +62,8 @@ else if(user.zone_sel.selecting == "r_hand" || user.zone_sel.selecting == "l_hand") var/obj/item/weapon/handcuffs/cable/tape/T = new(user) if(!T.place_handcuffs(H, user)) - user.deleteItem(T) + user.unEquip(T) + qdel(T) else return ..() return 1 @@ -70,7 +71,7 @@ /obj/item/weapon/tape_roll/proc/stick(var/obj/item/weapon/W, mob/user) if(!istype(W, /obj/item/weapon/paper)) return - user.removeItem(W) + user.drop_from_inventory(W) var/obj/item/weapon/ducttape/tape = new(get_turf(src)) tape.attach(W) user.put_in_hands(tape) @@ -106,7 +107,7 @@ user << "You remove \the [initial(name)] from [stuck]." - user.removeItem(src) + user.drop_from_inventory(src) stuck.forceMove(get_turf(src)) user.put_in_hands(stuck) stuck = null @@ -128,7 +129,8 @@ user << "You cannot reach that from here." // can only place stuck papers in cardinal directions, to return // reduce papers around corners issue. - user.removeItem(src, source_turf) + user.drop_from_inventory(src) + forceMove(source_turf) if(params) var/list/mouse_control = params2list(params) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 83d3296981c..b39fc0dd27e 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -46,6 +46,7 @@ throw_range = 5 matter = list(DEFAULT_WALL_MATERIAL = 75) attack_verb = list("stabbed") + sharp = 1 suicide_act(mob/user) viewers(user) << pick("\The [user] is stabbing the [src.name] into \his temple! It looks like \he's trying to commit suicide.", \ @@ -195,12 +196,12 @@ if (user.client) user.client.screen -= src if (user.r_hand == src) - user.removeItem(src) + user.remove_from_mob(src) else - user.removeItem(src) + user.remove_from_mob(src) src.master = F src.layer = initial(src.layer) - user.removeItem(src) + user.remove_from_mob(src) if (user.client) user.client.screen -= src src.loc = F @@ -427,21 +428,18 @@ var/mob/living/carbon/human/H = A var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting] - if(!S || !(S.status & ORGAN_ROBOT)) + if(!S || S.robotic < ORGAN_ROBOT || S.open == 3) return ..() - if(S.brute_dam) - if(S.brute_dam < ROBOLIMB_SELF_REPAIR_CAP) - S.heal_damage(15,0,0,1) - user.visible_message("\The [user] patches some dents on \the [H]'s [S.name] with \the [src].") - else if(S.open < 3) - user << "The damage is far too severe to patch over externally." - else - return ..() - else - user << "Nothing to fix!" - return - return ..() + if(!welding) + user << "You'll need to turn [src] on to patch the damage on [H]'s [S.name]!" + return 1 + + if(S.robo_repair(15, BRUTE, "some dents", src, user)) + remove_fuel(1, user) + + else + return ..() /*/obj/item/weapon/combitool name = "combi-tool" diff --git a/code/game/objects/items/weapons/towels.dm b/code/game/objects/items/weapons/towels.dm new file mode 100644 index 00000000000..94c266142e5 --- /dev/null +++ b/code/game/objects/items/weapons/towels.dm @@ -0,0 +1,14 @@ +/obj/item/weapon/towel + name = "towel" + icon = 'icons/obj/weapons.dmi' + icon_state = "towel" + slot_flags = SLOT_HEAD | SLOT_BELT | SLOT_OCLOTHING + force = 3.0 + w_class = 3.0 + attack_verb = list("whipped") + hitsound = 'sound/weapons/towelwhip.ogg' + desc = "A soft cotton towel." + +/obj/item/weapon/towel/attack_self(mob/living/user as mob) + user.visible_message(text("[] uses [] to towel themselves off.", user, src)) + playsound(user, 'sound/weapons/towelwipe.ogg', 25, 1) diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm index 783a9f515d4..9c355356b39 100644 --- a/code/game/objects/items/weapons/traps.dm +++ b/code/game/objects/items/weapons/traps.dm @@ -36,7 +36,7 @@ ) deployed = 1 - user.removeItem(src) + user.drop_from_inventory(src) update_icon() anchored = 1 diff --git a/code/game/objects/random/random.dm b/code/game/objects/random/random.dm index e64d422a205..1127bf75102 100644 --- a/code/game/objects/random/random.dm +++ b/code/game/objects/random/random.dm @@ -108,7 +108,7 @@ 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,\ + prob(3);/obj/item/stack/cable_coil/random,\ prob(2);/obj/random/toolbox,\ prob(2);/obj/item/weapon/storage/belt/utility,\ prob(5);/obj/random/tool,\ diff --git a/code/game/objects/structures/coathanger.dm b/code/game/objects/structures/coathanger.dm index 0050c8ca940..625af060db7 100644 --- a/code/game/objects/structures/coathanger.dm +++ b/code/game/objects/structures/coathanger.dm @@ -21,7 +21,7 @@ if (can_hang && !coat) user.visible_message("[user] hangs [W] on \the [src].", "You hang [W] on the \the [src]") coat = W - user.removeItem(coat, src) + user.drop_from_inventory(coat, src) update_icon() else user << "You cannot hang [W] on [src]" diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 5029e166d21..d88e8c5372f 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -247,6 +247,16 @@ src.update_icon() for(var/mob/M in viewers(src)) M.show_message("[src] has been [welded?"welded shut":"unwelded"] by [user.name].", 3, "You hear welding.", 2) + else if(istype(W, /obj/item/weapon/wrench)) + if(welded) + if(anchored) + user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") + else + user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.") + if(do_after(user, 20)) + if(!src) return + user << "You [anchored? "un" : ""]secured \the [src]!" + anchored = !anchored else src.attack_hand(user) return diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm index f338b760fb5..13a567ca758 100644 --- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm +++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm @@ -66,7 +66,8 @@ user << "Unwield the axe first." return fireaxe = O - user.removeItem(O, src) + user.remove_from_mob(O) + src.contents += O user << "You place the fire axe back in the [src.name]." update_icon() else diff --git a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm index cc186812945..c7095514cc1 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm @@ -13,7 +13,7 @@ if(prob(75)) new /obj/item/weapon/storage/backpack(src) else - new /obj/item/weapon/storage/backpack/satchel_norm(src) + new /obj/item/weapon/storage/backpack/satchel/norm(src) if(prob(25)) new /obj/item/weapon/storage/backpack/dufflebag(src) new /obj/item/clothing/under/rank/cargotech(src) @@ -44,7 +44,7 @@ if(prob(75)) new /obj/item/weapon/storage/backpack(src) else - new /obj/item/weapon/storage/backpack/satchel_norm(src) + new /obj/item/weapon/storage/backpack/satchel/norm(src) if(prob(25)) new /obj/item/weapon/storage/backpack/dufflebag(src) new /obj/item/clothing/under/rank/cargo(src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm index cec9b898550..35a9b554389 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm @@ -14,13 +14,13 @@ if(prob(50)) new /obj/item/weapon/storage/backpack/industrial(src) else - new /obj/item/weapon/storage/backpack/satchel_eng(src) + new /obj/item/weapon/storage/backpack/satchel/eng(src) if(prob(50)) new /obj/item/weapon/storage/backpack/dufflebag/eng(src) new /obj/item/clothing/accessory/storage/brown_vest(src) new /obj/item/blueprints(src) new /obj/item/clothing/under/rank/chief_engineer(src) - new /obj/item/clothing/under/rank/chief_engineer/skirt(src) + new /obj/item/clothing/under/rank/engineer/chief_engineer/skirt(src) new /obj/item/clothing/head/hardhat/white(src) new /obj/item/clothing/head/welding(src) new /obj/item/clothing/gloves/yellow(src) @@ -113,7 +113,7 @@ if(prob(50)) new /obj/item/weapon/storage/backpack/industrial(src) else - new /obj/item/weapon/storage/backpack/satchel_eng(src) + new /obj/item/weapon/storage/backpack/satchel/eng(src) if(prob(50)) new /obj/item/weapon/storage/backpack/dufflebag/eng(src) new /obj/item/clothing/accessory/storage/brown_vest(src) @@ -147,7 +147,7 @@ if(prob(50)) new /obj/item/weapon/storage/backpack/industrial(src) else - new /obj/item/weapon/storage/backpack/satchel_eng(src) + new /obj/item/weapon/storage/backpack/satchel/eng(src) if(prob(50)) new /obj/item/weapon/storage/backpack/dufflebag/eng(src) new /obj/item/clothing/accessory/storage/brown_vest(src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm index 0722b5b0771..62401902b64 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm @@ -18,11 +18,10 @@ New() ..() - for(var/i = 0, i < 6, i++) + for(var/i = 1 to 7) new /obj/item/weapon/reagent_containers/food/condiment/flour(src) - new /obj/item/weapon/reagent_containers/food/condiment/sugar(src) - for(var/i = 0, i < 3, i++) - new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src) + for(var/i = 1 to 2) + new /obj/item/weapon/reagent_containers/food/condiment/sugar(src) return @@ -43,7 +42,7 @@ New() ..() - for(var/i = 0, i < 4, i++) + for(var/i = 1 to 10) new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src) return @@ -61,11 +60,11 @@ New() ..() - for(var/i = 0, i < 5, i++) + for(var/i = 1 to 6) new /obj/item/weapon/reagent_containers/food/drinks/milk(src) - for(var/i = 0, i < 3, i++) + for(var/i = 1 to 4) new /obj/item/weapon/reagent_containers/food/drinks/soymilk(src) - for(var/i = 0, i < 2, i++) + for(var/i = 1 to 4) new /obj/item/weapon/storage/fancy/egg_box(src) return @@ -84,10 +83,10 @@ New() ..() - for(var/i = 0, i < 3, i++) + for(var/i = 1 to 3) new /obj/item/weapon/spacecash/c1000(src) - for(var/i = 0, i < 5, i++) + for(var/i = 1 to 4) new /obj/item/weapon/spacecash/c500(src) - for(var/i = 0, i < 6, i++) + for(var/i = 1 to 5) new /obj/item/weapon/spacecash/c200(src) return diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm index ede4644923b..95d4fd3d064 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm @@ -65,7 +65,7 @@ if(prob(50)) new /obj/item/weapon/storage/backpack/medic(src) else - new /obj/item/weapon/storage/backpack/satchel_med(src) + new /obj/item/weapon/storage/backpack/satchel/med(src) if(prob(50)) new /obj/item/weapon/storage/backpack/dufflebag/med(src) new /obj/item/clothing/under/rank/nursesuit (src) @@ -169,7 +169,7 @@ if(prob(50)) new /obj/item/weapon/storage/backpack/medic(src) else - new /obj/item/weapon/storage/backpack/satchel_med(src) + new /obj/item/weapon/storage/backpack/satchel/med(src) if(prob(50)) new /obj/item/weapon/storage/backpack/dufflebag/med(src) new /obj/item/clothing/suit/bio_suit/cmo(src) @@ -192,7 +192,7 @@ new /obj/item/clothing/under/rank/medical/navyblue(src) new /obj/item/clothing/head/surgery/navyblue(src) new /obj/item/clothing/under/rank/chief_medical_officer(src) - new /obj/item/clothing/under/rank/chief_medical_officer/skirt(src) + new /obj/item/clothing/under/rank/medical/chief_medical_officer/skirt(src) new /obj/item/clothing/suit/storage/toggle/labcoat/cmo(src) new /obj/item/clothing/suit/storage/toggle/labcoat/cmoalt(src) new /obj/item/weapon/cartridge/cmo(src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm index d91b22fe74d..2930b8c0a02 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -10,7 +10,7 @@ if(prob(50)) new /obj/item/weapon/storage/backpack(src) else - new /obj/item/weapon/storage/backpack/satchel_norm(src) + new /obj/item/weapon/storage/backpack/satchel/norm(src) new /obj/item/device/radio/headset( src ) return @@ -94,7 +94,7 @@ else user << "Access Denied" return - + /obj/structure/closet/secure_closet/personal/emag_act(var/remaining_charges, var/mob/user, var/visual_feedback, var/audible_feedback) if(!broken) broken = 1 @@ -102,7 +102,7 @@ desc = "It appears to be broken." icon_state = src.icon_broken if(visual_feedback) - visible_message("[visual_feedback]", "[audible_feedback]") + visible_message("[visual_feedback]", "[audible_feedback]") return 1 /obj/structure/closet/secure_closet/personal/verb/reset() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index 1ce97a64a79..49fe7bbdd3a 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -87,6 +87,17 @@ spark_system.start() playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) playsound(src.loc, "sparks", 50, 1) + else if(istype(W, /obj/item/weapon/wrench)) + if(welded) + if(anchored) + user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") + else + user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.") + if(do_after(user, 20)) + if(!src) return + user << "You [anchored? "un" : ""]secured \the [src]!" + anchored = !anchored + return else if(istype(W,/obj/item/weapon/packageWrap) || istype(W,/obj/item/weapon/weldingtool)) return ..(W,user) else diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 5a692dc1c4a..6aa1ee66f64 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -88,13 +88,14 @@ icon_opened = "hossecureopen" icon_broken = "hossecurebroken" icon_off = "hossecureoff" + storage_capacity = 2.5 * MOB_MEDIUM New() ..() if(prob(50)) new /obj/item/weapon/storage/backpack/security(src) else - new /obj/item/weapon/storage/backpack/satchel_sec(src) + new /obj/item/weapon/storage/backpack/satchel/sec(src) if(prob(50)) new /obj/item/weapon/storage/backpack/dufflebag/sec(src) new /obj/item/clothing/head/helmet/HoS(src) @@ -143,7 +144,7 @@ if(prob(50)) new /obj/item/weapon/storage/backpack/security(src) else - new /obj/item/weapon/storage/backpack/satchel_sec(src) + new /obj/item/weapon/storage/backpack/satchel/sec(src) if(prob(50)) new /obj/item/weapon/storage/backpack/dufflebag/sec(src) new /obj/item/clothing/suit/storage/vest/warden(src) @@ -187,7 +188,7 @@ if(prob(50)) new /obj/item/weapon/storage/backpack/security(src) else - new /obj/item/weapon/storage/backpack/satchel_sec(src) + new /obj/item/weapon/storage/backpack/satchel/sec(src) if(prob(50)) new /obj/item/weapon/storage/backpack/dufflebag/sec(src) new /obj/item/clothing/suit/storage/vest/officer(src) diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm index 0c49681489c..2e342e55cf3 100644 --- a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm +++ b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm @@ -14,15 +14,15 @@ if(prob(50)) new /obj/item/weapon/storage/backpack/security(src) else - new /obj/item/weapon/storage/backpack/satchel_sec(src) + new /obj/item/weapon/storage/backpack/satchel/sec(src) if(prob(50)) new /obj/item/weapon/storage/backpack/security(src) else - new /obj/item/weapon/storage/backpack/satchel_sec(src) + new /obj/item/weapon/storage/backpack/satchel/sec(src) if(prob(50)) new /obj/item/weapon/storage/backpack/security(src) else - new /obj/item/weapon/storage/backpack/satchel_sec(src) + new /obj/item/weapon/storage/backpack/satchel/sec(src) new /obj/item/clothing/under/rank/security(src) new /obj/item/clothing/under/rank/security(src) new /obj/item/clothing/under/rank/security(src) @@ -246,9 +246,9 @@ new /obj/item/clothing/under/rank/atmospheric_technician(src) new /obj/item/clothing/under/rank/atmospheric_technician(src) new /obj/item/clothing/under/rank/atmospheric_technician(src) - new /obj/item/clothing/under/rank/atmospheric_technician/skirt(src) - new /obj/item/clothing/under/rank/atmospheric_technician/skirt(src) - new /obj/item/clothing/under/rank/atmospheric_technician/skirt(src) + new /obj/item/clothing/under/rank/engineer/atmospheric_technician/skirt(src) + new /obj/item/clothing/under/rank/engineer/atmospheric_technician/skirt(src) + new /obj/item/clothing/under/rank/engineer/atmospheric_technician/skirt(src) new /obj/item/clothing/shoes/black(src) new /obj/item/clothing/shoes/black(src) new /obj/item/clothing/shoes/black(src) @@ -361,8 +361,8 @@ new /obj/item/clothing/suit/storage/hooded/wintercoat/science(src) new /obj/item/weapon/storage/backpack/toxins(src) new /obj/item/weapon/storage/backpack/toxins(src) - new /obj/item/weapon/storage/backpack/satchel_tox(src) - new /obj/item/weapon/storage/backpack/satchel_tox(src) + new /obj/item/weapon/storage/backpack/satchel/tox(src) + new /obj/item/weapon/storage/backpack/satchel/tox(src) return /obj/structure/closet/wardrobe/robotics_black @@ -382,8 +382,8 @@ new /obj/item/clothing/gloves/black(src) new /obj/item/weapon/storage/backpack/toxins(src) new /obj/item/weapon/storage/backpack/toxins(src) - new /obj/item/weapon/storage/backpack/satchel_tox(src) - new /obj/item/weapon/storage/backpack/satchel_tox(src) + new /obj/item/weapon/storage/backpack/satchel/tox(src) + new /obj/item/weapon/storage/backpack/satchel/tox(src) return @@ -396,16 +396,16 @@ ..() new /obj/item/clothing/under/rank/chemist(src) new /obj/item/clothing/under/rank/chemist(src) - new /obj/item/clothing/under/rank/chemist/skirt(src) - new /obj/item/clothing/under/rank/chemist/skirt(src) + new /obj/item/clothing/under/rank/medical/chemist/skirt(src) + new /obj/item/clothing/under/rank/medical/chemist/skirt(src) new /obj/item/clothing/shoes/white(src) new /obj/item/clothing/shoes/white(src) new /obj/item/clothing/suit/storage/toggle/labcoat/chemist(src) new /obj/item/clothing/suit/storage/toggle/labcoat/chemist(src) new /obj/item/weapon/storage/backpack/chemistry(src) new /obj/item/weapon/storage/backpack/chemistry(src) - new /obj/item/weapon/storage/backpack/satchel_chem(src) - new /obj/item/weapon/storage/backpack/satchel_chem(src) + new /obj/item/weapon/storage/backpack/satchel/chem(src) + new /obj/item/weapon/storage/backpack/satchel/chem(src) return @@ -418,16 +418,16 @@ ..() new /obj/item/clothing/under/rank/geneticist(src) new /obj/item/clothing/under/rank/geneticist(src) - new /obj/item/clothing/under/rank/geneticist/skirt(src) - new /obj/item/clothing/under/rank/geneticist/skirt(src) + new /obj/item/clothing/under/rank/medical/geneticist/skirt(src) + new /obj/item/clothing/under/rank/medical/geneticist/skirt(src) new /obj/item/clothing/shoes/white(src) new /obj/item/clothing/shoes/white(src) new /obj/item/clothing/suit/storage/toggle/labcoat/genetics(src) new /obj/item/clothing/suit/storage/toggle/labcoat/genetics(src) new /obj/item/weapon/storage/backpack/genetics(src) new /obj/item/weapon/storage/backpack/genetics(src) - new /obj/item/weapon/storage/backpack/satchel_gen(src) - new /obj/item/weapon/storage/backpack/satchel_gen(src) + new /obj/item/weapon/storage/backpack/satchel/gen(src) + new /obj/item/weapon/storage/backpack/satchel/gen(src) return @@ -440,8 +440,8 @@ ..() new /obj/item/clothing/under/rank/virologist(src) new /obj/item/clothing/under/rank/virologist(src) - new /obj/item/clothing/under/rank/virologist/skirt(src) - new /obj/item/clothing/under/rank/virologist/skirt(src) + new /obj/item/clothing/under/rank/medical/virologist/skirt(src) + new /obj/item/clothing/under/rank/medical/virologist/skirt(src) new /obj/item/clothing/shoes/white(src) new /obj/item/clothing/shoes/white(src) new /obj/item/clothing/suit/storage/toggle/labcoat/virologist(src) @@ -450,8 +450,8 @@ new /obj/item/clothing/mask/surgical(src) new /obj/item/weapon/storage/backpack/virology(src) new /obj/item/weapon/storage/backpack/virology(src) - new /obj/item/weapon/storage/backpack/satchel_vir(src) - new /obj/item/weapon/storage/backpack/satchel_vir(src) + new /obj/item/weapon/storage/backpack/satchel/vir(src) + new /obj/item/weapon/storage/backpack/satchel/vir(src) return @@ -517,9 +517,9 @@ new /obj/item/clothing/under/color/yellow(src) new /obj/item/clothing/under/color/green(src) new /obj/item/clothing/under/color/pink(src) - new /obj/item/clothing/under/dress/plaid_blue(src) - new /obj/item/clothing/under/dress/plaid_red(src) - new /obj/item/clothing/under/dress/plaid_purple(src) + new /obj/item/clothing/under/skirt/plaid_blue(src) + new /obj/item/clothing/under/skirt/plaid_red(src) + new /obj/item/clothing/under/skirt/plaid_purple(src) new /obj/item/clothing/shoes/blue(src) new /obj/item/clothing/shoes/yellow(src) new /obj/item/clothing/shoes/green(src) @@ -626,7 +626,7 @@ new /obj/item/clothing/shoes/brown(src) new /obj/item/clothing/gloves/captain(src) new /obj/item/clothing/under/dress/dress_cap(src) - new /obj/item/weapon/storage/backpack/satchel_cap(src) + new /obj/item/weapon/storage/backpack/satchel/cap(src) new /obj/item/clothing/head/caphat/formal(src) new /obj/item/clothing/under/captainformal(src) new /obj/item/clothing/suit/storage/hooded/wintercoat/captain(src) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 8ce2a88f244..2dcb1ddaad8 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -55,6 +55,9 @@ /obj/structure/displaycase/attackby(obj/item/weapon/W as obj, mob/user as mob) + user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) + user.do_attack_animation(src) + playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1) src.health -= W.force src.healthcheck() ..() diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index cd859b1489d..89e841bc580 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -282,8 +282,7 @@ else path = text2path("/obj/machinery/door/airlock[airlock_type]") - var/obj/machinery/door/new_airlock = new path(src.loc, src) - new_airlock.dir = src.dir + new path(src.loc, src) qdel(src) else ..() diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index 9af8021d44e..dcc0270abc4 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -27,7 +27,8 @@ return if(istype(O, /obj/item/weapon/extinguisher)) if(!has_extinguisher && opened) - user.removeItem(O, src) + user.remove_from_mob(O) + contents += O has_extinguisher = O user << "You place [O] in [src]." else diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 867dada6d91..9c103a8ed28 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -143,7 +143,8 @@ user << "You begin adding the plating..." - if(!do_after(user,40) || !S.use(2)) + var/amount_to_use = reinf_material ? 1 : 2 + if(!do_after(user,40) || !S.use(amount_to_use)) return 1 //once we've gotten this far don't call parent attackby() if(anchored) @@ -167,7 +168,7 @@ user << "\The [src] is already reinforced." return 0 - if(S.get_amount() < 2) + if(S.get_amount() < 1) user << "There isn't enough material here to reinforce the girder." return 0 @@ -177,7 +178,7 @@ return 0 user << "Now reinforcing..." - if (!do_after(user,40) || !S.use(2)) + if (!do_after(user,40) || !S.use(1)) return 1 //don't call parent attackby() past this point user << "You added reinforcement!" diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 949cbc1ff67..bd280787827 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -18,6 +18,7 @@ dir = EAST density = 1 var/obj/structure/m_tray/connected = null + var/list/occupants = list() anchored = 1.0 /obj/structure/morgue/Destroy() @@ -26,12 +27,28 @@ connected = null return ..() -/obj/structure/morgue/proc/update() +/obj/structure/morgue/proc/get_occupants() + occupants.Cut() + for(var/mob/living/carbon/human/H in contents) + occupants += H + for(var/obj/structure/closet/body_bag/B in contents) + occupants += B.get_occupants() + +/obj/structure/morgue/proc/update(var/broadcast=0) if (src.connected) src.icon_state = "morgue0" else if (src.contents.len) src.icon_state = "morgue2" + get_occupants() + for (var/mob/living/carbon/human/H in occupants) + if(H.isSynthetic() || H.suiciding || !H.ckey || !H.client || (NOCLONE in H.mutations) || (H.species && H.species.flags & NO_SCAN)) + src.icon_state = "morgue2" + break + else + src.icon_state = "morgue3" + if(broadcast) + broadcast_medical_hud_message("[src] was able to establish a mental interface with occupant.", src) else src.icon_state = "morgue1" return diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index 8dbc65edbc1..174634e3cb9 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -33,7 +33,8 @@ if(notices < 5) O.add_fingerprint(user) add_fingerprint(user) - user.removeItem(O, src) + user.drop_from_inventory(O) + O.loc = src notices++ icon_state = "nboard0[notices]" //update sprite user << "You pin the paper to the noticeboard." diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index f933bff418c..73914e113cc 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -96,7 +96,9 @@ user << "\The [src] is already padded." return var/obj/item/stack/C = W - if(C.get_amount() < 1) + if(C.get_amount() < 1) // How?? + user.drop_from_inventory(C) + qdel(C) return var/padding_type //This is awful but it needs to be like this until tiles are given a material var. if(istype(W,/obj/item/stack/tile/carpet)) @@ -110,7 +112,8 @@ return C.use(1) if(!istype(src.loc, /turf)) - user.removeItem(src, get_turf(src)) + user.drop_from_inventory(src) + src.loc = get_turf(src) user << "You add padding to \the [src]." add_padding(padding_type) return diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index 8fed533bb6b..e4d54f48bae 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -74,8 +74,10 @@ var/global/list/stool_cache = list() //haha stool user.visible_message("[user] breaks [src] over [M]'s back!") user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) user.do_attack_animation(M) - - user.removeItem(src) + + user.drop_from_inventory(src) + + user.remove_from_mob(src) dismantle() qdel(src) var/mob/living/T = M @@ -115,7 +117,9 @@ var/global/list/stool_cache = list() //haha stool user << "\The [src] is already padded." return var/obj/item/stack/C = W - if(C.get_amount() < 1) + if(C.get_amount() < 1) // How?? + user.drop_from_inventory(C) + qdel(C) return var/padding_type //This is awful but it needs to be like this until tiles are given a material var. if(istype(W,/obj/item/stack/tile/carpet)) @@ -129,7 +133,8 @@ var/global/list/stool_cache = list() //haha stool return C.use(1) if(!istype(src.loc, /turf)) - user.removeItem(src, get_turf(src)) + user.drop_from_inventory(src) + src.loc = get_turf(src) user << "You add padding to \the [src]." add_padding(padding_type) return diff --git a/code/game/objects/structures/target_stake.dm b/code/game/objects/structures/target_stake.dm index 4996be04691..68b10ccf7a4 100644 --- a/code/game/objects/structures/target_stake.dm +++ b/code/game/objects/structures/target_stake.dm @@ -27,7 +27,8 @@ if(istype(W, /obj/item/target)) density = 0 W.density = 1 - user.removeItem(W, loc) + user.remove_from_mob(W) + W.loc = loc W.layer = 3.1 pinned_target = W user << "You slide the target into the stake." diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 3c39c382fa2..8e6c2cd0d57 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -271,6 +271,9 @@ else new glasstype(loc) qdel(src) + else if(istype(W,/obj/item/frame) && anchored) + var/obj/item/frame/F = W + F.try_build(src) else user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) if(W.damtype == BRUTE || W.damtype == BURN) diff --git a/code/game/periodic_news.dm b/code/game/periodic_news.dm index fb59a407b22..14cb92624df 100644 --- a/code/game/periodic_news.dm +++ b/code/game/periodic_news.dm @@ -6,7 +6,7 @@ round_time // time of the round at which this should be announced, in seconds message // body of the message author = "NanoTrasen Editor" - channel_name = "The Vir Times" + channel_name = "The "+starsys_name+" Times" can_be_redacted = 0 message_type = "Story" @@ -66,7 +66,7 @@ round_time = 60 * 50 found_ssd - channel_name = "The Vir Times" + channel_name = "The "+starsys_name+" Times" author = "Doctor Eric Hanfield" message = {"Several people have been found unconscious at their terminals. It is thought that it was due @@ -78,7 +78,7 @@ lotus_tree explosions - channel_name = "The Vir Times" + channel_name = "The "+starsys_name+" Times" author = "Reporter Leland H. Howards" message = {"The newly-christened civillian transport Lotus Tree suffered two very large explosions near the @@ -92,7 +92,7 @@ food_riots breaking_news - channel_name = "The Vir Times" + channel_name = "The "+starsys_name+" Times" author = "Reporter Ro'kii Ar-Raqis" message = {"Breaking news: Food riots have broken out throughout the Refuge asteroid colony in the Tenebrae @@ -103,7 +103,7 @@ round_time = 60 * 10 more - channel_name = "The Vir Times" + channel_name = "The "+starsys_name+" Times" author = "Reporter Ro'kii Ar-Raqis" message = {"More on the Refuge food riots: The Refuge Council has condemned NanoTrasen's withdrawal from diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 47a3c5a63e9..9496413be73 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -288,9 +288,11 @@ var/list/mechtoys = list( for(var/typepath in contains) if(!typepath) continue - var/atom/B2 = new typepath(A) - if(SP.amount && B2:amount) B2:amount = SP.amount - if(slip) slip.info += "
  • [B2.name]
  • " //add the item to the manifest + var/number_of_items = max(1, contains[typepath]) + for(var/j = 1 to number_of_items) + var/atom/B2 = new typepath(A) + if(SP.amount && B2:amount) B2:amount = SP.amount + if(slip) slip.info += "
  • [B2.name]
  • " //add the item to the manifest //manifest finalisation if(slip) diff --git a/code/game/turfs/flooring/flooring.dm b/code/game/turfs/flooring/flooring.dm index bd95b7f594d..163867d1faf 100644 --- a/code/game/turfs/flooring/flooring.dm +++ b/code/game/turfs/flooring/flooring.dm @@ -68,8 +68,8 @@ var/list/flooring_types /decl/flooring/carpet/blue name = "carpet" icon_base = "bcarpet" - build_type = null - flags = TURF_HAS_EDGES + build_type = /obj/item/stack/tile/carpet/blue + flags = TURF_HAS_EDGES | TURF_REMOVE_CROWBAR /decl/flooring/tiling name = "floor" @@ -186,7 +186,7 @@ var/list/flooring_types icon = 'icons/turf/flooring/circuit.dmi' icon_base = "bcircuit" build_type = null - flags = TURF_ACID_IMMUNE | TURF_CAN_BREAK + flags = TURF_ACID_IMMUNE | TURF_CAN_BREAK | TURF_REMOVE_CROWBAR can_paint = 1 /decl/flooring/reinforced/circuit/green diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index 23ffac6465d..ffc2297d02d 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -217,8 +217,7 @@ if (istype(W, /obj/item/weapon/wirecutters)) playsound(src, 'sound/items/Wirecutter.ogg', 100, 1) construction_stage = 5 - new /obj/item/stack/rods( src ) - user << "You cut the outer grille." + user << "You cut through the outer grille." update_icon() return if(5) @@ -229,16 +228,13 @@ return construction_stage = 4 update_icon() - user << "You remove the support lines." + user << "You unscrew the support lines." + return + else if (istype(W, /obj/item/weapon/wirecutters)) + construction_stage = 6 + user << "You mend the outer grille." + update_icon() return - else if( istype(W, /obj/item/stack/rods) ) - var/obj/item/stack/O = W - if(O.get_amount()>0) - O.use(1) - construction_stage = 6 - update_icon() - user << "You replace the outer grille." - return if(4) var/cut_cover if(istype(W,/obj/item/weapon/weldingtool)) @@ -261,6 +257,15 @@ update_icon() user << "You press firmly on the cover, dislodging it." return + else if (istype(W, /obj/item/weapon/screwdriver)) + user << "You begin screwing down the support lines." + playsound(src, 'sound/items/Screwdriver.ogg', 100, 1) + if(!do_after(user,40) || !istype(src, /turf/simulated/wall) || construction_stage != 4) + return + construction_stage = 5 + update_icon() + user << "You screw down the support lines." + return if(3) if (istype(W, /obj/item/weapon/crowbar)) user << "You struggle to pry off the cover." @@ -299,8 +304,7 @@ return construction_stage = 0 update_icon() - new /obj/item/stack/rods(src) - user << "The support rods drop out as you cut them loose from the frame." + user << "The slice through the support rods." return if(0) if(istype(W, /obj/item/weapon/crowbar)) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 16235a72fc3..9492cb87cf5 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -162,7 +162,10 @@ reinf_material.place_dismantled_girder(src, reinf_material) else material.place_dismantled_girder(src) - material.place_dismantled_product(src,devastated) + if(!devastated) + material.place_dismantled_product(src) + if (!reinf_material) + material.place_dismantled_product(src) for(var/obj/O in src.contents) //Eject contents! if(istype(O,/obj/structure/sign/poster)) diff --git a/code/game/verbs/ignore.dm b/code/game/verbs/ignore.dm new file mode 100644 index 00000000000..c1546280872 --- /dev/null +++ b/code/game/verbs/ignore.dm @@ -0,0 +1,48 @@ +/client/verb/ignore(key_to_ignore as text) + set name = "Ignore" + set category = "OOC" + set desc = "Makes OOC and Deadchat messages from a specific player not appear to you." + + if(!key_to_ignore) + return + key_to_ignore = ckey(sanitize(key_to_ignore)) + if(prefs && prefs.ignored_players) + if(key_to_ignore in prefs.ignored_players) + usr << "[key_to_ignore] is already being ignored." + return + if(key_to_ignore == usr.ckey) + usr <<"You can't ignore yourself." + return + + prefs.ignored_players |= key_to_ignore + prefs.save_preferences() + usr << "Now ignoring [key_to_ignore]." + +/client/verb/unignore(key_to_unignore as text) + set name = "Unignore" + set category = "OOC" + set desc = "Reverts your ignoring of a specific player." + + if(!key_to_unignore) + return + key_to_unignore = ckey(sanitize(key_to_unignore)) + if(prefs && prefs.ignored_players) + if(!(key_to_unignore in prefs.ignored_players)) + usr << "[key_to_unignore] isn't being ignored." + return + prefs.ignored_players -= key_to_unignore + prefs.save_preferences() + usr << "Reverted ignore on [key_to_unignore]." + +/mob/proc/is_key_ignored(var/key_to_check) + if(client) + return client.is_key_ignored(key_to_check) + return 0 + +/client/proc/is_key_ignored(var/key_to_check) + key_to_check = ckey(key_to_check) + if(key_to_check in prefs.ignored_players) + if(directory[key_to_check] in admins) // This is here so this is only evaluated if someone is actually being blocked. + return 0 + return 1 + return 0 \ No newline at end of file diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 1e976a2afcd..3e6ed273021 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -29,8 +29,6 @@ if(prefs.muted & MUTE_OOC) src << "You cannot use OOC (muted)." return - if(handle_spam_prevention(msg,MUTE_OOC)) - return if(findtext(msg, "byond://")) src << "Advertising other servers is not allowed." log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]") @@ -51,6 +49,8 @@ for(var/client/target in clients) if(target.is_preference_enabled(/datum/client_preference/show_ooc)) + if(target.is_key_ignored(key)) // If we're ignored by this person, then do nothing. + continue var/display_name = src.key if(holder) if(holder.fakekey) @@ -97,8 +97,6 @@ if(prefs.muted & MUTE_OOC) src << "You cannot use OOC (muted)." return - if(handle_spam_prevention(msg, MUTE_OOC)) - return if(findtext(msg, "byond://")) src << "Advertising other servers is not allowed." log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]") @@ -138,7 +136,7 @@ send = 1 prefix = "(Eye) " - if(!send && (target in admins)) + if(!send && (target in admins) && target.is_preference_enabled(/datum/client_preference/holder/show_rlooc)) send = 1 prefix = "(R)" diff --git a/code/global.dm b/code/global.dm index 7a9366c3b30..625712336ca 100644 --- a/code/global.dm +++ b/code/global.dm @@ -22,19 +22,22 @@ var/global/datum/universal_state/universe = new var/global/list/global_map = null // Noises made when hit while typing. -var/list/hit_appends = list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF") +var/list/hit_appends = list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF") var/diary = null -var/href_logfile = null -var/station_name = "Northern Star" -var/station_short = "Northern Star" -var/const/dock_name = "Vir Interstellar Spaceport" -var/const/boss_name = "Central Command" -var/const/boss_short = "Centcomm" -var/const/company_name = "NanoTrasen" -var/const/company_short = "NT" -var/game_version = "Polaris" -var/changelog_hash = "" -var/game_year = (text2num(time2text(world.realtime, "YYYY")) + 544) +var/href_logfile = null +var/station_name = "Northern Star" +var/const/station_orig = "Northern Star" //station_name can't be const due to event prefix/suffix +var/const/station_short = "Northern Star" +var/const/dock_name = "Vir Interstellar Spaceport" +var/const/boss_name = "Central Command" +var/const/boss_short = "Centcomm" +var/const/company_name = "NanoTrasen" +var/const/company_short = "NT" +var/const/star_name = "Vir" +var/const/starsys_name = "Vir" +var/const/game_version = "Polaris" +var/changelog_hash = "" +var/game_year = (text2num(time2text(world.realtime, "YYYY")) + 544) var/round_progressing = 1 //On some maps, it does not make sense for space turf to appear when something blows up (e.g. on an asteroid colony, or planetside) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 23c5961b661..e045c19f1ef 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -594,26 +594,33 @@ proc/admin_notice(var/message, var/rights) usr << browse(dat, "window=admin2;size=210x280") return -/datum/admins/proc/Secrets() +/datum/admins/proc/Secrets(var/datum/admin_secret_category/active_category = null) if(!check_rights(0)) return + // Print the header with category selection buttons. var/dat = "The first rule of adminbuse is: you don't talk about the adminbuse.
    " for(var/datum/admin_secret_category/category in admin_secrets.categories) if(!category.can_view(usr)) continue - dat += "[category.name]
    " - if(category.desc) - dat += "[category.desc]
    " - for(var/datum/admin_secret_item/item in category.items) + dat += "[category.name] " + dat += "
    " + + // If a category is selected, print its description and then options + if(istype(active_category) && active_category.can_view(usr)) + dat += "[active_category.name]
    " + if(active_category.desc) + dat += "[active_category.desc]
    " + for(var/datum/admin_secret_item/item in active_category.items) if(!item.can_view(usr)) continue dat += "[item.name()]
    " dat += "
    " - usr << browse(dat, "window=secrets") + + var/datum/browser/popup = new(usr, "secrets", "Secrets", 500, 500) + popup.set_content(dat) + popup.open() return - - /////////////////////////////////////////////////////////////////////////////////////////////////admins2.dm merge //i.e. buttons/verbs @@ -910,7 +917,7 @@ proc/admin_notice(var/message, var/rights) for(var/datum/antagonist/antag in ticker.mode.antag_templates) if(antag.is_antagonist(M)) return 2 - else if(M.special_role) + if(M.special_role) return 1 if(isrobot(character)) diff --git a/code/modules/admin/admin_secrets.dm b/code/modules/admin/admin_secrets.dm index 38bebb844a4..b6d0abbe1c3 100644 --- a/code/modules/admin/admin_secrets.dm +++ b/code/modules/admin/admin_secrets.dm @@ -22,6 +22,9 @@ var/datum/admin_secrets/admin_secrets = new() dd_insertObjectList(category.items, item) items += item +// +// Secret Item Category - Each subtype is a category for organizing secret commands. +// /datum/admin_secret_category var/name = "" var/desc = "" @@ -37,6 +40,10 @@ var/datum/admin_secrets/admin_secrets = new() return 1 return 0 +// +// Secret Item Datum - Each subtype is a command on the secrets panel. +// Override execute() with the implementation of the command. +// /datum/admin_secret_item var/name = "" var/category = null diff --git a/code/modules/admin/secrets/admin_secrets/prison_warp.dm b/code/modules/admin/secrets/admin_secrets/prison_warp.dm index 9a9d3e2d098..eec85c2f04b 100644 --- a/code/modules/admin/secrets/admin_secrets/prison_warp.dm +++ b/code/modules/admin/secrets/admin_secrets/prison_warp.dm @@ -27,7 +27,7 @@ if(istype(W, /obj/item/organ/external)) continue //don't strip organs - H.removeItem(W) + H.drop_from_inventory(W) //teleport person to cell H.loc = pick(prisonwarp) H.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(H), slot_w_uniform) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 970ded7c961..cf98ede72f1 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -973,7 +973,7 @@ //strip their stuff and stick it in the crate for(var/obj/item/I in M) - M.removeItem(I, locker) + M.drop_from_inventory(I, locker) M.update_icons() //so they black out before warping @@ -1006,7 +1006,7 @@ return for(var/obj/item/I in M) - M.removeItem(I, force = 1) + M.drop_from_inventory(I) M.Paralyse(5) sleep(5) @@ -1031,7 +1031,7 @@ return for(var/obj/item/I in M) - M.removeItem(I, force = 1) + M.drop_from_inventory(I) M.Paralyse(5) sleep(5) @@ -1078,7 +1078,7 @@ return for(var/obj/item/I in M) - M.removeItem(I, force = 1) + M.drop_from_inventory(I) if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/observer = M @@ -1644,6 +1644,10 @@ log_and_message_admins("created [number] [english_list(paths)]") return + else if(href_list["admin_secrets_panel"]) + var/datum/admin_secret_category/AC = locate(href_list["admin_secrets_panel"]) in admin_secrets.categories + src.Secrets(AC) + else if(href_list["admin_secrets"]) var/datum/admin_secret_item/item = locate(href_list["admin_secrets"]) in admin_secrets.items item.execute(usr) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 504a8419bf8..8f8532590e8 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -17,9 +17,6 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," adminhelped = 1 //Determines if they get the message to reply by clicking the name. - if(src.handle_spam_prevention(msg,MUTE_ADMINHELP)) - return - //clean the input msg if(!msg) return diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 898cc4e8350..bcb87f06d8d 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -56,9 +56,6 @@ else src << "Error: Private-Message: Client not found. They may have lost connection, so try using an adminhelp!" return - if (src.handle_spam_prevention(msg,MUTE_ADMINHELP)) - return - //clean the message if it's not sent by a high-rank admin //todo: sanitize for all??? if(!check_rights(R_SERVER|R_DEBUG,0)) diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index 11193a3f090..08eda6bb346 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -15,9 +15,6 @@ src << "You have deadchat muted." return - if (src.handle_spam_prevention(msg,MUTE_DEADCHAT)) - return - var/stafftype = uppertext(holder.rank) msg = sanitize(msg) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 6fa7ef43a68..b21abd7e301 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -426,7 +426,7 @@ for (var/obj/item/I in M) if (istype(I, /obj/item/weapon/implant)) continue - M.removeItem(I) + M.drop_from_inventory(I) if(I.loc != M) qdel(I) switch(dresscode) diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 600549cdfab..23f5a75e2c3 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -13,8 +13,6 @@ if(usr.client.prefs.muted & MUTE_PRAY) usr << "\red You cannot pray (muted)." return - if(src.client.handle_spam_prevention(msg,MUTE_PRAY)) - return var/image/cross = image('icons/obj/storage.dmi',"bible") msg = "\blue \icon[cross] PRAY: [key_name(src, 1)] (?) (PP) (VV) (SM) ([admin_jump_link(src, src)]) (CA) (SC): [msg]" diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 96acc58fce9..5d8db9c0729 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -10,7 +10,7 @@ return for(var/obj/item/W in M) - M.removeItem(W, force = 1) + M.drop_from_inventory(W) log_admin("[key_name(usr)] made [key_name(M)] drop everything!") message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1) @@ -28,7 +28,7 @@ return //strip their stuff before they teleport into a cell :downs: for(var/obj/item/W in M) - M.removeItem(W, force = 1) + M.drop_from_inventory(W) //teleport person to cell M.Paralyse(5) sleep(5) //so they black out before warping diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index 558c3222dc1..a78126bedc5 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -86,7 +86,7 @@ var/obj/item/device/onetankbomb/R = new /obj/item/device/onetankbomb(loc) M.drop_item() //Remove the assembly from your hands - M.removeItem(src) //Remove the tank from your character,in case you were holding it + M.remove_from_mob(src) //Remove the tank from your character,in case you were holding it M.put_in_hands(R) //Equips the bomb if possible, or puts it on the floor. R.bombassembly = S //Tell the bomb about its assembly part diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 724e1be9ee7..021216f2181 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -36,8 +36,8 @@ if((!isassembly(D))||(!isassembly(D2))) return 0 if((D:secured)||(D2:secured)) return 0 if(user) - user.removeItem(D) - user.removeItem(D2) + user.remove_from_mob(D) + user.remove_from_mob(D2) D:holder = src D2:holder = src D.loc = src diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 4c05ebece50..336231e530b 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -4,6 +4,9 @@ #define UPLOAD_LIMIT 10485760 //Restricts client uploads to the server to 10MB //Boosted this thing. What's the worst that can happen? #define MIN_CLIENT_VERSION 0 //Just an ambiguously low version for now, I don't want to suddenly stop people playing. //I would just like the code ready should it ever need to be used. + +//#define TOPIC_DEBUGGING 1 + /* When somebody clicks a link in game, this Topic is called first. It does the stuff in this proc and then is redirected to the Topic() proc for the src=[0xWhatever] @@ -23,6 +26,14 @@ if(!usr || usr != mob) //stops us calling Topic for somebody else's client. Also helps prevent usr=null return + #if defined(TOPIC_DEBUGGING) + world << "[src]'s Topic: [href] destined for [hsrc]." + + if(href_list["nano_err"]) //nano throwing errors + world << "## NanoUI, Subject [src]: " + html_decode(href_list["nano_err"]) //NANO DEBUG HOOK + + #endif + //search the href for script injection if( findtext(href,"= SPAM_TRIGGER_AUTOMUTE) - src << "\red You have exceeded the spam filter limit for identical messages. An auto-mute was applied." - cmd_admin_mute(src.mob, mute_type, 1) - return 1 - if(src.last_message_count >= SPAM_TRIGGER_WARNING) - src << "\red You are nearing the spam filter limit for identical messages." - return 0 - else - last_message = message - src.last_message_count = 0 - return 0 - //This stops files larger than UPLOAD_LIMIT being sent from client to server via input(), client.Import() etc. /client/AllowUpload(filename, filelength) if(filelength > UPLOAD_LIMIT) @@ -159,7 +155,7 @@ send_resources() nanomanager.send_resources(src) - + if(!void) void = new() screen += void diff --git a/code/modules/client/preference_setup/antagonism/02_candidacy.dm b/code/modules/client/preference_setup/antagonism/02_candidacy.dm index 82d44027afe..530fc721ee1 100644 --- a/code/modules/client/preference_setup/antagonism/02_candidacy.dm +++ b/code/modules/client/preference_setup/antagonism/02_candidacy.dm @@ -10,7 +10,7 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set "alien candidate" = 1, //always show // 6 "positronic brain" = 1, // 7 "cultist" = IS_MODE_COMPILED("cult"), // 8 - "infested monkey" = IS_MODE_COMPILED("monkey"), // 9 + "renegade" = 1, // 9 "ninja" = "true", // 10 "raider" = IS_MODE_COMPILED("heist"), // 11 "diona" = 1, // 12 diff --git a/code/modules/client/preference_setup/general/01_basic.dm b/code/modules/client/preference_setup/general/01_basic.dm index efd55d37ec3..2588836df56 100644 --- a/code/modules/client/preference_setup/general/01_basic.dm +++ b/code/modules/client/preference_setup/general/01_basic.dm @@ -1,12 +1,20 @@ +datum/preferences + var/biological_gender = MALE + var/identifying_gender = MALE + +datum/preferences/proc/set_biological_gender(var/gender) + biological_gender = gender + identifying_gender = gender + /datum/category_item/player_setup_item/general/basic name = "Basic" sort_order = 1 - var/list/valid_player_genders = list(MALE, FEMALE, NEUTER, PLURAL) /datum/category_item/player_setup_item/general/basic/load_character(var/savefile/S) S["real_name"] >> pref.real_name S["name_is_always_random"] >> pref.be_random_name - S["gender"] >> pref.gender + S["gender"] >> pref.biological_gender + S["id_gender"] >> pref.identifying_gender S["age"] >> pref.age S["spawnpoint"] >> pref.spawnpoint S["OOC_Notes"] >> pref.metadata @@ -14,7 +22,8 @@ /datum/category_item/player_setup_item/general/basic/save_character(var/savefile/S) S["real_name"] << pref.real_name S["name_is_always_random"] << pref.be_random_name - S["gender"] << pref.gender + S["gender"] << pref.biological_gender + S["id_gender"] << pref.identifying_gender S["age"] << pref.age S["spawnpoint"] << pref.spawnpoint S["OOC_Notes"] << pref.metadata @@ -22,27 +31,32 @@ /datum/category_item/player_setup_item/general/basic/sanitize_character() if(!pref.species) pref.species = "Human" var/datum/species/S = all_species[pref.species ? pref.species : "Human"] - pref.age = sanitize_integer(pref.age, S.min_age, S.max_age, initial(pref.age)) - pref.gender = sanitize_inlist(pref.gender, valid_player_genders, pick(valid_player_genders)) - pref.real_name = sanitize_name(pref.real_name, pref.species) + pref.age = sanitize_integer(pref.age, S.min_age, S.max_age, initial(pref.age)) + pref.biological_gender = sanitize_inlist(pref.biological_gender, get_genders(), pick(get_genders())) + pref.identifying_gender = (pref.identifying_gender in all_genders_define_list) ? pref.identifying_gender : pref.biological_gender + pref.real_name = sanitize_name(pref.real_name, pref.species) if(!pref.real_name) - pref.real_name = random_name(pref.gender, pref.species) - pref.spawnpoint = sanitize_inlist(pref.spawnpoint, spawntypes, initial(pref.spawnpoint)) - pref.be_random_name = sanitize_integer(pref.be_random_name, 0, 1, initial(pref.be_random_name)) + pref.real_name = random_name(pref.identifying_gender, pref.species) + pref.spawnpoint = sanitize_inlist(pref.spawnpoint, spawntypes, initial(pref.spawnpoint)) + pref.be_random_name = sanitize_integer(pref.be_random_name, 0, 1, initial(pref.be_random_name)) /datum/category_item/player_setup_item/general/basic/content() - . = "Name: " + . = list() + . += "Name: " . += "[pref.real_name]
    " - . += "(Random Name) " - . += "(Always Random Name: [pref.be_random_name ? "Yes" : "No"])" + . += "Randomize Name
    " + . += "Always Random Name: [pref.be_random_name ? "Yes" : "No"]" . += "
    " - . += "Gender: [capitalize(lowertext(pref.gender))]
    " + . += "Biological Gender: [gender2text(pref.biological_gender)]
    " + . += "Gender Identity: [gender2text(pref.identifying_gender)]
    " . += "Age: [pref.age]
    " . += "Spawn Point: [pref.spawnpoint]
    " if(config.allow_Metadata) . += "OOC Notes: Edit
    " + . = jointext(.,null) /datum/category_item/player_setup_item/general/basic/OnTopic(var/href,var/list/href_list, var/mob/user) + var/datum/species/S = all_species[pref.species] if(href_list["rename"]) var/raw_name = input(user, "Choose your character's name:", "Character Name") as text|null if (!isnull(raw_name) && CanUseTopic(user)) @@ -55,20 +69,27 @@ return TOPIC_NOACTION else if(href_list["random_name"]) - pref.real_name = random_name(pref.gender, pref.species) + pref.real_name = random_name(pref.identifying_gender, pref.species) return TOPIC_REFRESH else if(href_list["always_random_name"]) pref.be_random_name = !pref.be_random_name return TOPIC_REFRESH - else if(href_list["gender"]) - pref.gender = next_in_list(pref.gender, valid_player_genders) + else if(href_list["bio_gender"]) + var/new_gender = input(user, "Choose your character's biological gender:", "Character Preference", pref.biological_gender) as null|anything in get_genders() + if(new_gender && CanUseTopic(user)) + pref.set_biological_gender(new_gender) + return TOPIC_REFRESH + + else if(href_list["id_gender"]) + var/new_gender = input(user, "Choose your character's identifying gender:", "Character Preference", pref.identifying_gender) as null|anything in all_genders_define_list + if(new_gender && CanUseTopic(user)) + pref.identifying_gender = new_gender return TOPIC_REFRESH else if(href_list["age"]) if(!pref.species) pref.species = "Human" - var/datum/species/S = all_species[pref.species] var/new_age = input(user, "Choose your character's age:\n([S.min_age]-[S.max_age])", "Character Preference", pref.age) as num|null if(new_age && CanUseTopic(user)) pref.age = max(min(round(text2num(new_age)), S.max_age), S.min_age) @@ -76,8 +97,8 @@ else if(href_list["spawnpoint"]) var/list/spawnkeys = list() - for(var/S in spawntypes) - spawnkeys += S + for(var/spawntype in spawntypes) + spawnkeys += spawntype var/choice = input(user, "Where would you like to spawn when late-joining?") as null|anything in spawnkeys if(!choice || !spawntypes[choice] || !CanUseTopic(user)) return TOPIC_NOACTION pref.spawnpoint = choice @@ -90,3 +111,12 @@ return TOPIC_REFRESH return ..() + +/datum/category_item/player_setup_item/general/basic/proc/get_genders() + var/datum/species/S = all_species[pref.species] + var/list/possible_genders = S.genders + if(!pref.organ_data || pref.organ_data[BP_TORSO] != "cyborg") + return possible_genders + possible_genders = possible_genders.Copy() + possible_genders |= NEUTER + return possible_genders \ No newline at end of file diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm index db9fa5227d5..ee93b2acf47 100644 --- a/code/modules/client/preference_setup/general/03_body.dm +++ b/code/modules/client/preference_setup/general/03_body.dm @@ -73,6 +73,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O if(!pref.rlimb_data) pref.rlimb_data = list() /datum/category_item/player_setup_item/general/body/content(var/mob/user) + . = list() pref.update_preview_icon() if(pref.preview_icon_front && pref.preview_icon_side) user << browse_rsc(pref.preview_icon_front, "preview_icon.png") @@ -186,12 +187,13 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O if(has_flag(mob_species, HAS_SKIN_COLOR)) . += "
    Body Color
    " . += "Change Color
    __

    " + . = jointext(.,null) /datum/category_item/player_setup_item/general/body/proc/has_flag(var/datum/species/mob_species, var/flag) return mob_species && (mob_species.appearance_flags & flag) /datum/category_item/player_setup_item/general/body/OnTopic(var/href,var/list/href_list, var/mob/user) - var/mob_species = all_species[pref.species] + var/datum/species/mob_species = all_species[pref.species] if(href_list["random"]) pref.randomize_appearance_for() @@ -220,13 +222,17 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O var/prev_species = pref.species pref.species = href_list["set_species"] if(prev_species != pref.species) + if(!(pref.biological_gender in mob_species.genders)) + pref.set_biological_gender(mob_species.genders[1]) + + //grab one of the valid hair styles for the newly chosen species var/list/valid_hairstyles = list() for(var/hairstyle in hair_styles_list) var/datum/sprite_accessory/S = hair_styles_list[hairstyle] - if(pref.gender == MALE && S.gender == FEMALE) + if(pref.biological_gender == MALE && S.gender == FEMALE) continue - if(pref.gender == FEMALE && S.gender == MALE) + if(pref.biological_gender == FEMALE && S.gender == MALE) continue if(!(pref.species in S.species_allowed)) continue @@ -242,9 +248,9 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O var/list/valid_facialhairstyles = list() for(var/facialhairstyle in facial_hair_styles_list) var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] - if(pref.gender == MALE && S.gender == FEMALE) + if(pref.biological_gender == MALE && S.gender == FEMALE) continue - if(pref.gender == FEMALE && S.gender == MALE) + if(pref.biological_gender == FEMALE && S.gender == MALE) continue if(!(pref.species in S.species_allowed)) continue @@ -336,9 +342,9 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O var/list/valid_facialhairstyles = list() for(var/facialhairstyle in facial_hair_styles_list) var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] - if(pref.gender == MALE && S.gender == FEMALE) + if(pref.biological_gender == MALE && S.gender == FEMALE) continue - if(pref.gender == FEMALE && S.gender == MALE) + if(pref.biological_gender == FEMALE && S.gender == MALE) continue if(!(pref.species in S.species_allowed)) continue @@ -367,7 +373,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O var/organ_tag = input(user, "Which limb do you want to change?") as null|anything in limb_selection_list - if(!organ_tag && !CanUseTopic(user)) return TOPIC_NOACTION + if(!organ_tag || !CanUseTopic(user)) return TOPIC_NOACTION var/limb = null var/second_limb = null // if you try to change the arm, the hand should also change @@ -536,9 +542,9 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O dat += "

    " dat += "Language: [current_species.language]
    " dat += "" - if(current_species.spawn_flags & CAN_JOIN) + if(current_species.spawn_flags & SPECIES_CAN_JOIN) dat += "
    Often present on human stations." - if(current_species.spawn_flags & IS_WHITELISTED) + if(current_species.spawn_flags & SPECIES_IS_WHITELISTED) dat += "
    Whitelist restricted." if(!current_species.has_organ[O_HEART]) dat += "
    Does not have a circulatory system." @@ -566,9 +572,9 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O var/restricted = 0 if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it! - if(!(current_species.spawn_flags & CAN_JOIN)) + if(!(current_species.spawn_flags & SPECIES_CAN_JOIN)) restricted = 2 - else if((current_species.spawn_flags & IS_WHITELISTED) && !is_alien_whitelisted(preference_mob(),current_species)) + else if((current_species.spawn_flags & SPECIES_IS_WHITELISTED) && !is_alien_whitelisted(preference_mob(),current_species)) restricted = 1 if(restricted) diff --git a/code/modules/client/preference_setup/global/02_settings.dm b/code/modules/client/preference_setup/global/02_settings.dm index 60eeeb144e7..c7635cbb91a 100644 --- a/code/modules/client/preference_setup/global/02_settings.dm +++ b/code/modules/client/preference_setup/global/02_settings.dm @@ -61,9 +61,9 @@ . += "
    [client_pref.description]: [client_pref.enabled_description] [client_pref.disabled_description][client_pref.enabled_description] [client_pref.disabled_description][client_pref.enabled_description] [client_pref.disabled_description][client_pref.enabled_description] [client_pref.disabled_description]
    " diff --git a/code/modules/client/preference_setup/global/05_ooc.dm b/code/modules/client/preference_setup/global/05_ooc.dm new file mode 100644 index 00000000000..1b9d45dc893 --- /dev/null +++ b/code/modules/client/preference_setup/global/05_ooc.dm @@ -0,0 +1,42 @@ +/datum/category_item/player_setup_item/player_global/ooc + name = "OOC" + sort_order = 5 + +/datum/category_item/player_setup_item/player_global/ooc/load_preferences(var/savefile/S) + S["ignored_players"] >> pref.ignored_players + + +/datum/category_item/player_setup_item/player_global/ooc/save_preferences(var/savefile/S) + S["ignored_players"] << pref.ignored_players + +/* +/datum/category_item/player_setup_item/player_global/ooc/sanitize_preferences() + if(isnull(pref.ignored_players)) + pref.ignored_players = list() + +/datum/category_item/player_setup_item/player_global/ooc/content(var/mob/user) + . += "OOC:
    " + . += "Ignored Players
    " + for(var/ignored_player in pref.ignored_players) + . += "[ignored_player] (Unignore)
    " + . += "(Ignore Player)" + +/datum/category_item/player_setup_item/player_global/ooc/OnTopic(var/href,var/list/href_list, var/mob/user) + if(href_list["unignore_player"]) + if(CanUseTopic(user)) + pref.ignored_players -= href_list["unignore_player"] + return TOPIC_REFRESH + + if(href_list["ignore_player"]) + if(CanUseTopic(user)) + var/player_to_ignore = input(user, "Who do you want to ignore?","Ignore") as null|text + if(player_to_ignore) + player_to_ignore = sanitize(ckey(player_to_ignore)) + if(player_to_ignore == user.ckey) + user <<"You can't ignore yourself." + return TOPIC_REFRESH + pref.ignored_players |= player_to_ignore + return TOPIC_REFRESH + + return ..() +*/ \ No newline at end of file diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm index e5d408c477e..e0e0356a6cf 100644 --- a/code/modules/client/preference_setup/global/setting_datums.dm +++ b/code/modules/client/preference_setup/global/setting_datums.dm @@ -137,6 +137,13 @@ var/list/_client_preferences_by_type key = "SAFE_FIRING" enabled_description = "Safe" disabled_description = "Dangerous" + +/datum/client_preference/browser_style + description = "Fake NanoUI Browser Style" + key = "BROWSER_STYLED" + enabled_description = "Fancy" + disabled_description = "Plain" + /******************** * Staff Preferences * ********************/ @@ -182,4 +189,10 @@ var/list/_client_preferences_by_type description = "Radio chatter" key = "CHAT_RADIO" enabled_description = "Show" - disabled_description = "Hide" \ No newline at end of file + disabled_description = "Hide" + +/datum/client_preference/holder/show_rlooc + description ="Remote LOOC chat" + key = "CHAT_RLOOC" + enabled_description = "Show" + disabled_description = "Hide" diff --git a/code/modules/client/preference_setup/loadout/loadout.dm b/code/modules/client/preference_setup/loadout/loadout.dm index 4244cd0037c..e2d73ff8b3f 100644 --- a/code/modules/client/preference_setup/loadout/loadout.dm +++ b/code/modules/client/preference_setup/loadout/loadout.dm @@ -82,6 +82,7 @@ var/list/gear_datums = list() total_cost += G.cost /datum/category_item/player_setup_item/loadout/content() + . = list() var/total_cost = 0 if(pref.gear && pref.gear.len) for(var/i = 1; i <= pref.gear.len; i++) @@ -92,8 +93,8 @@ var/list/gear_datums = list() var/fcolor = "#3366CC" if(total_cost < MAX_GEAR_COST) fcolor = "#E67300" - . += list() - . += "" + + . += "
    " . += "" . += "" var/datum/loadout_category/LC = loadout_categories[current_tab] @@ -123,7 +129,7 @@ var/list/gear_datums = list() for(var/gear_name in LC.gear) var/datum/gear/G = LC.gear[gear_name] var/ticked = (G.display_name in pref.gear) - . += "" + . += "" . += "" . += "" if(ticked) @@ -132,7 +138,7 @@ var/list/gear_datums = list() . += " [tweak.get_contents(get_tweak_metadata(G, tweak))]" . += "" . += "
    [total_cost]/[MAX_GEAR_COST] loadout points spent. \[Clear Loadout\]
    " @@ -104,16 +105,21 @@ var/list/gear_datums = list() firstcat = 0 else . += " |" + + var/datum/loadout_category/LC = loadout_categories[category] + var/category_cost = 0 + for(var/gear in LC.gear) + if(gear in pref.gear) + var/datum/gear/G = LC.gear[gear] + category_cost += G.cost + if(category == current_tab) - . += " [category] " + . += " [category] - [category_cost] " else - var/datum/loadout_category/LC = loadout_categories[category] - var/tcolor = "#3366CC" - for(var/thing in LC.gear) - if(thing in pref.gear) - tcolor = "#E67300" - break - . += " [category] " + if(category_cost) + . += " [category] - [category_cost] " + else + . += " [category] - 0 " . += "
    [G.display_name]
    [G.display_name][G.cost][G.description]
    " - . = jointext(.) + . = jointext(., null) /datum/category_item/player_setup_item/loadout/proc/get_gear_metadata(var/datum/gear/G) . = pref.gear[G.display_name] diff --git a/code/modules/client/preference_setup/loadout/loadout_accessories.dm b/code/modules/client/preference_setup/loadout/loadout_accessories.dm index ced70ebef82..a5c66d2e797 100644 --- a/code/modules/client/preference_setup/loadout/loadout_accessories.dm +++ b/code/modules/client/preference_setup/loadout/loadout_accessories.dm @@ -136,6 +136,21 @@ path = /obj/item/clothing/accessory/storage/white_vest allowed_roles = list("Paramedic","Chief Medical Officer","Medical Doctor") +/datum/gear/accessory/brown_drop_pouches + display_name = "drop pouches, engineering" + path = /obj/item/clothing/accessory/storage/brown_drop_pouches + allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer") + +/datum/gear/accessory/black_drop_pouches + display_name = "drop pouches, security" + path = /obj/item/clothing/accessory/storage/black_drop_pouches + allowed_roles = list("Security Officer","Head of Security","Warden") + +/datum/gear/accessory/white_drop_pouches + display_name = "drop pouches, medical" + path = /obj/item/clothing/accessory/storage/white_drop_pouches + allowed_roles = list("Paramedic","Chief Medical Officer","Medical Doctor") + /datum/gear/accessory/webbing display_name = "webbing, simple" path = /obj/item/clothing/accessory/storage/webbing diff --git a/code/modules/client/preference_setup/loadout/loadout_general.dm b/code/modules/client/preference_setup/loadout/loadout_general.dm index 2b1c4bbb6b7..b659f8db139 100644 --- a/code/modules/client/preference_setup/loadout/loadout_general.dm +++ b/code/modules/client/preference_setup/loadout/loadout_general.dm @@ -61,3 +61,21 @@ lunchboxes[initial(lunchbox.name)] = lunchbox_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(lunchboxes)) gear_tweaks += new/datum/gear_tweak/contents(lunchables_lunches(), lunchables_snacks(), lunchables_drinks()) + +/datum/gear/towel + display_name = "towel" + path = /obj/item/weapon/towel + +/datum/gear/towel/New() + ..() + gear_tweaks = list(gear_tweak_free_color_choice) + +/datum/gear/cahwhite + display_name = "Cards Against The Galaxy (white deck)" + path = /obj/item/weapon/deck/cah + description = "The ever-popular Cards Against The Galaxy word game. Warning: may include traces of broken fourth wall. This is the white deck." + +/datum/gear/cahblack + display_name = "Cards Against The Galaxy (black deck)" + path = /obj/item/weapon/deck/cah/black + description = "The ever-popular Cards Against The Galaxy word game. Warning: may include traces of broken fourth wall. This is the black deck." diff --git a/code/modules/client/preference_setup/loadout/loadout_shoes.dm b/code/modules/client/preference_setup/loadout/loadout_shoes.dm index 80912e25815..d6e61c561ef 100644 --- a/code/modules/client/preference_setup/loadout/loadout_shoes.dm +++ b/code/modules/client/preference_setup/loadout/loadout_shoes.dm @@ -7,7 +7,7 @@ /datum/gear/shoes/toeless display_name = "toe-less jackboots" - path = /obj/item/clothing/shoes/jackboots/unathi + path = /obj/item/clothing/shoes/jackboots/toeless /datum/gear/shoes/workboots display_name = "workboots" diff --git a/code/modules/client/preference_setup/loadout/loadout_suit.dm b/code/modules/client/preference_setup/loadout/loadout_suit.dm index 80b5e2bd6a2..40bd1d767b8 100644 --- a/code/modules/client/preference_setup/loadout/loadout_suit.dm +++ b/code/modules/client/preference_setup/loadout/loadout_suit.dm @@ -125,31 +125,31 @@ ponchos[initial(poncho.name)] = poncho gear_tweaks += new/datum/gear_tweak/path(sortAssoc(ponchos)) -/datum/gear/suit/poncho/roles/security +/datum/gear/suit/roles/poncho/security display_name = "poncho, security" path = /obj/item/clothing/suit/poncho/roles/security allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer") -/datum/gear/suit/poncho/roles/medical +/datum/gear/suit/roles/poncho/medical display_name = "poncho, medical" path = /obj/item/clothing/suit/poncho/roles/medical allowed_roles = list("Medical Doctor","Chief Medical Officer","Chemist","Paramedic","Geneticist") -/datum/gear/suit/poncho/roles/engineering +/datum/gear/suit/roles/poncho/engineering display_name = "poncho, engineering" path = /obj/item/clothing/suit/poncho/roles/engineering allowed_roles = list("Chief Engineer","Atmospheric Technician", "Station Engineer") -/datum/gear/suit/poncho/roles/science +/datum/gear/suit/roles/poncho/science display_name = "poncho, science" path = /obj/item/clothing/suit/poncho/roles/science - allowed_roles = list("Research Director","Scientist", "Roboticist", "Xenobotanist") + allowed_roles = list("Research Director","Scientist", "Roboticist", "Xenobiologist") -/datum/gear/suit/poncho/roles/cargo +/datum/gear/suit/roles/poncho/cargo display_name = "poncho, cargo" path = /obj/item/clothing/suit/poncho/roles/cargo allowed_roles = list("Quartermaster","Cargo Technician") - + /datum/gear/suit/unathi_robe display_name = "roughspun robe" path = /obj/item/clothing/suit/unathi/robe @@ -195,3 +195,76 @@ display_name = "forensics, red" path = /obj/item/clothing/suit/storage/forensics/red allowed_roles = list("Detective") + +/datum/gear/suit/wintercoat + display_name = "winter coat" + path = /obj/item/clothing/suit/storage/hooded/wintercoat + +/datum/gear/suit/wintercoat/captain + display_name = "winter coat, captain" + path = /obj/item/clothing/suit/storage/hooded/wintercoat/captain + allowed_roles = list("Captain") + +/datum/gear/suit/wintercoat/security + display_name = "winter coat, security" + path = /obj/item/clothing/suit/storage/hooded/wintercoat/security + allowed_roles = list("Security Officer, Head of Security, Warden, Detective") + +/datum/gear/suit/wintercoat/medical + display_name = "winter coat, medical" + path = /obj/item/clothing/suit/storage/hooded/wintercoat/medical + allowed_roles = list("Medical Doctor","Chief Medical Officer","Chemist","Paramedic","Geneticist") + +/datum/gear/suit/wintercoat/science + display_name = "winter coat, science" + path = /obj/item/clothing/suit/storage/hooded/wintercoat/science + allowed_roles = list("Research Director","Scientist", "Roboticist", "Xenobiologist") + +/datum/gear/suit/wintercoat/engineering + display_name = "winter coat, engineering" + path = /obj/item/clothing/suit/storage/hooded/wintercoat/engineering + allowed_roles = list("Chief Engineer","Atmospheric Technician", "Station Engineer") + +/datum/gear/suit/wintercoat/atmos + display_name = "winter coat, atmospherics" + path = /obj/item/clothing/suit/storage/hooded/wintercoat/engineering/atmos + allowed_roles = list("Chief Engineer", "Atmospheric Technician") + +/datum/gear/suit/wintercoat/hydro + display_name = "winter coat, hydroponics" + path = /obj/item/clothing/suit/storage/hooded/wintercoat/hydro + allowed_roles = list("Botanist", "Xenobiologist") + +/datum/gear/suit/wintercoat/cargo + display_name = "winter coat, cargo" + path = /obj/item/clothing/suit/storage/hooded/wintercoat/cargo + allowed_roles = list("Quartermaster","Cargo Technician") + +/datum/gear/suit/wintercoat/miner + display_name = "winter coat, mining" + path = /obj/item/clothing/suit/storage/hooded/wintercoat/miner + allowed_roles = list("Shaft Miner") + +/datum/gear/suit/varsity + display_name = "varsity jacket selection" + path = /obj/item/clothing/suit/varsity + +/datum/gear/suit/varsity/New() + ..() + var/list/varsities = list() + for(var/varsity_style in typesof(/obj/item/clothing/suit/varsity)) + var/obj/item/clothing/suit/varsity/varsity = varsity_style + varsities[initial(varsity.name)] = varsity + gear_tweaks += new/datum/gear_tweak/path(sortAssoc(varsities)) + +/datum/gear/suit/track + display_name = "track jacket selection" + path = /obj/item/clothing/suit/storage/toggle/track + +/datum/gear/suit/track/New() + ..() + var/list/tracks = list() + for(var/track_style in typesof(/obj/item/clothing/suit/storage/toggle/track)) + var/obj/item/clothing/suit/storage/toggle/track/track = track_style + tracks[initial(track.name)] = track + gear_tweaks += new/datum/gear_tweak/path(sortAssoc(tracks)) \ No newline at end of file diff --git a/code/modules/client/preference_setup/loadout/loadout_uniform.dm b/code/modules/client/preference_setup/loadout/loadout_uniform.dm index 5ea992d0932..a6665d0bb51 100644 --- a/code/modules/client/preference_setup/loadout/loadout_uniform.dm +++ b/code/modules/client/preference_setup/loadout/loadout_uniform.dm @@ -6,8 +6,15 @@ sort_category = "Uniforms and Casual Dress" /datum/gear/uniform/cheongsam - display_name = "cheongsam, white" - path = /obj/item/clothing/under/cheongsam + display_name = "cheongsam selection" + +/datum/gear/uniform/cheongsam/New() + ..() + var/list/cheongasms = list() + for(var/cheongasm in typesof(/obj/item/clothing/under/cheongsam)) + var/obj/item/clothing/under/cheongsam/cheongasm_type = cheongasm + cheongasms[initial(cheongasm_type.name)] = cheongasm_type + gear_tweaks += new/datum/gear_tweak/path(sortAssoc(cheongasms)) /datum/gear/uniform/kilt display_name = "kilt" @@ -46,110 +53,16 @@ gear_tweaks += new/datum/gear_tweak/path(sortAssoc(jumpclothes)) /datum/gear/uniform/skirt - display_name = "plaid skirt, blue" - path = /obj/item/clothing/under/dress/plaid_blue + display_name = "skirt selection" + path = /obj/item/clothing/under/skirt -/datum/gear/uniform/skirt/purple - display_name = "plaid skirt, purple" - path = /obj/item/clothing/under/dress/plaid_purple - -/datum/gear/uniform/skirt/red - display_name = "plaid skirt, red" - path = /obj/item/clothing/under/dress/plaid_red - -/datum/gear/uniform/skirt/black - display_name = "skirt, black" - path = /obj/item/clothing/under/blackskirt - -/datum/gear/uniform/skirt/ce - display_name = "skirt, ce" - path = /obj/item/clothing/under/rank/chief_engineer/skirt - allowed_roles = list("Chief Engineer") - -/datum/gear/uniform/skirt/atmos - display_name = "skirt, atmos" - path = /obj/item/clothing/under/rank/atmospheric_technician/skirt - allowed_roles = list("Chief Engineer","Atmospheric Technician") - -/datum/gear/uniform/skirt/eng - display_name = "skirt, engineer" - path = /obj/item/clothing/under/rank/engineer/skirt - allowed_roles = list("Chief Engineer","Station Engineer") - -/datum/gear/uniform/skirt/roboticist - display_name = "skirt, roboticist" - path = /obj/item/clothing/under/rank/roboticist/skirt - allowed_roles = list("Research Director","Roboticist") - -/datum/gear/uniform/skirt/cmo - display_name = "skirt, cmo" - path = /obj/item/clothing/under/rank/chief_medical_officer - allowed_roles = list("Chief Medical Officer") - -/datum/gear/uniform/skirt/chem - display_name = "skirt, chemist" - path = /obj/item/clothing/under/rank/chemist/skirt - allowed_roles = list("Chief Medical Officer","Chemist") - -/datum/gear/uniform/skirt/viro - display_name = "skirt, virologist" - path = /obj/item/clothing/under/rank/virologist/skirt - allowed_roles = list("Chief Medical Officer","Medical Doctor") - -/datum/gear/uniform/skirt/med - display_name = "skirt, medical" - path = /obj/item/clothing/under/rank/medical/skirt - allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Psychiatrist","Paramedic") - -/datum/gear/uniform/skirt/sci - display_name = "skirt, scientist" - path = /obj/item/clothing/under/rank/scientist/skirt - allowed_roles = list("Research Director","Scientist") - -/datum/gear/uniform/skirt/cargo - display_name = "skirt, cargo" - path = /obj/item/clothing/under/rank/cargotech/skirt - allowed_roles = list("Quartermaster","Cargo Technician") - -/datum/gear/uniform/skirt/qm - display_name = "skirt, QM" - path = /obj/item/clothing/under/rank/cargo/skirt - allowed_roles = list("Quartermaster") - -/datum/gear/uniform/skirt/warden - display_name = "skirt, warden" - path = /obj/item/clothing/under/rank/warden/skirt - allowed_roles = list("Head of Security", "Warden") - -/datum/gear/uniform/skirt/security - display_name = "skirt, security" - path = /obj/item/clothing/under/rank/security/skirt - allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer") - -/datum/gear/uniform/skirt/head_of_security - display_name = "skirt, hos" - path = /obj/item/clothing/under/rank/head_of_security/skirt - allowed_roles = list("Head of Security") - -/datum/gear/uniform/jeans_qm - display_name = "jeans, QM" - path = /obj/item/clothing/under/rank/cargo/jeans - allowed_roles = list("Quartermaster") - -/datum/gear/uniform/jeans_qmf - display_name = "female jeans, QM" - path = /obj/item/clothing/under/rank/cargo/jeans/female - allowed_roles = list("Quartermaster") - -/datum/gear/uniform/jeans_cargo - display_name = "jeans, cargo" - path = /obj/item/clothing/under/rank/cargotech/jeans - allowed_roles = list("Quartermaster","Cargo Technician") - -/datum/gear/uniform/jeans_cargof - display_name = "female jeans, cargo" - path = /obj/item/clothing/under/rank/cargotech/jeans/female - allowed_roles = list("Quartermaster","Cargo Technician") +/datum/gear/uniform/skirt/New() + ..() + var/list/skirts = list() + for(var/skirt in (typesof(/obj/item/clothing/under/skirt))) + var/obj/item/clothing/under/skirt/skirt_type = skirt + skirts[initial(skirt_type.name)] = skirt_type + gear_tweaks += new/datum/gear_tweak/path(sortAssoc(skirts)) /datum/gear/uniform/pants display_name = "pants selection" @@ -175,6 +88,96 @@ shorts[initial(short_type.name)] = short_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(shorts)) +/datum/gear/uniform/job_skirt/ce + display_name = "skirt, ce" + path = /obj/item/clothing/under/rank/engineer/chief_engineer/skirt + allowed_roles = list("Chief Engineer") + +/datum/gear/uniform/job_skirt/atmos + display_name = "skirt, atmos" + path = /obj/item/clothing/under/rank/engineer/atmospheric_technician/skirt + allowed_roles = list("Chief Engineer","Atmospheric Technician") + +/datum/gear/uniform/job_skirt/eng + display_name = "skirt, engineer" + path = /obj/item/clothing/under/rank/engineer/skirt + allowed_roles = list("Chief Engineer","Station Engineer") + +/datum/gear/uniform/job_skirt/roboticist + display_name = "skirt, roboticist" + path = /obj/item/clothing/under/rank/roboticist/skirt + allowed_roles = list("Research Director","Roboticist") + +/datum/gear/uniform/job_skirt/cmo + display_name = "skirt, cmo" + path = /obj/item/clothing/under/rank/medical/chief_medical_officer/skirt + allowed_roles = list("Chief Medical Officer") + +/datum/gear/uniform/job_skirt/chem + display_name = "skirt, chemist" + path = /obj/item/clothing/under/rank/medical/chemist/skirt + allowed_roles = list("Chief Medical Officer","Chemist") + +/datum/gear/uniform/job_skirt/viro + display_name = "skirt, virologist" + path = /obj/item/clothing/under/rank/medical/virologist/skirt + allowed_roles = list("Chief Medical Officer","Medical Doctor") + +/datum/gear/uniform/job_skirt/med + display_name = "skirt, medical" + path = /obj/item/clothing/under/rank/medical/skirt + allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Psychiatrist","Paramedic") + +/datum/gear/uniform/job_skirt/sci + display_name = "skirt, scientist" + path = /obj/item/clothing/under/rank/scientist/skirt + allowed_roles = list("Research Director","Scientist", "Xenobiologist") + +/datum/gear/uniform/job_skirt/cargo + display_name = "skirt, cargo" + path = /obj/item/clothing/under/rank/cargotech/skirt + allowed_roles = list("Quartermaster","Cargo Technician") + +/datum/gear/uniform/job_skirt/qm + display_name = "skirt, QM" + path = /obj/item/clothing/under/rank/cargo/skirt + allowed_roles = list("Quartermaster") + +/datum/gear/uniform/job_skirt/warden + display_name = "skirt, warden" + path = /obj/item/clothing/under/rank/security/warden/skirt + allowed_roles = list("Head of Security", "Warden") + +/datum/gear/uniform/job_skirt/security + display_name = "skirt, security" + path = /obj/item/clothing/under/rank/security/skirt + allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer") + +/datum/gear/uniform/job_skirt/head_of_security + display_name = "skirt, hos" + path = /obj/item/clothing/under/rank/security/head_of_security/skirt + allowed_roles = list("Head of Security") + +/datum/gear/uniform/jeans_qm + display_name = "jeans, QM" + path = /obj/item/clothing/under/rank/cargo/jeans + allowed_roles = list("Quartermaster") + +/datum/gear/uniform/jeans_qmf + display_name = "female jeans, QM" + path = /obj/item/clothing/under/rank/cargo/jeans/female + allowed_roles = list("Quartermaster") + +/datum/gear/uniform/jeans_cargo + display_name = "jeans, cargo" + path = /obj/item/clothing/under/rank/cargotech/jeans + allowed_roles = list("Quartermaster","Cargo Technician") + +/datum/gear/uniform/jeans_cargof + display_name = "female jeans, cargo" + path = /obj/item/clothing/under/rank/cargotech/jeans/female + allowed_roles = list("Quartermaster","Cargo Technician") + /datum/gear/uniform/suit //amish display_name = "suit, amish" path = /obj/item/clothing/under/sl_suit @@ -329,4 +332,36 @@ /datum/gear/uniform/navyhossuit display_name = "uniform, navy blue (Head of Security)" path = /obj/item/clothing/under/rank/head_of_security/navyblue - allowed_roles = list("Head of Security") \ No newline at end of file + allowed_roles = list("Head of Security") + +/datum/gear/uniform/shortplaindress + display_name = "plain dress" + path = /obj/item/clothing/under/dress/white3 + +/datum/gear/uniform/shortplaindress/New() + ..() + gear_tweaks = list(gear_tweak_free_color_choice) + +/datum/gear/uniform/longdress + display_name = "long dress" + path = /obj/item/clothing/under/dress/white2 + +/datum/gear/uniform/longdress/New() + ..() + gear_tweaks = list(gear_tweak_free_color_choice) + +/datum/gear/uniform/longwidedress + display_name = "long wide dress" + path = /obj/item/clothing/under/dress/white4 + +/datum/gear/uniform/longwidedress/New() + ..() + gear_tweaks = list(gear_tweak_free_color_choice) + +/datum/gear/uniform/reddress + display_name = "red dress with belt" + path = /obj/item/clothing/under/dress/darkred + +/datum/gear/uniform/whitewedding + display_name= "white wedding dress" + path = /obj/item/clothing/under/dress/white \ No newline at end of file diff --git a/code/modules/client/preference_setup/loadout/loadout_xeno.dm b/code/modules/client/preference_setup/loadout/loadout_xeno.dm index 79e6a1ec7f4..9f814743aea 100644 --- a/code/modules/client/preference_setup/loadout/loadout_xeno.dm +++ b/code/modules/client/preference_setup/loadout/loadout_xeno.dm @@ -12,55 +12,81 @@ whitelisted = "Unathi" sort_category = "Xenowear" -/datum/gear/ears/skrell - display_name = "headtail-wear, female, chain (Skrell)" +/datum/gear/ears/skrell/chains //Chains + display_name = "headtail chain selection (Skrell)" path = /obj/item/clothing/ears/skrell/chain sort_category = "Xenowear" whitelisted = "Skrell" -/datum/gear/ears/skrell/plate - display_name = "headtail-wear, male, bands (Skrell)" +/datum/gear/ears/skrell/chains/New() + ..() + var/list/chaintypes = list() + for(var/chain_style in typesof(/obj/item/clothing/ears/skrell/chain)) + var/obj/item/clothing/ears/skrell/chain/chain = chain_style + chaintypes[initial(chain.name)] = chain + gear_tweaks += new/datum/gear_tweak/path(sortAssoc(chaintypes)) + +/datum/gear/ears/skrell/bands + display_name = "headtail band selection (Skrell)" path = /obj/item/clothing/ears/skrell/band + sort_category = "Xenowear" + whitelisted = "Skrell" -/datum/gear/ears/skrell/cloth //male/red - display_name = "headtail-wear, male, red, cloth (Skrell)" +/datum/gear/ears/skrell/bands/New() + ..() + var/list/bandtypes = list() + for(var/band_style in typesof(/obj/item/clothing/ears/skrell/band)) + var/obj/item/clothing/ears/skrell/band/band = band_style + bandtypes[initial(band.name)] = band + gear_tweaks += new/datum/gear_tweak/path(sortAssoc(bandtypes)) + +/datum/gear/ears/skrell/cloth/male + display_name = "male headtail cloth selection (Skrell)" path = /obj/item/clothing/ears/skrell/cloth_male + sort_category = "Xenowear" + whitelisted = "Skrell" -/datum/gear/ears/skrell/cloth/male //black - display_name = "headtail-wear, male, black, cloth (Skrell)" - path = /obj/item/clothing/ears/skrell/cloth_male/black - -/datum/gear/ears/skrell/cloth/male/blue - display_name = "headtail-wear, male, blue, cloth (Skrell)" - path = /obj/item/clothing/ears/skrell/cloth_male/blue - -/datum/gear/ears/skrell/cloth/male/green - display_name = "headtail-wear, male, green, cloth (Skrell)" - path = /obj/item/clothing/ears/skrell/cloth_male/green - -/datum/gear/ears/skrell/cloth/male/pink - display_name = "headtail-wear, male, pink, cloth (Skrell)" - path = /obj/item/clothing/ears/skrell/cloth_male/pink +/datum/gear/ears/skrell/cloth/male/New() + ..() + var/list/clothtypes = list() + for(var/cloth_style in typesof(/obj/item/clothing/ears/skrell/cloth_male)) + var/obj/item/clothing/ears/skrell/cloth_male/cloth = cloth_style + clothtypes[initial(cloth.name)] = cloth + gear_tweaks += new/datum/gear_tweak/path(sortAssoc(clothtypes)) /datum/gear/ears/skrell/cloth/female - display_name = "headtail-wear, female, red, cloth (Skrell)" + display_name = "female headtail cloth selection (Skrell)" path = /obj/item/clothing/ears/skrell/cloth_female + sort_category = "Xenowear" + whitelisted = "Skrell" -/datum/gear/ears/skrell/cloth/female/black - display_name = "headtail-wear, female, black, cloth (Skrell)" - path = /obj/item/clothing/ears/skrell/cloth_female/black +/datum/gear/ears/skrell/cloth/female/New() + ..() + var/list/clothtypes = list() + for(var/cloth_style in typesof(/obj/item/clothing/ears/skrell/cloth_female)) + var/obj/item/clothing/ears/skrell/cloth_female/cloth = cloth_style + clothtypes[initial(cloth.name)] = cloth + gear_tweaks += new/datum/gear_tweak/path(sortAssoc(clothtypes)) -/datum/gear/ears/skrell/cloth/female/blue - display_name = "headtail-wear, female, blue, cloth (Skrell)" - path = /obj/item/clothing/ears/skrell/cloth_female/blue - -/datum/gear/ears/skrell/cloth/female/green - display_name = "headtail-wear, female, green, cloth (Skrell)" - path = /obj/item/clothing/ears/skrell/cloth_female/green - -/datum/gear/ears/skrell/cloth/female/pink - display_name = "headtail-wear, female, pink, cloth (Skrell)" - path = /obj/item/clothing/ears/skrell/cloth_female/pink +/datum/gear/ears/skrell/colored/band + display_name = "Colored bands (Skrell)" + path = /obj/item/clothing/ears/skrell/colored/band + sort_category = "Xenowear" + whitelisted = "Skrell" + +/datum/gear/ears/skrell/colored/band/New() + ..() + gear_tweaks = list(gear_tweak_free_color_choice) + +/datum/gear/ears/skrell/colored/chain + display_name = "Colored chain (Skrell)" + path = /obj/item/clothing/ears/skrell/colored/chain + sort_category = "Xenowear" + whitelisted = "Skrell" + +/datum/gear/ears/skrell/colored/chain/New() + ..() + gear_tweaks = list(gear_tweak_free_color_choice) /datum/gear/uniform/teshari display_name = "smock, grey (Teshari)" diff --git a/code/modules/client/preference_setup/occupation/occupation.dm b/code/modules/client/preference_setup/occupation/occupation.dm index 62c3fc206d2..09dd7f573e4 100644 --- a/code/modules/client/preference_setup/occupation/occupation.dm +++ b/code/modules/client/preference_setup/occupation/occupation.dm @@ -58,9 +58,10 @@ if(!job_master) return + . = list() . += "
    " . += "Choose occupation chances
    Unavailable occupations are crossed out.
    " - . += "
    " // Table within a table for alignment, also allows you to easily add more colomns. + . += "
    " // Table within a table for alignment, also allows you to easily add more columns. . += "" var/index = -1 @@ -93,7 +94,7 @@ . += "[rank]" continue if((pref.job_civilian_low & ASSISTANT) && (rank != "Assistant")) - . += "[rank]" + . += "[rank]" continue if((rank in command_positions) || (rank == "AI"))//Bold head jobs . += "[rank]" @@ -106,40 +107,39 @@ if(rank == "Assistant")//Assistant is special if(pref.job_civilian_low & ASSISTANT) - . += " \[Yes]" + . += " \[Yes]" else - . += " \[No]" + . += " \[No]" if(job.alt_titles) //Blatantly cloned from a few lines down. . += "" . += "" continue if(pref.GetJobDepartment(job, 1) & job.flag) - . += " \[High]" + . += " \[High]" else if(pref.GetJobDepartment(job, 2) & job.flag) - . += " \[Medium]" + . += " \[Medium]" else if(pref.GetJobDepartment(job, 3) & job.flag) - . += " \[Low]" + . += " \[Low]" else - . += " \[NEVER]" + . += " \[NEVER]" if(job.alt_titles) . += "" . += "" - . += "
    \[MINIMUM CHARACTER AGE: [job.minimum_character_age]]
     \[[pref.GetPlayerAltTitle(job)]\]
     \[[pref.GetPlayerAltTitle(job)]\]
    " - - . += "
    " + . += "
    " switch(pref.alternate_option) if(GET_RANDOM_JOB) - . += "

    Get random job if preferences unavailable

    " + . += "Get random job if preferences unavailable" if(BE_ASSISTANT) - . += "

    Be assistant if preference unavailable

    " + . += "Be assistant if preference unavailable" if(RETURN_TO_LOBBY) - . += "

    Return to lobby if preference unavailable

    " + . += "Return to lobby if preference unavailable" - . += "
    \[Reset\]
    " + . += "\[Reset\]
    " . += "
    " + . = jointext(.,null) /datum/category_item/player_setup_item/occupation/OnTopic(href, href_list, user) if(href_list["reset_jobs"]) diff --git a/code/modules/client/preference_setup/skills/skills.dm b/code/modules/client/preference_setup/skills/skills.dm index 8370f35668b..7255e25bc46 100644 --- a/code/modules/client/preference_setup/skills/skills.dm +++ b/code/modules/client/preference_setup/skills/skills.dm @@ -19,6 +19,7 @@ if(pref.used_skillpoints < 0) pref.used_skillpoints = 0 /datum/category_item/player_setup_item/skills/content() + . = list() . += "Select your Skills
    " . += "Current skill level: [pref.GetSkillClass(pref.used_skillpoints)] ([pref.used_skillpoints])
    " . += "Use preconfigured skillset
    " @@ -30,16 +31,22 @@ var/level = pref.skills[S.ID] . += "" . += "[S.name]" - . += "\[Untrained\]" + . += skill_to_button(S, "Untrained", level, SKILL_NONE) // secondary skills don't have an amateur level if(S.secondary) . += "" else - . += "\[Amateur\]" - . += "\[Trained\]" - . += "\[Professional\]" + . += skill_to_button(S, "Amateur", level, SKILL_BASIC) + . += skill_to_button(S, "Trained", level, SKILL_ADEPT) + . += skill_to_button(S, "Professional", level, SKILL_EXPERT) . += "" . += "" + . = jointext(.,null) + +/datum/category_item/player_setup_item/proc/skill_to_button(var/skill, var/level_name, var/current_level, var/selection_level) + if(current_level == selection_level) + return "[level_name]" + return "[level_name]" /datum/category_item/player_setup_item/skills/OnTopic(href, href_list, user) if(href_list["skillinfo"]) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index cc339556c30..0e9bf5323bd 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -25,7 +25,6 @@ datum/preferences //character preferences var/real_name //our character's name var/be_random_name = 0 //whether we are a random name every round - var/gender = MALE //gender of character (well duh) var/age = 30 //age of character var/spawnpoint = "Arrivals Shuttle" //where this character will spawn (0-2). var/b_type = "A+" //blood type (not-chooseable) @@ -108,6 +107,7 @@ datum/preferences // OOC Metadata: var/metadata = "" + var/list/ignored_players = list() var/client/client = null var/client_ckey = null @@ -116,11 +116,12 @@ datum/preferences var/communicator_visibility = 0 var/datum/category_collection/player_setup_collection/player_setup + var/datum/browser/panel /datum/preferences/New(client/C) player_setup = new(src) - gender = pick(MALE, FEMALE) - real_name = random_name(gender,species) + set_biological_gender(pick(MALE, FEMALE)) + real_name = random_name(identifying_gender,species) b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+") gear = list() @@ -211,7 +212,10 @@ datum/preferences dat += player_setup.content(user) dat += "" - user << browse(dat, "window=preferences;size=635x736") + //user << browse(dat, "window=preferences;size=635x736") + var/datum/browser/popup = new(user, "Character Setup","Character Setup", 635, 736, src) + popup.set_content(dat) + popup.open() /datum/preferences/proc/process_link(mob/user, list/href_list) if(!user) return @@ -254,7 +258,7 @@ datum/preferences // Sanitizing rather than saving as someone might still be editing when copy_to occurs. player_setup.sanitize_setup() if(be_random_name) - real_name = random_name(gender,species) + real_name = random_name(identifying_gender,species) if(config.humans_need_surnames) var/firstspace = findtext(real_name, " ") @@ -284,7 +288,8 @@ datum/preferences character.gen_record = gen_record character.exploit_record = exploit_record - character.gender = gender + character.gender = biological_gender + character.identifying_gender = identifying_gender character.age = age character.b_type = b_type @@ -374,7 +379,11 @@ datum/preferences dat += "
    " dat += "
    " - user << browse(dat, "window=saves;size=300x390") + //user << browse(dat, "window=saves;size=300x390") + panel = new(user, "Character Slots", "Character Slots", 300, 390, src) + panel.set_content(dat) + panel.open() /datum/preferences/proc/close_load_dialog(mob/user) - user << browse(null, "window=saves") \ No newline at end of file + //user << browse(null, "window=saves") + panel.close() \ No newline at end of file diff --git a/code/modules/client/preferences_factions.dm b/code/modules/client/preferences_factions.dm index e60cdb75b98..61d6810224d 100644 --- a/code/modules/client/preferences_factions.dm +++ b/code/modules/client/preferences_factions.dm @@ -22,7 +22,7 @@ var/global/list/citizenship_choices = list( var/global/list/home_system_choices = list( "Sol", - "Vir", + starsys_name, "Nyx", "Tau Ceti", "Epsilon Ursae Minoris", diff --git a/code/modules/client/preferences_toggle_procs.dm b/code/modules/client/preferences_toggle_procs.dm index f074fee298c..bcd4e3a0c1a 100644 --- a/code/modules/client/preferences_toggle_procs.dm +++ b/code/modules/client/preferences_toggle_procs.dm @@ -8,7 +8,7 @@ toggle_preference(pref_path) - src << "You will [ (is_preference_enabled(pref_path)) ? "now" : " no longer"] hear all mob speech as a ghost." + src << "You will [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] hear all mob speech as a ghost." prefs.save_preferences() @@ -23,7 +23,7 @@ toggle_preference(pref_path) - src << "You will [ (is_preference_enabled(pref_path)) ? "now" : " no longer"] see all emotes as a ghost." + src << "You will [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] see all emotes as a ghost." prefs.save_preferences() @@ -222,4 +222,4 @@ src << "You will [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] receive attack logs." prefs.save_preferences() - feedback_add_details("admin_verb","TBeSpecial") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! \ No newline at end of file + feedback_add_details("admin_verb","TBeSpecial") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/client/ui_style.dm b/code/modules/client/ui_style.dm index 7a021879a97..e6e4ff6ddb5 100644 --- a/code/modules/client/ui_style.dm +++ b/code/modules/client/ui_style.dm @@ -9,6 +9,15 @@ "minimalist" = 'icons/mob/screen/minimalist.dmi' ) +/var/all_ui_styles_robot = list( + "Midnight" = 'icons/mob/screen1_robot.dmi', + "Orange" = 'icons/mob/screen1_robot.dmi', + "old" = 'icons/mob/screen1_robot.dmi', + "White" = 'icons/mob/screen1_robot.dmi', + "old-noborder" = 'icons/mob/screen1_robot.dmi', + "minimalist" = 'icons/mob/screen1_robot_minimalist.dmi' + ) + /proc/ui_style2icon(ui_style) if(ui_style in all_ui_styles) return all_ui_styles[ui_style] @@ -21,8 +30,9 @@ set desc = "Configure your user interface" if(!ishuman(usr)) - usr << "You must be human to use this verb." - return + if(!isrobot(usr)) + usr << "You must be a human or a robot to use this verb." + return var/UI_style_new = input(usr, "Select a style. White is recommended for customization") as null|anything in all_ui_styles if(!UI_style_new) return @@ -42,6 +52,8 @@ icons.Add(usr.radio_use_icon) var/icon/ic = all_ui_styles[UI_style_new] + if(isrobot(usr)) + ic = all_ui_styles_robot[UI_style_new] for(var/obj/screen/I in icons) if(I.name in list(I_HELP, I_HURT, I_DISARM, I_GRAB)) continue diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 7721253643a..87b6b7540d1 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -4,6 +4,11 @@ var/list/species_restricted = null //Only these species can wear this kit. var/gunshot_residue //Used by forensics. + var/list/accessories = list() + var/list/valid_accessory_slots + var/list/restricted_accessory_slots + var/list/starting_accessories + /* Sprites used when the clothing item is refit. This is done by setting icon_override. For best results, if this is set then sprite_sheets should be null and vice versa, but that is by no means necessary. @@ -22,6 +27,13 @@ ..() gunshot_residue = null +/obj/item/clothing/New() + ..() + if(starting_accessories) + for(var/T in starting_accessories) + var/obj/item/clothing/accessory/tie = new T(src) + src.attach_accessory(null, tie) + //BS12: Species-restricted clothing check. /obj/item/clothing/mob_can_equip(M as mob, slot) @@ -337,11 +349,11 @@ overlays |= light_overlay_cache["[light_overlay]_icon"] // Generate and cache the on-mob icon, which is used in update_inv_head(). - var/cache_key = "[light_overlay][H ? "_[H.species.get_bodytype()]" : ""]" + var/cache_key = "[light_overlay][H ? "_[H.species.get_bodytype(H)]" : ""]" if(!light_overlay_cache[cache_key]) var/use_icon = 'icons/mob/light_overlays.dmi' - if(H && sprite_sheets[H.species.get_bodytype()]) - use_icon = sprite_sheets[H.species.get_bodytype()] + 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]") if(H) @@ -432,7 +444,8 @@ if(holding) user << "\The [src] is already holding \a [holding]." return - user.removeItem(I, src) + user.unEquip(I) + I.forceMove(src) holding = I user.visible_message("\The [user] shoves \the [I] into \the [src].") verbs |= /obj/item/clothing/shoes/proc/draw_knife @@ -500,7 +513,6 @@ 2 = Report detailed damages 3 = Report location */ - var/list/accessories = list() var/displays_id = 1 var/rolled_down = -1 //0 = unrolled, 1 = rolled, -1 = cannot be toggled var/rolled_sleeves = -1 //0 = unrolled, 1 = rolled, -1 = cannot be toggled @@ -511,6 +523,16 @@ //convenience var for defining the icon state for the overlay used when the clothing is worn. //Also used by rolling/unrolling. var/worn_state = null + valid_accessory_slots = list("utility","armband","decor") + restricted_accessory_slots = list("utility", "armband") + + +/obj/item/clothing/under/attack_hand(var/mob/user) + if(accessories && accessories.len) + ..() + if ((ishuman(usr) || issmall(usr)) && src.loc == user) + return + ..() /obj/item/clothing/under/New() ..() @@ -534,8 +556,8 @@ var/icon/under_icon if(icon_override) under_icon = icon_override - else if(H && sprite_sheets && sprite_sheets[H.species.get_bodytype()]) - under_icon = sprite_sheets[H.species.get_bodytype()] + else if(H && sprite_sheets && sprite_sheets[H.species.get_bodytype(H)]) + under_icon = sprite_sheets[H.species.get_bodytype(H)] else if(item_icons && item_icons[slot_w_uniform_str]) under_icon = item_icons[slot_w_uniform_str] else @@ -557,8 +579,8 @@ var/icon/under_icon if(icon_override) under_icon = icon_override - else if(H && sprite_sheets && sprite_sheets[H.species.get_bodytype()]) - under_icon = sprite_sheets[H.species.get_bodytype()] + else if(H && sprite_sheets && sprite_sheets[H.species.get_bodytype(H)]) + under_icon = sprite_sheets[H.species.get_bodytype(H)] else if(item_icons && item_icons[slot_w_uniform_str]) under_icon = item_icons[slot_w_uniform_str] else @@ -577,69 +599,6 @@ var/mob/M = src.loc M.update_inv_w_uniform() -/obj/item/clothing/under/proc/can_attach_accessory(obj/item/clothing/accessory/A) - if(istype(A)) - .=1 - else - return 0 - if(accessories.len && (A.slot in list("utility","armband"))) - for(var/obj/item/clothing/accessory/AC in accessories) - if (AC.slot == A.slot) - return 0 - -/obj/item/clothing/under/attackby(obj/item/I, mob/user) - if(istype(I, /obj/item/clothing/accessory)) - var/obj/item/clothing/accessory/A = I - if(can_attach_accessory(A)) - user.drop_item() - accessories += A - A.on_attached(src, user) - - if(istype(loc, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = loc - H.update_inv_w_uniform() - - return - else - user << "You cannot attach more accessories of this type to [src]." - - if(accessories.len) - for(var/obj/item/clothing/accessory/A in accessories) - A.attackby(I, user) - return - - ..() - -/obj/item/clothing/under/attack_hand(mob/user as mob) - //only forward to the attached accessory if the clothing is equipped (not in a storage) - if(accessories.len && src.loc == user) - for(var/obj/item/clothing/accessory/A in accessories) - A.attack_hand(user) - return - - if ((ishuman(usr) || issmall(usr)) && src.loc == user) //make it harder to accidentally undress yourself - return - - ..() - -/obj/item/clothing/under/MouseDrop(obj/over_object as obj) - if (ishuman(usr) || issmall(usr)) - //makes sure that the clothing is equipped so that we can't drag it into our hand from miles away. - if (!(src.loc == usr)) - return - - if (( usr.restrained() ) || ( usr.stat )) - return - - if (!usr.removeItem(src)) - return - - switch(over_object.name) - if("r_hand") - usr.put_in_r_hand(src) - if("l_hand") - usr.put_in_l_hand(src) - src.add_fingerprint(usr) /obj/item/clothing/under/examine(mob/user) ..(user) @@ -652,9 +611,6 @@ user << "Its vital tracker appears to be enabled." if(3) user << "Its vital tracker and tracking beacon appear to be enabled." - if(accessories.len) - for(var/obj/item/clothing/accessory/A in accessories) - user << "\A [A] is attached to it." /obj/item/clothing/under/proc/set_sensors(mob/usr as mob) var/mob/M = usr @@ -677,27 +633,16 @@ if (src.loc == usr) switch(sensor_mode) if(0) - usr << "You disable your suit's remote sensing equipment." + usr.visible_message("[usr] adjusts their sensors.", "You disable your suit's remote sensing equipment.") if(1) - usr << "Your suit will now report whether you are live or dead." + usr.visible_message("[usr] adjusts their sensors.", "Your suit will now report whether you are live or dead.") if(2) - usr << "Your suit will now report your vital lifesigns." + usr.visible_message("[usr] adjusts their sensors.", "Your suit will now report your vital lifesigns.") if(3) - usr << "Your suit will now report your vital lifesigns as well as your coordinate position." + usr.visible_message("[usr] adjusts their sensors.", "Your suit will now report your vital lifesigns as well as your coordinate position.") + else if (istype(src.loc, /mob)) - switch(sensor_mode) - if(0) - for(var/mob/V in viewers(usr, 1)) - V.show_message("\red [usr] disables [src.loc]'s remote sensing equipment.", 1) - if(1) - for(var/mob/V in viewers(usr, 1)) - V.show_message("[usr] turns [src.loc]'s remote sensors to binary.", 1) - if(2) - for(var/mob/V in viewers(usr, 1)) - V.show_message("[usr] sets [src.loc]'s sensors to track vitals.", 1) - if(3) - for(var/mob/V in viewers(usr, 1)) - V.show_message("[usr] sets [src.loc]'s sensors to maximum.", 1) + usr.visible_message("[usr] adjusts [src.loc]'s sensors.", "You adjust [src.loc]'s sensors.") /obj/item/clothing/under/verb/toggle() set name = "Toggle Suit Sensors" @@ -758,34 +703,7 @@ usr << "You roll down your [src]'s sleeves." update_clothing_icon() -/obj/item/clothing/under/proc/remove_accessory(mob/user, obj/item/clothing/accessory/A) - if(!(A in accessories)) - return - - A.on_removed(user) - accessories -= A - update_clothing_icon() - -/obj/item/clothing/under/verb/removetie() - set name = "Remove Accessory" - set category = "Object" - set src in usr - if(!istype(usr, /mob/living)) return - if(usr.stat) return - if(!accessories.len) return - var/obj/item/clothing/accessory/A - if(accessories.len > 1) - A = input("Select an accessory to remove from [src]") as null|anything in accessories - else - A = accessories[1] - src.remove_accessory(usr,A) /obj/item/clothing/under/rank/New() sensor_mode = pick(0,1,2,3) ..() - -/obj/item/clothing/under/emp_act(severity) - if(accessories.len) - for(var/obj/item/clothing/accessory/A in accessories) - A.emp_act(severity) - ..() \ No newline at end of file diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm new file mode 100644 index 00000000000..b0b3d217edd --- /dev/null +++ b/code/modules/clothing/clothing_accessories.dm @@ -0,0 +1,107 @@ +/obj/item/clothing/proc/can_attach_accessory(obj/item/clothing/accessory/A) + if(valid_accessory_slots && istype(A) && (A.slot in valid_accessory_slots)) + .=1 + else + return 0 + if(accessories.len && restricted_accessory_slots && (A.slot in restricted_accessory_slots)) + for(var/obj/item/clothing/accessory/AC in accessories) + if (AC.slot == A.slot) + return 0 + +/obj/item/clothing/attackby(var/obj/item/I, var/mob/user) + if(istype(I, /obj/item/clothing/accessory)) + + if(!valid_accessory_slots || !valid_accessory_slots.len) + usr << "You cannot attach accessories of any kind to \the [src]." + return + + var/obj/item/clothing/accessory/A = I + if(can_attach_accessory(A)) + user.drop_item() + attach_accessory(user, A) + return + else + user << "You cannot attach more accessories of this type to [src]." + return + + if(accessories.len) + for(var/obj/item/clothing/accessory/A in accessories) + A.attackby(I, user) + return + + ..() + +/obj/item/clothing/attack_hand(var/mob/user) + //only forward to the attached accessory if the clothing is equipped (not in a storage) + if(accessories.len && src.loc == user) + for(var/obj/item/clothing/accessory/A in accessories) + A.attack_hand(user) + return + return ..() + +/obj/item/clothing/MouseDrop(var/obj/over_object) + if (ishuman(usr) || issmall(usr)) + //makes sure that the clothing is equipped so that we can't drag it into our hand from miles away. + if (!(src.loc == usr)) + return + + if (( usr.restrained() ) || ( usr.stat )) + return + + if (!usr.unEquip(src)) + return + + switch(over_object.name) + if("r_hand") + usr.put_in_r_hand(src) + if("l_hand") + usr.put_in_l_hand(src) + src.add_fingerprint(usr) + +/obj/item/clothing/examine(var/mob/user) + ..(user) + if(accessories.len) + for(var/obj/item/clothing/accessory/A in accessories) + user << "\A [A] is attached to it." + +/** + * Attach accessory A to src + * + * user is the user doing the attaching. Can be null, such as when attaching + * items on spawn + */ +/obj/item/clothing/proc/attach_accessory(mob/user, obj/item/clothing/accessory/A) + accessories += A + A.on_attached(src, user) + src.verbs |= /obj/item/clothing/proc/removetie_verb + update_clothing_icon() + +/obj/item/clothing/proc/remove_accessory(mob/user, obj/item/clothing/accessory/A) + if(!(A in accessories)) + return + + A.on_removed(user) + accessories -= A + update_clothing_icon() + +/obj/item/clothing/proc/removetie_verb() + set name = "Remove Accessory" + set category = "Object" + set src in usr + if(!istype(usr, /mob/living)) return + if(usr.stat) return + if(!accessories.len) return + var/obj/item/clothing/accessory/A + if(accessories.len > 1) + A = input("Select an accessory to remove from [src]") as null|anything in accessories + else + A = accessories[1] + src.remove_accessory(usr,A) + if(!accessories.len) + src.verbs -= /obj/item/clothing/proc/removetie_verb + +/obj/item/clothing/emp_act(severity) + if(accessories.len) + for(var/obj/item/clothing/accessory/A in accessories) + A.emp_act(severity) + ..() \ No newline at end of file diff --git a/code/modules/clothing/ears/skrell.dm b/code/modules/clothing/ears/skrell.dm index 59428fa5d96..e8bc3e8534d 100644 --- a/code/modules/clothing/ears/skrell.dm +++ b/code/modules/clothing/ears/skrell.dm @@ -11,73 +11,135 @@ species_restricted = list("Skrell") /obj/item/clothing/ears/skrell/chain - name = "skrell headtail chains" + name = "Gold headtail chains" desc = "A delicate golden chain worn by female skrell to decorate their head tails." icon_state = "skrell_chain" item_state = "skrell_chain" - + +/obj/item/clothing/ears/skrell/chain/silver + name = "Silver headtail chains" + desc = "A delicate silver chain worn by female skrell to decorate their head tails." + icon_state = "skrell_chain_sil" + item_state = "skrell_chain_sil" + +/obj/item/clothing/ears/skrell/chain/bluejewels + name = "Blue jeweled golden headtail chains" + desc = "A delicate golden chain adorned with blue jewels worn by female skrell to decorate their head tails." + icon_state = "skrell_chain_bjewel" + item_state = "skrell_chain_bjewel" + +/obj/item/clothing/ears/skrell/chain/redjewels + name = "Red jeweled golden headtail chains" + desc = "A delicate golden chain adorned with red jewels worn by female skrell to decorate their head tails." + icon_state = "skrell_chain_rjewel" + item_state = "skrell_chain_rjewel" + +/obj/item/clothing/ears/skrell/chain/ebony + name = "Ebony headtail chains" + desc = "A delicate ebony chain worn by female skrell to decorate their head tails." + icon_state = "skrell_chain_ebony" + item_state = "skrell_chain_ebony" + /obj/item/clothing/ears/skrell/band - name = "skrell headtail bands" + name = "Gold headtail bands" desc = "Golden metallic bands worn by male skrell to adorn their head tails." icon_state = "skrell_band" item_state = "skrell_band" + +/obj/item/clothing/ears/skrell/band/silver + name = "Silver headtail bands" + desc = "Silver metallic bands worn by male skrell to adorn their head tails." + icon_state = "skrell_band_sil" + item_state = "skrell_band_sil" + +/obj/item/clothing/ears/skrell/band/bluejewels + name = "Blue jeweled golden headtail bands" + desc = "Golden metallic bands adorned with blue jewels worn by male skrell to adorn their head tails." + icon_state = "skrell_band_bjewel" + item_state = "skrell_band_bjewel" + +/obj/item/clothing/ears/skrell/band/redjewels + name = "Red jeweled golden headtail bands" + desc = "Golden metallic bands adorned with red jewels worn by male skrell to adorn their head tails." + icon_state = "skrell_band_rjewel" + item_state = "skrell_band_rjewel" + +/obj/item/clothing/ears/skrell/band/ebony + name = "Ebony headtail bands" + desc = "Ebony bands worn by male skrell to adorn their head tails." + icon_state = "skrell_band_ebony" + item_state = "skrell_band_ebony" +/obj/item/clothing/ears/skrell/colored/band + name = "Colored headtail bands" + desc = "Metallic bands worn by male skrell to adorn their head tails." + icon_state = "skrell_band_sil" + item_state = "skrell_band_sil" + +/obj/item/clothing/ears/skrell/colored/chain + name = "Colored headtail chains" + desc = "A delicate chain worn by female skrell to decorate their head tails." + icon_state = "skrell_chain_sil" + item_state = "skrell_chain_sil" + /obj/item/clothing/ears/skrell/cloth_female - name = "skrell headtail cloth" + name = "red headtail cloth" desc = "A cloth shawl worn by female skrell draped around their head tails." icon_state = "skrell_cloth_female" item_state = "skrell_cloth_female" /obj/item/clothing/ears/skrell/cloth_female/black - name = "skrell headtail cloth" - desc = "A cloth shawl worn by female skrell draped around their head tails." + name = "black headtail cloth" icon_state = "skrell_cloth_black_female" item_state = "skrell_cloth_black_female" /obj/item/clothing/ears/skrell/cloth_female/blue - name = "skrell headtail cloth" - desc = "A cloth shawl worn by female skrell draped around their head tails." + name = "blue headtail cloth" icon_state = "skrell_cloth_blue_female" item_state = "skrell_cloth_blue_female" /obj/item/clothing/ears/skrell/cloth_female/green - name = "skrell headtail cloth" - desc = "A cloth shawl worn by female skrell draped around their head tails." + name = "green headtail cloth" icon_state = "skrell_cloth_green_female" item_state = "skrell_cloth_green_female" /obj/item/clothing/ears/skrell/cloth_female/pink - name = "skrell headtail cloth" - desc = "A cloth shawl worn by female skrell draped around their head tails." + name = "pink headtail cloth" icon_state = "skrell_cloth_pink_female" item_state = "skrell_cloth_pink_female" +/obj/item/clothing/ears/skrell/cloth_female/lightblue + name = "light blue headtail cloth" + icon_state = "skrell_cloth_lblue_female" + item_state = "skrell_cloth_lblue_female" + /obj/item/clothing/ears/skrell/cloth_male - name = "skrell headtail cloth" + name = "red headtail cloth" desc = "A cloth band worn by male skrell around their head tails." icon_state = "skrell_cloth_male" item_state = "skrell_cloth_male" /obj/item/clothing/ears/skrell/cloth_male/black - name = "skrell headtail cloth" - desc = "A cloth band worn by male skrell around their head tails." + name = "black headtail cloth" icon_state = "skrell_cloth_black_male" item_state = "skrell_cloth_black_male" /obj/item/clothing/ears/skrell/cloth_male/blue - name = "skrell headtail cloth" - desc = "A cloth band worn by male skrell around their head tails." + name = "blue headtail cloth" icon_state = "skrell_cloth_blue_male" item_state = "skrell_cloth_blue_male" /obj/item/clothing/ears/skrell/cloth_male/green - name = "skrell headtail cloth" - desc = "A cloth band worn by male skrell around their head tails." + name = "green headtail cloth" icon_state = "skrell_cloth_green_male" item_state = "skrell_cloth_green_male" /obj/item/clothing/ears/skrell/cloth_male/pink - name = "skrell headtail cloth" - desc = "A cloth band worn by male skrell around their head tails." + name = "pink headtail cloth" icon_state = "skrell_cloth_pink_male" - item_state = "skrell_cloth_pink_male" \ No newline at end of file + item_state = "skrell_cloth_pink_male" + +/obj/item/clothing/ears/skrell/cloth_male/lightblue + name = "light blue headtail cloth" + icon_state = "skrell_cloth_lblue_male" + item_state = "skrell_cloth_lblue_male" \ No newline at end of file diff --git a/code/modules/clothing/masks/monitor.dm b/code/modules/clothing/masks/monitor.dm index b2bfc138763..e8f63401722 100644 --- a/code/modules/clothing/masks/monitor.dm +++ b/code/modules/clothing/masks/monitor.dm @@ -52,7 +52,7 @@ return 0 if(istype(user)) var/obj/item/organ/external/E = user.organs_by_name[BP_HEAD] - if(istype(E) && (E.status & ORGAN_ROBOT)) + if(istype(E) && (E.robotic >= ORGAN_ROBOT)) return 1 user << "You must have a robotic head to install this upgrade." return 0 diff --git a/code/modules/clothing/shoes/jobs.dm b/code/modules/clothing/shoes/jobs.dm index 9e3bc0e2cfc..768595c2ae8 100644 --- a/code/modules/clothing/shoes/jobs.dm +++ b/code/modules/clothing/shoes/jobs.dm @@ -17,7 +17,7 @@ siemens_coefficient = 0.7 can_hold_knife = 1 -/obj/item/clothing/shoes/jackboots/unathi +/obj/item/clothing/shoes/jackboots/toeless name = "toe-less jackboots" desc = "Modified pair of jackboots, particularly friendly to those species whose toes hold claws." item_state = "digiboots" diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index 441763988b9..b94cb78da5c 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -43,7 +43,8 @@ user << "You are unable to wear \the [src] as \the [H.shoes] are in the way." shoes = null return 0 - H.removeItem(shoes, src) //Remove the old shoes so you can put on the magboots. + H.drop_from_inventory(shoes) //Remove the old shoes so you can put on the magboots. + shoes.forceMove(src) if(!..()) if(shoes) //Put the old shoes back on if the check fails. diff --git a/code/modules/clothing/spacesuits/rig/modules/combat.dm b/code/modules/clothing/spacesuits/rig/modules/combat.dm index b9594004669..3e8cb36a6c1 100644 --- a/code/modules/clothing/spacesuits/rig/modules/combat.dm +++ b/code/modules/clothing/spacesuits/rig/modules/combat.dm @@ -55,7 +55,8 @@ return 0 user << "You slot \the [input_device] into the suit module." - user.deleteItem(input_device) + user.drop_from_inventory(input_device) + qdel(input_device) accepted_item.charges++ return 1 @@ -203,7 +204,8 @@ return for(var/obj/item/weapon/melee/energy/blade/blade in M.contents) - M.deleteItem(blade) + M.drop_from_inventory(blade) + qdel(blade) /obj/item/rig_module/fabricator diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm index d9ff8bb7d6b..c8a2296680a 100644 --- a/code/modules/clothing/spacesuits/rig/modules/computer.dm +++ b/code/modules/clothing/spacesuits/rig/modules/computer.dm @@ -208,7 +208,8 @@ else return 0 else - user.removeItem(ai, src) + user.drop_from_inventory(ai) + ai.forceMove(src) ai_card = ai ai_mob << "You have been transferred to \the [holder]'s [src]." user << "You load [ai_mob] into \the [holder]'s [src]." @@ -448,8 +449,9 @@ drain_complete(H) return - // Attempts to drain up to 40kW, determines this value from remaining cell capacity to ensure we don't drain too much.. - var/to_drain = min(40000, ((holder.cell.maxcharge - holder.cell.charge) / CELLRATE)) + // Attempts to drain up to 12.5*cell-capacity kW, determines this value from remaining cell capacity to ensure we don't drain too much. + // 1Ws/(12.5*CELLRATE) = 40s to charge + var/to_drain = min(12.5*holder.cell.maxcharge, ((holder.cell.maxcharge - holder.cell.charge) / CELLRATE)) var/target_drained = interfaced_with.drain_power(0,0,to_drain) if(target_drained <= 0) H << "Your power sink flashes a red light; there is no power left in [interfaced_with]." @@ -459,14 +461,14 @@ holder.cell.give(target_drained * CELLRATE) total_power_drained += target_drained - return 1 + return /obj/item/rig_module/power_sink/proc/drain_complete(var/mob/living/M) if(!interfaced_with) - if(M) M << "Total power drained: [round(total_power_drained/1000)]kJ." + if(M) M << "Total power drained: [round(total_power_drained*CELLRATE)] cell units." else - if(M) M << "Total power drained from [interfaced_with]: [round(total_power_drained/1000)]kJ." + if(M) M << "Total power drained from [interfaced_with]: [round(total_power_drained*CELLRATE)] cell units." interfaced_with.drain_power(0,1,0) // Damage the victim. drain_loc = null diff --git a/code/modules/clothing/spacesuits/rig/modules/ninja.dm b/code/modules/clothing/spacesuits/rig/modules/ninja.dm index 764c07cf9ea..5f6ce6249cc 100644 --- a/code/modules/clothing/spacesuits/rig/modules/ninja.dm +++ b/code/modules/clothing/spacesuits/rig/modules/ninja.dm @@ -67,7 +67,7 @@ name = "teleportation module" desc = "A complex, sleek-looking, hardsuit-integrated teleportation module." icon_state = "teleporter" - use_power_cost = 40 + use_power_cost = 200 redundant = 1 usable = 1 selectable = 1 @@ -97,8 +97,6 @@ /obj/item/rig_module/teleporter/engage(var/atom/target, var/notify_ai) - if(!..()) return 0 - var/mob/living/carbon/human/H = holder.wearer if(!istype(H.loc, /turf)) @@ -109,9 +107,13 @@ if(target) T = get_turf(target) else - T = get_teleport_loc(get_turf(H), H, rand(5, 9)) + T = get_teleport_loc(get_turf(H), H, 6, 1, 1, 1) - if(!T || T.density) + if(!T) + H << "No valid teleport target found." + return 0 + + if(T.density) H << "You cannot teleport into solid walls." return 0 @@ -127,6 +129,8 @@ H << "You cannot teleport to such a distant object." return 0 + if(!..()) return 0 + phase_out(H,get_turf(H)) H.forceMove(T) phase_in(H,get_turf(H)) @@ -200,6 +204,6 @@ return explosion(get_turf(src), explosion_values[1], explosion_values[2], explosion_values[3], explosion_values[4]) if(holder && holder.wearer) - holder.wearer.removeItem(src) + holder.wearer.drop_from_inventory(src) qdel(holder) qdel(src) diff --git a/code/modules/clothing/spacesuits/rig/modules/utility.dm b/code/modules/clothing/spacesuits/rig/modules/utility.dm index da346e57b90..679a822aec8 100644 --- a/code/modules/clothing/spacesuits/rig/modules/utility.dm +++ b/code/modules/clothing/spacesuits/rig/modules/utility.dm @@ -458,7 +458,8 @@ return for(var/obj/item/weapon/mop_deploy/blade in M.contents) - M.deleteItem(blade) + M.drop_from_inventory(blade) + del(blade) //Space Cleaner Launcher @@ -500,7 +501,8 @@ return 0 user << "You slot \the [input_device] into the suit module." - user.deleteItem(input_device) + user.drop_from_inventory(input_device) + del(input_device) accepted_item.charges++ return 1 diff --git a/code/modules/clothing/spacesuits/rig/modules/vision.dm b/code/modules/clothing/spacesuits/rig/modules/vision.dm index aa106eda02a..ddff6aefe00 100644 --- a/code/modules/clothing/spacesuits/rig/modules/vision.dm +++ b/code/modules/clothing/spacesuits/rig/modules/vision.dm @@ -50,6 +50,7 @@ usable = 1 toggleable = 1 disruptive = 0 + module_cooldown = 0 engage_string = "Cycle Visor Mode" activate_string = "Enable Visor" diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 218c9b81e63..4d900827081 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -133,7 +133,6 @@ chest = new chest_type(src) if(allowed) chest.allowed = allowed - chest.slowdown = offline_slowdown verbs |= /obj/item/weapon/rig/proc/toggle_chest for(var/obj/item/piece in list(gloves,helmet,boots,chest)) @@ -157,7 +156,7 @@ for(var/obj/item/piece in list(gloves,boots,helmet,chest)) var/mob/living/M = piece.loc if(istype(M)) - M.removeItem(piece) + M.drop_from_inventory(piece) qdel(piece) processing_objects -= src qdel(wires) @@ -307,7 +306,7 @@ if(piece.loc != src && !(wearer && piece.loc == wearer)) if(istype(piece.loc, /mob/living)) M = piece.loc - M.removeItem(piece) + M.unEquip(piece) piece.forceMove(src) if(!istype(wearer) || loc != wearer || wearer.back != src || canremove || !cell || cell.charge <= 0) @@ -332,14 +331,14 @@ offline = 0 if(istype(wearer) && !wearer.wearing_rig) wearer.wearing_rig = src - chest.slowdown = initial(slowdown) + slowdown = initial(slowdown) if(offline) if(offline == 1) for(var/obj/item/rig_module/module in installed_modules) module.deactivate() offline = 2 - chest.slowdown = offline_slowdown + slowdown = offline_slowdown return if(cell && cell.charge > 0 && electrified > 0) @@ -472,8 +471,8 @@ var/species_icon = 'icons/mob/rig_back.dmi' // Since setting mob_icon will override the species checks in // update_inv_wear_suit(), handle species checks here. - if(wearer && sprite_sheets && sprite_sheets[wearer.species.get_bodytype()]) - species_icon = sprite_sheets[wearer.species.get_bodytype()] + 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]") if(installed_modules.len) @@ -495,6 +494,8 @@ return 1 if(istype(user)) + if(!canremove) + return 1 if(malfunction_check(user)) return 0 if(user.back != src) @@ -560,7 +561,7 @@ M.visible_message("[M] starts putting on \the [src]...", "You start putting on \the [src]...") if(!do_after(M,seal_delay)) if(M && M.back == src) - if(!M.removeItem(src)) + if(!M.unEquip(src)) return src.forceMove(get_turf(src)) return @@ -618,7 +619,7 @@ if(use_obj && check_slot == use_obj) H << "Your [use_obj.name] [use_obj.gender == PLURAL ? "retract" : "retracts"] swiftly." use_obj.canremove = 1 - holder.removeItem(use_obj) + holder.drop_from_inventory(use_obj) use_obj.forceMove(get_turf(src)) use_obj.dropped() use_obj.canremove = 0 @@ -651,23 +652,27 @@ if(sealed) if(H.head) var/obj/item/garbage = H.head - H.deleteItem(garbage) + H.drop_from_inventory(garbage) H.head = null + qdel(garbage) if(H.gloves) var/obj/item/garbage = H.gloves - H.deleteItem(garbage) + H.drop_from_inventory(garbage) H.gloves = null + qdel(garbage) if(H.shoes) var/obj/item/garbage = H.shoes - H.deleteItem(garbage) + H.drop_from_inventory(garbage) H.shoes = null + qdel(garbage) if(H.wear_suit) var/obj/item/garbage = H.wear_suit - H.deleteItem(garbage) + H.drop_from_inventory(garbage) H.wear_suit = null + qdel(garbage) for(var/piece in list("helmet","gauntlets","chest","boots")) toggle_piece(piece, H, ONLY_DEPLOY) diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm index 33003c124af..cda9d51796a 100644 --- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm +++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm @@ -56,7 +56,7 @@ user << "\The [src] already has a tank installed." return - if(!user.removeItem(W)) return + if(!user.unEquip(W)) return air_supply = W W.forceMove(src) user << "You slot [W] into [src] and tighten the connecting valve." @@ -84,7 +84,7 @@ return if(!user || !W) return - if(!user.removeItem(mod)) return + if(!user.unEquip(mod)) return user << "You install \the [mod] into \the [src]." installed_modules |= mod mod.forceMove(src) @@ -94,7 +94,7 @@ else if(!cell && istype(W,/obj/item/weapon/cell)) - if(!user.removeItem(W)) return + if(!user.unEquip(W)) return user << "You jack \the [W] into \the [src]'s battery mount." W.forceMove(src) src.cell = W diff --git a/code/modules/clothing/spacesuits/rig/suits/alien.dm b/code/modules/clothing/spacesuits/rig/suits/alien.dm index e2ded4c4684..5662e8b1813 100644 --- a/code/modules/clothing/spacesuits/rig/suits/alien.dm +++ b/code/modules/clothing/spacesuits/rig/suits/alien.dm @@ -1,7 +1,7 @@ -/obj/item/weapon/rig/unathi - name = "NT breacher chassis control module" +/obj/item/weapon/rig/breacher + name = "\improper NT breacher chassis control module" desc = "A cheap NT knock-off of an Unathi battle-rig. Looks like a fish, moves like a fish, steers like a cow." - suit_type = "NT breacher" + suit_type = "\improper NT breacher" icon_state = "breacher_rig_cheap" armor = list(melee = 60, bullet = 60, laser = 60, energy = 60, bomb = 70, bio = 100, rad = 50) emp_protection = -20 @@ -10,11 +10,11 @@ vision_restriction = 1 offline_vision_restriction = 2 - chest_type = /obj/item/clothing/suit/space/rig - helm_type = /obj/item/clothing/head/helmet/space/rig/unathi - boot_type = /obj/item/clothing/shoes/magboots/rig/unathi + chest_type = /obj/item/clothing/suit/space/rig/breacher + helm_type = /obj/item/clothing/head/helmet/space/rig/breacher + boot_type = /obj/item/clothing/shoes/magboots/rig/breacher -/obj/item/weapon/rig/unathi/fancy +/obj/item/weapon/rig/breacher/fancy name = "breacher chassis control module" desc = "An authentic Unathi breacher chassis. Huge, bulky and absurdly heavy. It must be like wearing a tank." suit_type = "breacher chassis" @@ -22,12 +22,12 @@ armor = list(melee = 90, bullet = 90, laser = 90, energy = 90, bomb = 90, bio = 100, rad = 80) //Takes TEN TIMES as much damage to stop someone in a breacher. In exchange, it's slow. vision_restriction = 0 -/obj/item/clothing/head/helmet/space/rig/unathi +/obj/item/clothing/head/helmet/space/rig/breacher species_restricted = list("Unathi") force = 5 -/obj/item/clothing/suit/space/rig/unathi +/obj/item/clothing/suit/space/rig/breacher species_restricted = list("Unathi") -/obj/item/clothing/shoes/magboots/rig/unathi +/obj/item/clothing/shoes/magboots/rig/breacher species_restricted = list("Unathi") \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm index bc5c15fbb07..3c4975f7d31 100644 --- a/code/modules/clothing/spacesuits/rig/suits/light.dm +++ b/code/modules/clothing/spacesuits/rig/suits/light.dm @@ -82,6 +82,7 @@ chest_type = /obj/item/clothing/suit/space/rig/light/ninja glove_type = /obj/item/clothing/gloves/rig/light/ninja + cell_type = /obj/item/weapon/cell/hyper req_access = list(access_syndicate) diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index ecac7222048..b5669b6746e 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -48,7 +48,7 @@ /obj/item/clothing/suit/space name = "Space suit" - desc = "A suit that protects against low pressure environments. \"NORTHERN STAR\" is written in large block letters on the back." + desc = "A suit that protects against low pressure environments. \""+station_short+"\" is written in large block letters on the back." icon_state = "space" item_state = "s_suit" w_class = 5 // So you can't fit this in your bag and be prepared at all times. diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index 2e963fdadbf..c0d9e58a2c7 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -15,12 +15,14 @@ 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', + "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' ) light_overlay = "helmet_light" @@ -40,12 +42,14 @@ 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', + "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' ) //Breach thresholds, should ideally be inherited by most (if not all) voidsuits. @@ -121,14 +125,16 @@ H = helmet.loc if(istype(H)) if(helmet && H.head == helmet) - H.removeItem(helmet, src) + H.drop_from_inventory(helmet) + helmet.forceMove(src) if(boots) boots.canremove = 1 H = boots.loc if(istype(H)) if(boots && H.shoes == boots) - H.removeItem(boots, src) + H.drop_from_inventory(boots) + boots.forceMove(src) if(tank) tank.canremove = 1 @@ -159,7 +165,8 @@ if(H.head == helmet) H << "You retract your suit helmet." helmet.canremove = 1 - H.removeItem(helmet, src) + H.drop_from_inventory(helmet) + helmet.forceMove(src) else if(H.head) H << "You cannot deploy your helmet while wearing \the [H.head]." @@ -197,14 +204,17 @@ cooler = null H << "You press the emergency release, ejecting \the [removing] from your suit." removing.canremove = 1 - H.removeItem(removing) + H.drop_from_inventory(removing) /obj/item/clothing/suit/space/void/attackby(obj/item/W as obj, mob/user as mob) if(!istype(user,/mob/living)) return + if(istype(W,/obj/item/clothing/accessory) || istype(W, /obj/item/weapon/hand_labeler)) + return ..() + if(istype(src.loc,/mob/living)) - user << "How do you propose to modify a voidsuit while it is being worn?" + user << "You cannot modify \the [src] while it is being worn." return if(istype(W,/obj/item/weapon/screwdriver)) diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index bfcde568e9c..b856f8a8bbf 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -46,14 +46,14 @@ desc = "An armoured jacket with silver rank pips and livery." icon_state = "warden_jacket" item_state = "armor" - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS + body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS /obj/item/clothing/suit/armor/vest/warden/alt name = "Warden's jacket" desc = "An armoured jacket with silver rank pips and livery." icon_state = "warden_alt" item_state = "warden_alt" - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS + body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS /obj/item/clothing/suit/armor/riot diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index cb7db449328..413685df456 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -517,8 +517,8 @@ icon_closed = "cti_hoodie" /obj/item/clothing/suit/storage/toggle/hoodie/mu - name = "mars university hoodie" - desc = "A warm, gray sweatshirt. It bears the letters ‘MU’ on the front, a lettering to the well-known public college, Mars University." + name = "mojave university hoodie" + desc = "A warm, gray sweatshirt. It bears the letters ‘MU’ on the front, a lettering to the well-known public college, Mojave University." icon_state = "mu_hoodie" item_state = "mu_hoodie" icon_open = "mu_hoodie_open" @@ -656,3 +656,67 @@ name = "mining winter coat" icon_state = "coatminer" armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + +/obj/item/clothing/suit/varsity + name = "black varsity jacket" + desc = "A favorite of jocks everywhere from Sol to Nyx." + icon_state = "varsity" + item_state = "leather_jacket" + +/obj/item/clothing/suit/varsity/red + name = "red varsity jacket" + icon_state = "varsity_red" + +/obj/item/clothing/suit/varsity/purple + name = "purple varsity jacket" + icon_state = "varsity_purple" + +/obj/item/clothing/suit/varsity/green + name = "green varsity jacket" + icon_state = "varsity_green" + +/obj/item/clothing/suit/varsity/blue + name = "blue varsity jacket" + icon_state = "varsity_blue" + +/obj/item/clothing/suit/varsity/brown + name = "brown varsity jacket" + icon_state = "varsity_brown" + +//Track Jackets + +/obj/item/clothing/suit/storage/toggle/track + name = "track jacket" + desc = "a track jacket, for the athletic." + icon_state = "trackjacket" + item_state = "trackjacket" + icon_open = "trackjacket_open" + icon_closed = "trackjacket" + +/obj/item/clothing/suit/storage/toggle/track/blue + name = "blue track jacket" + icon_state = "trackjacketblue" + item_state = "trackjacketblue" + icon_open = "trackjacketblue_open" + icon_closed = "trackjacketblue" + +/obj/item/clothing/suit/storage/toggle/track/green + name = "green track jacket" + icon_state = "trackjacketgreen" + item_state = "trackjacketgreen" + icon_open = "trackjacketgreen_open" + icon_closed = "trackjacketgreen" + +/obj/item/clothing/suit/storage/toggle/track/red + name = "red track jacket" + icon_state = "trackjacketred" + item_state = "trackjacketred" + icon_open = "trackjacketred_open" + icon_closed = "trackjacketred" + +/obj/item/clothing/suit/storage/toggle/track/white + name = "white track jacket" + icon_state = "trackjacketwhite" + item_state = "trackjacketwhite" + icon_open = "trackjacketwhite_open" + icon_closed = "trackjacketwhite" \ No newline at end of file diff --git a/code/modules/clothing/suits/toggles.dm b/code/modules/clothing/suits/toggles.dm index 8ac1373d27a..d9aa9bbd3d3 100644 --- a/code/modules/clothing/suits/toggles.dm +++ b/code/modules/clothing/suits/toggles.dm @@ -32,7 +32,7 @@ suittoggled = 0 if(ishuman(hood.loc)) var/mob/living/carbon/H = hood.loc - H.removeItem(hood, force = 1) + H.unEquip(hood, 1) H.update_inv_wear_suit() hood.loc = src diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 3725fccd304..d4ab2e4d0f7 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -7,11 +7,15 @@ slot_flags = SLOT_TIE w_class = 2.0 var/slot = "decor" - var/obj/item/clothing/under/has_suit = null //the suit the tie may be attached to + var/obj/item/clothing/has_suit = null //the suit the tie may be attached to var/image/inv_overlay = null //overlay used when attached to clothing. var/image/mob_overlay = null var/overlay_state = null +/obj/item/clothing/accessory/Destroy() + on_removed() + return ..() + /obj/item/clothing/accessory/proc/get_inv_overlay() if(!inv_overlay) if(!mob_overlay) @@ -36,23 +40,27 @@ return mob_overlay //when user attached an accessory to S -/obj/item/clothing/accessory/proc/on_attached(obj/item/clothing/under/S, mob/user as mob) +/obj/item/clothing/accessory/proc/on_attached(var/obj/item/clothing/S, var/mob/user) if(!istype(S)) return has_suit = S loc = has_suit has_suit.overlays += get_inv_overlay() - user << "You attach [src] to [has_suit]." - src.add_fingerprint(user) + if(user) + user << "You attach \the [src] to \the [has_suit]." + src.add_fingerprint(user) -/obj/item/clothing/accessory/proc/on_removed(mob/user as mob) +/obj/item/clothing/accessory/proc/on_removed(var/mob/user) if(!has_suit) return has_suit.overlays -= get_inv_overlay() has_suit = null - usr.put_in_hands(src) - src.add_fingerprint(user) + if(user) + usr.put_in_hands(src) + src.add_fingerprint(user) + else + src.forceMove(get_turf(src)) //default attackby behaviour /obj/item/clothing/accessory/attackby(obj/item/I, mob/user) @@ -72,10 +80,26 @@ name = "red tie" icon_state = "redtie" +/obj/item/clothing/accessory/blue_clip + name = "blue tie with a clip" + icon_state = "bluecliptie" + +/obj/item/clothing/accessory/red_long + name = "red long tie" + icon_state = "redlongtie" + /obj/item/clothing/accessory/black name = "black tie" icon_state = "blacktie" +/obj/item/clothing/accessory/yellow + name = "yellow tie" + icon_state = "yellowtie" + +/obj/item/clothing/accessory/navy + name = "navy tie" + icon_state = "navytie" + /obj/item/clothing/accessory/horrible name = "horrible tie" desc = "A neosilk clip-on tie. This one is disgusting." @@ -100,7 +124,7 @@ var/sound_strength = "cannot hear" var/heartbeat = 0 var/obj/item/organ/internal/heart/heart = M.internal_organs_by_name[O_HEART] - if(heart && !(heart.status & ORGAN_ROBOT)) + if(heart && !(heart.robotic >= ORGAN_ROBOT)) heartbeat = 1 if(M.stat == DEAD || (M.status_flags&FAKEDEATH)) sound_strength = "cannot hear" diff --git a/code/modules/clothing/under/accessories/clothing.dm b/code/modules/clothing/under/accessories/clothing.dm new file mode 100644 index 00000000000..59b2ba17975 --- /dev/null +++ b/code/modules/clothing/under/accessories/clothing.dm @@ -0,0 +1,29 @@ +/obj/item/clothing/accessory/vest + name = "black vest" + desc = "Slick black suit vest." + icon_state = "det_vest" + +/obj/item/clothing/accessory/tan_jacket + name = "tan suit jacket" + desc = "Cozy suit jacket." + icon_state = "tan_jacket" + +/obj/item/clothing/accessory/charcoal_jacket + name = "charcoal suit jacket" + desc = "Strict suit jacket." + icon_state = "charcoal_jacket" + +/obj/item/clothing/accessory/navy_jacket + name = "navy suit jacket" + desc = "Official suit jacket." + icon_state = "navy_jacket" + +/obj/item/clothing/accessory/burgundy_jacket + name = "burgundy suit jacket" + desc = "Expensive suit jacket." + icon_state = "burgundy_jacket" + +/obj/item/clothing/accessory/checkered_jacket + name = "checkered suit jacket" + desc = "Lucky suit jacket." + icon_state = "checkered_jacket" \ No newline at end of file diff --git a/code/modules/clothing/under/accessories/holster.dm b/code/modules/clothing/under/accessories/holster.dm index 1ea459df513..9ba4ffa5e34 100644 --- a/code/modules/clothing/under/accessories/holster.dm +++ b/code/modules/clothing/under/accessories/holster.dm @@ -17,7 +17,8 @@ if(istype(user)) user.stop_aiming(no_message=1) holstered = I - user.removeItem(holstered, src) + user.drop_from_inventory(holstered) + holstered.loc = src holstered.add_fingerprint(user) w_class = max(w_class, holstered.w_class) user.visible_message("[user] holsters \the [holstered].", "You holster \the [holstered].") diff --git a/code/modules/clothing/under/accessories/storage.dm b/code/modules/clothing/under/accessories/storage.dm index 0e9a004a2ef..9ab1a5fdbf6 100644 --- a/code/modules/clothing/under/accessories/storage.dm +++ b/code/modules/clothing/under/accessories/storage.dm @@ -68,6 +68,27 @@ icon_state = "vest_white" slots = 5 +/obj/item/clothing/accessory/storage/black_drop_pouches + name = "black drop pouches" + gender = PLURAL + desc = "Robust black synthcotton bags to hold whatever you need, but cannot hold in hands." + icon_state = "thigh_black" + slots = 5 + +/obj/item/clothing/accessory/storage/brown_drop_pouches + name = "brown drop pouches" + gender = PLURAL + desc = "Worn brownish synthcotton bags to hold whatever you need, but cannot hold in hands." + icon_state = "thigh_brown" + slots = 5 + +/obj/item/clothing/accessory/storage/white_drop_pouches + name = "white drop pouches" + gender = PLURAL + desc = "Durable white synthcotton bags to hold whatever you need, but cannot hold in hands." + icon_state = "thigh_white" + slots = 5 + /obj/item/clothing/accessory/storage/knifeharness name = "decorated harness" desc = "A heavily decorated harness of sinew and leather with two knife-loops." diff --git a/code/modules/clothing/under/color.dm b/code/modules/clothing/under/color.dm index c852147ba33..9267b96cc17 100644 --- a/code/modules/clothing/under/color.dm +++ b/code/modules/clothing/under/color.dm @@ -14,7 +14,7 @@ /obj/item/clothing/under/color/blackjumpskirt name = "black jumpskirt" - desc = "A black jumpskirt, Sol size 0." + desc = "A slimming black jumpskirt." icon_state = "blackjumpskirt" item_state = "bl_suit" worn_state = "blackjumpskirt" diff --git a/code/modules/clothing/under/jobs/civilian.dm b/code/modules/clothing/under/jobs/civilian.dm index fae598251c6..5f16483bb23 100644 --- a/code/modules/clothing/under/jobs/civilian.dm +++ b/code/modules/clothing/under/jobs/civilian.dm @@ -8,7 +8,6 @@ worn_state = "ba_suit" rolled_sleeves = 0 - /obj/item/clothing/under/rank/captain //Alright, technically not a 'civilian' but its better then giving a .dm file for a single define. desc = "It's a blue jumpsuit with some gold markings denoting the rank of \"Captain\"." name = "captain's jumpsuit" @@ -17,7 +16,6 @@ worn_state = "captain" rolled_sleeves = 0 - /obj/item/clothing/under/rank/cargo name = "quartermaster's jumpsuit" desc = "It's a jumpsuit worn by the quartermaster. It's specially designed to prevent back injuries caused by pushing paper." @@ -26,14 +24,6 @@ worn_state = "qm" rolled_sleeves = 0 -/obj/item/clothing/under/rank/cargo/skirt - name = "quartermaster's jumpskirt" - desc = "It's a jumpskirt worn by the quartermaster. It's specially designed to prevent back injuries caused by pushing paper." - icon_state = "qmf" - worn_state = "qmf" - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - rolled_sleeves = -1 - /obj/item/clothing/under/rank/cargo/jeans name = "quartermaster's jumpjeans" desc = "Jeeeaaans! They're comfy!" @@ -56,13 +46,6 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS rolled_sleeves = 0 -/obj/item/clothing/under/rank/cargotech/skirt - name = "cargo technician's jumpskirt" - desc = "Skirrrrrts! They're comfy and easy to wear!" - icon_state = "cargof" - worn_state = "cargof" - rolled_sleeves = -1 - /obj/item/clothing/under/rank/cargotech/jeans name = "cargo technician's jumpjeans" desc = "Jeeeaaans! They're comfy!" @@ -76,7 +59,6 @@ icon_state = "cargojf" worn_state = "cargojf" - /obj/item/clothing/under/rank/chaplain desc = "It's a black jumpsuit, often worn by religious folk." name = "chaplain's jumpsuit" @@ -85,7 +67,6 @@ worn_state = "chapblack" rolled_sleeves = 0 - /obj/item/clothing/under/rank/chef desc = "It's an apron which is given only to the most hardcore chefs in space." name = "chef's uniform" @@ -94,7 +75,6 @@ worn_state = "chef" rolled_sleeves = 0 - /obj/item/clothing/under/rank/clown name = "clown suit" desc = "'HONK!'" @@ -103,7 +83,6 @@ worn_state = "clown" rolled_sleeves = -1 - /obj/item/clothing/under/rank/head_of_personnel desc = "It's a jumpsuit worn by someone who works in the position of \"Head of Personnel\"." name = "head of personnel's jumpsuit" @@ -120,7 +99,6 @@ worn_state = "hopwhimsy" rolled_sleeves = -1 - /obj/item/clothing/under/rank/hydroponics desc = "It's a jumpsuit designed to protect against minor plant-related hazards." name = "botanist's jumpsuit" @@ -130,7 +108,6 @@ permeability_coefficient = 0.50 rolled_sleeves = 0 - /obj/item/clothing/under/rank/internalaffairs desc = "The plain, professional attire of an Internal Affairs Agent. The collar is immaculately starched." name = "Internal Affairs uniform" @@ -138,7 +115,7 @@ item_state = "ba_suit" worn_state = "internalaffairs" rolled_sleeves = 0 - + starting_accessories = list(/obj/item/clothing/accessory/black) /obj/item/clothing/under/rank/janitor desc = "It's the official uniform of the station's janitor. It has minor protection from biohazards." @@ -149,47 +126,41 @@ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) rolled_sleeves = 0 - /obj/item/clothing/under/lawyer desc = "Slick threads." name = "Lawyer suit" - /obj/item/clothing/under/lawyer/black name = "black Lawyer suit" icon_state = "lawyer_black" item_state = "lawyer_black" worn_state = "lawyer_black" - /obj/item/clothing/under/lawyer/female name = "black Lawyer suit" icon_state = "black_suit_fem" item_state = "lawyer_black" worn_state = "black_suit_fem" - /obj/item/clothing/under/lawyer/red name = "red Lawyer suit" icon_state = "lawyer_red" item_state = "lawyer_red" worn_state = "lawyer_red" - /obj/item/clothing/under/lawyer/blue name = "blue Lawyer suit" icon_state = "lawyer_blue" item_state = "lawyer_blue" worn_state = "lawyer_blue" - /obj/item/clothing/under/lawyer/bluesuit name = "Blue Suit" - desc = "A classy suit and tie" + desc = "A classy suit." icon_state = "bluesuit" item_state = "ba_suit" worn_state = "bluesuit" - + starting_accessories = list(/obj/item/clothing/accessory/red) /obj/item/clothing/under/lawyer/purpsuit name = "Purple Suit" @@ -204,7 +175,6 @@ item_state = "johnny" worn_state = "oldman" - /obj/item/clothing/under/librarian name = "sensible suit" desc = "It's very... sensible." diff --git a/code/modules/clothing/under/jobs/engineering.dm b/code/modules/clothing/under/jobs/engineering.dm index 0cdcac576be..0c820c6e7ae 100644 --- a/code/modules/clothing/under/jobs/engineering.dm +++ b/code/modules/clothing/under/jobs/engineering.dm @@ -8,14 +8,6 @@ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10) rolled_sleeves = 0 -/obj/item/clothing/under/rank/chief_engineer/skirt - desc = "It's a high visibility jumpskirt given to those engineers insane enough to achieve the rank of \"Chief engineer\". It has minor radiation shielding." - name = "chief engineer's jumpskirt" - icon_state = "chieff" - worn_state = "chieff" - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - rolled_sleeves = -1 - /obj/item/clothing/under/rank/atmospheric_technician desc = "It's a jumpsuit worn by atmospheric technicians." name = "atmospheric technician's jumpsuit" @@ -24,14 +16,6 @@ worn_state = "atmos" rolled_sleeves = 0 -/obj/item/clothing/under/rank/atmospheric_technician/skirt - desc = "It's a jumpskirt worn by atmospheric technicians." - name = "atmospheric technician's jumpskirt" - icon_state = "atmosf" - worn_state = "atmosf" - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - rolled_sleeves = -1 - /obj/item/clothing/under/rank/engineer desc = "It's an orange high visibility jumpsuit worn by engineers. It has minor radiation shielding." name = "engineer's jumpsuit" @@ -41,25 +25,10 @@ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10) rolled_sleeves = 0 -/obj/item/clothing/under/rank/engineer/skirt - desc = "It's an orange high visibility jumpskirt worn by engineers. It has minor radiation shielding." - name = "engineer's jumpskirt" - icon_state = "enginef" - worn_state = "enginef" - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - rolled_sleeves = -1 - /obj/item/clothing/under/rank/roboticist desc = "It's a slimming black jumpsuit with reinforced seams; great for industrial work." name = "roboticist's jumpsuit" icon_state = "robotics" item_state = "bl_suit" worn_state = "robotics" - rolled_sleeves = 0 - -/obj/item/clothing/under/rank/roboticist/skirt - desc = "It's a slimming black jumpskirt with reinforced seams; great for industrial work." - name = "roboticist's jumpskirt" - icon_state = "roboticsf" - worn_state = "roboticsf" - rolled_sleeves = -1 + rolled_sleeves = 0 \ No newline at end of file diff --git a/code/modules/clothing/under/jobs/medsci.dm b/code/modules/clothing/under/jobs/medsci.dm index 4b212331be3..a80cd626c3b 100644 --- a/code/modules/clothing/under/jobs/medsci.dm +++ b/code/modules/clothing/under/jobs/medsci.dm @@ -36,13 +36,6 @@ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0) rolled_sleeves = 0 -/obj/item/clothing/under/rank/scientist/skirt - name = "scientist's jumpskirt" - icon_state = "sciencewhitef" - worn_state = "sciencewhitef" - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - rolled_sleeves = -1 - /obj/item/clothing/under/rank/chemist desc = "It's made of a special fiber that gives special protection against biohazards. It has a chemist rank stripe on it." name = "chemist's jumpsuit" @@ -53,13 +46,6 @@ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) rolled_sleeves = 0 -/obj/item/clothing/under/rank/chemist/skirt - name = "chemist's jumpskirt" - icon_state = "chemistrywhitef" - worn_state = "chemistrywhitef" - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - rolled_sleeves = -1 - /* * Medical */ @@ -73,14 +59,6 @@ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) rolled_sleeves = 0 -/obj/item/clothing/under/rank/chief_medical_officer/skirt - desc = "It's a jumpskirt worn by those with the experience to be \"Chief Medical Officer\". It provides minor biological protection." - name = "chief medical officer's jumpskirt" - icon_state = "cmof" - worn_state = "cmof" - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - rolled_sleeves = -1 - /obj/item/clothing/under/rank/geneticist desc = "It's made of a special fiber that gives special protection against biohazards. It has a genetics rank stripe on it." name = "geneticist's jumpsuit" @@ -91,13 +69,6 @@ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) rolled_sleeves = 0 -/obj/item/clothing/under/rank/geneticist/skirt - name = "geneticist's jumpskirt" - icon_state = "geneticswhitef" - worn_state = "geneticswhitef" - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - rolled_sleeves = -1 - /obj/item/clothing/under/rank/virologist desc = "It's made of a special fiber that gives special protection against biohazards. It has a virologist rank stripe on it." name = "virologist's jumpsuit" @@ -108,13 +79,6 @@ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) rolled_sleeves = 0 -/obj/item/clothing/under/rank/virologist/skirt - name = "virologist's jumpskirt" - icon_state = "virologywhitef" - worn_state = "virologywhitef" - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - rolled_sleeves = -1 - /obj/item/clothing/under/rank/nursesuit desc = "It's a jumpsuit commonly worn by nursing staff in the medical department." name = "nurse's suit" @@ -157,13 +121,6 @@ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) rolled_sleeves = 0 -/obj/item/clothing/under/rank/medical/skirt - name = "medical doctor's jumpskirt" - icon_state = "medicalf" - worn_state = "medicalf" - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - rolled_sleeves = -1 - /obj/item/clothing/under/rank/medical/paramedic name = "short sleeve medical jumpsuit" desc = "It's made of a special fiber that provides minor protection against biohazards. This one has a cross on the chest denoting that the wearer is trained medical personnel." diff --git a/code/modules/clothing/under/jobs/security.dm b/code/modules/clothing/under/jobs/security.dm index eb8310d2191..564a962125a 100644 --- a/code/modules/clothing/under/jobs/security.dm +++ b/code/modules/clothing/under/jobs/security.dm @@ -18,13 +18,6 @@ siemens_coefficient = 0.9 rolled_sleeves = 0 -/obj/item/clothing/under/rank/warden/skirt - desc = "Standard feminine fashion for a Warden. It is made of sturdier material than standard jumpskirts. It has the word \"Warden\" written on the shoulders." - name = "warden's jumpskirt" - icon_state = "wardenf" - item_state = "r_suit" - worn_state = "wardenf" - /obj/item/clothing/head/helmet/warden name = "warden's hat" desc = "It's a special helmet issued to the Warden of a securiy force." @@ -41,13 +34,6 @@ siemens_coefficient = 0.9 rolled_sleeves = 0 -/obj/item/clothing/under/rank/security/skirt - name = "security officer's jumpskirt" - desc = "Standard feminine fashion for Security Officers. It's made of sturdier material than the standard jumpskirts." - icon_state = "secredf" - item_state = "r_suit" - worn_state = "secredf" - /obj/item/clothing/under/rank/dispatch name = "dispatcher's uniform" desc = "A dress shirt and khakis with a security patch sewn on." @@ -72,13 +58,13 @@ icon_state = "sec_corporate" //item_state = "sec_corporate" worn_state = "sec_corporate" - rolled_sleeves = -1 + rolled_sleeves = 0 /obj/item/clothing/under/rank/warden/corp icon_state = "warden_corporate" //item_state = "warden_corporate" worn_state = "warden_corporate" - rolled_sleeves = -1 + rolled_sleeves = 0 /obj/item/clothing/under/tactical name = "tactical jumpsuit" @@ -95,13 +81,14 @@ */ /obj/item/clothing/under/det name = "detective's suit" - desc = "A rumpled white dress shirt paired with well-worn grey slacks, complete with a blue striped tie and a faux-gold tie clip." + desc = "A rumpled white dress shirt paired with well-worn grey slacks." icon_state = "detective" item_state = "det" worn_state = "detective" armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) siemens_coefficient = 0.9 rolled_sleeves = 0 + starting_accessories = list(/obj/item/clothing/accessory/blue_clip) /* /obj/item/clothing/under/det/verb/rollup() @@ -117,13 +104,15 @@ /obj/item/clothing/under/det/grey icon_state = "detective2" worn_state = "detective2" - desc = "A serious-looking tan dress shirt paired with freshly-pressed black slacks, complete with a red striped tie." + desc = "A serious-looking tan dress shirt paired with freshly-pressed black slacks." + starting_accessories = list(/obj/item/clothing/accessory/red_long) /obj/item/clothing/under/det/black icon_state = "detective3" worn_state = "detective3" item_state = "sl_suit" desc = "An immaculate white dress shirt, paired with a pair of dark grey dress pants, a red tie, and a charcoal vest." + starting_accessories = list(/obj/item/clothing/accessory/red_long, /obj/item/clothing/accessory/vest) /obj/item/clothing/under/det/corporate name = "detective's jumpsuit" @@ -174,18 +163,11 @@ siemens_coefficient = 0.8 rolled_sleeves = 0 -/obj/item/clothing/under/rank/head_of_security/skirt - desc = "It's a fashionable jumpskirt worn by those few with the dedication to achieve the position of \"Head of Security\". It has additional armor to protect the wearer." - name = "head of security's jumpskirt" - icon_state = "hosredf" - item_state = "r_suit" - worn_state = "hosredf" - /obj/item/clothing/under/rank/head_of_security/corp icon_state = "hos_corporate" //item_state = "hos_corporate" worn_state = "hos_corporate" - rolled_sleeves = -1 + rolled_sleeves = 0 /obj/item/clothing/head/helmet/HoS name = "Head of Security Hat" @@ -227,7 +209,6 @@ item_state = "hostrench" flags_inv = 0 siemens_coefficient = 0.6 - body_parts_covered = UPPER_TORSO|ARMS /* * Navy uniforms diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index 91ade60b71a..47535802720 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -211,14 +211,6 @@ item_state = "r_suit" worn_state = "red_suit" -/obj/item/clothing/under/blackskirt - name = "black skirt" - desc = "A black skirt, very fancy!" - icon_state = "blackskirt" - item_state = "bl_suit" - worn_state = "blackskirt" - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - /obj/item/clothing/under/schoolgirl name = "schoolgirl uniform" desc = "It's just like one of my Japanese animes!" @@ -401,26 +393,6 @@ worn_state = "huresource" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS -/obj/item/clothing/under/dress/plaid_blue - name = "blue plaid skirt" - desc = "A preppy blue skirt with a white blouse." - icon_state = "plaid_blue" - worn_state = "plaid_blue" - -/obj/item/clothing/under/dress/plaid_red - name = "red plaid skirt" - desc = "A preppy red skirt with a white blouse." - icon_state = "plaid_red" - item_state = "kilt" - worn_state = "plaid_red" - -/obj/item/clothing/under/dress/plaid_purple - name = "blue purple skirt" - desc = "A preppy purple skirt with a white blouse." - icon_state = "plaid_purple" - item_state = "kilt" - worn_state = "plaid_purple" - //wedding stuff /obj/item/clothing/under/wedding/ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS @@ -516,6 +488,7 @@ icon_state = "charcoal_suit" item_state = "bl_suit" worn_state = "charcoal_suit" + starting_accessories = list(/obj/item/clothing/accessory/navy, /obj/item/clothing/accessory/charcoal_jacket) /obj/item/clothing/under/suit_jacket/navy name = "navy suit" @@ -523,6 +496,7 @@ icon_state = "navy_suit" item_state = "bl_suit" worn_state = "navy_suit" + starting_accessories = list(/obj/item/clothing/accessory/red, /obj/item/clothing/accessory/navy_jacket) /obj/item/clothing/under/suit_jacket/burgundy name = "burgundy suit" @@ -530,6 +504,7 @@ icon_state = "burgundy_suit" item_state = "r_suit" worn_state = "burgundy_suit" + starting_accessories = list(/obj/item/clothing/accessory/black, /obj/item/clothing/accessory/burgundy_jacket) /obj/item/clothing/under/suit_jacket/checkered name = "checkered suit" @@ -537,13 +512,15 @@ icon_state = "checkered_suit" item_state = "gy_suit" worn_state = "checkered_suit" + starting_accessories = list(/obj/item/clothing/accessory/black, /obj/item/clothing/accessory/checkered_jacket) /obj/item/clothing/under/suit_jacket/tan name = "tan suit" - desc = "A tan suit with a yellow tie. Smart, but casual." + desc = "A tan suit. Smart, but casual." icon_state = "tan_suit" item_state = "lb_suit" worn_state = "tan_suit" + starting_accessories = list(/obj/item/clothing/accessory/yellow, /obj/item/clothing/accessory/tan_jacket) /obj/item/clothing/under/serviceoveralls name = "workman outfit" @@ -561,6 +538,27 @@ worn_state = "mai_yang" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS +/obj/item/clothing/under/cheongsam/red + name = "red cheongsam" + desc = "It is a red cheongsam dress." + icon_state = "cheongsam-red" + item_state = "cheongsam-red" + worn_state = "cheongsam-red" + +/obj/item/clothing/under/cheongsam/blue + name = "blue cheongsam" + desc = "It is a blue cheongsam dress." + icon_state = "cheongsam-blue" + item_state = "cheongsam-blue" + worn_state = "cheongsam-blue" + +/obj/item/clothing/under/cheongsam/black + name = "black cheongsam" + desc = "It is a black cheongsam dress." + icon_state = "cheongsam-black" + item_state = "cheongsam-black" + worn_state = "cheongsam-black" + /obj/item/clothing/under/blazer name = "blue blazer" desc = "A bold but yet conservative outfit, red corduroys, navy blazer and a tie." @@ -608,4 +606,42 @@ desc = "How... minimalist." icon_state = "gear_harness" worn_state = "gear_harness" - body_parts_covered = 0 \ No newline at end of file + body_parts_covered = 0 + +/obj/item/clothing/under/dress/white + name = "white wedding dress" + desc = "A fancy white dress with a blue underdress." + icon_state = "whitedress1" + item_state = "whitedress1" + worn_state = "whitedress1" + flags_inv = HIDESHOES + +/obj/item/clothing/under/dress/white2 + name = "long dress" + desc = "A long dress." + icon_state = "whitedress2" + item_state = "whitedress2" + worn_state = "whitedress2" + flags_inv = HIDESHOES + +/obj/item/clothing/under/dress/white3 + name = "short dress" + desc = "A short, plain dress." + icon_state = "whitedress3" + item_state = "whitedress3" + worn_state = "whitedress3" + +/obj/item/clothing/under/dress/white4 + name = "long flared dress" + desc = "A long white dress that flares out at the bottom." + icon_state = "whitedress4" + item_state = "whitedress4" + worn_state = "whitedress4" + flags_inv = HIDESHOES + +/obj/item/clothing/under/dress/darkred + name = "fancy dark red dress" + desc = "A short, red dress with a black belt. Fancy." + icon_state = "darkreddress" + item_state = "darkreddress" + worn_state = "darkreddress" \ No newline at end of file diff --git a/code/modules/clothing/under/pants.dm b/code/modules/clothing/under/pants.dm index f3c38cc4331..c0f3157c658 100644 --- a/code/modules/clothing/under/pants.dm +++ b/code/modules/clothing/under/pants.dm @@ -11,7 +11,7 @@ icon_state = "jeansclassic" /obj/item/clothing/under/pants/mustangjeans - name = "Must Hang jeans" + name = "must hang jeans" desc = "Made in the finest space jeans factory this side of Alpha Centauri." icon_state = "jeansmustang" @@ -26,7 +26,7 @@ icon_state = "jeansgrey" /obj/item/clothing/under/pants/youngfolksjeans - name = "Young Folks jeans" + name = "young folks jeans" desc = "For those tired of boring old jeans. Relive the passion of your youth!" icon_state = "jeansyoungfolks" @@ -55,6 +55,22 @@ desc = "A pair of track pants, for the athletic." icon_state = "trackpants" +/obj/item/clothing/under/pants/track/blue + name = "blue track pants" + icon_state = "trackpantsblue" + +/obj/item/clothing/under/pants/track/green + name = "green track pants" + icon_state = "trackpantsgreen" + +/obj/item/clothing/under/pants/track/white + name = "white track pants" + icon_state = "trackpantswhite" + +/obj/item/clothing/under/pants/track/red + name = "red track pants" + icon_state = "trackpantsred" + /obj/item/clothing/under/pants/khaki name = "khaki pants" desc = "A pair of dust beige khaki pants." @@ -63,4 +79,71 @@ /obj/item/clothing/under/pants/camo name = "camo pants" desc = "A pair of woodland camouflage pants. Probably not the best choice for a space station." - icon_state = "camopants" \ No newline at end of file + icon_state = "camopants" + +//Baggy Pants// + +/obj/item/clothing/under/pants/baggy + name = "baggy jeans" + desc = "A nondescript pair of tough baggy blue jeans." + icon_state = "baggy_jeans" + +/obj/item/clothing/under/pants/baggy/classicjeans + name = "baggy classic jeans" + desc = "You feel cooler already." + icon_state = "baggy_jeansclassic" + +/obj/item/clothing/under/pants/baggy/mustangjeans + name = "maggy must hang jeans" + desc = "Made in the finest space jeans factory this side of Alpha Centauri." + icon_state = "baggy_jeansmustang" + +/obj/item/clothing/under/pants/baggy/blackjeans + name = "baggy black jeans" + desc = "Only for those who can pull it off." + icon_state = "baggy_jeansblack" + +/obj/item/clothing/under/pants/baggy/greyjeans + name = "baggy grey jeans" + desc = "Only for those who can pull it off." + icon_state = "baggy_jeansgrey" + +/obj/item/clothing/under/pants/baggy/youngfolksjeans + name = "baggy young folks jeans" + desc = "For those tired of boring old jeans. Relive the passion of your youth!" + icon_state = "baggy_jeansyoungfolks" + +/obj/item/clothing/under/pants/baggy/white + name = "baggy white pants" + desc = "Plain white pants. Boring." + icon_state = "baggy_whitepants" + +/obj/item/clothing/under/pants/baggy/red + name = "baggy red pants" + desc = "Bright red pants. Overflowing with personality." + icon_state = "baggy_redpants" + +/obj/item/clothing/under/pants/baggy/black + name = "baggy black pants" + desc = "These pants are dark, like your soul." + icon_state = "baggy_blackpants" + +/obj/item/clothing/under/pants/baggy/tan + name = "baggy tan pants" + desc = "Some tan pants. You look like a white collar worker with these on." + icon_state = "baggy_tanpants" + +/obj/item/clothing/under/pants/baggy/track + name = "baggy track pants" + desc = "A pair of track pants, for the athletic." + icon_state = "baggy_trackpants" + +/obj/item/clothing/under/pants/baggy/khaki + name = "baggy khaki pants" + desc = "A pair of dust beige khaki pants." + icon_state = "baggy_khaki" + +/obj/item/clothing/under/pants/baggy/camo + name = "baggy camo pants" + desc = "A pair of woodland camouflage pants. Probably not the best choice for a space station." + icon_state = "baggy_camopants" \ No newline at end of file diff --git a/code/modules/clothing/under/shorts.dm b/code/modules/clothing/under/shorts.dm index 1d792bcc107..b04621bdfe7 100644 --- a/code/modules/clothing/under/shorts.dm +++ b/code/modules/clothing/under/shorts.dm @@ -100,3 +100,157 @@ name = "khaki short shorts" icon_state = "khaki_shorts_f" worn_state = "khaki_shorts_f" + +//Argh, skirts be below this line -> ------------------------------ + +/obj/item/clothing/under/skirt + name = "black skirt" + desc = "A black skirt, very fancy!" + icon_state = "blackskirt" + item_state = "bl_suit" + worn_state = "blackskirt" + body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS + rolled_sleeves = -1 + +/obj/item/clothing/under/skirt/khaki + name = "khaki skirt" + desc = "A skirt that is a khaki color." + icon_state = "skirt_khaki" + worn_state = "skirt_khaki" + +/obj/item/clothing/under/skirt/black + name = "short black skirt" + desc = "A skirt that is a shiny black." + icon_state = "skirt_short_black" + worn_state = "skirt_short_black" + +/obj/item/clothing/under/skirt/blue + name = "short blue skirt" + desc = "A skirt that is a shiny blue." + icon_state = "skirt_short_blue" + worn_state = "skirt_short_blue" + +/obj/item/clothing/under/skirt/red + name = "short red skirt" + desc = "A skirt that is a shiny red." + icon_state = "skirt_short_red" + worn_state = "skirt_short_red" + +/obj/item/clothing/under/skirt/swept + name = "swept skirt" + desc = "A skirt that is swept to one side." + icon_state = "skirt_swept" + worn_state = "skirt_swept" + +/obj/item/clothing/under/skirt/plaid_blue + name = "blue plaid skirt" + desc = "A preppy blue skirt with a white blouse." + icon_state = "plaid_blue" + worn_state = "plaid_blue" + +/obj/item/clothing/under/skirt/plaid_red + name = "red plaid skirt" + desc = "A preppy red skirt with a white blouse." + icon_state = "plaid_red" + item_state = "kilt" + worn_state = "plaid_red" + +/obj/item/clothing/under/skirt/plaid_purple + name = "blue purple skirt" + desc = "A preppy purple skirt with a white blouse." + icon_state = "plaid_purple" + item_state = "kilt" + worn_state = "plaid_purple" + +/obj/item/clothing/under/rank/cargo/skirt + name = "quartermaster's jumpskirt" + desc = "It's a jumpskirt worn by the quartermaster. It's specially designed to prevent back injuries caused by pushing paper." + icon_state = "qmf" + worn_state = "qmf" + +/obj/item/clothing/under/rank/cargotech/skirt + name = "cargo technician's jumpskirt" + desc = "Skirrrrrts! They're comfy and easy to wear!" + icon_state = "cargof" + worn_state = "cargof" + +/obj/item/clothing/under/rank/engineer/skirt + desc = "It's an orange high visibility jumpskirt worn by engineers. It has minor radiation shielding." + name = "engineer's jumpskirt" + icon_state = "enginef" + worn_state = "enginef" + armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10) + +/obj/item/clothing/under/rank/engineer/chief_engineer/skirt + desc = "It's a high visibility jumpskirt given to those engineers insane enough to achieve the rank of \"Chief engineer\". It has minor radiation shielding." + name = "chief engineer's jumpskirt" + icon_state = "chieff" + worn_state = "chieff" + +/obj/item/clothing/under/rank/engineer/atmospheric_technician/skirt + desc = "It's a jumpskirt worn by atmospheric technicians." + name = "atmospheric technician's jumpskirt" + icon_state = "atmosf" + worn_state = "atmosf" + +/obj/item/clothing/under/rank/roboticist/skirt + desc = "It's a slimming black jumpskirt with reinforced seams; great for industrial work." + name = "roboticist's jumpskirt" + icon_state = "roboticsf" + worn_state = "roboticsf" + +/obj/item/clothing/under/rank/scientist/skirt + name = "scientist's jumpskirt" + icon_state = "sciencewhitef" + worn_state = "sciencewhitef" + permeability_coefficient = 0.50 + armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0) + +/obj/item/clothing/under/rank/medical/skirt + name = "medical doctor's jumpskirt" + icon_state = "medicalf" + worn_state = "medicalf" + +/obj/item/clothing/under/rank/medical/chemist/skirt + name = "chemist's jumpskirt" + icon_state = "chemistrywhitef" + worn_state = "chemistrywhitef" + +/obj/item/clothing/under/rank/medical/chief_medical_officer/skirt + desc = "It's a jumpskirt worn by those with the experience to be \"Chief Medical Officer\". It provides minor biological protection." + name = "chief medical officer's jumpskirt" + icon_state = "cmof" + worn_state = "cmof" + +/obj/item/clothing/under/rank/medical/geneticist/skirt + name = "geneticist's jumpskirt" + icon_state = "geneticswhitef" + worn_state = "geneticswhitef" + +/obj/item/clothing/under/rank/medical/virologist/skirt + name = "virologist's jumpskirt" + icon_state = "virologywhitef" + worn_state = "virologywhitef" + +/obj/item/clothing/under/rank/security/skirt + name = "security officer's jumpskirt" + desc = "Standard feminine fashion for Security Officers. It's made of sturdier material than the standard jumpskirts." + icon_state = "secredf" + item_state = "r_suit" + worn_state = "secredf" + armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) + siemens_coefficient = 0.9 + +/obj/item/clothing/under/rank/security/warden/skirt + desc = "Standard feminine fashion for a Warden. It is made of sturdier material than standard jumpskirts. It has the word \"Warden\" written on the shoulders." + name = "warden's jumpskirt" + icon_state = "wardenf" + item_state = "r_suit" + worn_state = "wardenf" + +/obj/item/clothing/under/rank/security/head_of_security/skirt + desc = "It's a fashionable jumpskirt worn by those few with the dedication to achieve the position of \"Head of Security\". It has additional armor to protect the wearer." + name = "head of security's jumpskirt" + icon_state = "hosredf" + item_state = "r_suit" + worn_state = "hosredf" \ No newline at end of file diff --git a/code/modules/detectivework/microscope/dnascanner.dm b/code/modules/detectivework/microscope/dnascanner.dm index a2904ba1552..b4359dcb410 100644 --- a/code/modules/detectivework/microscope/dnascanner.dm +++ b/code/modules/detectivework/microscope/dnascanner.dm @@ -6,6 +6,7 @@ icon_state = "dnaopen" anchored = 1 density = 1 + circuit = /obj/item/weapon/circuitboard/dna_analyzer var/obj/item/weapon/forensics/swab/bloodsamp = null var/closed = 0 @@ -15,6 +16,16 @@ var/last_process_worldtime = 0 var/report_num = 0 +/obj/machinery/dnaforensics/map/New() + circuit = new circuit(src) + component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/console_screen(src) + component_parts += new /obj/item/weapon/stock_parts/micro_laser(src) + component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) + component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) + RefreshParts() + ..() + /obj/machinery/dnaforensics/attackby(var/obj/item/W, mob/user as mob) if(bloodsamp) @@ -22,13 +33,20 @@ return if(closed) - user << "Open the cover before inserting the sample." + if(!scanning) + if(default_deconstruction_screwdriver(user, W)) + return + if(default_deconstruction_crowbar(user, W)) + return + else + user << "Open the cover before inserting the sample." return var/obj/item/weapon/forensics/swab/swab = W if(istype(swab) && swab.is_used()) - user.removeItem(swab, src) + user.unEquip(W) src.bloodsamp = swab + swab.loc = src user << "You insert \the [W] into \the [src]." else user << "\The [src] only accepts used swabs." diff --git a/code/modules/detectivework/microscope/microscope.dm b/code/modules/detectivework/microscope/microscope.dm index 9217e7627ee..3bc596fb576 100644 --- a/code/modules/detectivework/microscope/microscope.dm +++ b/code/modules/detectivework/microscope/microscope.dm @@ -18,7 +18,8 @@ if(istype(W, /obj/item/weapon/forensics/swab)|| istype(W, /obj/item/weapon/sample/fibers) || istype(W, /obj/item/weapon/sample/print)) user << "You insert \the [W] into the microscope." - user.removeItem(W, src) + user.unEquip(W) + W.forceMove(src) sample = W update_icon() return diff --git a/code/modules/detectivework/tools/evidencebag.dm b/code/modules/detectivework/tools/evidencebag.dm index cc663bbae8d..6aa4bdf99fb 100644 --- a/code/modules/detectivework/tools/evidencebag.dm +++ b/code/modules/detectivework/tools/evidencebag.dm @@ -32,7 +32,7 @@ user.client.screen -= I U.contents.Remove(I) else if(user.item_is_in_hands(I)) - user.removeItem(I) + user.drop_from_inventory(I) else return diff --git a/code/modules/detectivework/tools/rag.dm b/code/modules/detectivework/tools/rag.dm index 7849596d429..06ee34b3128 100644 --- a/code/modules/detectivework/tools/rag.dm +++ b/code/modules/detectivework/tools/rag.dm @@ -40,7 +40,7 @@ /obj/item/weapon/reagent_containers/glass/rag/attack_self(mob/user as mob) if(on_fire) user.visible_message("\The [user] stamps out [src].", "You stamp out [src].") - user.removeItem(src) + user.unEquip(src) extinguish() else remove_contents(user) @@ -49,7 +49,7 @@ if(!on_fire && istype(W, /obj/item/weapon/flame)) var/obj/item/weapon/flame/F = W if(F.lit) - ignite() + src.ignite() if(on_fire) visible_message("\The [user] lights [src] with [W].") else @@ -151,15 +151,21 @@ /obj/item/weapon/reagent_containers/glass/rag/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature >= 50 + T0C) - ignite() + src.ignite() if(exposed_temperature >= 900 + T0C) new /obj/effect/decal/cleanable/ash(get_turf(src)) qdel(src) -//rag must have a minimum of 2 units welder fuel and at least 80% of the reagents must be welder fuel. -//maybe generalize flammable reagents someday +//rag must have a minimum of 2 units welder fuel or ehtanol based reagents and at least 80% of the reagents must so. /obj/item/weapon/reagent_containers/glass/rag/proc/can_ignite() - var/fuel = reagents.get_reagent_amount("fuel") + var/fuel + if(reagents.get_reagent_amount("fuel")) + fuel += reagents.get_reagent_amount("fuel") + + else + for(var/datum/reagent/ethanol/R in reagents.reagent_list) + fuel += reagents.get_reagent_amount(R.id) + return (fuel >= 2 && fuel >= reagents.total_volume*0.8) /obj/item/weapon/reagent_containers/glass/rag/proc/ignite() @@ -217,5 +223,8 @@ return reagents.remove_reagent("fuel", reagents.maximum_volume/25) + for(var/datum/reagent/ethanol/R in reagents.reagent_list) + if(istype(R, /datum/reagent/ethanol)) + reagents.remove_reagent(R.id, reagents.maximum_volume/25) update_name() burn_time-- diff --git a/code/modules/detectivework/tools/sample_kits.dm b/code/modules/detectivework/tools/sample_kits.dm index eb8738d3952..fa5c7312a8f 100644 --- a/code/modules/detectivework/tools/sample_kits.dm +++ b/code/modules/detectivework/tools/sample_kits.dm @@ -42,7 +42,7 @@ /obj/item/weapon/sample/attackby(var/obj/O, var/mob/user) if(O.type == src.type) - user.removeItem(O) + user.unEquip(O) if(merge_evidence(O, user)) qdel(O) return 1 diff --git a/code/modules/economy/Events.dm b/code/modules/economy/Events.dm index c9d32f56ec1..0f622c399c3 100644 --- a/code/modules/economy/Events.dm +++ b/code/modules/economy/Events.dm @@ -52,7 +52,7 @@ affected_dest.temp_price_change[good_type] = rand(1,100) / 100 /datum/event/economic_event/announce() - var/author = "The Vir Times" + var/author = "The "+starsys_name+" Times" var/channel = author //see if our location has custom event info for this event diff --git a/code/modules/economy/Events_Mundane.dm b/code/modules/economy/Events_Mundane.dm index adfa3741812..5728560040a 100644 --- a/code/modules/economy/Events_Mundane.dm +++ b/code/modules/economy/Events_Mundane.dm @@ -11,7 +11,7 @@ if(!event_type) return - var/author = "The Vir Times" + var/author = "The "+starsys_name+" Times" var/channel = author //see if our location has custom event info for this event @@ -116,11 +116,11 @@ else body += "is recovering from plastic surgery in a clinic on [affected_dest.name] for the [pick("second","third","fourth")] time, reportedly having made the decision in response to " body += "[pick("unkind comments by an ex","rumours started by jealous friends",\ - "the decision to be dropped by a major sponsor","a disasterous interview on Vir Tonight")]." + "the decision to be dropped by a major sponsor","a disasterous interview on "+starsys_name+" Tonight")]." if(TOURISM) body += "Tourists are flocking to [affected_dest.name] after the surprise announcement of [pick("major shopping bargains by a wily retailer",\ "a huge new ARG by a popular entertainment company","a secret tour by popular artiste [random_name(pick(MALE,FEMALE))]")]. \ - The Vir Times is offering discount tickets for two to see [random_name(pick(MALE,FEMALE))] live in return for eyewitness reports and up to the minute coverage." + The "+starsys_name+" Times is offering discount tickets for two to see [random_name(pick(MALE,FEMALE))] live in return for eyewitness reports and up to the minute coverage." news_network.SubmitArticle(body, author, channel, null, 1) @@ -152,7 +152,7 @@ "'Here kitty kitty' no longer preferred tajaran retrieval technique.",\ "Man travels 7000 light years to retrieve lost hankie, 'It was my favourite'.",\ "New bowling lane that shoots mini-meteors at bowlers very popular.",\ - "[pick("Unathi","Spacer")] gets tattoo of Vir on chest '[pick("[boss_short]","star","starship","asteroid")] tickles most'.",\ + "[pick("Unathi","Spacer")] gets tattoo of "+starsys_name+" on chest '[pick("[boss_short]","star","starship","asteroid")] tickles most'.",\ "Skrell marries computer; wedding attended by 100 modems.",\ "Chef reports successfully using harmonica as cheese grater.",\ "[company_name] invents handkerchief that says 'Bless you' after sneeze.",\ @@ -162,7 +162,7 @@ "This space for rent.",\ "[affected_dest.name] Baker Wins Pickled Crumpet Toss Three Years Running",\ "Skrell Scientist Discovers Abacus Can Be Used To Dry Towels",\ - "Survey: 'Cheese Louise' Voted Best Pizza Restaurant In Vir",\ + "Survey: 'Cheese Louise' Voted Best Pizza Restaurant In "+starsys_name,\ "I Was Framed, jokes [affected_dest.name] artist",\ "Mysterious Loud Rumbling Noises In [affected_dest.name] Found To Be Mysterious Loud Rumblings",\ "Alien ambassador becomes lost on [affected_dest.name], refuses to ask for directions",\ diff --git a/code/modules/economy/TradeDestinations.dm b/code/modules/economy/TradeDestinations.dm index 3aca3e6bada..ccedfe35efb 100644 --- a/code/modules/economy/TradeDestinations.dm +++ b/code/modules/economy/TradeDestinations.dm @@ -8,7 +8,7 @@ var/list/weighted_mundaneevent_locations = list() var/distance = 0 var/list/willing_to_buy = list() var/list/willing_to_sell = list() - var/can_shuttle_here = 0 //one day crew from the Northern Star will be able to travel to this destination + var/can_shuttle_here = 0 //one day crew from the station will be able to travel to this destination var/list/viable_random_events = list() var/list/temp_price_change[BIOMEDICAL] var/list/viable_mundane_events = list() diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm index 4051bf95881..1229cee322f 100644 --- a/code/modules/economy/cash.dm +++ b/code/modules/economy/cash.dm @@ -21,11 +21,13 @@ if(istype(W, /obj/item/weapon/spacecash/ewallet)) return 0 var/obj/item/weapon/spacecash/SC = W + SC.adjust_worth(src.worth) if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/h_user = user - h_user.removeItem(src) - h_user.removeItem(SC) + + h_user.drop_from_inventory(src) + h_user.drop_from_inventory(SC) h_user.put_in_hands(SC) user << "You combine the Thalers to a bundle of [SC.worth] Thalers." qdel(src) @@ -77,6 +79,7 @@ /obj/item/weapon/spacecash/attack_self() var/amount = input(usr, "How many Thalers do you want to take? (0 to [src.worth])", "Take Money", 20) as num amount = round(Clamp(amount, 0, src.worth)) + if(!amount) return @@ -135,6 +138,7 @@ proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob) var/obj/item/weapon/spacecash/SC = new (spawnloc) + SC.set_worth(sum) if (ishuman(human_user) && !human_user.get_active_hand()) human_user.put_in_hands(SC) diff --git a/code/modules/economy/cash_register.dm b/code/modules/economy/cash_register.dm index 3129c20489f..109572ffc0a 100644 --- a/code/modules/economy/cash_register.dm +++ b/code/modules/economy/cash_register.dm @@ -182,7 +182,7 @@ overlays |= "register_cash" if(ishuman(user)) var/mob/living/carbon/human/H = user - H.removeItem(SC) + H.drop_from_inventory(SC) qdel(SC) else scan_cash(SC) @@ -335,7 +335,7 @@ if(!SC.worth) if(ishuman(SC.loc)) var/mob/living/carbon/human/H = SC.loc - H.removeItem(SC) + H.drop_from_inventory(SC) qdel(SC) cash_stored += transaction_amount diff --git a/code/modules/economy/economy_misc.dm b/code/modules/economy/economy_misc.dm index 8c39fcac8da..c1b1aac2a47 100644 --- a/code/modules/economy/economy_misc.dm +++ b/code/modules/economy/economy_misc.dm @@ -48,11 +48,12 @@ /var/list/economic_species_modifier = list( - /datum/species/human = 10, - /datum/species/skrell = 12, - /datum/species/teshari = 9, // Skrell sponsored, - /datum/species/tajaran = 7, - /datum/species/unathi = 7 + /datum/species/human = 10, + /datum/species/skrell = 12, + /datum/species/teshari = 9, // Skrell sponsored, + /datum/species/tajaran = 7, + /datum/species/unathi = 7, + /datum/species/diona = 7 ) //---- The following corporations are friendly with NanoTrasen and loosely enable trade and travel: @@ -87,7 +88,7 @@ var/global/economy_init = 0 if(economy_init) return 2 - news_network.CreateFeedChannel("The Vir Times", "Vir Times ExoNode - Northern Star", 1, 1) + news_network.CreateFeedChannel("The "+starsys_name+" Times", starsys_name+" Times ExoNode - "+station_orig, 1, 1) news_network.CreateFeedChannel("The Gibson Gazette", "Editor Mike Hammers", 1, 1) for(var/loc_type in typesof(/datum/trade_destination) - /datum/trade_destination) diff --git a/code/modules/economy/price_list.dm b/code/modules/economy/price_list.dm index df6bc8e8f92..8301043c092 100644 --- a/code/modules/economy/price_list.dm +++ b/code/modules/economy/price_list.dm @@ -647,6 +647,9 @@ /obj/item/weapon/reagent_containers/food/snacks/enchiladas price_tag = 5 +/obj/item/weapon/reagent_containers/food/snacks/taco + price_tag = 5 + /obj/item/weapon/reagent_containers/food/snacks/monkeysdelight price_tag = 5 diff --git a/code/modules/events/money_lotto.dm b/code/modules/events/money_lotto.dm index 4c016333f81..b905dd576cc 100644 --- a/code/modules/events/money_lotto.dm +++ b/code/modules/events/money_lotto.dm @@ -12,7 +12,7 @@ D.money += winner_sum var/datum/transaction/T = new() - T.target_name = "The Vir Times Grand Slam -Stellar- Lottery" + T.target_name = "The "+starsys_name+" Times Grand Slam -Stellar- Lottery" T.purpose = "Winner!" T.amount = winner_sum T.date = current_date_string @@ -24,10 +24,10 @@ /datum/event/money_lotto/announce() var/author = "[company_name] Editor" - var/channel = "The Vir Times" + var/channel = "The "+starsys_name+" Times" - var/body = "The Vir Times wishes to congratulate [winner_name] for recieving the Vir Stellar Slam Lottery, and receiving the out of this world sum of [winner_sum] credits!" + var/body = "The "+starsys_name+" Times wishes to congratulate [winner_name] for recieving the "+starsys_name+" Stellar Slam Lottery, and receiving the out of this world sum of [winner_sum] credits!" if(!deposit_success) - body += "
    Unfortunately, we were unable to verify the account details provided, so we were unable to transfer the money. Send a cheque containing the sum of 5000 Thalers to ND 'Stellar Slam' office on the The Vir Times gateway containing updated details, and your winnings'll be re-sent within the month." + body += "
    Unfortunately, we were unable to verify the account details provided, so we were unable to transfer the money. Send a cheque containing the sum of 5000 Thalers to ND 'Stellar Slam' office on the The "+starsys_name+" Times gateway containing updated details, and your winnings'll be re-sent within the month." news_network.SubmitArticle(body, author, channel, null, 1) diff --git a/code/modules/events/money_spam.dm b/code/modules/events/money_spam.dm index 4f46fb9bace..18d57b8fdbd 100644 --- a/code/modules/events/money_spam.dm +++ b/code/modules/events/money_spam.dm @@ -61,7 +61,7 @@ "You have (1) new message!",\ "You have (2) new profile views!") if(3) - sender = pick("Galactic Payments Association","Better Business Bureau","Vir E-Payments","NAnoTransen Finance Deparmtent","Luxury Replicas") + sender = pick("Galactic Payments Association","Better Business Bureau",starsys_name+" E-Payments","NAnoTransen Finance Deparmtent","Luxury Replicas") message = pick("Luxury watches for Blowout sale prices!",\ "Watches, Jewelry & Accessories, Bags & Wallets !",\ "Deposit 100$ and get 300$ totally free!",\ diff --git a/code/modules/examine/descriptions/telecomms.dm b/code/modules/examine/descriptions/telecomms.dm index 421d7022c51..747697f55f2 100644 --- a/code/modules/examine/descriptions/telecomms.dm +++ b/code/modules/examine/descriptions/telecomms.dm @@ -5,7 +5,7 @@ just your hands, due to the integrated monitor and keyboard. Synthetic units can interface with it as well, just like most other machines." description_fluff = "This is one of many nodes that make up the Exonet, which services trillions of devices across space. This particular node \ - is referred to as a terminal node, servicing the Northern Star.
    \ + is referred to as a terminal node, servicing the "+station_orig+".
    \
    \ In the beginning of humanity's ascend into space, the Exonet didn't exist. Instead, the Exonet is the evolution to a network called the Interplanetary \ Internet (sometimes referred to as the InterPlaNet), which was conceived and developed due to the limitations of the terrestrial Internet, mainly because \ @@ -30,7 +30,7 @@ Exonets at the root node(s), and is typically arranged in a tree structure. The root node(s) are generally government-owned and are very secure \ and resilient to failure.
    \
    \ - This node is privately owned and maintained by Nanotrasen, and allows the colonists of the Northern Star to have access to the Exonet." + This node is privately owned and maintained by Nanotrasen, and allows the colonists of the "+station_orig+" to have access to the Exonet." description_antag = "An EMP will disable this device for a short period of time. A longer downage can be achieved by turning it off, or rigging \ the APC it uses to turn off remotely, such as with a signaler in the right wire." \ No newline at end of file diff --git a/code/modules/flufftext/Dreaming.dm b/code/modules/flufftext/Dreaming.dm index 69032cd5ce1..6ac9483e2f9 100644 --- a/code/modules/flufftext/Dreaming.dm +++ b/code/modules/flufftext/Dreaming.dm @@ -11,7 +11,7 @@ var/list/dreams = list( "the quartermaster","a cargo technician","the botanist","a shaft miner","the psychologist","the chemist","the geneticist", "the virologist","the roboticist","the chef","the bartender","the chaplain","the librarian","a mouse","an ert member", "a beach","the holodeck","a smokey room","a voice","the cold","a mouse","an operating table","the bar","the rain","a skrell", - "a unathi","a tajaran","the ai core","the mining station","the research station","a beaker of strange liquid", + "an unathi","a tajaran","the ai core","the mining station","the research station","a beaker of strange liquid", ) mob/living/carbon/proc/dream() diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index 6bbd4e64e82..1b353e34071 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -146,7 +146,8 @@ for(var/datum/playingcard/P in cards) H.cards += P H.concealed = src.concealed - user.deleteItem(src) + user.drop_from_inventory(src,user.loc) + qdel(src) H.update_icon() return ..() diff --git a/code/modules/games/spaceball_cards.dm b/code/modules/games/spaceball_cards.dm index 9e0bacd2be4..0ea8bb6ab3f 100644 --- a/code/modules/games/spaceball_cards.dm +++ b/code/modules/games/spaceball_cards.dm @@ -16,7 +16,7 @@ else var/language_type = pick(/datum/language/human,/datum/language/diona,/datum/language/tajaran,/datum/language/unathi) var/datum/language/L = new language_type() - var/team = pick("Brickburn Galaxy Trekers","Mars Rovers", "Qerrbalak Saints", "Moghes Rockets", "Ahdomai Lightening", "Vir Vixens", "Euphoric-Earth Alligators") + var/team = pick("Brickburn Galaxy Trekers","Mars Rovers", "Qerrbalak Saints", "Moghes Rockets", "Ahdomai Lightening", starsys_name+" Vixens", "Euphoric-Earth Alligators") P.name = "[L.get_random_name(pick(MALE,FEMALE))], [year - rand(0,50)] [team]" P.card_icon = "spaceball_standard" P.back_icon = "card_back_spaceball" diff --git a/code/modules/holodeck/HolodeckControl.dm b/code/modules/holodeck/HolodeckControl.dm index 53a070e64ad..4c0d0a755e6 100644 --- a/code/modules/holodeck/HolodeckControl.dm +++ b/code/modules/holodeck/HolodeckControl.dm @@ -211,7 +211,7 @@ if(isobj(obj)) var/mob/M = obj.loc if(ismob(M)) - M.removeItem(obj) + M.remove_from_mob(obj) M.update_icons() //so their overlays update if(!silent) diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm index a9d589d8410..5cd5458b4a7 100644 --- a/code/modules/hydroponics/beekeeping/beehive.dm +++ b/code/modules/hydroponics/beekeeping/beehive.dm @@ -67,7 +67,8 @@ ++frames user.visible_message("[user] loads \the [I] into \the [src].", "You load \the [I] into \the [src].") update_icon() - user.deleteItem(I) + user.drop_from_inventory(I) + qdel(I) return else if(istype(I, /obj/item/bee_pack)) var/obj/item/bee_pack/B = I @@ -228,7 +229,8 @@ if(do_after(user, 30)) user.visible_message("[user] constructs a beehive.", "You construct a beehive.") new /obj/machinery/beehive(get_turf(user)) - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) return /obj/item/stack/wax diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index e10d024591b..1a89c9c0a43 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -236,9 +236,9 @@ return ..() -/obj/item/weapon/reagent_containers/food/snacks/grown/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone) +/obj/item/weapon/reagent_containers/food/snacks/grown/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone) . = ..() - + if(seed && seed.get_trait(TRAIT_STINGS)) if(!reagents || reagents.total_volume <= 0) return @@ -250,7 +250,7 @@ if(prob(35)) if(user) user << "\The [src] has fallen to bits." - user.removeItem(src) + user.drop_from_inventory(src) qdel(src) /obj/item/weapon/reagent_containers/food/snacks/grown/attack_self(mob/user as mob) diff --git a/code/modules/hydroponics/seed_datums.dm b/code/modules/hydroponics/seed_datums.dm index 157d4acbd3b..6e88aabee5a 100644 --- a/code/modules/hydroponics/seed_datums.dm +++ b/code/modules/hydroponics/seed_datums.dm @@ -550,6 +550,25 @@ set_trait(TRAIT_WATER_CONSUMPTION, 6) set_trait(TRAIT_NUTRIENT_CONSUMPTION, 0.15) +/datum/seed/flower/lavender + name = "lavender" + seed_name = "lavender" + display_name = "lavender" + chems = list("nutriment" = list(1,20), "bicaridine" = list(1,10)) + +/datum/seed/flower/lavender/New() + ..() + set_trait(TRAIT_MATURATION,7) + set_trait(TRAIT_PRODUCTION,5) + set_trait(TRAIT_YIELD,5) + set_trait(TRAIT_PRODUCT_ICON,"flower6") + set_trait(TRAIT_PRODUCT_COLOUR,"#B57EDC") + set_trait(TRAIT_PLANT_COLOUR,"#6B8C5E") + set_trait(TRAIT_PLANT_ICON,"flower4") + set_trait(TRAIT_IDEAL_LIGHT, 7) + set_trait(TRAIT_NUTRIENT_CONSUMPTION, 0.05) + set_trait(TRAIT_WATER_CONSUMPTION, 0.5) + //Grapes/varieties /datum/seed/grapes name = "grapes" diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index f731a28f722..015ab88ccbf 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -88,7 +88,8 @@ if(S.seed && S.seed.get_trait(TRAIT_IMMUTABLE) > 0) user << "That seed is not compatible with our genetics technology." else - user.removeItem(W, src) + user.drop_from_inventory(W) + W.loc = src seed = W user << "You load [W] into [src]." return @@ -113,7 +114,8 @@ user << "That disk does not have any gene data loaded." return - user.removeItem(W, src) + user.drop_from_inventory(W) + W.loc = src loaded_disk = W user << "You load [W] into [src]." diff --git a/code/modules/hydroponics/seed_packets.dm b/code/modules/hydroponics/seed_packets.dm index e14fbd792bb..7c1b70c4c7b 100644 --- a/code/modules/hydroponics/seed_packets.dm +++ b/code/modules/hydroponics/seed_packets.dm @@ -197,6 +197,9 @@ var/global/list/plant_seed_sprites = list() /obj/item/seeds/sunflowerseed seed_type = "sunflowers" +/obj/item/seeds/lavenderseed + seed_type = "lavender" + /obj/item/seeds/brownmold seed_type = "mold" diff --git a/code/modules/hydroponics/seed_storage.dm b/code/modules/hydroponics/seed_storage.dm index de183d475dc..fe0a1789195 100644 --- a/code/modules/hydroponics/seed_storage.dm +++ b/code/modules/hydroponics/seed_storage.dm @@ -40,12 +40,91 @@ /obj/machinery/seed_storage/garden name = "Garden seed storage" scanner = list("stats") - starting_seeds = list(/obj/item/seeds/appleseed = 3, /obj/item/seeds/bananaseed = 3, /obj/item/seeds/berryseed = 3, /obj/item/seeds/cabbageseed = 3, /obj/item/seeds/carrotseed = 3, /obj/item/seeds/chantermycelium = 3, /obj/item/seeds/cherryseed = 3, /obj/item/seeds/chiliseed = 3, /obj/item/seeds/cocoapodseed = 3, /obj/item/seeds/cornseed = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/grapeseed = 3, /obj/item/seeds/grassseed = 3, /obj/item/seeds/replicapod = 3, /obj/item/seeds/lemonseed = 3, /obj/item/seeds/limeseed = 3, /obj/item/seeds/mtearseed = 2, /obj/item/seeds/orangeseed = 3, /obj/item/seeds/peanutseed = 3, /obj/item/seeds/plumpmycelium = 3, /obj/item/seeds/poppyseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/pumpkinseed = 3, /obj/item/seeds/riceseed = 3, /obj/item/seeds/soyaseed = 3, /obj/item/seeds/sugarcaneseed = 3, /obj/item/seeds/sunflowerseed = 3, /obj/item/seeds/shandseed = 2, /obj/item/seeds/tobaccoseed = 3, /obj/item/seeds/tomatoseed = 3, /obj/item/seeds/towermycelium = 3, /obj/item/seeds/watermelonseed = 3, /obj/item/seeds/wheatseed = 3, /obj/item/seeds/whitebeetseed = 3) + starting_seeds = list( + /obj/item/seeds/appleseed = 3, + /obj/item/seeds/bananaseed = 3, + /obj/item/seeds/berryseed = 3, + /obj/item/seeds/cabbageseed = 3, + /obj/item/seeds/carrotseed = 3, + /obj/item/seeds/chantermycelium = 3, + /obj/item/seeds/cherryseed = 3, + /obj/item/seeds/chiliseed = 3, + /obj/item/seeds/cocoapodseed = 3, + /obj/item/seeds/cornseed = 3, + /obj/item/seeds/eggplantseed = 3, + /obj/item/seeds/grapeseed = 3, + /obj/item/seeds/grassseed = 3, + /obj/item/seeds/replicapod = 3, + /obj/item/seeds/lemonseed = 3, + /obj/item/seeds/limeseed = 3, + /obj/item/seeds/mtearseed = 2, + /obj/item/seeds/orangeseed = 3, + /obj/item/seeds/peanutseed = 3, + /obj/item/seeds/plumpmycelium = 3, + /obj/item/seeds/poppyseed = 3, + /obj/item/seeds/potatoseed = 3, + /obj/item/seeds/pumpkinseed = 3, + /obj/item/seeds/riceseed = 3, + /obj/item/seeds/soyaseed = 3, + /obj/item/seeds/sugarcaneseed = 3, + /obj/item/seeds/sunflowerseed = 3, + /obj/item/seeds/shandseed = 2, + /obj/item/seeds/tobaccoseed = 3, + /obj/item/seeds/tomatoseed = 3, + /obj/item/seeds/towermycelium = 3, + /obj/item/seeds/watermelonseed = 3, + /obj/item/seeds/wheatseed = 3, + /obj/item/seeds/whitebeetseed = 3, + /obj/item/seeds/lavenderseed = 3 + ) /obj/machinery/seed_storage/xenobotany name = "Xenobotany seed storage" scanner = list("stats", "produce", "soil", "temperature", "light") - starting_seeds = list(/obj/item/seeds/ambrosiavulgarisseed = 3, /obj/item/seeds/appleseed = 3, /obj/item/seeds/amanitamycelium = 2, /obj/item/seeds/bananaseed = 3, /obj/item/seeds/berryseed = 3, /obj/item/seeds/cabbageseed = 3, /obj/item/seeds/carrotseed = 3, /obj/item/seeds/chantermycelium = 3, /obj/item/seeds/cherryseed = 3, /obj/item/seeds/chiliseed = 3, /obj/item/seeds/cocoapodseed = 3, /obj/item/seeds/cornseed = 3, /obj/item/seeds/replicapod = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/glowshroom = 2, /obj/item/seeds/grapeseed = 3, /obj/item/seeds/grassseed = 3, /obj/item/seeds/lemonseed = 3, /obj/item/seeds/libertymycelium = 2, /obj/item/seeds/limeseed = 3, /obj/item/seeds/mtearseed = 2, /obj/item/seeds/nettleseed = 2, /obj/item/seeds/orangeseed = 3, /obj/item/seeds/peanutseed = 3, /obj/item/seeds/plastiseed = 3, /obj/item/seeds/plumpmycelium = 3, /obj/item/seeds/poppyseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/pumpkinseed = 3, /obj/item/seeds/reishimycelium = 2, /obj/item/seeds/riceseed = 3, /obj/item/seeds/soyaseed = 3, /obj/item/seeds/sugarcaneseed = 3, /obj/item/seeds/sunflowerseed = 3, /obj/item/seeds/shandseed = 2, /obj/item/seeds/tobaccoseed = 3, /obj/item/seeds/tomatoseed = 3, /obj/item/seeds/towermycelium = 3, /obj/item/seeds/watermelonseed = 3, /obj/item/seeds/wheatseed = 3, /obj/item/seeds/whitebeetseed = 3) + starting_seeds = list( + /obj/item/seeds/ambrosiavulgarisseed = 3, + /obj/item/seeds/appleseed = 3, + /obj/item/seeds/amanitamycelium = 2, + /obj/item/seeds/bananaseed = 3, + /obj/item/seeds/berryseed = 3, + /obj/item/seeds/cabbageseed = 3, + /obj/item/seeds/carrotseed = 3, + /obj/item/seeds/chantermycelium = 3, + /obj/item/seeds/cherryseed = 3, + /obj/item/seeds/chiliseed = 3, + /obj/item/seeds/cocoapodseed = 3, + /obj/item/seeds/cornseed = 3, + /obj/item/seeds/replicapod = 3, + /obj/item/seeds/eggplantseed = 3, + /obj/item/seeds/glowshroom = 2, + /obj/item/seeds/grapeseed = 3, + /obj/item/seeds/grassseed = 3, + /obj/item/seeds/lemonseed = 3, + /obj/item/seeds/libertymycelium = 2, + /obj/item/seeds/limeseed = 3, + /obj/item/seeds/mtearseed = 2, + /obj/item/seeds/nettleseed = 2, + /obj/item/seeds/orangeseed = 3, + /obj/item/seeds/peanutseed = 3, + /obj/item/seeds/plastiseed = 3, + /obj/item/seeds/plumpmycelium = 3, + /obj/item/seeds/poppyseed = 3, + /obj/item/seeds/potatoseed = 3, + /obj/item/seeds/pumpkinseed = 3, + /obj/item/seeds/reishimycelium = 2, + /obj/item/seeds/riceseed = 3, + /obj/item/seeds/soyaseed = 3, + /obj/item/seeds/sugarcaneseed = 3, + /obj/item/seeds/sunflowerseed = 3, + /obj/item/seeds/shandseed = 2, + /obj/item/seeds/tobaccoseed = 3, + /obj/item/seeds/tomatoseed = 3, + /obj/item/seeds/towermycelium = 3, + /obj/item/seeds/watermelonseed = 3, + /obj/item/seeds/wheatseed = 3, + /obj/item/seeds/whitebeetseed = 3, + /obj/item/seeds/lavenderseed = 3 + ) /obj/machinery/seed_storage/attack_hand(mob/user as mob) user.set_machine(src) @@ -225,7 +304,7 @@ /obj/machinery/seed_storage/proc/add(var/obj/item/seeds/O as obj) if (istype(O.loc, /mob)) var/mob/user = O.loc - user.removeItem(O) + user.remove_from_mob(O) else if(istype(O.loc,/obj/item/weapon/storage)) var/obj/item/weapon/storage/S = O.loc S.remove_from_storage(O, src) diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index 3e1cfc73e83..cfafd90ea21 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -475,7 +475,7 @@ if(!seed) var/obj/item/seeds/S = O - user.removeItem(O) + user.remove_from_mob(O) if(!S.seed) user << "The packet seems to be empty. You throw it away." @@ -520,7 +520,7 @@ else if ( istype(O, /obj/item/weapon/plantspray) ) var/obj/item/weapon/plantspray/spray = O - user.removeItem(O) + user.remove_from_mob(O) toxins += spray.toxicity pestlevel -= spray.pest_kill_str weedlevel -= spray.weed_kill_str diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 70f69be8347..920b751117d 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -195,9 +195,8 @@ var/list/name_to_material // General wall debris product placement. // Not particularly necessary aside from snowflakey cult girders. -/material/proc/place_dismantled_product(var/turf/target,var/is_devastated) - for(var/x=1;x<(is_devastated?2:3);x++) - place_sheet(target) +/material/proc/place_dismantled_product(var/turf/target) + place_sheet(target) // Debris product. Used ALL THE TIME. /material/proc/place_sheet(var/turf/target) diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index baa3306c88d..ca6898cb169 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -39,10 +39,10 @@ var/need_update_field = 0 var/need_player_check = 0 -/obj/machinery/mining/drill/New() +/obj/machinery/mining/drill/map/New() ..() - + circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/capacitor(src) @@ -161,7 +161,7 @@ /obj/machinery/mining/drill/attack_hand(mob/user as mob) check_supports() - if (panel_open && cell) + if (panel_open && cell && user.Adjacent(src)) user << "You take out \the [cell]." cell.loc = get_turf(user) component_parts -= cell @@ -290,7 +290,7 @@ /obj/machinery/mining/brace/New() ..() - + component_parts = list() component_parts += new /obj/item/weapon/circuitboard/miningdrillbrace(src) diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 71d1d807bd7..ce3ec04a25a 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -16,7 +16,7 @@ if(prob(50)) new /obj/item/weapon/storage/backpack/industrial(src) else - new /obj/item/weapon/storage/backpack/satchel_eng(src) + new /obj/item/weapon/storage/backpack/satchel/eng(src) new /obj/item/device/radio/headset/headset_cargo(src) new /obj/item/clothing/under/rank/miner(src) new /obj/item/clothing/gloves/black(src) diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index f3a8d4ea4d6..ce365bbde27 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -12,7 +12,8 @@ /obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob) if (istype(W, /obj/item/weapon/ore)) - user.removeItem(W, src) + user.remove_from_mob(W) + src.contents += W if (istype(W, /obj/item/weapon/storage)) var/obj/item/weapon/storage/S = W S.hide_from(usr) diff --git a/code/modules/mob/animations.dm b/code/modules/mob/animations.dm index b21c88245a9..221777f56ad 100644 --- a/code/modules/mob/animations.dm +++ b/code/modules/mob/animations.dm @@ -140,11 +140,11 @@ note dizziness decrements automatically in the mob's Life() proc. //reset the pixel offsets to zero is_floating = 0 -/atom/movable/proc/do_attack_animation(atom/A) +/mob/proc/do_attack_animation(mob/M) var/pixel_x_diff = 0 var/pixel_y_diff = 0 - var/direction = get_dir(src, A) + var/direction = get_dir(src, M) switch(direction) if(NORTH) pixel_y_diff = 8 @@ -167,7 +167,7 @@ note dizziness decrements automatically in the mob's Life() proc. pixel_x_diff = -8 pixel_y_diff = -8 animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2) - animate(pixel_x = initial(pixel_x), pixel_y = initial(pixel_y), time = 2) + animate(pixel_x = old_x, pixel_y = old_y, time = 2) /mob/do_attack_animation(atom/A) ..() diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 68c631101d3..a7c4384f4fa 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -9,7 +9,7 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images /mob/observer/dead name = "ghost" desc = "It's a g-g-g-g-ghooooost!" //jinkies! - icon = 'icons/mob/mob.dmi' + icon = 'icons/mob/ghost.dmi' icon_state = "ghost" layer = 4 stat = DEAD @@ -35,6 +35,39 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images var/seedarkness = 1 incorporeal_move = 1 + var/is_manifest = 0 //If set to 1, the ghost is able to whisper. Usually only set if a cultist drags them through the veil. + var/ghost_sprite = null + var/global/list/possible_ghost_sprites = list( + "Clear" = "blank", + "Green Blob" = "otherthing", + "Bland" = "ghost", + "Robed-B" = "ghost1", + "Robed-BAlt" = "ghost2", + "Corgi" = "ghostian", + "King" = "ghostking", + "Shade" = "shade", + "Hecate" = "ghost-narsie", + "Glowing Statue" = "armour", + "Artificer" = "artificer", + "Behemoth" = "behemoth", + "Harvester" = "harvester", + "Wraith" = "wraith", + "Viscerator" = "viscerator", + "Bats" = "bat", + "Red Robes" = "robe_red", + "Faithless" = "faithless", + "Shadowform" = "forgotten", + "Black Cat" = "blackcat", + "Dark Ethereal" = "bloodguardian", + "Holy Ethereal" = "lightguardian", + "Red Elemental" = "magicRed", + "Blue Elemental" = "magicBlue", + "Pink Elemental" = "magicPink", + "Orange Elemental" = "magicOrange", + "Green Elemental" = "magicGreen", + "Daemon" = "daemon" + ) + /mob/observer/dead/New(mob/body) sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF see_invisible = SEE_INVISIBLE_OBSERVER @@ -155,6 +188,12 @@ Works together with spawning an observer, noted above. ghost.can_reenter_corpse = can_reenter_corpse ghost.timeofdeath = src.timeofdeath //BS12 EDIT ghost.key = key + if(istype(loc, /obj/structure/morgue)) + var/obj/structure/morgue/M = loc + M.update() + else if(istype(loc, /obj/structure/closet/body_bag)) + var/obj/structure/closet/body_bag/B = loc + B.update() if(ghost.client) ghost.client.time_died_as_mouse = ghost.timeofdeath if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed. @@ -224,6 +263,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp mind.current.ajourn=0 mind.current.key = key mind.current.teleop = null + if(istype(mind.current.loc, /obj/structure/morgue)) + var/obj/structure/morgue/M = mind.current.loc + M.update(1) + else if(istype(mind.current.loc, /obj/structure/closet/body_bag)) + var/obj/structure/closet/body_bag/B = mind.current.loc + B.update(1) if(!admin_ghosted) announce_ghost_joinleave(mind, 0, "They now occupy their body again.") return 1 @@ -605,11 +650,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp return 1 /mob/observer/dead/proc/manifest(mob/user) - var/is_manifest = 0 + is_manifest = 0 if(!is_manifest) is_manifest = 1 verbs += /mob/observer/dead/proc/toggle_visibility - + verbs += /mob/observer/dead/proc/ghost_whisper + src << "As you are now in the realm of the living, you can whisper to the living with the Spectral Whisper verb, inside the IC tab." if(src.invisibility != 0) user.visible_message( \ "\The [user] drags ghost, [src], to our plane of reality!", \ @@ -741,3 +787,44 @@ mob/observer/dead/MayRespawn(var/feedback = 0) if((!target) || (!ghost)) return . = "follow" . += target.extra_ghost_link(ghost) + +//Culted Ghosts + +/mob/observer/dead/proc/ghost_whisper() + set name = "Spectral Whisper" + set category = "IC" + + if(is_manifest) //Only able to whisper if it's hit with a tome. + var/list/options = list() + for(var/mob/living/Ms in view(src)) + options += Ms + var/mob/living/M = input(src, "Select who to whisper to:", "Whisper to?", null) as null|mob in options + if(!M) + return 0 + var/msg = sanitize(input(src, "Message:", "Spectral Whisper") as text|null) + if(msg) + log_say("SpectralWhisper: [key_name(usr)]->[M.key] : [msg]") + M << " You hear a strange, unidentifiable voice in your head... [msg]" + src << " You said: '[msg]' to [M]." + else + return + return 1 + else + src << "You have not been pulled past the veil!" + +/mob/observer/dead/verb/choose_ghost_sprite() + set category = "Ghost" + set name = "Choose Sprite" + + icon = 'icons/mob/ghost.dmi' + var/choice + var/finalized = "No" + while(finalized == "No" && src.client) + + choice = input(usr,"What would you like to use for your ghost sprite?") as null|anything in possible_ghost_sprites + if(!choice) return + + icon_state = possible_ghost_sprites[choice] + finalized = alert("Look at your sprite. Is this what you wish to use?",,"No","Yes") + + ghost_sprite = possible_ghost_sprites[choice] diff --git a/code/modules/mob/dead/observer/say.dm b/code/modules/mob/dead/observer/say.dm index 9dfd3deb44c..ada597f46bf 100644 --- a/code/modules/mob/dead/observer/say.dm +++ b/code/modules/mob/dead/observer/say.dm @@ -11,9 +11,6 @@ src << "\red You cannot talk in deadchat (muted)." return - if (src.client.handle_spam_prevention(message,MUTE_DEADCHAT)) - return - . = src.say_dead(message) @@ -33,9 +30,6 @@ src << "\red You cannot emote in deadchat (muted)." return - if(src.client.handle_spam_prevention(message, MUTE_DEADCHAT)) - return - . = src.emote_dead(message) /* diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 906fe225219..4b6598cf1b3 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -85,6 +85,7 @@ dead_mob_list |= src updateicon() + handle_regular_hud_updates() if(ticker && ticker.mode) ticker.mode.check_win() diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index 8ab162dbc43..7fb80529095 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -84,4 +84,7 @@ if(input) log_emote("Ghost/[src.key] : [input]") - say_dead_direct(input, src) + if(!invisibility) //If the ghost is made visible by admins or cult. And to see if the ghost has toggled its own visibility, as well. -Mech + visible_message("[src] [input]") + else + say_dead_direct(input, src) diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 375b1e1e130..4f14216747f 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -81,7 +81,7 @@ var/time = say_timestamp() src << "[time] [message]" -/mob/proc/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0, var/vname ="") +/mob/proc/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/part_c, var/mob/speaker = null, var/hard_to_hear = 0, var/vname ="") if(!client) return @@ -184,9 +184,9 @@ var/formatted if(language) - formatted = language.format_message_radio(message, verb) + formatted = "[language.format_message_radio(message, verb)][part_c]" else - formatted = "[verb], \"[message]\"" + formatted = "[verb], \"[message]\"[part_c]" if((sdisabilities & DEAF) || ear_deaf) if(prob(20)) src << "You feel your headset vibrate but can hear nothing from it!" diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index ac63e4e5825..121b999d21f 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -18,6 +18,7 @@ var/list/holder_mob_icon_cache = list() slot_r_hand_str = 'icons/mob/items/righthand_holder.dmi', ) pixel_y = 8 + var/mob/living/held_mob /obj/item/weapon/holder/New() ..() @@ -29,21 +30,26 @@ var/list/holder_mob_icon_cache = list() /obj/item/weapon/holder/process() update_state() + drop_items() /obj/item/weapon/holder/dropped() ..() spawn(1) update_state() -/obj/item/weapon/proc/update_state() +/obj/item/weapon/holder/proc/update_state() if(istype(loc,/turf) || !(contents.len)) - for(var/mob/M in contents) - var/atom/movable/mob_container - mob_container = M - mob_container.forceMove(get_turf(src)) - M.reset_view() + if(held_mob) + held_mob.forceMove(loc) + drop_items() qdel(src) +/obj/item/weapon/holder/proc/drop_items() + for(var/atom/movable/M in contents) + if(M == held_mob) + continue + M.forceMove(get_turf(src)) + /obj/item/weapon/holder/GetID() for(var/mob/M in contents) var/obj/item/I = M.GetIdCard() @@ -109,6 +115,7 @@ var/list/holder_mob_icon_cache = list() return var/obj/item/weapon/holder/H = new holder_type(get_turf(src)) + H.held_mob = src src.forceMove(H) grabber.put_in_hands(H) @@ -138,7 +145,7 @@ var/list/holder_mob_icon_cache = list() var/skin_colour = rgb(owner.r_skin, owner.g_skin, owner.b_skin) var/hair_colour = rgb(owner.r_hair, owner.g_hair, owner.b_hair) var/eye_colour = rgb(owner.r_eyes, owner.g_eyes, owner.b_eyes) - var/species_name = lowertext(owner.species.get_bodytype()) + var/species_name = lowertext(owner.species.get_bodytype(owner)) for(var/cache_entry in generate_for_slots) var/cache_key = "[owner.species]-[cache_entry]-[skin_colour]-[hair_colour]" diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index e0108ffa01c..9d979787c5b 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -24,7 +24,14 @@ var/list/slot_equipment_priority = list( \ //This proc is called whenever someone clicks an inventory ui slot. /mob/proc/attack_ui(var/slot) var/obj/item/W = get_active_hand() - if(istype(W)) + + var/obj/item/E = get_equipped_item(slot) + if (istype(E)) + if(istype(W)) + E.attackby(W,src) + else + E.attack_hand(src) + else equip_to_slot_if_possible(W, slot) /* Inventory manipulation */ @@ -44,8 +51,10 @@ var/list/slot_equipment_priority = list( \ if(!W.mob_can_equip(src, slot)) if(del_on_fail) qdel(W) - else if(!disable_warning) - src << "\red You are unable to equip that." //Only print if del_on_fail is false + + else + if(!disable_warning) + src << "\red You are unable to equip that." //Only print if del_on_fail is false return 0 equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail. @@ -115,6 +124,22 @@ var/list/slot_equipment_priority = list( \ W.dropped() return 0 +// Removes an item from inventory and places it in the target atom. +// If canremove or other conditions need to be checked then use unEquip instead. +/mob/proc/drop_from_inventory(var/obj/item/W, var/atom/Target = null) + + if(W) + if(!Target) + Target = loc + + remove_from_mob(W) + if(!(W && W.loc)) return 1 // self destroying objects (tk, grabs) + + W.forceMove(Target) + update_icons() + return 1 + return 0 + //Drops the item in our left hand /mob/proc/drop_l_hand(var/atom/Target) return 0 @@ -159,34 +184,28 @@ var/list/slot_equipment_priority = list( \ break return slot -/mob/proc/removeItem(var/obj/item/I, var/atom/T = loc, var/force = 0) - if(!force && !src.canUnEquip(I)) - return 0 - - u_equip(I) - if(src.client) - src.client.screen -= I - - I.layer = initial(I.layer) - I.screen_loc = null - - I.dropped(src) - - if(I && I.loc) // Some items self-delete - I.forceMove(T) +//This differs from remove_from_mob() in that it checks if the item can be unequipped first. +/mob/proc/unEquip(obj/item/I, force = 0) //Force overrides NODROP for things like wizarditis and admin undress. + if(!(force || canUnEquip(I))) + return + drop_from_inventory(I) return 1 -/mob/proc/deleteItem(var/obj/item/I) - u_equip(I) - if(src.client) - src.client.screen -= I - I.screen_loc = null +//Attemps to remove an object on a mob. +/mob/proc/remove_from_mob(var/obj/O) + src.u_equip(O) + if (src.client) + src.client.screen -= O + O.layer = initial(O.layer) + O.screen_loc = null + if(istype(O, /obj/item)) + var/obj/item/I = O + I.forceMove(src.loc) + I.dropped(src) + return 1 - I.dropped(src) - if(I && I.loc) - qdel(I) //Returns the item equipped to the specified slot, if any. /mob/proc/get_equipped_item(var/slot) diff --git a/code/modules/mob/language/language.dm b/code/modules/mob/language/language.dm index cc0a1d2016e..372409b4433 100644 --- a/code/modules/mob/language/language.dm +++ b/code/modules/mob/language/language.dm @@ -10,8 +10,8 @@ var/speech_verb = "says" // 'says', 'hisses', 'farts'. var/ask_verb = "asks" // Used when sentence ends in a ? var/exclaim_verb = "exclaims" // Used when sentence ends in a ! - var/whisper_verb = "whispers" // Optional. When not specified speech_verb + quietly/softly is used instead. - var/signlang_verb = list("signs") // list of emotes that might be displayed if this language has NONVERBAL or SIGNLANG flags + var/whisper_verb // Optional. When not specified speech_verb + quietly/softly is used instead. + var/signlang_verb = list("signs", "gestures") // list of emotes that might be displayed if this language has NONVERBAL or SIGNLANG flags var/colour = "body" // CSS style to use for strings in this language. var/key = "x" // Character used to speak in language eg. :o for Unathi. var/flags = 0 // Various language flags. @@ -158,7 +158,12 @@ // Can we speak this language, as opposed to just understanding it? /mob/proc/can_speak(datum/language/speaking) - return (speaking.can_speak_special(src) && (universal_speak || (speaking && speaking.flags & INNATE) || speaking in src.languages)) +//Prevents someone from speaking a null language. + if(speaking) + return (speaking.can_speak_special(src) && (universal_speak || (speaking && (speaking.flags & INNATE)) || speaking in src.languages)) + else + log_debug("[src] attempted to speak a null language.") + return 0 /mob/proc/get_language_prefix() if(client && client.prefs.language_prefixes && client.prefs.language_prefixes.len) diff --git a/code/modules/mob/language/outsider.dm b/code/modules/mob/language/outsider.dm index 562c5789865..d427dcbfb66 100644 --- a/code/modules/mob/language/outsider.dm +++ b/code/modules/mob/language/outsider.dm @@ -38,7 +38,7 @@ ..(speaker,message,speaker_mask) /datum/language/cultcommon - name = "Cult" + name = LANGUAGE_CULT desc = "The chants of the occult, the incomprehensible." speech_verb = "intones" ask_verb = "intones" @@ -52,8 +52,8 @@ "mah'weyh", "pleggh", "at", "e'ntrath", "tok-lyr", "rqa'nap", "g'lt-ulotf", "ta'gh", "fara'qha", "fel", "d'amar det", \ "yu'gular", "faras", "desdae", "havas", "mithum", "javara", "umathar", "uf'kal", "thenar", "rash'tla", \ "sektath", "mal'zua", "zasan", "therium", "viortia", "kla'atu", "barada", "nikt'o", "fwe'sh", "mah", "erl", "nyag", "r'ya", \ - "gal'h'rfikk", "harfrandid", "mud'gib", "fuu", "ma'jin", "dedo", "ol'btoh", "n'ath", "reth", "sh'yro", "eth", \ - "d'rekkathnor", "khari'd", "gual'te", "nikka", "nikt'o", "barada", "kla'atu", "barhah", "hra" ,"zar'garis") + "gal'h'rfikk", "harfrandid", "mud'gib", "il", "fuu", "ma'jin", "dedo", "ol'btoh", "n'ath", "reth", "sh'yro", "eth", \ + "d'rekkathnor", "khari'd", "gual'te", "nikka", "nikt'o", "barada", "kla'atu", "barhah", "hra" ,"zar'garis", "spiri", "malum") /datum/language/cult name = "Occult" diff --git a/code/modules/mob/language/station.dm b/code/modules/mob/language/station.dm index 438b680f67c..0e20458291a 100644 --- a/code/modules/mob/language/station.dm +++ b/code/modules/mob/language/station.dm @@ -23,7 +23,16 @@ colour = "soghun" key = "o" flags = WHITELISTED - syllables = list("ss","ss","ss","ss","skak","seeki","resh","las","esi","kor","sh") + space_chance = 40 + syllables = list( + "za", "az", "ze", "ez", "zi", "iz", "zo", "oz", "zu", "uz", "zs", "sz", + "ha", "ah", "he", "eh", "hi", "ih", "ho", "oh", "hu", "uh", "hs", "sh", + "la", "al", "le", "el", "li", "il", "lo", "ol", "lu", "ul", "ls", "sl", + "ka", "ak", "ke", "ek", "ki", "ik", "ko", "ok", "ku", "uk", "ks", "sk", + "sa", "as", "se", "es", "si", "is", "so", "os", "su", "us", "ss", "ss", + "ra", "ar", "re", "er", "ri", "ir", "ro", "or", "ru", "ur", "rs", "sr", + "a", "a", "e", "e", "i", "i", "o", "o", "u", "u", "s", "s" + ) /datum/language/unathi/get_random_name() diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm index 21e8b6a2dcd..60a431aad30 100644 --- a/code/modules/mob/living/bot/cleanbot.dm +++ b/code/modules/mob/living/bot/cleanbot.dm @@ -189,7 +189,8 @@ var/mob/living/bot/cleanbot/A = new /mob/living/bot/cleanbot(T) A.name = created_name user << "You add the robot arm to the bucket and sensor assembly. Beep boop!" - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) else if(istype(O, /obj/item/weapon/pen)) var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN) diff --git a/code/modules/mob/living/bot/ed209bot.dm b/code/modules/mob/living/bot/ed209bot.dm index 96d9397c7ed..3c50432025d 100644 --- a/code/modules/mob/living/bot/ed209bot.dm +++ b/code/modules/mob/living/bot/ed209bot.dm @@ -185,5 +185,7 @@ user << "You complete the ED-209." var/turf/T = get_turf(src) new /mob/living/bot/secbot/ed209(T,created_name,lasercolor) + user.drop_item() qdel(W) - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) diff --git a/code/modules/mob/living/bot/farmbot.dm b/code/modules/mob/living/bot/farmbot.dm index 613a551f6a7..e623f58be86 100644 --- a/code/modules/mob/living/bot/farmbot.dm +++ b/code/modules/mob/living/bot/farmbot.dm @@ -22,6 +22,7 @@ var/obj/structure/reagent_dispensers/watertank/tank + /mob/living/bot/farmbot/New(var/newloc, var/newTank) ..(newloc) if(!newTank) @@ -29,6 +30,7 @@ tank = newTank tank.forceMove(src) + /mob/living/bot/farmbot/attack_hand(var/mob/user as mob) . = ..() if(.) @@ -105,10 +107,13 @@ else icon_state = "farmbot[on]" + /mob/living/bot/farmbot/handleRegular() if(emagged && prob(1)) flick("farmbot_broke", src) + + /mob/living/bot/farmbot/handleAdjacentTarget() UnarmedAttack(target) @@ -148,11 +153,13 @@ /mob/living/bot/farmbot/UnarmedAttack(var/atom/A, var/proximity) if(!..()) return + if(busy) return if(istype(A, /obj/machinery/portable_atmospherics/hydroponics)) var/obj/machinery/portable_atmospherics/hydroponics/T = A + var/t = confirmTarget(T) switch(t) if(0) @@ -161,6 +168,7 @@ action = "water" // Needs a better one update_icons() visible_message("[src] starts [T.dead? "removing the plant from" : "harvesting"] \the [A].") + busy = 1 if(do_after(src, 30)) visible_message("[src] [T.dead? "removes the plant from" : "harvests"] \the [A].") @@ -169,6 +177,7 @@ action = "water" update_icons() visible_message("[src] starts watering \the [A].") + busy = 1 if(do_after(src, 30)) playsound(loc, 'sound/effects/slosh.ogg', 25, 1) @@ -178,6 +187,7 @@ action = "hoe" update_icons() visible_message("[src] starts uprooting the weeds in \the [A].") + busy = 1 if(do_after(src, 30)) visible_message("[src] uproots the weeds in \the [A].") @@ -186,10 +196,13 @@ action = "fertile" update_icons() visible_message("[src] starts fertilizing \the [A].") + busy = 1 if(do_after(src, 30)) + visible_message("[src] fertilizes \the [A].") T.reagents.add_reagent("ammonia", 10) + busy = 0 action = "" update_icons() @@ -200,19 +213,23 @@ action = "water" update_icons() visible_message("[src] starts refilling its tank from \the [A].") + busy = 1 while(do_after(src, 10) && tank.reagents.total_volume < tank.reagents.maximum_volume) tank.reagents.add_reagent("water", 10) if(prob(5)) playsound(loc, 'sound/effects/slosh.ogg', 25, 1) + busy = 0 action = "" update_icons() visible_message("[src] finishes refilling its tank.") else if(emagged && ishuman(A)) var/action = pick("weed", "water") + busy = 1 spawn(50) // Some delay + busy = 0 switch(action) if("weed") @@ -225,6 +242,7 @@ A.attack_generic(src, 5, t) if("water") flick("farmbot_water", src) + visible_message("[src] splashes [A] with water!") tank.reagents.splash(A, 100) @@ -249,6 +267,7 @@ qdel(src) return + /mob/living/bot/farmbot/confirmTarget(var/atom/targ) if(!..()) return 0 @@ -296,6 +315,7 @@ var/obj/tank w_class = 3.0 + /obj/item/weapon/farmbot_arm_assembly/New(var/newloc, var/theTank) ..(newloc) if(!theTank) // If an admin spawned it, it won't have a watertank it, so lets make one for em! @@ -309,8 +329,11 @@ ..() return + user << "You add the robot arm to [src]." - user.deleteItem(S) + + user.drop_from_inventory(S) + qdel(S) new /obj/item/weapon/farmbot_arm_assembly(loc, src) @@ -320,26 +343,35 @@ build_step++ user << "You add the plant analyzer to [src]." name = "farmbot assembly" - user.deleteItem(W) + + user.remove_from_mob(W) + qdel(W) else if((istype(W, /obj/item/weapon/reagent_containers/glass/bucket)) && (build_step == 1)) build_step++ user << "You add a bucket to [src]." name = "farmbot assembly with bucket" - user.deleteItem(W) + + user.remove_from_mob(W) + qdel(W) else if((istype(W, /obj/item/weapon/material/minihoe)) && (build_step == 2)) build_step++ user << "You add a minihoe to [src]." name = "farmbot assembly with bucket and minihoe" - user.deleteItem(W) + + user.remove_from_mob(W) + qdel(W) else if((isprox(W)) && (build_step == 3)) build_step++ user << "You complete the Farmbot! Beep boop." + var/mob/living/bot/farmbot/S = new /mob/living/bot/farmbot(get_turf(src), tank) S.name = created_name - user.deleteItem(W) + + user.remove_from_mob(W) + qdel(W) qdel(src) else if(istype(W, /obj/item/weapon/pen)) diff --git a/code/modules/mob/living/bot/floorbot.dm b/code/modules/mob/living/bot/floorbot.dm index 38655699879..cb297178868 100644 --- a/code/modules/mob/living/bot/floorbot.dm +++ b/code/modules/mob/living/bot/floorbot.dm @@ -289,7 +289,8 @@ var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles user.put_in_hands(B) user << "You add the tiles into the empty toolbox. They protrude from the top." - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) else user << "You need 10 floor tiles for a floorbot." return @@ -314,7 +315,8 @@ B.created_name = created_name user.put_in_hands(B) user << "You add the sensor to the toolbox and tiles!" - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) else if (istype(W, /obj/item/weapon/pen)) var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN) if(!t) @@ -343,7 +345,8 @@ var/mob/living/bot/floorbot/A = new /mob/living/bot/floorbot(T) A.name = created_name user << "You add the robot arm to the odd looking toolbox assembly! Boop beep!" - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) else if(istype(W, /obj/item/weapon/pen)) var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN) if(!t) diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm index a8530cd9ce9..e4d39b5afe1 100644 --- a/code/modules/mob/living/bot/medbot.dm +++ b/code/modules/mob/living/bot/medbot.dm @@ -283,7 +283,8 @@ qdel(S) user.put_in_hands(A) user << "You add the robot arm to the first aid kit." - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) /obj/item/weapon/firstaid_arm_assembly name = "first aid/robot arm assembly" @@ -330,4 +331,5 @@ var/mob/living/bot/medbot/S = new /mob/living/bot/medbot(T) S.skin = skin S.name = created_name - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm index 83f26ea550c..ea80efca7e1 100644 --- a/code/modules/mob/living/bot/secbot.dm +++ b/code/modules/mob/living/bot/secbot.dm @@ -228,7 +228,8 @@ var/obj/item/weapon/secbot_assembly/A = new /obj/item/weapon/secbot_assembly user.put_in_hands(A) user << "You add the signaler to the helmet." - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) else return diff --git a/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm b/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm index 2fb5a8a0e64..9bf9e62dfb9 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm @@ -16,7 +16,7 @@ if(hat) user << "\The [src] is already wearing \the [hat]." return - user.removeItem(W) + user.unEquip(W) wear_hat(W) user.visible_message("\The [user] puts \the [W] on \the [src].") return diff --git a/code/modules/mob/living/carbon/alien/emote.dm b/code/modules/mob/living/carbon/alien/emote.dm index 62fa2cf1082..e31a293047c 100644 --- a/code/modules/mob/living/carbon/alien/emote.dm +++ b/code/modules/mob/living/carbon/alien/emote.dm @@ -18,8 +18,6 @@ if (client.prefs.muted & MUTE_IC) src << "\red You cannot send IC messages (muted)." return - if (src.client.handle_spam_prevention(message,MUTE_IC)) - return if (stat) return if(!(message)) diff --git a/code/modules/mob/living/carbon/alien/progression.dm b/code/modules/mob/living/carbon/alien/progression.dm index 2ab2fed934d..54c7f9a9692 100644 --- a/code/modules/mob/living/carbon/alien/progression.dm +++ b/code/modules/mob/living/carbon/alien/progression.dm @@ -34,7 +34,7 @@ adult.key = src.key for (var/obj/item/W in src.contents) - src.removeItem(W, force = 1) + src.drop_from_inventory(W) for(var/datum/language/L in languages) adult.add_language(L.name) diff --git a/code/modules/mob/living/carbon/brain/emote.dm b/code/modules/mob/living/carbon/brain/emote.dm index f29167f1f37..5725dd4ec7a 100644 --- a/code/modules/mob/living/carbon/brain/emote.dm +++ b/code/modules/mob/living/carbon/brain/emote.dm @@ -19,8 +19,6 @@ if (client.prefs.muted & MUTE_IC) src << "\red You cannot send IC messages (muted)." return - if (src.client.handle_spam_prevention(message,MUTE_IC)) - return if (stat) return if(!(message)) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 6898ff39e61..6b9cbf02589 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -327,7 +327,8 @@ if(!item) return //Grab processing has a chance of returning null - src.removeItem(item, loc) + src.remove_from_mob(item) + item.loc = src.loc //actually throw it! if (item) diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index 6745c11bb20..14c8efbbadd 100644 --- a/code/modules/mob/living/carbon/give.dm +++ b/code/modules/mob/living/carbon/give.dm @@ -37,6 +37,6 @@ src << "Their hands are full." return - if(src.removeItem(I)) + if(src.unEquip(I)) target.put_in_hands(I) // If this fails it will just end up on the floor, but that's fitting for things like dionaea. target.visible_message("\The [src] handed \the [I] to \the [target].") diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index 823ac808ec2..c3813000bbb 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -143,13 +143,13 @@ var/datum/species/current_species = all_species[current_species_name] if(check_whitelist && config.usealienwhitelist && !check_rights(R_ADMIN, 0, src)) //If we're using the whitelist, make sure to check it! - if(!(current_species.spawn_flags & CAN_JOIN)) + if(!(current_species.spawn_flags & SPECIES_CAN_JOIN)) continue if(whitelist.len && !(current_species_name in whitelist)) continue if(blacklist.len && (current_species_name in blacklist)) continue - if((current_species.spawn_flags & IS_WHITELISTED) && !is_alien_whitelisted(src, current_species_name)) + if((current_species.spawn_flags & SPECIES_IS_WHITELISTED) && !is_alien_whitelisted(src, current_species_name)) continue valid_species += current_species_name @@ -158,9 +158,9 @@ /mob/living/carbon/human/proc/generate_valid_hairstyles(var/check_gender = 1) - var/use_species = species.get_bodytype() + var/use_species = species.get_bodytype(src) var/obj/item/organ/external/head/H = get_organ(BP_HEAD) - if(H) use_species = H.species.get_bodytype() + if(H) use_species = H.species.get_bodytype(src) var/list/valid_hairstyles = new() for(var/hairstyle in hair_styles_list) @@ -180,9 +180,9 @@ /mob/living/carbon/human/proc/generate_valid_facial_hairstyles() - var/use_species = species.get_bodytype() + var/use_species = species.get_bodytype(src) var/obj/item/organ/external/head/H = get_organ(BP_HEAD) - if(H) use_species = H.species.get_bodytype() + if(H) use_species = H.species.get_bodytype(src) var/list/valid_facial_hairstyles = new() for(var/facialhairstyle in facial_hair_styles_list) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 391e5417091..6a45483251f 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -11,7 +11,7 @@ sleep(1) for(var/obj/item/I in src) - removeItem(I) + drop_from_inventory(I) I.throw_at(get_edge_target_turf(src,pick(alldirs)), rand(1,3), round(30/I.w_class)) ..(species.gibbed_anim) @@ -31,8 +31,6 @@ BITSET(hud_updateflag, STATUS_HUD) BITSET(hud_updateflag, LIFE_HUD) - handle_hud_list() - //Handle species-specific deaths. species.handle_death(src) animate_tail_stop() diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 87c05245717..4488f65388b 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -112,8 +112,6 @@ if (client.prefs.muted & MUTE_IC) src << "\red You cannot send IC messages (muted)." return - if (src.client.handle_spam_prevention(message,MUTE_IC)) - return if (stat) return if(!(message)) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 235abffef60..de3764e5af3 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -26,7 +26,7 @@ var/msg = "*---------*\nThis is " - var/datum/gender/T = gender_datums[gender] + var/datum/gender/T = gender_datums[get_gender()] if(skipjumpsuit && skipface) //big suits/masks/helmets make it hard to tell their gender T = gender_datums[PLURAL] else @@ -51,7 +51,12 @@ msg += ", [use_gender]!" else if(species.name != "Human") - msg += ", \a [species.name]!" + msg += ", \a [species.get_examine_name()]!" + + var/extra_species_text = species.get_additional_examine_text(src) + if(extra_species_text) + msg += "[extra_species_text]
    " + msg += "
    " //uniform @@ -271,18 +276,18 @@ if(temp.status & ORGAN_DESTROYED) wound_flavor_text["[temp.name]"] = "[T.He] [T.is] missing [T.his] [temp.name].\n" continue - if(!is_synth && temp.status & ORGAN_ROBOT) + if(!is_synth && temp.robotic >= ORGAN_ROBOT) if(!(temp.brute_dam + temp.burn_dam)) - wound_flavor_text["[temp.name]"] = "[T.He] [T.has] a [temp.name]!\n" - continue + wound_flavor_text["[temp.name]"] = "[T.He] [T.has] a [temp.name].\n" else - wound_flavor_text["[temp.name]"] = "[T.He] [T.has] a [temp.name]. It has[temp.get_wounds_desc()]!\n" + wound_flavor_text["[temp.name]"] = "[T.He] [T.has] a [temp.name]. It has [temp.get_wounds_desc()]!\n" + continue else if(temp.wounds.len > 0 || temp.open) if(temp.is_stump() && temp.parent_organ && organs_by_name[temp.parent_organ]) var/obj/item/organ/external/parent = organs_by_name[temp.parent_organ] - wound_flavor_text["[temp.name]"] = "[T.He] has [temp.get_wounds_desc()] on [T.His] [parent.name].
    " + wound_flavor_text["[temp.name]"] = "[T.He] has [temp.get_wounds_desc()] on [T.his] [parent.name].
    " else - wound_flavor_text["[temp.name]"] = "[T.He] has [temp.get_wounds_desc()] on [T.His] [temp.name].
    " + wound_flavor_text["[temp.name]"] = "[T.He] has [temp.get_wounds_desc()] on [T.his] [temp.name].
    " if(temp.status & ORGAN_BLEEDING) is_bleeding["[temp.name]"] = "[T.His] [temp.name] is bleeding!
    " else diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 111868089bf..b5ea7931c10 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -150,21 +150,21 @@ update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) if(update) UpdateDamageIcon() -/mob/living/carbon/human/proc/implant_loyalty(mob/living/carbon/human/M, override = FALSE) // Won't override by default. +/mob/living/carbon/human/proc/implant_loyalty(override = FALSE) // Won't override by default. if(!config.use_loyalty_implants && !override) return // Nuh-uh. - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M) - L.imp_in = M + var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src) + L.imp_in = src L.implanted = 1 - var/obj/item/organ/external/affected = M.organs_by_name[BP_HEAD] + var/obj/item/organ/external/affected = src.organs_by_name[BP_HEAD] affected.implants += L L.part = affected L.implanted(src) -/mob/living/carbon/human/proc/is_loyalty_implanted(mob/living/carbon/human/M) - for(var/L in M.contents) +/mob/living/carbon/human/proc/is_loyalty_implanted() + for(var/L in src.contents) if(istype(L, /obj/item/weapon/implant/loyalty)) - for(var/obj/item/organ/external/O in M.organs) + for(var/obj/item/organ/external/O in src.organs) if(L in O.implants) return 1 return 0 @@ -326,11 +326,19 @@ //Removed the horrible safety parameter. It was only being used by ninja code anyways. //Now checks siemens_coefficient of the affected area by default /mob/living/carbon/human/electrocute_act(var/shock_damage, var/obj/source, var/base_siemens_coeff = 1.0, var/def_zone = null) + if(status_flags & GODMODE) return 0 //godmode if (!def_zone) def_zone = pick("l_hand", "r_hand") + if(species.siemens_coefficient == -1) + if(stored_shock_by_ref["\ref[src]"]) + stored_shock_by_ref["\ref[src]"] += shock_damage + else + stored_shock_by_ref["\ref[src]"] = shock_damage + return + var/obj/item/organ/external/affected_organ = get_organ(check_zone(def_zone)) var/siemens_coeff = base_siemens_coeff * get_siemens_coefficient_organ(affected_organ) @@ -1022,7 +1030,7 @@ src << msg organ.take_damage(rand(1,3), 0, 0) - if(!(organ.status & ORGAN_ROBOT) && !should_have_organ(O_HEART)) //There is no blood in protheses. + if(!(organ.robotic >= ORGAN_ROBOT) && !(should_have_organ(O_HEART))) //There is no blood in protheses. organ.status |= ORGAN_BLEEDING src.adjustToxLoss(rand(1,3)) @@ -1104,6 +1112,9 @@ if(species.holder_type) holder_type = species.holder_type + if(!(gender in species.genders)) + gender = species.genders[1] + icon_state = lowertext(species.name) species.create_organs(src) @@ -1205,7 +1216,7 @@ if(!affecting) . = 0 fail_msg = "They are missing that limb." - else if (affecting.status & ORGAN_ROBOT) + else if (affecting.robotic >= ORGAN_ROBOT) . = 0 fail_msg = "That limb is robotic." else @@ -1348,10 +1359,10 @@ S << "[U] pops your [current_limb.joint] back in!" current_limb.undislocate() -/mob/living/carbon/human/removeItem(var/obj/item/I, var/atom/T = loc, var/force = 0) - if(I in src.organs) - return 0 - return ..() +/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/Target = null) + if(W in organs) + return + ..() /mob/living/carbon/human/reset_view(atom/A, update_hud = 1) ..() @@ -1433,7 +1444,7 @@ else if(organ_check in list(O_LIVER, O_KIDNEYS)) affecting = organs_by_name[BP_GROIN] - if(affecting && (affecting.status & ORGAN_ROBOT)) + if(affecting && (affecting.robotic >= ORGAN_ROBOT)) return 0 return (species && species.has_organ[organ_check]) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 1d61cd6d0e6..7cc3156f189 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -281,7 +281,7 @@ //Actually disarm them for(var/obj/item/I in holding) if(I) - removeItem(I) + drop_from_inventory(I) visible_message("[M] has disarmed [src]!") playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) return diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index e0451046ae5..994d9dd723d 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -9,8 +9,8 @@ var/total_burn = 0 var/total_brute = 0 for(var/obj/item/organ/external/O in organs) //hardcoded to streamline things a bit - if((O.status & ORGAN_ROBOT) && !O.vital) - continue // Non-vital robot limbs don't count towards shock and crit + if((O.robotic >= ORGAN_ROBOT) && !O.vital) + continue //*non-vital* robot limbs don't count towards shock and crit total_brute += O.brute_dam total_burn += O.burn_dam @@ -67,7 +67,7 @@ /mob/living/carbon/human/getBruteLoss() var/amount = 0 for(var/obj/item/organ/external/O in organs) - if((O.status & ORGAN_ROBOT) && !O.vital) + if(O.robotic >= ORGAN_ROBOT) continue //robot limbs don't count towards shock and crit amount += O.brute_dam return amount @@ -75,7 +75,7 @@ /mob/living/carbon/human/getFireLoss() var/amount = 0 for(var/obj/item/organ/external/O in organs) - if((O.status & ORGAN_ROBOT) && !O.vital) + if(O.robotic >= ORGAN_ROBOT) continue //robot limbs don't count towards shock and crit amount += O.burn_dam return amount @@ -106,7 +106,7 @@ O.take_damage(amount, 0, sharp=is_sharp(damage_source), edge=has_edge(damage_source), used_weapon=damage_source) else //if you don't want to heal robot organs, they you will have to check that yourself before using this proc. - O.heal_damage(-amount, 0, internal=0, robo_repair=(O.status & ORGAN_ROBOT)) + O.heal_damage(-amount, 0, internal=0, robo_repair=(O.robotic >= ORGAN_ROBOT)) BITSET(hud_updateflag, HEALTH_HUD) @@ -119,7 +119,7 @@ O.take_damage(0, amount, sharp=is_sharp(damage_source), edge=has_edge(damage_source), used_weapon=damage_source) else //if you don't want to heal robot organs, they you will have to check that yourself before using this proc. - O.heal_damage(0, -amount, internal=0, robo_repair=(O.status & ORGAN_ROBOT)) + O.heal_damage(0, -amount, internal=0, robo_repair=(O.robotic >= ORGAN_ROBOT)) BITSET(hud_updateflag, HEALTH_HUD) @@ -266,7 +266,6 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t UpdateDamageIcon() BITSET(hud_updateflag, HEALTH_HUD) updatehealth() - speech_problem_flag = 1 //Heal MANY external organs, in random order @@ -288,7 +287,6 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t parts -= picked updatehealth() BITSET(hud_updateflag, HEALTH_HUD) - speech_problem_flag = 1 if(update) UpdateDamageIcon() // damage MANY external organs, in random order diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index ad34de145b4..614bbe1de8c 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -56,8 +56,8 @@ emp_act if(c_hand && (stun_amount || agony_amount > 10)) msg_admin_attack("[src.name] ([src.ckey]) was disarmed by a stun effect") - removeItem(c_hand) - if (affected.status & ORGAN_ROBOT) + drop_from_inventory(c_hand) + if (affected.robotic >= ORGAN_ROBOT) emote("me", 1, "drops what they were holding, their [affected.name] malfunctioning!") else var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ") @@ -92,7 +92,7 @@ emp_act if (!def_zone) return 1.0 - var/siemens_coefficient = species.siemens_coefficient + var/siemens_coefficient = max(species.siemens_coefficient,0) var/list/clothing_items = list(head, wear_mask, wear_suit, w_uniform, gloves, shoes) // What all are we checking? for(var/obj/item/clothing/C in clothing_items) @@ -160,7 +160,7 @@ emp_act if(check_shields(I.force, I, user, target_zone, "the [I.name]")) return - + var/obj/item/organ/external/affecting = get_organ(hit_zone) if (!affecting || affecting.is_stump()) user << "They are missing that limb!" diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 2cb4ad5abf0..390e7ee6c5f 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -69,8 +69,6 @@ var/voice = "" //Instead of new say code calling GetVoice() over and over and over, we're just going to ask this variable, which gets updated in Life() - var/speech_problem_flag = 0 - var/miming = null //Toggle for the mime's abilities. var/special_voice = "" // For changing our voice. Used by a symptom. @@ -91,3 +89,5 @@ mob_bump_flag = HUMAN mob_push_flags = ~HEAVY mob_swap_flags = ~HEAVY + + var/identifying_gender // In case the human identifies as another gender than it's biological diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 5cb11157f12..df8eead14ec 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -55,6 +55,8 @@ sum += H.ear_protection return sum +/mob/living/carbon/human/get_gender() + return identifying_gender ? identifying_gender : gender #undef HUMAN_EATING_NO_ISSUE #undef HUMAN_EATING_NO_MOUTH diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 8f7e40602dd..f65b9926c8e 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -9,15 +9,24 @@ /mob/living/carbon/human/var/list/organs_by_name = list() // map organ names to organs /mob/living/carbon/human/var/list/internal_organs_by_name = list() // so internal organs have less ickiness too +/mob/living/carbon/human/proc/get_bodypart_name(var/zone) + var/obj/item/organ/external/E = get_organ(zone) + if(E) . = E.name + +/mob/living/carbon/human/proc/recheck_bad_external_organs() + var/damage_this_tick = getToxLoss() + for(var/obj/item/organ/external/O in organs) + damage_this_tick += O.burn_dam + O.brute_dam + + if(damage_this_tick > last_dam) + . = TRUE + last_dam = damage_this_tick + // Takes care of organ related updates, such as broken and missing limbs /mob/living/carbon/human/proc/handle_organs() - number_wounds = 0 - var/force_process = 0 - var/damage_this_tick = getBruteLoss() + getFireLoss() + getToxLoss() - if(damage_this_tick > last_dam) - force_process = 1 - last_dam = damage_this_tick + var/force_process = recheck_bad_external_organs() + if(force_process) bad_external_organs.Cut() for(var/obj/item/organ/external/Ex in organs) @@ -117,7 +126,7 @@ var/obj/item/organ/external/E = get_organ(limb_tag) if(!E) visible_message("Lacking a functioning left hand, \the [src] drops \the [l_hand].") - removeItem(l_hand) + drop_from_inventory(l_hand) break if(r_hand) @@ -125,7 +134,7 @@ var/obj/item/organ/external/E = get_organ(limb_tag) if(!E) visible_message("Lacking a functioning right hand, \the [src] drops \the [r_hand].") - removeItem(r_hand) + drop_from_inventory(r_hand) break // Check again... @@ -141,11 +150,11 @@ if(HAND_LEFT, ARM_LEFT) if(!l_hand) continue - removeItem(l_hand) + drop_from_inventory(l_hand) if(HAND_RIGHT, ARM_RIGHT) if(!r_hand) continue - removeItem(r_hand) + drop_from_inventory(r_hand) var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ") emote("me", 1, "[(E.can_feel_pain()) ? "" : emote_scream ]drops what they were holding in their [E.name]!") @@ -155,11 +164,11 @@ if(HAND_LEFT, ARM_LEFT) if(!l_hand) continue - removeItem(l_hand) + drop_from_inventory(l_hand) if(HAND_RIGHT, ARM_RIGHT) if(!r_hand) continue - removeItem(r_hand) + drop_from_inventory(r_hand) emote("me", 1, "drops what they were holding, their [E.name] malfunctioning!") diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index 852d46c6cc0..48b668a5015 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -139,7 +139,7 @@ for(var/obj/item/W in src) - removeItem(W, force = 1) + drop_from_inventory(W) visible_message("\The [src] quivers slightly, then splits apart with a wet slithering noise.") diff --git a/code/modules/mob/living/carbon/human/human_species.dm b/code/modules/mob/living/carbon/human/human_species.dm index 113377b9332..4aad06fd7ae 100644 --- a/code/modules/mob/living/carbon/human/human_species.dm +++ b/code/modules/mob/living/carbon/human/human_species.dm @@ -17,6 +17,10 @@ /mob/living/carbon/human/diona/New(var/new_loc) ..(new_loc, "Diona") +/mob/living/carbon/human/teshari/New(var/new_loc) + h_style = "Teshari Default" + ..(new_loc, "Teshari") + /mob/living/carbon/human/machine/New(var/new_loc) h_style = "blue IPC screen" ..(new_loc, "Machine") diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 77aff853aea..5dacc500dc4 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -85,18 +85,18 @@ This saves us from having to call add_fingerprint() any time something is put in if (W == wear_suit) if(s_store) - removeItem(s_store) + drop_from_inventory(s_store) wear_suit = null update_inv_wear_suit() else if (W == w_uniform) if (r_store) - removeItem(r_store) + drop_from_inventory(r_store) if (l_store) - removeItem(l_store) + drop_from_inventory(l_store) if (wear_id) - removeItem(wear_id) + drop_from_inventory(wear_id) if (belt) - removeItem(belt) + drop_from_inventory(belt) w_uniform = null update_inv_w_uniform() else if (W == gloves) @@ -267,8 +267,6 @@ This saves us from having to call add_fingerprint() any time something is put in update_inv_shoes(redraw_mob) if(slot_wear_suit) src.wear_suit = W - if(wear_suit.flags_inv & HIDESHOES) - update_inv_shoes(0) W.equipped(src, slot) update_inv_wear_suit(redraw_mob) if(slot_w_uniform) @@ -289,7 +287,7 @@ This saves us from having to call add_fingerprint() any time something is put in update_inv_s_store(redraw_mob) if(slot_in_backpack) if(src.get_active_hand() == W) - src.removeItem(W) + src.remove_from_mob(W) W.loc = src.back if(slot_tie) var/obj/item/clothing/under/uniform = src.w_uniform diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index b0a45faff66..13dbd179c03 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -150,22 +150,10 @@ /mob/living/carbon/human/handle_disabilities() ..() - //Vision - if(species.vision_organ) - if(internal_organs_by_name[species.vision_organ]) // Vision organs cut out? Permablind. - eye_blind = 0 - blinded = 0 - eye_blurry = 0 - else - eye_blind = 1 - blinded = 1 - eye_blurry = 1 - else // Presumably if a species has no vision organs, they see via some other means. - eye_blind = 0 - blinded = 0 - eye_blurry = 0 - - + + if(stat != CONSCIOUS) //Let's not worry about tourettes if you're not conscious. + return + if (disabilities & EPILEPSY) if ((prob(1) && paralysis < 1)) src << "\red You have a seizure!" @@ -182,7 +170,6 @@ emote("cough") return if (disabilities & TOURETTES) - speech_problem_flag = 1 if ((prob(10) && paralysis <= 1)) Stun(10) spawn( 0 ) @@ -194,31 +181,29 @@ make_jittery(100) return if (disabilities & NERVOUS) - speech_problem_flag = 1 if (prob(10)) stuttering = max(10, stuttering) - if(stat != 2) - var/rn = rand(0, 200) - if(getBrainLoss() >= 5) - if(0 <= rn && rn <= 3) - custom_pain("Your head feels numb and painful.") - if(getBrainLoss() >= 15) - if(4 <= rn && rn <= 6) if(eye_blurry <= 0) - src << "It becomes hard to see for some reason." - eye_blurry = 10 - if(getBrainLoss() >= 35) - if(7 <= rn && rn <= 9) if(get_active_hand()) - src << "Your hand won't respond properly, you drop what you're holding!" - drop_item() - if(getBrainLoss() >= 45) - if(10 <= rn && rn <= 12) - if(prob(50)) - src << "You suddenly black out!" - Paralyse(10) - else if(!lying) - src << "Your legs won't respond properly, you fall down!" - Weaken(10) + var/rn = rand(0, 200) + if(getBrainLoss() >= 5) + if(0 <= rn && rn <= 3) + custom_pain("Your head feels numb and painful.") + if(getBrainLoss() >= 15) + if(4 <= rn && rn <= 6) if(eye_blurry <= 0) + src << "It becomes hard to see for some reason." + eye_blurry = 10 + if(getBrainLoss() >= 35) + if(7 <= rn && rn <= 9) if(get_active_hand()) + src << "Your hand won't respond properly, you drop what you're holding!" + drop_item() + if(getBrainLoss() >= 45) + if(10 <= rn && rn <= 12) + if(prob(50)) + src << "You suddenly black out!" + Paralyse(10) + else if(!lying) + src << "Your legs won't respond properly, you fall down!" + Weaken(10) @@ -236,12 +221,17 @@ if(!gene.block) continue if(gene.is_active(src)) - speech_problem_flag = 1 gene.OnMobLife(src) radiation = Clamp(radiation,0,100) - if (radiation) + if(!radiation) + if(species.appearance_flags & RADIATION_GLOWS) + set_light(0) + else + if(species.appearance_flags & RADIATION_GLOWS) + set_light(max(1,min(10,radiation/10)), max(1,min(20,radiation/20)), species.get_flesh_colour(src)) + // END DOGSHIT SNOWFLAKE var/obj/item/organ/internal/diona/nutrients/rad_organ = locate() in internal_organs if(rad_organ && !rad_organ.is_broken()) @@ -923,7 +913,6 @@ adjustHalLoss(-3) if(sleeping) - speech_problem_flag = 1 handle_dreams() if (mind) //Are they SSD? If so we'll keep them asleep but work off some of that sleep var in case of stoxin or similar. @@ -962,19 +951,18 @@ if(species.vision_organ) vision = internal_organs_by_name[species.vision_organ] - if(!vision) // Presumably if a species has no vision organs, they see via some other means. + if(!species.vision_organ) // Presumably if a species has no vision organs, they see via some other means. eye_blind = 0 blinded = 0 eye_blurry = 0 - else if(vision.is_broken()) // Vision organs cut out or broken? Permablind. + else if(!vision || vision.is_broken()) // Vision organs cut out or broken? Permablind. eye_blind = 1 blinded = 1 eye_blurry = 1 - else - //blindness - if(sdisabilities & BLIND) // Disabled-blind, doesn't get better on its own + else //You have the requisite organs + if(sdisabilities & BLIND) // Disabled-blind, doesn't get better on its own blinded = 1 - else if(eye_blind) // Blindness, heals slowly over time + else if(eye_blind) // Blindness, heals slowly over time eye_blind = max(eye_blind-1,0) blinded = 1 else if(istype(glasses, /obj/item/clothing/glasses/sunglasses/blindfold)) //resting your eyes with a blindfold heals blurry eyes faster @@ -1524,7 +1512,7 @@ var/obj/item/organ/internal/heart/H = internal_organs_by_name[O_HEART] - if(!H || (H.status & ORGAN_ROBOT)) + if(!H || (H.robotic >= ORGAN_ROBOT)) return if(pulse >= PULSE_2FAST || shock_stage >= 10 || istype(get_turf(src), /turf/space)) @@ -1549,7 +1537,7 @@ /mob/living/carbon/human/proc/handle_hud_list() if (BITTEST(hud_updateflag, HEALTH_HUD)) var/image/holder = hud_list[HEALTH_HUD] - if(stat == 2) + if(stat == DEAD) holder.icon_state = "hudhealth-100" // X_X else var/percentage_health = RoundHealth((health-config.health_threshold_crit)/(maxHealth-config.health_threshold_crit)*100) @@ -1573,12 +1561,9 @@ var/image/holder = hud_list[STATUS_HUD] var/image/holder2 = hud_list[STATUS_HUD_OOC] - if(stat == 2) + if(stat == DEAD) holder.icon_state = "huddead" holder2.icon_state = "huddead" - else if(status_flags & XENO_HOST) - holder.icon_state = "hudxeno" - holder2.icon_state = "hudxeno" else if(foundVirus) holder.icon_state = "hudill" else if(has_brain_worms()) @@ -1674,28 +1659,11 @@ hud_list[SPECIALROLE_HUD] = holder hud_updateflag = 0 -/mob/living/carbon/human/handle_silent() - if(..()) - speech_problem_flag = 1 - return silent - -/mob/living/carbon/human/handle_slurring() - if(..()) - speech_problem_flag = 1 - return slurring - /mob/living/carbon/human/handle_stunned() if(!can_feel_pain()) stunned = 0 return 0 - if(..()) - speech_problem_flag = 1 - return stunned - -/mob/living/carbon/human/handle_stuttering() - if(..()) - speech_problem_flag = 1 - return stuttering + return ..() /mob/living/carbon/human/handle_fire() if(..()) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index cbfb88676a4..c87338d26cb 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -1,10 +1,10 @@ -/mob/living/carbon/human/say(var/message) +/mob/living/carbon/human/say(var/message,var/whispering=0) var/alt_name = "" if(name != GetVoice()) alt_name = "(as [get_id_name("Unknown")])" message = sanitize(message) - ..(message, alt_name = alt_name) + ..(message, alt_name = alt_name, whispering = whispering) /mob/living/carbon/human/proc/forcesay(list/append) if(stat == CONSCIOUS) @@ -125,29 +125,20 @@ return verb -/mob/living/carbon/human/handle_speech_problems(var/message, var/verb) +/mob/living/carbon/human/handle_speech_problems(var/list/message_data) if(silent || (sdisabilities & MUTE)) - message = "" - speech_problem_flag = 1 + message_data[1] = "" + . = 1 + else if(istype(wear_mask, /obj/item/clothing/mask)) var/obj/item/clothing/mask/M = wear_mask if(M.voicechange) - message = pick(M.say_messages) - verb = pick(M.say_verbs) - speech_problem_flag = 1 + message_data[1] = pick(M.say_messages) + message_data[2] = pick(M.say_verbs) + . = 1 - if(message != "") - var/list/parent = ..() - message = parent[1] - verb = parent[2] - if(parent[3]) - speech_problem_flag = 1 - - var/list/returns[3] - returns[1] = message - returns[2] = verb - returns[3] = speech_problem_flag - return returns + else + . = ..(message_data) /mob/living/carbon/human/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name) switch(message_mode) @@ -190,9 +181,6 @@ if(has_radio) R.talk_into(src,message,null,verb,speaking) used_radios += R - if("whisper") - whisper_say(message, speaking, alt_name) - return 1 else if(message_mode) if(l_ear && istype(l_ear,/obj/item/device/radio)) 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 8820ffaf5bd..58a967c809e 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/shadow.dm @@ -19,7 +19,9 @@ death_message = "dissolves into ash..." flags = NO_SCAN | NO_SLIP | NO_POISON | NO_MINOR_CUT - spawn_flags = IS_RESTRICTED + spawn_flags = SPECIES_IS_RESTRICTED + + genders = list(NEUTER) /datum/species/shadow/handle_death(var/mob/living/carbon/human/H) spawn(1) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index e8a83045100..25a8149e482 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -21,10 +21,12 @@ var/prone_icon // If set, draws this from icobase when mob is prone. var/blood_color = "#A10808" // Red. var/flesh_color = "#FFC896" // Pink. - var/base_color // Used by changelings. Should also be used for icon previes.. + var/base_color // Used by changelings. Should also be used for icon previews. + var/tail // Name of tail state in species effects icon file. var/tail_animation // If set, the icon to obtain tail animation states from. var/tail_hair + var/race_key = 0 // Used for mob icon cache string. var/icon/icon_template // Used for mob icon generation for non-32x32 species. var/mob_size = MOB_MEDIUM @@ -147,6 +149,8 @@ BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right) ) + var/list/genders = list(MALE, FEMALE) + // Bump vars var/bump_flag = HUMAN // What are we considered to be when bumped? var/push_flags = ~HEAVY // What can we push? @@ -173,71 +177,9 @@ inherent_verbs = list() inherent_verbs |= /mob/living/carbon/human/proc/regurgitate -/datum/species/proc/get_station_variant() - return name - -/datum/species/proc/get_bodytype() - return name - -/datum/species/proc/get_knockout_message(var/mob/living/carbon/human/H) - return ((H && H.isSynthetic()) ? "encounters a hardware fault and suddenly reboots!" : knockout_message) - -/datum/species/proc/get_death_message(var/mob/living/carbon/human/H) - if(config.show_human_death_message) - return ((H && H.isSynthetic()) ? "gives one shrill beep before falling lifeless." : death_message) - else - return "no message" - -/datum/species/proc/get_ssd(var/mob/living/carbon/human/H) - return ((H && H.isSynthetic()) ? "flashing a 'system offline' glyph on their monitor" : show_ssd) - -/datum/species/proc/get_blood_colour(var/mob/living/carbon/human/H) - return ((H && H.isSynthetic()) ? SYNTH_BLOOD_COLOUR : blood_color) - -/datum/species/proc/get_virus_immune(var/mob/living/carbon/human/H) - return ((H && H.isSynthetic()) ? 1 : virus_immune) - -/datum/species/proc/get_flesh_colour(var/mob/living/carbon/human/H) - return ((H && H.isSynthetic()) ? SYNTH_FLESH_COLOUR : flesh_color) - -/datum/species/proc/get_environment_discomfort(var/mob/living/carbon/human/H, var/msg_type) - - if(!prob(5)) - return - - var/covered = 0 // Basic coverage can help. - for(var/obj/item/clothing/clothes in H) - if(H.item_is_in_hands(clothes)) - continue - if((clothes.body_parts_covered & UPPER_TORSO) && (clothes.body_parts_covered & LOWER_TORSO)) - covered = 1 - break - - switch(msg_type) - if("cold") - if(!covered) - H << "[pick(cold_discomfort_strings)]" - if("heat") - if(covered) - H << "[pick(heat_discomfort_strings)]" - /datum/species/proc/sanitize_name(var/name) return sanitizeName(name) -/datum/species/proc/get_random_name(var/gender) - if(!name_language) - if(gender == FEMALE) - return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names)) - else - return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) - - var/datum/language/species_language = all_languages[name_language] - if(!species_language) - species_language = all_languages[default_language] - if(!species_language) - return "unknown" - return species_language.get_random_name(gender) - /datum/species/proc/equip_survival_gear(var/mob/living/carbon/human/H,var/extendedtank = 1) if(H.backbag == 1) if (extendedtank) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand) @@ -349,6 +291,3 @@ // Called in life() when the mob has no client. /datum/species/proc/handle_npc(var/mob/living/carbon/human/H) return - -/datum/species/proc/get_vision_flags(var/mob/living/carbon/human/H) - return vision_flags diff --git a/code/modules/mob/living/carbon/human/species/species_attack.dm b/code/modules/mob/living/carbon/human/species/species_attack.dm index cd4ca21e001..018dbafa84c 100644 --- a/code/modules/mob/living/carbon/human/species/species_attack.dm +++ b/code/modules/mob/living/carbon/human/species/species_attack.dm @@ -67,9 +67,9 @@ attack_noun = list("body") damage = 2 -/datum/unarmed_attack/slime_glomp/apply_effects() - //Todo, maybe have a chance of causing an electrical shock? - return +/datum/unarmed_attack/slime_glomp/apply_effects(var/mob/living/carbon/human/user,var/mob/living/carbon/human/target,var/armour,var/attack_damage,var/zone) + ..() + user.apply_stored_shock_to(target) /datum/unarmed_attack/stomp/weak attack_verb = list("jumped on") diff --git a/code/modules/mob/living/carbon/human/species/species_getters.dm b/code/modules/mob/living/carbon/human/species/species_getters.dm new file mode 100644 index 00000000000..625d5559433 --- /dev/null +++ b/code/modules/mob/living/carbon/human/species/species_getters.dm @@ -0,0 +1,97 @@ +/datum/species/proc/get_valid_shapeshifter_forms(var/mob/living/carbon/human/H) + return list() + +/datum/species/proc/get_additional_examine_text(var/mob/living/carbon/human/H) + return + +/datum/species/proc/get_tail(var/mob/living/carbon/human/H) + return tail + +/datum/species/proc/get_tail_animation(var/mob/living/carbon/human/H) + return tail_animation + +/datum/species/proc/get_tail_hair(var/mob/living/carbon/human/H) + return tail_hair + +/datum/species/proc/get_blood_mask(var/mob/living/carbon/human/H) + return blood_mask + +/datum/species/proc/get_damage_overlays(var/mob/living/carbon/human/H) + return damage_overlays + +/datum/species/proc/get_damage_mask(var/mob/living/carbon/human/H) + return damage_mask + +/datum/species/proc/get_examine_name(var/mob/living/carbon/human/H) + return name + +/datum/species/proc/get_icobase(var/mob/living/carbon/human/H, var/get_deform) + return (get_deform ? deform : icobase) + +/datum/species/proc/get_station_variant() + return name + +/datum/species/proc/get_race_key(var/mob/living/carbon/human/H) + return race_key + +/datum/species/proc/get_bodytype(var/mob/living/carbon/human/H) + return name + +/datum/species/proc/get_knockout_message(var/mob/living/carbon/human/H) + return ((H && H.isSynthetic()) ? "encounters a hardware fault and suddenly reboots!" : knockout_message) + +/datum/species/proc/get_death_message(var/mob/living/carbon/human/H) + if(config.show_human_death_message) + return ((H && H.isSynthetic()) ? "gives one shrill beep before falling lifeless." : death_message) + else + return "no message" + +/datum/species/proc/get_ssd(var/mob/living/carbon/human/H) + return ((H && H.isSynthetic()) ? "flashing a 'system offline' glyph on their monitor" : show_ssd) + +/datum/species/proc/get_blood_colour(var/mob/living/carbon/human/H) + return ((H && H.isSynthetic()) ? SYNTH_BLOOD_COLOUR : blood_color) + +/datum/species/proc/get_virus_immune(var/mob/living/carbon/human/H) + return ((H && H.isSynthetic()) ? 1 : virus_immune) + +/datum/species/proc/get_flesh_colour(var/mob/living/carbon/human/H) + return ((H && H.isSynthetic()) ? SYNTH_FLESH_COLOUR : flesh_color) + +/datum/species/proc/get_environment_discomfort(var/mob/living/carbon/human/H, var/msg_type) + + if(!prob(5)) + return + + var/covered = 0 // Basic coverage can help. + for(var/obj/item/clothing/clothes in H) + if(H.item_is_in_hands(clothes)) + continue + if((clothes.body_parts_covered & UPPER_TORSO) && (clothes.body_parts_covered & LOWER_TORSO)) + covered = 1 + break + + switch(msg_type) + if("cold") + if(!covered) + H << "[pick(cold_discomfort_strings)]" + if("heat") + if(covered) + H << "[pick(heat_discomfort_strings)]" + +/datum/species/proc/get_random_name(var/gender) + if(!name_language) + if(gender == FEMALE) + return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names)) + else + return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) + + var/datum/language/species_language = all_languages[name_language] + if(!species_language) + species_language = all_languages[default_language] + if(!species_language) + return "unknown" + return species_language.get_random_name(gender) + +/datum/species/proc/get_vision_flags(var/mob/living/carbon/human/H) + return vision_flags diff --git a/code/modules/mob/living/carbon/human/species/species_helpers.dm b/code/modules/mob/living/carbon/human/species/species_helpers.dm new file mode 100644 index 00000000000..3152312f1cc --- /dev/null +++ b/code/modules/mob/living/carbon/human/species/species_helpers.dm @@ -0,0 +1,6 @@ +var/list/stored_shock_by_ref = list() + +/mob/living/proc/apply_stored_shock_to(var/mob/living/target) + if(stored_shock_by_ref["\ref[src]"]) + target.electrocute_act(stored_shock_by_ref["\ref[src]"]*0.9, src) + stored_shock_by_ref["\ref[src]"] = 0 diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm new file mode 100644 index 00000000000..293df932157 --- /dev/null +++ b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm @@ -0,0 +1,187 @@ +// This is something of an intermediary species used for species that +// need to emulate the appearance of another race. Currently it is only +// used for slimes but it may be useful for changelings later. +var/list/wrapped_species_by_ref = list() + +/datum/species/shapeshifter + + inherent_verbs = list( + /mob/living/carbon/human/proc/shapeshifter_select_shape, + /mob/living/carbon/human/proc/shapeshifter_select_hair, + /mob/living/carbon/human/proc/shapeshifter_select_gender + ) + + var/list/valid_transform_species = list() + var/monochromatic + var/default_form = "Human" + +/datum/species/shapeshifter/get_valid_shapeshifter_forms(var/mob/living/carbon/human/H) + return valid_transform_species + +/datum/species/shapeshifter/get_icobase(var/mob/living/carbon/human/H, var/get_deform) + if(!H) return ..(null, get_deform) + var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]] + return S.get_icobase(H, get_deform) + +/datum/species/shapeshifter/get_race_key(var/mob/living/carbon/human/H) + return "[..()]-[wrapped_species_by_ref["\ref[H]"]]" + +/datum/species/shapeshifter/get_bodytype(var/mob/living/carbon/human/H) + if(!H) return ..() + var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]] + return S.get_bodytype(H) + +/datum/species/shapeshifter/get_blood_mask(var/mob/living/carbon/human/H) + if(!H) return ..() + var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]] + return S.get_blood_mask(H) + +/datum/species/shapeshifter/get_damage_mask(var/mob/living/carbon/human/H) + if(!H) return ..() + var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]] + return S.get_damage_mask(H) + +/datum/species/shapeshifter/get_damage_overlays(var/mob/living/carbon/human/H) + if(!H) return ..() + var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]] + return S.get_damage_overlays(H) + +/datum/species/shapeshifter/get_tail(var/mob/living/carbon/human/H) + if(!H) return ..() + var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]] + return S.get_tail(H) + +/datum/species/shapeshifter/get_tail_animation(var/mob/living/carbon/human/H) + if(!H) return ..() + var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]] + return S.get_tail_animation(H) + +/datum/species/shapeshifter/get_tail_hair(var/mob/living/carbon/human/H) + if(!H) return ..() + var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]] + return S.get_tail_hair(H) + +/datum/species/shapeshifter/handle_post_spawn(var/mob/living/carbon/human/H) + ..() + wrapped_species_by_ref["\ref[H]"] = default_form + if(monochromatic) + H.r_hair = H.r_skin + H.g_hair = H.g_skin + H.b_hair = H.b_skin + H.r_facial = H.r_skin + H.g_facial = H.g_skin + H.b_facial = H.b_skin + + for(var/obj/item/organ/external/E in H.organs) + E.sync_colour_to_human(H) + +// Verbs follow. +/mob/living/carbon/human/proc/shapeshifter_select_hair() + + set name = "Select Hair" + set category = "Abilities" + + if(stat || world.time < last_special) + return + + last_special = world.time + 10 + + var/list/valid_hairstyles = list() + var/list/valid_facialhairstyles = list() + for(var/hairstyle in hair_styles_list) + var/datum/sprite_accessory/S = hair_styles_list[hairstyle] + if(gender == MALE && S.gender == FEMALE) + continue + if(gender == FEMALE && S.gender == MALE) + continue + if(!(species.get_bodytype(src) in S.species_allowed)) + continue + valid_hairstyles += hairstyle + for(var/facialhairstyle in facial_hair_styles_list) + var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] + if(gender == MALE && S.gender == FEMALE) + continue + if(gender == FEMALE && S.gender == MALE) + continue + if(!(species.get_bodytype(src) in S.species_allowed)) + continue + valid_facialhairstyles += facialhairstyle + + + visible_message("\The [src]'s form contorts subtly.") + if(valid_hairstyles.len) + var/new_hair = input("Select a hairstyle.", "Shapeshifter Hair") as null|anything in valid_hairstyles + change_hair(new_hair ? new_hair : "Bald") + if(valid_facialhairstyles.len) + var/new_hair = input("Select a facial hair style.", "Shapeshifter Hair") as null|anything in valid_facialhairstyles + change_facial_hair(new_hair ? new_hair : "Shaved") + +/mob/living/carbon/human/proc/shapeshifter_select_gender() + + set name = "Select Gender" + set category = "Abilities" + + if(stat || world.time < last_special) + return + + last_special = world.time + 50 + + var/new_gender = input("Please select a gender.", "Shapeshifter Gender") as null|anything in list(FEMALE, MALE, NEUTER, PLURAL) + if(!new_gender) + return + + visible_message("\The [src]'s form contorts subtly.") + change_gender(new_gender) + +/mob/living/carbon/human/proc/shapeshifter_select_shape() + + set name = "Select Body Shape" + set category = "Abilities" + + if(stat || world.time < last_special) + return + + last_special = world.time + 50 + + var/new_species = input("Please select a species to emulate.", "Shapeshifter Body") as null|anything in species.get_valid_shapeshifter_forms(src) + if(!new_species || !all_species[new_species] || wrapped_species_by_ref["\ref[src]"] == new_species) + return + + wrapped_species_by_ref["\ref[src]"] = new_species + visible_message("\The [src] shifts and contorts, taking the form of \a [new_species]!") + regenerate_icons() + +/mob/living/carbon/human/proc/shapeshifter_select_colour() + + set name = "Select Body Colour" + set category = "Abilities" + + if(stat || world.time < last_special) + return + + last_special = world.time + 50 + + var/new_skin = input("Please select a new body color.", "Shapeshifter Colour") as color + if(!new_skin) + return + shapeshifter_set_colour(new_skin) + +/mob/living/carbon/human/proc/shapeshifter_set_colour(var/new_skin) + + r_skin = hex2num(copytext(new_skin, 2, 4)) + g_skin = hex2num(copytext(new_skin, 4, 6)) + b_skin = hex2num(copytext(new_skin, 6, 8)) + + var/datum/species/shapeshifter/S = species + if(S.monochromatic) + r_hair = r_skin + g_hair = g_skin + b_hair = b_skin + r_facial = r_skin + g_facial = g_skin + b_facial = b_skin + + for(var/obj/item/organ/external/E in organs) + E.sync_colour_to_human(src) + + regenerate_icons() 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 23970c61b27..bccafdde14e 100644 --- a/code/modules/mob/living/carbon/human/species/station/golem.dm +++ b/code/modules/mob/living/carbon/human/species/station/golem.dm @@ -8,7 +8,7 @@ language = "Sol Common" //todo? unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/punch) flags = NO_PAIN | NO_SCAN | NO_POISON | NO_MINOR_CUT - spawn_flags = IS_RESTRICTED + spawn_flags = SPECIES_IS_RESTRICTED siemens_coefficient = 0 breath_type = null @@ -23,6 +23,8 @@ death_message = "becomes completely motionless..." + genders = list(NEUTER) + /datum/species/golem/handle_post_spawn(var/mob/living/carbon/human/H) if(H.mind) H.mind.assigned_role = "Golem" 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 85890f4de6d..6074934cec2 100644 --- a/code/modules/mob/living/carbon/human/species/station/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/station/monkey.dm @@ -30,7 +30,7 @@ brute_mod = 1.5 burn_mod = 1.5 - spawn_flags = IS_RESTRICTED + spawn_flags = SPECIES_IS_RESTRICTED bump_flag = MONKEY swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL diff --git a/code/modules/mob/living/carbon/human/species/station/prometheans.dm b/code/modules/mob/living/carbon/human/species/station/prometheans.dm new file mode 100644 index 00000000000..2ada0dd7c71 --- /dev/null +++ b/code/modules/mob/living/carbon/human/species/station/prometheans.dm @@ -0,0 +1,188 @@ +var/datum/species/shapeshifter/promethean/prometheans + +// Species definition follows. +/datum/species/shapeshifter/promethean + + name = "Promethean" + name_plural = "Prometheans" + blurb = "What has Science done?" + show_ssd = "totally quiescent" + death_message = "rapidly loses cohesion, splattering across the ground..." + knockout_message = "collapses inwards, forming a disordered puddle of goo." + remains_type = /obj/effect/decal/cleanable/ash + + blood_color = "#05FF9B" + flesh_color = "#05FFFB" + + hunger_factor = DEFAULT_HUNGER_FACTOR //todo + reagent_tag = IS_SLIME + mob_size = MOB_SMALL + bump_flag = SLIME + swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL + push_flags = MONKEY|SLIME|SIMPLE_ANIMAL + flags = NO_SCAN | NO_SLIP | NO_MINOR_CUT + appearance_flags = HAS_SKIN_COLOR | HAS_EYE_COLOR | HAS_HAIR_COLOR | RADIATION_GLOWS + spawn_flags = SPECIES_IS_RESTRICTED + + breath_type = null + poison_type = null + + gluttonous = 2 + virus_immune = 1 + blood_volume = 600 + min_age = 1 + max_age = 5 + brute_mod = 0.5 + burn_mod = 2 + oxy_mod = 0 + total_health = 120 + + cold_level_1 = 260 + cold_level_2 = 200 + cold_level_3 = 120 + + heat_level_1 = 360 + heat_level_2 = 400 + heat_level_3 = 1000 + + body_temperature = 310.15 + + siemens_coefficient = -1 + rarity_value = 5 + + unarmed_types = list(/datum/unarmed_attack/slime_glomp) + has_organ = list(O_BRAIN = /obj/item/organ/internal/brain/slime) // Slime core. + has_limbs = list( + BP_TORSO = list("path" = /obj/item/organ/external/chest/unbreakable/slime), + BP_GROIN = list("path" = /obj/item/organ/external/groin/unbreakable/slime), + BP_HEAD = list("path" = /obj/item/organ/external/head/unbreakable/slime), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/unbreakable/slime), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/unbreakable/slime), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/unbreakable/slime), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/unbreakable/slime), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/unbreakable/slime), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/unbreakable/slime), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/unbreakable/slime), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/unbreakable/slime) + ) + heat_discomfort_strings = list("You feel too warm.") + cold_discomfort_strings = list("You feel too cool.") + + inherent_verbs = list( + /mob/living/carbon/human/proc/shapeshifter_select_shape, + /mob/living/carbon/human/proc/shapeshifter_select_colour, + /mob/living/carbon/human/proc/shapeshifter_select_hair, + /mob/living/carbon/human/proc/shapeshifter_select_gender + ) + + valid_transform_species = list("Human", "Unathi", "Tajara", "Skrell", "Diona", "Teshari", "Monkey") + monochromatic = 1 + + var/heal_rate = 5 // Temp. Regen per tick. + +/datum/species/shapeshifter/promethean/New() + ..() + prometheans = src + +/datum/species/shapeshifter/promethean/equip_survival_gear(var/mob/living/carbon/human/H) + var/boxtype = pick(typesof(/obj/item/weapon/storage/toolbox/lunchbox)) + var/obj/item/weapon/storage/toolbox/lunchbox/L = new boxtype(get_turf(H)) + var/mob/living/simple_animal/mouse/mouse = new (L) + var/obj/item/weapon/holder/holder = new (L) + mouse.forceMove(holder) + holder.sync(mouse) + if(H.backbag == 1) + H.equip_to_slot_or_del(L, slot_r_hand) + else + H.equip_to_slot_or_del(L, slot_in_backpack) + +/datum/species/shapeshifter/promethean/hug(var/mob/living/carbon/human/H,var/mob/living/target) + + var/t_him = "them" + switch(target.gender) + if(MALE) + t_him = "him" + if(FEMALE) + t_him = "her" + + H.visible_message("\The [H] glomps [target] to make [t_him] feel better!", \ + "You glomps [target] to make [t_him] feel better!") + H.apply_stored_shock_to(target) + +/datum/species/shapeshifter/promethean/handle_death(var/mob/living/carbon/human/H) + spawn(1) + if(H) + H.gib() + +/datum/species/shapeshifter/promethean/handle_environment_special(var/mob/living/carbon/human/H) + + var/turf/T = H.loc + if(istype(T)) + var/obj/effect/decal/cleanable/C = locate() in T + if(C) + qdel(C) + //TODO: gain nutriment + + // Regenerate limbs and heal damage if we have any. Copied from Bay xenos code. + + // Theoretically the only internal organ a slime will have + // is the slime core. but we might as well be thorough. + for(var/obj/item/organ/I in H.internal_organs) + if(I.damage > 0) + I.damage = max(I.damage - heal_rate, 0) + if (prob(5)) + H << "You feel a soothing sensation within your [I.name]..." + return 1 + + // Replace completely missing limbs. + for(var/limb_type in has_limbs) + var/obj/item/organ/external/E = H.organs_by_name[limb_type] + if(E && (E.is_stump() || (E.status & (ORGAN_DESTROYED|ORGAN_DEAD|ORGAN_MUTATED)))) + E.removed() + qdel(E) + E = null + if(!E) + var/list/organ_data = has_limbs[limb_type] + var/limb_path = organ_data["path"] + var/obj/item/organ/O = new limb_path(H) + organ_data["descriptor"] = O.name + H << "You feel a slithering sensation as your [O.name] reforms." + H.update_body() + return 1 + + // Heal remaining damage. + if (H.getBruteLoss() || H.getFireLoss() || H.getOxyLoss() || H.getToxLoss()) + H.adjustBruteLoss(-heal_rate) + H.adjustFireLoss(-heal_rate) + H.adjustOxyLoss(-heal_rate) + H.adjustToxLoss(-heal_rate) + return 1 + +/datum/species/shapeshifter/promethean/get_blood_colour(var/mob/living/carbon/human/H) + return (H ? rgb(H.r_skin, H.g_skin, H.b_skin) : ..()) + +/datum/species/shapeshifter/promethean/get_flesh_colour(var/mob/living/carbon/human/H) + return (H ? rgb(H.r_skin, H.g_skin, H.b_skin) : ..()) + +/datum/species/shapeshifter/promethean/get_additional_examine_text(var/mob/living/carbon/human/H) + + if(!stored_shock_by_ref["\ref[H]"]) + return + + var/t_she = "She is" + if(H.gender == MALE) + t_she = "He is" + else if(H.gender == PLURAL) + t_she = "They are" + else if(H.gender == NEUTER) + t_she = "It is" + + switch(stored_shock_by_ref["\ref[H]"]) + if(1 to 10) + return "[t_she] flickering gently with a little electrical activity." + if(11 to 20) + return "[t_she] glowing gently with moderate levels of electrical activity.\n" + if(21 to 35) + return "[t_she] glowing brightly with high levels of electrical activity." + if(35 to INFINITY) + return "[t_she] radiating massive levels of electrical activity!" 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 2f931a38f70..27541c27733 100644 --- a/code/modules/mob/living/carbon/human/species/station/seromi.dm +++ b/code/modules/mob/living/carbon/human/species/station/seromi.dm @@ -36,7 +36,7 @@ blood_volume = 400 hunger_factor = 0.2 - spawn_flags = CAN_JOIN | IS_WHITELISTED + spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_COLOR | HAS_EYE_COLOR bump_flag = MONKEY swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL diff --git a/code/modules/mob/living/carbon/human/species/station/slime.dm b/code/modules/mob/living/carbon/human/species/station/slime.dm deleted file mode 100644 index f2277f99211..00000000000 --- a/code/modules/mob/living/carbon/human/species/station/slime.dm +++ /dev/null @@ -1,50 +0,0 @@ -/datum/species/slime - name = "Slime" - name_plural = "slimes" - mob_size = MOB_SMALL - - icobase = 'icons/mob/human_races/r_slime.dmi' - deform = 'icons/mob/human_races/r_slime.dmi' - - language = null //todo? - unarmed_types = list(/datum/unarmed_attack/slime_glomp) - flags = NO_SCAN | NO_SLIP | NO_MINOR_CUT - spawn_flags = IS_RESTRICTED - siemens_coefficient = 3 //conductive - darksight = 3 - - blood_color = "#05FF9B" - flesh_color = "#05FFFB" - - remains_type = /obj/effect/decal/cleanable/ash - death_message = "rapidly loses cohesion, splattering across the ground..." - - has_organ = list( - "brain" = /obj/item/organ/internal/brain/slime - ) - - breath_type = null - poison_type = null - - bump_flag = SLIME - swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL - push_flags = MONKEY|SLIME|SIMPLE_ANIMAL - - has_limbs = list( - BP_TORSO = list("path" = /obj/item/organ/external/chest/unbreakable), - BP_GROIN = list("path" = /obj/item/organ/external/groin/unbreakable), - BP_HEAD = list("path" = /obj/item/organ/external/head/unbreakable), - BP_L_ARM = list("path" = /obj/item/organ/external/arm/unbreakable), - BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/unbreakable), - BP_L_LEG = list("path" = /obj/item/organ/external/leg/unbreakable), - BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/unbreakable), - BP_L_HAND = list("path" = /obj/item/organ/external/hand/unbreakable), - BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/unbreakable), - BP_L_FOOT = list("path" = /obj/item/organ/external/foot/unbreakable), - BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/unbreakable) - ) - -/datum/species/slime/handle_death(var/mob/living/carbon/human/H) - spawn(1) - if(H) - H.gib() 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 28a28f8d7be..a903433fdad 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -14,10 +14,10 @@ min_age = 17 max_age = 110 - spawn_flags = CAN_JOIN + spawn_flags = SPECIES_CAN_JOIN appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR -/datum/species/human/get_bodytype() +/datum/species/human/get_bodytype(var/mob/living/carbon/human/H) return "Human" /datum/species/unathi @@ -54,7 +54,7 @@ heat_level_2 = 480 //Default 400 heat_level_3 = 1100 //Default 1000 - spawn_flags = CAN_JOIN | IS_WHITELISTED + spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flesh_color = "#34AF10" @@ -116,7 +116,7 @@ primitive_form = "Farwa" - spawn_flags = CAN_JOIN | IS_WHITELISTED + spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flesh_color = "#AFA59E" @@ -150,12 +150,12 @@ the secrets of their empire to their allies." num_alternate_languages = 2 secondary_langs = list("Skrellian", "Schechi") - name_language = null + name_language = "Skrellian" min_age = 19 max_age = 80 - spawn_flags = CAN_JOIN | IS_WHITELISTED + spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR flesh_color = "#8CD7A3" @@ -246,13 +246,14 @@ body_temperature = T0C + 15 //make the plant people have a bit lower body temperature, why not flags = NO_SCAN | IS_PLANT | NO_PAIN | NO_SLIP | NO_MINOR_CUT - spawn_flags = CAN_JOIN | IS_WHITELISTED + spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED blood_color = "#004400" flesh_color = "#907E4A" reagent_tag = IS_DIONA + genders = list(PLURAL) /datum/species/diona/can_understand(var/mob/other) var/mob/living/carbon/alien/diona/D = other if(istype(D)) diff --git a/code/modules/mob/living/carbon/human/stripping.dm b/code/modules/mob/living/carbon/human/stripping.dm index 8e116f443a9..19d7a799dd9 100644 --- a/code/modules/mob/living/carbon/human/stripping.dm +++ b/code/modules/mob/living/carbon/human/stripping.dm @@ -13,22 +13,22 @@ // Handle things that are part of this interface but not removing/replacing a given item. if("pockets") visible_message("\The [user] is trying to empty \the [src]'s pockets!") - if(do_after(user,HUMAN_STRIP_DELAY)) + if(do_after(user,HUMAN_STRIP_DELAY,src)) empty_pockets(user) return if("splints") visible_message("\The [user] is trying to remove \the [src]'s splints!") - if(do_after(user,HUMAN_STRIP_DELAY)) + if(do_after(user,HUMAN_STRIP_DELAY,src)) remove_splints(user) return if("sensors") visible_message("\The [user] is trying to set \the [src]'s sensors!") - if(do_after(user,HUMAN_STRIP_DELAY)) + if(do_after(user,HUMAN_STRIP_DELAY,src)) toggle_sensors(user) return if("internals") visible_message("\The [usr] is trying to set \the [src]'s internals!") - if(do_after(user,HUMAN_STRIP_DELAY)) + if(do_after(user,HUMAN_STRIP_DELAY,src)) toggle_internals(user) return if("tie") @@ -40,7 +40,7 @@ return visible_message("\The [usr] is trying to remove \the [src]'s [A.name]!") - if(!do_after(user,HUMAN_STRIP_DELAY)) + if(!do_after(user,HUMAN_STRIP_DELAY,src)) return if(!A || suit.loc != src || !(A in suit.accessories)) @@ -74,7 +74,7 @@ else visible_message("\The [user] is trying to put \a [held] on \the [src]!") - if(!do_after(user,HUMAN_STRIP_DELAY)) + if(!do_after(user,HUMAN_STRIP_DELAY,src)) return if(!stripping && user.get_active_hand() != held) @@ -82,8 +82,8 @@ if(stripping) admin_attack_log(user, src, "Attempted to remove \a [target_slot]", "Target of an attempt to remove \a [target_slot].", "attempted to remove \a [target_slot] from") - removeItem(target_slot) - else if(user.removeItem(held)) + unEquip(target_slot) + else if(user.unEquip(held)) equip_to_slot_if_possible(held, text2num(slot_to_strip), 0, 1, 1) if(held.loc != src) user.put_in_hands(held) @@ -94,9 +94,9 @@ user << "\The [src] has nothing in their pockets." return if(r_store) - removeItem(r_store) + unEquip(r_store) if(l_store) - removeItem(l_store) + unEquip(l_store) visible_message("\The [user] empties \the [src]'s pockets!") // Modify the current target sensor level. diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index ef4ed66599a..088c796f289 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -174,9 +174,6 @@ var/global/list/damage_icon_parts = list() for(var/obj/item/organ/external/O in organs) if(O.is_stump()) continue - //if(O.status & ORGAN_DESTROYED) damage_appearance += "d" //what is this? - //else - // damage_appearance += O.damage_state damage_appearance += O.damage_state if(damage_appearance == previous_damage_appearance) @@ -194,15 +191,14 @@ var/global/list/damage_icon_parts = list() if(O.is_stump()) continue - O.update_icon() if(O.damage_state == "00") continue var/icon/DI - var/cache_index = "[O.damage_state]/[O.icon_name]/[species.blood_color]/[species.get_bodytype()]" + 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.damage_overlays, O.damage_state) // the damage icon for whole human - DI.Blend(new /icon(species.damage_mask, O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels - DI.Blend(species.blood_color, ICON_MULTIPLY) + 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.Blend(species.get_blood_colour(src), ICON_MULTIPLY) damage_icon_parts[cache_index] = DI else DI = damage_icon_parts[cache_index] @@ -236,7 +232,7 @@ var/global/list/damage_icon_parts = list() if(gender == FEMALE) g = "female" - var/icon_key = "[species.race_key][g][s_tone][r_skin][g_skin][b_skin]" + var/icon_key = "[species.get_race_key(src)][g][s_tone][r_skin][g_skin][b_skin]" if(lip_style) icon_key += "[lip_style]" else @@ -251,14 +247,14 @@ var/global/list/damage_icon_parts = list() var/obj/item/organ/external/part = organs_by_name[organ_tag] if(isnull(part) || part.is_stump()) icon_key += "0" - else if(part.status & ORGAN_ROBOT) + else if(part.robotic >= ORGAN_ROBOT) icon_key += "2[part.model ? "-[part.model]": ""]" else if(part.status & ORGAN_DEAD) icon_key += "3" else icon_key += "1" if(part) - icon_key += "[part.species.race_key]" + icon_key += "[part.species.get_race_key(part.owner)]" icon_key += "[part.dna.GetUIState(DNA_UI_GENDER)]" icon_key += "[part.dna.GetUIValue(DNA_UI_SKIN_TONE)]" if(part.s_col && part.s_col.len >= 3) @@ -357,7 +353,7 @@ var/global/list/damage_icon_parts = list() 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() in facial_hair_style.species_allowed)) + 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_ADD) @@ -366,13 +362,16 @@ var/global/list/damage_icon_parts = list() if(h_style && !(head && (head.flags_inv & BLOCKHEADHAIR))) var/datum/sprite_accessory/hair_style = hair_styles_list[h_style] - if(hair_style && (src.species.get_bodytype() in hair_style.species_allowed)) + if(hair_style && (src.species.get_bodytype(src) in hair_style.species_allowed)) var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s") if(hair_style.do_colouration) hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD) face_standing.Blend(hair_s, ICON_OVERLAY) + if(head_organ.nonsolid) + face_standing += rgb(,,,120) + overlays_standing[HAIR_LAYER] = image(face_standing) if(update_icons) update_icons() @@ -464,8 +463,8 @@ var/global/list/damage_icon_parts = list() 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()]) - under_icon = w_uniform.sprite_sheets[species.get_bodytype()] + 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 @@ -486,7 +485,7 @@ var/global/list/damage_icon_parts = list() //apply blood overlay if(w_uniform.blood_DNA) - var/image/bloodsies = image(icon = species.blood_mask, icon_state = "uniformblood") + var/image/bloodsies = image(icon = species.get_blood_mask(src), icon_state = "uniformblood") bloodsies.color = w_uniform.blood_color standing.overlays += bloodsies @@ -500,6 +499,9 @@ var/global/list/damage_icon_parts = list() else overlays_standing[UNIFORM_LAYER] = null + //hiding/revealing shoes if necessary + update_inv_shoes(0) + if(update_icons) update_icons() @@ -510,8 +512,8 @@ var/global/list/damage_icon_parts = list() 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()]) - standing = image("icon" = wear_id.sprite_sheets[species.get_bodytype()], "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 @@ -533,13 +535,13 @@ var/global/list/damage_icon_parts = list() 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()]) - standing = image("icon" = gloves.sprite_sheets[species.get_bodytype()], "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.blood_DNA) - var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "bloodyhands") + 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 @@ -547,7 +549,7 @@ var/global/list/damage_icon_parts = list() overlays_standing[GLOVES_LAYER] = standing else if(blood_DNA) - var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "bloodyhands") + var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "bloodyhands") bloodsies.color = hand_blood_color overlays_standing[GLOVES_LAYER] = bloodsies else @@ -557,13 +559,15 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/update_inv_glasses(var/update_icons=1) if(glasses) - + var/image/standing if(glasses.icon_override) - overlays_standing[GLASSES_LAYER] = image("icon" = glasses.icon_override, "icon_state" = "[glasses.icon_state]") - else if(glasses.sprite_sheets && glasses.sprite_sheets[species.get_bodytype()]) - overlays_standing[GLASSES_LAYER]= image("icon" = glasses.sprite_sheets[species.get_bodytype()], "icon_state" = "[glasses.icon_state]") + 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 - overlays_standing[GLASSES_LAYER]= image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]") + standing = image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]") + standing.color = glasses.color + overlays_standing[GLASSES_LAYER] = standing else overlays_standing[GLASSES_LAYER] = null @@ -576,54 +580,63 @@ var/global/list/damage_icon_parts = list() return if(l_ear || r_ear) - if(l_ear) + // Blank image upon which to layer left & right overlays. + var/image/both = image("icon" = 'icons/effects/effects.dmi', "icon_state" = "nothing") + if(l_ear) + var/image/standing var/t_type = l_ear.icon_state if(l_ear.icon_override) t_type = "[t_type]_l" - overlays_standing[EARS_LAYER] = image("icon" = l_ear.icon_override, "icon_state" = "[t_type]") - else if(l_ear.sprite_sheets && l_ear.sprite_sheets[species.get_bodytype()]) + 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" - overlays_standing[EARS_LAYER] = image("icon" = l_ear.sprite_sheets[species.get_bodytype()], "icon_state" = "[t_type]") + standing = image("icon" = l_ear.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[t_type]") else - overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]") - + standing = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]") + standing.color = l_ear.color + both.overlays += standing + if(r_ear) - + var/image/standing var/t_type = r_ear.icon_state if(r_ear.icon_override) t_type = "[t_type]_r" - overlays_standing[EARS_LAYER] = image("icon" = r_ear.icon_override, "icon_state" = "[t_type]") - else if(r_ear.sprite_sheets && r_ear.sprite_sheets[species.get_bodytype()]) + 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" - overlays_standing[EARS_LAYER] = image("icon" = r_ear.sprite_sheets[species.get_bodytype()], "icon_state" = "[t_type]") + standing = image("icon" = r_ear.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[t_type]") else - overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]") + standing = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]") + standing.color = r_ear.color + both.overlays += standing + + overlays_standing[EARS_LAYER] = both else overlays_standing[EARS_LAYER] = null if(update_icons) update_icons() /mob/living/carbon/human/update_inv_shoes(var/update_icons=1) - if(shoes && !(wear_suit && wear_suit.flags_inv & HIDESHOES)) + if(shoes && !((wear_suit && wear_suit.flags_inv & HIDESHOES) || (w_uniform && w_uniform.flags_inv & HIDESHOES))) 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()]) - standing = image("icon" = shoes.sprite_sheets[species.get_bodytype()], "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.blood_DNA) - var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "shoeblood") + var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "shoeblood") bloodsies.color = shoes.blood_color standing.overlays += bloodsies standing.color = shoes.color overlays_standing[SHOES_LAYER] = standing else if(feet_blood_DNA) - var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "shoeblood") + var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "shoeblood") bloodsies.color = feet_blood_color overlays_standing[SHOES_LAYER] = bloodsies else @@ -649,8 +662,8 @@ var/global/list/damage_icon_parts = list() var/t_icon if(head.icon_override) t_icon = head.icon_override - else if(head.sprite_sheets && head.sprite_sheets[species.get_bodytype()]) - t_icon = head.sprite_sheets[species.get_bodytype()] + else if(head.sprite_sheets && head.sprite_sheets[species.get_bodytype(src)]) + t_icon = head.sprite_sheets[species.get_bodytype(src)] else if(head.item_icons && (slot_head_str in head.item_icons)) t_icon = head.item_icons[slot_head_str] @@ -675,13 +688,13 @@ var/global/list/damage_icon_parts = list() var/image/standing = image(icon = t_icon, icon_state = t_state) if(head.blood_DNA) - var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "helmetblood") + 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()]" + 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] @@ -701,8 +714,8 @@ var/global/list/damage_icon_parts = list() if(belt.icon_override) standing.icon = belt.icon_override - else if(belt.sprite_sheets && belt.sprite_sheets[species.get_bodytype()]) - standing.icon = belt.sprite_sheets[species.get_bodytype()] + 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' @@ -739,7 +752,7 @@ var/global/list/damage_icon_parts = list() var/t_icon = INV_SUIT_DEF_ICON if(wear_suit.icon_override) t_icon = wear_suit.icon_override - else if(wear_suit.sprite_sheets && wear_suit.sprite_sheets[species.get_bodytype()]) + else if(wear_suit.sprite_sheets && wear_suit.sprite_sheets[species.get_bodytype(src)]) t_icon = wear_suit.sprite_sheets[species.name] else if(wear_suit.item_icons && wear_suit.item_icons[slot_wear_suit_str]) t_icon = wear_suit.item_icons[slot_wear_suit_str] @@ -748,27 +761,35 @@ var/global/list/damage_icon_parts = list() standing.color = wear_suit.color if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) ) - removeItem(handcuffed, force = 1) + 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.blood_mask, "icon_state" = "[S.blood_overlay_type]blood") + 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 update_tail_showing(0) else overlays_standing[SUIT_LAYER] = null update_tail_showing(0) - update_inv_shoes(0) update_collar(0) + //hide/show shoes if necessary + update_inv_shoes(0) + if(update_icons) update_icons() /mob/living/carbon/human/update_inv_pockets(var/update_icons=1) @@ -784,14 +805,14 @@ var/global/list/damage_icon_parts = list() 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()]) - standing = image("icon" = wear_mask.sprite_sheets[species.get_bodytype()], "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]") standing.color = wear_mask.color if( !istype(wear_mask, /obj/item/clothing/mask/smokable/cigarette) && wear_mask.blood_DNA ) - var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "maskblood") + 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 @@ -812,8 +833,8 @@ var/global/list/damage_icon_parts = list() //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()]) - overlay_icon = back.sprite_sheets[species.get_bodytype()] + 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 @@ -857,8 +878,8 @@ var/global/list/damage_icon_parts = list() 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()]) - standing = image("icon" = handcuffed.sprite_sheets[species.get_bodytype()], "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 @@ -873,8 +894,8 @@ var/global/list/damage_icon_parts = list() 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()]) - standing = image("icon" = legcuffed.sprite_sheets[species.get_bodytype()], "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 @@ -963,24 +984,29 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1) overlays_standing[TAIL_LAYER] = null - if(species.tail && !(wear_suit && wear_suit.flags_inv & HIDETAIL)) + var/species_tail = species.get_tail(src) + + 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") + overlays_standing[TAIL_LAYER] = image(tail_s, icon_state = "[species_tail]_s") animate_tail_reset(0) if(update_icons) update_icons() /mob/living/carbon/human/proc/get_tail_icon() - var/icon_key = "[species.race_key][r_skin][g_skin][b_skin][r_hair][g_hair][b_hair]" + 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 - tail_icon = new/icon(icon = (species.tail_animation? species.tail_animation : 'icons/effects/species.dmi')) + var/species_tail_anim = species.get_tail_animation(src) + if(!species_tail_anim) species_tail_anim = 'icons/effects/species.dmi' + tail_icon = new/icon(species_tail_anim) tail_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD) // The following will not work with animated tails. - if(species.tail_hair) - var/icon/hair_icon = icon('icons/effects/species.dmi', "[species.tail]_[species.tail_hair]") + 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_ADD) tail_icon.Blend(hair_icon, ICON_OVERLAY) tail_icon_cache[icon_key] = tail_icon @@ -991,7 +1017,7 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/proc/set_tail_state(var/t_state) var/image/tail_overlay = overlays_standing[TAIL_LAYER] - if(tail_overlay && species.tail_animation) + if(tail_overlay && species.get_tail_animation(src)) tail_overlay.icon_state = t_state return tail_overlay return null @@ -999,7 +1025,7 @@ var/global/list/damage_icon_parts = list() //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) - var/t_state = "[species.tail]_once" + var/t_state = "[species.get_tail(src)]_once" var/image/tail_overlay = overlays_standing[TAIL_LAYER] if(tail_overlay && tail_overlay.icon_state == t_state) @@ -1016,29 +1042,28 @@ var/global/list/damage_icon_parts = list() update_icons() /mob/living/carbon/human/proc/animate_tail_start(var/update_icons=1) - set_tail_state("[species.tail]_slow[rand(0,9)]") + set_tail_state("[species.get_tail(src)]_slow[rand(0,9)]") if(update_icons) update_icons() /mob/living/carbon/human/proc/animate_tail_fast(var/update_icons=1) - set_tail_state("[species.tail]_loop[rand(0,9)]") + set_tail_state("[species.get_tail(src)]_loop[rand(0,9)]") if(update_icons) update_icons() /mob/living/carbon/human/proc/animate_tail_reset(var/update_icons=1) if(stat != DEAD) - set_tail_state("[species.tail]_idle[rand(0,9)]") + set_tail_state("[species.get_tail(src)]_idle[rand(0,9)]") else - set_tail_state("[species.tail]_static") - + set_tail_state("[species.get_tail(src)]_static") if(update_icons) update_icons() /mob/living/carbon/human/proc/animate_tail_stop(var/update_icons=1) - set_tail_state("[species.tail]_static") + set_tail_state("[species.get_tail(src)]_static") if(update_icons) update_icons() diff --git a/code/modules/mob/living/carbon/human/whisper.dm b/code/modules/mob/living/carbon/human/whisper.dm deleted file mode 100644 index 157310291a4..00000000000 --- a/code/modules/mob/living/carbon/human/whisper.dm +++ /dev/null @@ -1,161 +0,0 @@ -//Lallander was here -/mob/living/carbon/human/whisper(message as text) - var/alt_name = "" - - if(say_disabled) //This is here to try to identify lag problems - usr << "\red Speech is currently admin-disabled." - return - - message = sanitize(message) - log_whisper("[src.name]/[src.key] : [message]") - - if (src.client) - if (src.client.prefs.muted & MUTE_IC) - src << "\red You cannot whisper (muted)." - return - - if (src.client.handle_spam_prevention(message,MUTE_IC)) - return - - if (src.stat == 2) - return src.say_dead(message) - - if (src.stat) - return - - if(name != GetVoice()) - alt_name = "(as [get_id_name("Unknown")])" - - //parse the language code and consume it - var/datum/language/speaking = parse_language(message) - if (speaking) - message = copytext(message,2+length(speaking.key)) - - whisper_say(message, speaking, alt_name) - - -//This is used by both the whisper verb and human/say() to handle whispering -/mob/living/carbon/human/proc/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers") - - if (is_muzzled()) - src << "You're muzzled and cannot speak!" - return - - var/message_range = 1 - var/eavesdropping_range = 2 - var/watching_range = 5 - var/italics = 1 - - var/not_heard //the message displayed to people who could not hear the whispering - if (speaking) - if (speaking.whisper_verb) - verb = speaking.whisper_verb - not_heard = "[verb] something" - else - var/adverb = pick("quietly", "softly") - verb = "[speaking.speech_verb] [adverb]" - not_heard = "[speaking.speech_verb] something [adverb]" - else - not_heard = "[verb] something" //TODO get rid of the null language and just prevent speech if language is null - - message = capitalize(trim(message)) - - if(speech_problem_flag) - var/list/handle_r = handle_speech_problems(message) - message = handle_r[1] - verb = handle_r[2] - if(verb == "yells loudly") - verb = "slurs emphatically" - else - var/adverb = pick("quietly", "softly") - verb = "[verb] [adverb]" - - speech_problem_flag = handle_r[3] - - if(!message || message=="") - return - - //looks like this only appears in whisper. Should it be elsewhere as well? Maybe handle_speech_problems? - var/voice_sub - if(istype(back,/obj/item/weapon/rig)) - var/obj/item/weapon/rig/rig = back - // todo: fix this shit - if(rig.speech && rig.speech.voice_holder && rig.speech.voice_holder.active && rig.speech.voice_holder.voice) - voice_sub = rig.speech.voice_holder.voice - else - for(var/obj/item/gear in list(wear_mask,wear_suit,head)) - if(!gear) - continue - var/obj/item/voice_changer/changer = locate() in gear - if(changer && changer.active && changer.voice) - voice_sub = changer.voice - - if(voice_sub == "Unknown") - if(copytext(message, 1, 2) != "*") - var/list/temp_message = splittext(message, " ") - var/list/pick_list = list() - for(var/i = 1, i <= temp_message.len, i++) - pick_list += i - for(var/i=1, i <= abs(temp_message.len/3), i++) - var/H = pick(pick_list) - if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue - temp_message[H] = ninjaspeak(temp_message[H]) - pick_list -= H - message = jointext(temp_message, " ") - message = replacetext(message, "o", "¤") - message = replacetext(message, "p", "þ") - message = replacetext(message, "l", "£") - message = replacetext(message, "s", "§") - message = replacetext(message, "u", "µ") - message = replacetext(message, "b", "ß") - - var/list/listening = hearers(message_range, src) - listening |= src - - //ghosts - for (var/mob/M in dead_mob_list) //does this include players who joined as observers as well? - if (!(M.client)) - continue - if(M.stat == DEAD && M.is_preference_enabled(/datum/client_preference/ghost_ears)) - listening |= M - - //Pass whispers on to anything inside the immediate listeners. - for(var/mob/L in listening) - for(var/mob/C in L.contents) - if(istype(C,/mob/living)) - listening += C - - //pass on the message to objects that can hear us. - for (var/obj/O in view(message_range, src)) - spawn (0) - if (O) - O.hear_talk(src, message, verb, speaking) - - var/list/eavesdropping = hearers(eavesdropping_range, src) - eavesdropping -= src - eavesdropping -= listening - - var/list/watching = hearers(watching_range, src) - watching -= src - watching -= listening - watching -= eavesdropping - - //now mobs - var/speech_bubble_test = say_test(message) - var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]") - spawn(30) qdel(speech_bubble) - - for(var/mob/M in listening) - M << speech_bubble - M.hear_say(message, verb, speaking, alt_name, italics, src) - - if (eavesdropping.len) - var/new_message = stars(message) //hopefully passing the message twice through stars() won't hurt... I guess if you already don't understand the language, when they speak it too quietly to hear normally you would be able to catch even less. - for(var/mob/M in eavesdropping) - M << speech_bubble - M.hear_say(new_message, verb, speaking, alt_name, italics, src) - - if (watching.len) - var/rendered = "[src.name] [not_heard]." - for (var/mob/M in watching) - M.show_message(rendered, 2) diff --git a/code/modules/mob/living/carbon/metroid/emote.dm b/code/modules/mob/living/carbon/metroid/emote.dm index a6ea5498cde..d82372e52ff 100644 --- a/code/modules/mob/living/carbon/metroid/emote.dm +++ b/code/modules/mob/living/carbon/metroid/emote.dm @@ -18,8 +18,6 @@ if (client.prefs.muted & MUTE_IC) src << "\red You cannot send IC messages (muted)." return - if (src.client.handle_spam_prevention(message,MUTE_IC)) - return if (stat) return if(!(message)) diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index 7db2bcf5c85..69ddb590380 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -217,7 +217,7 @@ if(istype(L, /mob/living/carbon/human) && dna) //Ignore slime(wo)men var/mob/living/carbon/human/H = L - if(H.species.name == "Slime") + if(H.species.name == "Promethean") continue if(!L.canmove) // Only one slime can latch on at a time. diff --git a/code/modules/mob/living/carbon/metroid/say.dm b/code/modules/mob/living/carbon/metroid/say.dm index cd07f6bf3b6..7c7ad762403 100644 --- a/code/modules/mob/living/carbon/metroid/say.dm +++ b/code/modules/mob/living/carbon/metroid/say.dm @@ -31,7 +31,7 @@ speech_buffer.Add(lowertext(html_decode(message))) ..() -/mob/living/carbon/slime/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0, var/vname ="") +/mob/living/carbon/slime/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/part_c, var/mob/speaker = null, var/hard_to_hear = 0, var/vname ="") if (speaker in Friends) speech_buffer = list() speech_buffer.Add(speaker) diff --git a/code/modules/mob/living/carbon/resist.dm b/code/modules/mob/living/carbon/resist.dm index 06501b92b0e..8b6f7227187 100644 --- a/code/modules/mob/living/carbon/resist.dm +++ b/code/modules/mob/living/carbon/resist.dm @@ -66,7 +66,7 @@ "\The [src] manages to remove \the [handcuffed]!", "You successfully remove \the [handcuffed]." ) - removeItem(handcuffed) + drop_from_inventory(handcuffed) /mob/living/carbon/proc/escape_legcuffs() if(!canClick()) @@ -101,7 +101,7 @@ "You successfully remove \the [legcuffed]." ) - removeItem(legcuffed) + drop_from_inventory(legcuffed) legcuffed = null update_inv_legcuffed() diff --git a/code/modules/mob/living/inventory.dm b/code/modules/mob/living/inventory.dm index 76c9a5f8d0a..c1aa244d550 100644 --- a/code/modules/mob/living/inventory.dm +++ b/code/modules/mob/living/inventory.dm @@ -38,11 +38,11 @@ //Drops the item in our left hand /mob/living/drop_l_hand(var/atom/Target) - return removeItem(l_hand, Target) + return drop_from_inventory(l_hand, Target) //Drops the item in our right hand /mob/living/drop_r_hand(var/atom/Target) - return removeItem(r_hand, Target) + return drop_from_inventory(r_hand, Target) /mob/living/proc/hands_are_full() return (r_hand && l_hand) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index c3162b030cd..111604848ad 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -53,8 +53,7 @@ update_canmove() - if(client) - handle_regular_hud_updates() + handle_regular_hud_updates() /mob/living/proc/handle_breathing() return @@ -146,7 +145,7 @@ /mob/living/proc/handle_disabilities() //Eyes - if(disabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own + if(sdisabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own eye_blind = max(eye_blind, 1) else if(eye_blind) //blindness, heals slowly over time eye_blind = max(eye_blind-1,0) @@ -154,7 +153,7 @@ eye_blurry = max(eye_blurry-1, 0) //Ears - if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own + if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own setEarDamage(-1, max(ear_deaf, 1)) else // deafness heals slowly over time, unless ear_damage is over 100 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index a3e2eae1897..9101092edaf 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -129,6 +129,7 @@ default behaviour is: playsound(loc, "punch", 25, 1, -1) visible_message("[src] [pick("ran", "slammed")] into \the [AM]!") src.apply_damage(5, BRUTE) + src << ("You just [pick("ran", "slammed")] into \the [AM]!") return if (!now_pushing) now_pushing = 1 @@ -393,11 +394,11 @@ default behaviour is: var/mob/living/carbon/C = src if (C.handcuffed && !initial(C.handcuffed)) - C.removeItem(C.handcuffed) + C.drop_from_inventory(C.handcuffed) C.handcuffed = initial(C.handcuffed) if (C.legcuffed && !initial(C.legcuffed)) - C.removeItem(C.legcuffed) + C.drop_from_inventory(C.legcuffed) C.legcuffed = initial(C.legcuffed) BITSET(hud_updateflag, HEALTH_HUD) BITSET(hud_updateflag, STATUS_HUD) @@ -566,7 +567,7 @@ default behaviour is: set name = "Resist" set category = "IC" - if(!stat && canClick()) + if(!incapacitated(INCAPACITATION_KNOCKOUT) && canClick()) setClickCooldown(20) resist_grab() if(!weakened) @@ -595,7 +596,7 @@ default behaviour is: var/mob/M = H.loc //Get our mob holder (if any). if(istype(M)) - M.removeItem(H) + M.drop_from_inventory(H) M << "\The [H] wriggles out of your grip!" src << "You wriggle out of \the [M]'s grip!" @@ -631,7 +632,9 @@ default behaviour is: if(GRAB_PASSIVE) qdel(G) if(GRAB_AGGRESSIVE) - if(prob(60)) //same chance of breaking the grab as disarm + //Not standing up makes it much harder to break, so it is easier to cuff someone who is down without forcing them into unconsciousness. + //Otherwise, it's the same chance of breaking the grab as disarm. + if(incapacitated(INCAPACITATION_KNOCKDOWN)? prob(15) : prob(60)) visible_message("[src] has broken free of [G.assailant]'s grip!") qdel(G) if(GRAB_NECK) @@ -771,10 +774,10 @@ default behaviour is: /mob/living/proc/slip(var/slipped_on,stun_duration=8) return 0 -/mob/living/carbon/removeItem(var/obj/item/I, var/atom/T = loc, var/force = 0) - if(I in src.internal_organs) - return 0 - return ..() +/mob/living/carbon/drop_from_inventory(var/obj/item/W, var/atom/Target = null) + if(W in internal_organs) + return + ..() /mob/living/touch_map_edge() @@ -862,7 +865,7 @@ default behaviour is: else if(istype(buckled, /obj/vehicle)) var/obj/vehicle/V = buckled - if(cannot_stand()) + if(is_physically_disabled()) lying = 0 canmove = 1 pixel_y = V.mob_offset_y - 5 @@ -880,23 +883,18 @@ default behaviour is: anchored = 0 canmove = 1 - else if(cannot_stand()) - lying = 1 - canmove = 0 - else if(stunned) - canmove = 0 else if(captured) anchored = 1 canmove = 0 lying = 0 else - lying = 0 - canmove = 1 + lying = incapacitated(INCAPACITATION_KNOCKDOWN) + canmove = !incapacitated(INCAPACITATION_DISABLED) if(lying) density = 0 - if(l_hand) removeItem(l_hand) - if(r_hand) removeItem(r_hand) + if(l_hand) unEquip(l_hand) + if(r_hand) unEquip(r_hand) else density = initial(density) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 54af2697ecd..ab26507a2a9 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -82,27 +82,31 @@ proc/get_radio_key_from_channel(var/channel) /mob/living/proc/get_default_language() return default_language -/mob/living/proc/handle_speech_problems(var/message, var/verb) - var/list/returns[3] - var/speech_problem_flag = 0 +//Takes a list of the form list(message, verb, whispering) and modifies it as needed +//Returns 1 if a speech problem was applied, 0 otherwise +/mob/living/proc/handle_speech_problems(var/list/message_data) + var/message = message_data[1] + var/verb = message_data[2] + var/whispering = message_data[3] + . = 0 if((HULK in mutations) && health >= 25 && length(message)) message = "[uppertext(message)]!!!" verb = pick("yells","roars","hollers") - speech_problem_flag = 1 + whispering = 0 + . = 1 if(slurring) message = slur(message) verb = pick("slobbers","slurs") - speech_problem_flag = 1 + . = 1 if(stuttering) message = stutter(message) verb = pick("stammers","stutters") - speech_problem_flag = 1 + . = 1 - returns[1] = message - returns[2] = verb - returns[3] = speech_problem_flag - return returns + message_data[1] = message + message_data[2] = verb + message_data[3] = whispering /mob/living/proc/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name) if(message_mode == "intercom") @@ -124,33 +128,42 @@ proc/get_radio_key_from_channel(var/channel) return "asks" return verb -/mob/living/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="") +/mob/living/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/whispering = 0) + //If you're muted for IC chat if(client) - if(client.prefs.muted & MUTE_IC) - src << "\red You cannot speak in IC (Muted)." + if((client.prefs.muted & MUTE_IC) || say_disabled) + src << "You cannot speak in IC (Muted)." return + //Redirect to say_dead if talker is dead if(stat) - if(stat == 2) + if(stat == DEAD) return say_dead(message) return + //Parse the mode var/message_mode = parse_message_mode(message, "headset") + //Maybe they are using say/whisper to do a quick emote, so do those switch(copytext(message,1,2)) if("*") return emote(copytext(message,2)) if("^") return custom_emote(1, copytext(message,2)) - //parse the radio code and consume it + //Parse the radio code and consume it if (message_mode) if (message_mode == "headset") message = copytext(message,2) //it would be really nice if the parse procs could do this for us. + else if (message_mode == "whisper") + whispering = 1 + message_mode = null + message = copytext(message,3) else message = copytext(message,3) + //Clean up any remaining space on the left message = trim_left(message) - //parse the language code and consume it + //Parse the language code and consume it if(!speaking) speaking = parse_language(message) if(speaking) @@ -158,42 +171,72 @@ proc/get_radio_key_from_channel(var/channel) else speaking = get_default_language() - // This is broadcast to all mobs with the language, - // irrespective of distance or anything else. + //HIVEMIND languages always send to all people with that language if(speaking && (speaking.flags & HIVEMIND)) speaking.broadcast(src,trim(message)) return 1 - verb = say_quote(message, speaking) - + //Self explanatory. if(is_muzzled()) src << "You're muzzled and cannot speak!" return + //Clean up any remaining junk on the left like spaces. message = trim_left(message) + //Autohiss handles auto-rolling tajaran R's and unathi S's/Z's + message = handle_autohiss(message, speaking) + + //Whisper vars + var/w_scramble_range = 5 //The range at which you get ***as*th**wi**** + var/w_adverb //An adverb prepended to the verb in whispers + var/w_not_heard //The message for people in watching range + + //Handle language-specific verbs and adverb setup if necessary + if(!whispering) //Just doing normal 'say' (for now, may change below) + verb = say_quote(message, speaking) + else if(whispering && speaking.whisper_verb) //Language has defined whisper verb + verb = speaking.whisper_verb + w_not_heard = "[verb] something" + else //Whispering but language has no whisper verb, use say verb + w_adverb = pick("quietly", "softly") + verb = speaking.speech_verb + w_not_heard = "[speaking.speech_verb] something [w_adverb]" + + //For speech disorders (hulk, slurring, stuttering) if(!(speaking && (speaking.flags & NO_STUTTER))) - message = handle_autohiss(message, speaking) + var/list/message_data = list(message, verb, whispering) + if(handle_speech_problems(message_data)) + message = message_data[1] + whispering = message_data[3] - var/list/handle_s = handle_speech_problems(message, verb) - message = handle_s[1] - verb = handle_s[2] + if(verb != message_data[2]) //They changed our verb + if(whispering) + w_adverb = pick("quietly", "softly") + verb = message_data[2] + //Whisper may have adverbs, add those if one was set + if(w_adverb) verb = "[verb] [w_adverb]" + + //If something nulled or emptied the message, forget it if(!message || message == "") return 0 + //Radio message handling var/list/obj/item/used_radios = new - if(handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)) + if(handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, whispering)) return 1 + //For languages with actual speech sounds var/list/handle_v = handle_speech_sound() var/sound/speech_sound = handle_v[1] var/sound_vol = handle_v[2] - var/italics = 0 + //Default range and italics, may be overridden past here var/message_range = world.view + var/italics = 0 - //speaking into radios + //Speaking into radios if(used_radios.len) italics = 1 message_range = 1 @@ -208,9 +251,13 @@ proc/get_radio_key_from_channel(var/channel) if (speech_sound) sound_vol *= 0.5 - var/turf/T = get_turf(src) + //Set vars if we're still whispering by this point + if(whispering) + italics = 1 + message_range = 1 + sound_vol *= 0.5 - //handle nonverbal and sign languages here + //Handle nonverbal and sign languages here if (speaking) if (speaking.flags & NONVERBAL) if (prob(30)) @@ -219,55 +266,64 @@ proc/get_radio_key_from_channel(var/channel) if (speaking.flags & SIGNLANG) return say_signlang(message, pick(speaking.signlang_verb), speaking) + //These will contain the main receivers of the message var/list/listening = list() var/list/listening_obj = list() + //Atmosphere calculations (speaker's side only, for now) + var/turf/T = get_turf(src) if(T) - //make sure the air can transmit speech - speaker's side + //Air is too thin to carry sound at all, contact speech only var/datum/gas_mixture/environment = T.return_air() var/pressure = (environment)? environment.return_pressure() : 0 if(pressure < SOUND_MINIMUM_PRESSURE) message_range = 1 - if (pressure < ONE_ATMOSPHERE*0.4) //sound distortion pressure, to help clue people in that the air is thin, even if it isn't a vacuum yet + //Air is nearing minimum levels, make text italics as a hint, and muffle sound + if (pressure < ONE_ATMOSPHERE*0.4) italics = 1 - sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact + sound_vol *= 0.5 - var/list/hear = get_mobs_or_objects_in_view(message_range,src) - var/list/hearturfs = list() - - for(var/I in hear) - if(ismob(I)) - var/mob/M = I - listening += M - hearturfs += M.locs[1] - else if(isobj(I)) - var/obj/O = I - hearturfs += O.locs[1] - listening_obj |= O - - - for(var/mob/M in player_list) - if(M.stat == DEAD && M.client && M.is_preference_enabled(/datum/client_preference/ghost_ears)) - listening |= M - continue - if(M.loc && M.locs[1] in hearturfs) - listening |= M + //Obtain the mobs and objects in the message range + var/list/results = get_mobs_and_objs_in_view_fast(T, world.view) + listening = results["mobs"] + listening_obj = results["objs"] + else + return 1 //If we're in nullspace, then forget it. + //The 'post-say' static speech bubble var/speech_bubble_test = say_test(message) var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]") spawn(30) qdel(speech_bubble) + //Main 'say' and 'whisper' message delivery for(var/mob/M in listening) - M << speech_bubble - M.hear_say(message, verb, speaking, alt_name, italics, src, speech_sound, sound_vol) + spawn(0) //Using spawns to queue all the messages for AFTER this proc is done, and stop runtimes + if(M && src) //If we still exist, when the spawn processes + var/dst = get_dist(get_turf(M),get_turf(src)) + + if(dst <= message_range || M.stat == DEAD) //Inside normal message range, or dead with ears (handled in the view proc) + M << speech_bubble + M.hear_say(message, verb, speaking, alt_name, italics, src, speech_sound, sound_vol) + + if(whispering) //Don't even bother with these unless whispering + if(dst > message_range && dst <= w_scramble_range) //Inside whisper scramble range + M << speech_bubble + M.hear_say(stars(message), verb, speaking, alt_name, italics, src, speech_sound, sound_vol*0.2) + if(dst > w_scramble_range && dst <= world.view) //Inside whisper 'visible' range + M.show_message("[src.name] [w_not_heard].", 2) + + //Object message delivery for(var/obj/O in listening_obj) spawn(0) - if(O) //It's possible that it could be deleted in the meantime. - O.hear_talk(src, message, verb, speaking) + if(O && src) //If we still exist, when the spawn processes + var/dst = get_dist(get_turf(O),get_turf(src)) + if(dst <= message_range) + O.hear_talk(src, message, verb, speaking) - log_say("[name]/[key] : [message]") + //Log the message to file + log_say("[name]/[key][whispering ? " (W)" : ""]: [message]") return 1 /mob/living/proc/say_signlang(var/message, var/verb="gestures", var/datum/language/language) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index ee452849255..5a5f9f3ec47 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -52,7 +52,7 @@ var/list/ai_verbs_hidden = list( // For why this exists, refer to https://xkcd.c density = 1 status_flags = CANSTUN|CANPARALYSE|CANPUSH shouldnt_see = list(/obj/effect/rune) - var/list/network = list("Northern Star") + var/list/network = list(station_short) var/obj/machinery/camera/camera = null var/list/connected_robots = list() var/aiRestorePowerRoutine = 0 @@ -151,11 +151,13 @@ var/list/ai_verbs_hidden = list( // For why this exists, refer to https://xkcd.c add_language("Galactic Common", 1) add_language("Sol Common", 0) add_language("Sinta'unathi", 0) + add_language("Siik'maas", 0) add_language("Siik'tajr", 0) add_language("Skrellian", 0) add_language("Tradeband", 1) add_language("Gutter", 0) add_language("Encoded Audio Language", 1) + add_language("Schechi", 0) if(!safety)//Only used by AIize() to successfully spawn an AI. if (!B)//If there is no player/brain inside. diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index a8c0e18f301..2ba3d40a174 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -268,7 +268,7 @@ affecting.implants -= card H.visible_message("\The [src] explodes out of \the [H]'s [affecting.name] in shower of gore!") break - holder.removeItem(card) + holder.drop_from_inventory(card) else if(istype(card.loc,/obj/item/device/pda)) var/obj/item/device/pda/holder = card.loc holder.pai = null @@ -386,7 +386,7 @@ if(istype(H)) var/mob/living/M = H.loc if(istype(M)) - M.removeItem(H) + M.drop_from_inventory(H) H.loc = get_turf(src) src.loc = get_turf(H) diff --git a/code/modules/mob/living/silicon/robot/analyzer.dm b/code/modules/mob/living/silicon/robot/analyzer.dm index 22d716aadde..19c44d2e536 100644 --- a/code/modules/mob/living/silicon/robot/analyzer.dm +++ b/code/modules/mob/living/silicon/robot/analyzer.dm @@ -75,7 +75,7 @@ var/organ_found if(H.internal_organs.len) for(var/obj/item/organ/external/E in H.organs) - if(!(E.status & ORGAN_ROBOT)) + if(!(E.robotic >= ORGAN_ROBOT)) continue organ_found = 1 user << "[E.name]: [E.brute_dam] [E.burn_dam]" @@ -86,7 +86,7 @@ organ_found = null if(H.internal_organs.len) for(var/obj/item/organ/O in H.internal_organs) - if(!(O.status & ORGAN_ROBOT)) + if(!(O.robotic >= ORGAN_ROBOT)) continue organ_found = 1 user << "[O.name]: [O.damage]" diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index 6f0b3d81bd2..7d2848f9bf5 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -75,7 +75,7 @@ /datum/robot_component/armour name = "armour plating" external_type = /obj/item/robot_parts/robot_component/armour - max_damage = 60 + max_damage = 90 // ACTUATOR diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index e92cc389a50..8c0ec04900e 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -145,7 +145,7 @@ var/list/mob_hat_cache = list() if(hat) user << "\The [src] is already wearing \the [hat]." return - user.removeItem(W) + user.unEquip(W) wear_hat(W) user.visible_message("\The [user] puts \the [W] on \the [src].") return diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index e91670df5dc..3fd496f179c 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -63,7 +63,7 @@ /obj/item/borg/upgrade, /obj/item/device/flash, //to build borgs, /obj/item/organ/internal/brain, //to insert into MMIs, - /obj/item/stack/cable_coil, //again, for borg building, + /obj/item/weapon/disk, /obj/item/weapon/circuitboard, /obj/item/slime_extract, /obj/item/weapon/reagent_containers/glass, @@ -83,6 +83,35 @@ /obj/item/weapon/grown ) +/obj/item/weapon/gripper/no_use/organ + name = "organ gripper" + icon_state = "gripper-flesh" + desc = "A specialized grasping tool used to preserve and manipulate organic material." + + can_hold = list( + /obj/item/organ + ) + +/obj/item/weapon/gripper/no_use/organ/robotics + name = "external organ gripper" + icon_state = "gripper-flesh" + desc = "A specialized grasping tool used in robotics work." + + can_hold = list( + /obj/item/organ/external, + /obj/item/organ/internal/cell + ) + +/obj/item/weapon/gripper/no_use/mech + name = "exosuit gripper" + icon_state = "gripper-mech" + desc = "A large, heavy-duty grasping tool used in construction of mechs." + + can_hold = list( + /obj/item/mecha_parts/part, + /obj/item/mecha_parts/mecha_equipment + ) + /obj/item/weapon/gripper/no_use //Used when you want to hold and put items in other things, but not able to 'use' the item /obj/item/weapon/gripper/no_use/attack_self(mob/user as mob) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index 3f4f43fddc9..9039801006e 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -15,7 +15,7 @@ idle_power_usage = 20 active_power_usage = 5000 - var/fabricator_tag = "Northern Star Upper Level" + var/fabricator_tag = station_short+" Upper Level" var/drone_progress = 0 var/produce_drones = 1 var/time_last_drone = 500 @@ -26,7 +26,7 @@ /obj/machinery/drone_fabricator/derelict name = "construction drone fabricator" - fabricator_tag = "Northern Star Depths" + fabricator_tag = station_short+" Depths" drone_type = /mob/living/silicon/robot/drone/construction /obj/machinery/drone_fabricator/New() diff --git a/code/modules/mob/living/silicon/robot/drone/drone_say.dm b/code/modules/mob/living/silicon/robot/drone/drone_say.dm index b0f89a70ea0..5cdcd3dbd8a 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_say.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_say.dm @@ -4,8 +4,6 @@ if(client.prefs.muted & MUTE_IC) src << "You cannot send IC messages (muted)." return 0 - if (src.client.handle_spam_prevention(message,MUTE_IC)) - return 0 message = sanitize(message) diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm index 23b6cc0d67b..7f2102a8609 100644 --- a/code/modules/mob/living/silicon/robot/emote.dm +++ b/code/modules/mob/living/silicon/robot/emote.dm @@ -14,8 +14,6 @@ if(client.prefs.muted & MUTE_IC) src << "You cannot send IC messages (muted)." return - if (src.client.handle_spam_prevention(message,MUTE_IC)) - return if (stat) return if(!(message)) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 69371109ec7..cd02dd71f42 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.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_TAJR = 0, LANGUAGE_SKRELLIAN = 0, LANGUAGE_GUTTER = 0) + var/languages = list(LANGUAGE_SOL_COMMON = 1, LANGUAGE_TRADEBAND = 1, LANGUAGE_UNATHI = 0, LANGUAGE_SIIK_TAJR = 0, LANGUAGE_SKRELLIAN = 0, LANGUAGE_GUTTER = 0, LANGUAGE_SCHECHI = 0) var/sprites = list() var/can_be_pushed = 1 var/no_slip = 0 @@ -187,7 +187,7 @@ var/global/list/robot_modules = list( /obj/item/weapon/robot_module/medical/surgeon/New() src.modules += new /obj/item/device/flash(src) src.modules += new /obj/item/device/healthanalyzer(src) - src.modules += new /obj/item/weapon/reagent_containers/borghypo/surgeon(src) + src.modules += new /obj/item/weapon/reagent_containers/borghypo(src) src.modules += new /obj/item/weapon/scalpel(src) src.modules += new /obj/item/weapon/hemostat(src) src.modules += new /obj/item/weapon/retractor(src) @@ -197,6 +197,7 @@ var/global/list/robot_modules = list( src.modules += new /obj/item/weapon/bonesetter(src) src.modules += new /obj/item/weapon/circular_saw(src) src.modules += new /obj/item/weapon/surgicaldrill(src) + src.modules += new /obj/item/weapon/gripper/no_use/organ(src) src.modules += new /obj/item/weapon/extinguisher/mini(src) src.emag = new /obj/item/weapon/reagent_containers/spray(src) src.emag.reagents.add_reagent("pacid", 250) @@ -241,10 +242,11 @@ var/global/list/robot_modules = list( src.modules += new /obj/item/device/healthanalyzer(src) src.modules += new /obj/item/device/reagent_scanner/adv(src) src.modules += new /obj/item/roller_holder(src) - src.modules += new /obj/item/weapon/reagent_containers/borghypo/crisis(src) + src.modules += new /obj/item/weapon/reagent_containers/borghypo(src) src.modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src) src.modules += new /obj/item/weapon/reagent_containers/dropper/industrial(src) src.modules += new /obj/item/weapon/reagent_containers/syringe(src) + src.modules += new /obj/item/weapon/gripper/no_use/organ(src) src.modules += new /obj/item/weapon/extinguisher/mini(src) src.emag = new /obj/item/weapon/reagent_containers/spray(src) src.emag.reagents.add_reagent("pacid", 250) @@ -312,6 +314,7 @@ var/global/list/robot_modules = list( src.modules += new /obj/item/weapon/screwdriver(src) src.modules += new /obj/item/weapon/wrench(src) src.modules += new /obj/item/weapon/crowbar(src) + src.modules += new /obj/item/weapon/weldingtool/largetank(src) src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src) src.modules += new /obj/item/device/pipe_painter(src) src.modules += new /obj/item/device/floor_painter(src) @@ -332,6 +335,10 @@ var/global/list/robot_modules = list( R.synths = list(metal) src.modules += R + var/obj/item/stack/tile/floor/cyborg/F = new /obj/item/stack/tile/floor/cyborg(src) + F.synths = list(metal) + src.modules += F + var/obj/item/stack/material/cyborg/plasteel/S = new (src) S.synths = list(plasteel) src.modules += S @@ -358,6 +365,7 @@ var/global/list/robot_modules = list( src.modules += new /obj/item/weapon/gripper(src) src.modules += new /obj/item/device/lightreplacer(src) src.modules += new /obj/item/device/pipe_painter(src) + src.modules += new /obj/item/device/floor_painter(src) src.emag = new /obj/item/borg/stun(src) var/datum/matter_synth/metal = new /datum/matter_synth/metal(40000) @@ -423,6 +431,7 @@ var/global/list/robot_modules = list( src.modules += new /obj/item/weapon/melee/baton/robot(src) src.modules += new /obj/item/weapon/gun/energy/taser/mounted/cyborg(src) src.modules += new /obj/item/taperoll/police(src) + src.modules += new /obj/item/weapon/reagent_containers/spray/pepper(src) src.emag = new /obj/item/weapon/gun/energy/laser/mounted(src) ..() @@ -479,11 +488,12 @@ var/global/list/robot_modules = list( LANGUAGE_SOL_COMMON = 1, LANGUAGE_UNATHI = 1, LANGUAGE_SIIK_MAAS = 1, - LANGUAGE_SIIK_TAJR = 0, + LANGUAGE_SIIK_TAJR = 1, LANGUAGE_SKRELLIAN = 1, LANGUAGE_ROOTSPEAK = 1, LANGUAGE_TRADEBAND = 1, - LANGUAGE_GUTTER = 1 + LANGUAGE_GUTTER = 1, + LANGUAGE_SCHECHI = 1 ) /obj/item/weapon/robot_module/clerical/butler @@ -505,6 +515,8 @@ var/global/list/robot_modules = list( src.modules += new /obj/item/device/analyzer/plant_analyzer(src) src.modules += new /obj/item/weapon/storage/bag/plants(src) src.modules += new /obj/item/weapon/robot_harvester(src) + src.modules += new /obj/item/weapon/material/knife(src) + src.modules += new /obj/item/weapon/material/kitchen/rollingpin(src) var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src) M.stored_matter = 30 @@ -544,8 +556,10 @@ var/global/list/robot_modules = list( src.modules += new /obj/item/weapon/form_printer(src) src.modules += new /obj/item/weapon/gripper/paperwork(src) src.modules += new /obj/item/weapon/hand_labeler(src) - src.emag = new /obj/item/weapon/stamp/denied(src) - ..() + src.modules += new /obj/item/weapon/stamp(src) + src.modules += new /obj/item/weapon/stamp/denied(src) + src.emag = new /obj/item/weapon/stamp/chameleon(src) + src.emag = new /obj/item/weapon/pen/chameleon(src) /obj/item/weapon/robot_module/general/butler/respawn_consumable(var/mob/living/silicon/robot/R, var/amount) var/obj/item/weapon/reagent_containers/food/condiment/enzyme/E = locate() in src.modules @@ -592,12 +606,17 @@ var/global/list/robot_modules = list( src.modules += new /obj/item/device/flash(src) src.modules += new /obj/item/weapon/portable_destructive_analyzer(src) src.modules += new /obj/item/weapon/gripper/research(src) + src.modules += new /obj/item/weapon/gripper/no_use/organ/robotics(src) + src.modules += new /obj/item/weapon/gripper/no_use/mech(src) src.modules += new /obj/item/weapon/gripper/no_use/loader(src) src.modules += new /obj/item/device/robotanalyzer(src) src.modules += new /obj/item/weapon/card/robot(src) - src.modules += new /obj/item/weapon/wrench(src) + src.modules += new /obj/item/weapon/weldingtool/largetank(src) src.modules += new /obj/item/weapon/screwdriver(src) + src.modules += new /obj/item/weapon/wrench(src) src.modules += new /obj/item/weapon/crowbar(src) + src.modules += new /obj/item/weapon/wirecutters(src) + src.modules += new /obj/item/device/multitool(src) src.modules += new /obj/item/weapon/scalpel(src) src.modules += new /obj/item/weapon/circular_saw(src) src.modules += new /obj/item/weapon/extinguisher/mini(src) @@ -607,6 +626,8 @@ var/global/list/robot_modules = list( var/datum/matter_synth/nanite = new /datum/matter_synth/nanite(10000) synths += nanite + var/datum/matter_synth/wire = new /datum/matter_synth/wire() //Added to allow repairs, would rather add cable now than be asked to add it later, + synths += wire //Cable code, taken from engiborg, var/obj/item/stack/nanopaste/N = new /obj/item/stack/nanopaste(src) N.uses_charge = 1 @@ -614,6 +635,10 @@ var/global/list/robot_modules = list( N.synths = list(nanite) src.modules += N + var/obj/item/stack/cable_coil/cyborg/C = new /obj/item/stack/cable_coil/cyborg(src) //Cable code, taken from engiborg, + C.synths = list(wire) + src.modules += C + ..() /obj/item/weapon/robot_module/syndicate @@ -623,9 +648,12 @@ var/global/list/robot_modules = list( LANGUAGE_SOL_COMMON = 1, LANGUAGE_TRADEBAND = 1, LANGUAGE_UNATHI = 0, + LANGUAGE_SIIK_MAAS = 0, LANGUAGE_SIIK_TAJR = 0, LANGUAGE_SKRELLIAN = 0, - LANGUAGE_GUTTER = 1 + LANGUAGE_ROOTSPEAK = 0, + LANGUAGE_GUTTER = 1, + LANGUAGE_SCHECHI = 0 ) sprites = list( "Dread" = "securityrobot", diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index ece00da5ee7..e2810ad6410 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -1,5 +1,5 @@ -/mob/living/silicon/say(var/message, var/sanitize = 1) - return ..(sanitize ? sanitize(message) : message) +/mob/living/silicon/say(var/message, var/sanitize = 1, var/whispering = 0) + return ..((sanitize ? sanitize(message) : message), whispering = whispering) /mob/living/silicon/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name) log_say("[key_name(src)] : [message]") diff --git a/code/modules/mob/living/simple_animal/borer/borer_captive.dm b/code/modules/mob/living/simple_animal/borer/borer_captive.dm index 2d6bfc34b3c..f07b9d32cee 100644 --- a/code/modules/mob/living/simple_animal/borer/borer_captive.dm +++ b/code/modules/mob/living/simple_animal/borer/borer_captive.dm @@ -9,8 +9,6 @@ if(client.prefs.muted & MUTE_IC) src << "\red You cannot speak in IC (muted)." return - if (src.client.handle_spam_prevention(message,MUTE_IC)) - return if(istype(src.loc,/mob/living/simple_animal/borer)) diff --git a/code/modules/mob/living/simple_animal/borer/say.dm b/code/modules/mob/living/simple_animal/borer/say.dm index 0d4cdad06ef..e76a02a7e23 100644 --- a/code/modules/mob/living/simple_animal/borer/say.dm +++ b/code/modules/mob/living/simple_animal/borer/say.dm @@ -16,8 +16,6 @@ if(client.prefs.muted & MUTE_IC) src << "\red You cannot speak in IC (muted)." return - if (src.client.handle_spam_prevention(message,MUTE_IC)) - return if (copytext(message, 1, 2) == "*") return emote(copytext(message, 2)) diff --git a/code/modules/mob/living/simple_animal/constructs/soulstone.dm b/code/modules/mob/living/simple_animal/constructs/soulstone.dm index 722d6c1550b..54fd7382791 100644 --- a/code/modules/mob/living/simple_animal/constructs/soulstone.dm +++ b/code/modules/mob/living/simple_animal/constructs/soulstone.dm @@ -118,7 +118,7 @@ return for(var/obj/item/W in T) - T.removeItem(W) + T.drop_from_inventory(W) new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton T.invisibility = 101 diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index bf4ea6b5728..3ede3e74587 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -83,7 +83,7 @@ var/mob/living/carbon/human/H = target if(prob(poison_per_bite)) var/obj/item/organ/external/O = pick(H.organs) - if(!(O.status & ORGAN_ROBOT)) + if(!(O.robotic >= ORGAN_ROBOT)) var/eggs = PoolOrNew(/obj/effect/spider/eggcluster/, list(O, src)) O.implants += eggs @@ -213,4 +213,4 @@ #undef SPINNING_WEB #undef LAYING_EGGS #undef MOVING_TO_TARGET -#undef SPINNING_COCOON +#undef SPINNING_COCOON diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index b999ec68401..1e6752ab77b 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -607,8 +607,9 @@ stolen_item = C.r_hand if(stolen_item) - C.removeItem(stolen_item, src) + C.remove_from_mob(stolen_item) held_item = stolen_item + stolen_item.loc = src visible_message("[src] grabs the [held_item] out of [C]'s hand!", "\blue You snag the [held_item] out of [C]'s hand!", "You hear the sounds of wings flapping furiously.") return held_item @@ -726,7 +727,7 @@ -/mob/living/simple_animal/parrot/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0) +/mob/living/simple_animal/parrot/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/part_c, var/mob/speaker = null, var/hard_to_hear = 0) if(prob(50)) parrot_hear("[pick(available_channels)] [message]") ..(message,verb,language,part_a,part_b,speaker,hard_to_hear) diff --git a/code/modules/mob/living/voice/voice.dm b/code/modules/mob/living/voice/voice.dm index 82bd397ac13..e4eac0f439c 100644 --- a/code/modules/mob/living/voice/voice.dm +++ b/code/modules/mob/living/voice/voice.dm @@ -33,7 +33,7 @@ var/datum/preferences/p = speaker.client.prefs name = p.real_name real_name = name - gender = p.gender + gender = p.identifying_gender for(var/language in p.alternate_languages) add_language(language) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index f45fd574cea..405afb537c7 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -158,8 +158,20 @@ return UNBUCKLED return restrained() ? FULLY_BUCKLED : PARTIALLY_BUCKLED +/mob/proc/is_physically_disabled() + return incapacitated(INCAPACITATION_DISABLED) + +/mob/proc/cannot_stand() + return incapacitated(INCAPACITATION_KNOCKDOWN) + /mob/proc/incapacitated(var/incapacitation_flags = INCAPACITATION_DEFAULT) - if (stat || paralysis || stunned || weakened || resting || sleeping || (status_flags & FAKEDEATH)) + if ((incapacitation_flags & INCAPACITATION_STUNNED) && stunned) + return 1 + + if ((incapacitation_flags & INCAPACITATION_FORCELYING) && (weakened || resting)) + return 1 + + if ((incapacitation_flags & INCAPACITATION_KNOCKOUT) && (stat || paralysis || sleeping || (status_flags & FAKEDEATH))) return 1 if((incapacitation_flags & INCAPACITATION_RESTRAINED) && restrained()) @@ -687,9 +699,6 @@ /mob/proc/can_stand_overridden() return 0 -/mob/proc/cannot_stand() - return incapacitated(INCAPACITATION_DEFAULT & (~INCAPACITATION_RESTRAINED)) - //Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it. /mob/proc/update_canmove() return canmove diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 7eb32ea8db6..f814ac2b231 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -130,8 +130,6 @@ var/in_throw_mode = 0 - var/coughedtime = null - var/inertia_dir = 0 var/music_lastplayed = "null" @@ -154,7 +152,7 @@ var/voice_name = "unidentifiable voice" var/faction = "neutral" //Used for checking whether hostile simple animals will attack you, possibly more stuff later - var/captured = 0 //Functionally, should give the same effect as being buckled into a chair when true. + var/captured = 0 //Functionally, should give the same effect as being buckled into a chair when true. Only used by energy nets, TODO replace with buckling //Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed. var/proc_holder_list[] = list()//Right now unused. diff --git a/code/modules/mob/mob_grab_specials.dm b/code/modules/mob/mob_grab_specials.dm index a5c45c79fb8..5158a7f3d07 100644 --- a/code/modules/mob/mob_grab_specials.dm +++ b/code/modules/mob/mob_grab_specials.dm @@ -106,7 +106,9 @@ target.attack_log += text("\[[time_stamp()]\] Headbutted by [attacker.name] ([attacker.ckey])") msg_admin_attack("[key_name(attacker)] has headbutted [key_name(target)]") - attacker.deleteItem(src) + attacker.drop_from_inventory(src) + src.loc = null + qdel(src) return /obj/item/weapon/grab/proc/dislocate(mob/living/carbon/human/target, mob/living/attacker, var/target_zone) @@ -140,14 +142,14 @@ /obj/item/weapon/grab/proc/devour(mob/target, mob/user) var/can_eat - if((FAT in user.mutations) && issmall(target)) + if((FAT in user.mutations) && ismini(target)) can_eat = 1 else var/mob/living/carbon/human/H = user if(istype(H) && H.species.gluttonous) if(H.species.gluttonous == 2) can_eat = 2 - else if((H.mob_size > target.mob_size) && !ishuman(target) && iscarbon(target)) + else if((H.mob_size > target.mob_size) && !ishuman(target) && ismini(target)) can_eat = 1 if(can_eat) @@ -156,7 +158,7 @@ if(can_eat == 2) if(!do_mob(user, target)||!do_after(user, 30)) return else - if(!do_mob(user, target)||!do_after(user, 100)) return + if(!do_mob(user, target)||!do_after(user, 70)) return user.visible_message("[user] devours [target]!") target.loc = user attacker.stomach_contents.Add(target) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 876257be91f..612861ed8c5 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -5,12 +5,27 @@ return L.mob_size <= MOB_SMALL return 0 + +/proc/istiny(A) + if(A && istype(A, /mob/living)) + var/mob/living/L = A + return L.mob_size <= MOB_TINY + return 0 + + +/proc/ismini(A) + if(A && istype(A, /mob/living)) + var/mob/living/L = A + return L.mob_size <= MOB_MINISCULE + return 0 + + // If they are 100% robotic, they count as synthetic. /mob/living/carbon/human/isSynthetic() if(isnull(full_prosthetic)) robolimb_count = 0 for(var/obj/item/organ/external/E in organs) - if(E.status & ORGAN_ROBOT) + if(E.robotic >= ORGAN_ROBOT) robolimb_count++ if(robolimb_count == organs.len) full_prosthetic = 1 @@ -389,6 +404,8 @@ proc/is_blind(A) var/follow var/lname if(subject) + if(M.is_key_ignored(subject.client.key)) // If we're ignored, do nothing. + continue if(subject != M) follow = "([ghost_follow_link(subject, M)]) " if(M.stat != DEAD && M.client.holder) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 43f7d80815b..55530ddcd85 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -5,6 +5,7 @@ var/spawning = 0//Referenced when you want to delete the new_player later on in the code. var/totalPlayers = 0 //Player counts for the Lobby tab var/totalPlayersReady = 0 + var/datum/browser/panel universal_speak = 1 invisibility = 101 @@ -24,15 +25,15 @@ /mob/new_player/proc/new_player_panel_proc() - var/output = "
    New Player Options" + var/output = "
    " output +="
    " output += "

    Setup Character

    " if(!ticker || ticker.current_state <= GAME_STATE_PREGAME) if(ready) - output += "

    \[ Ready | Not Ready \]

    " + output += "

    \[ Ready | Not Ready \]

    " else - output += "

    \[ Ready | Not Ready \]

    " + output += "

    \[ Ready | Not Ready \]

    " else output += "View the Crew Manifest

    " @@ -61,7 +62,10 @@ output += "
    " - src << browse(output,"window=playersetup;size=210x280;can_close=0") + panel = new(src, "Welcome","Welcome", 210, 280, src) + panel.set_window_options("can_close=0") + panel.set_content(output) + panel.open() return /mob/new_player/Stat() @@ -98,7 +102,8 @@ ready = 0 if(href_list["refresh"]) - src << browse(null, "window=playersetup") //closes the player setup window + //src << browse(null, "window=playersetup") //closes the player setup window + panel.close() new_player_panel_proc() if(href_list["observe"]) @@ -127,7 +132,7 @@ observer.alpha = 127 if(client.prefs.be_random_name) - client.prefs.real_name = random_name(client.prefs.gender) + client.prefs.real_name = random_name(client.prefs.identifying_gender) observer.real_name = client.prefs.real_name observer.name = observer.real_name if(!client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed. @@ -149,7 +154,7 @@ return 0 var/datum/species/S = all_species[client.prefs.species] - if(!(S.spawn_flags & IS_WHITELISTED)) + if(!(S.spawn_flags & SPECIES_IS_WHITELISTED)) src << alert("Your current species,[client.prefs.species], is not available for play on the station.") return 0 @@ -173,7 +178,7 @@ return 0 var/datum/species/S = all_species[client.prefs.species] - if(!(S.spawn_flags & CAN_JOIN)) + if(!(S.spawn_flags & SPECIES_CAN_JOIN)) src << alert("Your current species, [client.prefs.species], is not available for play on the station.") return 0 @@ -458,25 +463,29 @@ return new_character /mob/new_player/proc/ViewManifest() - var/dat = "" - dat += "

    Show Crew Manifest

    " + var/dat = "
    " dat += data_core.get_manifest(OOC = 1) - src << browse(dat, "window=manifest;size=370x420;can_close=1") + //src << browse(dat, "window=manifest;size=370x420;can_close=1") + var/datum/browser/popup = new(src, "Crew Manifest", "Crew Manifest", 370, 420, src) + popup.set_content(dat) + popup.open() /mob/new_player/Move() return 0 /mob/new_player/proc/close_spawn_windows() + src << browse(null, "window=latechoices") //closes late choices window - src << browse(null, "window=playersetup") //closes the player setup window + //src << browse(null, "window=playersetup") //closes the player setup window + panel.close() /mob/new_player/proc/has_admin_rights() return check_rights(R_ADMIN, 0, src) /mob/new_player/proc/is_species_whitelisted(datum/species/S) if(!S) return 1 - return is_alien_whitelisted(src, S.name) || !config.usealienwhitelist || !(S.spawn_flags & IS_WHITELISTED) + return is_alien_whitelisted(src, S.name) || !config.usealienwhitelist || !(S.spawn_flags & SPECIES_IS_WHITELISTED) /mob/new_player/get_species() var/datum/species/chosen_species @@ -493,7 +502,7 @@ /mob/new_player/get_gender() if(!client || !client.prefs) ..() - return client.prefs.gender + return client.prefs.biological_gender /mob/new_player/is_ready() return ready && ..() @@ -501,7 +510,7 @@ /mob/new_player/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "",var/italics = 0, var/mob/speaker = null) return -/mob/new_player/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0) +/mob/new_player/hear_radio() return /mob/new_player/MayRespawn() diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index e57224a3772..e93f2af24c5 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -1,40 +1,35 @@ /datum/preferences //The mob should have a gender you want before running this proc. Will run fine without H /datum/preferences/proc/randomize_appearance_for(var/mob/living/carbon/human/H) - gender = pick(MALE, FEMALE) - var/datum/species/current_species = all_species[species] + var/datum/species/current_species = all_species[species ? species : "Human"] + set_biological_gender(pick(current_species.genders)) + h_style = random_hair_style(biological_gender, species) + f_style = random_facial_hair_style(biological_gender, species) if(current_species) - if(current_species.flags & HAS_SKIN_TONE) + if(current_species.appearance_flags & HAS_SKIN_TONE) s_tone = random_skin_tone() - if(current_species.flags & HAS_EYE_COLOR) + if(current_species.appearance_flags & HAS_EYE_COLOR) randomize_eyes_color() - if(current_species.flags & HAS_SKIN_COLOR) - randomize_skin_color() - if(current_species.flags & HAS_UNDERWEAR) - underwear_top = rand(1,underwear_top_t.len) - underwear_bottom = rand(1,underwear_bottom_t.len) - undershirt = rand(1,undershirt_t.len) + if(current_species.appearance_flags & HAS_UNDERWEAR) + underwear_top = underwear_top_t[pick(underwear_top_t)] + underwear_bottom = underwear_bottom_t[pick(underwear_bottom_t)] + undershirt = undershirt_t[pick(undershirt_t)] + socks = socks_t[pick(socks_t)] + if(current_species.appearance_flags & HAS_HAIR_COLOR) + randomize_hair_color("hair") + randomize_hair_color("facial") + if(current_species.appearance_flags & HAS_SKIN_COLOR) + r_skin = rand (0,255) + g_skin = rand (0,255) + b_skin = rand (0,255) - var/use_head_species - var/obj/item/organ/external/head/temp_head = H.get_organ(BP_HEAD) - if(temp_head) - use_head_species = temp_head.species.get_bodytype() - else - use_head_species = H.species.get_bodytype() - - if(use_head_species) - h_style = random_hair_style(gender, species) - f_style = random_facial_hair_style(gender, species) - - randomize_hair_color("hair") - randomize_hair_color("facial") - - socks = rand(1,socks_t.len) - backbag = 2 - var/datum/species/S = all_species[species] - age = rand(S.min_age,S.max_age) + //backbag = 2 + backbag = rand(1,4) + pdachoice = rand(1,3) + age = rand(current_species.min_age, current_species.max_age) + b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+") if(H) copy_to(H,1) @@ -202,7 +197,7 @@ qdel(preview_icon) var/g = "m" - if(gender == FEMALE) g = "f" + if(biological_gender == FEMALE) g = "f" var/icon/icobase var/datum/species/current_species = all_species[species] diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index 3f8d01d3c00..b9bfba7adb6 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -170,6 +170,10 @@ name = "Ponytail 6" icon_state = "hair_ponytail6" + fringetail + name = "Fringetail" + icon_state = "hair_fringetail" + sideponytail name = "Side Ponytail" icon_state = "hair_stail" @@ -198,6 +202,10 @@ name = "Pompadour" icon_state = "hair_pompadour" + sleeze + name = "Sleeze" + icon_state = "hair_sleeze" + quiff name = "Quiff" icon_state = "hair_quiff" @@ -293,6 +301,14 @@ name = "Big Afro" icon_state = "hair_bigafro" + rows + name = "Rows" + icon_state = "hair_rows1" + + rows2 + name = "Rows 2" + icon_state = "hair_rows2" + sargeant name = "Flat Top" icon_state = "hair_sargeant" diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index ec47effabab..f7aaa52f78b 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -1,29 +1,15 @@ /mob/proc/say() return -/mob/verb/whisper() +/mob/verb/whisper(message as text) set name = "Whisper" set category = "IC" - return + + usr.say(message,whispering=1) /mob/verb/say_verb(message as text) set name = "Say" set category = "IC" - if(say_disabled) //This is here to try to identify lag problems - usr << "\red Speech is currently admin-disabled." - return - //Let's try to make users fix their errors - we try to detect single, out-of-place letters and 'unintended' words - /* - var/first_letter = copytext(message,1,2) - if((copytext(message,2,3) == " " && first_letter != "I" && first_letter != "A" && first_letter != ";") || cmptext(copytext(message,1,5), "say ") || cmptext(copytext(message,1,4), "me ") || cmptext(copytext(message,1,6), "looc ") || cmptext(copytext(message,1,5), "ooc ") || cmptext(copytext(message,2,6), "say ")) - var/response = alert(usr, "Do you really want to say this using the *say* verb?\n\n[message]\n", "Confirm your message", "Yes", "Edit message", "No") - if(response == "Edit message") - message = input(usr, "Please edit your message carefully:", "Edit message", message) - if(!message) - return - else if(response == "No") - return - */ set_typing_indicator(0) usr.say(message) @@ -62,7 +48,7 @@ /mob/proc/say_understands(var/mob/other,var/datum/language/speaking = null) - if (src.stat == 2) //Dead + if (src.stat == DEAD) return 1 //Universal speak makes everything understandable, for obvious reasons. diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 3986b4df65d..ca8d1bffe1a 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -4,7 +4,7 @@ for(var/obj/item/W in src) if (W==w_uniform) // will be torn continue - removeItem(W, force = 1) + drop_from_inventory(W) regenerate_icons() transforming = 1 canmove = 0 @@ -31,7 +31,7 @@ return for(var/obj/item/W in src) - removeItem(W, force = 1) + drop_from_inventory(W) set_species(species.primitive_form) dna.SetSEState(MONKEYBLOCK,1) dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF) @@ -57,7 +57,7 @@ if (transforming) return for(var/obj/item/W in src) - removeItem(W, force = 1) + drop_from_inventory(W) transforming = 1 canmove = 0 icon = null @@ -113,7 +113,7 @@ if (transforming) return for(var/obj/item/W in src) - removeItem(W, force = 1) + drop_from_inventory(W) regenerate_icons() transforming = 1 canmove = 0 @@ -165,7 +165,7 @@ if (transforming) return for(var/obj/item/W in src) - removeItem(W, force = 1) + drop_from_inventory(W) regenerate_icons() transforming = 1 canmove = 0 @@ -199,7 +199,7 @@ if (transforming) return for(var/obj/item/W in src) - removeItem(W, force = 1) + drop_from_inventory(W) regenerate_icons() transforming = 1 canmove = 0 @@ -228,7 +228,7 @@ if(transforming) return for(var/obj/item/W in src) - removeItem(W, force = 1) + drop_from_inventory(W) regenerate_icons() transforming = 1 diff --git a/code/modules/nano/modules/human_appearance.dm b/code/modules/nano/modules/human_appearance.dm index 87bfc761767..3b422435d35 100644 --- a/code/modules/nano/modules/human_appearance.dm +++ b/code/modules/nano/modules/human_appearance.dm @@ -27,10 +27,14 @@ cut_and_generate_data() return 1 if(href_list["gender"]) - if(can_change(APPEARANCE_GENDER)) + if(can_change(APPEARANCE_GENDER) && (href_list["gender"] in get_genders())) if(owner.change_gender(href_list["gender"])) cut_and_generate_data() return 1 + if(href_list["gender_id"]) + if(can_change(APPEARANCE_GENDER) && (href_list["gender_id"] in all_genders_define_list)) + owner.identifying_gender = href_list["gender_id"] + return 1 if(href_list["skin_tone"]) if(can_change_skin_tone()) var/new_s_tone = input(usr, "Choose your character's skin-tone:\n(Light 1 - 220 Dark)", "Skin Tone", -owner.s_tone + 35) as num|null @@ -100,6 +104,7 @@ data["specimen"] = owner.species.name data["gender"] = owner.gender + data["gender_id"] = owner.identifying_gender data["change_race"] = can_change(APPEARANCE_RACE) if(data["change_race"]) var/species[0] @@ -108,6 +113,17 @@ data["species"] = species data["change_gender"] = can_change(APPEARANCE_GENDER) + if(data["change_gender"]) + var/genders[0] + for(var/gender in get_genders()) + genders[++genders.len] = list("gender_name" = gender2text(gender), "gender_key" = gender) + data["genders"] = genders + var/id_genders[0] + for(var/gender in all_genders_define_list) + id_genders[++id_genders.len] = list("gender_name" = gender2text(gender), "gender_key" = gender) + data["id_genders"] = id_genders + + data["change_skin_tone"] = can_change_skin_tone() data["change_skin_color"] = can_change_skin_color() data["change_eye_color"] = can_change(APPEARANCE_EYE_COLOR) @@ -163,3 +179,13 @@ if(!valid_hairstyles.len || !valid_facial_hairstyles.len) valid_hairstyles = owner.generate_valid_hairstyles(check_gender = 0) valid_facial_hairstyles = owner.generate_valid_facial_hairstyles() + + +/datum/nano_module/appearance_changer/proc/get_genders() + var/datum/species/S = owner.species + var/list/possible_genders = S.genders + if(!owner.internal_organs_by_name["cell"]) + return possible_genders + possible_genders = possible_genders.Copy() + possible_genders |= NEUTER + return possible_genders \ No newline at end of file diff --git a/code/modules/nano/modules/rcon.dm b/code/modules/nano/modules/rcon.dm index 8950f1228e8..85387d5a04c 100644 --- a/code/modules/nano/modules/rcon.dm +++ b/code/modules/nano/modules/rcon.dm @@ -17,10 +17,10 @@ smeslist.Add(list(list( "charge" = round(SMES.Percentage()), "input_set" = SMES.input_attempt, - "input_val" = round(SMES.input_level), + "input_val" = round(SMES.input_level/1000, 0.1), "output_set" = SMES.output_attempt, - "output_val" = round(SMES.output_level), - "output_load" = round(SMES.output_used), + "output_val" = round(SMES.output_level/1000, 0.1), + "output_load" = round(SMES.output_used/1000, 0.1), "RCON_tag" = SMES.RCon_tag ))) @@ -63,12 +63,12 @@ if(href_list["smes_in_set"]) var/obj/machinery/power/smes/buildable/SMES = GetSMESByTag(href_list["smes_in_set"]) if(SMES) - var/inputset = input(usr, "Enter new input level (0-[SMES.input_level_max])", "SMES Input Power Control") as num + var/inputset = (input(usr, "Enter new input level (0-[SMES.input_level_max/1000] kW)", "SMES Input Power Control", SMES.input_level/1000) as num) * 1000 SMES.set_input(inputset) if(href_list["smes_out_set"]) var/obj/machinery/power/smes/buildable/SMES = GetSMESByTag(href_list["smes_out_set"]) if(SMES) - var/outputset = input(usr, "Enter new output level (0-[SMES.output_level_max])", "SMES Input Power Control") as num + var/outputset = (input(usr, "Enter new output level (0-[SMES.output_level_max/1000] kW)", "SMES Input Power Control", SMES.output_level/1000) as num) * 1000 SMES.set_output(outputset) if(href_list["toggle_breaker"]) diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index e270185414b..ec003a813e5 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -175,9 +175,11 @@ nanoui is used to open and update nano browser uis * @return /list config data */ /datum/nanoui/proc/get_config_data() + var/name = "[src_object]" + name = sanitize(name) var/list/config_data = list( "title" = title, - "srcObject" = list("name" = "[src_object]"), + "srcObject" = list("name" = name), "stateKey" = state_key, "status" = status, "autoUpdateLayout" = auto_update_layout, @@ -345,18 +347,20 @@ nanoui is used to open and update nano browser uis var/template_data_json = "{}" // An empty JSON object if (templates.len > 0) - template_data_json = json_encode(templates) + template_data_json = strip_improper(json_encode(templates)) var/list/send_data = get_send_data(initial_data) var/initial_data_json = replacetext(replacetext(json_encode(send_data), """, "&#34;"), "'", "'") + initial_data_json = strip_improper(initial_data_json); var/url_parameters_json = json_encode(list("src" = "\ref[src]")) return {" - + + [head_content] @@ -458,8 +466,8 @@ nanoui is used to open and update nano browser uis var/list/send_data = get_send_data(data) - //user << list2json(data) // used for debugging - user << output(list2params(list(json_encode(send_data))),"[window_id].browser:receiveUpdateData") + //user << list2json_usecache(send_data) // used for debugging //NANO DEBUG HOOK + user << output(list2params(list(strip_improper(json_encode(send_data)))),"[window_id].browser:receiveUpdateData") /** * This Topic() proc is called whenever a user clicks on a link within a Nano UI diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index 1bae132aed9..17219a48d43 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -126,7 +126,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 40 //Bleeding out var/blood_max = 0 for(var/obj/item/organ/external/temp in organs) - if(!(temp.status & ORGAN_BLEEDING) || (temp.status & ORGAN_ROBOT)) + if(!(temp.status & ORGAN_BLEEDING) || (temp.robotic >= ORGAN_ROBOT)) continue for(var/datum/wound/W in temp.wounds) if(W.bleeding()) blood_max += W.damage / 40 diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 70a9398ae23..5c096aa9d64 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -10,9 +10,10 @@ var/list/organ_cache = list() var/parent_organ = BP_TORSO // Organ holding this object. // Status tracking. - var/status = 0 // Various status flags (such as robotic) + var/status = 0 // Various status flags var/vital // Lose a vital limb, die immediately. var/damage = 0 // Current damage to the organ + var/robotic = 0 // Reference data. var/mob/living/carbon/human/owner // Current mob owning the organ. @@ -77,7 +78,7 @@ var/list/organ_cache = list() blood_DNA[dna.unique_enzymes] = dna.b_type /obj/item/organ/proc/die() - if(status & ORGAN_ROBOT) + if(robotic >= ORGAN_ROBOT) return damage = max_damage status |= ORGAN_DEAD @@ -96,10 +97,10 @@ var/list/organ_cache = list() // Don't process if we're in a freezer, an MMI or a stasis bag.or a freezer or something I dunno if(istype(loc,/obj/item/device/mmi)) return - if(istype(loc,/obj/structure/closet/body_bag/cryobag) || istype(loc,/obj/structure/closet/crate/freezer) || istype(loc,/obj/item/weapon/storage/box/freezer)) + if(istype(loc,/obj/structure/closet/body_bag/cryobag) || istype(loc,/obj/structure/closet/crate/freezer) || istype(loc,/obj/item/weapon/storage/box/freezer) || istype(loc,/obj/item/weapon/gripper/no_use/organ)) return //Process infections - if ((status & ORGAN_ROBOT) || (owner && owner.species && (owner.species.flags & IS_PLANT))) + if ((robotic >= ORGAN_ROBOT) || (owner && owner.species && (owner.species.flags & IS_PLANT))) germ_level = 0 return @@ -231,7 +232,7 @@ var/list/organ_cache = list() //Note: external organs have their own version of this proc /obj/item/organ/proc/take_damage(amount, var/silent=0) - if(src.status & ORGAN_ROBOT) + if(src.robotic >= ORGAN_ROBOT) src.damage = between(0, src.damage + (amount * 0.8), max_damage) else src.damage = between(0, src.damage + amount, max_damage) @@ -243,19 +244,20 @@ var/list/organ_cache = list() owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1) /obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc - status = 0 - status |= ORGAN_ASSISTED - status |= ORGAN_ROBOT - + robotic = ORGAN_ROBOT + src.status &= ~ORGAN_BROKEN + src.status &= ~ORGAN_BLEEDING + src.status &= ~ORGAN_SPLINTED + src.status &= ~ORGAN_CUT_AWAY /obj/item/organ/proc/mechassist() //Used to add things like pacemakers, etc - status = 0 - status |= ORGAN_ASSISTED + robotize() + robotic = ORGAN_ASSISTED min_bruised_damage = 15 min_broken_damage = 35 /obj/item/organ/emp_act(severity) - if(!(status & ORGAN_ROBOT)) + if(!(robotic >= ORGAN_ROBOT)) return switch (severity) if (1) @@ -316,14 +318,14 @@ var/list/organ_cache = list() /obj/item/organ/proc/bitten(mob/user) - if(status & ORGAN_ROBOT) + if(robotic >= ORGAN_ROBOT) return user << "You take an experimental bite out of \the [src]." var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list blood_splatter(src,B,1) - user.removeItem(src) + user.drop_from_inventory(src) var/obj/item/weapon/reagent_containers/food/snacks/organ/O = new(get_turf(src)) O.name = name O.icon = icon @@ -342,9 +344,9 @@ var/list/organ_cache = list() /obj/item/organ/attack_self(mob/user as mob) // Convert it to an edible form, yum yum. - if(!(status & ORGAN_ROBOT) && user.a_intent == I_HELP && user.zone_sel.selecting == O_MOUTH) + if(!(robotic >= ORGAN_ROBOT) && user.a_intent == I_HELP && user.zone_sel.selecting == O_MOUTH) bitten(user) return /obj/item/organ/proc/can_feel_pain() - return !(status & (ORGAN_ROBOT|ORGAN_DESTROYED)) && !(species.flags & NO_PAIN) + return !(robotic >= (ORGAN_ROBOT|ORGAN_DESTROYED)) && !(species.flags & NO_PAIN) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index d351ca9cdd0..cc105e1bbf7 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -26,6 +26,7 @@ var/last_dam = -1 // used in healing/processing calculations. // Appearance vars. + var/nonsolid // Snowflake warning, reee. Used for slime limbs. var/icon_name = null // Icon state base. var/body_part = null // Part flag var/icon_position = 0 // Used in mob overlay layering calculations. @@ -91,7 +92,7 @@ return ..() /obj/item/organ/external/emp_act(severity) - if(!(status & ORGAN_ROBOT)) + if(!(robotic >= ORGAN_ROBOT)) return switch (severity) if (1) @@ -199,11 +200,11 @@ /obj/item/organ/external/replaced(var/mob/living/carbon/human/target) owner = target + forceMove(owner) if(istype(owner)) owner.organs_by_name[organ_tag] = src owner.organs |= src for(var/obj/item/organ/organ in src) - organ.loc = owner organ.replaced(owner,src) if(parent_organ) @@ -212,13 +213,20 @@ if(!parent.children) parent.children = list() parent.children.Add(src) + //Remove all stump wounds since limb is not missing anymore + for(var/datum/wound/lost_limb/W in parent.wounds) + parent.wounds -= W + qdel(W) + break + parent.update_damages() /**************************************************** DAMAGE PROCS ****************************************************/ /obj/item/organ/external/proc/is_damageable(var/additional_damage = 0) - return (vital || brute_dam + burn_dam + additional_damage < max_damage) + //Continued damage to vital organs can kill you, and robot organs don't count towards total damage so no need to cap them. + return (vital || (robotic >= ORGAN_ROBOT) || brute_dam + burn_dam + additional_damage < max_damage) /obj/item/organ/external/take_damage(brute, burn, sharp, edge, used_weapon = null, list/forbidden_limbs = list()) if((brute <= 0) && (burn <= 0)) @@ -236,12 +244,12 @@ brute -= brute / 2 if(status & ORGAN_BROKEN && prob(40) && brute) - if(!((species.flags & NO_PAIN) || (status & ORGAN_ROBOT))) + if(!((species.flags & NO_PAIN) || (robotic >= ORGAN_ROBOT))) owner.emote("scream") //getting hit on broken hand hurts if(used_weapon) add_autopsy_data("[used_weapon]", brute + burn) - var/can_cut = (prob(brute*2) || sharp) && !(status & ORGAN_ROBOT) + var/can_cut = (prob(brute*2) || sharp) && (robotic < ORGAN_ROBOT) // If the limbs can break, make sure we don't exceed the maximum damage a limb can take before breaking // Non-vital organs are limited to max_damage. You can't kill someone by bludeonging their arm all the way to 200 -- you can @@ -249,7 +257,10 @@ if(is_damageable(brute + burn) || !config.limbs_can_break) if(brute) if(can_cut) - createwound( CUT, brute ) + if(sharp && !edge) + createwound( PIERCE, brute ) + else + createwound( CUT, brute ) else createwound( BRUISE, brute ) if(burn) @@ -263,7 +274,10 @@ if (brute > 0) //Inflict all burte damage we can if(can_cut) - createwound( CUT, min(brute,can_inflict) ) + if(sharp && !edge) + createwound( PIERCE, min(brute,can_inflict) ) + else + createwound( CUT, min(brute,can_inflict) ) else createwound( BRUISE, min(brute,can_inflict) ) var/temp = can_inflict @@ -317,7 +331,7 @@ return update_icon() /obj/item/organ/external/proc/heal_damage(brute, burn, internal = 0, robo_repair = 0) - if(status & ORGAN_ROBOT && !robo_repair) + if(robotic >= ORGAN_ROBOT && !robo_repair) return //Heal damage on the individual wounds @@ -326,27 +340,73 @@ break // heal brute damage - if(W.damage_type == CUT || W.damage_type == BRUISE) - brute = W.heal_damage(brute) - else if(W.damage_type == BURN) + if(W.damage_type == BURN) burn = W.heal_damage(burn) + else + brute = W.heal_damage(brute) if(internal) status &= ~ORGAN_BROKEN //Sync the organ's damage with its wounds src.update_damages() + src.update_wounds() owner.updatehealth() var/result = update_icon() return result +//Helper proc used by various tools for repairing robot limbs +/obj/item/organ/external/proc/robo_repair(var/repair_amount, var/damage_type, var/damage_desc, obj/item/tool, mob/living/user) + if((src.robotic < ORGAN_ROBOT)) + return 0 + + var/damage_amount + switch(damage_type) + if(BRUTE) damage_amount = brute_dam + if(BURN) damage_amount = burn_dam + else return 0 + + if(!damage_amount) + user << "Nothing to fix!" + return 0 + + if(damage_amount >= ROBOLIMB_SELF_REPAIR_CAP) + user << "The damage is far too severe to patch over externally." + return 0 + + if(user == src.owner) + var/grasp + if(user.l_hand == tool && (src.body_part & (ARM_LEFT|HAND_LEFT))) + grasp = "l_hand" + else if(user.r_hand == tool && (src.body_part & (ARM_RIGHT|HAND_RIGHT))) + grasp = "r_hand" + + if(grasp) + user << "You can't reach your [src.name] while holding [tool] in your [owner.get_bodypart_name(grasp)]." + return 0 + + user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) + if(!do_mob(user, owner, 10)) + user << "You must stand still to do that." + return 0 + + switch(damage_type) + if(BRUTE) src.heal_damage(repair_amount, 0, 0, 1) + if(BURN) src.heal_damage(0, repair_amount, 0, 1) + if(user == src.owner) + user.visible_message("\The [user] patches [damage_desc] on \his [src.name] with [tool].") + else + user.visible_message("\The [user] patches [damage_desc] on [owner]'s [src.name] with [tool].") + + return 1 + + /* This function completely restores a damaged organ to perfect condition. */ /obj/item/organ/external/rejuvenate(var/ignore_prosthetic_prefs) damage_state = "00" - status = 0 brute_dam = 0 burn_dam = 0 @@ -397,7 +457,7 @@ This function completely restores a damaged organ to perfect condition. //moved this before the open_wound check so that having many small wounds for example doesn't somehow protect you from taking internal damage (because of the return) //Possibly trigger an internal wound, too. var/local_damage = brute_dam + burn_dam + damage - if(damage > 15 && type != BURN && local_damage > 30 && prob(damage) && !(status & ORGAN_ROBOT)) + if(damage > 15 && type != BURN && local_damage > 30 && prob(damage) && (robotic < ORGAN_ROBOT)) var/datum/wound/internal_bleeding/I = new (min(damage - 15, 15)) wounds += I owner.custom_pain("You feel something rip in your [name]!", 1) @@ -415,7 +475,7 @@ This function completely restores a damaged organ to perfect condition. var/datum/wound/W = pick(compatible_wounds) W.open_wound(damage) if(prob(25)) - if(status & ORGAN_ROBOT) + if(robotic >= ORGAN_ROBOT) owner.visible_message("The damage to [owner.name]'s [name] worsens.",\ "The damage to your [name] worsens.",\ "You hear the screech of abused metal.") @@ -453,7 +513,7 @@ This function completely restores a damaged organ to perfect condition. /obj/item/organ/external/proc/need_process() if(status & (ORGAN_CUT_AWAY|ORGAN_BLEEDING|ORGAN_BROKEN|ORGAN_DESTROYED|ORGAN_SPLINTED|ORGAN_DEAD|ORGAN_MUTATED)) return 1 - if(brute_dam || burn_dam) + if((brute_dam || burn_dam) && (robotic < ORGAN_ROBOT)) //Robot limbs don't autoheal and thus don't need to process when damaged return 1 if(last_dam != brute_dam + burn_dam) // Process when we are fully healed up. last_dam = brute_dam + burn_dam @@ -509,7 +569,7 @@ Note that amputating the affected organ does in fact remove the infection from t */ /obj/item/organ/external/proc/update_germs() - if(status & (ORGAN_ROBOT) || (owner.species && owner.species.flags & IS_PLANT)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs. + if(robotic >= ORGAN_ROBOT || (owner.species && owner.species.flags & IS_PLANT)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs. germ_level = 0 return @@ -567,12 +627,12 @@ Note that amputating the affected organ does in fact remove the infection from t //spread the infection to child and parent organs if (children) for (var/obj/item/organ/external/child in children) - if (child.germ_level < germ_level && !(child.status & ORGAN_ROBOT)) + if (child.germ_level < germ_level && (child.robotic < ORGAN_ROBOT)) if (child.germ_level < INFECTION_LEVEL_ONE*2 || prob(30)) child.germ_level++ if (parent) - if (parent.germ_level < germ_level && !(parent.status & ORGAN_ROBOT)) + if (parent.germ_level < germ_level && (parent.robotic < ORGAN_ROBOT)) if (parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30)) parent.germ_level++ @@ -588,7 +648,10 @@ Note that amputating the affected organ does in fact remove the infection from t //Updating wounds. Handles wound natural I had some free spachealing, internal bleedings and infections /obj/item/organ/external/proc/update_wounds() - if((status & ORGAN_ROBOT)) //Robotic limbs don't heal or get worse. + if((robotic >= ORGAN_ROBOT)) //Robotic limbs don't heal or get worse. + for(var/datum/wound/W in wounds) //Repaired wounds disappear though + if(W.damage <= 0) //and they disappear right away + wounds -= W //TODO: robot wounds for robot limbs return for(var/datum/wound/W in wounds) @@ -653,12 +716,12 @@ Note that amputating the affected organ does in fact remove the infection from t //update damage counts for(var/datum/wound/W in wounds) if(!W.internal) //so IB doesn't count towards crit/paincrit - if(W.damage_type == CUT || W.damage_type == BRUISE) - brute_dam += W.damage - else if(W.damage_type == BURN) + if(W.damage_type == BURN) burn_dam += W.damage + else + brute_dam += W.damage - if(!(status & ORGAN_ROBOT) && W.bleeding() && (H && H.should_have_organ(O_HEART))) + if(!(robotic >= ORGAN_ROBOT) && W.bleeding() && (H && !H.should_have_organ(O_HEART))) W.bleed_timer-- status |= ORGAN_BLEEDING @@ -671,7 +734,7 @@ Note that amputating the affected organ does in fact remove the infection from t status |= ORGAN_BLEEDING //Bone fractures - if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT)) + if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(robotic >= ORGAN_ROBOT)) src.fracture() // new damage icon system @@ -719,10 +782,13 @@ Note that amputating the affected organ does in fact remove the infection from t if(cannot_amputate || !owner) return + if(disintegrate == DROPLIMB_EDGE && nonsolid) + disintegrate = DROPLIMB_BLUNT //splut + switch(disintegrate) if(DROPLIMB_EDGE) if(!clean) - var/gore_sound = "[(status & ORGAN_ROBOT) ? "tortured metal" : "ripping tendons and flesh"]" + var/gore_sound = "[(robotic >= ORGAN_ROBOT) ? "tortured metal" : "ripping tendons and flesh"]" owner.visible_message( "\The [owner]'s [src.name] flies off in an arc!",\ "Your [src.name] goes flying off!",\ @@ -730,7 +796,7 @@ Note that amputating the affected organ does in fact remove the infection from t if(DROPLIMB_BURN) if(cannot_gib) return - var/gore = "[(status & ORGAN_ROBOT) ? "": " of burning flesh"]" + var/gore = "[(robotic >= ORGAN_ROBOT) ? "": " of burning flesh"]" owner.visible_message( "\The [owner]'s [src.name] flashes away into ashes!",\ "Your [src.name] flashes away into ashes!",\ @@ -738,8 +804,8 @@ Note that amputating the affected organ does in fact remove the infection from t if(DROPLIMB_BLUNT) if(cannot_gib) return - var/gore = "[(status & ORGAN_ROBOT) ? "": " in shower of gore"]" - var/gore_sound = "[(status & ORGAN_ROBOT) ? "rending sound of tortured metal" : "sickening splatter of gore"]" + var/gore = "[(robotic >= ORGAN_ROBOT) ? "": " in shower of gore"]" + var/gore_sound = "[(status >= ORGAN_ROBOT) ? "rending sound of tortured metal" : "sickening splatter of gore"]" owner.visible_message( "\The [owner]'s [src.name] explodes[gore]!",\ "Your [src.name] explodes[gore]!",\ @@ -747,10 +813,13 @@ Note that amputating the affected organ does in fact remove the infection from t var/mob/living/carbon/human/victim = owner //Keep a reference for post-removed(). var/obj/item/organ/external/parent_organ = parent + + var/use_flesh_colour = species.get_flesh_colour(owner) + var/use_blood_colour = species.get_blood_colour(owner) + removed(null, ignore_children) victim.traumatic_shock += 60 - wounds.Cut() if(parent_organ) var/datum/wound/lost_limb/W = new (src, disintegrate, clean) if(clean) @@ -758,7 +827,7 @@ Note that amputating the affected organ does in fact remove the infection from t parent_organ.update_damages() else var/obj/item/organ/external/stump/stump = new (victim, 0, src) - if(status & ORGAN_ROBOT) + if(robotic >= ORGAN_ROBOT) stump.robotize() stump.wounds |= W victim.organs |= stump @@ -790,15 +859,13 @@ Note that amputating the affected organ does in fact remove the infection from t qdel(src) if(DROPLIMB_BLUNT) var/obj/effect/decal/cleanable/blood/gibs/gore - if(status & ORGAN_ROBOT) + if(robotic >= ORGAN_ROBOT) gore = new /obj/effect/decal/cleanable/blood/gibs/robot(get_turf(victim)) else gore = new /obj/effect/decal/cleanable/blood/gibs(get_turf(victim)) if(species) - if(species.get_flesh_colour()) - gore.fleshcolor = species.get_flesh_colour() - if(species.get_blood_colour()) - gore.basecolor = species.get_blood_colour() + gore.fleshcolor = use_flesh_colour + gore.basecolor = use_blood_colour gore.update_icon() gore.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30) @@ -833,22 +900,53 @@ Note that amputating the affected organ does in fact remove the infection from t holder.visible_message(\ "\The [holder.handcuffed.name] falls off of [holder.name].",\ "\The [holder.handcuffed.name] falls off you.") - holder.removeItem(holder.handcuffed, force = 1) + holder.drop_from_inventory(holder.handcuffed) if (holder.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT)) holder.visible_message(\ "\The [holder.legcuffed.name] falls off of [holder.name].",\ "\The [holder.legcuffed.name] falls off you.") - holder.removeItem(holder.legcuffed, force = 1) + holder.drop_from_inventory(holder.legcuffed) + +// checks if all wounds on the organ are bandaged +/obj/item/organ/external/proc/is_bandaged() + for(var/datum/wound/W in wounds) + if(W.internal) continue + if(!W.bandaged) + return 0 + return 1 + +// checks if all wounds on the organ are salved +/obj/item/organ/external/proc/is_salved() + for(var/datum/wound/W in wounds) + if(W.internal) continue + if(!W.salved) + return 0 + return 1 + +// checks if all wounds on the organ are disinfected +/obj/item/organ/external/proc/is_disinfected() + for(var/datum/wound/W in wounds) + if(W.internal) continue + if(!W.disinfected) + return 0 + return 1 /obj/item/organ/external/proc/bandage() var/rval = 0 - src.status &= ~ORGAN_BLEEDING + status &= ~ORGAN_BLEEDING for(var/datum/wound/W in wounds) if(W.internal) continue rval |= !W.bandaged W.bandaged = 1 return rval +/obj/item/organ/external/proc/salve() + var/rval = 0 + for(var/datum/wound/W in wounds) + rval |= !W.salved + W.salved = 1 + return rval + /obj/item/organ/external/proc/disinfect() var/rval = 0 for(var/datum/wound/W in wounds) @@ -867,15 +965,8 @@ Note that amputating the affected organ does in fact remove the infection from t W.clamped = 1 return rval -/obj/item/organ/external/proc/salve() - var/rval = 0 - for(var/datum/wound/W in wounds) - rval |= !W.salved - W.salved = 1 - return rval - /obj/item/organ/external/proc/fracture() - if(status & ORGAN_ROBOT) + if(robotic >= ORGAN_ROBOT) return //ORGAN_BROKEN doesn't have the same meaning for robot limbs if((status & ORGAN_BROKEN) || cannot_break) return @@ -915,7 +1006,7 @@ Note that amputating the affected organ does in fact remove the infection from t return /obj/item/organ/external/proc/mend_fracture() - if(status & ORGAN_ROBOT) + if(robotic >= ORGAN_ROBOT) return 0 //ORGAN_BROKEN doesn't have the same meaning for robot limbs if(brute_dam > min_broken_damage * config.organ_health_multiplier) return 0 //will just immediately fracture again @@ -925,7 +1016,7 @@ Note that amputating the affected organ does in fact remove the infection from t /obj/item/organ/external/robotize(var/company, var/skip_prosthetics = 0, var/keep_organs = 0) - if(status & ORGAN_ROBOT) + if(robotic >= ORGAN_ROBOT) return ..() @@ -970,7 +1061,7 @@ Note that amputating the affected organ does in fact remove the infection from t return 1 /obj/item/organ/external/proc/mutate() - if(src.status & ORGAN_ROBOT) + if(src.robotic >= ORGAN_ROBOT) return src.status |= ORGAN_MUTATED if(owner) owner.update_body() @@ -992,7 +1083,7 @@ Note that amputating the affected organ does in fact remove the infection from t return !is_dislocated() && !(status & (ORGAN_MUTATED|ORGAN_DEAD)) /obj/item/organ/external/proc/is_malfunctioning() - return ((status & ORGAN_ROBOT) && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam)) + return ((robotic >= ORGAN_ROBOT) && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam)) /obj/item/organ/external/proc/embed(var/obj/item/weapon/W, var/silent = 0) if(!owner || loc != owner) @@ -1005,14 +1096,14 @@ Note that amputating the affected organ does in fact remove the infection from t W.add_blood(owner) if(ismob(W.loc)) var/mob/living/H = W.loc - H.removeItem(W) + H.drop_from_inventory(W) W.loc = owner /obj/item/organ/external/removed(var/mob/living/user, var/ignore_children = 0) if(!owner) return - var/is_robotic = status & ORGAN_ROBOT + var/is_robotic = robotic >= ORGAN_ROBOT var/mob/living/carbon/human/victim = owner ..() @@ -1084,21 +1175,27 @@ Note that amputating the affected organ does in fact remove the infection from t if(status & ORGAN_DESTROYED && !is_stump()) . += "tear at [amputation_point] so severe that it hangs by a scrap of flesh" - if(status & ORGAN_ROBOT) + if(robotic >= ORGAN_ROBOT) if(brute_dam) switch(brute_dam) if(0 to 20) - . += " some dents" + . += "some dents" if(21 to INFINITY) - . += pick(" a lot of dents"," severe denting") + . += pick("a lot of dents","severe denting") if(brute_dam && burn_dam) - . += " and" + . += " and " if(burn_dam) switch(burn_dam) if(0 to 20) - . += " some burns" + . += "some burns" if(21 to INFINITY) - . += pick(" a lot of burns"," severe melting") + . += pick("a lot of burns","severe melting") + if(open) + if(brute_dam || burn_dam) + . += " and an open panel" + else + . += "an open panel" + return var/list/wound_descriptors = list() diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index ffcb3f32e16..98cce7efd39 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -16,7 +16,7 @@ var/global/list/limb_icon_cache = list() s_tone = null s_col = null h_col = null - if(status & ORGAN_ROBOT) + if(robotic >= ORGAN_ROBOT) return if(species && human.species && species.name != human.species.name) return @@ -30,7 +30,7 @@ var/global/list/limb_icon_cache = list() s_tone = null s_col = null h_col = null - if(status & ORGAN_ROBOT) + if(robotic >= ORGAN_ROBOT) return if(!isnull(dna.GetUIValue(DNA_UI_SKIN_TONE)) && (species.appearance_flags & HAS_SKIN_TONE)) s_tone = dna.GetUIValue(DNA_UI_SKIN_TONE) @@ -71,7 +71,7 @@ var/global/list/limb_icon_cache = list() if(owner.f_style) var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style] - if(facial_hair_style && facial_hair_style.species_allowed && (species.get_bodytype() in facial_hair_style.species_allowed)) + if(facial_hair_style && facial_hair_style.species_allowed && (species.get_bodytype(owner) 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(owner.r_facial, owner.g_facial, owner.b_facial), ICON_ADD) @@ -79,7 +79,7 @@ var/global/list/limb_icon_cache = list() if(owner.h_style && !(owner.head && (owner.head.flags_inv & BLOCKHEADHAIR))) var/datum/sprite_accessory/hair_style = hair_styles_list[owner.h_style] - if(hair_style && (species.get_bodytype() in hair_style.species_allowed)) + if(hair_style && (species.get_bodytype(owner) in hair_style.species_allowed)) var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s") if(hair_style.do_colouration && islist(h_col) && h_col.len >= 3) hair_s.Blend(rgb(h_col[1], h_col[2], h_col[3]), ICON_ADD) @@ -110,39 +110,50 @@ var/global/list/limb_icon_cache = list() if(skeletal) mob_icon = new /icon('icons/mob/human_races/r_skeleton.dmi', "[icon_name][gender ? "_[gender]" : ""]") - else if (status & ORGAN_ROBOT) + else if (robotic >= ORGAN_ROBOT) mob_icon = new /icon('icons/mob/human_races/robotic.dmi', "[icon_name][gender ? "_[gender]" : ""]") else - if (status & ORGAN_MUTATED) - mob_icon = new /icon(species.deform, "[icon_name][gender ? "_[gender]" : ""]") - else - mob_icon = new /icon(species.icobase, "[icon_name][gender ? "_[gender]" : ""]") - - if(status & ORGAN_DEAD) - mob_icon.ColorTone(rgb(10,50,0)) - mob_icon.SetIntensity(0.7) - - if(!isnull(s_tone)) - if(s_tone >= 0) - mob_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) - else - mob_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) - else if(s_col && s_col.len >= 3) - mob_icon.Blend(rgb(s_col[1], s_col[2], s_col[3]), ICON_ADD) + mob_icon = new /icon(species.get_icobase(owner, (status & ORGAN_MUTATED)), "[icon_name][gender ? "_[gender]" : ""]") + apply_colouration(mob_icon) if(body_hair && islist(h_col) && h_col.len >= 3) var/cache_key = "[body_hair]-[icon_name]-[h_col[1]][h_col[2]][h_col[3]]" if(!limb_icon_cache[cache_key]) - var/icon/I = icon(species.icobase, "[icon_name]_[body_hair]") + var/icon/I = icon(species.get_icobase(owner), "[icon_name]_[body_hair]") I.Blend(rgb(h_col[1],h_col[2],h_col[3]), ICON_ADD) limb_icon_cache[cache_key] = I mob_icon.Blend(limb_icon_cache[cache_key], ICON_OVERLAY) dir = EAST icon = mob_icon - return mob_icon +/obj/item/organ/external/proc/apply_colouration(var/icon/applying) + + if(nonsolid) + applying.MapColors("#4D4D4D","#969696","#1C1C1C", "#000000") + if(species && species.get_bodytype(owner) != "Human") + applying.SetIntensity(1.5) // Unathi, Taj and Skrell have -very- dark base icons. + else + applying.SetIntensity(0.7) + + else if(status & ORGAN_DEAD) + applying.ColorTone(rgb(10,50,0)) + applying.SetIntensity(0.7) + + if(!isnull(s_tone)) + if(s_tone >= 0) + applying.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) + else + applying.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) + else if(s_col && s_col.len >= 3) + applying.Blend(rgb(s_col[1], s_col[2], s_col[3]), ICON_ADD) + + // Translucency. + if(nonsolid) applying += rgb(,,,180) // SO INTUITIVE TY BYOND + + return applying + // new damage icon system // adjusted to set damage_state to brute/burn code only (without r_name0 as before) /obj/item/organ/external/update_icon() diff --git a/code/modules/organs/organ_stump.dm b/code/modules/organs/organ_stump.dm index ef1fffd01bd..3eb2c15e0ab 100644 --- a/code/modules/organs/organ_stump.dm +++ b/code/modules/organs/organ_stump.dm @@ -14,7 +14,7 @@ ..(holder, internal) if(istype(limb)) max_damage = limb.max_damage - if((limb.status & ORGAN_ROBOT) && (!parent || (parent.status & ORGAN_ROBOT))) + if((limb.robotic >= ORGAN_ROBOT) && (!parent || (parent.robotic >= ORGAN_ROBOT))) robotize() //if both limb and the parent are robotic, the stump is robotic too /obj/item/organ/external/stump/is_stump() diff --git a/code/modules/organs/pain.dm b/code/modules/organs/pain.dm index 280ea53f491..ea9499fc436 100644 --- a/code/modules/organs/pain.dm +++ b/code/modules/organs/pain.dm @@ -82,7 +82,7 @@ mob/living/carbon/human/proc/handle_pain() var/maxdam = 0 var/obj/item/organ/external/damaged_organ = null for(var/obj/item/organ/external/E in organs) - if(E.status & (ORGAN_DEAD|ORGAN_ROBOT)) continue + if((E.status & ORGAN_DEAD) || E.robotic >= ORGAN_ROBOT) continue var/dam = E.get_damage() // make the choice of the organ depend on damage, // but also sometimes use one of the less damaged ones @@ -94,7 +94,7 @@ mob/living/carbon/human/proc/handle_pain() // Damage to internal organs hurts a lot. for(var/obj/item/organ/I in internal_organs) - if(I.status & (ORGAN_DEAD|ORGAN_ROBOT)) continue + if((I.status & ORGAN_DEAD) || I.robotic >= ORGAN_ROBOT) continue if(I.damage > 2) if(prob(2)) var/obj/item/organ/external/parent = get_organ(I.parent_organ) src.custom_pain("You feel a sharp pain in your [parent.name]", 1) diff --git a/code/modules/organs/subtypes/diona.dm b/code/modules/organs/subtypes/diona.dm index c74f1199e77..344ba2f05a0 100644 --- a/code/modules/organs/subtypes/diona.dm +++ b/code/modules/organs/subtypes/diona.dm @@ -126,7 +126,7 @@ //DIONA ORGANS. /obj/item/organ/external/diona/removed() - if(status & ORGAN_ROBOT) + if(robotic >= ORGAN_ROBOT) return ..() var/mob/living/carbon/human/H = owner ..() @@ -142,7 +142,7 @@ organ_tag = "special" // Turns into a nymph instantly, no transplanting possible. /obj/item/organ/internal/diona/removed(var/mob/living/user, var/skip_nymph) - if(status & ORGAN_ROBOT) + if(robotic >= ORGAN_ROBOT) return ..() var/mob/living/carbon/human/H = owner ..() diff --git a/code/modules/organs/subtypes/machine.dm b/code/modules/organs/subtypes/machine.dm index 723ca8856fc..04544035c08 100644 --- a/code/modules/organs/subtypes/machine.dm +++ b/code/modules/organs/subtypes/machine.dm @@ -75,7 +75,7 @@ var/mob/living/holder_mob = loc if(istype(holder_mob)) - holder_mob.removeItem(src) + holder_mob.drop_from_inventory(src) qdel(src) /obj/item/organ/internal/mmi_holder/posibrain diff --git a/code/modules/organs/subtypes/unbreakable.dm b/code/modules/organs/subtypes/unbreakable.dm index 137249e7473..9492d330e13 100644 --- a/code/modules/organs/subtypes/unbreakable.dm +++ b/code/modules/organs/subtypes/unbreakable.dm @@ -1,4 +1,3 @@ -// Slime limbs. /obj/item/organ/external/chest/unbreakable cannot_break = 1 dislocated = -1 @@ -42,3 +41,48 @@ /obj/item/organ/external/head/unbreakable cannot_break = 1 dislocated = -1 + +// Slime limbs. +/obj/item/organ/external/chest/unbreakable/slime + nonsolid = 1 + max_damage = 50 + +/obj/item/organ/external/groin/unbreakable/slime + nonsolid = 1 + max_damage = 30 + +/obj/item/organ/external/arm/unbreakable/slime + nonsolid = 1 + max_damage = 15 + +/obj/item/organ/external/arm/right/unbreakable/slime + nonsolid = 1 + max_damage = 15 + +/obj/item/organ/external/leg/unbreakable/slime + nonsolid = 1 + max_damage = 15 + +/obj/item/organ/external/leg/right/unbreakable/slime + nonsolid = 1 + max_damage = 15 + +/obj/item/organ/external/foot/unbreakable/slime + nonsolid = 1 + max_damage = 5 + +/obj/item/organ/external/foot/right/unbreakable/slime + nonsolid = 1 + max_damage = 5 + +/obj/item/organ/external/hand/unbreakable/slime + nonsolid = 1 + max_damage = 5 + +/obj/item/organ/external/hand/right/unbreakable/slime + nonsolid = 1 + max_damage = 5 + +/obj/item/organ/external/head/unbreakable/slime + nonsolid = 1 + max_damage = 15 diff --git a/code/modules/organs/wound.dm b/code/modules/organs/wound.dm index 850f5114c03..2c97bf4cfc0 100644 --- a/code/modules/organs/wound.dm +++ b/code/modules/organs/wound.dm @@ -13,6 +13,8 @@ var/damage = 0 // ticks of bleeding left. var/bleed_timer = 0 + // Above this amount wounds you will need to treat the wound to stop bleeding, regardless of bleed_timer + var/bleed_threshold = 30 // amount of damage the current wound type requires(less means we need to apply the next healing stage) var/min_damage = 0 @@ -38,7 +40,7 @@ var/internal = 0 // maximum stage at which bleeding should still happen. Beyond this stage bleeding is prevented. var/max_bleeding_stage = 0 - // one of CUT, BRUISE, BURN + // one of CUT, PIERCE, BRUISE, BURN var/damage_type = CUT // whether this wound needs a bandage/salve to heal at all // the maximum amount of damage that this wound can have and still autoheal @@ -140,6 +142,15 @@ return 0 + proc/bandage() + bandaged = 1 + + proc/salve() + salved = 1 + + proc/disinfect() + disinfected = 1 + // heal the given amount of damage, and if the given amount of damage was more // than what needed to be healed, return how much heal was left // set @heals_internal to also heal internal organ damage @@ -178,7 +189,7 @@ return 0 //incompatible damage types if (src.amount > 1) - return 0 + return 0//merged wounds cannot be worsened. //with 1.5*, a shallow cut will be able to carry at most 30 damage, //37.5 for a deep cut @@ -199,10 +210,10 @@ if (bandaged||clamped) return 0 - if (wound_damage() <= 30 && bleed_timer <= 0) - return 0 //Bleed timer has run out. Wounds with more than 30 damage don't stop bleeding on their own. + if (bleed_timer <= 0 && wound_damage() <= bleed_threshold) + return 0 //Bleed timer has run out. Once a wound is big enough though, you'll need a bandage to stop it - return (damage_type == BRUISE && wound_damage() >= 20 || damage_type == CUT && wound_damage() >= 5) + return 1 /** WOUND DEFINITIONS **/ @@ -226,6 +237,18 @@ return /datum/wound/cut/deep if(0 to 15) return /datum/wound/cut/small + if(PIERCE) + switch(damage) + if(60 to INFINITY) + return /datum/wound/puncture/massive + if(50 to 60) + return /datum/wound/puncture/gaping_big + if(30 to 50) + return /datum/wound/puncture/gaping + if(15 to 30) + return /datum/wound/puncture/flesh + if(0 to 15) + return /datum/wound/puncture/small if(BRUISE) return /datum/wound/bruise if(BURN) @@ -243,67 +266,101 @@ return null //no wound /** CUTS **/ +/datum/wound/cut + bleed_threshold = 5 + damage_type = CUT + /datum/wound/cut/small // link wound descriptions to amounts of damage // Minor cuts have max_bleeding_stage set to the stage that bears the wound type's name. // The major cut types have the max_bleeding_stage set to the clot stage (which is accordingly given the "blood soaked" descriptor). max_bleeding_stage = 3 stages = list("ugly ripped cut" = 20, "ripped cut" = 10, "cut" = 5, "healing cut" = 2, "small scab" = 0) - damage_type = CUT /datum/wound/cut/deep max_bleeding_stage = 3 stages = list("ugly deep ripped cut" = 25, "deep ripped cut" = 20, "deep cut" = 15, "clotted cut" = 8, "scab" = 2, "fresh skin" = 0) - damage_type = CUT /datum/wound/cut/flesh max_bleeding_stage = 4 stages = list("ugly ripped flesh wound" = 35, "ugly flesh wound" = 30, "flesh wound" = 25, "blood soaked clot" = 15, "large scab" = 5, "fresh skin" = 0) - damage_type = CUT /datum/wound/cut/gaping max_bleeding_stage = 3 stages = list("gaping wound" = 50, "large blood soaked clot" = 25, "blood soaked clot" = 15, "small angry scar" = 5, "small straight scar" = 0) - damage_type = CUT /datum/wound/cut/gaping_big max_bleeding_stage = 3 stages = list("big gaping wound" = 60, "healing gaping wound" = 40, "large blood soaked clot" = 25, "large angry scar" = 10, "large straight scar" = 0) - damage_type = CUT datum/wound/cut/massive max_bleeding_stage = 3 stages = list("massive wound" = 70, "massive healing wound" = 50, "massive blood soaked clot" = 25, "massive angry scar" = 10, "massive jagged scar" = 0) - damage_type = CUT + +/** PUNCTURES **/ +/datum/wound/puncture + bleed_threshold = 5 + damage_type = PIERCE + +/datum/wound/puncture/can_worsen(damage_type, damage) + return 0 //puncture wounds cannot be enlargened + +/datum/wound/puncture/small + max_bleeding_stage = 2 + stages = list("puncture" = 5, "healing puncture" = 2, "small scab" = 0) + damage_type = PIERCE + +/datum/wound/puncture/flesh + max_bleeding_stage = 2 + stages = list("puncture wound" = 15, "blood soaked clot" = 5, "large scab" = 2, "small round scar" = 0) + damage_type = PIERCE + +/datum/wound/puncture/gaping + max_bleeding_stage = 3 + stages = list("gaping hole" = 30, "large blood soaked clot" = 15, "blood soaked clot" = 10, "small angry scar" = 5, "small round scar" = 0) + damage_type = PIERCE + +/datum/wound/puncture/gaping_big + max_bleeding_stage = 3 + stages = list("big gaping hole" = 50, "healing gaping hole" = 20, "large blood soaked clot" = 15, "large angry scar" = 10, "large round scar" = 0) + damage_type = PIERCE + +datum/wound/puncture/massive + max_bleeding_stage = 3 + stages = list("massive wound" = 60, "massive healing wound" = 30, "massive blood soaked clot" = 25, "massive angry scar" = 10, "massive jagged scar" = 0) + damage_type = PIERCE /** BRUISES **/ /datum/wound/bruise stages = list("monumental bruise" = 80, "huge bruise" = 50, "large bruise" = 30, "moderate bruise" = 20, "small bruise" = 10, "tiny bruise" = 5) + bleed_threshold = 20 max_bleeding_stage = 3 //only large bruise and above can bleed. autoheal_cutoff = 30 damage_type = BRUISE /** BURNS **/ +/datum/wound/burn + damage_type = BURN + max_bleeding_stage = 0 + +/datum/wound/burn/bleeding() + return 0 + /datum/wound/burn/moderate stages = list("ripped burn" = 10, "moderate burn" = 5, "healing moderate burn" = 2, "fresh skin" = 0) - damage_type = BURN /datum/wound/burn/large stages = list("ripped large burn" = 20, "large burn" = 15, "healing large burn" = 5, "fresh skin" = 0) - damage_type = BURN /datum/wound/burn/severe stages = list("ripped severe burn" = 35, "severe burn" = 30, "healing severe burn" = 10, "burn scar" = 0) - damage_type = BURN /datum/wound/burn/deep stages = list("ripped deep burn" = 45, "deep burn" = 40, "healing deep burn" = 15, "large burn scar" = 0) - damage_type = BURN /datum/wound/burn/carbonised stages = list("carbonised area" = 50, "healing carbonised area" = 20, "massive burn scar" = 0) - damage_type = BURN /** INTERNAL BLEEDING **/ /datum/wound/internal_bleeding @@ -318,15 +375,15 @@ datum/wound/cut/massive /datum/wound/lost_limb/New(var/obj/item/organ/external/lost_limb, var/losstype, var/clean) var/damage_amt = lost_limb.max_damage if(clean) damage_amt /= 2 - + switch(losstype) if(DROPLIMB_EDGE, DROPLIMB_BLUNT) damage_type = CUT max_bleeding_stage = 3 //clotted stump and above can bleed. stages = list( "ripped stump" = damage_amt*1.3, - "bloody stump" = damage_amt, - "clotted stump" = damage_amt*0.5, + "bloody stump" = damage_amt, + "clotted stump" = damage_amt*0.5, "scarred stump" = 0 ) if(DROPLIMB_BURN) @@ -337,7 +394,7 @@ datum/wound/cut/massive "scarred stump" = damage_amt*0.5, "scarred stump" = 0 ) - + ..(damage_amt) /datum/wound/lost_limb/can_merge(var/datum/wound/other) diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 6862e16c615..a0f515ac130 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -14,7 +14,6 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins use_power = 1 idle_power_usage = 30 active_power_usage = 200 - frame_type = "fax" var/obj/item/weapon/card/id/scan = null // identification var/authenticated = 0 @@ -29,6 +28,16 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins if( !(("[department]" in alldepartments) || ("[department]" in admin_departments)) ) alldepartments |= department +/obj/machinery/photocopier/faxmachine/map/New() + ..() + circuit = new circuit(src) + component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) + component_parts += new /obj/item/weapon/stock_parts/motor(src) + component_parts += new /obj/item/weapon/stock_parts/micro_laser(src) + component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) + RefreshParts() + /obj/machinery/photocopier/faxmachine/attack_hand(mob/user as mob) user.set_machine(src) @@ -113,7 +122,8 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins scan = null else var/obj/item/I = usr.get_active_hand() - if (istype(I, /obj/item/weapon/card/id) && usr.removeItem(I, src)) + if (istype(I, /obj/item/weapon/card/id) && usr.unEquip(I)) + I.loc = src scan = I authenticated = 0 diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 9ca7d1f0317..bb4a9d1a23f 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -307,7 +307,7 @@ "You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.") if(user.get_inactive_hand() == src) - user.removeItem(src) + user.drop_from_inventory(src) new /obj/effect/decal/cleanable/ash(src.loc) qdel(src) @@ -415,23 +415,23 @@ B.name = name else if (P.name != "paper" && P.name != "photo") B.name = P.name - user.removeItem(P) + user.drop_from_inventory(P) if (istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/h_user = user if (h_user.r_hand == src) - h_user.removeItem(src) + h_user.drop_from_inventory(src) h_user.put_in_r_hand(B) else if (h_user.l_hand == src) - h_user.removeItem(src) + h_user.drop_from_inventory(src) h_user.put_in_l_hand(B) else if (h_user.l_store == src) - h_user.removeItem(src) + h_user.drop_from_inventory(src) B.loc = h_user B.layer = 20 h_user.l_store = B h_user.update_inv_pockets() else if (h_user.r_store == src) - h_user.removeItem(src) + h_user.drop_from_inventory(src) B.loc = h_user B.layer = 20 h_user.r_store = B diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index d6aaec0936c..53110bed0fa 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -34,7 +34,7 @@ // merging bundles else if(istype(W, /obj/item/weapon/paper_bundle)) - user.removeItem(W) + user.drop_from_inventory(W) for(var/obj/O in W) O.loc = src O.add_fingerprint(usr) @@ -61,7 +61,8 @@ else if(istype(sheet, /obj/item/weapon/photo)) user << "You add [(sheet.name == "photo") ? "the photo" : sheet.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name]." - user.removeItem(sheet, src) + user.drop_from_inventory(sheet) + sheet.loc = src pages.Insert(index, sheet) @@ -84,7 +85,7 @@ "You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.") if(user.get_inactive_hand() == src) - user.removeItem(src) + user.drop_from_inventory(src) new /obj/effect/decal/cleanable/ash(src.loc) qdel(src) @@ -167,7 +168,7 @@ if(pages.len <= 1) var/obj/item/weapon/paper/P = src[1] - usr.removeItem(src) + usr.drop_from_inventory(src) usr.put_in_hands(P) qdel(src) @@ -205,7 +206,8 @@ O.loc = usr.loc O.layer = initial(O.layer) O.add_fingerprint(usr) - usr.deleteItem(src) + usr.drop_from_inventory(src) + qdel(src) return diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm index 96daf90c992..37cfdaa86b1 100644 --- a/code/modules/paperwork/papershredder.dm +++ b/code/modules/paperwork/papershredder.dm @@ -31,7 +31,8 @@ user << "\The [src] is full; please empty it before you continue." return paperamount += paper_result - user.deleteItem(W) + user.drop_from_inventory(W) + qdel(W) playsound(src.loc, 'sound/items/pshred.ogg', 75, 1) if(paperamount > max_paper) user <<"\The [src] was too full, and shredded paper goes everywhere!" @@ -118,7 +119,7 @@ /obj/item/weapon/shreddedp/proc/FireBurn() var/mob/living/M = loc if(istype(M)) - M.removeItem(src) + M.drop_from_inventory(src) PoolOrNew(/obj/effect/decal/cleanable/ash,get_turf(src)) qdel(src) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index f29883a54cd..dcee1fb3fa9 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -10,13 +10,13 @@ active_power_usage = 200 power_channel = EQUIP circuit = /obj/item/weapon/circuitboard/photocopier - frame_type = "photocopier" var/obj/item/copyitem = null //what's in the copier! var/copies = 1 //how many copies to print! var/toner = 30 //how much toner is left! woooooo~ var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier! -/obj/machinery/photocopier/New() +/obj/machinery/photocopier/map/New() + circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) component_parts += new /obj/item/weapon/stock_parts/motor(src) diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm index 26e3651c4d6..8c7af58346e 100644 --- a/code/modules/power/antimatter/control.dm +++ b/code/modules/power/antimatter/control.dm @@ -158,7 +158,8 @@ user << "\red There is already a [fueljar] inside!" return fueljar = W - user.removeItem(W, src) + user.remove_from_mob(W) + W.loc = src user.update_icons() user.visible_message("[user.name] loads an [W.name] into the [src.name].", \ "You load an [W.name].", \ diff --git a/code/modules/power/batteryrack.dm b/code/modules/power/batteryrack.dm index 2d7f38e3b99..203227e613b 100644 --- a/code/modules/power/batteryrack.dm +++ b/code/modules/power/batteryrack.dm @@ -16,7 +16,6 @@ /obj/machinery/power/smes/batteryrack/New() ..() - add_parts() RefreshParts() return diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index f467cf4dd53..e4bbbec5f6b 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -21,6 +21,27 @@ If d1 = 0 and d2 = dir, it's a O-X cable, getting from the center of the tile to If d1 = dir1 and d2 = dir2, it's a full X-X cable, getting from dir1 to dir2 By design, d1 is the smallest direction and d2 is the highest */ +var/list/possible_cable_coil_colours = list( + "White" = COLOR_WHITE, + "Silver" = COLOR_SILVER, + "Gray" = COLOR_GRAY, + "Black" = COLOR_BLACK, + "Red" = COLOR_RED, + "Maroon" = COLOR_MAROON, + "Yellow" = COLOR_YELLOW, + "Olive" = COLOR_OLIVE, + "Lime" = COLOR_GREEN, + "Green" = COLOR_LIME, + "Cyan" = COLOR_CYAN, + "Teal" = COLOR_TEAL, + "Blue" = COLOR_BLUE, + "Navy" = COLOR_NAVY, + "Pink" = COLOR_PINK, + "Purple" = COLOR_PURPLE, + "Orange" = COLOR_ORANGE, + "Beige" = COLOR_BEIGE, + "Brown" = COLOR_BROWN + ) /obj/structure/cable level = 1 @@ -464,6 +485,7 @@ obj/structure/cable/proc/cableColor(var/colorC) slot_flags = SLOT_BELT item_state = "coil" attack_verb = list("whipped", "lashed", "disciplined", "flogged") + stacktype = /obj/item/stack/cable_coil /obj/item/stack/cable_coil/cyborg name = "cable coil synthesizer" @@ -472,7 +494,6 @@ obj/structure/cable/proc/cableColor(var/colorC) matter = null uses_charge = 1 charge_costs = list(1) - stacktype = /obj/item/stack/cable_coil /obj/item/stack/cable_coil/suicide_act(mob/user) if(locate(/obj/item/weapon/stool) in user.loc) @@ -501,22 +522,16 @@ obj/structure/cable/proc/cableColor(var/colorC) var/mob/living/carbon/human/H = A var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting] - if(!S || !(S.status & ORGAN_ROBOT)) + if(!S || S.robotic < ORGAN_ROBOT || S.open == 3) return ..() - if(S.burn_dam) - if(S.burn_dam < ROBOLIMB_SELF_REPAIR_CAP) - S.heal_damage(0,15,0,1) - user.visible_message("\The [user] repairs some burn damage on \the [H]'s [S.name] with \the [src].") - else if(S.open < 3) - user << "The damage is far too severe to patch over externally." - else - return ..() - else - user << "Nothing to fix!" - return - return ..() + var/use_amt = min(src.amount, ceil(S.burn_dam/3), 5) + if(can_use(use_amt)) + if(S.robo_repair(3*use_amt, BURN, "some damaged wiring", src, user)) + src.use(use_amt) + else + return ..() /obj/item/stack/cable_coil/update_icon() if (!color) @@ -531,6 +546,17 @@ obj/structure/cable/proc/cableColor(var/colorC) icon_state = "coil" name = "cable coil" +/obj/item/stack/cable_coil/proc/set_cable_color(var/selected_color, var/user) + if(!selected_color) + return + + var/final_color = possible_cable_coil_colours[selected_color] + if(!final_color) + final_color = possible_cable_coil_colours["Red"] + selected_color = "red" + color = final_color + user << "You change \the [src]'s color to [lowertext(selected_color)]." + /obj/item/stack/cable_coil/proc/update_wclass() if(amount == 1) w_class = 1.0 @@ -571,42 +597,17 @@ obj/structure/cable/proc/cableColor(var/colorC) set name = "Change Colour" set category = "Object" - var/list/possible_colours = list ("Yellow", "Green", "Pink", "Blue", "Orange", "Cyan", "Red") - var/selected_type = input("Pick new colour.", "Cable Colour", null, null) as null|anything in possible_colours - - if(selected_type) - switch(selected_type) - if("Yellow") - color = COLOR_YELLOW - if("Green") - color = COLOR_LIME - if("Pink") - color = COLOR_PINK - if("Blue") - color = COLOR_BLUE - if("Orange") - color = COLOR_ORANGE - if("Cyan") - color = COLOR_CYAN - else - color = COLOR_RED - usr << "You change your cable coil's colour to [selected_type]" + var/selected_type = input("Pick new colour.", "Cable Colour", null, null) as null|anything in possible_cable_coil_colours + set_cable_color(selected_type, usr) // Items usable on a cable coil : // - Wirecutters : cut them duh ! // - Cable coil : merge cables -/obj/item/stack/cable_coil/proc/can_merge(var/obj/item/stack/cable_coil/C) - return color == C.color - -/obj/item/stack/cable_coil/cyborg/can_merge() - return 1 /obj/item/stack/cable_coil/transfer_to(obj/item/stack/cable_coil/S) if(!istype(S)) + world << 1 return - if(!can_merge(S)) - return - ..() /obj/item/stack/cable_coil/use() @@ -880,7 +881,51 @@ obj/structure/cable/proc/cableColor(var/colorC) stacktype = /obj/item/stack/cable_coil color = COLOR_WHITE +/obj/item/stack/cable_coil/silver + stacktype = /obj/item/stack/cable_coil + color = COLOR_SILVER + +/obj/item/stack/cable_coil/gray + stacktype = /obj/item/stack/cable_coil + color = COLOR_GRAY + +/obj/item/stack/cable_coil/black + stacktype = /obj/item/stack/cable_coil + color = COLOR_BLACK + +/obj/item/stack/cable_coil/maroon + stacktype = /obj/item/stack/cable_coil + color = COLOR_MAROON + +/obj/item/stack/cable_coil/olive + stacktype = /obj/item/stack/cable_coil + color = COLOR_OLIVE + +/obj/item/stack/cable_coil/lime + stacktype = /obj/item/stack/cable_coil + color = COLOR_LIME + +/obj/item/stack/cable_coil/teal + stacktype = /obj/item/stack/cable_coil + color = COLOR_TEAL + +/obj/item/stack/cable_coil/navy + stacktype = /obj/item/stack/cable_coil + color = COLOR_NAVY + +/obj/item/stack/cable_coil/purple + stacktype = /obj/item/stack/cable_coil + color = COLOR_PURPLE + +/obj/item/stack/cable_coil/beige + stacktype = /obj/item/stack/cable_coil + color = COLOR_BEIGE + +/obj/item/stack/cable_coil/brown + stacktype = /obj/item/stack/cable_coil + color = COLOR_BROWN + /obj/item/stack/cable_coil/random/New() stacktype = /obj/item/stack/cable_coil - color = pick(COLOR_RED, COLOR_BLUE, COLOR_LIME, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN) + color = pick(COLOR_RED, COLOR_BLUE, COLOR_LIME, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN, COLOR_SILVER, COLOR_GRAY, COLOR_BLACK, COLOR_MAROON, COLOR_OLIVE, COLOR_LIME, COLOR_TEAL, COLOR_NAVY, COLOR_PURPLE, COLOR_BEIGE, COLOR_BROWN) ..() \ No newline at end of file diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 540e5a33675..4f34cd7effd 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -344,7 +344,7 @@ PN.trigger_warning(5) if(istype(M,/mob/living/carbon/human)) var/mob/living/carbon/human/H = M - if(H.species.siemens_coefficient == 0) + if(H.species.siemens_coefficient <= 0) return if(H.gloves) var/obj/item/clothing/gloves/G = H.gloves diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 444682b4bf7..9fc0f74290a 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -303,7 +303,7 @@ data["storedCapacity"] = round(100.0*charge/capacity, 0.1) data["storedCapacityAbs"] = round(charge/(1000*60), 0.1) data["storedCapacityMax"] = round(capacity/(1000*60)) - data["charging"] = round(inputting/1000, 0.1) + data["charging"] = inputting data["chargeMode"] = input_attempt data["chargeLevel"] = round(input_level/1000, 0.1) data["chargeMax"] = round(input_level_max/1000) diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 9a7d5d14ac2..219ebff1410 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -108,7 +108,8 @@ if(stored_ammo.len >= max_ammo) user << "[src] is full!" return - user.removeItem(C, src) + user.remove_from_mob(C) + C.loc = src stored_ammo.Insert(1, C) //add to the head of the list update_icon() diff --git a/code/modules/projectiles/ammunition/boxes.dm b/code/modules/projectiles/ammunition/boxes.dm index fac7b0f9a55..a2b1dd7272b 100644 --- a/code/modules/projectiles/ammunition/boxes.dm +++ b/code/modules/projectiles/ammunition/boxes.dm @@ -142,6 +142,10 @@ name = "magazine (5.56mm practice)" ammo_type = /obj/item/ammo_casing/a556p +/obj/item/ammo_magazine/a556/ap + name = "magazine (5.56mm armor-piercing)" + ammo_type = /obj/item/ammo_casing/a556/ap + /obj/item/ammo_magazine/a50 name = "magazine (.50)" icon_state = "50ae" @@ -179,6 +183,10 @@ max_ammo = 50 multiple_sprites = 1 +/obj/item/ammo_magazine/a762/ap + name = "magazine box (7.62mm armor-piercing)" + ammo_type = /obj/item/ammo_casing/a762/ap + /obj/item/ammo_magazine/a762/empty initial_ammo = 0 @@ -192,6 +200,10 @@ max_ammo = 20 multiple_sprites = 1 +/obj/item/ammo_magazine/c762/ap + name = "magazine (7.62mm armor-piercing)" + ammo_type = /obj/item/ammo_casing/a762/ap + /obj/item/ammo_magazine/caps name = "speed loader (caps)" icon_state = "T38" @@ -201,6 +213,7 @@ matter = list(DEFAULT_WALL_MATERIAL = 600) max_ammo = 7 multiple_sprites = 1 + /obj/item/ammo_magazine/g12 name = "magazine (12 gauge)" icon_state = "g12" diff --git a/code/modules/projectiles/ammunition/bullets.dm b/code/modules/projectiles/ammunition/bullets.dm index 52c44af1d1f..6050fb2c65a 100644 --- a/code/modules/projectiles/ammunition/bullets.dm +++ b/code/modules/projectiles/ammunition/bullets.dm @@ -133,6 +133,11 @@ caliber = "a762" projectile_type = /obj/item/projectile/bullet/rifle/a762 +/obj/item/ammo_casing/a762/ap + desc = "A 7.62mm armor-piercing bullet casing." + caliber = "a762" + projectile_type = /obj/item/projectile/bullet/rifle/a762/ap + /obj/item/ammo_casing/a145 name = "shell casing" desc = "A 14.5mm shell." @@ -147,6 +152,11 @@ caliber = "a556" projectile_type = /obj/item/projectile/bullet/rifle/a556 +/obj/item/ammo_casing/a556/ap + desc = "A 5.56mm armor-piercing bullet casing." + caliber = "a556" + projectile_type = /obj/item/projectile/bullet/rifle/a556/ap + /obj/item/ammo_casing/a556p desc = "A 5.56mm practice bullet casing." caliber = "a556" diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index bc28b4577bd..92066ae899a 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -66,6 +66,7 @@ var/mode_name = null var/requires_two_hands var/wielded_icon = "gun_wielded" + var/one_handed_penalty = 0 // Penalty applied if someone fires a two-handed gun with one hand. var/next_fire_time = 0 @@ -182,8 +183,8 @@ var/held_disp_mod = 0 if(requires_two_hands) if(user.item_is_in_hands(src) && user.hands_are_full()) - held_acc_mod = -3 - held_disp_mod = 3 + held_acc_mod = held_acc_mod - one_handed_penalty + held_disp_mod = held_disp_mod - round(one_handed_penalty / 2) //actually attempt to shoot var/turf/targloc = get_turf(target) //cache this in case target gets deleted during shooting, e.g. if it was a securitron that got destroyed. @@ -211,6 +212,12 @@ target = targloc pointblank = 0 + // We do this down here, so we don't get the message if we fire an empty gun. + if(requires_two_hands) + if(user.item_is_in_hands(src) && user.hands_are_full()) + if(one_handed_penalty >= 2) + user << "You struggle to keep \the [src] pointed at the correct position with just one hand!" + admin_attack_log(usr, attacker_message="Fired [src]", admin_message="fired a gun ([src]) (MODE: [src.mode_name]) [reflex ? "by reflex" : "manually"].") //update timing diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 466170e52a4..8cd8f72a36b 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -1,6 +1,7 @@ /obj/item/weapon/gun/energy/laser name = "laser carbine" - desc = "An Hesphaistos Industries G40E carbine, designed to kill with concentrated energy blasts." + desc = "An Hesphaistos Industries G40E carbine, designed to kill with concentrated energy blasts. This varient has the ability to \ + switch between standard fire and a more efficent but weaker 'suppressive' fire." icon_state = "laser" item_state = "laser" fire_sound = 'sound/weapons/Laser.ogg' @@ -10,16 +11,29 @@ origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2) matter = list(DEFAULT_WALL_MATERIAL = 2000) projectile_type = /obj/item/projectile/beam/midlaser +// requires_two_hands = 1 + one_handed_penalty = 2 + + firemodes = list( + list(mode_name="normal", projectile_type=/obj/item/projectile/beam/midlaser, charge_cost = 200), + list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 50), + ) /obj/item/weapon/gun/energy/laser/mounted self_recharge = 1 use_external_power = 1 + requires_two_hands = 0 // Not sure if two-handing gets checked for mounted weapons, but better safe than sorry. /obj/item/weapon/gun/energy/laser/practice name = "practice laser carbine" desc = "A modified version of the HI G40E, this one fires less concentrated energy bolts designed for target practice." projectile_type = /obj/item/projectile/beam/practice + firemodes = list( + list(mode_name="normal", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 200), + list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 50), + ) + obj/item/weapon/gun/energy/retro name = "retro laser" icon_state = "retro" @@ -47,7 +61,8 @@ obj/item/weapon/gun/energy/retro /obj/item/weapon/gun/energy/lasercannon name = "laser cannon" - desc = "With the laser cannon, the lasing medium is enclosed in a tube lined with uranium-235 and subjected to high neutron flux in a nuclear reactor core. This incredible technology may help YOU achieve high excitation rates with small laser volumes!" + desc = "With the laser cannon, the lasing medium is enclosed in a tube lined with uranium-235 and subjected to high neutron \ + flux in a nuclear reactor core. This incredible technology may help YOU achieve high excitation rates with small laser volumes!" icon_state = "lasercannon" item_state = null fire_sound = 'sound/weapons/lasercannonfire.ogg' @@ -55,30 +70,36 @@ obj/item/weapon/gun/energy/retro slot_flags = SLOT_BELT|SLOT_BACK projectile_type = /obj/item/projectile/beam/heavylaser charge_cost = 400 - max_shots = 5 + max_shots = 6 fire_delay = 20 +// requires_two_hands = 1 + one_handed_penalty = 6 // The thing's heavy and huge. + accuracy = 2 /obj/item/weapon/gun/energy/lasercannon/mounted name = "mounted laser cannon" self_recharge = 1 use_external_power = 1 recharge_time = 10 + accuracy = 0 // Mounted cannons are just fine the way they are. + requires_two_hands = 0 // Not sure if two-handing gets checked for mounted weapons, but better safe than sorry. /obj/item/weapon/gun/energy/xray name = "xray laser gun" - desc = "A high-power laser gun capable of expelling concentrated xray blasts." + desc = "A high-power laser gun capable of expelling concentrated xray blasts, which are able to penetrate matter easier than \ + standard photonic beams, resulting in an effective 'anti-armor' energy weapon." icon_state = "xray" item_state = "xray" fire_sound = 'sound/weapons/laser3.ogg' - origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3, TECH_MAGNET = 2, TECH_ILLEGAL = 2) + origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3, TECH_MAGNET = 2) projectile_type = /obj/item/projectile/beam/xray charge_cost = 100 - max_shots = 20 - fire_delay = 1 + max_shots = 12 /obj/item/weapon/gun/energy/sniperrifle name = "marksman energy rifle" - desc = "The HI DMR 9E is an older design of Hesphaistos Industries. A designated marksman rifle capable of shooting powerful ionized beams, this is a weapon to kill from a distance." + desc = "The HI DMR 9E is an older design of Hesphaistos Industries. A designated marksman rifle capable of shooting powerful \ + ionized beams, this is a weapon to kill from a distance." icon_state = "sniper" item_state = "laser" fire_sound = 'sound/weapons/marauder.ogg' @@ -92,6 +113,8 @@ obj/item/weapon/gun/energy/retro w_class = 5 // So it can't fit in a backpack. accuracy = -3 //shooting at the hip scoped_accuracy = 0 +// requires_two_hands = 1 + one_handed_penalty = 4 // The weapon itself is heavy, and the long barrel makes it hard to hold steady with just one hand. /obj/item/weapon/gun/energy/sniperrifle/verb/scope() set category = "Object" diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index f1068774710..5e1612a50b2 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -5,13 +5,14 @@ item_state = null //so the human update icon uses the icon_state instead. fire_sound = 'sound/weapons/Taser.ogg' max_shots = 10 + fire_delay = 10 // Handguns should be inferior to two-handed weapons. projectile_type = /obj/item/projectile/beam/stun origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2) modifystate = "energystun" firemodes = list( - list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, modifystate="energystun", fire_sound='sound/weapons/Taser.ogg'), + list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="energystun", fire_sound='sound/weapons/Taser.ogg'), list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="energykill", fire_sound='sound/weapons/Laser.ogg'), ) @@ -33,6 +34,9 @@ origin_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 2, TECH_ILLEGAL = 3) modifystate = "fm-2tstun" +// requires_two_hands = 1 + one_handed_penalty = 2 + firemodes = list( list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="fm-2tstun", fire_sound='sound/weapons/Taser.ogg'), list(mode_name="stun 3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0), projectile_type=/obj/item/projectile/beam/stun, modifystate="fm-2tstun", fire_sound='sound/weapons/Taser.ogg'), @@ -50,6 +54,9 @@ self_recharge = 1 modifystate = null +// requires_two_hands = 1 + one_handed_penalty = 1 // It's rather bulky, so holding it in one hand is a little harder than with two, however it's not 'required'. + firemodes = list( list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg'), list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg'), diff --git a/code/modules/projectiles/guns/energy/pulse.dm b/code/modules/projectiles/guns/energy/pulse.dm index 98817fede33..ab134d34065 100644 --- a/code/modules/projectiles/guns/energy/pulse.dm +++ b/code/modules/projectiles/guns/energy/pulse.dm @@ -13,12 +13,12 @@ firemodes = list( list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg', fire_delay=null, charge_cost=null), list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg', fire_delay=null, charge_cost=null), - list(mode_name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/pulse.ogg', fire_delay=25, charge_cost=400), + list(mode_name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/pulse.ogg', fire_delay=null, charge_cost=100), ) /obj/item/weapon/gun/energy/pulse_rifle/mounted self_recharge = 1 - use_external_power = 1 + use_external_power = 1 /obj/item/weapon/gun/energy/pulse_rifle/destroyer name = "pulse destroyer" diff --git a/code/modules/projectiles/guns/energy/stun.dm b/code/modules/projectiles/guns/energy/stun.dm index 72392da29aa..20fa18b09e6 100644 --- a/code/modules/projectiles/guns/energy/stun.dm +++ b/code/modules/projectiles/guns/energy/stun.dm @@ -1,10 +1,10 @@ /obj/item/weapon/gun/energy/taser name = "taser gun" - desc = "The NT Mk30 NL is a small, low capacity gun used for non-lethal takedowns. Produced by NT, it's actually a licensed version of a W-T design." + desc = "The NT Mk30 NL is a small gun used for non-lethal takedowns. Produced by NT, it's actually a licensed version of a W-T design." icon_state = "taser" item_state = null //so the human update icon uses the icon_state instead. fire_sound = 'sound/weapons/Taser.ogg' - max_shots = 5 + max_shots = 10 projectile_type = /obj/item/projectile/beam/stun /obj/item/weapon/gun/energy/taser/mounted @@ -15,7 +15,7 @@ /obj/item/weapon/gun/energy/taser/mounted/cyborg name = "taser gun" max_shots = 6 - recharge_time = 10 //Time it takes for shots to recharge (in ticks) + recharge_time = 7 //Time it takes for shots to recharge (in ticks) /obj/item/weapon/gun/energy/stunrevolver @@ -25,7 +25,7 @@ item_state = "stunrevolver" fire_sound = 'sound/weapons/Gunshot.ogg' origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_POWER = 2) - projectile_type = /obj/item/projectile/energy/electrode + projectile_type = /obj/item/projectile/energy/electrode/strong max_shots = 8 diff --git a/code/modules/projectiles/guns/launcher/crossbow.dm b/code/modules/projectiles/guns/launcher/crossbow.dm index 1ab6b5bcacd..407b70d20a1 100644 --- a/code/modules/projectiles/guns/launcher/crossbow.dm +++ b/code/modules/projectiles/guns/launcher/crossbow.dm @@ -136,7 +136,7 @@ /obj/item/weapon/gun/launcher/crossbow/attackby(obj/item/W as obj, mob/user as mob) if(!bolt) if (istype(W,/obj/item/weapon/arrow)) - user.removeItem(W, src) + user.drop_from_inventory(W, src) bolt = W user.visible_message("[user] slides [bolt] into [src].","You slide [bolt] into [src].") update_icon() diff --git a/code/modules/projectiles/guns/launcher/grenade_launcher.dm b/code/modules/projectiles/guns/launcher/grenade_launcher.dm index fe05453df0a..547dc702cf7 100644 --- a/code/modules/projectiles/guns/launcher/grenade_launcher.dm +++ b/code/modules/projectiles/guns/launcher/grenade_launcher.dm @@ -47,7 +47,8 @@ if(grenades.len >= max_grenades) user << "[src] is full." return - user.removeItem(G, src) + user.remove_from_mob(G) + G.loc = src grenades.Insert(1, G) //add to the head of the list, so that it is loaded on the next pump user.visible_message("[user] inserts \a [G] into [src].", "You insert \a [G] into [src].") return @@ -105,7 +106,8 @@ if(chambered) user << "[src] is already loaded." return - user.removeItem(G, src) + user.remove_from_mob(G) + G.loc = src chambered = G user.visible_message("[user] load \a [G] into [src].", "You load \a [G] into [src].") return diff --git a/code/modules/projectiles/guns/launcher/pneumatic.dm b/code/modules/projectiles/guns/launcher/pneumatic.dm index efe0175d9bc..b20e9521e60 100644 --- a/code/modules/projectiles/guns/launcher/pneumatic.dm +++ b/code/modules/projectiles/guns/launcher/pneumatic.dm @@ -65,7 +65,7 @@ /obj/item/weapon/gun/launcher/pneumatic/attackby(obj/item/W as obj, mob/user as mob) if(!tank && istype(W,/obj/item/weapon/tank)) - user.removeItem(W, src) + user.drop_from_inventory(W, src) tank = W user.visible_message("[user] jams [W] into [src]'s valve and twists it closed.","You jam [W] into [src]'s valve and twist it closed.") update_icon() @@ -161,7 +161,8 @@ /obj/item/weapon/cannonframe/attackby(obj/item/W as obj, mob/user as mob) if(istype(W,/obj/item/pipe)) if(buildstate == 0) - user.deleteItem(W) + user.drop_from_inventory(W) + qdel(W) user << "You secure the piping inside the frame." buildstate++ update_icon() @@ -178,7 +179,8 @@ return else if(istype(W,/obj/item/device/transfer_valve)) if(buildstate == 4) - user.deleteItem(W) + user.drop_from_inventory(W) + qdel(W) user << "You install the transfer valve and connect it to the piping." buildstate++ update_icon() diff --git a/code/modules/projectiles/guns/launcher/syringe_gun.dm b/code/modules/projectiles/guns/launcher/syringe_gun.dm index 8f5f2047885..07cb48d784e 100644 --- a/code/modules/projectiles/guns/launcher/syringe_gun.dm +++ b/code/modules/projectiles/guns/launcher/syringe_gun.dm @@ -22,7 +22,8 @@ if(istype(I, /obj/item/weapon/reagent_containers/syringe)) syringe = I user << "You carefully insert [syringe] into [src]." - user.removeItem(syringe, src) + user.remove_from_mob(syringe) + syringe.loc = src sharp = 1 name = "syringe dart" update_icon() @@ -122,7 +123,8 @@ if(darts.len >= max_darts) user << "[src] is full!" return - user.removeItem(C, src) + user.remove_from_mob(C) + C.loc = src darts += C //add to the end user.visible_message("[user] inserts \a [C] into [src].", "You insert \a [C] into [src].") else diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index d61a02d30e6..d032cb38483 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -104,7 +104,8 @@ if(ammo_magazine) user << "[src] already has a magazine loaded." //already a magazine here return - user.removeItem(AM, src) + user.remove_from_mob(AM) + AM.loc = src ammo_magazine = AM user.visible_message("[user] inserts [AM] into [src].", "You insert [AM] into [src].") playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1) @@ -133,7 +134,8 @@ user << "[src] is full." return - user.removeItem(C, src) + user.remove_from_mob(C) + C.loc = src loaded.Insert(1, C) //add to the head of the list user.visible_message("[user] inserts \a [C] into [src].", "You insert \a [C] into [src].") playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1) diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index 53f77feed2d..975f48ae7b2 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -11,6 +11,10 @@ ammo_type = /obj/item/ammo_casing/c9mm multi_aim = 1 burst_delay = 2 + +// requires_two_hands = 1 + one_handed_penalty = 1 + firemodes = list( list(mode_name="semiauto", burst=1, fire_delay=0, move_delay=null, burst_accuracy=null, dispersion=null), list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0)), @@ -44,6 +48,9 @@ auto_eject = 1 auto_eject_sound = 'sound/weapons/smg_empty_alarm.ogg' +// requires_two_hands = 1 + one_handed_penalty = 2 + /obj/item/weapon/gun/projectile/automatic/c20r/update_icon() ..() if(ammo_magazine) @@ -65,6 +72,8 @@ load_method = MAGAZINE magazine_type = /obj/item/ammo_magazine/c762 + one_handed_penalty = 4 + firemodes = list( list(mode_name="semiauto", burst=1, fire_delay=0, move_delay=null, burst_accuracy=null, dispersion=null), list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=6, burst_accuracy=list(0,-1,-2), dispersion=list(0.0, 0.6, 0.6)), @@ -115,6 +124,8 @@ auto_eject = 1 auto_eject_sound = 'sound/weapons/smg_empty_alarm.ogg' + one_handed_penalty = 4 + burst_delay = 4 firemodes = list( list(mode_name="semiauto", burst=1, fire_delay=0, move_delay=null, use_launcher=null, burst_accuracy=null, dispersion=null), @@ -149,12 +160,13 @@ else ..() -/obj/item/weapon/gun/projectile/automatic/z8/update_icon() +/obj/item/weapon/gun/projectile/automatic/z8/update_icon(var/ignore_inhands) ..() if(ammo_magazine) icon_state = "carbine-[round(ammo_magazine.stored_ammo.len,2)]" else icon_state = "carbine" + if(!ignore_inhands) update_held_icon() return /obj/item/weapon/gun/projectile/automatic/z8/examine(mob/user) @@ -181,6 +193,8 @@ load_method = MAGAZINE magazine_type = /obj/item/ammo_magazine/a762 + one_handed_penalty = 6 + firemodes = list( list(mode_name="semiauto", burst=1, fire_delay=0, move_delay=null, burst_accuracy=null, dispersion=null), list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0)), @@ -240,6 +254,8 @@ load_method = MAGAZINE magazine_type = /obj/item/ammo_magazine/g12 + one_handed_penalty = 4 + firemodes = list( list(mode_name="semiauto", burst=1, fire_delay=0), list(mode_name="3-round bursts", burst=3, move_delay=6, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.0, 0.6, 0.6)), diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index a1048ab7631..f564b399ad6 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -23,6 +23,11 @@ check_armour = "laser" eyeblur = 2 +/obj/item/projectile/beam/weaklaser + name = "weak laser" + icon_state = "laser" + damage = 15 + /obj/item/projectile/beam/midlaser damage = 40 armor_penetration = 10 @@ -37,15 +42,6 @@ tracer_type = /obj/effect/projectile/laser_heavy/tracer impact_type = /obj/effect/projectile/laser_heavy/impact -/obj/item/projectile/beam/weaklaser - name = "weak laser" - icon_state = "laser" - damage = 15 - - muzzle_type = /obj/effect/projectile/laser_heavy/muzzle - tracer_type = /obj/effect/projectile/laser_heavy/tracer - impact_type = /obj/effect/projectile/laser_heavy/impact - /obj/item/projectile/beam/xray name = "xray beam" icon_state = "xray" @@ -160,11 +156,4 @@ /obj/item/projectile/beam/stun/weak name = "weak stun beam" icon_state = "stun" - nodamage = 1 - taser_effect = 1 agony = 25 - damage_type = HALLOSS - - muzzle_type = /obj/effect/projectile/stun/muzzle - tracer_type = /obj/effect/projectile/stun/tracer - impact_type = /obj/effect/projectile/stun/impact diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index a78eca0d516..ca2ab63eef2 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -169,15 +169,23 @@ /* "Rifle" rounds */ /obj/item/projectile/bullet/rifle - armor_penetration = 20 + armor_penetration = 15 penetrating = 1 /obj/item/projectile/bullet/rifle/a762 damage = 25 +/obj/item/projectile/bullet/rifle/a762/ap + damage = 20 + armor_penetration = 50 // At 40 or more armor, this will do more damage than standard rounds. + /obj/item/projectile/bullet/rifle/a556 damage = 35 +/obj/item/projectile/bullet/rifle/a556/ap + damage = 30 + armor_penetration = 50 // At 30 or more armor, this will do more damage than standard rounds. + /obj/item/projectile/bullet/rifle/a145 damage = 80 stun = 3 diff --git a/code/modules/projectiles/projectile/change.dm b/code/modules/projectiles/projectile/change.dm index dfddd67882d..9fcc709ba05 100644 --- a/code/modules/projectiles/projectile/change.dm +++ b/code/modules/projectiles/projectile/change.dm @@ -25,7 +25,7 @@ if(istype(W, /obj/item/weapon/implant)) //TODO: Carn. give implants a dropped() or something qdel(W) continue - M.removeItem(W, force = 1) + M.drop_from_inventory(W) var/mob/living/new_mob diff --git a/code/modules/projectiles/projectile/energy.dm b/code/modules/projectiles/projectile/energy.dm index 063acf750b6..66155da7ea4 100644 --- a/code/modules/projectiles/projectile/energy.dm +++ b/code/modules/projectiles/projectile/energy.dm @@ -14,7 +14,7 @@ kill_count = 15 //if the shell hasn't hit anything after travelling this far it just explodes. var/flash_range = 0 var/brightness = 7 - var/light_duration = 5 + var/light_colour = "#ffffff" /obj/item/projectile/energy/flash/on_impact(var/atom/A) var/turf/T = flash_range? src.loc : get_turf(A) @@ -28,17 +28,26 @@ //snap pop playsound(src, 'sound/effects/snap.ogg', 50, 1) src.visible_message("\The [src] explodes in a bright flash!") - - new /obj/effect/decal/cleanable/ash(src.loc) //always use src.loc so that ash doesn't end up inside windows - new /obj/effect/effect/sparks(T) - new /obj/effect/effect/smoke/illumination(T, brightness=max(flash_range*2, brightness), lifetime=light_duration) + var/datum/effect/effect/system/spark_spread/sparks = PoolOrNew(/datum/effect/effect/system/spark_spread) + sparks.set_up(2, 1, T) + sparks.start() + + new /obj/effect/decal/cleanable/ash(src.loc) //always use src.loc so that ash doesn't end up inside windows + new /obj/effect/effect/smoke/illumination(T, 5, brightness, brightness, light_colour) //blinds people like the flash round, but can also be used for temporary illumination /obj/item/projectile/energy/flash/flare damage = 10 flash_range = 1 - brightness = 9 //similar to a flare - light_duration = 200 + brightness = 15 + +/obj/item/projectile/energy/flash/flare/on_impact(var/atom/A) + light_colour = pick("#e58775", "#ffffff", "#90ff90", "#a09030") + + ..() //initial flash + + //residual illumination + new /obj/effect/effect/smoke/illumination(src.loc, rand(190,240) SECONDS, range=8, power=3, color=light_colour) //same lighting power as flare /obj/item/projectile/energy/electrode name = "electrode" @@ -49,6 +58,9 @@ damage_type = HALLOSS //Damage will be handled on the MOB side, to prevent window shattering. +/obj/item/projectile/energy/electrode/strong + agony = 55 + /obj/item/projectile/energy/electrode/stunshot name = "stunshot" damage = 5 diff --git a/code/modules/projectiles/targeting/targeting_overlay.dm b/code/modules/projectiles/targeting/targeting_overlay.dm index b0577bdf5fa..8c87751de7a 100644 --- a/code/modules/projectiles/targeting/targeting_overlay.dm +++ b/code/modules/projectiles/targeting/targeting_overlay.dm @@ -23,7 +23,6 @@ owner = newowner loc = null verbs.Cut() - toggle_permission(TARGET_CAN_RADIO) /obj/aiming_overlay/proc/toggle_permission(var/perm) diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index c1f2dc0ddf2..b58f1384da7 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -21,7 +21,7 @@ var/obj/item/weapon/storage/pill_bottle/loaded_pill_bottle = null var/mode = 0 var/condi = 0 - var/useramount = 30 // Last used amount + var/useramount = 15 // Last used amount var/pillamount = 10 var/bottlesprite = "bottle-1" //yes, strings var/pillsprite = "1" @@ -265,6 +265,8 @@ dat += "(1) " dat += "(5) " dat += "(10) " + dat += "(30) " + dat += "(60) " dat += "(All) " dat += "(Custom)
    " @@ -276,6 +278,8 @@ dat += "(1) " dat += "(5) " dat += "(10) " + dat += "(30) " + dat += "(60) " dat += "(All) " dat += "(Custom)
    " else @@ -393,7 +397,8 @@ user << "\The [O] is not suitable for blending." return 1 - user.removeItem(O, src) + user.remove_from_mob(O) + O.loc = src holdingitems += O src.updateUsrDialog() return 0 diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm index 26b58eed311..4c3e461a270 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -375,6 +375,24 @@ /datum/reagent/sugar/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.nutrition += removed * 3 + var/effective_dose = dose + if(issmall(M)) + effective_dose *= 2 + + if(alien == IS_UNATHI) + if(effective_dose < 2) + if(effective_dose == metabolism * 2 || prob(5)) + M.emote("yawn") + else if(effective_dose < 5) + M.eye_blurry = max(M.eye_blurry, 10) + else if(effective_dose < 20) + if(prob(50)) + M.Weaken(2) + M.drowsyness = max(M.drowsyness, 20) + else + M.sleeping = max(M.sleeping, 20) + M.drowsyness = max(M.drowsyness, 60) + /datum/reagent/sulfur name = "Sulfur" id = "sulfur" 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 637470e7cc1..469c34a1c19 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -17,6 +17,8 @@ affect_ingest(M, alien, removed) /datum/reagent/nutriment/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) + switch(alien) + if(IS_UNATHI) removed *= 0.5 if(issmall(M)) removed *= 2 // Small bodymass, more effect from lower volume. M.heal_organ_damage(0.5 * removed, 0) M.nutrition += nutriment_factor * removed // For hunger and fatness @@ -42,6 +44,8 @@ if(IS_TESHARI) ..(M, alien, removed*1.2) // Teshari get a bit more nutrition from meat. return + if(IS_UNATHI) + ..(M, alien, removed*2.25) //Unathi get most of their nutrition from meat. ..() /datum/reagent/nutriment/protein/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) @@ -62,6 +66,27 @@ nutriment_factor = 10 color = "#FFFF00" +/datum/reagent/honey/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) + ..() + + var/effective_dose = dose + if(issmall(M)) + effective_dose *= 2 + + if(alien == IS_UNATHI) + if(effective_dose < 2) + if(effective_dose == metabolism * 2 || prob(5)) + M.emote("yawn") + else if(effective_dose < 5) + M.eye_blurry = max(M.eye_blurry, 10) + else if(effective_dose < 20) + if(prob(50)) + M.Weaken(2) + M.drowsyness = max(M.drowsyness, 20) + else + M.sleeping = max(M.sleeping, 20) + M.drowsyness = max(M.drowsyness, 60) + /datum/reagent/nutriment/flour name = "flour" id = "flour" @@ -396,6 +421,27 @@ glass_name = "glass of grape juice" glass_desc = "It's grrrrrape!" +/datum/reagent/juice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) + ..() + + var/effective_dose = dose/2 + if(issmall(M)) + effective_dose *= 2 + + if(alien == IS_UNATHI) + if(effective_dose < 2) + if(effective_dose == metabolism * 2 || prob(5)) + M.emote("yawn") + else if(effective_dose < 5) + M.eye_blurry = max(M.eye_blurry, 10) + else if(effective_dose < 20) + if(prob(50)) + M.Weaken(2) + M.drowsyness = max(M.drowsyness, 20) + else + M.sleeping = max(M.sleeping, 20) + M.drowsyness = max(M.drowsyness, 60) + /datum/reagent/drink/juice/lemon name = "Lemon Juice" id = "lemonjuice" @@ -502,6 +548,20 @@ cup_name = "cup of milk" cup_desc = "White and nutritious goodness!" +/datum/reagent/drink/milk/chocolate + name = "Chocolate Milk" + id = "chocolate_milk" + description = "A delicious mixture of perfectly healthy mix and terrible chocolate." + color = "#74533b" + + glass_icon_state = "glass_brown" + glass_name = "glass of chocolate milk" + glass_desc = "Delciously fattening!" + + cup_icon_state = "cup_brown" + cup_name = "cup of chocolate milk" + cup_desc = "Deliciously fattening!" + /datum/reagent/drink/milk/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) @@ -765,6 +825,27 @@ glass_desc = "Glorious brainfreezing mixture." glass_center_of_mass = list("x"=16, "y"=7) +/datum/reagent/milkshake/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) + ..() + + var/effective_dose = dose/2 + if(issmall(M)) + effective_dose *= 2 + + if(alien == IS_UNATHI) + if(effective_dose < 2) + if(effective_dose == metabolism * 2 || prob(5)) + M.emote("yawn") + else if(effective_dose < 5) + M.eye_blurry = max(M.eye_blurry, 10) + else if(effective_dose < 20) + if(prob(50)) + M.Weaken(2) + M.drowsyness = max(M.drowsyness, 20) + else + M.sleeping = max(M.sleeping, 20) + M.drowsyness = max(M.drowsyness, 60) + /datum/reagent/drink/rewriter name = "Rewriter" description = "The secret of the sanctuary of the Libarian..." diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 08ec5df6c53..c81a94927cd 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -257,7 +257,7 @@ var/mob/living/carbon/human/H = M var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES] if(istype(E)) - if(E.status & ORGAN_ROBOT) + if(E.robotic >= ORGAN_ROBOT) return if(E.damage > 0) E.damage = max(E.damage - 5 * removed, 0) @@ -277,7 +277,7 @@ if(ishuman(M)) var/mob/living/carbon/human/H = M for(var/obj/item/organ/I in H.internal_organs) - if(I.status & ORGAN_ROBOT) + if(I.robotic >= ORGAN_ROBOT) continue if(I.damage > 0) //Peridaxon heals only non-robotic organs I.damage = max(I.damage - removed, 0) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index 8a6d50ab299..0022026a673 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -476,9 +476,11 @@ /datum/reagent/slimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.species.name != "Slime") + if(H.species.name != "Promethean") M << "Your flesh rapidly mutates!" - H.set_species("Slime") + H.set_species("Promethean") + H.shapeshifter_set_colour("#05FF9B") + H.verbs -= /mob/living/carbon/human/proc/shapeshifter_select_colour /datum/reagent/aslimetoxin name = "Advanced Mutation Toxin" diff --git a/code/modules/reagents/dispenser/dispenser2.dm b/code/modules/reagents/dispenser/dispenser2.dm index 060a4ecfcb2..06c6bbb8eb7 100644 --- a/code/modules/reagents/dispenser/dispenser2.dm +++ b/code/modules/reagents/dispenser/dispenser2.dm @@ -50,7 +50,7 @@ return if(user) - user.removeItem(C) + user.drop_from_inventory(C) user << "You add \the [C] to \the [src]." C.loc = src @@ -103,7 +103,8 @@ return container = RC - user.removeItem(RC, src) + user.drop_from_inventory(RC) + RC.loc = src user << "You set \the [RC] on \the [src]." nanomanager.update_uis(src) // update all UIs attached to src diff --git a/code/modules/reagents/reagent_containers/blood_pack.dm b/code/modules/reagents/reagent_containers/blood_pack.dm index 4f4981b4d8a..558e8609134 100644 --- a/code/modules/reagents/reagent_containers/blood_pack.dm +++ b/code/modules/reagents/reagent_containers/blood_pack.dm @@ -2,7 +2,8 @@ name = "blood packs bags" desc = "This box contains blood packs." icon_state = "sterile" - New() + +/obj/item/weapon/storage/box/bloodpacks/New() ..() new /obj/item/weapon/reagent_containers/blood/empty(src) new /obj/item/weapon/reagent_containers/blood/empty(src) @@ -21,22 +22,22 @@ var/blood_type = null - New() - ..() - if(blood_type != null) - name = "BloodPack [blood_type]" - reagents.add_reagent("blood", 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=blood_type,"resistances"=null,"trace_chem"=null)) - update_icon() - - on_reagent_change() +/obj/item/weapon/reagent_containers/blood/New() + ..() + if(blood_type != null) + name = "BloodPack [blood_type]" + reagents.add_reagent("blood", 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=blood_type,"resistances"=null,"trace_chem"=null)) update_icon() +/obj/item/weapon/reagent_containers/blood/on_reagent_change() update_icon() - var/percent = round((reagents.total_volume / volume) * 100) - switch(percent) - if(0 to 9) icon_state = "empty" - if(10 to 50) icon_state = "half" - if(51 to INFINITY) icon_state = "full" + +/obj/item/weapon/reagent_containers/blood/update_icon() + var/percent = round((reagents.total_volume / volume) * 100) + switch(percent) + if(0 to 9) icon_state = "empty" + if(10 to 50) icon_state = "half" + if(51 to INFINITY) icon_state = "full" /obj/item/weapon/reagent_containers/blood/APlus blood_type = "A+" diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 2c8396deee4..ce377c87091 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -13,15 +13,15 @@ var/charge_tick = 0 var/recharge_time = 5 //Time it takes for shots to recharge (in seconds) - var/list/reagent_ids = list("tricordrazine", "inaprovaline", "spaceacillin") + var/list/reagent_ids = list("tricordrazine", "inaprovaline", "tramadol", "dexalin" ,"spaceacillin") var/list/reagent_volumes = list() var/list/reagent_names = list() /obj/item/weapon/reagent_containers/borghypo/surgeon - reagent_ids = list("bicaridine", "inaprovaline", "dexalin") + reagent_ids = list("tricordrazine", "inaprovaline", "tramadol", "dexalin" ,"spaceacillin") /obj/item/weapon/reagent_containers/borghypo/crisis - reagent_ids = list("tricordrazine", "inaprovaline", "tramadol") + reagent_ids = list("tricordrazine", "inaprovaline", "tramadol", "dexalin" ,"spaceacillin") /obj/item/weapon/reagent_containers/borghypo/New() ..() @@ -65,7 +65,7 @@ if(!affected) user << "\The [H] is missing that limb!" return - else if(affected.status & ORGAN_ROBOT) + else if(affected.robotic >= ORGAN_ROBOT) user << "You cannot inject a robotic limb." return diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index e605683de73..36a8b40feff 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -12,88 +12,88 @@ slot_flags = SLOT_EARS volume = 5 - afterattack(var/obj/target, var/mob/user, var/flag) - if(!target.reagents || !flag) return +/obj/item/weapon/reagent_containers/dropper/afterattack(var/obj/target, var/mob/user, var/flag) + if(!target.reagents || !flag) return - if(reagents.total_volume) + if(reagents.total_volume) - if(!target.reagents.get_free_space()) - user << "[target] is full." + if(!target.reagents.get_free_space()) + user << "[target] is full." + return + + if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/clothing/mask/smokable/cigarette)) //You can inject humans and food but you cant remove the shit. + user << "You cannot directly fill this object." + return + + var/trans = 0 + + if(ismob(target)) + + var/time = 20 //2/3rds the time of a syringe + user.visible_message("[user] is trying to squirt something into [target]'s eyes!") + + if(!do_mob(user, target, time)) return - if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/clothing/mask/smokable/cigarette)) //You can inject humans and food but you cant remove the shit. - user << "You cannot directly fill this object." - return + if(istype(target, /mob/living/carbon/human)) + var/mob/living/carbon/human/victim = target - var/trans = 0 + var/obj/item/safe_thing = null + if(victim.wear_mask) + if (victim.wear_mask.body_parts_covered & EYES) + safe_thing = victim.wear_mask + if(victim.head) + if (victim.head.body_parts_covered & EYES) + safe_thing = victim.head + if(victim.glasses) + if (!safe_thing) + safe_thing = victim.glasses - if(ismob(target)) - - var/time = 20 //2/3rds the time of a syringe - user.visible_message("[user] is trying to squirt something into [target]'s eyes!") - - if(!do_mob(user, target, time)) + if(safe_thing) + trans = reagents.trans_to_obj(safe_thing, amount_per_transfer_from_this) + user.visible_message("[user] tries to squirt something into [target]'s eyes, but fails!", "You transfer [trans] units of the solution.") return - if(istype(target, /mob/living/carbon/human)) - var/mob/living/carbon/human/victim = target + var/mob/living/M = target + var/contained = reagentlist() + M.attack_log += text("\[[time_stamp()]\] Has been squirted with [name] by [user.name] ([user.ckey]). Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Used the [name] to squirt [M.name] ([M.key]). Reagents: [contained]") + msg_admin_attack("[user.name] ([user.ckey]) squirted [M.name] ([M.key]) with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") - var/obj/item/safe_thing = null - if(victim.wear_mask) - if (victim.wear_mask.body_parts_covered & EYES) - safe_thing = victim.wear_mask - if(victim.head) - if (victim.head.body_parts_covered & EYES) - safe_thing = victim.head - if(victim.glasses) - if (!safe_thing) - safe_thing = victim.glasses - - if(safe_thing) - trans = reagents.trans_to_obj(safe_thing, amount_per_transfer_from_this) - user.visible_message("[user] tries to squirt something into [target]'s eyes, but fails!", "You transfer [trans] units of the solution.") - return - - var/mob/living/M = target - var/contained = reagentlist() - M.attack_log += text("\[[time_stamp()]\] Has been squirted with [name] by [user.name] ([user.ckey]). Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [name] to squirt [M.name] ([M.key]). Reagents: [contained]") - msg_admin_attack("[user.name] ([user.ckey]) squirted [M.name] ([M.key]) with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") - - trans = reagents.trans_to_mob(target, reagents.total_volume, CHEM_INGEST) - user.visible_message("[user] squirts something into [target]'s eyes!", "You transfer [trans] units of the solution.") + trans = reagents.trans_to_mob(target, reagents.total_volume, CHEM_INGEST) + user.visible_message("[user] squirts something into [target]'s eyes!", "You transfer [trans] units of the solution.") - return + return - else - trans = reagents.trans_to(target, amount_per_transfer_from_this) //sprinkling reagents on generic non-mobs - user << "You transfer [trans] units of the solution." - - else // Taking from something - - if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers)) - user << "You cannot directly remove reagents from [target]." - return - - if(!target.reagents || !target.reagents.total_volume) - user << "[target] is empty." - return - - var/trans = target.reagents.trans_to_obj(src, amount_per_transfer_from_this) - - user << "You fill the dropper with [trans] units of the solution." - - return - - on_reagent_change() - update_icon() - - update_icon() - if(reagents.total_volume) - icon_state = "dropper1" else - icon_state = "dropper0" + trans = reagents.trans_to(target, amount_per_transfer_from_this) //sprinkling reagents on generic non-mobs + user << "You transfer [trans] units of the solution." + + else // Taking from something + + if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers)) + user << "You cannot directly remove reagents from [target]." + return + + if(!target.reagents || !target.reagents.total_volume) + user << "[target] is empty." + return + + var/trans = target.reagents.trans_to_obj(src, amount_per_transfer_from_this) + + user << "You fill the dropper with [trans] units of the solution." + + return + +/obj/item/weapon/reagent_containers/dropper/on_reagent_change() + update_icon() + +/obj/item/weapon/reagent_containers/dropper/update_icon() + if(reagents.total_volume) + icon_state = "dropper1" + else + icon_state = "dropper0" /obj/item/weapon/reagent_containers/dropper/industrial name = "Industrial Dropper" diff --git a/code/modules/reagents/reagent_containers/food/cans.dm b/code/modules/reagents/reagent_containers/food/cans.dm index 7d72b8bf51f..4597c5bd716 100644 --- a/code/modules/reagents/reagent_containers/food/cans.dm +++ b/code/modules/reagents/reagent_containers/food/cans.dm @@ -10,43 +10,48 @@ desc = "Cola. in space." icon_state = "cola" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("cola", 30) + +/obj/item/weapon/reagent_containers/food/drinks/cans/cola/New() + ..() + reagents.add_reagent("cola", 30) /obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle name = "bottled water" desc = "Introduced to the vending machines by Skrellian request, this water comes straight from the Martian poles." icon_state = "waterbottle" center_of_mass = list("x"=15, "y"=8) - New() - ..() - reagents.add_reagent("water", 30) + +/obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle/New() + ..() + reagents.add_reagent("water", 30) /obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind name = "\improper Space Mountain Wind" desc = "Blows right through you like a space wind." icon_state = "space_mountain_wind" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("spacemountainwind", 30) + +/obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind/New() + ..() + reagents.add_reagent("spacemountainwind", 30) /obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko name = "\improper Thirteen Loko" desc = "The CMO has advised crew members that consumption of Thirteen Loko may result in seizures, blindness, drunkeness, or even death. Please Drink Responsibly." icon_state = "thirteen_loko" center_of_mass = list("x"=16, "y"=8) - New() - ..() - reagents.add_reagent("thirteenloko", 30) + +/obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko/New() + ..() + reagents.add_reagent("thirteenloko", 30) /obj/item/weapon/reagent_containers/food/drinks/cans/dr_gibb name = "\improper Dr. Gibb" desc = "A delicious mixture of 42 different flavors." icon_state = "dr_gibb" center_of_mass = list("x"=16, "y"=10) - New() + +/obj/item/weapon/reagent_containers/food/drinks/cans/dr_gibb/New() ..() reagents.add_reagent("dr_gibb", 30) @@ -55,60 +60,67 @@ desc = "The taste of a star in liquid form. And, a bit of tuna...?" icon_state = "starkist" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("brownstar", 30) + +/obj/item/weapon/reagent_containers/food/drinks/cans/starkist/New() + ..() + reagents.add_reagent("brownstar", 30) /obj/item/weapon/reagent_containers/food/drinks/cans/space_up name = "\improper Space-Up" desc = "Tastes like a hull breach in your mouth." icon_state = "space-up" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("space_up", 30) + +/obj/item/weapon/reagent_containers/food/drinks/cans/space_up/New() + ..() + reagents.add_reagent("space_up", 30) /obj/item/weapon/reagent_containers/food/drinks/cans/lemon_lime name = "\improper Lemon-Lime" desc = "You wanted ORANGE. It gave you Lemon Lime." icon_state = "lemon-lime" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("lemon_lime", 30) + +/obj/item/weapon/reagent_containers/food/drinks/cans/lemon_lime/New() + ..() + reagents.add_reagent("lemon_lime", 30) /obj/item/weapon/reagent_containers/food/drinks/cans/iced_tea name = "\improper Vrisk Serket Iced Tea" desc = "That sweet, refreshing southern earthy flavor. That's where it's from, right? South Earth?" icon_state = "ice_tea_can" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("icetea", 30) + +/obj/item/weapon/reagent_containers/food/drinks/cans/iced_tea/New() + ..() + reagents.add_reagent("icetea", 30) /obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice name = "\improper Grapel Juice" desc = "500 pages of rules of how to appropriately enter into a combat with this juice!" icon_state = "purple_can" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("grapejuice", 30) + +/obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice/New() + ..() + reagents.add_reagent("grapejuice", 30) /obj/item/weapon/reagent_containers/food/drinks/cans/tonic name = "\improper T-Borg's Tonic Water" desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away." icon_state = "tonic" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("tonic", 50) + +/obj/item/weapon/reagent_containers/food/drinks/cans/tonic/New() + ..() + reagents.add_reagent("tonic", 50) /obj/item/weapon/reagent_containers/food/drinks/cans/sodawater name = "soda water" desc = "A can of soda water. Still water's more refreshing cousin." icon_state = "sodawater" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("sodawater", 50) + +/obj/item/weapon/reagent_containers/food/drinks/cans/sodawater/New() + ..() + reagents.add_reagent("sodawater", 50) diff --git a/code/modules/reagents/reagent_containers/food/condiment.dm b/code/modules/reagents/reagent_containers/food/condiment.dm index d449d251952..ce26cdda50e 100644 --- a/code/modules/reagents/reagent_containers/food/condiment.dm +++ b/code/modules/reagents/reagent_containers/food/condiment.dm @@ -15,147 +15,152 @@ center_of_mass = list("x"=16, "y"=6) volume = 50 - attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) +/obj/item/weapon/reagent_containers/food/condiment/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) + return + +/obj/item/weapon/reagent_containers/food/condiment/attack_self(var/mob/user as mob) + return + +/obj/item/weapon/reagent_containers/food/condiment/attack(var/mob/M as mob, var/mob/user as mob, var/def_zone) + if(standard_feed_mob(user, M)) return - attack_self(var/mob/user as mob) +/obj/item/weapon/reagent_containers/food/condiment/afterattack(var/obj/target, var/mob/user, var/flag) + if(standard_dispenser_refill(user, target)) + return + if(standard_pour_into(user, target)) return - attack(var/mob/M as mob, var/mob/user as mob, var/def_zone) - if(standard_feed_mob(user, M)) + if(istype(target, /obj/item/weapon/reagent_containers/food/snacks)) // These are not opencontainers but we can transfer to them + if(!reagents || !reagents.total_volume) + user << "There is no condiment left in \the [src]." return - afterattack(var/obj/target, var/mob/user, var/flag) - if(standard_dispenser_refill(user, target)) - return - if(standard_pour_into(user, target)) + if(!target.reagents.get_free_space()) + user << "You can't add more condiment to \the [target]." return - if(istype(target, /obj/item/weapon/reagent_containers/food/snacks)) // These are not opencontainers but we can transfer to them - if(!reagents || !reagents.total_volume) - user << "There is no condiment left in \the [src]." - return + var/trans = reagents.trans_to_obj(target, amount_per_transfer_from_this) + user << "You add [trans] units of the condiment to \the [target]." + else + ..() - if(!target.reagents.get_free_space()) - user << "You can't add more condiment to \the [target]." - return +/obj/item/weapon/reagent_containers/food/condiment/feed_sound(var/mob/user) + playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1) - var/trans = reagents.trans_to_obj(target, amount_per_transfer_from_this) - user << "You add [trans] units of the condiment to \the [target]." - else - ..() +/obj/item/weapon/reagent_containers/food/condiment/self_feed_message(var/mob/user) + user << "You swallow some of contents of \the [src]." - feed_sound(var/mob/user) - playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1) - - self_feed_message(var/mob/user) - user << "You swallow some of contents of \the [src]." - - on_reagent_change() - if(reagents.reagent_list.len > 0) - switch(reagents.get_master_reagent_id()) - if("ketchup") - name = "Ketchup" - desc = "You feel more American already." - icon_state = "ketchup" - center_of_mass = list("x"=16, "y"=6) - if("capsaicin") - name = "Hotsauce" - desc = "You can almost TASTE the stomach ulcers now!" - icon_state = "hotsauce" - center_of_mass = list("x"=16, "y"=6) - if("enzyme") - name = "Universal Enzyme" - desc = "Used in cooking various dishes." - icon_state = "enzyme" - center_of_mass = list("x"=16, "y"=6) - if("soysauce") - name = "Soy Sauce" - desc = "A salty soy-based flavoring." - icon_state = "soysauce" - center_of_mass = list("x"=16, "y"=6) - if("frostoil") - name = "Coldsauce" - desc = "Leaves the tongue numb in its passage." - icon_state = "coldsauce" - center_of_mass = list("x"=16, "y"=6) - if("sodiumchloride") - name = "Salt Shaker" - desc = "Salt. From space oceans, presumably." - icon_state = "saltshaker" - center_of_mass = list("x"=16, "y"=10) - if("blackpepper") - name = "Pepper Mill" - desc = "Often used to flavor food or make people sneeze." - icon_state = "peppermillsmall" - center_of_mass = list("x"=16, "y"=10) - if("cornoil") - name = "Corn Oil" - desc = "A delicious oil used in cooking. Made from corn." - icon_state = "oliveoil" - center_of_mass = list("x"=16, "y"=6) - if("sugar") - name = "Sugar" - desc = "Tastey space sugar!" - center_of_mass = list("x"=16, "y"=6) +/obj/item/weapon/reagent_containers/food/condiment/on_reagent_change() + if(reagents.reagent_list.len > 0) + switch(reagents.get_master_reagent_id()) + if("ketchup") + name = "Ketchup" + desc = "You feel more American already." + icon_state = "ketchup" + center_of_mass = list("x"=16, "y"=6) + if("capsaicin") + name = "Hotsauce" + desc = "You can almost TASTE the stomach ulcers now!" + icon_state = "hotsauce" + center_of_mass = list("x"=16, "y"=6) + if("enzyme") + name = "Universal Enzyme" + desc = "Used in cooking various dishes." + icon_state = "enzyme" + center_of_mass = list("x"=16, "y"=6) + if("soysauce") + name = "Soy Sauce" + desc = "A salty soy-based flavoring." + icon_state = "soysauce" + center_of_mass = list("x"=16, "y"=6) + if("frostoil") + name = "Coldsauce" + desc = "Leaves the tongue numb in its passage." + icon_state = "coldsauce" + center_of_mass = list("x"=16, "y"=6) + if("sodiumchloride") + name = "Salt Shaker" + desc = "Salt. From space oceans, presumably." + icon_state = "saltshaker" + center_of_mass = list("x"=16, "y"=10) + if("blackpepper") + name = "Pepper Mill" + desc = "Often used to flavor food or make people sneeze." + icon_state = "peppermillsmall" + center_of_mass = list("x"=16, "y"=10) + if("cornoil") + name = "Corn Oil" + desc = "A delicious oil used in cooking. Made from corn." + icon_state = "oliveoil" + center_of_mass = list("x"=16, "y"=6) + if("sugar") + name = "Sugar" + desc = "Tastey space sugar!" + center_of_mass = list("x"=16, "y"=6) + else + name = "Misc Condiment Bottle" + if (reagents.reagent_list.len==1) + desc = "Looks like it is [reagents.get_master_reagent_name()], but you are not sure." else - name = "Misc Condiment Bottle" - if (reagents.reagent_list.len==1) - desc = "Looks like it is [reagents.get_master_reagent_name()], but you are not sure." - else - desc = "A mixture of various condiments. [reagents.get_master_reagent_name()] is one of them." - icon_state = "mixedcondiments" - center_of_mass = list("x"=16, "y"=6) - else - icon_state = "emptycondiment" - name = "Condiment Bottle" - desc = "An empty condiment bottle." - center_of_mass = list("x"=16, "y"=6) - return + desc = "A mixture of various condiments. [reagents.get_master_reagent_name()] is one of them." + icon_state = "mixedcondiments" + center_of_mass = list("x"=16, "y"=6) + else + icon_state = "emptycondiment" + name = "Condiment Bottle" + desc = "An empty condiment bottle." + center_of_mass = list("x"=16, "y"=6) + return /obj/item/weapon/reagent_containers/food/condiment/enzyme name = "Universal Enzyme" desc = "Used in cooking various dishes." icon_state = "enzyme" - New() - ..() - reagents.add_reagent("enzyme", 50) -/obj/item/weapon/reagent_containers/food/condiment/sugar - New() - ..() - reagents.add_reagent("sugar", 50) +/obj/item/weapon/reagent_containers/food/condiment/enzyme/New() + ..() + reagents.add_reagent("enzyme", 50) + +/obj/item/weapon/reagent_containers/food/condiment/sugar/New() + ..() + reagents.add_reagent("sugar", 50) /obj/item/weapon/reagent_containers/food/condiment/small possible_transfer_amounts = list(1,20) amount_per_transfer_from_this = 1 volume = 20 center_of_mass = list() - on_reagent_change() return + +/obj/item/weapon/reagent_containers/food/condiment/small/on_reagent_change() + return /obj/item/weapon/reagent_containers/food/condiment/small/saltshaker //Seperate from above since it's a small shaker rather then name = "salt shaker" // a large one. desc = "Salt. From space oceans, presumably." icon_state = "saltshakersmall" - New() - ..() - reagents.add_reagent("sodiumchloride", 20) + +/obj/item/weapon/reagent_containers/food/condiment/small/saltshaker/New() + ..() + reagents.add_reagent("sodiumchloride", 20) /obj/item/weapon/reagent_containers/food/condiment/small/peppermill name = "pepper mill" desc = "Often used to flavor food or make people sneeze." icon_state = "peppermillsmall" - New() - ..() - reagents.add_reagent("blackpepper", 20) + +/obj/item/weapon/reagent_containers/food/condiment/small/peppermill/New() + ..() + reagents.add_reagent("blackpepper", 20) /obj/item/weapon/reagent_containers/food/condiment/small/sugar name = "sugar" desc = "Sweetness in a bottle" icon_state = "sugarsmall" - New() - ..() - reagents.add_reagent("sugar", 20) + +/obj/item/weapon/reagent_containers/food/condiment/small/sugar/New() + ..() + reagents.add_reagent("sugar", 20) /obj/item/weapon/reagent_containers/food/condiment/flour name = "flour sack" @@ -163,9 +168,12 @@ icon = 'icons/obj/food.dmi' icon_state = "flour" item_state = "flour" - on_reagent_change() return - New() - ..() - reagents.add_reagent("flour", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) + +/obj/item/weapon/reagent_containers/food/condiment/flour/on_reagent_change() + return + +/obj/item/weapon/reagent_containers/food/condiment/flour/New() + ..() + reagents.add_reagent("flour", 30) + src.pixel_x = rand(-10.0, 10) + src.pixel_y = rand(-10.0, 10) diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index d5526c9b1d8..dea0da4180f 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -10,73 +10,73 @@ amount_per_transfer_from_this = 5 volume = 50 - on_reagent_change() +/obj/item/weapon/reagent_containers/food/drinks/on_reagent_change() return - attack_self(mob/user as mob) - if(!is_open_container()) - open(user) +/obj/item/weapon/reagent_containers/food/drinks/attack_self(mob/user as mob) + if(!is_open_container()) + open(user) - proc/open(mob/user) - playsound(loc,'sound/effects/canopen.ogg', rand(10,50), 1) - user << "You open [src] with an audible pop!" - flags |= OPENCONTAINER +/obj/item/weapon/reagent_containers/food/drinks/proc/open(mob/user) + playsound(loc,'sound/effects/canopen.ogg', rand(10,50), 1) + user << "You open [src] with an audible pop!" + flags |= OPENCONTAINER - attack(mob/M as mob, mob/user as mob, def_zone) - if(force && !(flags & NOBLUDGEON) && user.a_intent == I_HURT) - return ..() - - if(standard_feed_mob(user, M)) - return - - return 0 - - afterattack(obj/target, mob/user, proximity) - if(!proximity) return - - if(standard_dispenser_refill(user, target)) - return - if(standard_pour_into(user, target)) - return +/obj/item/weapon/reagent_containers/food/drinks/attack(mob/M as mob, mob/user as mob, def_zone) + if(force && !(flags & NOBLUDGEON) && user.a_intent == I_HURT) return ..() - standard_feed_mob(var/mob/user, var/mob/target) - if(!is_open_container()) - user << "You need to open [src]!" - return 1 - return ..() + if(standard_feed_mob(user, M)) + return - standard_dispenser_refill(var/mob/user, var/obj/structure/reagent_dispensers/target) - if(!is_open_container()) - user << "You need to open [src]!" - return 1 - return ..() + return 0 - standard_pour_into(var/mob/user, var/atom/target) - if(!is_open_container()) - user << "You need to open [src]!" - return 1 - return ..() +/obj/item/weapon/reagent_containers/food/drinks/afterattack(obj/target, mob/user, proximity) + if(!proximity) return - self_feed_message(var/mob/user) - user << "You swallow a gulp from \the [src]." + if(standard_dispenser_refill(user, target)) + return + if(standard_pour_into(user, target)) + return + return ..() - feed_sound(var/mob/user) - playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1) +/obj/item/weapon/reagent_containers/food/drinks/standard_feed_mob(var/mob/user, var/mob/target) + if(!is_open_container()) + user << "You need to open [src]!" + return 1 + return ..() - examine(mob/user) - if(!..(user, 1)) - return - if(!reagents || reagents.total_volume == 0) - user << "\The [src] is empty!" - else if (reagents.total_volume <= volume * 0.25) - user << "\The [src] is almost empty!" - else if (reagents.total_volume <= volume * 0.66) - user << "\The [src] is half full!" - else if (reagents.total_volume <= volume * 0.90) - user << "\The [src] is almost full!" - else - user << "\The [src] is full!" +/obj/item/weapon/reagent_containers/food/drinks/standard_dispenser_refill(var/mob/user, var/obj/structure/reagent_dispensers/target) + if(!is_open_container()) + user << "You need to open [src]!" + return 1 + return ..() + +/obj/item/weapon/reagent_containers/food/drinks/standard_pour_into(var/mob/user, var/atom/target) + if(!is_open_container()) + user << "You need to open [src]!" + return 1 + return ..() + +/obj/item/weapon/reagent_containers/food/drinks/self_feed_message(var/mob/user) + user << "You swallow a gulp from \the [src]." + +/obj/item/weapon/reagent_containers/food/drinks/feed_sound(var/mob/user) + playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1) + +/obj/item/weapon/reagent_containers/food/drinks/examine(mob/user) + if(!..(user, 1)) + return + if(!reagents || reagents.total_volume == 0) + user << "\The [src] is empty!" + else if (reagents.total_volume <= volume * 0.25) + user << "\The [src] is almost empty!" + else if (reagents.total_volume <= volume * 0.66) + user << "\The [src] is half full!" + else if (reagents.total_volume <= volume * 0.90) + user << "\The [src] is almost full!" + else + user << "\The [src] is full!" //////////////////////////////////////////////////////////////////////////////// @@ -107,9 +107,10 @@ icon_state = "milk" item_state = "carton" center_of_mass = list("x"=16, "y"=9) - New() - ..() - reagents.add_reagent("milk", 50) + +/obj/item/weapon/reagent_containers/food/drinks/milk/New() + ..() + reagents.add_reagent("milk", 50) /obj/item/weapon/reagent_containers/food/drinks/soymilk name = "SoyMilk" @@ -117,18 +118,35 @@ icon_state = "soymilk" item_state = "carton" center_of_mass = list("x"=16, "y"=9) - New() - ..() - reagents.add_reagent("soymilk", 50) +/obj/item/weapon/reagent_containers/food/drinks/soymilk/New() + ..() + reagents.add_reagent("soymilk", 50) + +/obj/item/weapon/reagent_containers/food/drinks/milk/smallcarton + name = "Small Carton of Milk" + volume = 30 + icon_state = "mini-milk" +/obj/item/weapon/reagent_containers/food/drinks/milk/smallcarton/New() + ..() + reagents.add_reagent("milk", 30) + +/obj/item/weapon/reagent_containers/food/drinks/milk/smallcarton/chocolate + name = "Small Carton of Chocolate Milk" + desc = "It's milk! This one is in delicious chocolate flavour." + +/obj/item/weapon/reagent_containers/food/drinks/milk/smallcarton/chocolate/New() + ..() + reagents.add_reagent("chocolate_milk", 30) + /obj/item/weapon/reagent_containers/food/drinks/coffee name = "Robust Coffee" desc = "Careful, the beverage you're about to enjoy is extremely hot." icon_state = "coffee" center_of_mass = list("x"=15, "y"=10) - New() - ..() - reagents.add_reagent("coffee", 30) +/obj/item/weapon/reagent_containers/food/drinks/coffee/New() + ..() + reagents.add_reagent("coffee", 30) /obj/item/weapon/reagent_containers/food/drinks/tea name = "Duke Purple Tea" @@ -136,18 +154,19 @@ icon_state = "teacup" item_state = "coffee" center_of_mass = list("x"=16, "y"=14) - New() - ..() - reagents.add_reagent("tea", 30) + +/obj/item/weapon/reagent_containers/food/drinks/tea/New() + ..() + reagents.add_reagent("tea", 30) /obj/item/weapon/reagent_containers/food/drinks/ice name = "Ice Cup" desc = "Careful, cold ice, do not chew." icon_state = "coffee" center_of_mass = list("x"=15, "y"=10) - New() - ..() - reagents.add_reagent("ice", 30) +/obj/item/weapon/reagent_containers/food/drinks/ice/New() + ..() + reagents.add_reagent("ice", 30) /obj/item/weapon/reagent_containers/food/drinks/h_chocolate name = "Dutch Hot Coco" @@ -155,19 +174,19 @@ icon_state = "hot_coco" item_state = "coffee" center_of_mass = list("x"=15, "y"=13) - New() - ..() - reagents.add_reagent("hot_coco", 30) + +/obj/item/weapon/reagent_containers/food/drinks/h_chocolate/New() + ..() + reagents.add_reagent("hot_coco", 30) /obj/item/weapon/reagent_containers/food/drinks/dry_ramen name = "Cup Ramen" desc = "Just add 10ml water, self heats! A taste that reminds you of your school years." icon_state = "ramen" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("dry_ramen", 30) - +/obj/item/weapon/reagent_containers/food/drinks/dry_ramen/New() + ..() + reagents.add_reagent("dry_ramen", 30) /obj/item/weapon/reagent_containers/food/drinks/sillycup name = "Paper Cup" @@ -176,13 +195,14 @@ possible_transfer_amounts = null volume = 10 center_of_mass = list("x"=16, "y"=12) - New() - ..() - on_reagent_change() - if(reagents.total_volume) - icon_state = "water_cup" - else - icon_state = "water_cup_e" +/obj/item/weapon/reagent_containers/food/drinks/sillycup/New() + ..() + +/obj/item/weapon/reagent_containers/food/drinks/sillycup/on_reagent_change() + if(reagents.total_volume) + icon_state = "water_cup" + else + icon_state = "water_cup_e" //////////////////////////drinkingglass and shaker// diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm index 390f09ed783..c0189dd1c67 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm @@ -40,7 +40,7 @@ if(!isGlass || !smash_duration) return 0 - var/list/chance_table = list(90, 90, 85, 85, 60, 35, 15) //starting from distance 0 + var/list/chance_table = list(100, 95, 90, 85, 75, 55, 35) //starting from distance 0 var/idx = max(distance + 1, 1) //since list indices start at 1 if(idx > chance_table.len) return 0 @@ -49,7 +49,7 @@ /obj/item/weapon/reagent_containers/food/drinks/bottle/proc/smash(var/newloc, atom/against = null) if(ismob(loc)) var/mob/M = loc - M.removeItem(src) + M.drop_from_inventory(src) //Creates a shattering noise and replaces the bottle with a broken_bottle var/obj/item/weapon/broken_bottle/B = new /obj/item/weapon/broken_bottle(newloc) @@ -110,9 +110,10 @@ /obj/item/weapon/reagent_containers/food/drinks/bottle/proc/insert_rag(obj/item/weapon/reagent_containers/glass/rag/R, mob/user) if(!isGlass || rag) return - if(user.removeItem(R, src)) + if(user.unEquip(R)) user << "You stuff [R] into [src]." rag = R + rag.forceMove(src) flags &= ~OPENCONTAINER update_icon() @@ -138,17 +139,17 @@ /obj/item/weapon/reagent_containers/food/drinks/bottle/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone) var/blocked = ..() - + if(user.a_intent != I_HURT) return if(!smash_check(1)) return //won't always break on the first hit - + // You are going to knock someone out for longer if they are not wearing a helmet. var/weaken_duration = 0 if(blocked < 100) weaken_duration = smash_duration + min(0, force - target.getarmor(hit_zone, "melee") + 10) - + if(hit_zone == "head" && istype(target, /mob/living/carbon/)) user.visible_message("\The [user] smashes [src] over [target]'s head!") if(weaken_duration) @@ -167,7 +168,6 @@ //Keeping this here for now, I'll ask if I should keep it here. /obj/item/weapon/broken_bottle - name = "Broken Bottle" desc = "A bottle with a sharp broken bottom." icon = 'icons/obj/drinks.dmi' @@ -186,204 +186,225 @@ playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) return ..() - /obj/item/weapon/reagent_containers/food/drinks/bottle/gin name = "Griffeater Gin" desc = "A bottle of high quality gin, produced in the New London Space Station." icon_state = "ginbottle" center_of_mass = list("x"=16, "y"=4) - New() - ..() - reagents.add_reagent("gin", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/gin/New() + ..() + reagents.add_reagent("gin", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey name = "Uncle Git's Special Reserve" desc = "A premium single-malt whiskey, gently matured inside the tunnels of a nuclear shelter. TUNNEL WHISKEY RULES." icon_state = "whiskeybottle" center_of_mass = list("x"=16, "y"=3) - New() - ..() - reagents.add_reagent("whiskey", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey/New() + ..() + reagents.add_reagent("whiskey", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey name = "Special Blend Whiskey" desc = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." icon_state = "whiskeybottle2" center_of_mass = list("x"=16, "y"=3) - New() - ..() - reagents.add_reagent("specialwhiskey", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey/New() + ..() + reagents.add_reagent("specialwhiskey", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/vodka name = "Tunguska Triple Distilled" desc = "Aah, vodka. Prime choice of drink AND fuel by Russians worldwide." icon_state = "vodkabottle" center_of_mass = list("x"=17, "y"=3) - New() - ..() - reagents.add_reagent("vodka", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka/New() + ..() + reagents.add_reagent("vodka", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla name = "Caccavo Guaranteed Quality Tequilla" desc = "Made from premium petroleum distillates, pure thalidomide and other fine quality ingredients!" icon_state = "tequillabottle" center_of_mass = list("x"=16, "y"=3) - New() - ..() - reagents.add_reagent("tequilla", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla/New() + ..() + reagents.add_reagent("tequilla", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing name = "Bottle of Nothing" desc = "A bottle filled with nothing" icon_state = "bottleofnothing" center_of_mass = list("x"=17, "y"=5) - New() - ..() - reagents.add_reagent("nothing", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing/New() + ..() + reagents.add_reagent("nothing", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/patron name = "Wrapp Artiste Patron" desc = "Silver laced tequilla, served in space night clubs across the galaxy." icon_state = "patronbottle" center_of_mass = list("x"=16, "y"=6) - New() - ..() - reagents.add_reagent("patron", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/patron/New() + ..() + reagents.add_reagent("patron", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/rum name = "Captain Pete's Cuban Spiced Rum" desc = "This isn't just rum, oh no. It's practically GRIFF in a bottle." icon_state = "rumbottle" center_of_mass = list("x"=16, "y"=8) - New() - ..() - reagents.add_reagent("rum", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/rum/New() + ..() + reagents.add_reagent("rum", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/holywater name = "Flask of Holy Water" desc = "A flask of the chaplain's holy water." icon_state = "holyflask" center_of_mass = list("x"=17, "y"=10) - New() - ..() - reagents.add_reagent("holywater", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater/New() + ..() + reagents.add_reagent("holywater", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth name = "Goldeneye Vermouth" desc = "Sweet, sweet dryness~" icon_state = "vermouthbottle" center_of_mass = list("x"=17, "y"=3) - New() - ..() - reagents.add_reagent("vermouth", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth/New() + ..() + reagents.add_reagent("vermouth", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua name = "Robert Robust's Coffee Liqueur" desc = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936, HONK" icon_state = "kahluabottle" center_of_mass = list("x"=17, "y"=3) - New() - ..() - reagents.add_reagent("kahlua", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua/New() + ..() + reagents.add_reagent("kahlua", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager name = "College Girl Goldschlager" desc = "Because they are the only ones who will drink 100 proof cinnamon schnapps." icon_state = "goldschlagerbottle" center_of_mass = list("x"=15, "y"=3) - New() - ..() - reagents.add_reagent("goldschlager", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager/New() + ..() + reagents.add_reagent("goldschlager", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/cognac name = "Chateau De Baton Premium Cognac" desc = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. You might as well not scream 'SHITCURITY' this time." icon_state = "cognacbottle" center_of_mass = list("x"=16, "y"=6) - New() - ..() - reagents.add_reagent("cognac", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac/New() + ..() + reagents.add_reagent("cognac", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/wine name = "Doublebeard Bearded Special Wine" desc = "A faint aura of unease and asspainery surrounds the bottle." icon_state = "winebottle" center_of_mass = list("x"=16, "y"=4) - New() - ..() - reagents.add_reagent("wine", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/wine/New() + ..() + reagents.add_reagent("wine", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe name = "Jailbreaker Verte" desc = "One sip of this and you just know you're gonna have a good time." icon_state = "absinthebottle" center_of_mass = list("x"=16, "y"=6) - New() - ..() - reagents.add_reagent("absinthe", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe/New() + ..() + reagents.add_reagent("absinthe", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor name = "Emeraldine Melon Liquor" desc = "A bottle of 46 proof Emeraldine Melon Liquor. Sweet and light." icon_state = "alco-green" //Placeholder. center_of_mass = list("x"=16, "y"=6) - New() - ..() - reagents.add_reagent("melonliquor", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor/New() + ..() + reagents.add_reagent("melonliquor", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao name = "Miss Blue Curacao" desc = "A fruity, exceptionally azure drink. Does not allow the imbiber to use the fifth magic." icon_state = "alco-blue" //Placeholder. center_of_mass = list("x"=16, "y"=6) - New() - ..() - reagents.add_reagent("bluecuracao", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao/New() + ..() + reagents.add_reagent("bluecuracao", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine name = "Briar Rose Grenadine Syrup" desc = "Sweet and tangy, a bar syrup used to add color or flavor to drinks." icon_state = "grenadinebottle" center_of_mass = list("x"=16, "y"=6) - New() - ..() - reagents.add_reagent("grenadine", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine/New() + ..() + reagents.add_reagent("grenadine", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/cola name = "\improper Space Cola" desc = "Cola. in space" icon_state = "colabottle" center_of_mass = list("x"=16, "y"=6) - New() - ..() - reagents.add_reagent("cola", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/cola/New() + ..() + reagents.add_reagent("cola", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/space_up name = "\improper Space-Up" desc = "Tastes like a hull breach in your mouth." icon_state = "space-up_bottle" center_of_mass = list("x"=16, "y"=6) - New() - ..() - reagents.add_reagent("space_up", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/space_up/New() + ..() + reagents.add_reagent("space_up", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind name = "\improper Space Mountain Wind" desc = "Blows right through you like a space wind." icon_state = "space_mountain_wind_bottle" center_of_mass = list("x"=16, "y"=6) - New() - ..() - reagents.add_reagent("spacemountainwind", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind/New() + ..() + reagents.add_reagent("spacemountainwind", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/pwine name = "Warlock's Velvet" desc = "What a delightful packaging for a surely high quality wine! The vintage must be amazing!" icon_state = "pwinebottle" center_of_mass = list("x"=16, "y"=4) - New() - ..() - reagents.add_reagent("pwine", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine/New() + ..() + reagents.add_reagent("pwine", 100) //////////////////////////JUICES AND STUFF /////////////////////// @@ -394,9 +415,10 @@ item_state = "carton" center_of_mass = list("x"=16, "y"=7) isGlass = 0 - New() - ..() - reagents.add_reagent("orangejuice", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice/New() + ..() + reagents.add_reagent("orangejuice", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/cream name = "Milk Cream" @@ -405,9 +427,10 @@ item_state = "carton" center_of_mass = list("x"=16, "y"=8) isGlass = 0 - New() - ..() - reagents.add_reagent("cream", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/cream/New() + ..() + reagents.add_reagent("cream", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice name = "Tomato Juice" @@ -416,9 +439,10 @@ item_state = "carton" center_of_mass = list("x"=16, "y"=8) isGlass = 0 - New() - ..() - reagents.add_reagent("tomatojuice", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice/New() + ..() + reagents.add_reagent("tomatojuice", 100) /obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice name = "Lime Juice" @@ -427,9 +451,10 @@ item_state = "carton" center_of_mass = list("x"=16, "y"=8) isGlass = 0 - New() - ..() - reagents.add_reagent("limejuice", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice/New() + ..() + reagents.add_reagent("limejuice", 100) //Small bottles /obj/item/weapon/reagent_containers/food/drinks/bottle/small @@ -443,9 +468,10 @@ desc = "Contains only water, malt and hops." icon_state = "beer" center_of_mass = list("x"=16, "y"=12) - New() - ..() - reagents.add_reagent("beer", 30) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer/New() + ..() + reagents.add_reagent("beer", 30) /obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale name = "\improper Magm-Ale" @@ -453,6 +479,7 @@ icon_state = "alebottle" item_state = "beer" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("ale", 30) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale/New() + ..() + reagents.add_reagent("ale", 30) diff --git a/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm b/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm index 63a467dcfde..b10feb2b593 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm @@ -8,6 +8,7 @@ volume = 30 unacidable = 1 //glass center_of_mass = list("x"=16, "y"=10) + matter = list("glass" = 500) on_reagent_change() /*if(reagents.reagent_list.len > 1 ) @@ -107,3 +108,71 @@ ..() reagents.add_reagent("cola", 50) on_reagent_change() + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass + name = "shot glass" + desc = "No glasses were shot in the making of this glass." + icon_state = "shotglass" + amount_per_transfer_from_this = 10 + volume = 10 + matter = list("glass" = 175) + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/on_reagent_change() + overlays.Cut() + + if(reagents.total_volume) + var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]1") + + switch(reagents.total_volume) + if(0 to 3) filling.icon_state = "[icon_state]1" + if(4 to 7) filling.icon_state = "[icon_state]5" + if(8 to INFINITY) filling.icon_state = "[icon_state]12" + + filling.color += reagents.get_color() + overlays += filling + name = "shot glass of " + reagents.get_master_reagent_name() //No matter what, the glass will tell you the reagent's name. Might be too abusable in the future. + else + name = "shot glass" + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask + name = "fitness shaker" + desc = "Big enough to contain enough protein to get perfectly swole. Don't mind the bits." + icon_state = "fitness-cup_black" + volume = 100 + matter = list("plastic" = 2000) + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/New() + ..() + icon_state = pick("fitness-cup_black", "fitness-cup_red", "fitness-cup_black") + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/on_reagent_change() + overlays.Cut() + + if(reagents.total_volume) + var/image/filling = image('icons/obj/reagentfillings.dmi', src, "fitness-cup10") + + switch(reagents.total_volume) + if(0 to 10) filling.icon_state = "fitness-cup10" + if(11 to 20) filling.icon_state = "fitness-cup20" + if(21 to 29) filling.icon_state = "fitness-cup30" + if(30 to 39) filling.icon_state = "fitness-cup40" + if(40 to 49) filling.icon_state = "fitness-cup50" + if(50 to 59) filling.icon_state = "fitness-cup60" + if(60 to 69) filling.icon_state = "fitness-cup70" + if(70 to 79) filling.icon_state = "fitness-cup80" + if(80 to 89) filling.icon_state = "fitness-cup90" + if(90 to INFINITY) filling.icon_state = "fitness-cup100" + + filling.color += reagents.get_color() + overlays += filling + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/proteinshake + name = "protein shake" + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/proteinshake/New() + ..() + reagents.add_reagent("nutriment", 30) + reagents.add_reagent("iron", 10) + reagents.add_reagent("protein", 15) + reagents.add_reagent("water", 45) + on_reagent_change() \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index aecfdbacc9b..45b0eb97b81 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -19,7 +19,7 @@ if(!usr) return if(!reagents.total_volume) M.visible_message("[M] finishes eating \the [src].","You finish eating \the [src].") - usr.removeItem(src) //so icons update :[ + usr.drop_from_inventory(src) //so icons update :[ if(trash) if(ispath(trash,/obj/item)) @@ -36,7 +36,8 @@ /obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone) if(!reagents.total_volume) user << "None of [src] left!" - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) return 0 if(istype(M, /mob/living/carbon)) @@ -167,8 +168,10 @@ return user << "\red You slip [W] inside [src]." - user.removeItem(W, src) + user.remove_from_mob(W) + W.dropped(user) add_fingerprint(user) + contents += W return if (has_edge(W)) @@ -253,12 +256,12 @@ filling_color = "#468C00" center_of_mass = list("x"=17, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("doctorsdelight", 8) - reagents.add_reagent("tricordrazine", 8) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/aesirsalad/New() + ..() + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("doctorsdelight", 8) + reagents.add_reagent("tricordrazine", 8) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/candy name = "candy" @@ -268,22 +271,35 @@ filling_color = "#7D5F46" center_of_mass = list("x"=15, "y"=15) - New() - ..() - reagents.add_reagent("nutriment", 1) - reagents.add_reagent("sugar", 3) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/candy/New() + ..() + reagents.add_reagent("nutriment", 1) + reagents.add_reagent("sugar", 3) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/candy/proteinbar + name = "protein bar" + desc = "SwoleMAX brand protein bars, guaranteed to get you feeling perfectly overconfident." + icon_state = "proteinbar" + trash = /obj/item/trash/candy/proteinbar + +/obj/item/weapon/reagent_containers/food/snacks/candy/proteinbar/New() + ..() + reagents.add_reagent("nutriment", 9) + reagents.add_reagent("protein", 4) + reagents.add_reagent("sugar", 4) + bitesize = 6 /obj/item/weapon/reagent_containers/food/snacks/candy/donor name = "Donor Candy" desc = "A little treat for blood donors." trash = /obj/item/trash/candy - New() - ..() - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("sugar", 3) - bitesize = 5 +/obj/item/weapon/reagent_containers/food/snacks/candy/donor/New() + ..() + reagents.add_reagent("nutriment", 10) + reagents.add_reagent("sugar", 3) + bitesize = 5 /obj/item/weapon/reagent_containers/food/snacks/candy_corn name = "candy corn" @@ -292,11 +308,11 @@ filling_color = "#FFFCB0" center_of_mass = list("x"=14, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("sugar", 2) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/candy_corn/New() + ..() + reagents.add_reagent("nutriment", 4) + reagents.add_reagent("sugar", 2) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/chips name = "chips" @@ -306,10 +322,10 @@ filling_color = "#E8C31E" center_of_mass = list("x"=15, "y"=15) - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 1 +/obj/item/weapon/reagent_containers/food/snacks/chips/New() + ..() + reagents.add_reagent("nutriment", 3) + bitesize = 1 /obj/item/weapon/reagent_containers/food/snacks/cookie name = "cookie" @@ -318,10 +334,10 @@ filling_color = "#DBC94F" center_of_mass = list("x"=17, "y"=18) - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 1 +/obj/item/weapon/reagent_containers/food/snacks/cookie/New() + ..() + reagents.add_reagent("nutriment", 5) + bitesize = 1 /obj/item/weapon/reagent_containers/food/snacks/chocolatebar name = "Chocolate Bar" @@ -330,12 +346,12 @@ filling_color = "#7D5F46" center_of_mass = list("x"=15, "y"=15) - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("sugar", 2) - reagents.add_reagent("coco", 2) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/chocolatebar/New() + ..() + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("sugar", 2) + reagents.add_reagent("coco", 2) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/chocolateegg name = "Chocolate Egg" @@ -344,12 +360,12 @@ filling_color = "#7D5F46" center_of_mass = list("x"=16, "y"=13) - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sugar", 2) - reagents.add_reagent("coco", 2) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/chocolateegg/New() + ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("sugar", 2) + reagents.add_reagent("coco", 2) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/donut name = "donut" @@ -363,17 +379,18 @@ name = "donut" desc = "Goes great with Robust Coffee." icon_state = "donut1" - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 1) - src.bitesize = 3 - if(prob(30)) - src.icon_state = "donut2" - src.overlay_state = "box-donut2" - src.name = "frosted donut" - reagents.add_reagent("sprinkles", 2) - center_of_mass = list("x"=19, "y"=16) + +/obj/item/weapon/reagent_containers/food/snacks/donut/normal/New() + ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("sprinkles", 1) + src.bitesize = 3 + if(prob(30)) + src.icon_state = "donut2" + src.overlay_state = "box-donut2" + src.name = "frosted donut" + reagents.add_reagent("sprinkles", 2) + center_of_mass = list("x"=19, "y"=16) /obj/item/weapon/reagent_containers/food/snacks/donut/chaos name = "Chaos Donut" @@ -381,39 +398,38 @@ icon_state = "donut1" filling_color = "#ED11E6" - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("sprinkles", 1) - bitesize = 10 - var/chaosselect = pick(1,2,3,4,5,6,7,8,9,10) - switch(chaosselect) - if(1) - reagents.add_reagent("nutriment", 3) - if(2) - reagents.add_reagent("capsaicin", 3) - if(3) - reagents.add_reagent("frostoil", 3) - if(4) - reagents.add_reagent("sprinkles", 3) - if(5) - reagents.add_reagent("phoron", 3) - if(6) - reagents.add_reagent("coco", 3) - if(7) - reagents.add_reagent("slimejelly", 3) - if(8) - reagents.add_reagent("banana", 3) - if(9) - reagents.add_reagent("berryjuice", 3) - if(10) - reagents.add_reagent("tricordrazine", 3) - if(prob(30)) - src.icon_state = "donut2" - src.overlay_state = "box-donut2" - src.name = "Frosted Chaos Donut" - reagents.add_reagent("sprinkles", 2) - +/obj/item/weapon/reagent_containers/food/snacks/donut/chaos/New() + ..() + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("sprinkles", 1) + bitesize = 10 + var/chaosselect = pick(1,2,3,4,5,6,7,8,9,10) + switch(chaosselect) + if(1) + reagents.add_reagent("nutriment", 3) + if(2) + reagents.add_reagent("capsaicin", 3) + if(3) + reagents.add_reagent("frostoil", 3) + if(4) + reagents.add_reagent("sprinkles", 3) + if(5) + reagents.add_reagent("phoron", 3) + if(6) + reagents.add_reagent("coco", 3) + if(7) + reagents.add_reagent("slimejelly", 3) + if(8) + reagents.add_reagent("banana", 3) + if(9) + reagents.add_reagent("berryjuice", 3) + if(10) + reagents.add_reagent("tricordrazine", 3) + if(prob(30)) + src.icon_state = "donut2" + src.overlay_state = "box-donut2" + src.name = "Frosted Chaos Donut" + reagents.add_reagent("sprinkles", 2) /obj/item/weapon/reagent_containers/food/snacks/donut/jelly name = "Jelly Donut" @@ -422,17 +438,17 @@ filling_color = "#ED1169" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 1) - reagents.add_reagent("berryjuice", 5) - bitesize = 5 - if(prob(30)) - src.icon_state = "jdonut2" - src.overlay_state = "box-donut2" - src.name = "Frosted Jelly Donut" - reagents.add_reagent("sprinkles", 2) +/obj/item/weapon/reagent_containers/food/snacks/donut/jelly/New() + ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("sprinkles", 1) + reagents.add_reagent("berryjuice", 5) + bitesize = 5 + if(prob(30)) + src.icon_state = "jdonut2" + src.overlay_state = "box-donut2" + src.name = "Frosted Jelly Donut" + reagents.add_reagent("sprinkles", 2) /obj/item/weapon/reagent_containers/food/snacks/donut/slimejelly name = "Jelly Donut" @@ -441,17 +457,17 @@ filling_color = "#ED1169" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 1) - reagents.add_reagent("slimejelly", 5) - bitesize = 5 - if(prob(30)) - src.icon_state = "jdonut2" - src.overlay_state = "box-donut2" - src.name = "Frosted Jelly Donut" - reagents.add_reagent("sprinkles", 2) +/obj/item/weapon/reagent_containers/food/snacks/donut/slimejelly/New() + ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("sprinkles", 1) + reagents.add_reagent("slimejelly", 5) + bitesize = 5 + if(prob(30)) + src.icon_state = "jdonut2" + src.overlay_state = "box-donut2" + src.name = "Frosted Jelly Donut" + reagents.add_reagent("sprinkles", 2) /obj/item/weapon/reagent_containers/food/snacks/donut/cherryjelly name = "Jelly Donut" @@ -460,17 +476,17 @@ filling_color = "#ED1169" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 1) - reagents.add_reagent("cherryjelly", 5) - bitesize = 5 - if(prob(30)) - src.icon_state = "jdonut2" - src.overlay_state = "box-donut2" - src.name = "Frosted Jelly Donut" - reagents.add_reagent("sprinkles", 2) +/obj/item/weapon/reagent_containers/food/snacks/donut/cherryjelly/New() + ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("sprinkles", 1) + reagents.add_reagent("cherryjelly", 5) + bitesize = 5 + if(prob(30)) + src.icon_state = "jdonut2" + src.overlay_state = "box-donut2" + src.name = "Frosted Jelly Donut" + reagents.add_reagent("sprinkles", 2) /obj/item/weapon/reagent_containers/food/snacks/egg name = "egg" @@ -491,7 +507,8 @@ return user << "You crack \the [src] into \the [O]." reagents.trans_to(O, reagents.total_volume) - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) /obj/item/weapon/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom) ..() @@ -545,12 +562,12 @@ filling_color = "#FFDF78" center_of_mass = list("x"=16, "y"=14) - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("sodiumchloride", 1) - reagents.add_reagent("blackpepper", 1) - bitesize = 1 +/obj/item/weapon/reagent_containers/food/snacks/friedegg/New() + ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("sodiumchloride", 1) + reagents.add_reagent("blackpepper", 1) + bitesize = 1 /obj/item/weapon/reagent_containers/food/snacks/boiledegg name = "Boiled egg" @@ -558,9 +575,9 @@ icon_state = "egg" filling_color = "#FFFFFF" - New() - ..() - reagents.add_reagent("protein", 2) +/obj/item/weapon/reagent_containers/food/snacks/boiledegg/New() + ..() + reagents.add_reagent("protein", 2) /obj/item/weapon/reagent_containers/food/snacks/organ name = "organ" @@ -570,11 +587,11 @@ filling_color = "#E00D34" center_of_mass = list("x"=16, "y"=16) - New() - ..() - reagents.add_reagent("protein", rand(3,5)) - reagents.add_reagent("toxin", rand(1,3)) - src.bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/organ/New() + ..() + reagents.add_reagent("protein", rand(3,5)) + reagents.add_reagent("toxin", rand(1,3)) + src.bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/tofu name = "Tofu" @@ -583,10 +600,10 @@ filling_color = "#FFFEE0" center_of_mass = list("x"=17, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 3) - src.bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/tofu/New() + ..() + reagents.add_reagent("nutriment", 3) + src.bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/tofurkey name = "Tofurkey" @@ -595,11 +612,11 @@ filling_color = "#FFFEE0" center_of_mass = list("x"=16, "y"=8) - New() - ..() - reagents.add_reagent("nutriment", 12) - reagents.add_reagent("stoxin", 3) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/tofurkey/New() + ..() + reagents.add_reagent("nutriment", 12) + reagents.add_reagent("stoxin", 3) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/stuffing name = "Stuffing" @@ -608,10 +625,10 @@ filling_color = "#C9AC83" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 1 +/obj/item/weapon/reagent_containers/food/snacks/stuffing/New() + ..() + reagents.add_reagent("nutriment", 3) + bitesize = 1 /obj/item/weapon/reagent_containers/food/snacks/carpmeat name = "carp fillet" @@ -620,11 +637,11 @@ filling_color = "#FFDEFE" center_of_mass = list("x"=17, "y"=13) - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("carpotoxin", 3) - src.bitesize = 6 +/obj/item/weapon/reagent_containers/food/snacks/carpmeat/New() + ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("carpotoxin", 3) + src.bitesize = 6 /obj/item/weapon/reagent_containers/food/snacks/fishfingers name = "Fish Fingers" @@ -633,11 +650,11 @@ filling_color = "#FFDEFE" center_of_mass = list("x"=16, "y"=13) - New() - ..() - reagents.add_reagent("protein", 4) - reagents.add_reagent("carpotoxin", 3) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/fishfingers/New() + ..() + reagents.add_reagent("protein", 4) + reagents.add_reagent("carpotoxin", 3) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice name = "huge mushroom slice" @@ -646,11 +663,11 @@ filling_color = "#E0D7C5" center_of_mass = list("x"=17, "y"=16) - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("psilocybin", 3) - src.bitesize = 6 +/obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice/New() + ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("psilocybin", 3) + src.bitesize = 6 /obj/item/weapon/reagent_containers/food/snacks/tomatomeat name = "tomato slice" @@ -659,10 +676,10 @@ filling_color = "#DB0000" center_of_mass = list("x"=17, "y"=16) - New() - ..() - reagents.add_reagent("nutriment", 3) - src.bitesize = 6 +/obj/item/weapon/reagent_containers/food/snacks/tomatomeat/New() + ..() + reagents.add_reagent("nutriment", 3) + src.bitesize = 6 /obj/item/weapon/reagent_containers/food/snacks/bearmeat name = "bear meat" @@ -671,11 +688,11 @@ filling_color = "#DB0000" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("protein", 12) - reagents.add_reagent("hyperzine", 5) - src.bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/bearmeat/New() + ..() + reagents.add_reagent("protein", 12) + reagents.add_reagent("hyperzine", 5) + src.bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/xenomeat name = "meat" @@ -684,11 +701,11 @@ filling_color = "#43DE18" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("protein", 6) - reagents.add_reagent("pacid",6) - src.bitesize = 6 +/obj/item/weapon/reagent_containers/food/snacks/xenomeat/New() + ..() + reagents.add_reagent("protein", 6) + reagents.add_reagent("pacid",6) + src.bitesize = 6 /obj/item/weapon/reagent_containers/food/snacks/meatball name = "meatball" @@ -697,10 +714,10 @@ filling_color = "#DB0000" center_of_mass = list("x"=16, "y"=16) - New() - ..() - reagents.add_reagent("protein", 3) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/meatball/New() + ..() + reagents.add_reagent("protein", 3) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/sausage name = "Sausage" @@ -709,10 +726,44 @@ filling_color = "#DB0000" center_of_mass = list("x"=16, "y"=16) - New() - ..() - reagents.add_reagent("protein", 6) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sausage/New() + ..() + reagents.add_reagent("protein", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/donkpocket + name = "Donk-pocket" + desc = "The food of choice for the seasoned traitor." + icon_state = "donkpocket" + filling_color = "#DEDEAB" + center_of_mass = list("x"=16, "y"=10) + var/warm + var/list/heated_reagents + +/obj/item/weapon/reagent_containers/food/snacks/donkpocket/New() + ..() + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("protein", 2) + + warm = 0 + heated_reagents = list("tricordrazine" = 5) + +/obj/item/weapon/reagent_containers/food/snacks/donkpocket/proc/heat() + warm = 1 + for(var/reagent in heated_reagents) + reagents.add_reagent(reagent, heated_reagents[reagent]) + bitesize = 6 + name = "Warm " + name + cooltime() + +/obj/item/weapon/reagent_containers/food/snacks/donkpocket/proc/cooltime() + if (src.warm) + spawn(4200) + src.warm = 0 + for(var/reagent in heated_reagents) + src.reagents.del_reagent(reagent) + src.name = initial(name) + return /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket name = "\improper Sin-pocket" @@ -731,37 +782,6 @@ user << "You think \the [src] is ready to eat about now." heat() -/obj/item/weapon/reagent_containers/food/snacks/donkpocket - name = "Donk-pocket" - desc = "The food of choice for the seasoned traitor." - icon_state = "donkpocket" - filling_color = "#DEDEAB" - center_of_mass = list("x"=16, "y"=10) - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("protein", 2) - - var/warm = 0 - var/list/heated_reagents = list("tricordrazine" = 5) - proc/heat() - warm = 1 - for(var/reagent in heated_reagents) - reagents.add_reagent(reagent, heated_reagents[reagent]) - bitesize = 6 - name = "Warm " + name - cooltime() - - proc/cooltime() - if (src.warm) - spawn(4200) - src.warm = 0 - for(var/reagent in heated_reagents) - src.reagents.del_reagent(reagent) - src.name = initial(name) - return - /obj/item/weapon/reagent_containers/food/snacks/brainburger name = "brainburger" desc = "A strange looking burger. It looks almost sentient." @@ -769,11 +789,11 @@ filling_color = "#F2B6EA" center_of_mass = list("x"=15, "y"=11) - New() - ..() - reagents.add_reagent("protein", 6) - reagents.add_reagent("alkysine", 6) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/brainburger/New() + ..() + reagents.add_reagent("protein", 6) + reagents.add_reagent("alkysine", 6) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/ghostburger name = "Ghost Burger" @@ -782,11 +802,10 @@ filling_color = "#FFF2FF" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 2 - +/obj/item/weapon/reagent_containers/food/snacks/ghostburger/New() + ..() + reagents.add_reagent("nutriment", 2) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/human var/hname = "" @@ -798,10 +817,11 @@ desc = "A bloody burger." icon_state = "hburger" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("protein", 6) - bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/human/burger/New() + ..() + reagents.add_reagent("protein", 6) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/cheeseburger name = "cheeseburger" @@ -809,10 +829,10 @@ icon_state = "cheeseburger" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("protein", 2) - reagents.add_reagent("nutriment", 2) +/obj/item/weapon/reagent_containers/food/snacks/cheeseburger/New() + ..() + reagents.add_reagent("protein", 2) + reagents.add_reagent("nutriment", 2) /obj/item/weapon/reagent_containers/food/snacks/monkeyburger name = "burger" @@ -821,11 +841,11 @@ filling_color = "#D63C3C" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("nutriment", 3) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/monkeyburger/New() + ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 3) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/fishburger name = "Fillet -o- Carp Sandwich" @@ -834,11 +854,11 @@ filling_color = "#FFDEFE" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("protein", 6) - reagents.add_reagent("carpotoxin", 3) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/fishburger/New() + ..() + reagents.add_reagent("protein", 6) + reagents.add_reagent("carpotoxin", 3) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/tofuburger name = "Tofu Burger" @@ -847,10 +867,10 @@ filling_color = "#FFFEE0" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/tofuburger/New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/roburger name = "roburger" @@ -859,10 +879,10 @@ filling_color = "#CCCCCC" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/roburger/New() + ..() + reagents.add_reagent("nutriment", 2) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/roburgerbig name = "roburger" @@ -872,9 +892,9 @@ volume = 100 center_of_mass = list("x"=16, "y"=11) - New() - ..() - bitesize = 0.1 +/obj/item/weapon/reagent_containers/food/snacks/roburgerbig/New() + ..() + bitesize = 0.1 /obj/item/weapon/reagent_containers/food/snacks/xenoburger name = "xenoburger" @@ -883,10 +903,10 @@ filling_color = "#43DE18" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("protein", 8) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/xenoburger/New() + ..() + reagents.add_reagent("protein", 8) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/clownburger name = "Clown Burger" @@ -895,10 +915,10 @@ filling_color = "#FF00FF" center_of_mass = list("x"=17, "y"=12) - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/clownburger/New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/mimeburger name = "Mime Burger" @@ -907,10 +927,10 @@ filling_color = "#FFFFFF" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/mimeburger/New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/omelette name = "Omelette Du Fromage" @@ -920,11 +940,10 @@ filling_color = "#FFF9A8" center_of_mass = list("x"=16, "y"=13) - //var/herp = 0 - New() - ..() - reagents.add_reagent("protein", 8) - bitesize = 1 +/obj/item/weapon/reagent_containers/food/snacks/omelette/New() + ..() + reagents.add_reagent("protein", 8) + bitesize = 1 /obj/item/weapon/reagent_containers/food/snacks/muffin name = "Muffin" @@ -933,10 +952,10 @@ filling_color = "#E0CF9B" center_of_mass = list("x"=17, "y"=4) - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/muffin/New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/pie name = "Banana Cream Pie" @@ -965,11 +984,11 @@ trash = /obj/item/trash/plate center_of_mass = list("x"=16, "y"=13) - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("berryjuice", 5) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/berryclafoutis/New() + ..() + reagents.add_reagent("nutriment", 4) + reagents.add_reagent("berryjuice", 5) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/waffles name = "waffles" @@ -979,10 +998,10 @@ filling_color = "#E6DEB5" center_of_mass = list("x"=15, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/waffles/New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/eggplantparm name = "Eggplant Parmigiana" @@ -992,10 +1011,10 @@ filling_color = "#4D2F5E" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/eggplantparm/New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/soylentgreen name = "Soylent Green" @@ -1005,10 +1024,10 @@ filling_color = "#B8E6B5" center_of_mass = list("x"=15, "y"=11) - New() - ..() - reagents.add_reagent("protein", 10) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/soylentgreen/New() + ..() + reagents.add_reagent("protein", 10) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/soylenviridians name = "Soylen Virdians" @@ -1018,11 +1037,10 @@ filling_color = "#E6FA61" center_of_mass = list("x"=15, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 10) - bitesize = 2 - +/obj/item/weapon/reagent_containers/food/snacks/soylenviridians/New() + ..() + reagents.add_reagent("nutriment", 10) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/meatpie name = "Meat-pie" @@ -1032,10 +1050,10 @@ filling_color = "#948051" center_of_mass = list("x"=16, "y"=13) - New() - ..() - reagents.add_reagent("protein", 10) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/meatpie/New() + ..() + reagents.add_reagent("protein", 10) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/tofupie name = "Tofu-pie" @@ -1045,10 +1063,10 @@ filling_color = "#FFFEE0" center_of_mass = list("x"=16, "y"=13) - New() - ..() - reagents.add_reagent("nutriment", 10) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/tofupie/New() + ..() + reagents.add_reagent("nutriment", 10) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/amanita_pie name = "amanita pie" @@ -1057,12 +1075,12 @@ filling_color = "#FFCCCC" center_of_mass = list("x"=17, "y"=9) - New() - ..() - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("amatoxin", 3) - reagents.add_reagent("psilocybin", 1) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/amanita_pie/New() + ..() + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("amatoxin", 3) + reagents.add_reagent("psilocybin", 1) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/plump_pie name = "plump pie" @@ -1071,17 +1089,17 @@ filling_color = "#B8279B" center_of_mass = list("x"=17, "y"=9) - New() - ..() - if(prob(10)) - name = "exceptional plump pie" - desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump pie!" - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("tricordrazine", 5) - bitesize = 2 - else - reagents.add_reagent("nutriment", 8) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/plump_pie/New() + ..() + if(prob(10)) + name = "exceptional plump pie" + desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump pie!" + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("tricordrazine", 5) + bitesize = 2 + else + reagents.add_reagent("nutriment", 8) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/xemeatpie name = "Xeno-pie" @@ -1091,10 +1109,10 @@ filling_color = "#43DE18" center_of_mass = list("x"=16, "y"=13) - New() - ..() - reagents.add_reagent("protein", 10) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/xemeatpie/New() + ..() + reagents.add_reagent("protein", 10) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/wingfangchu name = "Wing Fang Chu" @@ -1104,11 +1122,10 @@ filling_color = "#43DE18" center_of_mass = list("x"=17, "y"=9) - New() - ..() - reagents.add_reagent("protein", 6) - bitesize = 2 - +/obj/item/weapon/reagent_containers/food/snacks/wingfangchu/New() + ..() + reagents.add_reagent("protein", 6) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/human/kabob name = "-kabob" @@ -1118,10 +1135,10 @@ filling_color = "#A85340" center_of_mass = list("x"=17, "y"=15) - New() - ..() - reagents.add_reagent("protein", 8) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/human/kabob/New() + ..() + reagents.add_reagent("protein", 8) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/monkeykabob name = "Meat-kabob" @@ -1131,10 +1148,10 @@ filling_color = "#A85340" center_of_mass = list("x"=17, "y"=15) - New() - ..() - reagents.add_reagent("protein", 8) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/monkeykabob/New() + ..() + reagents.add_reagent("protein", 8) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/tofukabob name = "Tofu-kabob" @@ -1144,10 +1161,10 @@ filling_color = "#FFFEE0" center_of_mass = list("x"=17, "y"=15) - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/tofukabob/New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/cubancarp name = "Cuban Carp" @@ -1157,13 +1174,13 @@ filling_color = "#E9ADFF" center_of_mass = list("x"=12, "y"=5) - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("carpotoxin", 3) - reagents.add_reagent("capsaicin", 3) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/cubancarp/New() + ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("carpotoxin", 3) + reagents.add_reagent("capsaicin", 3) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/popcorn name = "Popcorn" @@ -1174,17 +1191,17 @@ filling_color = "#FFFAD4" center_of_mass = list("x"=16, "y"=8) - New() - ..() - unpopped = rand(1,10) - reagents.add_reagent("nutriment", 2) - bitesize = 0.1 //this snack is supposed to be eating during looooong time. And this it not dinner food! --rastaf0 - On_Consume() - if(prob(unpopped)) //lol ...what's the point? - usr << "\red You bite down on an un-popped kernel!" - unpopped = max(0, unpopped-1) - ..() +/obj/item/weapon/reagent_containers/food/snacks/popcorn/New() + ..() + unpopped = rand(1,10) + reagents.add_reagent("nutriment", 2) + bitesize = 0.1 //this snack is supposed to be eating during looooong time. And this it not dinner food! --rastaf0 +/obj/item/weapon/reagent_containers/food/snacks/popcorn/On_Consume() + if(prob(unpopped)) //lol ...what's the point? + usr << "\red You bite down on an un-popped kernel!" + unpopped = max(0, unpopped-1) + ..() /obj/item/weapon/reagent_containers/food/snacks/sosjerky name = "Scaredy's Private Reserve Beef Jerky" @@ -1194,7 +1211,7 @@ filling_color = "#631212" center_of_mass = list("x"=15, "y"=9) - New() +/obj/item/weapon/reagent_containers/food/snacks/sosjerky/New() ..() reagents.add_reagent("protein", 4) bitesize = 2 @@ -1207,9 +1224,9 @@ filling_color = "#343834" center_of_mass = list("x"=15, "y"=4) - New() - ..() - reagents.add_reagent("nutriment", 6) +/obj/item/weapon/reagent_containers/food/snacks/no_raisin/New() + ..() + reagents.add_reagent("nutriment", 6) /obj/item/weapon/reagent_containers/food/snacks/spacetwinkie name = "Space Twinkie" @@ -1218,10 +1235,10 @@ filling_color = "#FFE591" center_of_mass = list("x"=15, "y"=11) - New() - ..() - reagents.add_reagent("sugar", 4) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie/New() + ..() + reagents.add_reagent("sugar", 4) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers name = "Cheesie Honkers" @@ -1231,10 +1248,10 @@ filling_color = "#FFA305" center_of_mass = list("x"=15, "y"=9) - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers/New() + ..() + reagents.add_reagent("nutriment", 4) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/syndicake name = "Syndi-Cakes" @@ -1244,11 +1261,12 @@ center_of_mass = list("x"=16, "y"=10) trash = /obj/item/trash/syndi_cakes - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("doctorsdelight", 5) - bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/syndicake/New() + ..() + reagents.add_reagent("nutriment", 4) + reagents.add_reagent("doctorsdelight", 5) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/loadedbakedpotato name = "Loaded Baked Potato" @@ -1257,11 +1275,11 @@ filling_color = "#9C7A68" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("protein", 3) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/loadedbakedpotato/New() + ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("protein", 3) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/fries name = "Space Fries" @@ -1271,10 +1289,10 @@ filling_color = "#EDDD00" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/fries/New() + ..() + reagents.add_reagent("nutriment", 4) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/soydope name = "Soy Dope" @@ -1284,10 +1302,10 @@ filling_color = "#C4BF76" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/soydope/New() + ..() + reagents.add_reagent("nutriment", 2) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/spagetti name = "Spaghetti" @@ -1296,10 +1314,10 @@ filling_color = "#EDDD00" center_of_mass = list("x"=16, "y"=16) - New() - ..() - reagents.add_reagent("nutriment", 1) - bitesize = 1 +/obj/item/weapon/reagent_containers/food/snacks/spagetti/New() + ..() + reagents.add_reagent("nutriment", 1) + bitesize = 1 /obj/item/weapon/reagent_containers/food/snacks/cheesyfries name = "Cheesy Fries" @@ -1309,11 +1327,11 @@ filling_color = "#EDDD00" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("protein", 2) - reagents.add_reagent("nutriment", 4) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/cheesyfries/New() + ..() + reagents.add_reagent("protein", 2) + reagents.add_reagent("nutriment", 4) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/fortunecookie name = "Fortune cookie" @@ -1322,10 +1340,10 @@ filling_color = "#E8E79E" center_of_mass = list("x"=15, "y"=14) - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/fortunecookie/New() + ..() + reagents.add_reagent("nutriment", 3) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/badrecipe name = "Burned mess" @@ -1334,11 +1352,11 @@ filling_color = "#211F02" center_of_mass = list("x"=16, "y"=12) - New() - ..() - reagents.add_reagent("toxin", 1) - reagents.add_reagent("carbon", 3) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/badrecipe/New() + ..() + reagents.add_reagent("toxin", 1) + reagents.add_reagent("carbon", 3) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/meatsteak name = "Meat steak" @@ -1348,12 +1366,12 @@ filling_color = "#7A3D11" center_of_mass = list("x"=16, "y"=13) - New() - ..() - reagents.add_reagent("protein", 4) - reagents.add_reagent("sodiumchloride", 1) - reagents.add_reagent("blackpepper", 1) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/meatsteak/New() + ..() + reagents.add_reagent("protein", 4) + reagents.add_reagent("sodiumchloride", 1) + reagents.add_reagent("blackpepper", 1) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/spacylibertyduff name = "Spacy Liberty Duff" @@ -1363,11 +1381,11 @@ filling_color = "#42B873" center_of_mass = list("x"=16, "y"=8) - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("psilocybin", 6) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/spacylibertyduff/New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("psilocybin", 6) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/amanitajelly name = "Amanita Jelly" @@ -1377,12 +1395,12 @@ filling_color = "#ED0758" center_of_mass = list("x"=16, "y"=5) - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("amatoxin", 6) - reagents.add_reagent("psilocybin", 3) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/amanitajelly/New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("amatoxin", 6) + reagents.add_reagent("psilocybin", 3) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/poppypretzel name = "Poppy pretzel" @@ -1392,11 +1410,10 @@ filling_color = "#916E36" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 2 - +/obj/item/weapon/reagent_containers/food/snacks/poppypretzel/New() + ..() + reagents.add_reagent("nutriment", 5) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/meatballsoup name = "Meatball soup" @@ -1406,11 +1423,11 @@ filling_color = "#785210" center_of_mass = list("x"=16, "y"=8) - New() - ..() - reagents.add_reagent("protein", 8) - reagents.add_reagent("water", 5) - bitesize = 5 +/obj/item/weapon/reagent_containers/food/snacks/meatballsoup/New() + ..() + reagents.add_reagent("protein", 8) + reagents.add_reagent("water", 5) + bitesize = 5 /obj/item/weapon/reagent_containers/food/snacks/slimesoup name = "slime soup" @@ -1418,11 +1435,11 @@ icon_state = "slimesoup" //nonexistant? filling_color = "#C4DBA0" - New() - ..() - reagents.add_reagent("slimejelly", 5) - reagents.add_reagent("water", 10) - bitesize = 5 +/obj/item/weapon/reagent_containers/food/snacks/slimesoup/New() + ..() + reagents.add_reagent("slimejelly", 5) + reagents.add_reagent("water", 10) + bitesize = 5 /obj/item/weapon/reagent_containers/food/snacks/bloodsoup name = "Tomato soup" @@ -1431,12 +1448,12 @@ filling_color = "#FF0000" center_of_mass = list("x"=16, "y"=7) - New() - ..() - reagents.add_reagent("protein", 2) - reagents.add_reagent("blood", 10) - reagents.add_reagent("water", 5) - bitesize = 5 +/obj/item/weapon/reagent_containers/food/snacks/bloodsoup/New() + ..() + reagents.add_reagent("protein", 2) + reagents.add_reagent("blood", 10) + reagents.add_reagent("water", 5) + bitesize = 5 /obj/item/weapon/reagent_containers/food/snacks/clownstears name = "Clown's Tears" @@ -1445,12 +1462,12 @@ filling_color = "#C4FBFF" center_of_mass = list("x"=16, "y"=7) - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("banana", 5) - reagents.add_reagent("water", 10) - bitesize = 5 +/obj/item/weapon/reagent_containers/food/snacks/clownstears/New() + ..() + reagents.add_reagent("nutriment", 4) + reagents.add_reagent("banana", 5) + reagents.add_reagent("water", 10) + bitesize = 5 /obj/item/weapon/reagent_containers/food/snacks/vegetablesoup name = "Vegetable soup" @@ -1460,11 +1477,11 @@ filling_color = "#AFC4B5" center_of_mass = list("x"=16, "y"=8) - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("water", 5) - bitesize = 5 +/obj/item/weapon/reagent_containers/food/snacks/vegetablesoup/New() + ..() + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("water", 5) + bitesize = 5 /obj/item/weapon/reagent_containers/food/snacks/nettlesoup name = "Nettle soup" @@ -1474,12 +1491,12 @@ filling_color = "#AFC4B5" center_of_mass = list("x"=16, "y"=7) - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("water", 5) - reagents.add_reagent("tricordrazine", 5) - bitesize = 5 +/obj/item/weapon/reagent_containers/food/snacks/nettlesoup/New() + ..() + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("water", 5) + reagents.add_reagent("tricordrazine", 5) + bitesize = 5 /obj/item/weapon/reagent_containers/food/snacks/mysterysoup name = "Mystery soup" @@ -1489,45 +1506,45 @@ filling_color = "#F082FF" center_of_mass = list("x"=16, "y"=6) - New() - ..() - var/mysteryselect = pick(1,2,3,4,5,6,7,8,9,10) - switch(mysteryselect) - if(1) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("capsaicin", 3) - reagents.add_reagent("tomatojuice", 2) - if(2) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("frostoil", 3) - reagents.add_reagent("tomatojuice", 2) - if(3) - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("water", 5) - reagents.add_reagent("tricordrazine", 5) - if(4) - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("water", 10) - if(5) - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("banana", 10) - if(6) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("blood", 10) - if(7) - reagents.add_reagent("slimejelly", 10) - reagents.add_reagent("water", 10) - if(8) - reagents.add_reagent("carbon", 10) - reagents.add_reagent("toxin", 10) - if(9) - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("tomatojuice", 10) - if(10) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("tomatojuice", 5) - reagents.add_reagent("imidazoline", 5) - bitesize = 5 +/obj/item/weapon/reagent_containers/food/snacks/mysterysoup/New() + ..() + var/mysteryselect = pick(1,2,3,4,5,6,7,8,9,10) + switch(mysteryselect) + if(1) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("capsaicin", 3) + reagents.add_reagent("tomatojuice", 2) + if(2) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("frostoil", 3) + reagents.add_reagent("tomatojuice", 2) + if(3) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("water", 5) + reagents.add_reagent("tricordrazine", 5) + if(4) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("water", 10) + if(5) + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("banana", 10) + if(6) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("blood", 10) + if(7) + reagents.add_reagent("slimejelly", 10) + reagents.add_reagent("water", 10) + if(8) + reagents.add_reagent("carbon", 10) + reagents.add_reagent("toxin", 10) + if(9) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("tomatojuice", 10) + if(10) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("tomatojuice", 5) + reagents.add_reagent("imidazoline", 5) + bitesize = 5 /obj/item/weapon/reagent_containers/food/snacks/wishsoup name = "Wish Soup" @@ -1537,13 +1554,13 @@ filling_color = "#D1F4FF" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("water", 10) - bitesize = 5 - if(prob(25)) - src.desc = "A wish come true!" - reagents.add_reagent("nutriment", 8) +/obj/item/weapon/reagent_containers/food/snacks/wishsoup/New() + ..() + reagents.add_reagent("water", 10) + bitesize = 5 + if(prob(25)) + src.desc = "A wish come true!" + reagents.add_reagent("nutriment", 8) /obj/item/weapon/reagent_containers/food/snacks/hotchili name = "Hot Chili" @@ -1553,14 +1570,13 @@ filling_color = "#FF3C00" center_of_mass = list("x"=15, "y"=9) - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("capsaicin", 3) - reagents.add_reagent("tomatojuice", 2) - bitesize = 5 - +/obj/item/weapon/reagent_containers/food/snacks/hotchili/New() + ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("capsaicin", 3) + reagents.add_reagent("tomatojuice", 2) + bitesize = 5 /obj/item/weapon/reagent_containers/food/snacks/coldchili name = "Cold Chili" @@ -1570,33 +1586,14 @@ center_of_mass = list("x"=15, "y"=9) trash = /obj/item/trash/snack_bowl - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("frostoil", 3) - reagents.add_reagent("tomatojuice", 2) - bitesize = 5 -/* No more of this -/obj/item/weapon/reagent_containers/food/snacks/telebacon - name = "Tele Bacon" - desc = "It tastes a little odd but it is still delicious." - icon_state = "bacon" - var/obj/item/device/radio/beacon/bacon/baconbeacon - bitesize = 2 - center_of_mass = list("x"=18, "y"=13) - - New() - ..() - reagents.add_reagent("nutriment", 4) - baconbeacon = new /obj/item/device/radio/beacon/bacon(src) - - On_Consume() - if(!reagents.total_volume) - baconbeacon.loc = usr - baconbeacon.digest_delay() -*/ +/obj/item/weapon/reagent_containers/food/snacks/coldchili/New() + ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("frostoil", 3) + reagents.add_reagent("tomatojuice", 2) + bitesize = 5 /obj/item/weapon/reagent_containers/food/snacks/monkeycube name = "monkey cube" @@ -1610,33 +1607,33 @@ var/wrapped = 0 var/monkey_type = "Monkey" - New() - ..() - reagents.add_reagent("protein", 10) +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/New() + ..() + reagents.add_reagent("protein", 10) - attack_self(mob/user as mob) - if(wrapped) - Unwrap(user) +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/attack_self(mob/user as mob) + if(wrapped) + Unwrap(user) - proc/Expand() - src.visible_message("\The [src] expands!") - var/mob/living/carbon/human/H = new(get_turf(src)) - H.set_species(monkey_type) - H.real_name = H.species.get_random_name() - H.name = H.real_name - if(ismob(loc)) - var/mob/M = loc - M.removeItem(src) - qdel(src) - return 1 +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/proc/Expand() + src.visible_message("\The [src] expands!") + var/mob/living/carbon/human/H = new(get_turf(src)) + H.set_species(monkey_type) + H.real_name = H.species.get_random_name() + H.name = H.real_name + if(ismob(loc)) + var/mob/M = loc + M.unEquip(src) + qdel(src) + return 1 - proc/Unwrap(mob/user as mob) - icon_state = "monkeycube" - desc = "Just add water!" - user << "You unwrap the cube." - wrapped = 0 - flags |= OPENCONTAINER - return +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/proc/Unwrap(mob/user as mob) + icon_state = "monkeycube" + desc = "Just add water!" + user << "You unwrap the cube." + wrapped = 0 + flags |= OPENCONTAINER + return /obj/item/weapon/reagent_containers/food/snacks/monkeycube/on_reagent_change() if(reagents.has_reagent("water")) @@ -1672,17 +1669,16 @@ name = "neaera cube" monkey_type = "Neaera" - /obj/item/weapon/reagent_containers/food/snacks/spellburger name = "Spell Burger" desc = "This is absolutely Ei Nath." icon_state = "spellburger" filling_color = "#D505FF" - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/spellburger/New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/bigbiteburger name = "Big Bite Burger" @@ -1691,11 +1687,11 @@ filling_color = "#E3D681" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("protein", 10) - reagents.add_reagent("nutriment", 4) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/bigbiteburger/New() + ..() + reagents.add_reagent("protein", 10) + reagents.add_reagent("nutriment", 4) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/enchiladas name = "Enchiladas" @@ -1705,12 +1701,12 @@ filling_color = "#A36A1F" center_of_mass = list("x"=16, "y"=13) - New() - ..() - reagents.add_reagent("protein", 6) - reagents.add_reagent("nutriment",2) - reagents.add_reagent("capsaicin", 6) - bitesize = 4 +/obj/item/weapon/reagent_containers/food/snacks/enchiladas/New() + ..() + reagents.add_reagent("protein", 6) + reagents.add_reagent("nutriment",2) + reagents.add_reagent("capsaicin", 6) + bitesize = 4 /obj/item/weapon/reagent_containers/food/snacks/monkeysdelight name = "monkey's Delight" @@ -1720,13 +1716,13 @@ filling_color = "#5C3C11" center_of_mass = list("x"=16, "y"=13) - New() - ..() - reagents.add_reagent("protein", 10) - reagents.add_reagent("banana", 5) - reagents.add_reagent("blackpepper", 1) - reagents.add_reagent("sodiumchloride", 1) - bitesize = 6 +/obj/item/weapon/reagent_containers/food/snacks/monkeysdelight/New() + ..() + reagents.add_reagent("protein", 10) + reagents.add_reagent("banana", 5) + reagents.add_reagent("blackpepper", 1) + reagents.add_reagent("sodiumchloride", 1) + bitesize = 6 /obj/item/weapon/reagent_containers/food/snacks/baguette name = "Baguette" @@ -1735,12 +1731,12 @@ filling_color = "#E3D796" center_of_mass = list("x"=18, "y"=12) - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("blackpepper", 1) - reagents.add_reagent("sodiumchloride", 1) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/baguette/New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("blackpepper", 1) + reagents.add_reagent("sodiumchloride", 1) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/fishandchips name = "Fish and Chips" @@ -1749,12 +1745,12 @@ filling_color = "#E3D796" center_of_mass = list("x"=16, "y"=16) - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("carpotoxin", 3) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/fishandchips/New() + ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("carpotoxin", 3) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/sandwich name = "Sandwich" @@ -1764,11 +1760,11 @@ filling_color = "#D9BE29" center_of_mass = list("x"=16, "y"=4) - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("nutriment", 3) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sandwich/New() + ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 3) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/toastedsandwich name = "Toasted Sandwich" @@ -1778,12 +1774,12 @@ filling_color = "#D9BE29" center_of_mass = list("x"=16, "y"=4) - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("carbon", 2) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/toastedsandwich/New() + ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("carbon", 2) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/grilledcheese name = "Grilled Cheese Sandwich" @@ -1792,11 +1788,11 @@ trash = /obj/item/trash/plate filling_color = "#D9BE29" - New() - ..() - reagents.add_reagent("protein", 4) - reagents.add_reagent("nutriment", 3) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/grilledcheese/New() + ..() + reagents.add_reagent("protein", 4) + reagents.add_reagent("nutriment", 3) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/tomatosoup name = "Tomato Soup" @@ -1806,11 +1802,11 @@ filling_color = "#D92929" center_of_mass = list("x"=16, "y"=7) - New() - ..() - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("tomatojuice", 10) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/tomatosoup/New() + ..() + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("tomatojuice", 10) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/rofflewaffles name = "Roffle Waffles" @@ -1820,11 +1816,11 @@ filling_color = "#FF00F7" center_of_mass = list("x"=15, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("psilocybin", 8) - bitesize = 4 +/obj/item/weapon/reagent_containers/food/snacks/rofflewaffles/New() + ..() + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("psilocybin", 8) + bitesize = 4 /obj/item/weapon/reagent_containers/food/snacks/stew name = "Stew" @@ -1833,14 +1829,14 @@ filling_color = "#9E673A" center_of_mass = list("x"=16, "y"=5) - New() - ..() - reagents.add_reagent("protein", 4) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("tomatojuice", 5) - reagents.add_reagent("imidazoline", 5) - reagents.add_reagent("water", 5) - bitesize = 10 +/obj/item/weapon/reagent_containers/food/snacks/stew/New() + ..() + reagents.add_reagent("protein", 4) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("tomatojuice", 5) + reagents.add_reagent("imidazoline", 5) + reagents.add_reagent("water", 5) + bitesize = 10 /obj/item/weapon/reagent_containers/food/snacks/jelliedtoast name = "Jellied Toast" @@ -1850,20 +1846,18 @@ filling_color = "#B572AB" center_of_mass = list("x"=16, "y"=8) - New() - ..() - reagents.add_reagent("nutriment", 1) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/New() + ..() + reagents.add_reagent("nutriment", 1) + bitesize = 3 -/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/cherry - New() - ..() - reagents.add_reagent("cherryjelly", 5) +/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/cherry/New() + ..() + reagents.add_reagent("cherryjelly", 5) -/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/slime - New() - ..() - reagents.add_reagent("slimejelly", 5) +/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/slime/New() + ..() + reagents.add_reagent("slimejelly", 5) /obj/item/weapon/reagent_containers/food/snacks/jellyburger name = "Jelly Burger" @@ -1872,20 +1866,18 @@ filling_color = "#B572AB" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/jellyburger/New() + ..() + reagents.add_reagent("nutriment", 5) + bitesize = 2 -/obj/item/weapon/reagent_containers/food/snacks/jellyburger/slime - New() - ..() - reagents.add_reagent("slimejelly", 5) +/obj/item/weapon/reagent_containers/food/snacks/jellyburger/slime/New() + ..() + reagents.add_reagent("slimejelly", 5) -/obj/item/weapon/reagent_containers/food/snacks/jellyburger/cherry - New() - ..() - reagents.add_reagent("cherryjelly", 5) +/obj/item/weapon/reagent_containers/food/snacks/jellyburger/cherry/New() + ..() + reagents.add_reagent("cherryjelly", 5) /obj/item/weapon/reagent_containers/food/snacks/milosoup name = "Milosoup" @@ -1894,11 +1886,11 @@ trash = /obj/item/trash/snack_bowl center_of_mass = list("x"=16, "y"=7) - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("water", 5) - bitesize = 4 +/obj/item/weapon/reagent_containers/food/snacks/milosoup/New() + ..() + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("water", 5) + bitesize = 4 /obj/item/weapon/reagent_containers/food/snacks/stewedsoymeat name = "Stewed Soy Meat" @@ -1907,10 +1899,10 @@ trash = /obj/item/trash/plate center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/stewedsoymeat/New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/boiledspagetti name = "Boiled Spaghetti" @@ -1920,10 +1912,10 @@ filling_color = "#FCEE81" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti/New() + ..() + reagents.add_reagent("nutriment", 2) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/boiledrice name = "Boiled Rice" @@ -1933,10 +1925,10 @@ filling_color = "#FFFBDB" center_of_mass = list("x"=17, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/boiledrice/New() + ..() + reagents.add_reagent("nutriment", 2) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/ricepudding name = "Rice Pudding" @@ -1946,10 +1938,10 @@ filling_color = "#FFFBDB" center_of_mass = list("x"=17, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/ricepudding/New() + ..() + reagents.add_reagent("nutriment", 4) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/pastatomato name = "Spaghetti" @@ -1959,11 +1951,11 @@ filling_color = "#DE4545" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("tomatojuice", 10) - bitesize = 4 +/obj/item/weapon/reagent_containers/food/snacks/pastatomato/New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("tomatojuice", 10) + bitesize = 4 /obj/item/weapon/reagent_containers/food/snacks/meatballspagetti name = "Spaghetti & Meatballs" @@ -1973,11 +1965,11 @@ filling_color = "#DE4545" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("protein", 4) - reagents.add_reagent("nutriment", 4) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/meatballspagetti/New() + ..() + reagents.add_reagent("protein", 4) + reagents.add_reagent("nutriment", 4) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/spesslaw name = "Spesslaw" @@ -1986,11 +1978,11 @@ filling_color = "#DE4545" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("protein", 4) - reagents.add_reagent("nutriment", 4) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/spesslaw/New() + ..() + reagents.add_reagent("protein", 4) + reagents.add_reagent("nutriment", 4) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/carrotfries name = "Carrot Fries" @@ -2000,11 +1992,11 @@ filling_color = "#FAA005" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("imidazoline", 3) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/carrotfries/New() + ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("imidazoline", 3) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/superbiteburger name = "Super Bite Burger" @@ -2013,11 +2005,11 @@ filling_color = "#CCA26A" center_of_mass = list("x"=16, "y"=3) - New() - ..() - reagents.add_reagent("protein", 25) - reagents.add_reagent("nutriment", 25) - bitesize = 10 +/obj/item/weapon/reagent_containers/food/snacks/superbiteburger/New() + ..() + reagents.add_reagent("protein", 25) + reagents.add_reagent("nutriment", 25) + bitesize = 10 /obj/item/weapon/reagent_containers/food/snacks/candiedapple name = "Candied Apple" @@ -2026,10 +2018,10 @@ filling_color = "#F21873" center_of_mass = list("x"=15, "y"=13) - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/candiedapple/New() + ..() + reagents.add_reagent("nutriment", 3) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/applepie name = "Apple Pie" @@ -2038,11 +2030,10 @@ filling_color = "#E0EDC5" center_of_mass = list("x"=16, "y"=13) - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 3 - +/obj/item/weapon/reagent_containers/food/snacks/applepie/New() + ..() + reagents.add_reagent("nutriment", 4) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/cherrypie name = "Cherry Pie" @@ -2051,10 +2042,10 @@ filling_color = "#FF525A" center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/cherrypie/New() + ..() + reagents.add_reagent("nutriment", 4) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/twobread name = "Two Bread" @@ -2063,10 +2054,10 @@ filling_color = "#DBCC9A" center_of_mass = list("x"=15, "y"=12) - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/twobread/New() + ..() + reagents.add_reagent("nutriment", 2) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/jellysandwich name = "Jelly Sandwich" @@ -2076,29 +2067,28 @@ filling_color = "#9E3A78" center_of_mass = list("x"=16, "y"=8) - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/jellysandwich/New() + ..() + reagents.add_reagent("nutriment", 2) + bitesize = 3 -/obj/item/weapon/reagent_containers/food/snacks/jellysandwich/slime - New() - ..() - reagents.add_reagent("slimejelly", 5) +/obj/item/weapon/reagent_containers/food/snacks/jellysandwich/slime/New() + ..() + reagents.add_reagent("slimejelly", 5) -/obj/item/weapon/reagent_containers/food/snacks/jellysandwich/cherry - New() - ..() - reagents.add_reagent("cherryjelly", 5) +/obj/item/weapon/reagent_containers/food/snacks/jellysandwich/cherry/New() + ..() + reagents.add_reagent("cherryjelly", 5) /obj/item/weapon/reagent_containers/food/snacks/boiledslimecore name = "Boiled slime Core" desc = "A boiled red thing." icon_state = "boiledslimecore" //nonexistant? - New() - ..() - reagents.add_reagent("slimejelly", 5) - bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/boiledslimecore/New() + ..() + reagents.add_reagent("slimejelly", 5) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/mint name = "mint" @@ -2107,10 +2097,10 @@ filling_color = "#F2F2F2" center_of_mass = list("x"=16, "y"=14) - New() - ..() - reagents.add_reagent("mint", 1) - bitesize = 1 +/obj/item/weapon/reagent_containers/food/snacks/mint/New() + ..() + reagents.add_reagent("mint", 1) + bitesize = 1 /obj/item/weapon/reagent_containers/food/snacks/mushroomsoup name = "chantrelle soup" @@ -2120,10 +2110,10 @@ filling_color = "#E386BF" center_of_mass = list("x"=17, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/mushroomsoup/New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/plumphelmetbiscuit name = "plump helmet biscuit" @@ -2132,17 +2122,17 @@ filling_color = "#CFB4C4" center_of_mass = list("x"=16, "y"=13) - New() - ..() - if(prob(10)) - name = "exceptional plump helmet biscuit" - desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump helmet biscuit!" - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("tricordrazine", 5) - bitesize = 2 - else - reagents.add_reagent("nutriment", 5) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/plumphelmetbiscuit/New() + ..() + if(prob(10)) + name = "exceptional plump helmet biscuit" + desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump helmet biscuit!" + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("tricordrazine", 5) + bitesize = 2 + else + reagents.add_reagent("nutriment", 5) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/chawanmushi name = "chawanmushi" @@ -2152,10 +2142,10 @@ filling_color = "#F0F2E4" center_of_mass = list("x"=17, "y"=10) - New() - ..() - reagents.add_reagent("protein", 5) - bitesize = 1 +/obj/item/weapon/reagent_containers/food/snacks/chawanmushi/New() + ..() + reagents.add_reagent("protein", 5) + bitesize = 1 /obj/item/weapon/reagent_containers/food/snacks/beetsoup name = "beet soup" @@ -2165,11 +2155,11 @@ filling_color = "#FAC9FF" center_of_mass = list("x"=15, "y"=8) - New() - ..() - name = pick(list("borsch","bortsch","borstch","borsh","borshch","borscht")) - reagents.add_reagent("nutriment", 8) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/beetsoup/New() + ..() + name = pick(list("borsch","bortsch","borstch","borsh","borshch","borscht")) + reagents.add_reagent("nutriment", 8) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/tossedsalad name = "tossed salad" @@ -2178,10 +2168,11 @@ trash = /obj/item/trash/snack_bowl filling_color = "#76B87F" center_of_mass = list("x"=17, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/tossedsalad/New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/validsalad name = "valid salad" @@ -2191,11 +2182,11 @@ filling_color = "#76B87F" center_of_mass = list("x"=17, "y"=11) - New() - ..() - reagents.add_reagent("protein", 2) - reagents.add_reagent("nutriment", 6) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/validsalad/New() + ..() + reagents.add_reagent("protein", 2) + reagents.add_reagent("nutriment", 6) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/appletart name = "golden apple streusel tart" @@ -2205,11 +2196,11 @@ filling_color = "#FFFF00" center_of_mass = list("x"=16, "y"=18) - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("gold", 5) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/appletart/New() + ..() + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("gold", 5) + bitesize = 3 /////////////////////////////////////////////////Sliceable//////////////////////////////////////// // All the food items that can be sliced into smaller bits like Meatbread and Cheesewheels @@ -2228,11 +2219,11 @@ filling_color = "#FF7575" center_of_mass = list("x"=16, "y"=9) - New() - ..() - reagents.add_reagent("protein", 20) - reagents.add_reagent("nutriment", 10) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/meatbread/New() + ..() + reagents.add_reagent("protein", 20) + reagents.add_reagent("nutriment", 10) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/meatbreadslice name = "meatbread slice" @@ -2242,7 +2233,7 @@ filling_color = "#FF7575" bitesize = 2 center_of_mass = list("x"=16, "y"=13) - + /obj/item/weapon/reagent_containers/food/snacks/meatbreadslice/New() ..() if(!(reagents.total_volume)) @@ -2258,11 +2249,11 @@ filling_color = "#8AFF75" center_of_mass = list("x"=16, "y"=9) - New() - ..() - reagents.add_reagent("protein", 20) - reagents.add_reagent("nutriment", 10) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/xenomeatbread/New() + ..() + reagents.add_reagent("protein", 20) + reagents.add_reagent("nutriment", 10) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/xenomeatbreadslice name = "xenomeatbread slice" @@ -2272,7 +2263,7 @@ filling_color = "#8AFF75" bitesize = 2 center_of_mass = list("x"=16, "y"=13) - + /obj/item/weapon/reagent_containers/food/snacks/xenomeatbreadslice/New() ..() if(!(reagents.total_volume)) @@ -2288,11 +2279,11 @@ filling_color = "#EDE5AD" center_of_mass = list("x"=16, "y"=9) - New() - ..() - reagents.add_reagent("banana", 20) - reagents.add_reagent("nutriment", 20) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/bananabread/New() + ..() + reagents.add_reagent("banana", 20) + reagents.add_reagent("nutriment", 20) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/bananabreadslice name = "Banana-nut bread slice" @@ -2302,7 +2293,7 @@ filling_color = "#EDE5AD" bitesize = 2 center_of_mass = list("x"=16, "y"=8) - + /obj/item/weapon/reagent_containers/food/snacks/bananabreadslice/New() ..() if(!(reagents.total_volume)) @@ -2318,10 +2309,10 @@ filling_color = "#F7FFE0" center_of_mass = list("x"=16, "y"=9) - New() - ..() - reagents.add_reagent("nutriment", 30) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/tofubread/New() + ..() + reagents.add_reagent("nutriment", 30) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/tofubreadslice name = "Tofubread slice" @@ -2331,7 +2322,7 @@ filling_color = "#F7FFE0" bitesize = 2 center_of_mass = list("x"=16, "y"=13) - + /obj/item/weapon/reagent_containers/food/snacks/tofubreadslice/New() ..() if(!(reagents.total_volume)) @@ -2347,11 +2338,11 @@ filling_color = "#FFD675" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 25) - reagents.add_reagent("imidazoline", 10) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/carrotcake/New() + ..() + reagents.add_reagent("nutriment", 25) + reagents.add_reagent("imidazoline", 10) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/carrotcakeslice name = "Carrot Cake slice" @@ -2361,7 +2352,7 @@ filling_color = "#FFD675" bitesize = 2 center_of_mass = list("x"=16, "y"=14) - + /obj/item/weapon/reagent_containers/food/snacks/carrotcakeslice/New() ..() if(!(reagents.total_volume)) @@ -2377,12 +2368,12 @@ filling_color = "#E6AEDB" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("protein", 25) - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("alkysine", 10) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/braincake/New() + ..() + reagents.add_reagent("protein", 25) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("alkysine", 10) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/braincakeslice name = "Brain Cake slice" @@ -2392,7 +2383,7 @@ filling_color = "#E6AEDB" bitesize = 2 center_of_mass = list("x"=16, "y"=12) - + /obj/item/weapon/reagent_containers/food/snacks/braincakeslice/New() ..() if(!(reagents.total_volume)) @@ -2409,11 +2400,11 @@ filling_color = "#FAF7AF" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("protein", 15) - reagents.add_reagent("nutriment", 10) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesecake/New() + ..() + reagents.add_reagent("protein", 15) + reagents.add_reagent("nutriment", 10) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/cheesecakeslice name = "Cheese Cake slice" @@ -2423,7 +2414,7 @@ filling_color = "#FAF7AF" bitesize = 2 center_of_mass = list("x"=16, "y"=14) - + /obj/item/weapon/reagent_containers/food/snacks/cheesecakeslice/New() ..() if(!(reagents.total_volume)) @@ -2439,9 +2430,9 @@ filling_color = "#F7EDD5" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 20) +/obj/item/weapon/reagent_containers/food/snacks/sliceable/plaincake/New() + ..() + reagents.add_reagent("nutriment", 20) /obj/item/weapon/reagent_containers/food/snacks/plaincakeslice name = "Vanilla Cake slice" @@ -2451,7 +2442,7 @@ filling_color = "#F7EDD5" bitesize = 2 center_of_mass = list("x"=16, "y"=14) - + /obj/item/weapon/reagent_containers/food/snacks/plaincakeslice/New() ..() if(!(reagents.total_volume)) @@ -2466,9 +2457,9 @@ filling_color = "#FADA8E" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 20) +/obj/item/weapon/reagent_containers/food/snacks/sliceable/orangecake/New() + ..() + reagents.add_reagent("nutriment", 20) /obj/item/weapon/reagent_containers/food/snacks/orangecakeslice name = "Orange Cake slice" @@ -2478,7 +2469,7 @@ filling_color = "#FADA8E" bitesize = 2 center_of_mass = list("x"=16, "y"=14) - + /obj/item/weapon/reagent_containers/food/snacks/orangecakeslice/New() ..() if(!(reagents.total_volume)) @@ -2493,9 +2484,9 @@ filling_color = "#CBFA8E" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 20) +/obj/item/weapon/reagent_containers/food/snacks/sliceable/limecake/New() + ..() + reagents.add_reagent("nutriment", 20) /obj/item/weapon/reagent_containers/food/snacks/limecakeslice name = "Lime Cake slice" @@ -2505,7 +2496,7 @@ filling_color = "#CBFA8E" bitesize = 2 center_of_mass = list("x"=16, "y"=14) - + /obj/item/weapon/reagent_containers/food/snacks/limecakeslice/New() ..() if(!(reagents.total_volume)) @@ -2520,9 +2511,9 @@ filling_color = "#FAFA8E" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 20) +/obj/item/weapon/reagent_containers/food/snacks/sliceable/lemoncake/New() + ..() + reagents.add_reagent("nutriment", 20) /obj/item/weapon/reagent_containers/food/snacks/lemoncakeslice name = "Lemon Cake slice" @@ -2532,7 +2523,7 @@ filling_color = "#FAFA8E" bitesize = 2 center_of_mass = list("x"=16, "y"=14) - + /obj/item/weapon/reagent_containers/food/snacks/lemoncakeslice/New() ..() if(!(reagents.total_volume)) @@ -2547,9 +2538,9 @@ filling_color = "#805930" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 20) +/obj/item/weapon/reagent_containers/food/snacks/sliceable/chocolatecake/New() + ..() + reagents.add_reagent("nutriment", 20) /obj/item/weapon/reagent_containers/food/snacks/chocolatecakeslice name = "Chocolate Cake slice" @@ -2559,7 +2550,7 @@ filling_color = "#805930" bitesize = 2 center_of_mass = list("x"=16, "y"=14) - + /obj/item/weapon/reagent_containers/food/snacks/chocolatecakeslice/New() ..() if(!(reagents.total_volume)) @@ -2574,10 +2565,10 @@ filling_color = "#FFF700" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("protein", 20) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesewheel/New() + ..() + reagents.add_reagent("protein", 20) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/cheesewedge name = "Cheese wedge" @@ -2596,11 +2587,11 @@ filling_color = "#FFD6D6" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 20) - reagents.add_reagent("sprinkles", 10) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/birthdaycake/New() + ..() + reagents.add_reagent("nutriment", 20) + reagents.add_reagent("sprinkles", 10) + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/birthdaycakeslice name = "Birthday Cake slice" @@ -2610,7 +2601,7 @@ filling_color = "#FFD6D6" bitesize = 2 center_of_mass = list("x"=16, "y"=14) - + /obj/item/weapon/reagent_containers/food/snacks/birthdaycakeslice/New() ..() if(!(reagents.total_volume)) @@ -2626,10 +2617,10 @@ filling_color = "#FFE396" center_of_mass = list("x"=16, "y"=9) - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/bread/New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/breadslice name = "Bread slice" @@ -2639,7 +2630,7 @@ filling_color = "#D27332" bitesize = 2 center_of_mass = list("x"=16, "y"=4) - + /obj/item/weapon/reagent_containers/food/snacks/breadslice/New() ..() if(!(reagents.total_volume)) @@ -2655,11 +2646,11 @@ filling_color = "#FFF896" center_of_mass = list("x"=16, "y"=9) - New() - ..() - reagents.add_reagent("protein", 15) - reagents.add_reagent("nutriment", 5) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/creamcheesebread/New() + ..() + reagents.add_reagent("protein", 15) + reagents.add_reagent("nutriment", 5) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/creamcheesebreadslice name = "Cream Cheese Bread slice" @@ -2669,7 +2660,7 @@ filling_color = "#FFF896" bitesize = 2 center_of_mass = list("x"=16, "y"=13) - + /obj/item/weapon/reagent_containers/food/snacks/creamcheesebreadslice/New() ..() if(!(reagents.total_volume)) @@ -2683,7 +2674,7 @@ filling_color = "#FF3867" bitesize = 2 center_of_mass = list("x"=16, "y"=10) - + /obj/item/weapon/reagent_containers/food/snacks/watermelonslice/New() ..() if(!(reagents.total_volume)) @@ -2698,9 +2689,9 @@ filling_color = "#EBF5B8" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 15) +/obj/item/weapon/reagent_containers/food/snacks/sliceable/applecake/New() + ..() + reagents.add_reagent("nutriment", 15) /obj/item/weapon/reagent_containers/food/snacks/applecakeslice name = "Apple Cake slice" @@ -2710,7 +2701,7 @@ filling_color = "#EBF5B8" bitesize = 2 center_of_mass = list("x"=16, "y"=14) - + /obj/item/weapon/reagent_containers/food/snacks/applecakeslice/New() ..() if(!(reagents.total_volume)) @@ -2725,9 +2716,9 @@ filling_color = "#F5B951" center_of_mass = list("x"=16, "y"=10) - New() - ..() - reagents.add_reagent("nutriment", 15) +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pumpkinpie/New() + ..() + reagents.add_reagent("nutriment", 15) /obj/item/weapon/reagent_containers/food/snacks/pumpkinpieslice name = "Pumpkin Pie slice" @@ -2737,7 +2728,7 @@ filling_color = "#F5B951" bitesize = 2 center_of_mass = list("x"=16, "y"=12) - + /obj/item/weapon/reagent_containers/food/snacks/pumpkinpieslice/New() ..() if(!(reagents.total_volume)) @@ -2750,11 +2741,9 @@ filling_color = "#F5DEB8" center_of_mass = list("x"=17, "y"=6) - New() - ..() - reagents.add_reagent("nutriment", 1) - - +/obj/item/weapon/reagent_containers/food/snacks/cracker/New() + ..() + reagents.add_reagent("nutriment", 1) /////////////////////////////////////////////////PIZZA//////////////////////////////////////// @@ -2770,12 +2759,12 @@ slices_num = 6 center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 35) - reagents.add_reagent("protein", 5) - reagents.add_reagent("tomatojuice", 6) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita/New() + ..() + reagents.add_reagent("nutriment", 35) + reagents.add_reagent("protein", 5) + reagents.add_reagent("tomatojuice", 6) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/margheritaslice name = "Margherita slice" @@ -2784,7 +2773,7 @@ filling_color = "#BAA14C" bitesize = 2 center_of_mass = list("x"=18, "y"=13) - + /obj/item/weapon/reagent_containers/food/snacks/margheritaslice/New() ..() if(!(reagents.total_volume)) @@ -2800,11 +2789,11 @@ slices_num = 6 center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("protein", 44) - reagents.add_reagent("tomatojuice", 6) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza/New() + ..() + reagents.add_reagent("protein", 44) + reagents.add_reagent("tomatojuice", 6) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/meatpizzaslice name = "Meatpizza slice" @@ -2813,7 +2802,7 @@ filling_color = "#BAA14C" bitesize = 2 center_of_mass = list("x"=18, "y"=13) - + /obj/item/weapon/reagent_containers/food/snacks/meatpizzaslice/New() ..() if(!(reagents.total_volume)) @@ -2828,11 +2817,11 @@ slices_num = 6 center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 35) - reagents.add_reagent("protein", 5) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza/New() + ..() + reagents.add_reagent("nutriment", 35) + reagents.add_reagent("protein", 5) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/mushroompizzaslice name = "Mushroompizza slice" @@ -2841,7 +2830,7 @@ filling_color = "#BAA14C" bitesize = 2 center_of_mass = list("x"=18, "y"=13) - + /obj/item/weapon/reagent_containers/food/snacks/mushroompizzaslice/New() ..() if(!(reagents.total_volume)) @@ -2856,13 +2845,13 @@ slices_num = 6 center_of_mass = list("x"=16, "y"=11) - New() - ..() - reagents.add_reagent("nutriment", 25) - reagents.add_reagent("protein", 5) - reagents.add_reagent("tomatojuice", 6) - reagents.add_reagent("imidazoline", 12) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza/New() + ..() + reagents.add_reagent("nutriment", 25) + reagents.add_reagent("protein", 5) + reagents.add_reagent("tomatojuice", 6) + reagents.add_reagent("imidazoline", 12) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/vegetablepizzaslice name = "Vegetable pizza slice" @@ -2871,7 +2860,7 @@ filling_color = "#BAA14C" bitesize = 2 center_of_mass = list("x"=18, "y"=13) - + /obj/item/weapon/reagent_containers/food/snacks/vegetablepizzaslice/New() ..() if(!(reagents.total_volume)) @@ -2892,6 +2881,18 @@ var/list/boxes = list() // If the boxes are stacked, they come here var/boxtag = "" +/obj/item/pizzabox/proc/closepizzabox() + + if( boxes.len > 0 ) + return + + open = !open + + if( open && pizza ) + ismessy = 1 + + update_icon() + /obj/item/pizzabox/update_icon() overlays = list() @@ -2970,15 +2971,12 @@ /obj/item/pizzabox/attack_self( mob/user as mob ) - if( boxes.len > 0 ) - return + closepizzabox() - open = !open +/obj/item/pizzabox/AltClick() - if( open && pizza ) - ismessy = 1 - - update_icon() + if(Adjacent(usr)) + closepizzabox() /obj/item/pizzabox/attackby( obj/item/I as obj, mob/user as mob ) if( istype(I, /obj/item/pizzabox/) ) @@ -3064,14 +3062,11 @@ filling_color = "#75754B" center_of_mass = list("x"=16, "y"=7) - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("radium", 2) - bitesize = 2 - - - +/obj/item/weapon/reagent_containers/food/snacks/dionaroast/New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("radium", 2) + bitesize = 2 /////////////////////////////////////////// // new old food stuff from bs12 @@ -3084,10 +3079,10 @@ bitesize = 2 center_of_mass = list("x"=16, "y"=13) - New() - ..() - reagents.add_reagent("protein", 1) - reagents.add_reagent("nutriment", 3) +/obj/item/weapon/reagent_containers/food/snacks/dough/New() + ..() + reagents.add_reagent("protein", 1) + reagents.add_reagent("nutriment", 3) // Dough + rolling pin = flat dough /obj/item/weapon/reagent_containers/food/snacks/dough/attackby(obj/item/weapon/W as obj, mob/user as mob) @@ -3106,10 +3101,10 @@ slices_num = 3 center_of_mass = list("x"=16, "y"=16) - New() - ..() - reagents.add_reagent("protein", 1) - reagents.add_reagent("nutriment", 3) +/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough/New() + ..() + reagents.add_reagent("protein", 1) + reagents.add_reagent("nutriment", 3) /obj/item/weapon/reagent_containers/food/snacks/doughslice name = "dough slice" @@ -3121,9 +3116,9 @@ bitesize = 2 center_of_mass = list("x"=17, "y"=19) - New() - ..() - reagents.add_reagent("nutriment", 1) +/obj/item/weapon/reagent_containers/food/snacks/doughslice/New() + ..() + reagents.add_reagent("nutriment", 1) /obj/item/weapon/reagent_containers/food/snacks/bun name = "bun" @@ -3133,9 +3128,9 @@ bitesize = 2 center_of_mass = list("x"=16, "y"=12) - New() - ..() - reagents.add_reagent("nutriment", 4) +/obj/item/weapon/reagent_containers/food/snacks/bun/New() + ..() + reagents.add_reagent("nutriment", 4) /obj/item/weapon/reagent_containers/food/snacks/bun/attackby(obj/item/weapon/W as obj, mob/user as mob) // Bun + meatball = burger @@ -3188,10 +3183,10 @@ bitesize = 3 center_of_mass = list("x"=21, "y"=12) - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("nutriment", 4) +/obj/item/weapon/reagent_containers/food/snacks/taco/New() + ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 4) /obj/item/weapon/reagent_containers/food/snacks/rawcutlet name = "raw cutlet" @@ -3201,9 +3196,9 @@ bitesize = 1 center_of_mass = list("x"=17, "y"=20) - New() - ..() - reagents.add_reagent("protein", 1) +/obj/item/weapon/reagent_containers/food/snacks/rawcutlet/New() + ..() + reagents.add_reagent("protein", 1) /obj/item/weapon/reagent_containers/food/snacks/cutlet name = "cutlet" @@ -3213,9 +3208,9 @@ bitesize = 2 center_of_mass = list("x"=17, "y"=20) - New() - ..() - reagents.add_reagent("protein", 2) +/obj/item/weapon/reagent_containers/food/snacks/cutlet/New() + ..() + reagents.add_reagent("protein", 2) /obj/item/weapon/reagent_containers/food/snacks/rawmeatball name = "raw meatball" @@ -3225,9 +3220,9 @@ bitesize = 2 center_of_mass = list("x"=16, "y"=15) - New() - ..() - reagents.add_reagent("protein", 2) +/obj/item/weapon/reagent_containers/food/snacks/rawmeatball/New() + ..() + reagents.add_reagent("protein", 2) /obj/item/weapon/reagent_containers/food/snacks/hotdog name = "hotdog" @@ -3236,9 +3231,9 @@ bitesize = 2 center_of_mass = list("x"=16, "y"=17) - New() - ..() - reagents.add_reagent("protein", 6) +/obj/item/weapon/reagent_containers/food/snacks/hotdog/New() + ..() + reagents.add_reagent("protein", 6) /obj/item/weapon/reagent_containers/food/snacks/flatbread name = "flatbread" @@ -3248,9 +3243,9 @@ bitesize = 2 center_of_mass = list("x"=16, "y"=16) - New() - ..() - reagents.add_reagent("nutriment", 3) +/obj/item/weapon/reagent_containers/food/snacks/flatbread/New() + ..() + reagents.add_reagent("nutriment", 3) // potato + knife = raw sticks /obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W as obj, mob/user as mob) @@ -3269,9 +3264,9 @@ bitesize = 2 center_of_mass = list("x"=16, "y"=12) - New() - ..() - reagents.add_reagent("nutriment", 3) +/obj/item/weapon/reagent_containers/food/snacks/rawsticks/New() + ..() + reagents.add_reagent("nutriment", 3) /obj/item/weapon/reagent_containers/food/snacks/liquidfood name = "\improper LiquidFood Ration" @@ -3281,12 +3276,11 @@ filling_color = "#A8A8A8" center_of_mass = list("x"=16, "y"=15) - New() - ..() - reagents.add_reagent("nutriment", 20) - reagents.add_reagent("iron", 3) - bitesize = 4 - +/obj/item/weapon/reagent_containers/food/snacks/liquidfood/New() + ..() + reagents.add_reagent("nutriment", 20) + reagents.add_reagent("iron", 3) + bitesize = 4 /obj/item/weapon/reagent_containers/food/snacks/tastybread name = "bread tube" @@ -3296,10 +3290,10 @@ filling_color = "#A66829" center_of_mass = list("x"=17, "y"=16) - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/tastybread/New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/skrellsnacks name = "\improper SkrellSnax" @@ -3308,7 +3302,7 @@ filling_color = "#A66829" center_of_mass = list("x"=15, "y"=12) - New() - ..() - reagents.add_reagent("nutriment", 10) - bitesize = 3 +/obj/item/weapon/reagent_containers/food/snacks/skrellsnacks/New() + ..() + reagents.add_reagent("nutriment", 10) + bitesize = 3 diff --git a/code/modules/reagents/reagent_containers/food/snacks/meat.dm b/code/modules/reagents/reagent_containers/food/snacks/meat.dm index 7ea52765fcd..9e1dc525366 100644 --- a/code/modules/reagents/reagent_containers/food/snacks/meat.dm +++ b/code/modules/reagents/reagent_containers/food/snacks/meat.dm @@ -5,10 +5,11 @@ health = 180 filling_color = "#FF1C1C" center_of_mass = list("x"=16, "y"=14) - New() - ..() - reagents.add_reagent("protein", 9) - src.bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/meat/New() + ..() + reagents.add_reagent("protein", 9) + src.bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/meat/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/weapon/material/knife)) diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 1a9484ea3eb..44ea628eca3 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -44,66 +44,65 @@ /obj/machinery/radiocarbon_spectrometer ) - New() - ..() - base_name = name +/obj/item/weapon/reagent_containers/glass/New() + ..() + base_name = name - examine(var/mob/user) - if(!..(user, 2)) +/obj/item/weapon/reagent_containers/glass/examine(var/mob/user) + if(!..(user, 2)) + return + if(reagents && reagents.reagent_list.len) + user << "It contains [reagents.total_volume] units of liquid." + else + user << "It is empty." + if(!is_open_container()) + user << "Airtight lid seals it completely." + +/obj/item/weapon/reagent_containers/glass/attack_self() + ..() + if(is_open_container()) + usr << "You put the lid on \the [src]." + flags ^= OPENCONTAINER + else + usr << "You take the lid off \the [src]." + flags |= OPENCONTAINER + update_icon() + +/obj/item/weapon/reagent_containers/glass/afterattack(var/obj/target, var/mob/user, var/flag) + if(!is_open_container() || !flag) + return + + for(var/type in can_be_placed_into) + if(istype(target, type)) return - if(reagents && reagents.reagent_list.len) - user << "It contains [reagents.total_volume] units of liquid." + + if(standard_splash_mob(user, target)) + return + if(standard_dispenser_refill(user, target)) + return + if(standard_pour_into(user, target)) + return + + if(reagents.total_volume) + user << "You splash the solution onto [target]." + reagents.splash(target, reagents.total_volume) + return + +/obj/item/weapon/reagent_containers/glass/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/device/flashlight/pen)) + var/tmp_label = sanitizeSafe(input(user, "Enter a label for [name]", "Label", label_text), MAX_NAME_LEN) + if(length(tmp_label) > 10) + user << "The label can be at most 10 characters long." else - user << "It is empty." - if(!is_open_container()) - user << "Airtight lid seals it completely." + user << "You set the label to \"[tmp_label]\"." + label_text = tmp_label + update_name_label() - attack_self() - ..() - if(is_open_container()) - usr << "You put the lid on \the [src]." - flags ^= OPENCONTAINER - else - usr << "You take the lid off \the [src]." - flags |= OPENCONTAINER - update_icon() - - afterattack(var/obj/target, var/mob/user, var/flag) - - if(!is_open_container() || !flag) - return - - for(var/type in can_be_placed_into) - if(istype(target, type)) - return - - if(standard_splash_mob(user, target)) - return - if(standard_dispenser_refill(user, target)) - return - if(standard_pour_into(user, target)) - return - - if(reagents.total_volume) - user << "You splash the solution onto [target]." - reagents.splash(target, reagents.total_volume) - return - - attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/device/flashlight/pen)) - var/tmp_label = sanitizeSafe(input(user, "Enter a label for [name]", "Label", label_text), MAX_NAME_LEN) - if(length(tmp_label) > 10) - user << "The label can be at most 10 characters long." - else - user << "You set the label to \"[tmp_label]\"." - label_text = tmp_label - update_name_label() - - proc/update_name_label() - if(label_text == "") - name = base_name - else - name = "[base_name] ([label_text])" +/obj/item/weapon/reagent_containers/glass/proc/update_name_label() + if(label_text == "") + name = base_name + else + name = "[base_name] ([label_text])" /obj/item/weapon/reagent_containers/glass/beaker name = "beaker" @@ -113,47 +112,47 @@ item_state = "beaker" matter = list("glass" = 500) - New() - ..() - desc += " Can hold up to [volume] units." - - on_reagent_change() - update_icon() - - pickup(mob/user) - ..() - update_icon() - - dropped(mob/user) - ..() - update_icon() - - attack_hand() - ..() - update_icon() +/obj/item/weapon/reagent_containers/glass/beaker/New() + ..() + desc += " Can hold up to [volume] units." +/obj/item/weapon/reagent_containers/glass/beaker/on_reagent_change() update_icon() - overlays.Cut() - if(reagents.total_volume) - var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10") +/obj/item/weapon/reagent_containers/glass/beaker/pickup(mob/user) + ..() + update_icon() - var/percent = round((reagents.total_volume / volume) * 100) - switch(percent) - if(0 to 9) filling.icon_state = "[icon_state]-10" - if(10 to 24) filling.icon_state = "[icon_state]10" - if(25 to 49) filling.icon_state = "[icon_state]25" - if(50 to 74) filling.icon_state = "[icon_state]50" - if(75 to 79) filling.icon_state = "[icon_state]75" - if(80 to 90) filling.icon_state = "[icon_state]80" - if(91 to INFINITY) filling.icon_state = "[icon_state]100" +/obj/item/weapon/reagent_containers/glass/beaker/dropped(mob/user) + ..() + update_icon() - filling.color = reagents.get_color() - overlays += filling +/obj/item/weapon/reagent_containers/glass/beaker/attack_hand() + ..() + update_icon() - if (!is_open_container()) - var/image/lid = image(icon, src, "lid_[initial(icon_state)]") - overlays += lid +/obj/item/weapon/reagent_containers/glass/beaker/update_icon() + overlays.Cut() + + if(reagents.total_volume) + var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10") + + var/percent = round((reagents.total_volume / volume) * 100) + switch(percent) + if(0 to 9) filling.icon_state = "[icon_state]-10" + if(10 to 24) filling.icon_state = "[icon_state]10" + if(25 to 49) filling.icon_state = "[icon_state]25" + if(50 to 74) filling.icon_state = "[icon_state]50" + if(75 to 79) filling.icon_state = "[icon_state]75" + if(80 to 90) filling.icon_state = "[icon_state]80" + if(91 to INFINITY) filling.icon_state = "[icon_state]100" + + filling.color = reagents.get_color() + overlays += filling + + if (!is_open_container()) + var/image/lid = image(icon, src, "lid_[initial(icon_state)]") + overlays += lid /obj/item/weapon/reagent_containers/glass/beaker/large name = "large beaker" @@ -194,14 +193,12 @@ possible_transfer_amounts = list(5,10,15,25) flags = OPENCONTAINER -/obj/item/weapon/reagent_containers/glass/beaker/cryoxadone - New() - ..() - reagents.add_reagent("cryoxadone", 30) - update_icon() +/obj/item/weapon/reagent_containers/glass/beaker/cryoxadone/New() + ..() + reagents.add_reagent("cryoxadone", 30) + update_icon() -/obj/item/weapon/reagent_containers/glass/beaker/sulphuric - New() +/obj/item/weapon/reagent_containers/glass/beaker/sulphuric/New() ..() reagents.add_reagent("sacid", 60) update_icon() @@ -221,12 +218,12 @@ unacidable = 0 /obj/item/weapon/reagent_containers/glass/bucket/attackby(var/obj/D, mob/user as mob) - if(isprox(D)) user << "You add [D] to [src]." qdel(D) user.put_in_hands(new /obj/item/weapon/bucket_sensor) - user.deleteItem(src) + user.drop_from_inventory(src) + qdel(src) return else if(istype(D, /obj/item/weapon/mop)) if(reagents.total_volume < 1) @@ -255,35 +252,3 @@ amount_per_transfer_from_this = 20 possible_transfer_amounts = list(10,20,30,60,120) volume = 120 - -/* -/obj/item/weapon/reagent_containers/glass/blender_jug - name = "Blender Jug" - desc = "A blender jug, part of a blender." - icon = 'icons/obj/kitchen.dmi' - icon_state = "blender_jug_e" - volume = 100 - - on_reagent_change() - switch(src.reagents.total_volume) - if(0) - icon_state = "blender_jug_e" - if(1 to 75) - icon_state = "blender_jug_h" - if(76 to 100) - icon_state = "blender_jug_f" - -/obj/item/weapon/reagent_containers/glass/canister //not used apparantly - desc = "It's a canister. Mainly used for transporting fuel." - name = "canister" - icon = 'icons/obj/tank.dmi' - icon_state = "canister" - item_state = "canister" - m_amt = 300 - g_amt = 0 - w_class = 4.0 - - amount_per_transfer_from_this = 20 - possible_transfer_amounts = list(10,20,30,60) - volume = 120 -*/ diff --git a/code/modules/reagents/reagent_containers/glass/bottle.dm b/code/modules/reagents/reagent_containers/glass/bottle.dm index 55dfcc7745d..5f22c3f3240 100644 --- a/code/modules/reagents/reagent_containers/glass/bottle.dm +++ b/code/modules/reagents/reagent_containers/glass/bottle.dm @@ -12,48 +12,48 @@ flags = 0 volume = 60 - on_reagent_change() - update_icon() - - pickup(mob/user) - ..() - update_icon() - - dropped(mob/user) - ..() - update_icon() - - attack_hand() - ..() - update_icon() - - New() - ..() - if(!icon_state) - icon_state = "bottle-[rand(1,4)]" - +/obj/item/weapon/reagent_containers/glass/bottle/on_reagent_change() update_icon() - overlays.Cut() - if(reagents.total_volume && (icon_state == "bottle-1" || icon_state == "bottle-2" || icon_state == "bottle-3" || icon_state == "bottle-4")) - var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10") +/obj/item/weapon/reagent_containers/glass/bottle/pickup(mob/user) + ..() + update_icon() - var/percent = round((reagents.total_volume / volume) * 100) - switch(percent) - if(0 to 9) filling.icon_state = "[icon_state]--10" - if(10 to 24) filling.icon_state = "[icon_state]-10" - if(25 to 49) filling.icon_state = "[icon_state]-25" - if(50 to 74) filling.icon_state = "[icon_state]-50" - if(75 to 79) filling.icon_state = "[icon_state]-75" - if(80 to 90) filling.icon_state = "[icon_state]-80" - if(91 to INFINITY) filling.icon_state = "[icon_state]-100" +/obj/item/weapon/reagent_containers/glass/bottle/dropped(mob/user) + ..() + update_icon() - filling.color = reagents.get_color() - overlays += filling +/obj/item/weapon/reagent_containers/glass/bottle/attack_hand() + ..() + update_icon() - if (!is_open_container()) - var/image/lid = image(icon, src, "lid_bottle") - overlays += lid +/obj/item/weapon/reagent_containers/glass/bottle/New() + ..() + if(!icon_state) + icon_state = "bottle-[rand(1,4)]" + +/obj/item/weapon/reagent_containers/glass/bottle/update_icon() + overlays.Cut() + + if(reagents.total_volume && (icon_state == "bottle-1" || icon_state == "bottle-2" || icon_state == "bottle-3" || icon_state == "bottle-4")) + var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10") + + var/percent = round((reagents.total_volume / volume) * 100) + switch(percent) + if(0 to 9) filling.icon_state = "[icon_state]--10" + if(10 to 24) filling.icon_state = "[icon_state]-10" + if(25 to 49) filling.icon_state = "[icon_state]-25" + if(50 to 74) filling.icon_state = "[icon_state]-50" + if(75 to 79) filling.icon_state = "[icon_state]-75" + if(80 to 90) filling.icon_state = "[icon_state]-80" + if(91 to INFINITY) filling.icon_state = "[icon_state]-100" + + filling.color = reagents.get_color() + overlays += filling + + if (!is_open_container()) + var/image/lid = image(icon, src, "lid_bottle") + overlays += lid /obj/item/weapon/reagent_containers/glass/bottle/inaprovaline @@ -86,12 +86,12 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle-3" + /obj/item/weapon/reagent_containers/glass/bottle/cyanide/New() ..() reagents.add_reagent("cyanide", 30) //volume changed to match chloral update_icon() - /obj/item/weapon/reagent_containers/glass/bottle/stoxin name = "soporific bottle" desc = "A small bottle of soporific. Just the fumes make you sleepy." diff --git a/code/modules/reagents/reagent_containers/glass/bottle/robot.dm b/code/modules/reagents/reagent_containers/glass/bottle/robot.dm index 3a95b3cd1c2..2e2d5e4fdd0 100644 --- a/code/modules/reagents/reagent_containers/glass/bottle/robot.dm +++ b/code/modules/reagents/reagent_containers/glass/bottle/robot.dm @@ -14,10 +14,10 @@ icon_state = "bottle-4" reagent = "inaprovaline" - New() - ..() - reagents.add_reagent("inaprovaline", 60) - update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/robot/inaprovaline/New() + ..() + reagents.add_reagent("inaprovaline", 60) + update_icon() /obj/item/weapon/reagent_containers/glass/bottle/robot/antitoxin @@ -27,8 +27,8 @@ icon_state = "bottle-4" reagent = "anti_toxin" - New() - ..() - reagents.add_reagent("anti_toxin", 60) - update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/robot/antitoxin/New() + ..() + reagents.add_reagent("anti_toxin", 60) + update_icon() diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 28b4704fdd7..884afc5ed83 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -33,12 +33,11 @@ if(!affected) user << "\The [H] is missing that limb!" return - else if(affected.status & ORGAN_ROBOT) + else if(affected.robotic >= ORGAN_ROBOT) user << "You cannot inject a robotic limb." return user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) - user.do_attack_animation(M) user << "You inject [M] with [src]." M << "You feel a tiny prick!" diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index b231c8cd35c..def1ac7f817 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -12,85 +12,86 @@ slot_flags = SLOT_EARS volume = 60 - New() - ..() - if(!icon_state) - icon_state = "pill[rand(1, 20)]" - attack(mob/M as mob, mob/user as mob, def_zone) - //TODO: replace with standard_feed_mob() call. - - if(M == user) - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(!H.check_has_mouth()) - user << "Where do you intend to put \the [src]? You don't have a mouth!" - return - var/obj/item/blocked = H.check_mouth_coverage() - if(blocked) - user << "\The [blocked] is in the way!" - return +/obj/item/weapon/reagent_containers/pill/New() + ..() + if(!icon_state) + icon_state = "pill[rand(1, 20)]" - M << "You swallow \the [src]." - M.removeItem(src) //icon update - if(reagents.total_volume) - reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST) - qdel(src) - return 1 +/obj/item/weapon/reagent_containers/pill/attack(mob/M as mob, mob/user as mob, def_zone) - else if(istype(M, /mob/living/carbon/human)) + if(M == user) + if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M if(!H.check_has_mouth()) - user << "Where do you intend to put \the [src]? \The [H] doesn't have a mouth!" + user << "Where do you intend to put \the [src]? You don't have a mouth!" return var/obj/item/blocked = H.check_mouth_coverage() if(blocked) user << "\The [blocked] is in the way!" return - user.visible_message("[user] attempts to force [M] to swallow \the [src].") + M << "You swallow \the [src]." + M.drop_from_inventory(src) //icon update + if(reagents.total_volume) + reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST) + qdel(src) + return 1 - user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) - if(!do_mob(user, M)) - return + else if(istype(M, /mob/living/carbon/human)) - user.removeItem(src) //icon update - user.visible_message("[user] forces [M] to swallow \the [src].") + var/mob/living/carbon/human/H = M + if(!H.check_has_mouth()) + user << "Where do you intend to put \the [src]? \The [H] doesn't have a mouth!" + return + var/obj/item/blocked = H.check_mouth_coverage() + if(blocked) + user << "\The [blocked] is in the way!" + return - var/contained = reagentlist() - M.attack_log += text("\[[time_stamp()]\] Has been fed [name] by [key_name(user)] Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Fed [name] to [key_name(M)] Reagents: [contained]") - msg_admin_attack("[key_name_admin(user)] fed [key_name_admin(M)] with [name] Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + user.visible_message("[user] attempts to force [M] to swallow \the [src].") - if(reagents.total_volume) - reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST) - qdel(src) + user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) + if(!do_mob(user, M)) + return - return 1 + user.drop_from_inventory(src) //icon update + user.visible_message("[user] forces [M] to swallow \the [src].") - return 0 + var/contained = reagentlist() + M.attack_log += text("\[[time_stamp()]\] Has been fed [name] by [key_name(user)] Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Fed [name] to [key_name(M)] Reagents: [contained]") + msg_admin_attack("[key_name_admin(user)] fed [key_name_admin(M)] with [name] Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") - afterattack(obj/target, mob/user, proximity) - if(!proximity) return + if(reagents.total_volume) + reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST) + qdel(src) - if(target.is_open_container() && target.reagents) - if(!target.reagents.total_volume) - user << "[target] is empty. Can't dissolve \the [src]." - return - user << "You dissolve \the [src] in [target]." + return 1 - user.attack_log += text("\[[time_stamp()]\] Spiked \a [target] with a pill. Reagents: [reagentlist()]") - msg_admin_attack("[user.name] ([user.ckey]) spiked \a [target] with a pill. Reagents: [reagentlist()] (INTENT: [uppertext(user.a_intent)]) (JMP)") + return 0 - reagents.trans_to(target, reagents.total_volume) - for(var/mob/O in viewers(2, user)) - O.show_message("[user] puts something in \the [target].", 1) +/obj/item/weapon/reagent_containers/pill/afterattack(obj/target, mob/user, proximity) + if(!proximity) return - qdel(src) + if(target.is_open_container() && target.reagents) + if(!target.reagents.total_volume) + user << "[target] is empty. Can't dissolve \the [src]." + return + user << "You dissolve \the [src] in [target]." - return + user.attack_log += text("\[[time_stamp()]\] Spiked \a [target] with a pill. Reagents: [reagentlist()]") + msg_admin_attack("[user.name] ([user.ckey]) spiked \a [target] with a pill. Reagents: [reagentlist()] (INTENT: [uppertext(user.a_intent)]) (JMP)") + + reagents.trans_to(target, reagents.total_volume) + for(var/mob/O in viewers(2, user)) + O.show_message("[user] puts something in \the [target].", 1) + + qdel(src) + + return //////////////////////////////////////////////////////////////////////////////// /// Pills. END @@ -101,163 +102,208 @@ name = "Anti-toxins pill" desc = "Neutralizes many common toxins." icon_state = "pill17" - New() - ..() - reagents.add_reagent("anti_toxin", 25) + +/obj/item/weapon/reagent_containers/pill/antitox/New() + ..() + reagents.add_reagent("anti_toxin", 25) + /obj/item/weapon/reagent_containers/pill/tox name = "Toxins pill" desc = "Highly toxic." icon_state = "pill5" - New() - ..() - reagents.add_reagent("toxin", 50) + +/obj/item/weapon/reagent_containers/pill/tox/New() + ..() + reagents.add_reagent("toxin", 50) + /obj/item/weapon/reagent_containers/pill/cyanide name = "Cyanide pill" desc = "Don't swallow this." icon_state = "pill5" - New() - ..() - reagents.add_reagent("cyanide", 50) + +/obj/item/weapon/reagent_containers/pill/cyanide/New() + ..() + reagents.add_reagent("cyanide", 50) + /obj/item/weapon/reagent_containers/pill/adminordrazine name = "Adminordrazine pill" desc = "It's magic. We don't have to explain it." icon_state = "pill16" - New() - ..() - reagents.add_reagent("adminordrazine", 50) + +/obj/item/weapon/reagent_containers/pill/adminordrazine/New() + ..() + reagents.add_reagent("adminordrazine", 50) /obj/item/weapon/reagent_containers/pill/stox name = "Sleeping pill" desc = "Commonly used to treat insomnia." icon_state = "pill8" - New() - ..() - reagents.add_reagent("stoxin", 15) + +/obj/item/weapon/reagent_containers/pill/stox/New() + ..() + reagents.add_reagent("stoxin", 15) + /obj/item/weapon/reagent_containers/pill/kelotane name = "Kelotane pill" desc = "Used to treat burns." icon_state = "pill11" - New() - ..() - reagents.add_reagent("kelotane", 15) + +/obj/item/weapon/reagent_containers/pill/kelotane/New() + ..() + reagents.add_reagent("kelotane", 15) + /obj/item/weapon/reagent_containers/pill/paracetamol name = "Paracetamol pill" desc = "Tylenol! A painkiller for the ages. Chewables!" icon_state = "pill8" - New() - ..() - reagents.add_reagent("paracetamol", 15) + +/obj/item/weapon/reagent_containers/pill/paracetamol/New() + ..() + reagents.add_reagent("paracetamol", 15) + /obj/item/weapon/reagent_containers/pill/tramadol name = "Tramadol pill" desc = "A simple painkiller." icon_state = "pill8" - New() - ..() - reagents.add_reagent("tramadol", 15) + +/obj/item/weapon/reagent_containers/pill/tramadol/New() + ..() + reagents.add_reagent("tramadol", 15) /obj/item/weapon/reagent_containers/pill/methylphenidate name = "Methylphenidate pill" desc = "Improves the ability to concentrate." icon_state = "pill8" - New() - ..() - reagents.add_reagent("methylphenidate", 15) + +/obj/item/weapon/reagent_containers/pill/methylphenidate/New() + ..() + reagents.add_reagent("methylphenidate", 15) + /obj/item/weapon/reagent_containers/pill/citalopram name = "Citalopram pill" desc = "Mild anti-depressant." icon_state = "pill8" - New() - ..() - reagents.add_reagent("citalopram", 15) + +/obj/item/weapon/reagent_containers/pill/citalopram/New() + ..() + reagents.add_reagent("citalopram", 15) /obj/item/weapon/reagent_containers/pill/inaprovaline name = "Inaprovaline pill" desc = "Used to stabilize patients." icon_state = "pill20" - New() - ..() - reagents.add_reagent("inaprovaline", 30) + +/obj/item/weapon/reagent_containers/pill/inaprovaline/New() + ..() + reagents.add_reagent("inaprovaline", 30) + /obj/item/weapon/reagent_containers/pill/dexalin name = "Dexalin pill" desc = "Used to treat oxygen deprivation." icon_state = "pill16" - New() - ..() - reagents.add_reagent("dexalin", 15) + +/obj/item/weapon/reagent_containers/pill/dexalin/New() + ..() + reagents.add_reagent("dexalin", 15) + /obj/item/weapon/reagent_containers/pill/dexalin_plus name = "Dexalin Plus pill" desc = "Used to treat extreme oxygen deprivation." icon_state = "pill8" - New() - ..() - reagents.add_reagent("dexalinp", 15) + +/obj/item/weapon/reagent_containers/pill/dexalin_plus/New() + ..() + reagents.add_reagent("dexalinp", 15) + /obj/item/weapon/reagent_containers/pill/dermaline name = "Dermaline pill" desc = "Used to treat burn wounds." icon_state = "pill12" - New() - ..() - reagents.add_reagent("dermaline", 15) + +/obj/item/weapon/reagent_containers/pill/dermaline/New() + ..() + reagents.add_reagent("dermaline", 15) + /obj/item/weapon/reagent_containers/pill/dylovene name = "Dylovene pill" desc = "A broad-spectrum anti-toxin." icon_state = "pill13" - New() - ..() - reagents.add_reagent("anti_toxin", 15) + +/obj/item/weapon/reagent_containers/pill/dylovene/New() + ..() + reagents.add_reagent("anti_toxin", 15) + /obj/item/weapon/reagent_containers/pill/inaprovaline name = "Inaprovaline pill" desc = "Used to stabilize patients." icon_state = "pill20" - New() - ..() - reagents.add_reagent("inaprovaline", 30) + +/obj/item/weapon/reagent_containers/pill/inaprovaline/New() + ..() + reagents.add_reagent("inaprovaline", 30) + /obj/item/weapon/reagent_containers/pill/bicaridine name = "Bicaridine pill" desc = "Used to treat physical injuries." icon_state = "pill18" - New() - ..() - reagents.add_reagent("bicaridine", 20) + +/obj/item/weapon/reagent_containers/pill/bicaridine/New() + ..() + reagents.add_reagent("bicaridine", 20) + /obj/item/weapon/reagent_containers/pill/happy name = "Happy pill" desc = "Happy happy joy joy!" icon_state = "pill18" - New() - ..() - reagents.add_reagent("space_drugs", 15) - reagents.add_reagent("sugar", 15) + +/obj/item/weapon/reagent_containers/pill/happy/New() + ..() + reagents.add_reagent("space_drugs", 15) + reagents.add_reagent("sugar", 15) + /obj/item/weapon/reagent_containers/pill/zoom name = "Zoom pill" desc = "Zoooom!" icon_state = "pill18" - New() - ..() - reagents.add_reagent("impedrezene", 10) - reagents.add_reagent("synaptizine", 5) - reagents.add_reagent("hyperzine", 5) + +/obj/item/weapon/reagent_containers/pill/zoom/New() + ..() + reagents.add_reagent("impedrezene", 10) + reagents.add_reagent("synaptizine", 5) + reagents.add_reagent("hyperzine", 5) + /obj/item/weapon/reagent_containers/pill/spaceacillin name = "Spaceacillin pill" desc = "Contains antiviral agents." icon_state = "pill19" - New() - ..() - reagents.add_reagent("spaceacillin", 15) + +/obj/item/weapon/reagent_containers/pill/spaceacillin/New() + ..() + reagents.add_reagent("spaceacillin", 15) + +/obj/item/weapon/reagent_containers/pill/diet + name = "diet pill" + desc = "Guaranteed to get you slim!" + icon_state = "pill9" + +/obj/item/weapon/reagent_containers/pill/diet/New() + ..() + reagents.add_reagent("lipozine", 2) \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index c35928d22d1..09ae98eb908 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -24,262 +24,260 @@ var/visible_name = "a syringe" var/time = 30 - on_reagent_change() - update_icon() - - pickup(mob/user) - ..() - update_icon() - - dropped(mob/user) - ..() - update_icon() - - attack_self(mob/user as mob) - - switch(mode) - if(SYRINGE_DRAW) - mode = SYRINGE_INJECT - if(SYRINGE_INJECT) - mode = SYRINGE_DRAW - if(SYRINGE_BROKEN) - return - update_icon() - - attack_hand() - ..() - update_icon() - - attackby(obj/item/I as obj, mob/user as mob) - return - - afterattack(obj/target, mob/user, proximity) - if(!proximity || !target.reagents) - return - - if(mode == SYRINGE_BROKEN) - user << "This syringe is broken!" - return - - if(user.a_intent == I_HURT && ismob(target)) - if((CLUMSY in user.mutations) && prob(50)) - target = user - syringestab(target, user) - return - - - switch(mode) - if(SYRINGE_DRAW) - - if(!reagents.get_free_space()) - user << "The syringe is full." - mode = SYRINGE_INJECT - return - - if(ismob(target))//Blood! - if(reagents.has_reagent("blood")) - user << "There is already a blood sample in this syringe." - return - if(istype(target, /mob/living/carbon)) - if(istype(target, /mob/living/carbon/slime)) - user << "You are unable to locate any blood." - return - var/amount = reagents.get_free_space() - var/mob/living/carbon/T = target - if(!T.dna) - user << "You are unable to locate any blood. (To be specific, your target seems to be missing their DNA datum)." - return - if(NOCLONE in T.mutations) //target done been et, no more blood in him - user << "You are unable to locate any blood." - return - - var/datum/reagent/B - if(istype(T, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = T - if(H.species && !H.should_have_organ(O_HEART)) - H.reagents.trans_to_obj(src, amount) - else - B = T.take_blood(src, amount) - else - B = T.take_blood(src,amount) - - if (B) - reagents.reagent_list += B - reagents.update_total() - on_reagent_change() - reagents.handle_reactions() - user << "You take a blood sample from [target]." - for(var/mob/O in viewers(4, user)) - O.show_message("[user] takes a blood sample from [target].", 1) - - else //if not mob - if(!target.reagents.total_volume) - user << "[target] is empty." - return - - if(!target.is_open_container() && !istype(target, /obj/structure/reagent_dispensers) && !istype(target, /obj/item/slime_extract)) - user << "You cannot directly remove reagents from this object." - return - - var/trans = target.reagents.trans_to_obj(src, amount_per_transfer_from_this) - user << "You fill the syringe with [trans] units of the solution." - update_icon() - - if(!reagents.get_free_space()) - mode = SYRINGE_INJECT - update_icon() - - if(SYRINGE_INJECT) - if(!reagents.total_volume) - user << "The syringe is empty." - mode = SYRINGE_DRAW - return - if(istype(target, /obj/item/weapon/implantcase/chem)) - return - - if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/slime_extract) && !istype(target, /obj/item/clothing/mask/smokable/cigarette) && !istype(target, /obj/item/weapon/storage/fancy/cigarettes)) - user << "You cannot directly fill this object." - return - if(!target.reagents.get_free_space()) - user << "[target] is full." - return - - var/mob/living/carbon/human/H = target - if(istype(H)) - var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) - if(!affected) - user << "\The [H] is missing that limb!" - return - else if(affected.status & ORGAN_ROBOT) - user << "You cannot inject a robotic limb." - return - - if(ismob(target) && target != user) - - var/injtime = time //Injecting through a hardsuit takes longer due to needing to find a port. - - if(istype(H)) - if(H.wear_suit) - if(istype(H.wear_suit, /obj/item/clothing/suit/space)) - injtime = injtime * 2 - else if(!H.can_inject(user, 1)) - return - - else if(isliving(target)) - - var/mob/living/M = target - if(!M.can_inject(user, 1)) - return - - if(injtime == time) - user.visible_message("[user] is trying to inject [target] with [visible_name]!") - else - user.visible_message("[user] begins hunting for an injection port on [target]'s suit!") - - user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) - user.do_attack_animation(target) - - if(!do_mob(user, target, injtime)) - return - - user.visible_message("[user] injects [target] with the syringe!") - - var/trans - if(ismob(target)) - var/contained = reagentlist() - trans = reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_BLOOD) - admin_inject_log(user, target, src, contained, trans) - else - trans = reagents.trans_to(target, amount_per_transfer_from_this) - user << "You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units." - if (reagents.total_volume <= 0 && mode == SYRINGE_INJECT) - mode = SYRINGE_DRAW - update_icon() - - return - +/obj/item/weapon/reagent_containers/syringe/on_reagent_change() update_icon() - overlays.Cut() - if(mode == SYRINGE_BROKEN) - icon_state = "broken" +/obj/item/weapon/reagent_containers/syringe/pickup(mob/user) + ..() + update_icon() + +/obj/item/weapon/reagent_containers/syringe/dropped(mob/user) + ..() + update_icon() + +/obj/item/weapon/reagent_containers/syringe/attack_self(mob/user as mob) + switch(mode) + if(SYRINGE_DRAW) + mode = SYRINGE_INJECT + if(SYRINGE_INJECT) + mode = SYRINGE_DRAW + if(SYRINGE_BROKEN) return + update_icon() - var/rounded_vol = round(reagents.total_volume, round(reagents.maximum_volume / 3)) - if(ismob(loc)) - var/injoverlay - switch(mode) - if (SYRINGE_DRAW) - injoverlay = "draw" - if (SYRINGE_INJECT) - injoverlay = "inject" - overlays += injoverlay - icon_state = "[rounded_vol]" - item_state = "syringe_[rounded_vol]" +/obj/item/weapon/reagent_containers/syringe/attack_hand() + ..() + update_icon() - if(reagents.total_volume) - filling = image('icons/obj/reagentfillings.dmi', src, "syringe10") +/obj/item/weapon/reagent_containers/syringe/attackby(obj/item/I as obj, mob/user as mob) + return - filling.icon_state = "syringe[rounded_vol]" +/obj/item/weapon/reagent_containers/syringe/afterattack(obj/target, mob/user, proximity) + if(!proximity || !target.reagents) + return - filling.color = reagents.get_color() - overlays += filling + if(mode == SYRINGE_BROKEN) + user << "This syringe is broken!" + return - proc/syringestab(mob/living/carbon/target as mob, mob/living/carbon/user as mob) + if(user.a_intent == I_HURT && ismob(target)) + if((CLUMSY in user.mutations) && prob(50)) + target = user + syringestab(target, user) + return - if(istype(target, /mob/living/carbon/human)) + + switch(mode) + if(SYRINGE_DRAW) + + if(!reagents.get_free_space()) + user << "The syringe is full." + mode = SYRINGE_INJECT + return + + if(ismob(target))//Blood! + if(reagents.has_reagent("blood")) + user << "There is already a blood sample in this syringe." + return + if(istype(target, /mob/living/carbon)) + if(istype(target, /mob/living/carbon/slime)) + user << "You are unable to locate any blood." + return + var/amount = reagents.get_free_space() + var/mob/living/carbon/T = target + if(!T.dna) + user << "You are unable to locate any blood. (To be specific, your target seems to be missing their DNA datum)." + return + if(NOCLONE in T.mutations) //target done been et, no more blood in him + user << "You are unable to locate any blood." + return + + var/datum/reagent/B + if(istype(T, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = T + if(H.species && !H.should_have_organ(O_HEART)) + H.reagents.trans_to_obj(src, amount) + else + B = T.take_blood(src, amount) + else + B = T.take_blood(src,amount) + + if (B) + reagents.reagent_list += B + reagents.update_total() + on_reagent_change() + reagents.handle_reactions() + user << "You take a blood sample from [target]." + for(var/mob/O in viewers(4, user)) + O.show_message("[user] takes a blood sample from [target].", 1) + + else //if not mob + if(!target.reagents.total_volume) + user << "[target] is empty." + return + + if(!target.is_open_container() && !istype(target, /obj/structure/reagent_dispensers) && !istype(target, /obj/item/slime_extract)) + user << "You cannot directly remove reagents from this object." + return + + var/trans = target.reagents.trans_to_obj(src, amount_per_transfer_from_this) + user << "You fill the syringe with [trans] units of the solution." + update_icon() + + if(!reagents.get_free_space()) + mode = SYRINGE_INJECT + update_icon() + + if(SYRINGE_INJECT) + if(!reagents.total_volume) + user << "The syringe is empty." + mode = SYRINGE_DRAW + return + if(istype(target, /obj/item/weapon/implantcase/chem)) + return + + if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/slime_extract) && !istype(target, /obj/item/clothing/mask/smokable/cigarette) && !istype(target, /obj/item/weapon/storage/fancy/cigarettes)) + user << "You cannot directly fill this object." + return + if(!target.reagents.get_free_space()) + user << "[target] is full." + return var/mob/living/carbon/human/H = target + if(istype(H)) + var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) + if(!affected) + user << "\The [H] is missing that limb!" + return + else if(affected.robotic >= ORGAN_ROBOT) + user << "You cannot inject a robotic limb." + return - var/target_zone = ran_zone(check_zone(user.zone_sel.selecting, target)) - var/obj/item/organ/external/affecting = H.get_organ(target_zone) + if(ismob(target) && target != user) - if (!affecting || affecting.is_stump()) - user << "They are missing that limb!" - return + var/injtime = time //Injecting through a hardsuit takes longer due to needing to find a port. - var/hit_area = affecting.name + if(istype(H)) + if(H.wear_suit) + if(istype(H.wear_suit, /obj/item/clothing/suit/space)) + injtime = injtime * 2 + else if(!H.can_inject(user, 1)) + return - if((user != target) && H.check_shields(7, src, user, "\the [src]")) - return + else if(isliving(target)) - if (target != user && H.getarmor(target_zone, "melee") > 5 && prob(50)) - for(var/mob/O in viewers(world.view, user)) - O.show_message(text("\red [user] tries to stab [target] in \the [hit_area] with [src.name], but the attack is deflected by armor!"), 1) - user.deleteItem(src) + var/mob/living/M = target + if(!M.can_inject(user, 1)) + return - user.attack_log += "\[[time_stamp()]\] Attacked [target.name] ([target.ckey]) with \the [src] (INTENT: HARM)." - target.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: HARM)." - msg_admin_attack("[key_name_admin(user)] attacked [key_name_admin(target)] with [src.name] (INTENT: HARM) (JMP)") + if(injtime == time) + user.visible_message("[user] is trying to inject [target] with [visible_name]!") + else + user.visible_message("[user] begins hunting for an injection port on [target]'s suit!") - return + user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) - user.visible_message("[user] stabs [target] in \the [hit_area] with [src.name]!") + if(!do_mob(user, target, injtime)) + return - if(affecting.take_damage(3)) - H.UpdateDamageIcon() + user.visible_message("[user] injects [target] with the syringe!") - else - user.visible_message("[user] stabs [target] with [src.name]!") - target.take_organ_damage(3)// 7 is the same as crowbar punch + var/trans + if(ismob(target)) + var/contained = reagentlist() + trans = reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_BLOOD) + admin_inject_log(user, target, src, contained, trans) + else + trans = reagents.trans_to(target, amount_per_transfer_from_this) + user << "You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units." + if (reagents.total_volume <= 0 && mode == SYRINGE_INJECT) + mode = SYRINGE_DRAW + update_icon() + + return + +/obj/item/weapon/reagent_containers/syringe/update_icon() + overlays.Cut() + + if(mode == SYRINGE_BROKEN) + icon_state = "broken" + return + + var/rounded_vol = round(reagents.total_volume, round(reagents.maximum_volume / 3)) + if(ismob(loc)) + var/injoverlay + switch(mode) + if (SYRINGE_DRAW) + injoverlay = "draw" + if (SYRINGE_INJECT) + injoverlay = "inject" + overlays += injoverlay + icon_state = "[rounded_vol]" + item_state = "syringe_[rounded_vol]" + + if(reagents.total_volume) + filling = image('icons/obj/reagentfillings.dmi', src, "syringe10") + + filling.icon_state = "syringe[rounded_vol]" + + filling.color = reagents.get_color() + overlays += filling + +/obj/item/weapon/reagent_containers/syringe/proc/syringestab(mob/living/carbon/target as mob, mob/living/carbon/user as mob) + if(istype(target, /mob/living/carbon/human)) + + var/mob/living/carbon/human/H = target + + var/target_zone = ran_zone(check_zone(user.zone_sel.selecting, target)) + var/obj/item/organ/external/affecting = H.get_organ(target_zone) + + if (!affecting || affecting.is_stump()) + user << "They are missing that limb!" + return + + var/hit_area = affecting.name + + if((user != target) && H.check_shields(7, src, user, "\the [src]")) + return + + if (target != user && H.getarmor(target_zone, "melee") > 5 && prob(50)) + for(var/mob/O in viewers(world.view, user)) + O.show_message(text("\red [user] tries to stab [target] in \the [hit_area] with [src.name], but the attack is deflected by armor!"), 1) + user.remove_from_mob(src) + qdel(src) + + user.attack_log += "\[[time_stamp()]\] Attacked [target.name] ([target.ckey]) with \the [src] (INTENT: HARM)." + target.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: HARM)." + msg_admin_attack("[key_name_admin(user)] attacked [key_name_admin(target)] with [src.name] (INTENT: HARM) (JMP)") + + return + + user.visible_message("[user] stabs [target] in \the [hit_area] with [src.name]!") + + if(affecting.take_damage(3)) + H.UpdateDamageIcon() + + else + user.visible_message("[user] stabs [target] with [src.name]!") + target.take_organ_damage(3)// 7 is the same as crowbar punch - var/syringestab_amount_transferred = rand(0, (reagents.total_volume - 5)) //nerfed by popular demand - var/contained_reagents = reagents.get_reagents() - var/trans = reagents.trans_to_mob(target, syringestab_amount_transferred, CHEM_BLOOD) - if(isnull(trans)) trans = 0 - admin_inject_log(user, target, src, contained_reagents, trans, violent=1) - break_syringe(target, user) + var/syringestab_amount_transferred = rand(0, (reagents.total_volume - 5)) //nerfed by popular demand + var/contained_reagents = reagents.get_reagents() + var/trans = reagents.trans_to_mob(target, syringestab_amount_transferred, CHEM_BLOOD) + if(isnull(trans)) trans = 0 + admin_inject_log(user, target, src, contained_reagents, trans, violent=1) + break_syringe(target, user) - proc/break_syringe(mob/living/carbon/target, mob/living/carbon/user) - desc += " It is broken." - mode = SYRINGE_BROKEN - if(target) - add_blood(target) - if(user) - add_fingerprint(user) - update_icon() +/obj/item/weapon/reagent_containers/syringe/proc/break_syringe(mob/living/carbon/target, mob/living/carbon/user) + desc += " It is broken." + mode = SYRINGE_BROKEN + if(target) + add_blood(target) + if(user) + add_fingerprint(user) + update_icon() /obj/item/weapon/reagent_containers/syringe/ld50_syringe name = "Lethal Injection Syringe" @@ -289,13 +287,13 @@ visible_name = "a giant syringe" time = 300 - afterattack(obj/target, mob/user, flag) - if(mode == SYRINGE_DRAW && ismob(target)) // No drawing 50 units of blood at once - user << "This needle isn't designed for drawing blood." - return - if(user.a_intent == "hurt" && ismob(target)) // No instant injecting - user << "This syringe is too big to stab someone with it." - ..() +/obj/item/weapon/reagent_containers/syringe/ld50_syringe/afterattack(obj/target, mob/user, flag) + if(mode == SYRINGE_DRAW && ismob(target)) // No drawing 50 units of blood at once + user << "This needle isn't designed for drawing blood." + return + if(user.a_intent == "hurt" && ismob(target)) // No instant injecting + user << "This syringe is too big to stab someone with it." + ..() //////////////////////////////////////////////////////////////////////////////// /// Syringes. END @@ -304,44 +302,56 @@ /obj/item/weapon/reagent_containers/syringe/inaprovaline name = "Syringe (inaprovaline)" desc = "Contains inaprovaline - used to stabilize patients." - New() - ..() - reagents.add_reagent("inaprovaline", 15) - mode = SYRINGE_INJECT - update_icon() + +/obj/item/weapon/reagent_containers/syringe/inaprovaline/New() + ..() + reagents.add_reagent("inaprovaline", 15) + mode = SYRINGE_INJECT + update_icon() /obj/item/weapon/reagent_containers/syringe/antitoxin name = "Syringe (anti-toxin)" desc = "Contains anti-toxins." - New() - ..() - reagents.add_reagent("anti_toxin", 15) - mode = SYRINGE_INJECT - update_icon() + +/obj/item/weapon/reagent_containers/syringe/antitoxin/New() + ..() + reagents.add_reagent("anti_toxin", 15) + mode = SYRINGE_INJECT + update_icon() /obj/item/weapon/reagent_containers/syringe/antiviral name = "Syringe (spaceacillin)" desc = "Contains antiviral agents." - New() - ..() - reagents.add_reagent("spaceacillin", 15) - mode = SYRINGE_INJECT - update_icon() + +/obj/item/weapon/reagent_containers/syringe/antiviral/New() + ..() + reagents.add_reagent("spaceacillin", 15) + mode = SYRINGE_INJECT + update_icon() /obj/item/weapon/reagent_containers/syringe/drugs name = "Syringe (drugs)" desc = "Contains aggressive drugs meant for torture." - New() - ..() - reagents.add_reagent("space_drugs", 5) - reagents.add_reagent("mindbreaker", 5) - reagents.add_reagent("cryptobiolin", 5) - mode = SYRINGE_INJECT - update_icon() -/obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral - New() - ..() - reagents.add_reagent("chloralhydrate", 50) - mode = SYRINGE_INJECT - update_icon() +/obj/item/weapon/reagent_containers/syringe/drugs/New() + ..() + reagents.add_reagent("space_drugs", 5) + reagents.add_reagent("mindbreaker", 5) + reagents.add_reagent("cryptobiolin", 5) + mode = SYRINGE_INJECT + update_icon() + +/obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral/New() + ..() + reagents.add_reagent("chloralhydrate", 50) + mode = SYRINGE_INJECT + update_icon() + +/obj/item/weapon/reagent_containers/syringe/steroid + name = "Syringe (anabolic steroids)" + desc = "Contains drugs for muscle growth." + +/obj/item/weapon/reagent_containers/syringe/steroid/New() + ..() + reagents.add_reagent("adrenaline",5) + reagents.add_reagent("hyperzine",10) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 0e591e97b0b..d813e713290 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -9,7 +9,6 @@ layer = 2 // so they appear under stuff anchored = 1 circuit = /obj/item/weapon/circuitboard/conveyor - frame_type = "conveyor" var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off var/operable = 1 // true if can operate (no broken segments in this belt run) var/forwards // this is the default (forward) direction, set by the map dir @@ -39,6 +38,9 @@ operating = 1 setmove() +/obj/machinery/conveyor/map/New() + ..() + circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/gear(src) component_parts += new /obj/item/weapon/stock_parts/motor(src) diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 6831034edf1..1a5b1b30669 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -22,8 +22,9 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). idle_power_usage = 30 active_power_usage = 2500 -/obj/machinery/r_n_d/circuit_imprinter/New() +/obj/machinery/r_n_d/circuit_imprinter/map/New() ..() + circuit = new circuit() component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 05b8a82f2f1..92ba8432744 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -756,6 +756,13 @@ CIRCUITS BELOW build_path = /obj/item/weapon/circuitboard/arcade/orion_trail sort_string = "MAAAA" +/datum/design/circuit/jukebox + name = "jukebox" + id = "jukebox" + req_tech = list(TECH_MAGNET = 2, TECH_DATA = 1) + build_path = /obj/item/weapon/circuitboard/jukebox + sort_string = "MAAAB" + /datum/design/circuit/seccamera name = "security camera monitor" id = "seccamera" diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index 3fbb141f7e8..98923bc89d5 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -16,8 +16,9 @@ Note: Must be placed within 3 tiles of the R&D Console idle_power_usage = 30 active_power_usage = 2500 -/obj/machinery/r_n_d/destructive_analyzer/New() +/obj/machinery/r_n_d/destructive_analyzer/map/New() ..() + circuit = new circuit() component_parts = list() component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 7d5bae00caa..f13f6b6e66a 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -17,8 +17,9 @@ materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "gold" = 0, "silver" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0) -/obj/machinery/r_n_d/protolathe/New() +/obj/machinery/r_n_d/protolathe/map/New() ..() + circuit = new circuit() component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index fcaaa7a2128..81b298e43d3 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -17,12 +17,16 @@ /obj/machinery/r_n_d/server/New() ..() + initialize(); + +/obj/machinery/r_n_d/server/map/New() + circuit = new circuit() component_parts = list() component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) component_parts += new /obj/item/stack/cable_coil(src) component_parts += new /obj/item/stack/cable_coil(src) RefreshParts() - initialize(); + ..() /obj/machinery/r_n_d/server/Destroy() griefProtection() @@ -123,6 +127,15 @@ name = "Central R&D Database" server_id = -1 +/obj/machinery/r_n_d/server/centcom/map/New() + circuit = new circuit() + component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) + component_parts += new /obj/item/stack/cable_coil(src) + component_parts += new /obj/item/stack/cable_coil(src) + RefreshParts() + ..() + /obj/machinery/r_n_d/server/centcom/initialize() ..() var/list/no_id_servers = list() @@ -306,8 +319,26 @@ id_with_download_string = "1;2" server_id = 2 +/obj/machinery/r_n_d/server/robotics/map/New() + circuit = new circuit() + component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) + component_parts += new /obj/item/stack/cable_coil(src) + component_parts += new /obj/item/stack/cable_coil(src) + RefreshParts() + ..() + /obj/machinery/r_n_d/server/core name = "Core R&D Server" id_with_upload_string = "1" id_with_download_string = "1" server_id = 1 + +/obj/machinery/r_n_d/server/core/map/New() + circuit = new circuit() + component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) + component_parts += new /obj/item/stack/cable_coil(src) + component_parts += new /obj/item/stack/cable_coil(src) + RefreshParts() + ..() \ No newline at end of file diff --git a/code/modules/spells/spellbook.dm b/code/modules/spells/spellbook.dm index 822037d40d8..b54b243609a 100644 --- a/code/modules/spells/spellbook.dm +++ b/code/modules/spells/spellbook.dm @@ -42,8 +42,6 @@ This spell temporarly blinds a single person and does not require wizard garb.
    Subjugation (30)
    This spell temporarily subjugates a target's mind and does not require wizard garb.
    - Mind Transfer (60)
    - This spell allows the user to switch bodies with a target. Careful to not lose your memory in the process.
    Forcewall (10)
    This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb.
    Blink (2)
    @@ -56,8 +54,6 @@ This spell creates your ethereal form, temporarily making you invisible and able to pass through walls.
    Knock (10)
    This spell opens nearby doors and does not require wizard garb.
    - Curse of the Horseman (15)
    - This spell will curse a person to wear an unremovable horse mask (it has glue on the inside) and speak like a horse. It does not require wizard garb.
    Remove Clothes Requirement Warning: this takes away 2 spell choices.

    Artefacts:
    @@ -174,10 +170,10 @@ feedback_add_details("wizard_spell_learned","SJ") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells H.add_spell(new/spell/targeted/subjugation) temp = "You have learned subjugate." - if("mindswap") - feedback_add_details("wizard_spell_learned","MT") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells - H.add_spell(new/spell/targeted/mind_transfer) - temp = "You have learned mindswap." +// if("mindswap") +// feedback_add_details("wizard_spell_learned","MT") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells +// H.add_spell(new/spell/targeted/mind_transfer) +// temp = "You have learned mindswap." if("forcewall") feedback_add_details("wizard_spell_learned","FW") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells H.add_spell(new/spell/aoe_turf/conjure/forcewall) @@ -202,10 +198,10 @@ feedback_add_details("wizard_spell_learned","KN") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells H.add_spell(new/spell/aoe_turf/knock) temp = "You have learned knock." - if("horseman") - feedback_add_details("wizard_spell_learned","HH") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells - H.add_spell(new/spell/targeted/equip_item/horsemask) - temp = "You have learned curse of the horseman." +// if("horseman") +// feedback_add_details("wizard_spell_learned","HH") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells +// H.add_spell(new/spell/targeted/equip_item/horsemask) +// temp = "You have learned curse of the horseman." if("mentalfocus") feedback_add_details("wizard_spell_learned","MF") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells new /obj/item/weapon/gun/energy/staff/focus(get_turf(H)) @@ -421,7 +417,7 @@ magichead.canremove = 0 //curses! magichead.flags_inv = null //so you can still see their face magichead.voicechange = 1 //NEEEEIIGHH - user.removeItem(user.wear_mask) + user.drop_from_inventory(user.wear_mask) user.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1) qdel(src) else diff --git a/code/modules/spells/targeted/equip/equip.dm b/code/modules/spells/targeted/equip/equip.dm index 692a25fd359..735daf78e8f 100644 --- a/code/modules/spells/targeted/equip/equip.dm +++ b/code/modules/spells/targeted/equip/equip.dm @@ -19,7 +19,7 @@ var/obj/item/old_item = L.get_equipped_item(slot_id) L.equip_to_slot(new_item, slot_id) if(old_item) - L.removeItem(old_item) + L.remove_from_mob(old_item) if(delete_old) qdel(old_item) else @@ -33,7 +33,8 @@ for(var/obj/item/to_remove in summoned_items) if(istype(to_remove.loc, /mob)) var/mob/M = to_remove.loc - M.deleteItem(to_remove) + M.remove_from_mob(to_remove) + qdel(to_remove) /spell/targeted/equip_item/proc/summon_item(var/newtype) return new newtype diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index e313b211965..4e80282daa7 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -342,7 +342,7 @@ "You touch \the [W] to \the [src] when everything suddenly goes silent.\"\n\The [W] flashes into dust as you flinch away from \the [src].",\ "Everything suddenly goes silent.") - user.removeItem(W) + user.drop_from_inventory(W) Consume(W) user.apply_effect(150, IRRADIATE) diff --git a/code/modules/surgery/bones.dm b/code/modules/surgery/bones.dm index ff0ea126359..cc4428fcb61 100644 --- a/code/modules/surgery/bones.dm +++ b/code/modules/surgery/bones.dm @@ -18,7 +18,7 @@ if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) - return affected && !(affected.status & ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 0 + return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 0 begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -52,7 +52,7 @@ if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) - return affected && affected.organ_tag != BP_HEAD && !(affected.status & ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1 + return affected && affected.organ_tag != BP_HEAD && !(affected.robotic >= ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1 begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -91,7 +91,7 @@ if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) - return affected && affected.organ_tag == BP_HEAD && !(affected.status & ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1 + return affected && affected.organ_tag == BP_HEAD && (affected.robotic < ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1 begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] is beginning to piece together [target]'s skull with \the [tool]." , \ @@ -127,7 +127,7 @@ if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) - return affected && affected.open >= 2 && !(affected.status & ORGAN_ROBOT) && affected.stage == 2 + return affected && affected.open >= 2 && !(affected.robotic >= ORGAN_ROBOT) && affected.stage == 2 begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) diff --git a/code/modules/surgery/encased.dm b/code/modules/surgery/encased.dm index 1744cec3d7e..81b11d12db5 100644 --- a/code/modules/surgery/encased.dm +++ b/code/modules/surgery/encased.dm @@ -12,7 +12,7 @@ return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) - return affected && !(affected.status & ORGAN_ROBOT) && affected.encased && affected.open >= 2 + return affected && !(affected.robotic >= ORGAN_ROBOT) && affected.encased && affected.open >= 2 /datum/surgery_step/open_encased/saw diff --git a/code/modules/surgery/face.dm b/code/modules/surgery/face.dm index f4e723d0c6d..744b1d56dd0 100644 --- a/code/modules/surgery/face.dm +++ b/code/modules/surgery/face.dm @@ -10,7 +10,7 @@ if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) - if (!affected || (affected.status & ORGAN_ROBOT)) + if (!affected || (affected.robotic >= ORGAN_ROBOT)) return 0 return target_zone == O_MOUTH diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index 697a5cf1915..e6dc9d98603 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -17,7 +17,7 @@ return 0 if (affected.is_stump()) return 0 - if (affected.status & ORGAN_ROBOT) + if (affected.robotic >= ORGAN_ROBOT) return 0 return 1 diff --git a/code/modules/surgery/implant.dm b/code/modules/surgery/implant.dm index f178a6a45b1..88df711b474 100644 --- a/code/modules/surgery/implant.dm +++ b/code/modules/surgery/implant.dm @@ -128,7 +128,7 @@ user.visible_message("\blue [user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.", \ "\blue You put \the [tool] inside [target]'s [get_cavity(affected)] cavity." ) - if (tool.w_class > get_max_wclass(affected)/2 && prob(50) && !(affected.status & ORGAN_ROBOT)) + if (tool.w_class > get_max_wclass(affected)/2 && prob(50) && !(affected.robotic >= ORGAN_ROBOT)) user << "\red You tear some blood vessels trying to fit such a big object in this cavity." var/datum/wound/internal_bleeding/I = new (10) affected.wounds += I @@ -153,8 +153,12 @@ max_duration = 100 can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/obj/item/organ/internal/brain/sponge = target.internal_organs_by_name["brain"] - return ..() && (!sponge || !sponge.damage) + var/obj/item/organ/external/affected = target.get_organ(target_zone) + if(affected.organ_tag == BP_HEAD) + var/obj/item/organ/internal/brain/sponge = target.internal_organs_by_name["brain"] + return ..() && (!sponge || !sponge.damage) + else + return ..() begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) diff --git a/code/modules/surgery/limb_reattach.dm b/code/modules/surgery/limb_reattach.dm index 352dd9232d0..eadd4db655a 100644 --- a/code/modules/surgery/limb_reattach.dm +++ b/code/modules/surgery/limb_reattach.dm @@ -30,9 +30,8 @@ var/obj/item/organ/external/E = tool user.visible_message("[user] has attached [target]'s [E.name] to the [E.amputation_point].>", \ "You have attached [target]'s [E.name] to the [E.amputation_point].") - user.removeItem(E) + user.drop_from_inventory(E) E.replaced(target) - E.loc = target target.update_body() target.updatehealth() target.UpdateDamageIcon() diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index aee6e667e77..ccb90c20d6b 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -52,7 +52,7 @@ for(var/obj/item/organ/I in affected.internal_organs) if(I && I.damage > 0) - if(!(I.status & ORGAN_ROBOT)) + if(!(I.robotic >= ORGAN_ROBOT)) user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \ "You start treating damage to [target]'s [I.name] with [tool_name]." ) @@ -72,7 +72,7 @@ for(var/obj/item/organ/internal/I in affected.internal_organs) if(I && I.damage > 0) - if(!(I.status & ORGAN_ROBOT)) + if(!(I.robotic >= ORGAN_ROBOT)) user.visible_message("[user] treats damage to [target]'s [I.name] with [tool_name].", \ "You treat damage to [target]'s [I.name] with [tool_name]." ) I.damage = 0 @@ -119,7 +119,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) - if(!(affected && !(affected.status & ORGAN_ROBOT))) + if(!(affected && !(affected.robotic >= ORGAN_ROBOT))) return 0 target.op_stage.current_organ = null @@ -234,7 +234,7 @@ if(!istype(O)) return 0 - if((affected.status & ORGAN_ROBOT) && !(O.status & ORGAN_ROBOT)) + if((affected.robotic >= ORGAN_ROBOT) && !(O.robotic >= ORGAN_ROBOT)) user << "You cannot install a naked organ into a robotic body." return SURGERY_FAILURE @@ -278,7 +278,7 @@ "You have transplanted \the [tool] into [target]'s [affected.name].") var/obj/item/organ/O = tool if(istype(O)) - user.removeItem(O) + user.remove_from_mob(O) O.replaced(target,affected) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -307,7 +307,7 @@ var/list/removable_organs = list() for(var/organ in target.internal_organs_by_name) var/obj/item/organ/I = target.internal_organs_by_name[organ] - if(istype(I) && (I.status & ORGAN_CUT_AWAY) && !(I.status & ORGAN_ROBOT) && I.parent_organ == target_zone) + if(istype(I) && (I.status & ORGAN_CUT_AWAY) && !(I.robotic >= ORGAN_ROBOT) && I.parent_organ == target_zone) removable_organs |= organ var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index 1cd0bacef5e..cc4143658cd 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -17,7 +17,7 @@ return 0 if (affected.status & ORGAN_DESTROYED) return 0 - if (!(affected.status & ORGAN_ROBOT)) + if (!(affected.robotic >= ORGAN_ROBOT)) return 0 return 1 @@ -187,13 +187,13 @@ user.visible_message("[user] finishes splicing cable into [target]'s [affected.name].", \ "You finishes splicing new cable into [target]'s [affected.name].") affected.heal_damage(0,rand(30,50),1,1) + affected.disfigured = 0 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] causes a short circuit in [target]'s [affected.name]!", "You cause a short circuit in [target]'s [affected.name]!") target.apply_damage(rand(5,10), BURN, affected) - affected.disfigured = 0 /datum/surgery_step/robotics/fix_organ_robotic //For artificial organs allowed_tools = list( @@ -213,7 +213,7 @@ if(!affected) return var/is_organ_damaged = 0 for(var/obj/item/organ/I in affected.internal_organs) - if(I.damage > 0 && (I.status & ORGAN_ROBOT)) + if(I.damage > 0 && (I.robotic >= ORGAN_ROBOT)) is_organ_damaged = 1 break return affected.open == 3 && is_organ_damaged @@ -226,7 +226,7 @@ for(var/obj/item/organ/I in affected.internal_organs) if(I && I.damage > 0) - if(I.status & ORGAN_ROBOT) + if(I.robotic >= ORGAN_ROBOT) user.visible_message("[user] starts mending the damage to [target]'s [I.name]'s mechanisms.", \ "You start mending the damage to [target]'s [I.name]'s mechanisms." ) @@ -242,7 +242,7 @@ for(var/obj/item/organ/I in affected.internal_organs) if(I && I.damage > 0) - if(I.status & ORGAN_ROBOT) + if(I.robotic >= ORGAN_ROBOT) user.visible_message("[user] repairs [target]'s [I.name] with [tool].", \ "You repair [target]'s [I.name] with [tool]." ) I.damage = 0 @@ -277,7 +277,7 @@ can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - if(!(affected && (affected.status & ORGAN_ROBOT))) + if(!(affected && (affected.robotic >= ORGAN_ROBOT))) return 0 if(affected.open < 3) return 0 @@ -326,7 +326,7 @@ can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - if(!(affected && (affected.status & ORGAN_ROBOT))) + if(!(affected && (affected.robotic >= ORGAN_ROBOT))) return 0 if(affected.open < 3) return 0 @@ -336,7 +336,7 @@ var/list/removable_organs = list() for(var/organ in target.internal_organs_by_name) var/obj/item/organ/I = target.internal_organs_by_name[organ] - if(I && (I.status & ORGAN_CUT_AWAY) && (I.status & ORGAN_ROBOT) && I.parent_organ == target_zone) + if(I && (I.status & ORGAN_CUT_AWAY) && (I.robotic >= ORGAN_ROBOT) && I.parent_organ == target_zone) removable_organs |= organ var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs @@ -388,12 +388,11 @@ user << "That brain is not usable." return SURGERY_FAILURE - if(!(affected.status & ORGAN_ROBOT)) + if(!(affected.robotic >= ORGAN_ROBOT)) user << "You cannot install a computer brain into a meat skull." return SURGERY_FAILURE if(!target.should_have_organ("brain")) - user << "You're pretty sure [target.species.name_plural] don't normally have a brain." return SURGERY_FAILURE @@ -417,7 +416,8 @@ var/obj/item/device/mmi/M = tool var/obj/item/organ/internal/mmi_holder/holder = new(target, 1) target.internal_organs_by_name["brain"] = holder - user.removeItem(tool, holder) + user.drop_from_inventory(tool) + tool.loc = holder holder.stored_mmi = tool holder.update_from_mmi() @@ -426,4 +426,4 @@ fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user]'s hand slips.", \ - "Your hand slips.") \ No newline at end of file + "Your hand slips.") diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 634c2bbc595..ddc56dad3f6 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -237,7 +237,8 @@ if(!istype(C)) return - H.removeItem(C, src) + H.drop_from_inventory(C) + C.forceMove(src) cell = C powercheck() usr << "You install [C] in [src]." diff --git a/code/unit_tests/map_tests.dm b/code/unit_tests/map_tests.dm index 97d4909833c..f8f735f8676 100644 --- a/code/unit_tests/map_tests.dm +++ b/code/unit_tests/map_tests.dm @@ -51,7 +51,7 @@ if(!A.air_vent_info.len && !(A.type in exempt_from_atmos)) log_unit_test("[bad_msg] lacks an Air vent.") area_good = 0 - + if(!area_good) bad_areas.Add(A) @@ -97,3 +97,17 @@ pass("All \[[wire_test_count]\] wires had no overlapping cables going the same direction.") return 1 + +/datum/unit_test/active_edges + name = "MAP: Active edges (all maps)" + +/datum/unit_test/active_edges/start_test() + + var/active_edges = air_master.active_edges.len + + if(active_edges) + fail("Maps contained [active_edges] active edges at round-start.") + else + pass("No active edges.") + + return 1 diff --git a/code/world.dm b/code/world.dm index b81c0f7c3a5..bfa399fe2ae 100644 --- a/code/world.dm +++ b/code/world.dm @@ -558,7 +558,9 @@ var/failed_db_connections = 0 var/failed_old_db_connections = 0 /hook/startup/proc/connectDB() - if(!setup_database_connection()) + if(!config.sql_enabled) + world.log << "SQL connection disabled in config." + else if(!setup_database_connection()) world.log << "Your server failed to establish a connection with the feedback database." else world.log << "Feedback database connection established." @@ -600,7 +602,9 @@ proc/establish_db_connection() /hook/startup/proc/connectOldDB() - if(!setup_old_database_connection()) + if(!config.sql_enabled) + world.log << "SQL connection disabled in config." + else if(!setup_old_database_connection()) world.log << "Your server failed to establish a connection with the SQL database." else world.log << "SQL database connection established." diff --git a/config/example/config.txt b/config/example/config.txt index b38bfd73546..ec934298274 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -67,8 +67,8 @@ LOG_PDA ## log admin warning messages ##LOG_ADMINWARN ## Also duplicates a bunch of other messages. -## sql switching -# SQL_ENABLED +## Enable/disable SQL connection (comment out to disable) +SQL_ENABLED ## disconnect players who did nothing during the set amount of minutes # KICK_INACTIVE 10 diff --git a/html/browser/common.css b/html/browser/common.css index 1de45bd9536..e2090f2d3d0 100644 --- a/html/browser/common.css +++ b/html/browser/common.css @@ -23,6 +23,7 @@ a, a:link, a:visited, a:active, .linkOn, .linkOff padding: 1px 4px 1px 4px; margin: 0 2px 0 0; cursor:default; + white-space:nowrap; } a:hover @@ -77,6 +78,22 @@ a.icon img, .linkOn.icon img height: 18px; } +a.icon64, .linkOn.icon64, .linkOff.icon64 +{ + position: relative; + padding: 1px 4px 2px 68px; + font-size: 55px; +} + +a.icon64 img, .linkOn.icon64 img +{ + position: absolute; + top: 0; + left: 0; + width: 66px; + height: 66px; +} + ul { padding: 4px 0 0 10px; diff --git a/html/changelog.html b/html/changelog.html index c743aadeefa..5f348af1424 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -53,6 +53,94 @@ -->
    +

    27 May 2016

    +

    Yoshax updated:

    +
      +
    • Added a new preference that allows you to disable fake nanoui styling on relevant windows. However, if it is your first time loading with this new preference you will need to save your character slot, as there is a problem with satanisiation and it believes the preference is set to disable the nanoui styling.
    • +
    + +

    25 May 2016

    +

    Serithi updated:

    +
      +
    • Adds in lavender.
    • +
    +

    Yoshax updated:

    +
      +
    • Cables of any color can now be merged.
    • +
    • More and different colors are now available to be used by cable.
    • +
    • Adjusting your suit sensors now displays a message to other people in range that you did so. In addition, seeing someone else adjust someone's suit sensors no longer informs you to what level.
    • +
    • Added towels to the loadout. These can be worn on the head, belt or outwear slots. You can also whip people with them for a special message and sound! In addition, using them in-hand will produce an emote where your towel yourself off.
    • +
    + +

    17 May 2016

    +

    SilveryFerret updated:

    +
      +
    • Changes the Death Alarms from announcing over Common channel, to announcing only over Medical and Security channels.
    • +
    +

    Yoshax updated:

    +
      +
    • Added shotglasses. These can contain 10 units. They have their whole contents swalloed in one gulp. They can be produced in the autolathe or found in the booze vending machine in the bar.
    • +
    + +

    16 May 2016

    +

    Yoshax updated:

    +
      +
    • Uplinks now have a discounted item every 15 minutes. This is per uplink, and random, the discount is also random, but weighted as such that a low discount such as 10% off, or 20% off has a higher chance of happening than a high discount such as 90% of. An item will never cost less than 1.
    • +
    • Mercenaries now spawn with their own, personal uplinks.
    • +
    • Faked announcements are now once again purchasable from the uplink, and actually work.
    • +
    • Adds several new items to the uplink including tactical knives, metal foam grenades, ambrosia seeds and much more.
    • +
    + +

    13 May 2016

    +

    HarpyEagle updated:

    +
      +
    • Shotgun flare illumination now lasts longer, around 3-4 minutes.
    • +
    • Fixed attack animation playing when using flashes even if the flash was not actually used due to being broken or recharging.
    • +
    • Fixed lightswitches layering over darkness. Now only the light layers above shadow. Lightswitch illumination is now much more subtle.
    • +
    +

    Yoshax updated:

    +
      +
    • Processing strata floor can now be pried up with a crowbar.
    • +
    • Blue carpet can now also be removed with a crowbar, and has had it's ability to burn and have corners restored.
    • +
    • Changelings will now store and apply the flavor text of their victims when they absorb and transform into them.
    • +
    • Gives Diona a starting funds wage the same as Tajaran and Unathi.
    • +
    • Brain damage no longer prevent implant removal surgery.
    • +
    + +

    12 May 2016

    +

    Yoshax updated:

    +
      +
    • Doubles the maximum length of records and names to 6144 & 52, respectively. Also increases book length to 12288. (All numbers are in characters.)
    • +
    • Makes various services in the antag uplink purchasable once again. This includes the fake crew arrival.
    • +
    • Neckgrabs will no longer force people to the ground. In addition, weakened people can no longer resist.
    • +
    • All vending machines now have a small chance of vending an additional item.
    • +
    • Smoke from smoke bombs now lasts approximately 3 times as long and spawns some more smoke to make a heavier cloud.
    • +
    • Smoke from smoke bombs now properly does a small amount of oxygen loss damage. This damage is per cloud of smoke.
    • +
    + +

    05 May 2016

    +

    Datraen updated:

    +
      +
    • Added three mixed modes, 'Mercenaries & Wizard', 'Mercenaries & Renegades', and 'Traitors & Renegades'.
    • +
    +

    Hubblenaut updated:

    +
      +
    • Hydroponics vendor and biogenerator offer full bottles of fertilizer. Prices and amount available adjusted to accomodate.
    • +
    +

    Kelenius updated:

    +
      +
    • Move delay after clicking has been removed.
    • +
    +

    PsiOmegaDelta updated:

    +
      +
    • Can now prefill the loadout flask and vacuum-flask with a relevant liquid of your choice.
    • +
    +

    Yoshax updated:

    +
      +
    • Splits gender into biological gender and gender identity. Biological gender modifies the sprite (for between male and female) and gender identity determines what pronouns show up when examined or suchlike. Both are displayed in medical records and such.
    • +
    • Smoke grenades can now have their smoke color set by using a multitool on them.
    • +
    +

    17 April 2016

    Datraen updated: