diff --git a/auxmos.dll b/auxmos.dll index 54fb0c6c98..be117d82da 100644 Binary files a/auxmos.dll and b/auxmos.dll differ diff --git a/auxmos.pdb b/auxmos.pdb index 031e66d103..2552298fdd 100644 Binary files a/auxmos.pdb and b/auxmos.pdb differ diff --git a/code/__DEFINES/_flags/obj_flags.dm b/code/__DEFINES/_flags/obj_flags.dm index e48146a1d0..ac772c6e8e 100644 --- a/code/__DEFINES/_flags/obj_flags.dm +++ b/code/__DEFINES/_flags/obj_flags.dm @@ -15,6 +15,7 @@ #define BLOCK_Z_IN_UP (1<<12) // Should this object block z uprise from below? #define SHOVABLE_ONTO (1<<13)//called on turf.shove_act() to consider whether an object should have a niche effect (defined in their own shove_act()) when someone is pushed onto it, or do a sanity CanPass() check. #define EXAMINE_SKIP (1<<14) /// Makes the Examine proc not read out this item. +#define IN_STORAGE (1<<15) //is this item in the storage item, such as backpack? used for tooltips /// Integrity defines for clothing (not flags but close enough) #define CLOTHING_PRISTINE 0 // We have no damage on the clothing diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index 67d16e6687..1c6b7c21d4 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -155,10 +155,10 @@ //LAVALAND #define LAVALAND_EQUIPMENT_EFFECT_PRESSURE 50 //what pressure you have to be under to increase the effect of equipment meant for lavaland -#define LAVALAND_DEFAULT_ATMOS "o2=14;n2=23;TEMP=300" +#define LAVALAND_DEFAULT_ATMOS "LAVALAND_ATMOS" //SNOSTATION -#define ICEMOON_DEFAULT_ATMOS "o2=17;n2=63;TEMP=180" +#define ICEMOON_DEFAULT_ATMOS "ICEMOON_ATMOS" //ATMOSIA GAS MONITOR TAGS #define ATMOS_GAS_MONITOR_INPUT_O2 "o2_in" diff --git a/code/__DEFINES/footsteps.dm b/code/__DEFINES/footsteps.dm index 215e287adf..cc0c6547b0 100644 --- a/code/__DEFINES/footsteps.dm +++ b/code/__DEFINES/footsteps.dm @@ -8,6 +8,7 @@ #define FOOTSTEP_LAVA "lava" #define FOOTSTEP_MEAT "meat" #define FOOTSTEP_RUST "rust" +#define FOOTSTEP_CATWALK "catwalk" //barefoot sounds #define FOOTSTEP_WOOD_BAREFOOT "woodbarefoot" @@ -94,6 +95,12 @@ GLOBAL_LIST_INIT(footstep, list( 'sound/effects/footstep/lava3.ogg'), 100, 0), FOOTSTEP_MEAT = list(list( 'sound/effects/meatslap.ogg'), 100, 0), + FOOTSTEP_CATWALK = list(list( + 'sound/effects/footstep/catwalk1.ogg', + 'sound/effects/footstep/catwalk2.ogg', + 'sound/effects/footstep/catwalk3.ogg', + 'sound/effects/footstep/catwalk4.ogg', + 'sound/effects/footstep/catwalk5.ogg'), 100, 1), FOOTSTEP_RUST = list(list( 'sound/effects/footstep/rustystep1.ogg'), 100, 0) )) diff --git a/code/__DEFINES/layers_planes.dm b/code/__DEFINES/layers_planes.dm index ea7b1b2e0a..c7be89721e 100644 --- a/code/__DEFINES/layers_planes.dm +++ b/code/__DEFINES/layers_planes.dm @@ -64,8 +64,9 @@ #define GAS_PIPE_VISIBLE_LAYER 2.47 #define GAS_FILTER_LAYER 2.48 #define GAS_PUMP_LAYER 2.49 - #define LOW_OBJ_LAYER 2.5 +///catwalk overlay of /turf/open/floor/plating/plating_catwalk +#define CATWALK_LAYER 2.51 #define LOW_SIGIL_LAYER 2.52 #define SIGIL_LAYER 2.54 #define HIGH_SIGIL_LAYER 2.56 diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 850a2b0f39..6a63ced634 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -347,3 +347,7 @@ // / Breathing types. Lungs can access either by these or by a string, which will be considered a gas ID. #define BREATH_OXY /datum/breathing_class/oxygen #define BREATH_PLASMA /datum/breathing_class/plasma + +//Gremlins +#define NPC_TAMPER_ACT_FORGET 1 //Don't try to tamper with this again +#define NPC_TAMPER_ACT_NOMSG 2 //Don't produce a visible message diff --git a/code/__HELPERS/markov.dm b/code/__HELPERS/markov.dm new file mode 100644 index 0000000000..7e195f8b9c --- /dev/null +++ b/code/__HELPERS/markov.dm @@ -0,0 +1,61 @@ +#define MAXIMUM_MARKOV_LENGTH 25000 + +/proc/markov_chain(var/text, var/order = 4, var/length = 250) + if(!text || order < 0 || order > 20 || length < 1 || length > MAXIMUM_MARKOV_LENGTH) + return + + var/table = markov_table(text, order) + var/markov = markov_text(length, table, order) + return markov + +/proc/markov_table(var/text, var/look_forward = 4) + if(!text) + return + var/list/table = list() + + for(var/i = 1, i <= length(text), i++) + var/char = copytext(text, i, look_forward+i) + if(!table[char]) + table[char] = list() + + for(var/i = 1, i <= (length(text) - look_forward), i++) + var/char_index = copytext(text, i, look_forward+i) + var/char_count = copytext(text, i+look_forward, (look_forward*2)+i) + + if(table[char_index][char_count]) + table[char_index][char_count]++ + else + table[char_index][char_count] = 1 + + return table + +/proc/markov_text(var/length = 250, var/table, var/look_forward = 4) + if(!table) + return + var/char = pick(table) + var/o = char + + for(var/i = 0, i <= (length / look_forward), i++) + var/newchar = markov_weighted_char(table[char]) + + if(newchar) + char = newchar + o += "[newchar]" + else + char = pick(table) + + return o + +/proc/markov_weighted_char(var/list/array) + if(!array || !array.len) + return + + var/total = 0 + for(var/i in array) + total += array[i] + var/r = rand(1, total) + for(var/i in array) + var/weight = array[i] + if(r <= weight) + return i + r -= weight diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 781fa38b94..c8e5b72f26 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -71,6 +71,7 @@ GLOBAL_LIST_INIT(bitfields, list( "DROPDEL" = DROPDEL, "NOBLUDGEON" = NOBLUDGEON, "ABSTRACT" = ABSTRACT, + "IN_STORAGE" = IN_STORAGE, "ITEM_CAN_BLOCK" = ITEM_CAN_BLOCK, "ITEM_CAN_PARRY" = ITEM_CAN_PARRY ), diff --git a/code/_globalvars/lists/maintenance_loot.dm b/code/_globalvars/lists/maintenance_loot.dm index daa4f5879d..b41b7356a8 100644 --- a/code/_globalvars/lists/maintenance_loot.dm +++ b/code/_globalvars/lists/maintenance_loot.dm @@ -112,7 +112,6 @@ GLOBAL_LIST_INIT(maintenance_loot, list( /obj/item/storage/box/marshmallow = 2, /obj/item/clothing/gloves/tackler/offbrand = 1, /obj/item/stack/sticky_tape = 1, - /obj/effect/spawner/lootdrop/grille_or_trash = 15, "" = 3 )) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index bfbdce41fd..56db868a21 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -141,11 +141,29 @@ /atom/movable/screen/inventory/MouseEntered() ..() add_overlays() + //Apply the outline affect + add_stored_outline() /atom/movable/screen/inventory/MouseExited() ..() cut_overlay(object_overlays) object_overlays.Cut() + remove_stored_outline() + +/atom/movable/screen/inventory/proc/add_stored_outline() + if(hud?.mymob && slot_id) + var/obj/item/inv_item = hud.mymob.get_item_by_slot(slot_id) + if(inv_item) + if(hud?.mymob.incapacitated()) + inv_item.apply_outline(COLOR_RED_GRAY) + else + inv_item.apply_outline() + +/atom/movable/screen/inventory/proc/remove_stored_outline() + if(hud?.mymob && slot_id) + var/obj/item/inv_item = hud.mymob.get_item_by_slot(slot_id) + if(inv_item) + inv_item.remove_outline() /atom/movable/screen/inventory/update_icon_state() if(!icon_empty) diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm index 583cf98259..260a4c1b29 100644 --- a/code/controllers/subsystem/air.dm +++ b/code/controllers/subsystem/air.dm @@ -37,7 +37,8 @@ SUBSYSTEM_DEF(air) //atmos singletons var/list/gas_reactions = list() - + var/list/atmos_gen + var/list/planetary = list() //auxmos already caches static planetary mixes but could be convenient to do so here too //Special functions lists var/list/turf/open/high_pressure_delta = list() @@ -61,6 +62,8 @@ SUBSYSTEM_DEF(air) var/share_max_steps = 3 // Excited group processing will try to equalize groups with total pressure difference less than this amount. var/excited_group_pressure_goal = 1 + // If this is set to 0, monstermos won't process planet atmos + var/planet_equalize_enabled = 0 /datum/controller/subsystem/air/stat_entry(msg) msg += "C:{" @@ -473,6 +476,20 @@ SUBSYSTEM_DEF(air) return pipe_init_dirs_cache[type]["[dir]"] +/datum/controller/subsystem/air/proc/generate_atmos() + atmos_gen = list() + for(var/T in subtypesof(/datum/atmosphere)) + var/datum/atmosphere/atmostype = T + atmos_gen[initial(atmostype.id)] = new atmostype + +/datum/controller/subsystem/air/proc/preprocess_gas_string(gas_string) + if(!atmos_gen) + generate_atmos() + if(!atmos_gen[gas_string]) + return gas_string + var/datum/atmosphere/mix = atmos_gen[gas_string] + return mix.gas_string + #undef SSAIR_PIPENETS #undef SSAIR_ATMOSMACHINERY #undef SSAIR_EXCITEDGROUPS diff --git a/code/datums/atmosphere/_atmosphere.dm b/code/datums/atmosphere/_atmosphere.dm new file mode 100644 index 0000000000..5323b070cd --- /dev/null +++ b/code/datums/atmosphere/_atmosphere.dm @@ -0,0 +1,60 @@ +/datum/atmosphere + var/gas_string + var/id + + var/list/base_gases // A list of gases to always have + var/list/normal_gases // A list of allowed gases:base_amount + var/list/restricted_gases // A list of allowed gases like normal_gases but each can only be selected a maximum of one time + var/restricted_chance = 10 // Chance per iteration to take from restricted gases + + var/minimum_pressure + var/maximum_pressure + + var/minimum_temp + var/maximum_temp + +/datum/atmosphere/New() + generate_gas_string() + +/datum/atmosphere/proc/generate_gas_string() + var/list/spicy_gas = restricted_gases.Copy() + var/target_pressure = rand(minimum_pressure, maximum_pressure) + var/pressure_scale = target_pressure / maximum_pressure + + // First let's set up the gasmix and base gases for this template + // We make the string from a gasmix in this proc because gases need to calculate their pressure + var/datum/gas_mixture/gasmix = new + gasmix.set_temperature(rand(minimum_temp, maximum_temp)) + for(var/i in base_gases) + gasmix.set_moles(i, base_gases[i]) + + // Now let the random choices begin + var/gastype + var/amount + while(gasmix.return_pressure() < target_pressure) + if(!prob(restricted_chance) || !length(spicy_gas)) + gastype = pick(normal_gases) + amount = normal_gases[gastype] + else + gastype = pick(spicy_gas) + amount = spicy_gas[gastype] + spicy_gas -= gastype //You can only pick each restricted gas once + + amount *= rand(50, 200) / 100 // Randomly modifes the amount from half to double the base for some variety + amount *= pressure_scale // If we pick a really small target pressure we want roughly the same mix but less of it all + amount = CEILING(amount, 0.1) + + gasmix.adjust_moles(gastype, amount) + + // That last one put us over the limit, remove some of it + if(gasmix.return_pressure() > target_pressure) + var/moles_to_remove = (1 - target_pressure / gasmix.return_pressure()) * gasmix.total_moles() + gasmix.adjust_moles(gastype, -moles_to_remove) + gasmix.set_moles(gastype, FLOOR(gasmix.get_moles(gastype), 0.1)) + + // Now finally lets make that string + var/list/gas_string_builder = list() + for(var/id in gasmix.get_gases()) + gas_string_builder += "[id]=[gasmix.get_moles(id)]" + gas_string_builder += "TEMP=[gasmix.return_temperature()]" + gas_string = gas_string_builder.Join(";") diff --git a/code/datums/atmosphere/planetary.dm b/code/datums/atmosphere/planetary.dm new file mode 100644 index 0000000000..248873562f --- /dev/null +++ b/code/datums/atmosphere/planetary.dm @@ -0,0 +1,52 @@ +// Atmos types used for planetary airs +/datum/atmosphere/lavaland + id = LAVALAND_DEFAULT_ATMOS + + base_gases = list( + GAS_O2=5, + GAS_N2=10, + ) + normal_gases = list( + GAS_O2=10, + GAS_N2=10, + GAS_CO2=10, + ) + restricted_gases = list( + GAS_PLASMA=0.1, + GAS_BZ=1.2, + GAS_METHANE=1.0, + GAS_METHYL_BROMIDE=0.1, + ) + restricted_chance = 30 + + minimum_pressure = HAZARD_LOW_PRESSURE + 10 + maximum_pressure = LAVALAND_EQUIPMENT_EFFECT_PRESSURE - 1 + + minimum_temp = BODYTEMP_COLD_DAMAGE_LIMIT + 1 + maximum_temp = 350 + +/datum/atmosphere/icemoon + id = ICEMOON_DEFAULT_ATMOS + + base_gases = list( + GAS_O2=5, + GAS_N2=10, + ) + normal_gases = list( + GAS_O2=10, + GAS_N2=10, + GAS_CO2=10, + ) + restricted_gases = list( + GAS_PLASMA=0.1, + GAS_METHANE=1.0, + GAS_METHYL_BROMIDE=0.1, + ) + restricted_chance = 10 + + minimum_pressure = HAZARD_LOW_PRESSURE + 10 + maximum_pressure = LAVALAND_EQUIPMENT_EFFECT_PRESSURE - 1 + + minimum_temp = 180 + maximum_temp = 180 + diff --git a/code/datums/components/crafting/glassware/glassware.dm b/code/datums/components/crafting/glassware/glassware.dm index 88f52d6b01..50137733ee 100644 --- a/code/datums/components/crafting/glassware/glassware.dm +++ b/code/datums/components/crafting/glassware/glassware.dm @@ -1,8 +1,8 @@ //This file is for glass working types of things! /obj/item/glasswork - name = "This is a bug report it!" - desc = "Failer to code. Contact your local bug remover..." + name = "this is a bug!" + desc = "Uh oh, the coders did a fucky wucky! Contact your local code monkey and tell them about this!" icon = 'icons/obj/glassworks.dmi' w_class = WEIGHT_CLASS_SMALL force = 1 @@ -11,45 +11,45 @@ tool_behaviour = null /obj/item/glasswork/glasskit - name = "Glass working tools" - desc = "A lovely belt of most the tools you will need to shape, mold, and refine glass into more advanced shapes." + name = "glasswork tools" + desc = "A set of most the tools you will need to shape, mold, and refine glass into more advanced shapes." icon_state = "glass_tools" tool_behaviour = TOOL_GLASS_CUT //Cutting takes 20 ticks /obj/item/glasswork/blowing_rod - name = "Glass working blow rod" - desc = "A hollow metal stick made for glass blowing." + name = "glassblowing rod" + desc = "A hollow metal rod made for blowing glass." icon_state = "blowing_rods_unused" tool_behaviour = TOOL_BLOW //Rods take 5 ticks /obj/item/glasswork/glass_base //Welding takes 30 ticks - name = "Glass fodder sheet" - desc = "A sheet of glass set aside for glass working" + name = "glass fodder sheet" + desc = "A sheet of glass set aside for glass working." icon_state = "glass_base" var/next_step = null var/rod = /obj/item/glasswork/blowing_rod /obj/item/tea_plate - name = "Tea Plate" + name = "tea saucer" desc = "A polished plate for a tea cup. How fancy!" icon = 'icons/obj/glass_ware.dmi' icon_state = "tea_plate" /obj/item/tea_cup - name = "Tea Cup" - desc = "A glass cup made for fake tea!" + name = "tea cup" + desc = "A glass cup made for sipping tea!" icon = 'icons/obj/glass_ware.dmi' icon_state = "tea_plate" //////////////////////Chem Disk///////////////////// //Two Steps // //Sells for 300 cr, takes 10 glass shets // -//Usefull for chem spliting // +//Useful for chem spliting // //////////////////////////////////////////////////// /obj/item/glasswork/glass_base/dish - name = "Glass fodder sheet" - desc = "A set of glass sheets set aside for glass working, this one is ideal for a small glass dish. Needs to be cut with some tools." + name = "glass fodder sheet (dish)" + desc = "A set of glass sheets set aside for glass working. This one is ideal for a small glass dish. It needs to be cut with some glassworking tools." next_step = /obj/item/glasswork/glass_base/dish_part1 /obj/item/glasswork/glass_base/dish/attackby(obj/item/I, mob/user, params) @@ -60,8 +60,8 @@ qdel(src) /obj/item/glasswork/glass_base/dish_part1 - name = "Half chem dish sheet" - desc = "A sheet of glass cut in half, looks like it still needs some more cutting down" + name = "half glass fodder sheet (dish)" + desc = "A sheet of glass cut in half. It looks like it still needs some more cutting down." icon_state = "glass_base_half" next_step = /obj/item/reagent_containers/glass/beaker/glass_dish @@ -75,12 +75,12 @@ //////////////////////Lens////////////////////////// //Six Steps // //Sells for 1600 cr, takes 15 glass shets // -//Usefull for selling and later crafting // +//Useful for selling and later crafting // //////////////////////////////////////////////////// /obj/item/glasswork/glass_base/glass_lens - name = "Glass fodder sheet" - desc = "A set of glass sheets set aside for glass working, this one is ideal for a small glass lens. Needs to be cut with some tools." + name = "glass fodder sheet (lens)" + desc = "A set of glass sheets set aside for glass working. This one is ideal for a glass lens. It needs to be cut with some glassworking tools." next_step = /obj/item/glasswork/glass_base/glass_lens_part1 /obj/item/glasswork/glass_base/glass_lens/attackby(obj/item/I, mob/user, params) @@ -91,8 +91,8 @@ qdel(src) /obj/item/glasswork/glass_base/glass_lens_part1 - name = "Glass fodder sheet" - desc = "Cut glass ready to be heated. Needs to be heated with some tools." + name = "half glass fodder sheet (lens)" + desc = "Cut glass ready to be heated with something very hot." icon_state = "glass_base_half" next_step = /obj/item/glasswork/glass_base/glass_lens_part2 @@ -104,8 +104,8 @@ qdel(src) /obj/item/glasswork/glass_base/glass_lens_part2 - name = "Glass fodder sheet" - desc = "Cut glass that has been heated. Needs to be heated more with some tools." + name = "heated half glass fodder sheet (lens)" + desc = "Cut glass that has been heated once already and is ready to be heated again." icon_state = "glass_base_heat" next_step = /obj/item/glasswork/glass_base/glass_lens_part3 @@ -117,8 +117,8 @@ qdel(src) /obj/item/glasswork/glass_base/glass_lens_part3 - name = "Glass fodder sheet" - desc = "Cut glass that has been heated into a blob of hot glass. Needs to be placed onto a blow tube." + name = "heated glass blob (lens)" + desc = "Cut glass that has been heated into a blob. It needs to be attached to a glassblowing rod." icon_state = "glass_base_molding" next_step = /obj/item/glasswork/glass_base/glass_lens_part4 @@ -131,8 +131,8 @@ qdel(I) /obj/item/glasswork/glass_base/glass_lens_part4 - name = "Glass fodder sheet" - desc = "Cut glass that has been heated into a blob of hot glass. Needs to be cut off onto a blow tube." + name = "glassblowing rod (lens)" + desc = "A hollow metal rod made for blowing glass. There is a blob of shapen glass at the end of it that needs to be cut off with some glassworking tools." icon_state = "blowing_rods_inuse" next_step = /obj/item/glasswork/glass_base/glass_lens_part5 @@ -145,8 +145,8 @@ qdel(src) /obj/item/glasswork/glass_base/glass_lens_part5 - name = "Unpolished glass lens" - desc = "A small unpolished glass lens. Could be polished with some cloth." + name = "unpolished glass lens" + desc = "An unpolished glass lens. It needs to be polished with some dry cloth." icon = 'icons/obj/glass_ware.dmi' icon_state = "glass_optics" next_step = /obj/item/glasswork/glass_base/glass_lens_part6 @@ -159,8 +159,8 @@ qdel(src) /obj/item/glasswork/glass_base/glass_lens_part6 - name = "Unrefined glass lens" - desc = "A small polished glass lens. Just needs to be refined with some sandstone." + name = "unrefined glass lens" + desc = "A polished glass lens. It needs to be refined with some sandstone." icon = 'icons/obj/glass_ware.dmi' icon_state = "glass_optics" next_step = /obj/item/glasswork/glass_base/lens @@ -174,12 +174,12 @@ //////////////////////Spouty Flask////////////////// //Four Steps // //Sells for 1200 cr, takes 20 glass shets // -//Usefull for selling and chemical things // +//Useful for selling and chemical things // //////////////////////////////////////////////////// /obj/item/glasswork/glass_base/spouty - name = "Glass fodder sheet" - desc = "A set of glass sheets set aside for glass working, this one is ideal for a spout beaker. Needs to be cut with some tools." + name = "Glass fodder sheet (spout)" + desc = "A set of glass sheets set aside for glass working. This one is ideal for a spouty flask. It needs to heated with something very hot." next_step = /obj/item/glasswork/glass_base/spouty_part2 /obj/item/glasswork/glass_base/spouty/attackby(obj/item/I, mob/user, params) @@ -190,8 +190,8 @@ qdel(src) /obj/item/glasswork/glass_base/spouty_part2 - name = "Glass fodder sheet" - desc = "Cut glass that has been heated. Needs to be heated with some tools." + name = "glass fodder sheet (spout)" + desc = "Cut glass ready to be heated with something very hot." icon_state = "glass_base_half" next_step = /obj/item/glasswork/glass_base/spouty_part3 @@ -203,8 +203,8 @@ qdel(src) /obj/item/glasswork/glass_base/spouty_part3 - name = "Glass fodder sheet" - desc = "Cut glass that has been heated into a blob of hot glass. Needs to be placed onto a blow tube." + name = "heated glass blob (spout)" + desc = "Cut glass that has been heated into a blob. It needs to be attached to a glassblowing rod." icon_state = "glass_base_molding" next_step = /obj/item/glasswork/glass_base/spouty_part4 @@ -217,8 +217,8 @@ qdel(I) /obj/item/glasswork/glass_base/spouty_part4 - name = "Glass fodder sheet" - desc = "Cut glass that has been heated into a blob of hot glass. Needs to be cut off onto a blow tube." + name = "glassblowing rod (spout)" + desc = "A hollow metal rod made for blowing glass. There is a blob of shapen glass at the end of it that needs to be cut off with some glassworking tools." icon_state = "blowing_rods_inuse" next_step = /obj/item/reagent_containers/glass/beaker/flask/spouty @@ -233,12 +233,12 @@ //////////////////////Small Bulb Flask////////////// //Two Steps // //Sells for 600 cr, takes 5 glass shets // -//Usefull for selling and chemical things // +//Useful for selling and chemical things // //////////////////////////////////////////////////// /obj/item/glasswork/glass_base/flask_small - name = "Glass fodder sheet" - desc = "A set of glass sheets set aside for glass working, this one is ideal for a small flask. Needs to be heated with some tools." + name = "glass fodder sheet (small flask)" + desc = "A set of glass sheets set aside for glass working. This one is ideal for a small flask. It needs to heated with something very hot." next_step = /obj/item/glasswork/glass_base/flask_small_part1 /obj/item/glasswork/glass_base/flask_small/attackby(obj/item/I, mob/user, params) @@ -249,8 +249,8 @@ qdel(src) /obj/item/glasswork/glass_base/flask_small_part1 - name = "Metled glass" - desc = "A blob of metled glass, this one is ideal for a small flask. Needs to be blown with some tools." + name = "heated glass blob (small flask)" + desc = "Glass that has been heated into a blob. It needs to be attached to a glassblowing rod." icon_state = "glass_base_molding" next_step = /obj/item/glasswork/glass_base/flask_small_part2 @@ -263,8 +263,8 @@ qdel(I) /obj/item/glasswork/glass_base/flask_small_part2 - name = "Metled glass" - desc = "A blob of metled glass on the end of a blowing rod. Needs to be cut off with some tools." + name = "glassblowing rod (small flask)" + desc = "A hollow metal rod made for blowing glass. There is a blob of shapen glass at the end of it that needs to be cut off with some glassworking tools." icon_state = "blowing_rods_inuse" next_step = /obj/item/reagent_containers/glass/beaker/flask @@ -279,12 +279,12 @@ //////////////////////Large Bulb Flask////////////// //Two Steps // //Sells for 1000 cr, takes 15 glass shets // -//Usefull for selling and chemical things // +//Useful for selling and chemical things // //////////////////////////////////////////////////// /obj/item/glasswork/glass_base/flask_large - name = "Glass fodder sheet" - desc = "A set of glass sheets set aside for glass working, this one is ideal for a large flask. Needs to be heated with some tools." + name = "glass fodder sheet (large flask)" + desc = "A set of glass sheets set aside for glass working. This one is ideal for a large flask. It needs to heated with something very hot." next_step = /obj/item/glasswork/glass_base/flask_large_part1 /obj/item/glasswork/glass_base/flask_large/attackby(obj/item/I, mob/user, params) @@ -295,8 +295,8 @@ qdel(src) /obj/item/glasswork/glass_base/flask_large_part1 - name = "Metled glass" - desc = "A blob of metled glass, this one is ideal for a large flask. Needs to be blown with some tools." + name = "heated glass blob (large flask)" + desc = "Glass that has been heated into a blob. It needs to be attached to a glassblowing rod." icon_state = "glass_base_molding" next_step = /obj/item/glasswork/glass_base/flask_large_part2 @@ -309,8 +309,8 @@ qdel(I) /obj/item/glasswork/glass_base/flask_large_part2 - name = "Metled glass" - desc = "A blob of metled glass on the end of a blowing rod. Needs to be cut off with some tools." + name = "glassblowing rod (small flask)" + desc = "A hollow metal rod made for blowing glass. There is a blob of shapen glass at the end of it that needs to be cut off with some glassworking tools." icon_state = "blowing_rods_inuse" next_step = /obj/item/reagent_containers/glass/beaker/flask/large @@ -325,12 +325,12 @@ //////////////////////Tea Plates//////////////////// //Three Steps // //Sells for 1000 cr, takes 5 glass shets // -//Usefull for selling and chemical things // +//Useful for selling and chemical things // //////////////////////////////////////////////////// /obj/item/glasswork/glass_base/tea_plate - name = "Glass fodder sheet" - desc = "A set of glass sheets set aside for glass working, this one is ideal for a tea plate, how fancy! Needs to be heated with some tools." + name = "glass fodder sheet (tea saucer)" + desc = "A set of glass sheets set aside for glass working. This one is ideal for a tea saucer. It needs to heated with something very hot." next_step = /obj/item/glasswork/glass_base/tea_plate1 /obj/item/glasswork/glass_base/tea_plate/attackby(obj/item/I, mob/user, params) @@ -341,8 +341,8 @@ qdel(src) /obj/item/glasswork/glass_base/tea_plate1 - name = "Metled glass" - desc = "A blob of metled glass, this one is ideal for a tea plate. Needs to be blown with some tools." + name = "heated glass blob (tea saucer)" + desc = "Glass that has been heated into a blob. It needs to be attached to a glassblowing rod." icon_state = "glass_base_molding" next_step = /obj/item/glasswork/glass_base/tea_plate2 @@ -355,8 +355,8 @@ qdel(I) /obj/item/glasswork/glass_base/tea_plate2 - name = "Metled glass" - desc = "A blob of metled glass on the end of a blowing rod. Needs to be cut off with some tools." + name = "glassblowing rod (tea saucer)" + desc = "A hollow metal rod made for blowing glass. There is a blob of shapen glass at the end of it that needs to be cut off with some glassworking tools." icon_state = "blowing_rods_inuse" next_step = /obj/item/glasswork/glass_base/tea_plate3 @@ -369,8 +369,8 @@ qdel(src) /obj/item/glasswork/glass_base/tea_plate3 - name = "Disk of glass" - desc = "A disk of glass that can be cant be used for much. Needs to be polished with some cloth." + name = "unpolished glass saucer (tea saucer)" + desc = "An unpolished glass saucer. It needs to be polished with some dry cloth." icon_state = "glass_base_half" next_step = /obj/item/tea_plate @@ -384,12 +384,12 @@ //////////////////////Tea Cup/////////////////////// //Four Steps // //Sells for 1600 cr, takes 6 glass shets // -//Usefull for selling and chemical things // +//Useful for selling and chemical things // //////////////////////////////////////////////////// /obj/item/glasswork/glass_base/tea_cup - name = "Glass fodder sheet" - desc = "A set of glass sheets set aside for glass working, this one is ideal for a tea cup, how fancy! Needs to be heated with some tools." + name = "glass fodder sheet (tea cup)" + desc = "A set of glass sheets set aside for glass working. This one is ideal for a tea cup. It needs to heated with something very hot." next_step = /obj/item/glasswork/glass_base/tea_cup1 /obj/item/glasswork/glass_base/tea_cup/attackby(obj/item/I, mob/user, params) @@ -400,8 +400,8 @@ qdel(src) /obj/item/glasswork/glass_base/tea_cup1 - name = "Metled glass" - desc = "A blob of metled glass, this one is ideal for a tea cup. Needs to be blown with some tools." + name = "heated glass blob (tea cup)" + desc = "Glass that has been heated into a blob. It needs to be attached to a glassblowing rod." icon_state = "glass_base_molding" next_step = /obj/item/glasswork/glass_base/tea_cup2 @@ -414,8 +414,8 @@ qdel(I) /obj/item/glasswork/glass_base/tea_cupe2 - name = "Metled glass" - desc = "A blob of metled glass on the end of a blowing rod. Needs to be cut off with some tools." + name = "glassblowing rod (tea cup)" + desc = "A hollow metal rod made for blowing glass. There is a blob of shapen glass at the end of it that needs to be cut off with some glassworking tools." icon_state = "blowing_rods_inuse" next_step = /obj/item/glasswork/glass_base/tea_cup3 @@ -428,8 +428,8 @@ qdel(src) /obj/item/glasswork/glass_base/tea_cup3 - name = "Disk of glass" - desc = "A bowl of glass that can be cant be used for much. Needs to be polished with some cloth." + name = "unpolished glass cup (tea cup)" + desc = "An unpolished glass cup. It needs to be polished with some dry cloth." icon_state = "glass_base_half" next_step = /obj/item/glasswork/glass_base/tea_cup4 @@ -441,8 +441,8 @@ qdel(src) /obj/item/glasswork/glass_base/tea_cup4 - name = "Disk of glass" - desc = "A bowl of polished glass that can be cant be used for much. Needs some more glass to make a handle." + name = "polished glass cup (tea cup)" + desc = "A polished glass cup. It needs some extra glass to form a handle." icon_state = "glass_base_half" next_step = /obj/item/tea_cup diff --git a/code/datums/components/crafting/glassware/lens_crafting.dm b/code/datums/components/crafting/glassware/lens_crafting.dm index 8907522946..7b650989a8 100644 --- a/code/datums/components/crafting/glassware/lens_crafting.dm +++ b/code/datums/components/crafting/glassware/lens_crafting.dm @@ -1,15 +1,15 @@ //This file is for crafting using a lens! /obj/item/glasswork/glass_base/lens - name = "Optical lens" - desc = "Good for selling or crafting, by itself its useless" + name = "optical lens" + desc = "A glass lens. Useless by itself, but may prove useful in making something with a focus." icon = 'icons/obj/glass_ware.dmi' icon_state = "glass_optics" //Laser pointers - 2600 /obj/item/glasswork/glass_base/laserpointer_shell - name = "Laser pointer assembly" - desc = "Good for selling or crafting, by itself its useless. Needs a power capactor." + name = "laser pointer assembly" + desc = "An empty hull of a laser pointer. It's missing a capacitor." icon_state = "laser_case" icon = 'icons/obj/glass_ware.dmi' next_step = /obj/item/glasswork/glass_base/laserpointer_shell_1 @@ -21,8 +21,8 @@ qdel(src) /obj/item/glasswork/glass_base/laserpointer_shell_1 - name = "Laser pointer assembly" - desc = "Good for selling or crafting, by itself its useless. Needs a glass lens." + name = "powered laser pointer assembly" + desc = "A laser pointer hull with a capacitor inside of it. It's missing a lens." icon_state = "laser_wire" icon_state = "laser_case" next_step = /obj/item/glasswork/glass_base/laserpointer_shell_2 @@ -34,8 +34,8 @@ qdel(src) /obj/item/glasswork/glass_base/laserpointer_shell_2 - name = "Laser pointer assembly" - desc = "Good for selling or crafting, by itself its useless. Needs to be screwed together." + name = "near-complete laser pointer assembly" + desc = "A laser pointer hull with a capacitor and a lens inside of it. It needs to be screwed together." icon_state = "laser_wire" icon_state = "laser_case" next_step = /obj/item/laser_pointer/blue/handmade @@ -50,8 +50,8 @@ //NERD SHIT - 5000 /obj/item/glasswork/glass_base/glasses_frame - name = "Glasses Frame" - desc = "Good for crafting a pare of glasses, by itself its useless. Just add a pare of lens." + name = "glasses frame" + desc = "A pair of glasses without the lenses. You could probably add them yourself, though." icon = 'icons/obj/glass_ware.dmi' icon_state = "frames" next_step = /obj/item/glasswork/glass_base/glasses_frame_1 @@ -64,8 +64,8 @@ qdel(src) /obj/item/glasswork/glass_base/glasses_frame_1 - name = "Glasses Frame" - desc = "Good for crafting a pare of glasses, by itself its useless. Just add a the other lens." + name = "glasses frame" + desc = "A pair of shoddily-assembled glasses with only one lens. You could probably add the second one yourself, though." icon = 'icons/obj/glass_ware.dmi' icon_state = "frames_1" next_step = /obj/item/glasswork/glass_base/glasses_frame_2 @@ -78,8 +78,8 @@ qdel(src) /obj/item/glasswork/glass_base/glasses_frame_2 - name = "Glasses Frame" - desc = "Good for crafting a pare of glasses, by itself its useless. Just adjust the pices into the frame with a screwdriver." + name = "glasses frame" + desc = "A pair of hastily-assembled unfitted glasses with both lenses intact. Use a screwdriver to fit them." icon = 'icons/obj/glass_ware.dmi' icon_state = "frames_2" next_step = /obj/item/glasswork/glasses @@ -92,7 +92,7 @@ qdel(src) /obj/item/glasswork/glasses - name = "Handmade Glasses" - desc = "Handmade glasses that have not been polished at all making them useless. Selling them could still be worth a few credits." + name = "handmade glasses" + desc = "A pair of poorly-assembled glasses clearly produced by someone with no qualifications in making glasses. They're smudged, ugly, and don't even fit you. They might be worth some money, though." icon = 'icons/obj/glass_ware.dmi' icon_state = "frames_2" diff --git a/code/datums/components/storage/concrete/_concrete.dm b/code/datums/components/storage/concrete/_concrete.dm index 55c3e1d083..bb226bbfdf 100644 --- a/code/datums/components/storage/concrete/_concrete.dm +++ b/code/datums/components/storage/concrete/_concrete.dm @@ -135,6 +135,8 @@ var/obj/item/I = AM var/mob/M = parent.loc I.dropped(M) + I.item_flags &= ~IN_STORAGE + I.remove_outline() if(new_location) AM.forceMove(new_location) // exited comsig will handle removal reset. //We don't want to call this if the item is being destroyed @@ -180,6 +182,7 @@ I.forceMove(parent.drop_location()) return FALSE I.on_enter_storage(master) + I.item_flags |= IN_STORAGE refresh_mob_views() I.mouse_opacity = MOUSE_OPACITY_OPAQUE //So you can click on the area around the item to equip it, instead of having to pixel hunt if(M) diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 752fafe6bd..97d6748dc7 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -423,6 +423,9 @@ var/atom/A = parent if(ismob(M)) //all the check for item manipulation are in other places, you can safely open any storages as anything and its not buggy, i checked A.add_fingerprint(M) + if(istype(A, /obj/item)) + var/obj/item/I = A + I.remove_outline() //Removes the outline when we drag if(!over_object) return FALSE if(ismecha(M.loc)) // stops inventory actions in a mech diff --git a/code/datums/wires/_wires.dm b/code/datums/wires/_wires.dm index 81f99cfa69..abee5ada06 100644 --- a/code/datums/wires/_wires.dm +++ b/code/datums/wires/_wires.dm @@ -329,3 +329,15 @@ to_chat(L, "You need an attachable assembly!") #undef MAXIMUM_EMP_WIRES + +//gremlins +/datum/wires/proc/npc_tamper(mob/living/L) + if(!wires.len) + return + + var/wire_to_screw = pick(wires) + + if(is_color_cut(wire_to_screw) || prob(50)) //CutWireColour() proc handles both cutting and mending wires. If the wire is already cut, always mend it back. Otherwise, 50% to cut it and 50% to pulse it + cut(wire_to_screw) + else + pulse(wire_to_screw, L) diff --git a/code/game/machinery/computer/arcade/minesweeper.dm b/code/game/machinery/computer/arcade/minesweeper.dm index dbd9890c81..cd6ff2359c 100644 --- a/code/game/machinery/computer/arcade/minesweeper.dm +++ b/code/game/machinery/computer/arcade/minesweeper.dm @@ -191,6 +191,7 @@ var/x2 = x1 work_squares(y2, x2) //Work squares while in this loop so there's less load reset_board = FALSE + CHECK_TICK web += "
| [MINESWEEPERIMG(7)] | " if(19) web += "[MINESWEEPERIMG(8)] | " + CHECK_TICK web += "" web += "
"
dat += "General Settings" dat += "UI Style: [UI_style]" + dat += "Outline: [outline_enabled ? "Enabled" : "Disabled"] " + dat += "Outline Color: Change " dat += "tgui Monitors: [(tgui_lock) ? "Primary" : "All"] " dat += "tgui Style: [(tgui_fancy) ? "Fancy" : "No Frills"] " dat += "Show Runechat Chat Bubbles: [chat_on_map ? "Enabled" : "Disabled"] " @@ -2706,6 +2710,12 @@ GLOBAL_LIST_EMPTY(preferences_datums) buttons_locked = !buttons_locked if("tgui_fancy") tgui_fancy = !tgui_fancy + if("outline_enabled") + outline_enabled = !outline_enabled + if("outline_color") + var/pickedOutlineColor = input(user, "Choose your outline color.", "General Preference", outline_color) as color|null + if(pickedOutlineColor) + outline_color = pickedOutlineColor if("tgui_lock") tgui_lock = !tgui_lock if("winflash") diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index d4d13dc40f..4d62bb149d 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -45,6 +45,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(current_version < 46) //If you remove this, remove force_reset_keybindings() too. force_reset_keybindings_direct(TRUE) addtimer(CALLBACK(src, .proc/force_reset_keybindings), 30) //No mob available when this is run, timer allows user choice. + if(current_version < 30) + outline_enabled = TRUE + outline_color = COLOR_BLUE_GRAY /datum/preferences/proc/update_character(current_version, savefile/S) if(current_version < 19) @@ -377,6 +380,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["ooccolor"] >> ooccolor S["lastchangelog"] >> lastchangelog S["UI_style"] >> UI_style + S["outline_color"] >> outline_color + S["outline_enabled"] >> outline_enabled S["hotkeys"] >> hotkeys S["chat_on_map"] >> chat_on_map S["max_chat_length"] >> max_chat_length @@ -555,6 +560,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["ooccolor"], ooccolor) WRITE_FILE(S["lastchangelog"], lastchangelog) WRITE_FILE(S["UI_style"], UI_style) + WRITE_FILE(S["outline_enabled"], outline_enabled) + WRITE_FILE(S["outline_color"], outline_color) WRITE_FILE(S["hotkeys"], hotkeys) WRITE_FILE(S["chat_on_map"], chat_on_map) WRITE_FILE(S["max_chat_length"], max_chat_length) diff --git a/code/modules/events/supermatter_surge.dm b/code/modules/events/supermatter_surge.dm index 6b0a093440..78b5c9e70c 100644 --- a/code/modules/events/supermatter_surge.dm +++ b/code/modules/events/supermatter_surge.dm @@ -27,13 +27,27 @@ if(prob(low_threat_perc)) severity = "low; the supermatter should return to normal operation shortly." else - severity = "medium; the supermatter should return to normal operation, but check NT CIMS to ensure this." + severity = "medium; the supermatter should return to normal operation, but regardless, check if the emitters may need to be turned off temporarily." else - severity = "high; if the supermatter's cooling is not fortified, coolant may need to be added." + severity = "high; the emitters likely need to be turned off, and if the supermatter's cooling loop is not fortified, pre-cooled gas may need to be added." if(100000 to INFINITY) - severity = "extreme; emergency action is likely to be required even if coolant loop is fine." + severity = "extreme; emergency action is likely to be required even if coolant loop is fine. Turn off the emitters and make sure the loop is properly cooling gases." if(power > 20000 || prob(round(power/200))) priority_announce("Supermatter surge detected. Estimated severity is [severity]", "Anomaly Alert") /datum/round_event/supermatter_surge/start() - GLOB.main_supermatter_engine.matter_power += power + var/obj/machinery/power/supermatter_crystal/supermatter = GLOB.main_supermatter_engine + var/power_proportion = supermatter.powerloss_inhibitor/2 // what % of the power goes into matter power, at most 50% + // we reduce the proportion that goes into actual matter power based on powerloss inhibitor + // primarily so the supermatter doesn't tesla the instant these happen + supermatter.matter_power += power * power_proportion + var/datum/gas_mixture/methane_puff = new + var/selected_gas = pick(4;GAS_CO2, 10;GAS_METHANE, 4;GAS_H2O, 1;GAS_BZ, 1;GAS_METHYL_BROMIDE) + methane_puff.set_moles(selected_gas, 500) + methane_puff.set_temperature(500) + var/energy_ratio = (power * 500 * (1-power_proportion)) / methane_puff.thermal_energy() + if(energy_ratio < 1) // energy output we want is lower than current energy, reduce the amount of gas we puff out + methane_puff.set_moles(GAS_METHANE, energy_ratio * 500) + else // energy output we want is higher than current energy, increase its actual heat + methane_puff.set_temperature(energy_ratio * 500) + supermatter.assume_air(methane_puff) diff --git a/code/modules/mob/dead/new_player/sprite_accessories/tails.dm b/code/modules/mob/dead/new_player/sprite_accessories/tails.dm index b5ba7f0732..64a3c1a24c 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/tails.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/tails.dm @@ -542,6 +542,20 @@ icon = 'modular_citadel/icons/mob/mam_tails.dmi' matrixed_sections = MATRIX_RED_GREEN +/datum/sprite_accessory/tails/human/takahiro_kitsune + name = "Takahiro Kitsune Tails" //takahiro had five tails i just wanted to follow the 'T' naming convention vs. tamamo and triple + icon_state = "7sune" + color_src = MATRIXED + icon = 'modular_citadel/icons/mob/mam_tails.dmi' + matrixed_sections = MATRIX_RED_GREEN + +/datum/sprite_accessory/tails_animated/human/takahiro_kitsune + name = "Takahiro Kitsune Tails" + icon_state = "7sune" + color_src = MATRIXED + icon = 'modular_citadel/icons/mob/mam_tails.dmi' + matrixed_sections = MATRIX_RED_GREEN + /datum/sprite_accessory/tails/human/tentacle name = "Tentacle" icon_state = "tentacle" diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 8348af43fa..340d2e5598 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -98,6 +98,16 @@ qdel(bigcheese) evolve() return + for(var/obj/item/trash/garbage in range(1, src)) + if(prob(2)) + qdel(garbage) + evolve_plague() + return + for(var/obj/effect/decal/cleanable/blood/gibs/leftovers in range(1, src)) + if(prob(2)) + qdel(leftovers) + evolve_plague() + return /** *Checks the mouse cap, if it's above the cap, doesn't spawn a mouse. If below, spawns a mouse and adds it to cheeserats. @@ -123,6 +133,13 @@ mind.transfer_to(regalrat) qdel(src) +/mob/living/simple_animal/mouse/proc/evolve_plague() + var/mob/living/simple_animal/hostile/plaguerat = new /mob/living/simple_animal/hostile/plaguerat(loc) + visible_message("[src] devours the food! He rots into something worse!") + if(mind) + mind.transfer_to(plaguerat) + qdel(src) + /* * Mouse types */ @@ -169,3 +186,16 @@ GLOBAL_VAR(tom_existed) /obj/item/reagent_containers/food/snacks/deadmouse/on_grind() reagents.clear_reagents() +/mob/living/simple_animal/mouse/proc/miasma(datum/gas_mixture/environment, check_temp = FALSE) + if(isturf(src.loc) && isopenturf(src.loc)) + var/turf/open/ST = src.loc + var/miasma_moles = ST.air.get_moles(GAS_MIASMA) + if(prob(5) && miasma_moles >= 5) + evolve_plague() + else if(miasma_moles >= 20) + evolve_plague() + return + +/mob/living/simple_animal/mouse/handle_environment(datum/gas_mixture/environment) + . = ..() + miasma() diff --git a/code/modules/mob/living/simple_animal/gremlin/gremlin.dm b/code/modules/mob/living/simple_animal/gremlin/gremlin.dm new file mode 100644 index 0000000000..003afad4f2 --- /dev/null +++ b/code/modules/mob/living/simple_animal/gremlin/gremlin.dm @@ -0,0 +1,253 @@ +#define GREMLIN_VENT_CHANCE 1.75 + +//Gremlins +//Small monsters that don't attack humans or other animals. Instead they mess with electronics, computers and machinery + +//List of objects that gremlins can't tamper with (because nobody coded an interaction for it) +//List starts out empty. Whenever a gremlin finds a machine that it couldn't tamper with, the machine's type is added here, and all machines of such type are ignored from then on (NOT SUBTYPES) +GLOBAL_LIST(bad_gremlin_items) + +/mob/living/simple_animal/hostile/gremlin + name = "gremlin" + desc = "This tiny creature finds great joy in discovering and using technology. Nothing excites it more than pushing random buttons on a computer to see what it might do." + icon = 'icons/mob/mob.dmi' + icon_state = "gremlin" + icon_living = "gremlin" + icon_dead = "gremlin_dead" + + var/in_vent = FALSE + + health = 20 + maxHealth = 20 + search_objects = 3 //Completely ignore mobs + + //Tampering is handled by the 'npc_tamper()' obj proc + wanted_objects = list( + /obj/machinery, + /obj/item/reagent_containers/food, + /obj/structure/sink + ) + + var/obj/machinery/atmospherics/components/unary/vent_pump/entry_vent + var/obj/machinery/atmospherics/components/unary/vent_pump/exit_vent + + dextrous = TRUE + possible_a_intents = list(INTENT_HELP, INTENT_GRAB, INTENT_DISARM, INTENT_HARM) + faction = list("meme", "gremlin") + speed = 0.5 + gold_core_spawnable = 2 + unique_name = TRUE + + //Ensure gremlins don't attack other mobs + melee_damage_upper = 0 + melee_damage_lower = 0 + attack_sound = null + obj_damage = 0 + environment_smash = ENVIRONMENT_SMASH_NONE + + //List of objects that we don't even want to try to tamper with + //Subtypes of these are calculated too + var/list/unwanted_objects = list(/obj/machinery/atmospherics/pipe, /turf, /obj/structure) //ensure gremlins dont try to fuck with walls / normal pipes / glass / etc + + var/min_next_vent = 0 + + //Amount of ticks spent pathing to the target. If it gets above a certain amount, assume that the target is unreachable and stop + var/time_chasing_target = 0 + + //If you're going to make gremlins slower, increase this value - otherwise gremlins will abandon their targets too early + var/max_time_chasing_target = 2 + + var/next_eat = 0 + + //Last 20 heard messages are remembered by gremlins, and will be used to generate messages for comms console tampering, etc... + var/list/hear_memory = list() + var/const/max_hear_memory = 20 + +/mob/living/simple_animal/hostile/gremlin/Initialize() + . = ..() + AddElement(/datum/element/ventcrawling, given_tier = VENTCRAWLER_ALWAYS) + access_card = new /obj/item/card/id(src) + var/datum/job/captain/C = new /datum/job/captain + access_card.access = C.get_access() + +/mob/living/simple_animal/hostile/gremlin/AttackingTarget() + var/is_hungry = world.time >= next_eat || prob(25) + if(istype(target, /obj/item/reagent_containers/food) && is_hungry) //eat food if we're hungry or bored + visible_message("[src] hungrily devours [target]!") + playsound(src, 'sound/items/eatfood.ogg', 50, 1) + qdel(target) + LoseTarget() + next_eat = world.time + rand(700, 3000) //anywhere from 70 seconds to 5 minutes until the gremlin is hungry again + return + if(istype(target, /obj)) + var/obj/M = target + tamper(M) + if(prob(50)) //50% chance to move to the next machine + LoseTarget() + +/mob/living/simple_animal/hostile/gremlin/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans, message_mode) + . = ..() + if(message) + hear_memory.Insert(1, raw_message) + if(hear_memory.len > max_hear_memory) + hear_memory.Cut(hear_memory.len) + +/mob/living/simple_animal/hostile/gremlin/proc/generate_markov_input() + var/result = "" + + for(var/memory in hear_memory) + result += memory + " " + + return result + +/mob/living/simple_animal/hostile/gremlin/proc/generate_markov_chain() + return markov_chain(generate_markov_input(), rand(2,5), rand(100,700)) //The numbers are chosen arbitarily + +/mob/living/simple_animal/hostile/gremlin/proc/tamper(obj/M) + switch(M.npc_tamper_act(src)) + if(NPC_TAMPER_ACT_FORGET) + visible_message(pick( + "\The [src] plays around with \the [M], but finds it rather boring.", + "\The [src] tries to think of some more ways to screw \the [M] up, but fails miserably.", + "\The [src] decides to ignore \the [M], and starts looking for something more fun.")) + + LAZYADD(GLOB.bad_gremlin_items,M.type) + return FALSE + if(NPC_TAMPER_ACT_NOMSG) + //Don't create a visible message + return TRUE + + else + visible_message(pick( + "\The [src]'s eyes light up as \he tampers with \the [M].", + "\The [src] twists some knobs around on \the [M] and bursts into laughter!", + "\The [src] presses a few buttons on \the [M] and giggles mischievously.", + "\The [src] rubs its hands devilishly and starts messing with \the [M].", + "\The [src] turns a small valve on \the [M].")) + + //Add a clue for detectives to find. The clue is only added if no such clue already existed on that machine + return TRUE + +/mob/living/simple_animal/hostile/gremlin/CanAttack(atom/new_target) + if(LAZYFIND(GLOB.bad_gremlin_items,new_target.type)) + return FALSE + if(is_type_in_list(new_target, unwanted_objects)) + return FALSE + if(istype(new_target, /obj/machinery)) + var/obj/machinery/M = new_target + if(M.stat) //Unpowered or broken + return FALSE + else if(istype(new_target, /obj/machinery/door/firedoor)) + var/obj/machinery/door/firedoor/F = new_target + //Only tamper with firelocks that are closed, opening them! + if(!F.density) + return FALSE + + return ..() + +/mob/living/simple_animal/hostile/gremlin/death(gibbed) + walk(src,0) + return ..() + +/mob/living/simple_animal/hostile/gremlin/Life() + . = ..() + if(!health || stat == DEAD) + return + //Don't try to path to one target for too long. If it takes longer than a certain amount of time, assume it can't be reached and find a new one + if(!client) //don't do this shit if there's a client, they're capable of ventcrawling manually + if(in_vent) + target = null + if(entry_vent && get_dist(src, entry_vent) <= 1) + var/list/vents = list() + var/datum/pipeline/entry_vent_parent = entry_vent.parents[1] + for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in entry_vent_parent.other_atmosmch) + vents += temp_vent + if(!vents.len) + entry_vent = null + in_vent = FALSE + return + exit_vent = pick(vents) + visible_message("[src] crawls into the ventilation ducts!") + + loc = exit_vent + var/travel_time = round(get_dist(loc, exit_vent.loc) / 2) + addtimer(CALLBACK(src, .proc/exit_vents), travel_time) //come out at exit vent in 2 to 20 seconds + + + if(world.time > min_next_vent && !entry_vent && !in_vent && prob(GREMLIN_VENT_CHANCE)) //small chance to go into a vent + for(var/obj/machinery/atmospherics/components/unary/vent_pump/v in view(7,src)) + if(!v.welded) + entry_vent = v + in_vent = TRUE + walk_to(src, entry_vent) + break + if(!target) + time_chasing_target = 0 + else + if(++time_chasing_target > max_time_chasing_target) + LoseTarget() + time_chasing_target = 0 + . = ..() + +/mob/living/simple_animal/hostile/gremlin/EscapeConfinement() + if(istype(loc, /obj) && CanAttack(loc)) //If we're inside a machine, screw with it + var/obj/M = loc + tamper(M) + + return ..() + +/mob/living/simple_animal/hostile/gremlin/proc/exit_vents() + if(!exit_vent || exit_vent.welded) + loc = entry_vent + entry_vent = null + return + loc = exit_vent.loc + entry_vent = null + exit_vent = null + in_vent = FALSE + var/area/new_area = get_area(loc) + message_admins("[src] came out at [new_area][ADMIN_JMP(loc)]!") + if(new_area) + new_area.Entered(src) + visible_message("[src] climbs out of the ventilation ducts!") + min_next_vent = world.time + 900 //90 seconds between ventcrawls + +//This allows player-controlled gremlins to tamper with machinery +/mob/living/simple_animal/hostile/gremlin/UnarmedAttack(var/atom/A) + if(istype(A, /obj/machinery) || istype(A, /obj/structure)) + tamper(A) + if(istype(target, /obj/item/reagent_containers/food)) //eat food + visible_message("[src] hungrily devours [target]!", "You hungrily devour [target]!") + playsound(src, 'sound/items/eatfood.ogg', 50, 1) + qdel(target) + LoseTarget() + next_eat = world.time + rand(700, 3000) //anywhere from 70 seconds to 5 minutes until the gremlin is hungry again + + return ..() + +/mob/living/simple_animal/hostile/gremlin/IsAdvancedToolUser() + return 1 + +/mob/living/simple_animal/hostile/gremlin/proc/divide() + //Health is halved and then reduced by 2. A new gremlin is spawned with the same health as the parent + //Need to have at least 6 health for this, otherwise resulting health would be less than 1 + if(health < 7.5) + return + + visible_message("\The [src] splits into two!") + var/mob/living/simple_animal/hostile/gremlin/G = new /mob/living/simple_animal/hostile/gremlin(get_turf(src)) + + if(mind) + mind.transfer_to(G) + + health = round(health * 0.5) - 2 + maxHealth = health + resize *= 0.9 + + G.health = health + G.maxHealth = maxHealth + +/mob/living/simple_animal/hostile/gremlin/traitor + health = 85 + maxHealth = 85 + gold_core_spawnable = 0 diff --git a/code/modules/mob/living/simple_animal/gremlin/gremlin_act.dm b/code/modules/mob/living/simple_animal/gremlin/gremlin_act.dm new file mode 100644 index 0000000000..ff0eb13dc7 --- /dev/null +++ b/code/modules/mob/living/simple_animal/gremlin/gremlin_act.dm @@ -0,0 +1,214 @@ +/obj/proc/npc_tamper_act(mob/living/L) + return NPC_TAMPER_ACT_FORGET + +/obj/machinery/atmospherics/components/binary/passive_gate/npc_tamper_act(mob/living/L) + if(prob(50)) //Turn on/off + on = !on + investigate_log("was turned [on ? "on" : "off"] by [key_name(L)]", INVESTIGATE_ATMOS) + else //Change pressure + target_pressure = rand(0, MAX_OUTPUT_PRESSURE) + investigate_log("was set to [target_pressure] kPa by [key_name(L)]", INVESTIGATE_ATMOS) + update_icon() + +/obj/machinery/atmospherics/components/binary/pump/npc_tamper_act(mob/living/L) + if(prob(50)) //Turn on/off + on = !on + investigate_log("was turned [on ? "on" : "off"] by [key_name(L)]", INVESTIGATE_ATMOS) + else //Change pressure + target_pressure = rand(0, MAX_OUTPUT_PRESSURE) + investigate_log("was set to [target_pressure] kPa by [key_name(L)]", INVESTIGATE_ATMOS) + update_icon() + +/obj/machinery/atmospherics/components/binary/volume_pump/npc_tamper_act(mob/living/L) + if(prob(50)) //Turn on/off + on = !on + investigate_log("was turned [on ? "on" : "off"] by [key_name(L)]", INVESTIGATE_ATMOS) + else //Change pressure + transfer_rate = rand(0, MAX_TRANSFER_RATE) + investigate_log("was set to [transfer_rate] L/s by [key_name(L)]", INVESTIGATE_ATMOS) + update_icon() + +/obj/machinery/atmospherics/components/binary/valve/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/space_heater/npc_tamper_act(mob/living/L) + var/list/choose_modes = list("standby", "heat", "cool") + if(prob(50)) + choose_modes -= mode + mode = pick(choose_modes) + else + on = !on + update_icon() + +/obj/machinery/shield_gen/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/firealarm/npc_tamper_act(mob/living/L) + alarm() + +/obj/machinery/airalarm/npc_tamper_act(mob/living/L) + if(panel_open) + wires.npc_tamper(L) + else + panel_open = !panel_open + +/obj/machinery/ignition_switch/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/flasher_button/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/crema_switch/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/camera/npc_tamper_act(mob/living/L) + if(!panel_open) + panel_open = !panel_open + if(wires) + wires.npc_tamper(L) + +/obj/machinery/atmospherics/components/unary/cryo_cell/npc_tamper_act(mob/living/L) + if(prob(50)) + if(beaker) + beaker.forceMove(loc) + beaker = null + else + if(occupant) + if(state_open) + if (close_machine() == usr) + on = TRUE + else + open_machine() + +/obj/machinery/door_control/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/door/airlock/npc_tamper_act(mob/living/L) + //Open the firelocks as well, otherwise they block the way for our gremlin which isn't fun + for(var/obj/machinery/door/firedoor/F in get_turf(src)) + if(F.density) + F.npc_tamper_act(L) + + if(prob(40)) //40% - mess with wires + if(!panel_open) + panel_open = !panel_open + if(wires) + wires.npc_tamper(L) + else //60% - just open it + open() + +/obj/machinery/gibber/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/light_switch/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/turretid/npc_tamper_act(mob/living/L) + enabled = rand(0, 1) + lethal = rand(0, 1) + updateTurrets() + +/obj/machinery/vending/npc_tamper_act(mob/living/L) + if(!panel_open) + panel_open = !panel_open + if(wires) + wires.npc_tamper(L) + +/obj/machinery/shower/npc_tamper_act(mob/living/L) + attack_hand(L) + + +/obj/machinery/deepfryer/npc_tamper_act(mob/living/L) + //Deepfry a random nearby item + var/list/pickable_items = list() + + for(var/obj/item/I in range(1, L)) + pickable_items.Add(I) + + if(!pickable_items.len) + return + + var/obj/item/I = pick(pickable_items) + + attackby(I, L) //shove the item in, even if it can't be deepfried normally + +/obj/machinery/power/apc/npc_tamper_act(mob/living/L) + if(!panel_open) + panel_open = !panel_open + if(wires) + wires.npc_tamper(L) + +/obj/machinery/power/rad_collector/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/power/emitter/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/particle_accelerator/control_box/npc_tamper_act(mob/living/L) + if(!panel_open) + panel_open = !panel_open + if(wires) + wires.npc_tamper(L) + +/obj/machinery/computer/communications/npc_tamper_act(mob/living/user) + if(!authenticated) + if(prob(20)) //20% chance to log in + authenticated = TRUE + + else //Already logged in + if(prob(50)) //50% chance to log off + authenticated = FALSE + else if(istype(user, /mob/living/simple_animal/hostile/gremlin)) //make a hilarious public message + var/mob/living/simple_animal/hostile/gremlin/G = user + var/result = G.generate_markov_chain() + + if(result) + if(prob(85)) + SScommunications.make_announcement(G, FALSE, result) + var/turf/T = get_turf(G) + log_say("[key_name(usr)] ([ADMIN_JMP(T)]) has made a captain announcement: [result]") + message_admins("[key_name_admin(G)] has made a captain announcement.", 1) + else + if(SSshuttle.emergency.mode == SHUTTLE_IDLE) + SSshuttle.requestEvac(G, result) + else if(SSshuttle.emergency.mode == SHUTTLE_ESCAPE) + SSshuttle.cancelEvac(G) + +/obj/machinery/button/door/npc_tamper_act(mob/living/L) + attack_hand(L) + +/obj/machinery/sleeper/npc_tamper_act(mob/living/L) + if(prob(75)) + inject_chem(pick(available_chems)) + else + if(state_open) + close_machine() + else + open_machine() + +/obj/machinery/power/smes/npc_tamper_act(mob/living/L) + if(prob(50)) //mess with input + input_level = rand(0, input_level_max) + else //mess with output + output_level = rand(0, output_level_max) + +/obj/machinery/syndicatebomb/npc_tamper_act(mob/living/L) //suicide bomber gremlins + if(!open_panel) + open_panel = !open_panel + if(wires) + wires.npc_tamper(L) + +/obj/machinery/computer/bank_machine/npc_tamper_act(mob/living/L) + siphoning = !siphoning + +/obj/machinery/computer/slot_machine/npc_tamper_act(mob/living/L) + spin(L) + +/obj/structure/sink/npc_tamper_act(mob/living/L) + if(istype(L, /mob/living/simple_animal/hostile/gremlin)) + visible_message("\The [L] climbs into \the [src] and turns the faucet on!") + + var/mob/living/simple_animal/hostile/gremlin/G = L + G.divide() + + return NPC_TAMPER_ACT_NOMSG diff --git a/code/modules/mob/living/simple_animal/gremlin/gremlin_event.dm b/code/modules/mob/living/simple_animal/gremlin/gremlin_event.dm new file mode 100644 index 0000000000..6f5f0e3dba --- /dev/null +++ b/code/modules/mob/living/simple_animal/gremlin/gremlin_event.dm @@ -0,0 +1,44 @@ +/datum/round_event_control/gremlin + name = "Spawn Gremlins" + typepath = /datum/round_event/gremlin + weight = 15 + max_occurrences = 2 + earliest_start = 20 MINUTES + min_players = 5 + + + +/datum/round_event/gremlin + var/static/list/acceptable_spawns = list("xeno_spawn", "generic event spawn", "blobstart", "Assistant") + +/datum/round_event/gremlin/announce() + priority_announce("Bioscans indicate that some gremlins entered through the vents. Deal with them!", "Gremlin Alert", 'sound/announcer/classic/attention.ogg') + +/datum/round_event/gremlin/start() + + var/list/spawn_locs = list() + + for(var/obj/effect/landmark/L in GLOB.landmarks_list) + if(isturf(L.loc) && !isspaceturf(L.loc)) + if(L.name in acceptable_spawns) + spawn_locs += L.loc + if(!spawn_locs.len) //If we can't find any gremlin spawns, try the xeno spawns + for(var/obj/effect/landmark/L in GLOB.landmarks_list) + if(isturf(L.loc)) + switch(L.name) + if("Assistant") + spawn_locs += L.loc + if(!spawn_locs.len) //If we can't find THAT, then just give up and cry + return MAP_ERROR + + var/gremlins_to_spawn = rand(2,5) + var/list/gremlin_areas = list() + for(var/i = 0, i <= gremlins_to_spawn, i++) + var/spawnat = pick(spawn_locs) + spawn_locs -= spawnat + gremlin_areas += get_area(spawnat) + new /mob/living/simple_animal/hostile/gremlin(spawnat) + var/grems = gremlin_areas.Join(", ") + message_admins("Gremlins have been spawned at the areas: [grems]") + log_game("Gremlins have been spawned at the areas: [grems]") + return SUCCESSFUL_SPAWN diff --git a/code/modules/mob/living/simple_animal/hostile/plaguerat.dm b/code/modules/mob/living/simple_animal/hostile/plaguerat.dm new file mode 100644 index 0000000000..331dc1eb75 --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/plaguerat.dm @@ -0,0 +1,131 @@ +/mob/living/simple_animal/hostile/plaguerat + name = "plague rat" + desc = "A large decaying rat. It spreads its filth and emits a putrid odor to create more of its kind." + icon_state = "plaguerat" + icon_living = "plaguerat" + icon_dead = "plaguerat_dead" + speak = list("Skree!","SKREEE!","Squeak?") + speak_emote = list("squeaks") + emote_hear = list("Hisses.") + emote_see = list("runs in a circle.", "stands on its hind legs.") + gender = NEUTER + speak_chance = 1 + turns_per_move = 5 + maxHealth = 15 + health = 15 + see_in_dark = 6 + obj_damage = 10 + butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 1) + response_help_continuous = "glares at" + response_help_simple = "glare at" + response_disarm_continuous = "skoffs at" + response_disarm_simple = "skoff at" + response_harm_continuous = "slashes" + response_harm_simple = "slash" + melee_damage_lower = 5 + melee_damage_upper = 7 + attack_verb_continuous = "slashes" + attack_verb_simple = "slash" + attack_sound = 'sound/weapons/punch1.ogg' + faction = list("rat") + density = FALSE + pass_flags = PASSTABLE | PASSGRILLE | PASSMOB + mob_size = MOB_SIZE_TINY + mob_biotypes = MOB_ORGANIC|MOB_BEAST + var/datum/action/cooldown/scavenge + var/last_spawn_time = 0 + ///Number assigned to rats and mice, checked when determining infighting. + +/mob/living/simple_animal/hostile/plaguerat/Initialize() + . = ..() + SSmobs.cheeserats += src + AddComponent(/datum/component/swarming) + AddElement(/datum/element/ventcrawling, given_tier = VENTCRAWLER_ALWAYS) + scavenge = new /datum/action/cooldown/scavenge + scavenge.Grant(src) + +/mob/living/simple_animal/hostile/plaguerat/Destroy() + SSmobs.cheeserats -= src + return ..() + +/mob/living/simple_animal/hostile/plaguerat/BiologicalLife(seconds, times_fired) + if(!(. = ..())) + return + if(isopenturf(loc)) + var/turf/open/T = src.loc + if(T.air) + T.atmos_spawn_air("miasma=5;TEMP=293.15") + if(prob(40)) + scavenge.Trigger() + if(prob(50)) + var/turf/open/floor/F = get_turf(src) + if(istype(F) && !F.intact) + var/obj/structure/cable/C = locate() in F + if(C && C.avail()) + visible_message("[src] chews through the [C]. It looks unharmed!") + playsound(src, 'sound/effects/sparks2.ogg', 100, TRUE) + C.deconstruct() + for(var/obj/O in range(1,src)) + if(istype(O, /obj/item/trash) || istype(O, /obj/effect/decal/cleanable/blood/gibs)) + qdel(O) + be_fruitful() + +/mob/living/simple_animal/hostile/plaguerat/CanAttack(atom/the_target) + if(istype(the_target,/mob/living/simple_animal)) + var/mob/living/A = the_target + if(istype(the_target, /mob/living/simple_animal/hostile/plaguerat) && A.stat == CONSCIOUS) + var/mob/living/simple_animal/hostile/plaguerat/R = the_target + if(R.faction_check_mob(src, TRUE)) + return FALSE + else + return TRUE + return ..() + +/** + *Checks the mouse cap, if it's above the cap, doesn't spawn a mouse. If below, spawns a mouse and adds it to cheeserats. + */ + +/mob/living/simple_animal/hostile/plaguerat/proc/be_fruitful() + var/cap = CONFIG_GET(number/ratcap) + if(LAZYLEN(SSmobs.cheeserats) >= cap) + visible_message("[src] gnaws into its food, [cap] rats are now on the station!") + return + var/mob/living/newmouse = new /mob/living/simple_animal/hostile/plaguerat(loc) + SSmobs.cheeserats += newmouse + visible_message("[src] gnaws into its food, attracting another rat!") + +/** + *Creates a chance to spawn more trash or gibs to repopulate. Otherwise, spawns a corpse or dirt. + */ + +/datum/action/cooldown/scavenge + name = "Scavenge" + desc = "Spread the plague, scavenge for trash and fresh meat to reproduce." + icon_icon = 'icons/mob/actions/actions_animal.dmi' + background_icon_state = "bg_clock" + button_icon_state = "coffer" + cooldown_time = 50 + +/datum/action/cooldown/scavenge/Trigger() + . = ..() + if(!.) + return + var/turf/T = get_turf(owner) + var/loot = rand(1,100) + switch(loot) + if(1 to 3) + var/pickedtrash = pick(GLOB.ratking_trash) + to_chat(owner, "Excellent, you find more trash to spread your filth!") + new /obj/effect/decal/cleanable/dirt(T) + new pickedtrash(T) + if(4 to 6) + to_chat(owner, "You find blood and gibs to feed your young!") + new /obj/effect/decal/cleanable/blood/gibs(T) + new /obj/effect/decal/cleanable/blood/(T) + if(7 to 18) + to_chat(owner, "A corpse rises from the ground. Best to leave it alone.") + new /obj/effect/mob_spawn/human/corpse/assistant(T) + if(19 to 100) + to_chat(owner, "Drat. Nothing.") + new /obj/effect/decal/cleanable/dirt(T) + StartCooldown() diff --git a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm index 5722cfda07..39e9e84ed2 100644 --- a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm @@ -109,7 +109,7 @@ continue playsound(src, 'sound/effects/splat.ogg', 50, TRUE) visible_message("[src] vomits up [consumed_mob]!") - consumed_mob.forceMove(loc) + consumed_mob.forceMove(get_turf(src)) consumed_mob.Paralyze(50) if((rifts_charged == 3 || (SSshuttle.emergency.mode == SHUTTLE_DOCKED && rifts_charged > 0)) && !objective_complete) victory() @@ -123,6 +123,7 @@ to_chat(src, "You've failed to summon the rift in a timely manner! You're being pulled back from whence you came!") destroy_rifts() playsound(src, 'sound/magic/demon_dies.ogg', 100, TRUE) + empty_contents() QDEL_NULL(src) /mob/living/simple_animal/hostile/space_dragon/AttackingTarget() @@ -351,7 +352,7 @@ */ /mob/living/simple_animal/hostile/space_dragon/proc/empty_contents() for(var/atom/movable/AM in src) - AM.forceMove(loc) + AM.forceMove(get_turf(src)) if(prob(90)) step(AM, pick(GLOB.alldirs)) @@ -529,7 +530,7 @@ /obj/structure/carp_rift name = "carp rift" desc = "A rift akin to the ones space carp use to travel long distances." - armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 50, BIO = 100, RAD = 100, FIRE = 100, ACID = 100) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) max_integrity = 300 icon = 'icons/obj/carp_rift.dmi' icon_state = "carp_rift_carpspawn" @@ -636,7 +637,7 @@ icon_state = "carp_rift_charged" light_color = LIGHT_COLOR_YELLOW update_light() - armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 100, BIO = 100, RAD = 100, FIRE = 100, ACID = 100) + armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) resistance_flags = INDESTRUCTIBLE dragon.rifts_charged += 1 if(dragon.rifts_charged != 3 && !dragon.objective_complete) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index efb4512bca..5ba4769f99 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -238,6 +238,7 @@ if(istype(W)) if(equip_to_slot_if_possible(W, slot, FALSE, FALSE, FALSE, FALSE, TRUE)) + W.apply_outline() return TRUE if(!W) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index b460cfea51..148535af76 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -39,7 +39,8 @@ #define DAMAGE_INCREASE_MULTIPLIER 0.25 -#define THERMAL_RELEASE_MODIFIER 5 //Higher == less heat released during reaction, not to be confused with the above values +#define THERMAL_RELEASE_MODIFIER 350 //Higher == more heat released during reaction, not to be confused with the above values +#define THERMAL_RELEASE_CAP_MODIFIER 250 //Higher == lower cap on how much heat can be released per tick--currently 1.3x old value #define PLASMA_RELEASE_MODIFIER 750 //Higher == less plasma released by reaction #define OXYGEN_RELEASE_MODIFIER 325 //Higher == less oxygen released at high temperature/power @@ -500,7 +501,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) powerloss_dynamic_scaling = clamp(powerloss_dynamic_scaling + clamp(powerloss_inhibition_gas - powerloss_dynamic_scaling, -0.02, 0.02), 0, 1) else powerloss_dynamic_scaling = clamp(powerloss_dynamic_scaling - 0.05, 0, 1) - //Ranges from 0 to 1(1-(value between 0 and 1 * ranges from 1 to 1.5(mol / 500))) + //Ranges from 0 to 1 (1-(value between 0 and 1 * ranges from 1 to 1.5(mol / 500))) + //0 means full inhibition, 1 means no inhibition //We take the mol count, and scale it to be our inhibitor powerloss_inhibitor = clamp(1-(powerloss_dynamic_scaling * clamp(combined_gas/POWERLOSS_INHIBITION_MOLE_BOOST_THRESHOLD, 1, 1.5)), 0, 1) @@ -536,15 +538,19 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) //Power * 0.55 * a value between 1 and 0.8 var/device_energy = power * REACTION_POWER_MODIFIER - removed.set_temperature(removed.return_temperature() + ((device_energy * dynamic_heat_modifier) / THERMAL_RELEASE_MODIFIER)) - //We don't want our output to be too hot - removed.set_temperature(max(0, min(removed.return_temperature(), 2500 * dynamic_heat_modifier))) + var/effective_temperature = min(removed.return_temperature(), 2500 * dynamic_heat_modifier) + var/max_temp_increase = effective_temperature + ((device_energy * dynamic_heat_modifier) / THERMAL_RELEASE_CAP_MODIFIER) //Calculate how much gas to release //Varies based on power and gas content removed.adjust_moles(GAS_PLASMA, max((device_energy * dynamic_heat_modifier) / PLASMA_RELEASE_MODIFIER, 0)) //Varies based on power, gas content, and heat - removed.adjust_moles(GAS_O2, max(((device_energy + removed.return_temperature() * dynamic_heat_modifier) - T0C) / OXYGEN_RELEASE_MODIFIER, 0)) + removed.adjust_moles(GAS_O2, max(((device_energy + effective_temperature * dynamic_heat_modifier) - T0C) / OXYGEN_RELEASE_MODIFIER, 0)) + + if(removed.return_temperature() < max_temp_increase) + removed.adjust_heat(device_energy * dynamic_heat_modifier * THERMAL_RELEASE_MODIFIER) + removed.set_temperature(min(removed.return_temperature(), max_temp_increase)) + if(produces_gas) env.merge(removed) diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index 93f88192e5..e10b05822b 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -54,7 +54,8 @@ var/SA_para_min = 1 //nitrous values var/SA_sleep_min = 5 - var/BZ_trip_balls_min = 1 //BZ gas + var/BZ_trip_balls_min = 0.1 //BZ gas + var/BZ_brain_damage_min = 1 var/gas_stimulation_min = 0.002 //Nitryl and Stimulum var/cold_message = "your face freezing and an icicle forming" @@ -269,13 +270,13 @@ // BZ var/bz_pp = PP(breath, GAS_BZ) - if(bz_pp > BZ_trip_balls_min) + if(bz_pp > BZ_brain_damage_min) H.hallucination += 10 H.reagents.add_reagent(/datum/reagent/bz_metabolites,5) if(prob(33)) H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3, 150) - else if(bz_pp > 0.01) + else if(bz_pp > BZ_trip_balls_min) H.hallucination += 5 H.reagents.add_reagent(/datum/reagent/bz_metabolites,1) @@ -476,7 +477,7 @@ ) SA_para_min = 30 SA_sleep_min = 50 - BZ_trip_balls_min = 30 + BZ_brain_damage_min = 30 emp_vulnerability = 3 cold_level_1_threshold = 200 @@ -509,8 +510,29 @@ heat_level_2_threshold = 600 // up 200 from level 1, 1000 is silly but w/e for level 3 /obj/item/organ/lungs/ashwalker/populate_gas_info() + // humans usually breathe 21 but require 16/17, so 80% - 1, which is more lenient but it's fine + #define SAFE_THRESHOLD_RATIO 0.8 + var/datum/gas_mixture/breath = SSair.planetary[LAVALAND_DEFAULT_ATMOS] // y'all know + var/pressure = breath.return_pressure() + var/total_moles = breath.total_moles() + for(var/id in breath.get_gases()) + var/this_pressure = PP(breath, id) + var/req_pressure = (this_pressure * SAFE_THRESHOLD_RATIO) - 1 + if(req_pressure > 0) + gas_min[id] = req_pressure + if(id in gas_max) + gas_max[id] += this_pressure + var/bz = breath.get_moles(GAS_BZ) + if(bz) + BZ_trip_balls_min += bz + BZ_brain_damage_min += bz + + gas_max[GAS_N2] = PP(breath, GAS_N2) + 5 + var/o2_pp = PP(breath, GAS_O2) + safe_breath_min = 0.3 * o2_pp + safe_breath_max = 1.3 * o2_pp ..() - gas_max[GAS_N2] = 28 + #undef SAFE_THRESHOLD_RATIO /obj/item/organ/lungs/slime name = "vacuole" diff --git a/html/changelog.html b/html/changelog.html index e2aef333e1..35731873b2 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -50,6 +50,58 @@ -->
+
GoonStation 13 Development Team
diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml
index 580cf51a2f..78c21c6eff 100644
--- a/html/changelogs/.all_changelog.yml
+++ b/html/changelogs/.all_changelog.yml
@@ -29838,3 +29838,38 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
- imageadd: They even come with 10 different fillstates!
- imageadd: Better Shark Tails, dodododododo~
- rscadd: The old ones are now listed as carp tails.
+2021-08-22:
+ zeroisthebiggay:
+ - spellcheck: trillby can't spell pair
+2021-08-23:
+ zeroisthebiggay:
+ - spellcheck: i hate the grammarchrist
+2021-08-24:
+ BlueWildrose:
+ - balance: MK ultra explosions (failures at making MKultra) are gone, and replaced
+ with a gas that just causes a bunch of status effects to you.
+2021-08-26:
+ keronshb:
+ - rscadd: Adds catwalk floors
+2021-08-28:
+ DeltaFire15:
+ - bugfix: 'Demons now drop bodies on their own tile instead of scattering them across
+ the station. tweak: Space dragon content ejection is now slightly safer.'
+ - bugfix: Space dragons no longer delete their contents if they die due to timeout,
+ ejecting them instead.
+ - bugfix: Carp rifts created by space dragons now have their armor work correctly.
+ Putnam3145:
+ - config: Planetary monstermos can now be disabled with varedit
+ - rscadd: Lavaland/ice planet atmos is no longer a preset gas mixture and varies
+ per round
+ keronshb:
+ - rscadd: Ports Inventory Outlines
+ - imageadd: Re-adds the old glue sprite
+ - rscadd: Adds Plague Rats
+ - rscadd: Gives Plague Rat spawn conditions for regular mice
+ - imageadd: Plague Rat sprite
+ - rscadd: Gremlin
+ - imageadd: Gremlin sprites
+ zeroisthebiggay:
+ - rscdel: grilles as maintenance loot
+ - rscadd: sevensune tail from hyperstation
diff --git a/icons/mob/animal.dmi b/icons/mob/animal.dmi
index 68e6170969..34bd587146 100644
Binary files a/icons/mob/animal.dmi and b/icons/mob/animal.dmi differ
diff --git a/icons/mob/mob.dmi b/icons/mob/mob.dmi
index 3137e8ac26..65efde8697 100644
Binary files a/icons/mob/mob.dmi and b/icons/mob/mob.dmi differ
diff --git a/icons/obj/machines/gateway.dmi b/icons/obj/machines/gateway.dmi
index 99a74a68bc..5ba943bb89 100644
Binary files a/icons/obj/machines/gateway.dmi and b/icons/obj/machines/gateway.dmi differ
diff --git a/icons/obj/tiles.dmi b/icons/obj/tiles.dmi
index 088b6c2c7b..757208cd9b 100644
Binary files a/icons/obj/tiles.dmi and b/icons/obj/tiles.dmi differ
diff --git a/icons/obj/tools.dmi b/icons/obj/tools.dmi
index a720aff62c..95a887a733 100644
Binary files a/icons/obj/tools.dmi and b/icons/obj/tools.dmi differ
diff --git a/icons/turf/floors/catwalk_plating.dmi b/icons/turf/floors/catwalk_plating.dmi
new file mode 100644
index 0000000000..24954e4a17
Binary files /dev/null and b/icons/turf/floors/catwalk_plating.dmi differ
diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm
index f66c0289b6..a76a8f846c 100644
--- a/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm
+++ b/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm
@@ -266,55 +266,20 @@ Creating a chem with a low purity will make you permanently fall in love with so
//Creates a gas cloud when the reaction blows up, causing everyone in it to fall in love with someone/something while it's in their system.
/datum/reagent/fermi/enthrallExplo//Created in a gas cloud when it explodes
name = "Gaseous MKUltra"
- description = "A forbidden deep red gas that overwhelms a foreign body, causing the person they next lay their eyes on to become more interesting. Studies have shown that people are 66% more likely to make friends with this in the air. Produced when MKUltra explodes."
+ description = "A deep red gas that when taken into a body, the recipient will experience a high and reduced control in their body for as long as it is in their system. Produced when MKUltra explodes."
color = "#2C051A" // rgb: , 0, 255
- metabolization_rate = 0.1
- taste_description = "synthetic chocolate, a base tone of alcohol, and high notes of roses."
+ metabolization_rate = 1
+ taste_description = "extremely bitter chocolate"
chemical_flags = REAGENT_DONOTSPLIT
can_synth = FALSE
- var/mob/living/carbon/love
- var/lewd = FALSE
-/datum/reagent/fermi/enthrallExplo/on_mob_life(mob/living/carbon/M)//Love gas, only affects while it's in your system,Gives a positive moodlet if close, gives brain damagea and a negative moodlet if not close enough.
- if(HAS_TRAIT(M, TRAIT_MINDSHIELD))
- return ..()
- if(!M.has_status_effect(STATUS_EFFECT_INLOVE))
- var/list/seen = (M.fov_view(M.client?.view || world.view) - M) | viewers(M.client?.view || world.view, M)
- for(var/victim in seen)
- if((isanimal(victim)) || (!isliving(victim)))
- seen -= victim
- if(!length(seen))
- return
- love = pick(seen)
- M.apply_status_effect(STATUS_EFFECT_INLOVE, love)
- lewd = (M.client?.prefs.cit_toggles & HYPNO) && (love.client?.prefs.cit_toggles & HYPNO)
- to_chat(M, "[(lewd?"":"")][(lewd?"You develop a sudden crush on [love], your heart beginning to race as you look upon them with new eyes.":"You suddenly feel like making friends with [love].")] You feel strangely drawn towards them.")
- log_reagent("FERMICHEM: [M] ckey: [M.key] has temporarily bonded with [love] ckey: [love.key]")
- SSblackbox.record_feedback("tally", "fermi_chem", 1, "Times people have bonded")
- else
- if(get_dist(M, love) < 8)
- var/message = "[(lewd?"I'm next to my crush..! Eee!":"I'm making friends with [love]!")]"
- SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "InLove", /datum/mood_event/InLove, message)
- SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "MissingLove")
- else
- var/message = "[(lewd?"I can't keep my crush off my mind, I need to see them again!":"I really want to make friends with [love]!")]"
- SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "MissingLove", /datum/mood_event/MissingLove, message)
- SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "InLove")
- if(prob(5))
- M.Stun(10)
- M.emote("whimper")//does this exist?
- to_chat(M, "[(lewd?"":"")] You're overcome with a desire to see [love].")
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.5)//I found out why everyone was so damaged!
- ..()
-
-/datum/reagent/fermi/enthrallExplo/on_mob_delete(mob/living/carbon/M)
- if(HAS_TRAIT(M, TRAIT_MINDSHIELD))
- return ..()
- M.remove_status_effect(STATUS_EFFECT_INLOVE)
- SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "InLove")
- SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "MissingLove")
- to_chat(M, "[(lewd?"":"")]Your feelings for [love] suddenly vanish!")
- log_reagent("FERMICHEM: [M] ckey: [M.key] is no longer in temp bond")
+/datum/reagent/fermi/enthrallExplo/on_mob_life(mob/living/carbon/M) //Drug them, jitter them, dizzy them, confuse them
+ M.Dizzy(5)
+ M.Jitter(5)
+ M.set_drugginess(15)
+ if(!M.confused)
+ M.confused = 1
+ M.confused = max(M.confused, 20)
..()
/datum/reagent/fermi/proc/FallInLove(mob/living/carbon/Lover, mob/living/carbon/Love)
diff --git a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
index edaaeb19b2..a78092988e 100644
--- a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
+++ b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
@@ -344,8 +344,13 @@
E.creatorID = B.data["ckey"]
/datum/chemical_reaction/fermi/enthrall/FermiExplode(datum/reagents/R0, var/atom/my_atom, volume, temp, pH)
+ var/turf/T = get_turf(my_atom)
+ var/datum/reagents/R = new/datum/reagents(1000)
+ var/datum/effect_system/smoke_spread/chem/s = new()
+ R.add_reagent(/datum/reagent/fermi/enthrallExplo, volume)
+ s.set_up(R, volume/2, T)
+ s.start()
R0.clear_reagents()
- ..()
/datum/chemical_reaction/fermi/hatmium // done
name = "Hat growth serum"
diff --git a/modular_citadel/icons/mob/mam_tails.dmi b/modular_citadel/icons/mob/mam_tails.dmi
index c1ffced3d5..f30f7480f6 100644
Binary files a/modular_citadel/icons/mob/mam_tails.dmi and b/modular_citadel/icons/mob/mam_tails.dmi differ
diff --git a/tgstation.dme b/tgstation.dme
index f3fb62af87..726c7674e4 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -178,6 +178,7 @@
#include "code\__HELPERS\icon_smoothing.dm"
#include "code\__HELPERS\icons.dm"
#include "code\__HELPERS\level_traits.dm"
+#include "code\__HELPERS\markov.dm"
#include "code\__HELPERS\lighting.dm"
#include "code\__HELPERS\matrices.dm"
#include "code\__HELPERS\mobs.dm"
@@ -461,6 +462,9 @@
#include "code\datums\achievements\misc_scores.dm"
#include "code\datums\achievements\skill_achievements.dm"
#include "code\datums\actions\beam_rifle.dm"
+#include "code\datums\actions\ninja.dm"
+#include "code\datums\atmosphere\_atmosphere.dm"
+#include "code\datums\atmosphere\planetary.dm"
#include "code\datums\brain_damage\brain_trauma.dm"
#include "code\datums\brain_damage\hypnosis.dm"
#include "code\datums\brain_damage\imaginary_friend.dm"
@@ -1388,6 +1392,7 @@
#include "code\game\turfs\closed.dm"
#include "code\game\turfs\open.dm"
#include "code\game\turfs\turf.dm"
+#include "code\game\turfs\open\floor\catwalk_plating.dm"
#include "code\game\turfs\simulated\chasm.dm"
#include "code\game\turfs\simulated\dirtystation.dm"
#include "code\game\turfs\simulated\floor.dm"
@@ -2788,6 +2793,9 @@
#include "code\modules\mob\living\simple_animal\friendly\drone\say.dm"
#include "code\modules\mob\living\simple_animal\friendly\drone\verbs.dm"
#include "code\modules\mob\living\simple_animal\friendly\drone\visuals_icons.dm"
+#include "code\modules\mob\living\simple_animal\gremlin\gremlin.dm"
+#include "code\modules\mob\living\simple_animal\gremlin\gremlin_act.dm"
+#include "code\modules\mob\living\simple_animal\gremlin\gremlin_event.dm"
#include "code\modules\mob\living\simple_animal\guardian\guardian.dm"
#include "code\modules\mob\living\simple_animal\guardian\types\assassin.dm"
#include "code\modules\mob\living\simple_animal\guardian\types\charger.dm"
@@ -2824,6 +2832,7 @@
#include "code\modules\mob\living\simple_animal\hostile\nanotrasen.dm"
#include "code\modules\mob\living\simple_animal\hostile\netherworld.dm"
#include "code\modules\mob\living\simple_animal\hostile\pirate.dm"
+#include "code\modules\mob\living\simple_animal\hostile\plaguerat.dm"
#include "code\modules\mob\living\simple_animal\hostile\regalrat.dm"
#include "code\modules\mob\living\simple_animal\hostile\russian.dm"
#include "code\modules\mob\living\simple_animal\hostile\sharks.dm"
28 August 2021+DeltaFire15 updated:+
Putnam3145 updated:+
keronshb updated:+
zeroisthebiggay updated:+
26 August 2021+keronshb updated:+
24 August 2021+BlueWildrose updated:+
23 August 2021+zeroisthebiggay updated:+
22 August 2021+zeroisthebiggay updated:+
20 August 2021EmeraldSundisk updated:
25 June 2021-MrJWhit updated:-
brokenOculus updated:-
24 June 2021-WanderingFox95 updated:-
23 June 2021-DeltaFire15 updated:-
Putnam3145 updated:-
22 June 2021-bunny232 updated:-
silicons updated:-
21 June 2021-silicons updated:-
timothyteakettle updated:-
20 June 2021-Arturlang updated:-
EmeraldSundisk updated:-
Nanotrasen Structual Engineering Division updated:-
bunny232 updated:-
keronshb updated:-
kiwedespars updated:-
zeroisthebiggay updated:-
19 June 2021-keronshb updated:-
|