diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 6c34d3144b0..ae6943d553a 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -17,8 +17,6 @@ #define HEADBANGPROTECT 4096 -#define OPENCONTAINER 4096 // is an open container for chemistry purposes - #define BLOCK_GAS_SMOKE_EFFECT 8192 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! #define THICKMATERIAL 8192 //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. (NOTE: flag shared with BLOCK_GAS_SMOKE_EFFECT) diff --git a/code/__DEFINES/reagents.dm b/code/__DEFINES/reagents.dm index 0d20a3edb74..e2dd3ee3ac7 100644 --- a/code/__DEFINES/reagents.dm +++ b/code/__DEFINES/reagents.dm @@ -4,3 +4,15 @@ #define REAGENT_OVERDOSE_EFFECT 1 #define REAGENT_OVERDOSE_FLAGS 2 +// container_type defines +#define INJECTABLE 1 // Makes it possible to add reagents through droppers and syringes. +#define DRAWABLE 2 // Makes it possible to remove reagents through syringes. + +#define REFILLABLE 4 // Makes it possible to add reagents through any reagent container. +#define DRAINABLE 8 // Makes it possible to remove reagents through any reagent container. + +#define TRANSPARENT 16 // Used on containers which you want to be able to see the reagents off. +#define AMOUNT_VISIBLE 32 // For non-transparent containers that still have the general amount of reagents in them visible. + +// Is an open container for all intents and purposes. +#define OPENCONTAINER (REFILLABLE | DRAINABLE | TRANSPARENT) diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm index 27ec6e7202f..2db8621195d 100644 --- a/code/__HELPERS/icon_smoothing.dm +++ b/code/__HELPERS/icon_smoothing.dm @@ -108,11 +108,19 @@ return adjacencies +//do not use, use queue_smooth(atom) /proc/smooth_icon(atom/A) + if(!A || !A.smooth || !A.z) + return if(QDELETED(A)) return - if(A && (A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE)) + if((A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE)) var/adjacencies = calculate_adjacencies(A) + + if(A.smooth & SMOOTH_DIAGONAL) + A.diagonal_smooth(adjacencies) + else + cardinal_smooth(A, adjacencies) if(A.smooth & SMOOTH_DIAGONAL) A.diagonal_smooth(adjacencies) else @@ -149,12 +157,12 @@ /turf/simulated/wall/diagonal_smooth(adjacencies) adjacencies = reverse_ndir(..()) if(adjacencies) - underlays.Cut() + var/list/U = list() if(fixed_underlay) if(fixed_underlay["space"]) - underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER) + U += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER) else - underlays += image(fixed_underlay["icon"], fixed_underlay["icon_state"], layer=TURF_LAYER) + U += image(fixed_underlay["icon"], fixed_underlay["icon_state"], layer=TURF_LAYER) else var/turf/T = get_step(src, turn(adjacencies, 180)) if(T && (T.density || T.smooth)) @@ -163,13 +171,14 @@ T = get_step(src, turn(adjacencies, 225)) if(istype(T, /turf/space) && !istype(T, /turf/space/transit)) - underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER) + U += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER) else if(T && !T.density && !T.smooth) - underlays += T + U += T else if(baseturf && !initial(baseturf.density) && !initial(baseturf.smooth)) - underlays += image(initial(baseturf.icon), initial(baseturf.icon_state), layer=TURF_LAYER) + U += image(initial(baseturf.icon), initial(baseturf.icon_state), layer=TURF_LAYER) else - underlays += DEFAULT_UNDERLAY_IMAGE + U += DEFAULT_UNDERLAY_IMAGE + underlays = U /proc/cardinal_smooth(atom/A, adjacencies) //NW CORNER @@ -224,43 +233,36 @@ else if(adjacencies & N_EAST) se = "4-e" + var/list/New = list() + if(A.top_left_corner != nw) A.overlays -= A.top_left_corner A.top_left_corner = nw - A.overlays += nw + New += nw if(A.top_right_corner != ne) A.overlays -= A.top_right_corner A.top_right_corner = ne - A.overlays += ne + New += ne if(A.bottom_right_corner != sw) A.overlays -= A.bottom_right_corner A.bottom_right_corner = sw - A.overlays += sw + New += sw if(A.bottom_left_corner != se) A.overlays -= A.bottom_left_corner A.bottom_left_corner = se - A.overlays += se + New += se -/proc/find_type_in_direction(atom/source, direction, range=1) - var/x_offset = 0 - var/y_offset = 0 + if(New.len) + A.overlays.Add(New) - if(direction & NORTH) - y_offset = range - else if(direction & SOUTH) - y_offset -= range - - if(direction & EAST) - x_offset = range - else if(direction & WEST) - x_offset -= range - - var/turf/target_turf = locate(source.x + x_offset, source.y + y_offset, source.z) +/proc/find_type_in_direction(atom/source, direction) + var/turf/target_turf = get_step(source, direction) if(!target_turf) return NULLTURF_BORDER + if(source.canSmoothWith) var/atom/A if(source.smooth & SMOOTH_MORE) @@ -287,22 +289,22 @@ //Icon smoothing helpers -/proc/smooth_icon_neighbors(atom/A) - for(var/V in orange(1,A)) - var/atom/T = V - if(T.smooth) - smooth_icon(T) - -/proc/smooth_zlevel(var/zlevel) +/proc/smooth_zlevel(var/zlevel, now = FALSE) var/list/away_turfs = block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel)) for(var/V in away_turfs) var/turf/T = V if(T.smooth) - smooth_icon(T) + if(now) + smooth_icon(T) + else + queue_smooth(T) for(var/R in T) var/atom/A = R if(A.smooth) - smooth_icon(A) + if(now) + smooth_icon(A) + else + queue_smooth(A) /atom/proc/clear_smooth_overlays() overlays -= top_left_corner @@ -316,14 +318,16 @@ /atom/proc/replace_smooth_overlays(nw, ne, sw, se) clear_smooth_overlays() + var/list/O = list() top_left_corner = nw - overlays += nw + O += nw top_right_corner = ne - overlays += ne + O += ne bottom_left_corner = sw - overlays += sw + O += sw bottom_right_corner = se - overlays += se + O += se + overlays.Add(O) /proc/reverse_ndir(ndir) switch(ndir) @@ -362,6 +366,21 @@ else return 0 +//SSicon_smooth +/proc/queue_smooth_neighbors(atom/A) + for(var/V in orange(1,A)) + var/atom/T = V + if(T.smooth) + queue_smooth(T) + +//SSicon_smooth +/proc/queue_smooth(atom/A) + if(SSicon_smooth) + SSicon_smooth.smooth_queue[A] = A + SSicon_smooth.can_fire = 1 + else + smooth_icon(A) + //Example smooth wall /turf/simulated/wall/smooth name = "smooth wall" diff --git a/code/_globalvars/lists/reagents.dm b/code/_globalvars/lists/reagents.dm index 30809943a8a..daa2d634b9f 100644 --- a/code/_globalvars/lists/reagents.dm +++ b/code/_globalvars/lists/reagents.dm @@ -1,9 +1,9 @@ // Base chemicals -var/list/base_chemicals = list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon", +GLOBAL_LIST_INIT(base_chemicals, list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon", "chlorine","fluorine","phosphorus","lithium","sulfur","sacid","radium", - "iron","aluminum","silicon","sugar","ethanol") + "iron","aluminum","silicon","sugar","ethanol")) // Standard chemicals -var/list/standard_chemicals = list("slimejelly","blood","water","lube","charcoal","toxin","cyanide", +GLOBAL_LIST_INIT(standard_chemicals, list("slimejelly","blood","water","lube","charcoal","toxin","cyanide", "morphine","epinephrine","space_drugs","serotrotium","oxygen","copper", "nitrogen","hydrogen","potassium","mercury","sulfur","carbon","chlorine", "fluorine","sodium","phosphorus","lithium","sugar","sacid","facid", @@ -15,21 +15,21 @@ var/list/standard_chemicals = list("slimejelly","blood","water","lube","charcoal "cryoxadone","spaceacillin","carpotoxin","lsd","fluorosurfactant", "fluorosurfactant","ethanol","ammonia","diethylamine","antihol","pancuronium", "lipolicide","condensedcapsaicin","frostoil","amanitin","psilocybin", - "enzyme","nothing","salglu_solution","antifreeze","neurotoxin") + "enzyme","nothing","salglu_solution","antifreeze","neurotoxin")) // Rare chemicals -var/list/rare_chemicals = list("minttoxin","syndicate_nanites", "xenomicrobes") +GLOBAL_LIST_INIT(rare_chemicals, list("minttoxin","syndicate_nanites", "xenomicrobes")) // Standard medicines -var/list/standard_medicines = list("charcoal","toxin","cyanide","morphine","epinephrine","space_drugs", +GLOBAL_LIST_INIT(standard_medicines, list("charcoal","toxin","cyanide","morphine","epinephrine","space_drugs", "serotrotium","mutadone","mutagen","teporone","lexorin","silver_sulfadiazine", "salbutamol","perfluorodecalin","omnizine","synaptizine","haloperidol", "potass_iodide","pen_acid","mannitol","oculine","styptic_powder", "methamphetamine","spaceacillin","carpotoxin","lsd","ethanol","ammonia", "diethylamine","antihol","pancuronium","lipolicide","condensedcapsaicin", - "frostoil","amanitin","psilocybin","nothing","salglu_solution","neurotoxin") + "frostoil","amanitin","psilocybin","nothing","salglu_solution","neurotoxin")) // Rare medicines -var/list/rare_medicines = list("syndicate_nanites","minttoxin","blood", "xenomicrobes") +GLOBAL_LIST_INIT(rare_medicines, list("syndicate_nanites","minttoxin","blood", "xenomicrobes")) // Drinks -var/list/drinks = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice", +GLOBAL_LIST_INIT(drinks, list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice", "berryjuice","poisonberryjuice","watermelonjuice","lemonjuice","banana", "nothing","potato","milk","soymilk","cream","coffee","tea","icecoffee", "icetea","cola","nuka_cola","spacemountainwind","thirteenloko","dr_gibb", @@ -44,10 +44,13 @@ var/list/drinks = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice "vodkatonic","ginfizz","bahama_mama","singulo","sbiten","devilskiss","red_mead", "mead","iced_beer","grog","aloe","andalusia","alliescocktail","soy_latte", "cafe_latte","acidspit","amasec","neurotoxin","hippiesdelight","bananahonk", - "silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini", "flamingmoe") + "silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini", "flamingmoe")) + +//Liver Toxins list +GLOBAL_LIST_INIT(liver_toxins, list("toxin", "plasma", "sacid", "facid", "cyanide","amanitin", "carpotoxin")) //Random chem blacklist -var/global/list/blocked_chems = list("polonium", "initropidril", "concentrated_initro", +GLOBAL_LIST_INIT(blocked_chems, list("polonium", "initropidril", "concentrated_initro", "sodium_thiopental", "ketamine", "coniine", "adminordrazine", "nanites", "hellwater", "mutationtoxin", "amutationtoxin", "venom", @@ -55,9 +58,9 @@ var/global/list/blocked_chems = list("polonium", "initropidril", "concentrated_i "syndicate_nanites", "ripping_tendrils", "boiling_oil", "envenomed_filaments", "lexorin_jelly", "kinetic", "cryogenic_liquid", "dark_matter", "b_sorium", - "reagent", "life","dragonsbreath", "nanocalcium") + "reagent", "life","dragonsbreath", "nanocalcium")) -var/global/list/safe_chem_list = list("antihol", "charcoal", "epinephrine", "insulin", "teporone","silver_sulfadiazine", "salbutamol", +GLOBAL_LIST_INIT(safe_chem_list, list("antihol", "charcoal", "epinephrine", "insulin", "teporone","silver_sulfadiazine", "salbutamol", "omnizine", "stimulants", "synaptizine", "potass_iodide", "oculine", "mannitol", "styptic_powder", "spaceacillin", "salglu_solution", "sal_acid", "cryoxadone", "blood", "synthflesh", "hydrocodone", - "mitocholide", "rezadone") \ No newline at end of file + "mitocholide", "rezadone")) \ No newline at end of file diff --git a/code/controllers/subsystem/icon_smooth.dm b/code/controllers/subsystem/icon_smooth.dm new file mode 100644 index 00000000000..65260e5af55 --- /dev/null +++ b/code/controllers/subsystem/icon_smooth.dm @@ -0,0 +1,32 @@ +SUBSYSTEM_DEF(icon_smooth) + name = "Icon Smoothing" + init_order = INIT_ORDER_ICON_SMOOTHING + wait = 1 + priority = FIRE_PRIOTITY_SMOOTHING + flags = SS_TICKER + + var/list/smooth_queue = list() + +/datum/controller/subsystem/icon_smooth/fire() + while(smooth_queue.len) + var/atom/A = smooth_queue[smooth_queue.len] + smooth_queue.len-- + smooth_icon(A) + if(MC_TICK_CHECK) + return + if(!smooth_queue.len) + can_fire = 0 + +/datum/controller/subsystem/icon_smooth/Initialize() + smooth_zlevel(1,TRUE) + smooth_zlevel(2,TRUE) + var/queue = smooth_queue + smooth_queue = list() + for(var/V in queue) + var/atom/A = V + if(!A || A.z <= 2) + continue + smooth_icon(A) + CHECK_TICK + + ..() diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 87038749989..5e4d54d25ca 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -16,6 +16,7 @@ var/dont_save = 0 // For atoms that are temporary by necessity - like lighting overlays ///Chemistry. + var/container_type = NONE var/datum/reagents/reagents = null //This atom's HUD (med/sec, etc) images. Associative list. @@ -23,9 +24,6 @@ //HUD images that this atom can provide. var/list/hud_possible - - //var/chem_is_open_container = 0 - // replaced by OPENCONTAINER flags and atom/proc/is_open_container() ///Chemistry. @@ -198,14 +196,21 @@ /atom/proc/Bumped(AM as mob|obj) return -// Convenience proc to see if a container is open for chemistry handling -// returns true if open -// false if closed +// Convenience procs to see if a container is open for chemistry handling /atom/proc/is_open_container() - return flags & OPENCONTAINER + return is_refillable() && is_drainable() -/atom/proc/allow_drop() - return 1 +/atom/proc/is_injectable(allowmobs = TRUE) + return reagents && (container_type & (INJECTABLE | REFILLABLE)) + +/atom/proc/is_drawable(allowmobs = TRUE) + return reagents && (container_type & (DRAWABLE | DRAINABLE)) + +/atom/proc/is_refillable() + return reagents && (container_type & REFILLABLE) + +/atom/proc/is_drainable() + return reagents && (container_type & DRAINABLE) /atom/proc/CheckExit() return 1 @@ -271,17 +276,24 @@ if(desc) to_chat(user, desc) - if(reagents && is_open_container()) //is_open_container() isn't really the right proc for this, but w/e - to_chat(user, "It contains:") - if(reagents.reagent_list.len) - if(user.can_see_reagents()) //Show each individual reagent - for(var/datum/reagent/R in reagents.reagent_list) - to_chat(user, "[R.volume] units of [R.name]") - else //Otherwise, just show the total volume - if(reagents && reagents.reagent_list.len) - to_chat(user, "[reagents.total_volume] units of various reagents.") - else - to_chat(user, "Nothing.") + if(reagents) + if(container_type & TRANSPARENT) + to_chat(user, "It contains:") + if(reagents.reagent_list.len) + if(user.can_see_reagents()) //Show each individual reagent + for(var/I in reagents.reagent_list) + var/datum/reagent/R = I + to_chat(user, "[R.volume] units of [R.name]") + else //Otherwise, just show the total volume + if(reagents && reagents.reagent_list.len) + to_chat(user, "[reagents.total_volume] units of various reagents.") + else + to_chat(user, "Nothing. ") + else if(container_type & AMOUNT_VISIBLE) + if(reagents.total_volume) + to_chat(user, "It has [reagents.total_volume] unit\s left.") + else + to_chat(user, "It's empty.") SendSignal(COMSIG_PARENT_EXAMINE, user) diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index fed089ee979..bd08ff210d5 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -251,6 +251,12 @@ var/ling_failure = "The deck refuses to respond to a souless creature such as you." var/list/possible_guardians = list("Chaos", "Standard", "Ranged", "Support", "Explosive", "Assassin", "Lightning", "Charger", "Protector") var/random = TRUE + var/color_list = list("Pink" = "#FFC0CB", + "Red" = "#FF0000", + "Orange" = "#FFA500", + "Green" = "#008000", + "Blue" = "#0000FF") + var/name_list = list("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces") /obj/item/guardiancreator/attack_self(mob/living/user) for(var/mob/living/simple_animal/hostile/guardian/G in GLOB.living_mob_list) @@ -275,15 +281,19 @@ to_chat(user, "[failure_message]") used = FALSE +/obj/item/guardiancreator/examine(mob/user, distance) + . = ..() + if(used) + to_chat(user, "[used_message]") -/obj/item/guardiancreator/proc/spawn_guardian(var/mob/living/user, var/key) - var/gaurdiantype = "Standard" +/obj/item/guardiancreator/proc/spawn_guardian(mob/living/user, key) + var/guardian_type = "Standard" if(random) - gaurdiantype = pick(possible_guardians) + guardian_type = pick(possible_guardians) else - gaurdiantype = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians + guardian_type = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians var/pickedtype = /mob/living/simple_animal/hostile/guardian/punch - switch(gaurdiantype) + switch(guardian_type) if("Chaos") pickedtype = /mob/living/simple_animal/hostile/guardian/fire @@ -325,84 +335,19 @@ user.verbs += /mob/living/proc/guardian_recall user.verbs += /mob/living/proc/guardian_reset - var/color - - //names and their RGB - var/magic_list = list("Pink" = "#FFC0CB", \ - "Red" = "#FF0000", \ - "Orange" = "#FFA500", \ - "Green" = "#008000", \ - "Blue" = "#0000FF") - - var/tech_list = list("Rose" = "#F62C6B", \ - "Peony" = "#E54750", \ - "Lily" = "#F6562C", \ - "Daisy" = "#ECCD39", \ - "Zinnia" = "#89F62C", \ - "Ivy" = "#5DF62C", \ - "Iris" = "#2CF6B8", \ - "Petunia" = "#51A9D4", \ - "Violet" = "#8A347C", \ - "Lilac" = "#C7A0F6", \ - "Orchid" = "#F62CF5") - - var/bio_list = list("Rose" = "#F62C6B", \ - "Peony" = "#E54750", \ - "Lily" = "#F6562C", \ - "Daisy" = "#ECCD39", \ - "Zinnia" = "#89F62C", \ - "Ivy" = "#5DF62C", \ - "Iris" = "#2CF6B8", \ - "Petunia" = "#51A9D4", \ - "Violet" = "#8A347C", \ - "Lilac" = "#C7A0F6", \ - "Orchid" = "#F62CF5") - - var/picked_name -// var/picked_color = pick("#FFFFFF","#000000","#808080","#A52A2A","#FF0000","#8B0000","#DC143C","#FFA500","#FFFF00","#008000","#00FF00","#006400","#00FFFF","#0000FF","#000080","#008080","#800080","#4B0082") - - switch(theme) - if("magic") - color = pick(magic_list) - G.name_color = magic_list[color] - picked_name = pick("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces") - - G.name = "[picked_name] [color]" - G.real_name = "[picked_name] [color]" - G.icon_living = "[theme][color]" - G.icon_state = "[theme][color]" - G.icon_dead = "[theme][color]" - - to_chat(user, "[G.magic_fluff_string].") - if("tech") - color = pick(tech_list) //technically not colors, just flowers that can be specific colors - G.name_color = tech_list[color] - picked_name = pick("Gallium", "Indium", "Thallium", "Bismuth", "Aluminium", "Mercury", "Iron", "Silver", "Zinc", "Titanium", "Chromium", "Nickel", "Platinum", "Tellurium", "Palladium", "Rhodium", "Cobalt", "Osmium", "Tungsten", "Iridium") - - G.name = "[picked_name] [color]" - G.real_name = "[picked_name] [color]" - G.icon_living = "[theme][color]" - G.icon_state = "[theme][color]" - G.icon_dead = "[theme][color]" - - to_chat(user, "[G.tech_fluff_string].") - G.speak_emote = list("states") - if("bio") - color = pick(bio_list) //technically not colors, just using the same flowers as tech currerntly - G.name_color = tech_list[color] - picked_name = pick("brood", "hive", "nest") - to_chat(user, "[G.bio_fluff_string].") - - G.name = "[color] [picked_name]" - G.real_name = "[color] [picked_name]" - G.icon_living = "[theme][color]" - G.icon_state = "[theme][color]" - G.icon_dead = "[theme][color]" - - to_chat(user, "[G.bio_fluff_string].") - G.attacktext = "swarms" - G.speak_emote = list("chitters") + var/color = pick(color_list) + G.name_color = color_list[color] + var/picked_name = pick(name_list) + create_theme(G, user, picked_name, color) +/obj/item/guardiancreator/proc/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color) + G.name = "[picked_name] [color]" + G.real_name = "[picked_name] [color]" + G.icon_living = "[theme][color]" + G.icon_state = "[theme][color]" + G.icon_dead = "[theme][color]" + to_chat(user, "[G.magic_fluff_string].") + /obj/item/guardiancreator/choose random = FALSE @@ -417,6 +362,27 @@ used_message = "The injector has already been used." failure_message = "...ERROR. BOOT SEQUENCE ABORTED. AI FAILED TO INTIALIZE. PLEASE CONTACT SUPPORT OR TRY AGAIN LATER." ling_failure = "The holoparasites recoil in horror. They want nothing to do with a creature like you." + color_list = list("Rose" = "#F62C6B", + "Peony" = "#E54750", + "Lily" = "#F6562C", + "Daisy" = "#ECCD39", + "Zinnia" = "#89F62C", + "Ivy" = "#5DF62C", + "Iris" = "#2CF6B8", + "Petunia" = "#51A9D4", + "Violet" = "#8A347C", + "Lilac" = "#C7A0F6", + "Orchid" = "#F62CF5") + name_list = list("Gallium", "Indium", "Thallium", "Bismuth", "Aluminium", "Mercury", "Iron", "Silver", "Zinc", "Titanium", "Chromium", "Nickel", "Platinum", "Tellurium", "Palladium", "Rhodium", "Cobalt", "Osmium", "Tungsten", "Iridium") + +/obj/item/guardiancreator/tech/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color) + G.name = "[picked_name] [color]" + G.real_name = "[picked_name] [color]" + G.icon_living = "[theme][color]" + G.icon_state = "[theme][color]" + G.icon_dead = "[theme][color]" + to_chat(user, "[G.tech_fluff_string].") + G.speak_emote = list("states") /obj/item/guardiancreator/tech/check_uplink_validity() return !used @@ -434,6 +400,28 @@ use_message = "The eggs begin to twitch..." used_message = "The cluster already hatched." failure_message = "...but soon settles again. Guess they weren't ready to hatch after all." + color_list = list("Rose" = "#F62C6B", + "Peony" = "#E54750", + "Lily" = "#F6562C", + "Daisy" = "#ECCD39", + "Zinnia" = "#89F62C", + "Ivy" = "#5DF62C", + "Iris" = "#2CF6B8", + "Petunia" = "#51A9D4", + "Violet" = "#8A347C", + "Lilac" = "#C7A0F6", + "Orchid" = "#F62CF5") + name_list = list("brood", "hive", "nest") + +/obj/item/guardiancreator/biological/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color) + G.name = "[color] [picked_name]" + G.real_name = "[color] [picked_name]" + G.icon_living = "[theme][color]" + G.icon_state = "[theme][color]" + G.icon_dead = "[theme][color]" + to_chat(user, "[G.bio_fluff_string].") + G.attacktext = "swarms" + G.speak_emote = list("chitters") /obj/item/guardiancreator/biological/choose random = FALSE diff --git a/code/game/gamemodes/miniantags/guardian/types/bomb.dm b/code/game/gamemodes/miniantags/guardian/types/bomb.dm index 0503806b196..23f922687a2 100644 --- a/code/game/gamemodes/miniantags/guardian/types/bomb.dm +++ b/code/game/gamemodes/miniantags/guardian/types/bomb.dm @@ -37,38 +37,41 @@ /obj/item/guardian_bomb/proc/disguise(var/obj/A) A.forceMove(src) stored_obj = A + opacity = A.opacity anchored = A.anchored density = A.density appearance = A.appearance - spawn(600) - if(src) - stored_obj.loc = get_turf(loc) - if(spawner) - to_chat(spawner, "Failure! Your trap on [stored_obj] didn't catch anyone this time.") - qdel(src) + dir = A.dir + addtimer(CALLBACK(src, .proc/disable), 600) + +/obj/item/guardian_bomb/proc/disable() + stored_obj.forceMove(get_turf(src)) + if(spawner) + to_chat(spawner, "Failure! Your trap on [stored_obj] didn't catch anyone this time.") + qdel(src) /obj/item/guardian_bomb/proc/detonate(var/mob/living/user) + if(!istype(user)) + return to_chat(user, "The [src] was boobytrapped!") if(istype(spawner, /mob/living/simple_animal/hostile/guardian)) var/mob/living/simple_animal/hostile/guardian/G = spawner if(user == G.summoner) to_chat(user, "You knew this because of your link with your guardian, so you smartly defuse the bomb.") - stored_obj.loc = get_turf(loc) + stored_obj.forceMove(get_turf(loc)) qdel(src) return to_chat(spawner, "Success! Your trap on [src] caught [user]!") - stored_obj.loc = get_turf(loc) + stored_obj.forceMove(get_turf(loc)) playsound(get_turf(src),'sound/effects/Explosion2.ogg', 200, 1) user.ex_act(2) qdel(src) -/obj/item/guardian_bomb/attackby(mob/living/user) +/obj/item/guardian_bomb/attackby(obj/item/W, mob/living/user) detonate(user) - return /obj/item/guardian_bomb/pickup(mob/living/user) detonate(user) - return /obj/item/guardian_bomb/examine(mob/user) stored_obj.examine(user) diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 418539b5bed..494da86d680 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -215,7 +215,7 @@ if(isturf(placed_in)) to_chat(H, "Placing [G.display_name] on [placed_in]!") else - to_chat(H, "Placing [G.display_name] in [placed_in.name]") + to_chat(H, "Placing [G.display_name] in [placed_in.name].") continue if(H.equip_to_appropriate_slot(G)) to_chat(H, "Placing [G.display_name] in your inventory!") diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index c6755d1dbdd..4c75e5dca8a 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -281,7 +281,7 @@ return B.forceMove(src) beaker = B - add_attack_logs(user, null, "Added [B] containing [B.reagentlist()] to a cryo cell at [COORD(src)]") + add_attack_logs(user, null, "Added [B] containing [B.reagents.log_list()] to a cryo cell at [COORD(src)]") user.visible_message("[user] adds \a [B] to [src]!", "You add \a [B] to [src]!") diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index f0e23d6c7d4..1532eeaccbd 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -220,6 +220,14 @@ var/i = 1 for(1, i <= coeff, i++) LR.Charge(occupant) + //Fire extinguisher + if(istype(O, /obj/item/extinguisher)) + var/obj/item/extinguisher/ext = O + ext.reagents.check_and_add("water", ext.max_water, 5 * coeff) + //Welding tools + if(istype(O, /obj/item/weldingtool)) + var/obj/item/weldingtool/weld = O + weld.reagents.check_and_add("fuel", weld.max_fuel, 2 * coeff) if(R) if(R.module) R.module.respawn_consumable(R) diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 9dc62b3551e..130a50cac89 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -12,13 +12,13 @@ src.icon_state = pick(src.random_icon_states) create_reagents(100) if(smooth) - smooth_icon(src) - smooth_icon_neighbors(src) + queue_smooth(src) + queue_smooth_neighbors(src) ..() /obj/effect/decal/cleanable/Destroy() if(smooth) - smooth_icon_neighbors(src) + queue_smooth_neighbors(src) return ..() /obj/effect/decal/cleanable/attackby(obj/item/W as obj, mob/user as mob,) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 2f1a280f83f..aece125c657 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -439,7 +439,8 @@ REAGENT SCANNER icon_state = "spectrometer" item_state = "analyzer" w_class = WEIGHT_CLASS_SMALL - flags = CONDUCT | OPENCONTAINER + flags = CONDUCT + container_type = OPENCONTAINER slot_flags = SLOT_BELT throwforce = 5 throw_speed = 4 diff --git a/code/game/objects/items/random_items.dm b/code/game/objects/items/random_items.dm index 906c04ba8c8..e6e6fcfc8a0 100644 --- a/code/game/objects/items/random_items.dm +++ b/code/game/objects/items/random_items.dm @@ -51,9 +51,9 @@ /obj/item/reagent_containers/glass/bottle/random_reagent/New() ..() var/list/possible_chems = GLOB.chemical_reagents_list.Copy() - possible_chems -= blocked_chems.Copy() + possible_chems -= GLOB.blocked_chems.Copy() var/datum/reagent/R = pick(possible_chems) - if(rare_chemicals.Find(R)) + if(GLOB.rare_chemicals.Find(R)) reagents.add_reagent(R, 10) else reagents.add_reagent(R, rand(2, 3)*10) @@ -68,7 +68,7 @@ /obj/item/reagent_containers/glass/bottle/random_chem/New() ..() var/R = get_random_reagent_id() - if(rare_chemicals.Find(R)) + if(GLOB.rare_chemicals.Find(R)) reagents.add_reagent(R, 10) else reagents.add_reagent(R, rand(2, 3)*10) @@ -82,7 +82,7 @@ /obj/item/reagent_containers/glass/bottle/random_base_chem/New() ..() - var/datum/reagent/R = pick(base_chemicals) + var/datum/reagent/R = pick(GLOB.base_chemicals) reagents.add_reagent(R, rand(2, 6)*5) name = "unlabelled bottle" pixel_x = rand(-10, 10) @@ -94,7 +94,7 @@ /obj/item/reagent_containers/food/drinks/bottle/random_drink/New() ..() - var/list/possible_drinks = drinks.Copy() + var/list/possible_drinks = GLOB.drinks.Copy() if(prob(50)) possible_drinks += list("pancuronium","lsd","omnizine","blood") @@ -113,7 +113,7 @@ ..() var/R = get_random_reagent_id() - if(rare_chemicals.Find(R)) + if(GLOB.rare_chemicals.Find(R)) reagents.add_reagent(R, 10) else reagents.add_reagent(R, rand(3, 10)*10) @@ -131,13 +131,13 @@ /obj/item/storage/pill_bottle/random_meds/New() ..() for(var/i in 1 to storage_slots) - var/list/possible_medicines = standard_medicines.Copy() + var/list/possible_medicines = GLOB.standard_medicines.Copy() if(prob(50)) - possible_medicines += rare_medicines.Copy() + possible_medicines += GLOB.rare_medicines.Copy() var/datum/reagent/R = pick(possible_medicines) var/obj/item/reagent_containers/food/pill/P = new(src) - if(rare_medicines.Find(R)) + if(GLOB.rare_medicines.Find(R)) P.reagents.add_reagent(R, 10) else P.reagents.add_reagent(R, rand(2, 5)*10) @@ -182,7 +182,7 @@ /obj/structure/closet/crate/secure/chemicals/New() ..() - for(var/chem in standard_chemicals) + for(var/chem in GLOB.standard_chemicals) var/obj/item/reagent_containers/glass/bottle/B = new(src) B.reagents.add_reagent(chem, B.volume) if(prob(85)) diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 19f989ec7b7..dc691055420 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -152,8 +152,13 @@ RCD var/obj/item/pda/pda = I I = pda.id var/obj/item/card/id/ID = I - if(istype(ID) && ID && check_access(ID)) - locked = 0 + if(istype(ID) && ID) + if(check_access(ID)) + locked = 0 + else + to_chat(usr, "This ID lacks access.") + else + to_chat(usr, "You can't swipe without your ID in hand.") . = 1 if(href_list["logout"]) diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index fb4829dd13f..3d893c86371 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -11,6 +11,7 @@ throw_speed = 2 throw_range = 7 force = 10 + container_type = AMOUNT_VISIBLE materials = list(MAT_METAL=90) attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed") var/max_water = 50 @@ -36,11 +37,8 @@ sprite_name = "miniFE" /obj/item/extinguisher/examine(mob/user) - if(..(user, 0)) - to_chat(usr, "[bicon(src)] [src.name] contains:") - if(reagents && reagents.reagent_list.len) - for(var/datum/reagent/R in reagents.reagent_list) - to_chat(user, "[R.volume] units of [R.name]") + . = ..() + to_chat(user, "The safety is [safety ? "on" : "off"].") /obj/item/extinguisher/New() diff --git a/code/game/objects/items/weapons/implants/implant_chem.dm b/code/game/objects/items/weapons/implants/implant_chem.dm index b2f79f7e5c9..5f0fea79da9 100644 --- a/code/game/objects/items/weapons/implants/implant_chem.dm +++ b/code/game/objects/items/weapons/implants/implant_chem.dm @@ -3,7 +3,7 @@ desc = "Injects things." icon_state = "reagents" origin_tech = "materials=3;biotech=4" - flags = OPENCONTAINER + container_type = OPENCONTAINER /obj/item/implant/chem/get_data() var/dat = {"Implant Specifications:
diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index 7c8883ca7e8..dc466f479d0 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -13,7 +13,7 @@ amount_per_transfer_from_this = 5 possible_transfer_amounts = list(5,10,20,30,50,70) volume = 70 - flags = OPENCONTAINER + container_type = OPENCONTAINER /obj/item/reagent_containers/glass/paint/afterattack(turf/simulated/target, mob/user, proximity) if(!proximity) diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm index 364fd49847b..96dd853be09 100644 --- a/code/game/objects/items/weapons/tanks/watertank.dm +++ b/code/game/objects/items/weapons/tanks/watertank.dm @@ -116,7 +116,8 @@ amount_per_transfer_from_this = 50 possible_transfer_amounts = list(25,50,100) volume = 500 - flags = NODROP | OPENCONTAINER | NOBLUDGEON + flags = NODROP | NOBLUDGEON + container_type = OPENCONTAINER var/obj/item/watertank/tank diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index f74a3b542ca..e38350a0136 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -32,8 +32,8 @@ ..() if(smooth) if(ticker && ticker.current_state == GAME_STATE_PLAYING) - smooth_icon(src) - smooth_icon_neighbors(src) + queue_smooth(src) + queue_smooth_neighbors(src) icon_state = "" if(climbable) verbs += /obj/structure/proc/climb_on @@ -46,7 +46,7 @@ if(smooth) var/turf/T = get_turf(src) spawn(0) - smooth_icon_neighbors(T) + queue_smooth_neighbors(T) return ..() /obj/structure/proc/climb_on() diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 31239a5ecb4..98d17d71be9 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -82,7 +82,7 @@ if(density) icon_state = initial(icon_state) smooth = SMOOTH_TRUE - smooth_icon(src) + queue_smooth(src) else icon_state = "fwall_open" @@ -322,4 +322,4 @@ mineral = /obj/item/stack/sheet/mineral/plastitanium walltype = /turf/simulated/wall/mineral/plastitanium smooth = SMOOTH_MORE - canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater) \ No newline at end of file + canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater) diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index b19c5a56e99..bba1dc18de6 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -7,7 +7,7 @@ icon_state = "cart" anchored = 0 density = 1 - flags = OPENCONTAINER + container_type = OPENCONTAINER //copypaste sorry var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite var/obj/item/storage/bag/trash/mybag = null diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index aa9f21a9cce..f01cc8c41ca 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/janitor.dmi' icon_state = "mopbucket" density = 1 - flags = OPENCONTAINER + container_type = OPENCONTAINER var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite /obj/structure/mopbucket/New() diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 91f348d0106..7554b7ae194 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -50,8 +50,8 @@ /obj/structure/table/update_icon() if(smooth && !flipped) icon_state = "" - smooth_icon(src) - smooth_icon_neighbors(src) + queue_smooth(src) + queue_smooth_neighbors(src) if(flipped) clear_smooth_overlays() diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 751ade6081f..e657e9f8538 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -115,8 +115,8 @@ if(!open) return var/obj/item/reagent_containers/RG = I - if(RG.is_open_container()) - if(RG.reagents.total_volume >= RG.volume) + if(RG.is_refillable()) + if(RG.reagents.holder_full()) to_chat(user, "[RG] is full.") else RG.reagents.add_reagent("toiletwater", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this)) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 25c78f6e972..a33e4176599 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -65,7 +65,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f else to_chat(user, "The window is unscrewed from the floor, and could be deconstructed by wrenching.") if(!anchored && !fulltile) - to_chat(user, "Alt-click to rotate it clockwise.") + to_chat(user, "Alt-click to rotate it.") /obj/structure/window/New(Loc, direct) ..() @@ -355,7 +355,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f set category = "Object" set src in oview(1) - if(usr.stat || !usr.canmove || usr.restrained()) + if(usr.incapacitated()) return if(anchored) @@ -378,7 +378,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f set category = "Object" set src in oview(1) - if(usr.stat || !usr.canmove || usr.restrained()) + if(usr.incapacitated()) return if(anchored) @@ -397,12 +397,31 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f return TRUE /obj/structure/window/AltClick(mob/user) + if(user.incapacitated()) to_chat(user, "You can't do that right now!") return + if(!Adjacent(user)) + to_chat(user, "Move closer to the window!") return - revrotate() + + if(anchored) + to_chat(user, "[src] cannot be rotated while it is fastened to the floor!") + return FALSE + + var/target_dir = turn(dir, 270) + + if(!valid_window_location(loc, target_dir)) + target_dir = turn(dir, 90) + if(!valid_window_location(loc, target_dir)) + to_chat(user, "There is no room to rotate the [src]") + return FALSE + + setDir(target_dir) + ini_dir = dir + add_fingerprint(user) + return TRUE /obj/structure/window/Destroy() density = FALSE @@ -425,7 +444,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f /obj/structure/window/proc/update_nearby_icons() update_icon() if(smooth) - smooth_icon_neighbors(src) + queue_smooth_neighbors(src) /obj/structure/window/update_icon() if(!QDELETED(src)) @@ -434,7 +453,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f var/ratio = obj_integrity / max_integrity ratio = CEILING(ratio*4, 1) * 25 if(smooth) - smooth_icon(src) + queue_smooth(src) overlays -= crack_overlay if(ratio > 75) return @@ -714,4 +733,4 @@ obj/structure/window/full/reinforced/ice dir = FULLTILE_WINDOW_DIR max_integrity = 120 level = 3 - glass_amount = 2 \ No newline at end of file + glass_amount = 2 diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index fedbfaa5929..21dbdb9e024 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -85,6 +85,6 @@ /turf/simulated/ChangeTurf(var/path) . = ..() - smooth_icon_neighbors(src) + queue_smooth_neighbors(src) /turf/simulated/proc/is_shielded() diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index 96f10a832b5..e9f8d96e70f 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -128,11 +128,11 @@ return 0 if(!broken && !burnt) if(smooth) - smooth_icon(src) + queue_smooth(src) else make_plating() if(smooth) - smooth_icon_neighbors(src) + queue_smooth_neighbors(src) /turf/simulated/floor/carpet/break_tile() broken = 1 diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index c22c7530505..6008b093c5a 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -72,7 +72,7 @@ if(!damage_overlays[1]) //list hasn't been populated generate_overlays() - smooth_icon(src) + queue_smooth(src) if(!damage) if(damage_overlay) overlays -= damage_overlays[damage_overlay] diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index eb054ba19ed..f1837173d6d 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -65,7 +65,7 @@ d_state = RWALL_INTACT update_icon() - smooth_icon_neighbors(src) + queue_smooth_neighbors(src) to_chat(user, "You repair the last of the damage.") return TRUE @@ -84,7 +84,7 @@ to_chat(user, "You add an additional layer of coating to the wall.") ChangeTurf(/turf/simulated/wall/r_wall/coated) update_icon() - smooth_icon_neighbors(src) + queue_smooth_neighbors(src) can_be_reinforced = FALSE return TRUE return FALSE diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 4d6974f702f..d7ed44c3c9a 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -39,18 +39,18 @@ for(var/atom/movable/AM in src) Entered(AM) if(smooth && ticker && ticker.current_state == GAME_STATE_PLAYING) - smooth_icon(src) + queue_smooth(src) /hook/startup/proc/smooth_world() var/watch = start_watch() log_startup_progress("Smoothing atoms...") for(var/turf/T in world) if(T.smooth) - smooth_icon(T) + queue_smooth(T) for(var/A in T) var/atom/AA = A if(AA.smooth) - smooth_icon(AA) + queue_smooth(AA) log_startup_progress(" Smoothed atoms in [stop_watch(watch)]s.") return 1 diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index b507af0871e..365a0beaead 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -663,8 +663,17 @@ Traitors and the like can also be revived with the previous role mostly intact. return if(job_master) + var/currentpositiontally + var/totalpositiontally + to_chat(src, "Job Name: Filled job slot / Total job slots (Free job slots)") for(var/datum/job/job in job_master.occupations) - to_chat(src, "[job.title]: [job.total_positions]") + to_chat(src, "[job.title]: [job.current_positions] / \ + [job.total_positions == -1 ? "UNLIMITED" : job.total_positions] \ + ([job.total_positions == -1 ? "UNLIMITED" : job.total_positions - job.current_positions])") + if(job.total_positions != -1) // Only count position that isn't unlimited + currentpositiontally += job.current_positions + totalpositiontally += job.total_positions + to_chat(src, "Currently filled job slots (Excluding unlimited): [currentpositiontally] / [totalpositiontally] ([totalpositiontally - currentpositiontally])") feedback_add_details("admin_verb","LFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in view()) diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm index c617b90030f..36a4eeda829 100644 --- a/code/modules/awaymissions/zlevel.dm +++ b/code/modules/awaymissions/zlevel.dm @@ -17,11 +17,11 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away log_debug("Smoothing tiles") for(var/turf/T in smoothTurfs) if(T.smooth) - smooth_icon(T) + queue_smooth(T) for(var/R in T) var/atom/A = R if(A.smooth) - smooth_icon(A) + queue_smooth(A) if(istype(T, /turf/simulated/mineral)) // For the listening post, among other maps var/turf/simulated/mineral/MT = T MT.add_edges() diff --git a/code/modules/crafting/craft.dm b/code/modules/crafting/craft.dm index 37fa041af77..ea5e4a652aa 100644 --- a/code/modules/crafting/craft.dm +++ b/code/modules/crafting/craft.dm @@ -69,7 +69,7 @@ else if(istype(I, /obj/item/reagent_containers)) var/obj/item/reagent_containers/RC = I - if(RC.flags & OPENCONTAINER) + if(RC.container_type & OPENCONTAINER) for(var/datum/reagent/A in RC.reagents.reagent_list) .[A.type] += A.volume .[I.type] += 1 diff --git a/code/modules/detective_work/footprints_and_rag.dm b/code/modules/detective_work/footprints_and_rag.dm index dda9490b82a..31f9e66255b 100644 --- a/code/modules/detective_work/footprints_and_rag.dm +++ b/code/modules/detective_work/footprints_and_rag.dm @@ -19,7 +19,8 @@ possible_transfer_amounts = list(5) volume = 5 can_be_placed_into = null - flags = OPENCONTAINER | NOBLUDGEON + flags = NOBLUDGEON + container_type = OPENCONTAINER var/wipespeed = 30 /obj/item/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag) diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm index f0451d25817..be11094bc6b 100644 --- a/code/modules/fish/fishtank.dm +++ b/code/modules/fish/fishtank.dm @@ -474,7 +474,7 @@ //Finally, report the full examine_message constructed from the above reports - to_chat(user, "[examine_message]") + to_chat(user, "[examine_message]") return examine_message ////////////////////////////// @@ -485,37 +485,37 @@ if(istype(M, /mob/living/simple_animal/pet/cat)) if(M.a_intent == INTENT_HELP) //Cats can try to fish in open tanks on help intent if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open. - M.visible_message("[M.name] stares at into [src] while sitting perfectly still.", "The lid is closed, so you stare into [src] intently.") + M.visible_message("[M.name] stares at into [src] while sitting perfectly still.", "The lid is closed, so you stare into [src] intently.") else if(fish_count) //Tank must actually have fish to try catching one - M.visible_message("[M.name] leaps up onto [src] and attempts to fish through the opening!", "You jump up onto [src] and begin fishing through the opening!") + M.visible_message("[M.name] leaps up onto [src] and attempts to fish through the opening!", "You jump up onto [src] and begin fishing through the opening!") if(water_level && prob(45)) //If there is water, there is a chance the cat will slip, Syndicat will spark like E-N when this happens - M.visible_message("[M.name] slipped and got soaked!", "You slipped and got soaked!") + M.visible_message("[M.name] slipped and got soaked!", "You slipped and got soaked!") if(istype(M, /mob/living/simple_animal/pet/cat/Syndi)) do_sparks(3, 1, src) else //No water or didn't slip, get that fish! - M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!") + M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!") kill_fish() //Kill a random fish M.health = M.maxHealth //Eating fish heals the predator else - to_chat(M, "There are no fish in [src]!") + to_chat(M, "There are no fish in [src]!") else return ..() else if(istype(M, /mob/living/simple_animal/hostile/bear)) if(M.a_intent == INTENT_HELP) //Bears can try to fish in open tanks on help intent if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open. - M.visible_message("[M.name] scrapes it's claws along [src]'s lid.", "The lid is closed, so you scrape your claws against [src]'s lid.") + M.visible_message("[M.name] scrapes it's claws along [src]'s lid.", "The lid is closed, so you scrape your claws against [src]'s lid.") else if(fish_count) //Tank must actually have fish to try catching one - M.visible_message("[M.name] reaches into [src] and attempts to fish through the opening!", "You reach into [src] and begin fishing through the opening!") + M.visible_message("[M.name] reaches into [src] and attempts to fish through the opening!", "You reach into [src] and begin fishing through the opening!") if(water_level && prob(5)) //Bears are good at catching fish, only a 5% chance to fail - M.visible_message("[M.name] swipes at the water!", "You just barely missed that fish!") + M.visible_message("[M.name] swipes at the water!", "You just barely missed that fish!") else //No water or didn't slip, get that fish! - M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!") + M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!") kill_fish() //Kill a random fish M.health = M.maxHealth //Eating fish heals the predator else - to_chat(M, "There are no fish in [src]!") + to_chat(M, "There are no fish in [src]!") else return ..() else @@ -530,8 +530,8 @@ "You hear a banging sound.") else playsound(loc, 'sound/effects/glassknock.ogg', 80, 1) - user.visible_message("[user.name] taps on the [name].", \ - "You tap on the [name].", \ + user.visible_message("[user.name] taps on the [name].", \ + "You tap on the [name].", \ "You hear a knocking sound.") /obj/machinery/fishtank/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) @@ -571,62 +571,57 @@ if(W.isOn()) if(obj_integrity < max_integrity) playsound(loc, W.usesound, 50, 1) - to_chat(user, "You repair some of the cracks on [src].") + to_chat(user, "You repair some of the cracks on [src].") obj_integrity = min(obj_integrity + 20, max_integrity) check_health() else - to_chat(user, "There is no damage to fix!") + to_chat(user, "There is no damage to fix!") else if(obj_integrity < max_integrity) - to_chat(user, "[W] must be on to repair this damage.") + to_chat(user, "[W] must be on to repair this damage.") else return ..() //Open reagent containers add and remove water - else if(O.is_open_container()) - if(istype(O, /obj/item/reagent_containers/glass)) - if(lid_switch) - to_chat(user, "Open the lid on [src] first!") - return - var/obj/item/reagent_containers/glass/C = O - //Containers with any reagents will get dumped in - if(C.reagents.total_volume) - var/water_value = 0 - water_value += C.reagents.get_reagent_amount("water") //Water is full value - water_value += C.reagents.get_reagent_amount("holywater") *1.1 //Holywater is (somehow) better. Who said religion had to make sense? - water_value += C.reagents.get_reagent_amount("tonic") * 0.25 //Tonic water is 25% value - water_value += C.reagents.get_reagent_amount("sodawater") * 0.50 //Sodawater is 50% value - water_value += C.reagents.get_reagent_amount("fishwater") * 0.75 //Fishwater is 75% value, to account for the fish poo - water_value += C.reagents.get_reagent_amount("ice") * 0.80 //Ice is 80% value - var/message = "" - if(!water_value) //The container has no water value, clear everything in it - message = "The filtration process removes everything, leaving the water level unchanged." - C.reagents.clear_reagents() - else - if(water_level == water_capacity) - to_chat(user, "[src] is already full!") - else - message = "The filtration process purifies the water, raising the water level." - - if((water_level + water_value) == water_capacity) - message += " You filled [src] to the brim!" - if((water_level + water_value) > water_capacity) - message += " You overfilled [src] and some water runs down the side, wasted." - C.reagents.clear_reagents() - adjust_water_level(water_value) - user.visible_message("[user.name] pours the contents of [C.name] into [src].", "[message]") - //Empty containers will scoop out water, filling the container as much as possible from the water_level + else if(O.is_drainable()) + //Containers with any reagents will get dumped in + if(O.reagents.total_volume) + var/water_value = 0 + water_value += O.reagents.get_reagent_amount("water") //Water is full value + water_value += O.reagents.get_reagent_amount("holywater") *1.1 //Holywater is (somehow) better. Who said religion had to make sense? + water_value += O.reagents.get_reagent_amount("tonic") * 0.25 //Tonic water is 25% value + water_value += O.reagents.get_reagent_amount("sodawater") * 0.50 //Sodawater is 50% value + water_value += O.reagents.get_reagent_amount("fishwater") * 0.75 //Fishwater is 75% value, to account for the fish poo + water_value += O.reagents.get_reagent_amount("ice") * 0.80 //Ice is 80% value + var/message = "" + if(!water_value) //The container has no water value, clear everything in it + message = "The filtration process removes everything, leaving the water level unchanged." + O.reagents.clear_reagents() else - if(!water_level) - to_chat(user, "[src] is empty!") + if(water_level == water_capacity) + to_chat(user, "[src] is already full!") else - if(water_level >= C.volume) //Enough to fill the container completely - C.reagents.add_reagent("fishwater", C.volume) - adjust_water_level(-C.volume) - user.visible_message("[user.name] scoops out some water from [src].", "You completely fill [C.name] from [src].") - else //Fill the container as much as possible with the water_level - C.reagents.add_reagent("fishwater", water_level) - adjust_water_level(-water_level) - user.visible_message("[user.name] scoops out some water from [src].", "You fill [C.name] with the last of the water in [src].") + message = "The filtration process purifies the water, raising the water level." + + if((water_level + water_value) == water_capacity) + message += " You filled [src] to the brim!" + if((water_level + water_value) > water_capacity) + message += " You overfilled [src] and some water runs down the side, wasted." + O.reagents.clear_reagents() + adjust_water_level(water_value) + user.visible_message("[user.name] pours the contents of [O.name] into [src].", "[message]") + //Empty containers will scoop out water, filling the container as much as possible from the water_level + else if(O.is_refillable()) + if(!water_level) + to_chat(user, "[src] is empty!") + else + if(water_level >= O.reagents.maximum_volume) //Enough to fill the container completely + O.reagents.add_reagent("fishwater", O.reagents.maximum_volume) + adjust_water_level(-O.reagents.maximum_volume) + user.visible_message("[user.name] scoops out some water from [src].", "You completely fill [O.name] from [src].") + else //Fill the container as much as possible with the water_level + O.reagents.add_reagent("fishwater", water_level) + adjust_water_level(-water_level) + user.visible_message("[user.name] scoops out some water from [src].", "You fill [O.name] with the last of the water in [src].") //Wrenches can deconstruct empty tanks, but not tanks with any water. Kills any fish left inside and destroys any unharvested eggs in the process else if(iswrench(O)) if(!water_level) @@ -635,17 +630,17 @@ if(do_after(user, 50 * O.toolspeed, target = src)) deconstruct(TRUE) else - to_chat(user, "[src] must be empty before you disassemble it!") + to_chat(user, "[src] must be empty before you disassemble it!") //Fish eggs else if(istype(O, /obj/item/fish_eggs)) var/obj/item/fish_eggs/egg = O //Don't add eggs if there is no water (they kinda need that to live) if(!water_level) - to_chat(user, "[src] has no water; [egg.name] won't hatch without water!") + to_chat(user, "[src] has no water; [egg.name] won't hatch without water!") else //Don't add eggs if the tank already has the max number of fish if(fish_count >= max_fish) - to_chat(user, "[src] can't hold any more fish.") + to_chat(user, "[src] can't hold any more fish.") else add_fish(egg.fish_type) qdel(egg) @@ -655,30 +650,30 @@ if(water_level) if(food_level < 10) if(fish_count == 0) - user.visible_message("[user.name] shakes some fish food into the empty [src]... How sad.", "You shake some fish food into the empty [src]... If only it had fish.") + user.visible_message("[user.name] shakes some fish food into the empty [src]... How sad.", "You shake some fish food into the empty [src]... If only it had fish.") else - user.visible_message("[user.name] feeds the fish in [src]. The fish look excited!", "You feed the fish in [src]. They look excited!") + user.visible_message("[user.name] feeds the fish in [src]. The fish look excited!", "You feed the fish in [src]. They look excited!") adjust_food_level(10) else - to_chat(user, "[src] already has plenty of food in it. You decide to not add more.") + to_chat(user, "[src] already has plenty of food in it. You decide to not add more.") else - to_chat(user, "[src] doesn't have any water in it. You should fill it with water first.") + to_chat(user, "[src] doesn't have any water in it. You should fill it with water first.") //Fish egg scoop else if(istype(O, /obj/item/egg_scoop)) if(egg_count) - user.visible_message("[user.name] harvests some fish eggs from [src].", "You scoop the fish eggs out of [src].") + user.visible_message("[user.name] harvests some fish eggs from [src].", "You scoop the fish eggs out of [src].") harvest_eggs(user) else - user.visible_message("[user.name] fails to harvest any fish eggs from [src].", "There are no fish eggs in [src] to scoop out.") + user.visible_message("[user.name] fails to harvest any fish eggs from [src].", "There are no fish eggs in [src] to scoop out.") //Fish net else if(istype(O, /obj/item/fish_net)) harvest_fish(user) //Tank brush else if(istype(O, /obj/item/tank_brush)) if(filth_level == 0) - to_chat(user, "[src] is already spotless!") + to_chat(user, "[src] is already spotless!") else adjust_filth_level(-filth_level) - user.visible_message("[user.name] scrubs the inside of [src], cleaning the filth.", "You scrub the inside of [src], cleaning the filth.") + user.visible_message("[user.name] scrubs the inside of [src], cleaning the filth.", "You scrub the inside of [src], cleaning the filth.") else return ..() \ No newline at end of file diff --git a/code/modules/food_and_drinks/drinks/bottler/bottler.dm b/code/modules/food_and_drinks/drinks/bottler/bottler.dm index 6086f2798a7..4cf5c58bd06 100644 --- a/code/modules/food_and_drinks/drinks/bottler/bottler.dm +++ b/code/modules/food_and_drinks/drinks/bottler/bottler.dm @@ -235,7 +235,7 @@ //empties aren't sealed, so let's open it quietly drink_container = new drink_container() drink_container.canopened = 1 - drink_container.flags |= OPENCONTAINER + drink_container.container_type |= OPENCONTAINER drink_container.forceMove(loc) containers[con_type]-- diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index e64b74f1635..fd8a32ff7fc 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -6,7 +6,7 @@ desc = "yummy" icon = 'icons/obj/drinks.dmi' icon_state = null - flags = OPENCONTAINER + container_type = OPENCONTAINER consume_sound = 'sound/items/drink.ogg' possible_transfer_amounts = list(5,10,15,20,25,30,50) volume = 50 @@ -26,7 +26,11 @@ /obj/item/reagent_containers/food/drinks/attack(mob/M, mob/user, def_zone) if(!reagents || !reagents.total_volume) to_chat(user, " None of [src] left, oh no!") - return 0 + return FALSE + + if(!is_drainable()) + to_chat(user, " You need to open [src] first!") + return FALSE if(istype(M, /mob/living/carbon)) var/mob/living/carbon/C = M @@ -35,15 +39,14 @@ var/mob/living/silicon/robot/borg = user borg.cell.use(30) var/refill = reagents.get_master_reagent_id() - if(refill in drinks) // Only synthesize drinks - spawn(600) - reagents.add_reagent(refill, bitesize) - return 1 - return 0 + if(refill in GLOB.drinks) // Only synthesize drinks + addtimer(CALLBACK(reagents, /datum/reagents.proc/add_reagent, refill, bitesize), 600) + return TRUE + return FALSE /obj/item/reagent_containers/food/drinks/MouseDrop(atom/over_object) //CHUG! CHUG! CHUG! var/mob/living/carbon/chugger = over_object - if (!(flags & OPENCONTAINER)) + if (!(container_type & DRAINABLE)) to_chat(chugger, "You need to open [src] first!") return if(istype(chugger) && loc == chugger && src == chugger.get_active_hand() && reagents.total_volume) @@ -56,39 +59,18 @@ break /obj/item/reagent_containers/food/drinks/afterattack(obj/target, mob/user, proximity) - if(!proximity) return + if(!proximity) + return - // Moved from the can code; not necessary since closed cans aren't open containers now, but, eh. - if(istype(target, /obj/item/reagent_containers/food/drinks/cans)) - var/obj/item/reagent_containers/food/drinks/cans/cantarget = target - if(cantarget.canopened == 0) - to_chat(user, "You need to open the drink you want to pour into!") - return - - if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us. - - if(!target.reagents.total_volume) - to_chat(user, " [target] is empty.") - return - - if(reagents.total_volume >= reagents.maximum_volume) - to_chat(user, " [src] is full.") - return - - var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) - to_chat(user, " You fill [src] with [trans] units of the contents of [target].") - - else if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it. + if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it. if(!reagents.total_volume) to_chat(user, " [src] is empty.") - return + return FALSE - if(target.reagents.total_volume >= target.reagents.maximum_volume) + if(target.reagents.holder_full()) to_chat(user, " [target] is full.") - return - - - + return FALSE + var/datum/reagent/refill var/datum/reagent/refillName if(isrobot(user)) @@ -99,22 +81,34 @@ to_chat(user, " You transfer [trans] units of the solution to [target].") if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell - if(refill in drinks) // Only synthesize drinks + if(refill in GLOB.drinks) // Only synthesize drinks var/mob/living/silicon/robot/bro = user var/chargeAmount = max(30,4*trans) bro.cell.use(chargeAmount) - to_chat(user, "Now synthesizing [trans] units of [refillName]...") + to_chat(user, "Now synthesizing [trans] units of [refillName]...") + addtimer(CALLBACK(reagents, /datum/reagents.proc/add_reagent, refill, trans), 300) + addtimer(CALLBACK(GLOBAL_PROC, .proc/__to_chat, user, "Cyborg [src] refilled."), 300) + else if(target.is_drainable()) //A dispenser. Transfer FROM it TO us. + if(!is_refillable()) + to_chat(user, "[src]'s tab isn't open!") + return FALSE + if(!target.reagents.total_volume) + to_chat(user, "[target] is empty.") + return FALSE - spawn(300) - reagents.add_reagent(refill, trans) - to_chat(user, "Cyborg [src] refilled.") + if(reagents.holder_full()) + to_chat(user, "[src] is full.") + return FALSE - return + var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) + to_chat(user, "You fill [src] with [trans] units of the contents of [target].") + + return FALSE /obj/item/reagent_containers/food/drinks/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/clothing/mask/cigarette)) //ciggies are weird - return + return FALSE if(is_hot(I)) if(reagents) reagents.chem_temp += 15 @@ -151,7 +145,8 @@ materials = list(MAT_METAL=100) possible_transfer_amounts = list() volume = 5 - flags = CONDUCT | OPENCONTAINER + flags = CONDUCT + container_type = OPENCONTAINER /obj/item/reagent_containers/food/drinks/trophy/gold_cup name = "gold cup" diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm index b0c0d24efaa..60642cab847 100644 --- a/code/modules/food_and_drinks/food/condiment.dm +++ b/code/modules/food_and_drinks/food/condiment.dm @@ -10,7 +10,7 @@ desc = "Just your average condiment container." icon = 'icons/obj/food/containers.dmi' icon_state = "emptycondiment" - flags = OPENCONTAINER + container_type = OPENCONTAINER possible_transfer_amounts = list(1, 5, 10, 15, 20, 25, 30, 50) volume = 50 //Possible_states has the reagent id as key and a list of, in order, the icon_state, the name and the desc as values. Used in the on_reagent_change() to change names, descs and sprites. @@ -47,7 +47,7 @@ if(!reagents || !reagents.total_volume) return // The condiment might be empty after the delay. user.visible_message("[user] feeds [M] from [src].") - add_attack_logs(user, M, "Fed [src] containing [reagentlist()]") + add_attack_logs(user, M, "Fed [src] containing [reagents.log_list()]") var/fraction = min(10/reagents.total_volume, 1) reagents.reaction(M, INGEST, fraction) @@ -75,7 +75,7 @@ to_chat(user, "You fill [src] with [trans] units of the contents of [target].") //Something like a glass or a food item. Player probably wants to transfer TO it. - else if(target.is_open_container() || istype(target, /obj/item/reagent_containers/food/snacks)) + else if(target.is_drainable() || istype(target, /obj/item/reagent_containers/food/snacks)) if(!reagents.total_volume) to_chat(user, "[src] is empty!") return diff --git a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm index f36f6400f27..298a5ae2e7e 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm @@ -8,7 +8,7 @@ use_power = IDLE_POWER_USE idle_power_usage = 5 active_power_usage = 100 - flags = OPENCONTAINER + container_type = OPENCONTAINER var/operating = 0 // Is it on? var/dirty = 0 // = {0..100} Does it need cleaning? var/broken = 0 // ={0,1,2} How broken is it??? @@ -93,7 +93,7 @@ icon_state = off_icon broken = 0 // Fix it! dirty = 0 // just to be sure - flags = OPENCONTAINER + container_type = OPENCONTAINER else to_chat(user, "It's broken!") return 1 @@ -105,7 +105,7 @@ dirty = 0 // It's clean! broken = 0 // just to be sure icon_state = off_icon - flags = OPENCONTAINER + container_type = OPENCONTAINER else //Otherwise bad luck!! to_chat(user, "It's dirty!") return 1 diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm index 56d032045c0..95ea83cd424 100644 --- a/code/modules/hydroponics/grown/mushrooms.dm +++ b/code/modules/hydroponics/grown/mushrooms.dm @@ -81,7 +81,7 @@ /obj/item/reagent_containers/food/snacks/grown/mushroom/angel seed = /obj/item/seeds/angel name = "destroying angel" - desc = "Amanita Virosa: Deadly poisonous basidiomycete fungus filled with alpha amatoxins." + desc = "Amanita Virosa: Deadly poisonous basidiomycete fungus filled with alpha amanitin." icon_state = "angel" filling_color = "#C0C0C0" diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index 6b2da2c29ae..a3453585817 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -21,7 +21,7 @@ icon_state = "weedspray" item_state = "plantbgone" volume = 100 - flags = OPENCONTAINER + container_type = OPENCONTAINER slot_flags = SLOT_BELT throwforce = 0 w_class = WEIGHT_CLASS_SMALL @@ -43,7 +43,7 @@ icon_state = "pestspray" item_state = "plantbgone" volume = 100 - flags = OPENCONTAINER + container_type = OPENCONTAINER slot_flags = SLOT_BELT throwforce = 0 w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index b5bea1fc6b3..92f91ddf51a 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -763,8 +763,8 @@ else if(transfer_amount) // Droppers, cans, beakers, what have you. visi_msg="[user] uses [reagent_source] on [target]" irrigate = 1 - // Beakers, bottles, buckets, etc. Can't use is_open_container though. - if(istype(reagent_source, /obj/item/reagent_containers/glass/)) + // Beakers, bottles, buckets, etc. + if(reagent_source.is_drainable()) playsound(loc, 'sound/effects/slosh.ogg', 25, 1) if(irrigate && transfer_amount > 30 && reagent_source.reagents.total_volume >= 30 && using_irrigation) diff --git a/code/modules/hydroponics/sample.dm b/code/modules/hydroponics/sample.dm index e2d5ea6eb97..10ba2642107 100644 --- a/code/modules/hydroponics/sample.dm +++ b/code/modules/hydroponics/sample.dm @@ -11,7 +11,7 @@ var/list/chem_t2_reagents = list( var/list/chem_t3_reagents = list( "ethanol", "chlorine", "potassium", - "aluminium", "radium", "fluorine", + "aluminum", "radium", "fluorine", "iron", "fuel", "silver", "stable_plasma" ) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index b793ec154c7..e9b09ba1f2b 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1019,7 +1019,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, return 1 /mob/living/carbon/proc/forceFedAttackLog(var/obj/item/reagent_containers/food/toEat, mob/user) - add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagentlist(toEat)]", ATKLOG_MOST) + add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagents.log_list(toEat)]", ATKLOG_MOST) if(!iscarbon(user)) LAssailant = null else diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index fdd91bf1cd9..591c62ff862 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -329,7 +329,13 @@ /mob/living/proc/can_inject() - return 1 + return TRUE + +/mob/living/is_injectable(allowmobs = TRUE) + return (allowmobs && reagents && can_inject()) + +/mob/living/is_drawable(allowmobs = TRUE) + return (allowmobs && reagents && can_inject()) /mob/living/proc/get_organ_target() var/mob/shooter = src diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 4e3aaefd1eb..83897e5cbd3 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -123,7 +123,7 @@ * Sleepypens */ /obj/item/pen/sleepy - flags = OPENCONTAINER + container_type = OPENCONTAINER origin_tech = "engineering=4;syndicate=2" diff --git a/code/modules/projectiles/ammunition/ammo_casings.dm b/code/modules/projectiles/ammunition/ammo_casings.dm index f3c5db5da22..43112467f33 100644 --- a/code/modules/projectiles/ammunition/ammo_casings.dm +++ b/code/modules/projectiles/ammunition/ammo_casings.dm @@ -242,11 +242,11 @@ name = "shotgun dart" desc = "A dart for use in shotguns. Can be injected with up to 30 units of any chemical." icon_state = "cshell" + container_type = OPENCONTAINER projectile_type = /obj/item/projectile/bullet/dart /obj/item/ammo_casing/shotgun/dart/New() ..() - flags |= OPENCONTAINER create_reagents(30) /obj/item/ammo_casing/shotgun/dart/attackby() diff --git a/code/modules/projectiles/guns/dartgun.dm b/code/modules/projectiles/guns/dartgun.dm index 5c78613fbdf..7b39bfa3be8 100644 --- a/code/modules/projectiles/guns/dartgun.dm +++ b/code/modules/projectiles/guns/dartgun.dm @@ -29,7 +29,7 @@ var/obj/item/dart_cartridge/cartridge = null //Container of darts. var/max_beakers = 3 var/dart_reagent_amount = 15 - var/container_type = /obj/item/reagent_containers/glass/beaker + var/containers_type = /obj/item/reagent_containers/glass/beaker var/list/starting_chems = null /obj/item/gun/dartgun/update_icon() @@ -49,7 +49,7 @@ ..() if(starting_chems) for(var/chem in starting_chems) - var/obj/B = new container_type(src) + var/obj/B = new containers_type(src) B.reagents.add_reagent(chem, 50) beakers += B cartridge = new /obj/item/dart_cartridge(src) @@ -87,7 +87,7 @@ update_icon() return if(istype(I, /obj/item/reagent_containers/glass)) - if(!istype(I, container_type)) + if(!istype(I, containers_type)) to_chat(user, "[I] doesn't seem to fit into [src].") return if(beakers.len >= max_beakers) diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index f0816022b64..fa010a69e49 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -143,7 +143,8 @@ fire_sound = 'sound/weapons/laser.ogg' usesound = 'sound/items/Welder.ogg' toolspeed = 1 - flags = CONDUCT | OPENCONTAINER + container_type = OPENCONTAINER + flags = CONDUCT attack_verb = list("attacked", "slashed", "cut", "sliced") force = 12 sharp = 1 diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 43233df217b..4a6bf2bdcb1 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -683,6 +683,16 @@ var/const/INGEST = 2 stuff += A.id return english_list(stuff) +/datum/reagents/proc/log_list() + if(!length(reagent_list)) + return "no reagents" + var/list/data = list() + for(var/r in reagent_list) //no reagents will be left behind + var/datum/reagent/R = r + data += "[R.id] ([round(R.volume, 0.1)]u)" + //Using IDs because SOME chemicals (I'm looking at you, chlorhydrate-beer) have the same names as other chemicals. + return english_list(data) + //two helper functions to preserve data across reactions (needed for xenoarch) /datum/reagents/proc/get_data(reagent_id) for(var/datum/reagent/D in reagent_list) @@ -744,6 +754,11 @@ var/const/INGEST = 2 break return result +/datum/reagents/proc/holder_full() + if(total_volume >= maximum_volume) + return TRUE + return FALSE + /datum/reagents/Destroy() . = ..() processing_objects -= src diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index d6dc8f91806..81fed023251 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -378,7 +378,7 @@ /obj/machinery/chem_master/proc/chemical_safety_check(datum/reagents/R) var/all_safe = 1 for(var/datum/reagent/A in R.reagent_list) - if(!safe_chem_list.Find(A.id)) + if(!GLOB.safe_chem_list.Find(A.id)) all_safe = 0 return all_safe diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index aa1f8aaf385..3a5b753217f 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -30,7 +30,6 @@ if(BL.data && BL.data["viruses"]) var/list/viruses = BL.data["viruses"] return viruses[index] - return null /obj/machinery/computer/pandemic/proc/GetResistancesByIndex(index) if(beaker && beaker.reagents) @@ -40,13 +39,11 @@ if(BL.data && BL.data["resistances"]) var/list/resistances = BL.data["resistances"] return resistances[index] - return null /obj/machinery/computer/pandemic/proc/GetVirusTypeByIndex(index) var/datum/disease/D = GetVirusByIndex(index) if(D) return D.GetDiseaseID() - return null /obj/machinery/computer/pandemic/proc/replicator_cooldown(waittime) wait = 1 @@ -175,7 +172,6 @@ return add_fingerprint(usr) - return //Prints a nice virus release form. Props to Urbanliner for the layout /obj/machinery/computer/pandemic/proc/print_form(var/datum/disease/advance/D, mob/living/user) @@ -319,12 +315,12 @@ popup.set_content(dat) popup.open(0) onclose(user, "pandemic") - return /obj/machinery/computer/pandemic/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/reagent_containers) && (I.flags & OPENCONTAINER)) - if(stat & (NOPOWER|BROKEN)) return + if(istype(I, /obj/item/reagent_containers) && (I.container_type & OPENCONTAINER)) + if(stat & (NOPOWER|BROKEN)) + return if(beaker) to_chat(user, "A beaker is already loaded into the machine!") return diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 5948d29e4cd..9ea55dd5af7 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -112,7 +112,7 @@ if(default_unfasten_wrench(user, I)) return - if (istype(I, /obj/item/reagent_containers) && (I.flags & OPENCONTAINER) ) + if (istype(I, /obj/item/reagent_containers) && (I.container_type & OPENCONTAINER) ) if (!beaker) if(!user.drop_item()) return 1 diff --git a/code/modules/reagents/chemistry/readme.dm b/code/modules/reagents/chemistry/readme.dm index 1fe946a10d1..6c76d0a3a0f 100644 --- a/code/modules/reagents/chemistry/readme.dm +++ b/code/modules/reagents/chemistry/readme.dm @@ -238,12 +238,4 @@ About the Tools: It simply tells us how much to transfer when 'pouring' our reagents into something else. - atom/proc/is_open_container() - Checks atom/var/flags & OPENCONTAINER. - If this returns 1 , you can use syringes, beakers etc - to manipulate the contents of this object. - If it's 0, you'll need to write your own custom reagent - transfer code since you will not be able to use the standard - tools to manipulate it. - */ \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm index 3ce9e5587cb..6ca2c4a1260 100644 --- a/code/modules/reagents/chemistry/reagents/medicine.dm +++ b/code/modules/reagents/chemistry/reagents/medicine.dm @@ -192,7 +192,7 @@ /datum/reagent/medicine/styptic_powder name = "Styptic Powder" id = "styptic_powder" - description = "Styptic (aluminium sulfate) powder helps control bleeding and heal physical wounds." + description = "Styptic (aluminum sulfate) powder helps control bleeding and heal physical wounds." reagent_state = LIQUID color = "#C8A5DC" metabolization_rate = 3 diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm index d6813ee6f61..4bc534c6d8b 100644 --- a/code/modules/reagents/chemistry/reagents/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -7,7 +7,7 @@ /datum/reagent/toxin/on_mob_life(mob/living/M) var/update_flags = STATUS_UPDATE_NONE - update_flags |= M.adjustToxLoss(2, FALSE) + update_flags |= M.adjustToxLoss(2*REAGENTS_EFFECT_MULTIPLIER, FALSE) return ..() | update_flags /datum/reagent/spider_venom diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index e3e0daee333..258bf98468d 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -61,14 +61,6 @@ /obj/item/reagent_containers/afterattack(obj/target, mob/user , flag) return -/obj/item/reagent_containers/proc/reagentlist() //Return reagents in a reagent_container, default to source - var/data - if(reagents && reagents.reagent_list && reagents.reagent_list.len) //find a reagent list if there is and check if it has entries - for(var/datum/reagent/R in reagents.reagent_list) //no reagents will be left behind - data += "[R.id]([R.volume] units); " //Using IDs because SOME chemicals(I'm looking at you, chlorhydrate-beer) have the same names as other chemicals. - return data - else return "No reagents" - /obj/item/reagent_containers/wash(mob/user, atom/source) if(is_open_container()) if(reagents.total_volume >= volume) diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index bd037c49239..37e9e2d2bc0 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -85,7 +85,7 @@ var/datum/reagent/injected = GLOB.chemical_reagents_list[reagent_ids[mode]] var/contained = injected.name var/trans = R.trans_to(M, amount_per_transfer_from_this) - add_attack_logs(M, user, "Injected with [name] containing [contained], transfered [trans] units") + add_attack_logs(user, M, "Injected with [name] containing [contained], transfered [trans] units") M.LAssailant = user to_chat(user, "[trans] units injected. [R.total_volume] units remaining.") return diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index 22332bd4103..337b78882cf 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -9,7 +9,7 @@ item_state = "atoxinbottle" amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30) - flags = OPENCONTAINER + container_type = OPENCONTAINER volume = 30 /obj/item/reagent_containers/glass/bottle/on_reagent_change() diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index d20ef6f82ee..69030fafa74 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -11,7 +11,7 @@ amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30,50) volume = 50 - flags = OPENCONTAINER + container_type = OPENCONTAINER var/label_text = "" // the fucking asshole who designed this can go die in a fire - Iamgoofball @@ -59,10 +59,10 @@ ..() if(is_open_container()) to_chat(usr, "You put the lid on [src].") - flags ^= OPENCONTAINER + container_type ^= REFILLABLE | DRAINABLE else to_chat(usr, "You take the lid off [src].") - flags |= OPENCONTAINER + container_type |= REFILLABLE | DRAINABLE update_icon() /obj/item/reagent_containers/glass/afterattack(obj/target, mob/user, proximity) @@ -262,7 +262,7 @@ volume = 100 amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30,50,100) - flags = OPENCONTAINER + container_type = OPENCONTAINER /obj/item/reagent_containers/glass/beaker/vial name = "vial" @@ -272,7 +272,7 @@ volume = 25 amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25) - flags = OPENCONTAINER + container_type = OPENCONTAINER can_assembly = 0 /obj/item/reagent_containers/glass/beaker/drugs @@ -282,7 +282,7 @@ amount_per_transfer_from_this = 2 possible_transfer_amounts = 2 volume = 10 - flags = OPENCONTAINER + container_type = OPENCONTAINER can_assembly = 0 /obj/item/reagent_containers/glass/beaker/noreact @@ -293,7 +293,7 @@ volume = 50 amount_per_transfer_from_this = 10 origin_tech = "materials=2;engineering=3;plasmatech=3" - flags = OPENCONTAINER + container_type = OPENCONTAINER /obj/item/reagent_containers/glass/beaker/noreact/New() ..() @@ -307,7 +307,7 @@ volume = 300 amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30,50,100,300) - flags = OPENCONTAINER + container_type = OPENCONTAINER origin_tech = "bluespace=5;materials=4;plasmatech=4" /obj/item/reagent_containers/glass/beaker/cryoxadone @@ -337,7 +337,7 @@ volume = 120 armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) slot_flags = SLOT_HEAD - flags = OPENCONTAINER + container_type = OPENCONTAINER /obj/item/reagent_containers/glass/bucket/equipped(mob/user, slot) ..() diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index ced02f2e48f..9bb3e41e4ec 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -11,7 +11,7 @@ amount_per_transfer_from_this = 5 volume = 30 possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30) - flags = OPENCONTAINER + container_type = OPENCONTAINER slot_flags = SLOT_BELT var/ignore_flags = FALSE var/emagged = FALSE @@ -52,7 +52,7 @@ if(safety_hypo && !emagged) var/found_forbidden_reagent = FALSE for(var/datum/reagent/R in reagents.reagent_list) - if(!safe_chem_list.Find(R.id)) + if(!GLOB.safe_chem_list.Find(R.id)) reagents.del_reagent(R.id) found_forbidden_reagent = TRUE if(found_forbidden_reagent) diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 02ab4408acb..7c0823c2497 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -4,7 +4,8 @@ icon = 'icons/obj/janitor.dmi' icon_state = "cleaner" item_state = "cleaner" - flags = OPENCONTAINER | NOBLUDGEON + flags = NOBLUDGEON + container_type = OPENCONTAINER slot_flags = SLOT_BELT throwforce = 0 w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 38478abd0e7..654dff53b5e 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -16,6 +16,7 @@ volume = 15 w_class = WEIGHT_CLASS_TINY sharp = 1 + container_type = TRANSPARENT var/busy = 0 var/mode = SYRINGE_DRAW var/projectile_type = /obj/item/projectile/bullet/dart/syringe @@ -78,7 +79,7 @@ switch(mode) if(SYRINGE_DRAW) - if(reagents.total_volume >= reagents.maximum_volume) + if(reagents.holder_full()) to_chat(user, "The syringe is full.") return @@ -91,7 +92,7 @@ if(!do_mob(user, target)) busy = 0 return - if(reagents.total_volume >= reagents.maximum_volume) + if(reagents.holder_full()) return busy = 0 if(L.transfer_blood_to(src, drawn_amount)) @@ -104,14 +105,14 @@ to_chat(user, "[target] is empty!") return - if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers) && !istype(target,/obj/item/slime_extract)) + if(!target.is_drawable()) to_chat(user, "You cannot directly remove reagents from [target]!") return var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares? to_chat(user, "You fill [src] with [trans] units of the solution.") - if(reagents.total_volume >= reagents.maximum_volume) + if(reagents.holder_full()) mode=!mode update_icon() @@ -120,7 +121,7 @@ to_chat(user, "[src] is empty.") return - if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/reagent_containers/food) && !istype(target, /obj/item/slime_extract) && !istype(target, /obj/item/clothing/mask/cigarette) && !istype(target, /obj/item/storage/fancy/cigarettes)) + if(!L && !target.is_injectable()) to_chat(user, "You cannot directly fill [target]!") return if(target.reagents.total_volume >= target.reagents.maximum_volume) diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index bcbcad6bc98..a90dd80ac59 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -6,28 +6,22 @@ density = 1 anchored = 0 pressure_resistance = 2*ONE_ATMOSPHERE + container_type = DRAINABLE | AMOUNT_VISIBLE var/tank_volume = 1000 //In units, how much the dispenser can hold var/reagent_id = "water" //The ID of the reagent that the dispenser uses var/lastrigger = "" // The last person to rig this fuel tank - Stored with the object. Only the last person matter for investigation -/obj/structure/reagent_dispensers/attackby(obj/item/W, mob/user, params) - return +/obj/structure/reagent_dispensers/attackby(obj/item/I, mob/user, params) + . = ..() + if(I.is_refillable()) + return FALSE //so we can refill them via their afterattack. /obj/structure/reagent_dispensers/New() create_reagents(tank_volume) reagents.add_reagent(reagent_id, tank_volume) ..() -/obj/structure/reagent_dispensers/examine(mob/user) - if(!..(user, 2)) - return - if(reagents.total_volume) - to_chat(user, "It has [reagents.total_volume] units left.") - else - to_chat(user, "It's empty.") - - /obj/structure/reagent_dispensers/proc/boom() visible_message("[src] ruptures!") chem_splash(loc, 5, list(reagents)) diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index ce728a4fde3..57a0eaef7da 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -8,7 +8,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). name = "Circuit Imprinter" desc = "Manufactures circuit boards for the construction of machines." icon_state = "circuit_imprinter" - flags = OPENCONTAINER + container_type = OPENCONTAINER var/efficiency_coeff diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 0fa843cb8ae..a441dff00b3 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -11,7 +11,7 @@ Note: Must be placed west/left of and R&D console to function. name = "Protolathe" desc = "Converts raw materials into useful objects." icon_state = "protolathe" - flags = OPENCONTAINER + container_type = OPENCONTAINER var/efficiency_coeff diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 56ef19b7c1a..9ad049c604b 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -8,6 +8,7 @@ icon_state = "grey slime extract" force = 1 w_class = WEIGHT_CLASS_TINY + container_type = INJECTABLE | DRAWABLE throwforce = 0 throw_speed = 3 throw_range = 6 diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index 88551f49096..4a587ac1253 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -52,7 +52,7 @@ // After docking // /atom/proc/postDock(obj/docking_port/S1) if(smooth) - smooth_icon(src) + queue_smooth(src) /obj/machinery/door/airlock/postDock(obj/docking_port/stationary/S1) . = ..() diff --git a/code/modules/shuttle/ripple.dm b/code/modules/shuttle/ripple.dm index ef3b18d2e39..3d3b52d9023 100644 --- a/code/modules/shuttle/ripple.dm +++ b/code/modules/shuttle/ripple.dm @@ -15,5 +15,5 @@ /obj/effect/temp_visual/ripple/New() . = ..() - smooth_icon(src) + queue_smooth(src) animate(src, alpha=255, time=SHUTTLE_RIPPLE_TIME) diff --git a/code/modules/spacepods/spacepod.dm b/code/modules/spacepods/spacepod.dm index dffb6da79b9..7f5bcda9614 100644 --- a/code/modules/spacepods/spacepod.dm +++ b/code/modules/spacepods/spacepod.dm @@ -233,12 +233,19 @@ if(!health) spawn(0) message_to_riders("Critical damage to the vessel detected, core explosion imminent!") - for(var/i = 10, i >= 0; --i) - message_to_riders("[i]") - if(i == 0) - explosion(loc, 2, 4, 8) - qdel(src) + for(var/i in 1 to 3) + var/count = 3 + message_to_riders("[count]") + count-- sleep(10) + if(LAZYLEN(pilot) || LAZYLEN(passengers)) + for(var/M in passengers + pilot) + var/mob/living/L = M + L.adjustBruteLoss(300) + explosion(loc, 0, 0, 2) + robogibs(loc) + robogibs(loc) + qdel(src) update_icons() diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm index bf6f085275b..ba3112b6392 100644 --- a/code/modules/surgery/organs/liver.dm +++ b/code/modules/surgery/organs/liver.dm @@ -46,7 +46,7 @@ owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) // Can't cope with toxins at all - for(var/toxin in list("toxin", "plasma", "sacid", "facid", "cyanide", "amanitin", "carpotoxin")) + for(var/toxin in GLOB.liver_toxins) if(owner.reagents.has_reagent(toxin)) owner.adjustToxLoss(0.3 * PROCESS_ACCURACY) diff --git a/html/changelog.html b/html/changelog.html index 2b13f2dbd94..a031279a516 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,15 +56,65 @@ -->
+

21 October 2018

+

Alonefromhell updated:

+ +

Desolate updated:

+ +

Farie82 updated:

+ +

Purpose updated:

+ +

Triiodine updated:

+ +

Warior4356 updated:

+ +

variableundefined updated:

+ +

20 October 2018

+

Birdtalon updated:

+

Dapocalypse updated:

+

Farie82 updated:

+ +

Fox McCloud updated:

+

Purpose updated:

+

craftxbox updated:

+

uc_guy updated:

-
How to open your Scarborough Arms - 2 tumbler safe
+
How to open your Scarborough Arms - 2 tumbler safe.
-
1. Turn the dial to the right past the first number twice
-
2. Stop at the first number
-
3. Turn the dial to the left past the second number once
-
4. Stop at the second number
-
5. Turn to the right until the dial stops
-
6. Open the safe
+
1. Turn the dial right two full turns.
+
2. Keep turning right and stop on first number.
+
3. Turn the dial left one full turn.
+
4. Turn left to second number. Do not go past it.
+
5. Turn the dial right until it stops.
+
6. Open the safe.
-
To lock fully, turn the dial to the left for three rotations
+
To lock fully, turn the dial to the left for three rotations.
-{{/if}} \ No newline at end of file +{{/if}} diff --git a/paradise.dme b/paradise.dme index a20b8d43042..d35fedc2589 100644 --- a/paradise.dme +++ b/paradise.dme @@ -203,6 +203,7 @@ #include "code\controllers\subsystem\atoms.dm" #include "code\controllers\subsystem\fires.dm" #include "code\controllers\subsystem\garbage.dm" +#include "code\controllers\subsystem\icon_smooth.dm" #include "code\controllers\subsystem\machinery.dm" #include "code\controllers\subsystem\mobs.dm" #include "code\controllers\subsystem\nano_mob_hunter.dm"